X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=93c7a3b9c10a4ff9979d8eafde851f8b6ead8311;hb=12f7c32f9b31a182596659d62a96c3c4c367576d;hp=f56f2fc0fb7fe0b2d99e0c5a0026accb0455f222;hpb=a8d12061ca3b274f29f7316c650b94581d0ecf9e;p=friendica.git diff --git a/boot.php b/boot.php index f56f2fc0fb..93c7a3b9c1 100644 --- a/boot.php +++ b/boot.php @@ -11,9 +11,9 @@ require_once('include/cache.php'); require_once('library/Mobile_Detect/Mobile_Detect.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1463' ); +define ( 'FRIENDICA_VERSION', '3.0.1471' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1154 ); +define ( 'DB_UPDATE_VERSION', 1156 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -1511,14 +1511,20 @@ if(! function_exists('current_theme')) { $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet(); 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); - - if($theme_name === '---') { - // user has selected to have the mobile theme be the same as the normal one + if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { $system_theme = ''; $theme_name = ''; } + else { + $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 + $system_theme = ''; + $theme_name = ''; + } + } } if(!$is_mobile || ($system_theme === '' && $theme_name === '')) { $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : ''); @@ -1760,3 +1766,20 @@ function build_querystring($params, $name=null) { } return $ret; } + +/** +* Returns the complete URL of the current page, e.g.: http(s)://something.com/network +* +* Taken from http://webcheatsheet.com/php/get_current_page_url.php +*/ +function curPageURL() { + $pageURL = 'http'; + if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} + $pageURL .= "://"; + if ($_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443") { + $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; + } else { + $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; + } + return $pageURL; +}