whitespace - nothing else
This commit is contained in:
parent
a87d54344f
commit
46ed2570b8
106
boot.php
106
boot.php
@ -987,15 +987,15 @@ class App {
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
function register_template_engine($class, $name = '') {
|
function register_template_engine($class, $name = '') {
|
||||||
if ($name===""){
|
if ($name===""){
|
||||||
$v = get_class_vars( $class );
|
$v = get_class_vars( $class );
|
||||||
if(x($v,"name")) $name = $v['name'];
|
if(x($v,"name")) $name = $v['name'];
|
||||||
}
|
}
|
||||||
if ($name===""){
|
if ($name===""){
|
||||||
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
$this->template_engines[$name] = $class;
|
$this->template_engines[$name] = $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1006,27 +1006,27 @@ class App {
|
|||||||
* @return object Template Engine instance
|
* @return object Template Engine instance
|
||||||
*/
|
*/
|
||||||
function template_engine($name = ''){
|
function template_engine($name = ''){
|
||||||
if ($name!=="") {
|
if ($name!=="") {
|
||||||
$template_engine = $name;
|
$template_engine = $name;
|
||||||
} else {
|
} else {
|
||||||
$template_engine = 'smarty3';
|
$template_engine = 'smarty3';
|
||||||
if (x($this->theme, 'template_engine')) {
|
if (x($this->theme, 'template_engine')) {
|
||||||
$template_engine = $this->theme['template_engine'];
|
$template_engine = $this->theme['template_engine'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->template_engines[$template_engine])){
|
if (isset($this->template_engines[$template_engine])){
|
||||||
if(isset($this->template_engine_instance[$template_engine])){
|
if(isset($this->template_engine_instance[$template_engine])){
|
||||||
return $this->template_engine_instance[$template_engine];
|
return $this->template_engine_instance[$template_engine];
|
||||||
} else {
|
} else {
|
||||||
$class = $this->template_engines[$template_engine];
|
$class = $this->template_engines[$template_engine];
|
||||||
$obj = new $class;
|
$obj = new $class;
|
||||||
$this->template_engine_instance[$template_engine] = $obj;
|
$this->template_engine_instance[$template_engine] = $obj;
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "template engine <tt>$template_engine</tt> is not registered!\n"; killme();
|
echo "template engine <tt>$template_engine</tt> is not registered!\n"; killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_template_engine() {
|
function get_template_engine() {
|
||||||
@ -1443,8 +1443,8 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
|||||||
'$logout' => t('Logout'),
|
'$logout' => t('Logout'),
|
||||||
'$login' => t('Login'),
|
'$login' => t('Login'),
|
||||||
'$form_id' => $form_id,
|
'$form_id' => $form_id,
|
||||||
'$lname' => array('username', t('Email') , '', ''),
|
'$lname' => array('username', t('Email') , '', ''),
|
||||||
'$lpassword' => array('password', t('Password'), '', ''),
|
'$lpassword' => array('password', t('Password'), '', ''),
|
||||||
'$remember' => array('remember', t('Remember me'), '', ''),
|
'$remember' => array('remember', t('Remember me'), '', ''),
|
||||||
'$hiddens' => $hiddens,
|
'$hiddens' => $hiddens,
|
||||||
|
|
||||||
@ -1642,8 +1642,8 @@ function current_theme(){
|
|||||||
|
|
||||||
$is_mobile = $a->is_mobile || $a->is_tablet;
|
$is_mobile = $a->is_mobile || $a->is_tablet;
|
||||||
|
|
||||||
$standard_system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
|
$standard_system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
|
||||||
$standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
|
$standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
|
||||||
|
|
||||||
if($is_mobile) {
|
if($is_mobile) {
|
||||||
if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) {
|
if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) {
|
||||||
@ -1759,24 +1759,24 @@ function load_contact_links($uid) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function build_querystring($params, $name=null) {
|
function build_querystring($params, $name=null) {
|
||||||
$ret = "";
|
$ret = "";
|
||||||
foreach($params as $key=>$val) {
|
foreach($params as $key=>$val) {
|
||||||
if(is_array($val)) {
|
if(is_array($val)) {
|
||||||
if($name==null) {
|
if($name==null) {
|
||||||
$ret .= build_querystring($val, $key);
|
$ret .= build_querystring($val, $key);
|
||||||
} else {
|
} else {
|
||||||
$ret .= build_querystring($val, $name."[$key]");
|
$ret .= build_querystring($val, $name."[$key]");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$val = urlencode($val);
|
$val = urlencode($val);
|
||||||
if($name!=null) {
|
if($name!=null) {
|
||||||
$ret.=$name."[$key]"."=$val&";
|
$ret .= $name . "[$key]" . "=$val&";
|
||||||
} else {
|
} else {
|
||||||
$ret.= "$key=$val&";
|
$ret .= "$key=$val&";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1849,8 +1849,8 @@ function construct_page(&$a) {
|
|||||||
$comanche = ((count($a->layout)) ? true : false);
|
$comanche = ((count($a->layout)) ? true : false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the page - now that we have all the components
|
* Build the page - now that we have all the components
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(theme_include('theme_init.php'));
|
require_once(theme_include('theme_init.php'));
|
||||||
|
|
||||||
@ -1943,7 +1943,7 @@ function construct_page(&$a) {
|
|||||||
$link = $a->get_baseurl() . '/toggle_mobile?f=&off=1&address=' . curPageURL();
|
$link = $a->get_baseurl() . '/toggle_mobile?f=&off=1&address=' . curPageURL();
|
||||||
}
|
}
|
||||||
if ((isset($_SESSION) && $_SESSION['mobile_theme'] !='' && $_SESSION['mobile_theme'] !='---' ) ||
|
if ((isset($_SESSION) && $_SESSION['mobile_theme'] !='' && $_SESSION['mobile_theme'] !='---' ) ||
|
||||||
(isset($a->config['system']['mobile_theme']) && !isset($_SESSION['mobile_theme']))) {
|
(isset($a->config['system']['mobile_theme']) && !isset($_SESSION['mobile_theme']))) {
|
||||||
$a->page['footer'] .= replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
|
$a->page['footer'] .= replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array(
|
||||||
'$toggle_link' => $link,
|
'$toggle_link' => $link,
|
||||||
'$toggle_text' => t('toggle mobile')
|
'$toggle_text' => t('toggle mobile')
|
||||||
|
Reference in New Issue
Block a user