Merge branch '54' of github.com:gnuboard/g5 into 54
This commit is contained in:
commit
66bdff3450
2 files changed
+6
-1
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ function g5_path()
|
|||||||
$server_script_filename = preg_replace('/\/+/', '/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
|
$server_script_filename = preg_replace('/\/+/', '/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
|
||||||
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $server_script_name);
|
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $server_script_name);
|
||||||
$document_root = str_replace($tilde_remove, '', $server_script_filename);
|
$document_root = str_replace($tilde_remove, '', $server_script_filename);
|
||||||
$pattern = '/' . preg_quote($document_root, '/') . '/i';
|
$pattern = '/.*?' . preg_quote($document_root, '/') . '/i';
|
||||||
$root = preg_replace($pattern, '', $result['path']);
|
$root = preg_replace($pattern, '', $result['path']);
|
||||||
$port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT'];
|
$port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT'];
|
||||||
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
|
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
|
||||||
|
|||||||
@@ -112,6 +112,9 @@ function get_menu_db($use_mobile=0, $is_cache=false){
|
|||||||
$result = sql_query($sql, false);
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
|
||||||
|
$row['ori_me_link'] = $row['me_link'];
|
||||||
|
$row['me_link'] = short_url_clean($row['me_link']);
|
||||||
$cache[$key][$i] = $row;
|
$cache[$key][$i] = $row;
|
||||||
|
|
||||||
$sql2 = " select *
|
$sql2 = " select *
|
||||||
@@ -122,6 +125,8 @@ function get_menu_db($use_mobile=0, $is_cache=false){
|
|||||||
order by me_order, me_id ";
|
order by me_order, me_id ";
|
||||||
$result2 = sql_query($sql2);
|
$result2 = sql_query($sql2);
|
||||||
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||||
|
$row2['ori_me_link'] = $row2['me_link'];
|
||||||
|
$row2['me_link'] = short_url_clean($row2['me_link']);
|
||||||
$cache[$key][$i]['sub'][$k] = $row2;
|
$cache[$key][$i]['sub'][$k] = $row2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user