|
|
@@ -337,16 +337,20 @@ function removeOldGameConfigs(){ // Wrote this function in-case we rename config
|
|
|
);
|
|
|
|
|
|
foreach($oldConfigsToRemove as $config){
|
|
|
- if(file_exists($config)){
|
|
|
- unlink($config);
|
|
|
- }else{
|
|
|
- if(file_exists(__DIR__ . "/../" . $config)){
|
|
|
- unlink($config);
|
|
|
- }
|
|
|
- }
|
|
|
+ recursiveDelete($config);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function removeOldPanelFiles(){ // Should run post panel update to remove old files that are no longer users
|
|
|
+ $oldFiles = array(
|
|
|
+ 'includes/database_mysql.php',
|
|
|
+ );
|
|
|
+
|
|
|
+ foreach($oldFiles as $file){
|
|
|
+ recursiveDelete($file);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function getOGPGitHubURL($gitHubUsername, $repo){
|
|
|
$OGPGitHub = "https://github.com/OpenGamePanel/";
|
|
|
$gitHubURL = $OGPGitHub;
|
|
|
@@ -393,4 +397,20 @@ function getGitHubOrganization($gitHubURL){
|
|
|
return $gitHubOrg;
|
|
|
}
|
|
|
|
|
|
+function getOGPLangConstantsJSON(){
|
|
|
+ $finalConsts = array();
|
|
|
+ $consts = get_defined_constants(true);
|
|
|
+ foreach($consts["user"] as $key => $value){
|
|
|
+ if(strtolower($key) == $key){
|
|
|
+ $finalConsts[$key] = $value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(count($finalConsts) > 0){
|
|
|
+ return json_encode(utf8ize($finalConsts));
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
?>
|