Просмотр исходного кода

Better Check for OGP Lang Constants

own3mall 8 лет назад
Родитель
Сommit
4e85d381aa
2 измененных файлов с 5 добавлено и 2 удалено
  1. 1 1
      includes/helpers.php
  2. 4 1
      modules/update/updating.php

+ 1 - 1
includes/helpers.php

@@ -401,7 +401,7 @@ function getOGPLangConstantsJSON(){
 	$finalConsts = array();
 	$consts = get_defined_constants(true);
 	foreach($consts["user"] as $key => $value){
-		if(strtolower($key) == $key){
+		if(lcfirst($key) === $key[0]){
 			$finalConsts[$key] = $value;
 		}
 	}

+ 4 - 1
modules/update/updating.php

@@ -269,7 +269,10 @@ function exec_ogp_module()
 					update_module($db, $row['id'], $row['folder']);
 				}
 				print_success(update_complete); 
-				removeOldPanelFiles();
+				
+				if(function_exists("removeOldPanelFiles")){
+					removeOldPanelFiles();
+				}
 			}
 			else
 			{