Skip to content

Commit

Permalink
[FIX] Manager lang if install lang is English.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seiger committed Dec 6, 2023
1 parent 9a0f5e9 commit a49b088
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion install/src/controllers/summary.php
Expand Up @@ -14,7 +14,7 @@ function f_owc($path, $data, $mode = null)
fclose($hnd);

if (!is_null($mode)) {
chmod($path, $mode);
@chmod($path, $mode);
}
} catch (Exception $e) {
// Nothing, this is NOT normal
Expand Down
16 changes: 1 addition & 15 deletions install/src/functions.php
Expand Up @@ -165,7 +165,6 @@ function get_installmode()
}
}
}

return $installmode;
}
}
Expand All @@ -182,7 +181,7 @@ function getLangs($install_language)
) {
$manager_language = $install_language;
} else {
$manager_language = 'english';
$manager_language = 'en';
}
$langs = [];
if ($handle = opendir('../core/lang')) {
Expand All @@ -194,14 +193,12 @@ function getLangs($install_language)
closedir($handle);
}
sort($langs);

$_ = [];
foreach ($langs as $language) {
$abrv_language = explode('.', $language);
$selected = (strtolower($abrv_language[0]) == strtolower($manager_language)) ? ' selected' : '';
$_[] = '<option value="' . $abrv_language[0] . '" ' . $selected . '>' . strtoupper($abrv_language[0]) . '</option>';
}

return implode("\n", $_);
}
}
Expand All @@ -220,7 +217,6 @@ function sortItem($array = [], $order = 'utf8mb4,utf8')
}
}
$rs['unrecommend'] = '';

return $rs + $array;
}
}
Expand Down Expand Up @@ -249,7 +245,6 @@ function getTemplates($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%templates%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -279,7 +274,6 @@ function getTVs($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%tvs%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -310,7 +304,6 @@ function getChunks($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%chunks%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -341,7 +334,6 @@ function getModules($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%modules%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -376,7 +368,6 @@ function getPlugins($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%plugins%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -407,7 +398,6 @@ function getSnippets($presets = [])
$_[] = parse($tpl, $ph);
$i++;
}

return (0 < count($_)) ? '<h3>[%snippets%]</h3>' . implode("\n", $_) : '';
}
}
Expand Down Expand Up @@ -476,7 +466,6 @@ function parse_docblock($element_dir, $filename)
@fclose($tpl);
}
}

return $params;
}
}
Expand Down Expand Up @@ -510,7 +499,6 @@ function propertiesNameValue($propertyString)
}
}
}

return $parameter;
}
}
Expand Down Expand Up @@ -619,7 +607,6 @@ function parseProperties($propertyString, $json = false)
function isJson($string, $returnData = false)
{
$data = json_decode($string, true);

return (json_last_error() == JSON_ERROR_NONE) ? ($returnData ? $data : true) : false;
}
}
Expand Down Expand Up @@ -654,7 +641,6 @@ function getCreateDbCategory($category)
*/
function removeDocblock($code, $type)
{

$cleaned = preg_replace("/^.*?\/\*\*.*?\*\/\s+/s", '', $code, 1);

// Procedure taken from plugin.filesource.php
Expand Down

0 comments on commit a49b088

Please sign in to comment.