diff options
author | friendica <info@friendica.com> | 2013-08-15 22:52:19 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-08-15 22:52:19 -0700 |
commit | a8dd7280b33008d5100b6d8020640673abf5a78a (patch) | |
tree | 497d7446c445d669d57e1a1f4cfc12d94daa1efb | |
parent | fc0a9c78a9c6761a37460d93aed033786402731e (diff) | |
download | volse-hubzilla-a8dd7280b33008d5100b6d8020640673abf5a78a.tar.gz volse-hubzilla-a8dd7280b33008d5100b6d8020640673abf5a78a.tar.bz2 volse-hubzilla-a8dd7280b33008d5100b6d8020640673abf5a78a.zip |
get rid of more variables with dashes in the names - use underscore *except* in CSS. These were probably already here, but if you see any - please keep them out of PHP and MySQL where they sometimes get interpreted as a subtraction operation and are a bugger to find.
-rwxr-xr-x | boot.php | 6 | ||||
-rw-r--r-- | include/auth.php | 2 | ||||
-rw-r--r-- | include/oauth.php | 2 | ||||
-rw-r--r-- | include/security.php | 4 | ||||
-rw-r--r-- | mod/admin.php | 22 | ||||
-rw-r--r-- | mod/community.php | 2 | ||||
-rw-r--r-- | mod/home.php | 6 | ||||
-rw-r--r-- | mod/search.php | 2 | ||||
-rw-r--r-- | mod/settings.php | 4 |
9 files changed, 25 insertions, 25 deletions
@@ -1559,7 +1559,7 @@ function profile_load(&$a, $nickname, $profile = '') { $a->profile['channel_mobile_theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); $_SESSION['theme'] = $a->profile['channel_theme']; - $_SESSION['mobile-theme'] = $a->profile['channel_mobile_theme']; + $_SESSION['mobile_theme'] = $a->profile['channel_mobile_theme']; /** * load/reload current theme info @@ -1964,8 +1964,8 @@ function current_theme(){ $is_mobile = $a->is_mobile || $a->is_tablet; if($is_mobile) { - $system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : ''); - $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme); + $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); + $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); if($theme_name === '---') { // user has selected to have the mobile theme be the same as the normal one diff --git a/include/auth.php b/include/auth.php index c86a54fb1..143a16de8 100644 --- a/include/auth.php +++ b/include/auth.php @@ -14,7 +14,7 @@ function nuke_session() { unset($_SESSION['administrator']); unset($_SESSION['cid']); unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); + unset($_SESSION['mobile_theme']); unset($_SESSION['page_flags']); unset($_SESSION['submanage']); unset($_SESSION['my_url']); diff --git a/include/oauth.php b/include/oauth.php index 2f70f21fb..6ec5285e4 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -145,7 +145,7 @@ class FKOAuth1 extends OAuthServer { } $_SESSION['uid'] = $record['uid']; $_SESSION['theme'] = $record['theme']; - $_SESSION['mobile-theme'] = get_pconfig($record['uid'], 'system', 'mobile_theme'); + $_SESSION['mobile_theme'] = get_pconfig($record['uid'], 'system', 'mobile_theme'); $_SESSION['authenticated'] = 1; $_SESSION['page_flags'] = $record['page-flags']; $_SESSION['my_url'] = $a->get_baseurl() . '/channel/' . $record['nickname']; diff --git a/include/security.php b/include/security.php index 115539ae2..4738e473b 100644 --- a/include/security.php +++ b/include/security.php @@ -34,7 +34,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive else { $_SESSION['uid'] = $user_record['uid']; $_SESSION['theme'] = $user_record['theme']; - $_SESSION['mobile-theme'] = get_pconfig($user_record['uid'], 'system', 'mobile_theme'); + $_SESSION['mobile_theme'] = get_pconfig($user_record['uid'], 'system', 'mobile_theme'); $_SESSION['authenticated'] = 1; $_SESSION['page_flags'] = $user_record['page-flags']; $_SESSION['my_url'] = $a->get_baseurl() . '/channel/' . $user_record['nickname']; @@ -149,7 +149,7 @@ function change_channel($change_channel) { $_SESSION['uid'] = intval($r[0]['channel_id']); get_app()->set_channel($r[0]); $_SESSION['theme'] = $r[0]['channel_theme']; - $_SESSION['mobile-theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); + $_SESSION['mobile_theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); date_default_timezone_set($r[0]['channel_timezone']); $ret = $r[0]; } diff --git a/mod/admin.php b/mod/admin.php index 7de133b38..df1a40019 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -210,9 +210,9 @@ function admin_page_site_post(&$a){ $banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false); $language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : ''); $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : ''); - $theme_mobile = ((x($_POST,'theme-mobile')) ? notags(trim($_POST['theme-mobile'])) : ''); - $theme_accessibility = ((x($_POST,'theme-accessibility')) ? notags(trim($_POST['theme-accessibility'])) : ''); - $site_channel = ((x($_POST,'site-channel')) ? notags(trim($_POST['site-channel'])) : ''); + $theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : ''); + $theme_accessibility = ((x($_POST,'theme_accessibility')) ? notags(trim($_POST['theme_accessibility'])) : ''); + $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : ''); $maximagesize = ((x($_POST,'maximagesize')) ? intval(trim($_POST['maximagesize'])) : 0); @@ -294,17 +294,17 @@ function admin_page_site_post(&$a){ set_config('system','language', $language); set_config('system','theme', $theme); if ( $theme_mobile === '---' ) { - del_config('system','mobile-theme'); + del_config('system','mobile_theme'); } else { - set_config('system','mobile-theme', $theme_mobile); + set_config('system','mobile_theme', $theme_mobile); } if ( $theme_accessibility === '---' ) { - del_config('system','accessibility-theme'); + del_config('system','accessibility_theme'); } else { - set_config('system','accessibility-theme', $theme_accessibility); + set_config('system','accessibility_theme', $theme_accessibility); } - set_config('system','site-channel', $site_channel); + set_config('system','site_channel', $site_channel); set_config('system','maximagesize', $maximagesize); set_config('system','register_policy', $register_policy); @@ -418,9 +418,9 @@ function admin_page_site(&$a) { '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices), - '$theme_mobile' => array('theme-mobile', t("Mobile system theme"), get_config('system','mobile-theme'), t("Theme for mobile devices"), $theme_choices_mobile), - '$theme_accessibility' => array('theme-accessibility', t("Accessibility system theme"), get_config('system','accessibility-theme'), t("Accessibility theme"), $theme_choices_accessibility), - '$site_channel' => array('site-channel', t("Channel to use for this website's static pages"), get_config('system','site-channel'), t("Site Channel")), + '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile), + '$theme_accessibility' => array('theme_accessibility', t("Accessibility system theme"), get_config('system','accessibility_theme'), t("Accessibility theme"), $theme_choices_accessibility), + '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")), '$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), '$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")), '$register_policy' => array('register_policy', t("Register policy"), get_config('system','register_policy'), "", $register_choices), diff --git a/mod/community.php b/mod/community.php index 971ecca5c..e4c6e6b04 100644 --- a/mod/community.php +++ b/mod/community.php @@ -3,7 +3,7 @@ function community_init(&$a) { if(! local_user()) { unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); + unset($_SESSION['mobile_theme']); } diff --git a/mod/home.php b/mod/home.php index 86d489853..d17d477c8 100644 --- a/mod/home.php +++ b/mod/home.php @@ -30,10 +30,10 @@ function home_content(&$a) { if(x($_SESSION,'theme')) unset($_SESSION['theme']); - if(x($_SESSION,'mobile-theme')) - unset($_SESSION['mobile-theme']); + if(x($_SESSION,'mobile_theme')) + unset($_SESSION['mobile_theme']); -$channel_address = get_config("system", "site-channel" ); +$channel_address = get_config("system", "site_channel" ); if ($channel_address){ require_once('include/items.php'); diff --git a/mod/search.php b/mod/search.php index 1335ea508..38131f63f 100644 --- a/mod/search.php +++ b/mod/search.php @@ -59,7 +59,7 @@ function search_init(&$a) { } else { unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); + unset($_SESSION['mobile_theme']); } diff --git a/mod/settings.php b/mod/settings.php index c39286ebc..50bb13ea2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -783,7 +783,7 @@ function settings_content(&$a) { $default_theme = get_config('system','theme'); if(! $default_theme) $default_theme = 'default'; - $default_mobile_theme = get_config('system','mobile-theme'); + $default_mobile_theme = get_config('system','mobile_theme'); if(! $mobile_default_theme) $mobile_default_theme = 'none'; @@ -817,7 +817,7 @@ function settings_content(&$a) { } } $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); - $mobile_theme_selected = (!x($_SESSION,'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']); + $mobile_theme_selected = (!x($_SESSION,'mobile_theme')? $default_mobile_theme : $_SESSION['mobile_theme']); $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds |