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
|
||||
*/
|
||||
function register_template_engine($class, $name = '') {
|
||||
if ($name===""){
|
||||
$v = get_class_vars( $class );
|
||||
if(x($v,"name")) $name = $v['name'];
|
||||
}
|
||||
if ($name===""){
|
||||
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
||||
killme();
|
||||
}
|
||||
$this->template_engines[$name] = $class;
|
||||
if ($name===""){
|
||||
$v = get_class_vars( $class );
|
||||
if(x($v,"name")) $name = $v['name'];
|
||||
}
|
||||
if ($name===""){
|
||||
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
||||
killme();
|
||||
}
|
||||
$this->template_engines[$name] = $class;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1006,27 +1006,27 @@ class App {
|
||||
* @return object Template Engine instance
|
||||
*/
|
||||
function template_engine($name = ''){
|
||||
if ($name!=="") {
|
||||
$template_engine = $name;
|
||||
} else {
|
||||
$template_engine = 'smarty3';
|
||||
if (x($this->theme, 'template_engine')) {
|
||||
$template_engine = $this->theme['template_engine'];
|
||||
}
|
||||
}
|
||||
if ($name!=="") {
|
||||
$template_engine = $name;
|
||||
} else {
|
||||
$template_engine = 'smarty3';
|
||||
if (x($this->theme, 'template_engine')) {
|
||||
$template_engine = $this->theme['template_engine'];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->template_engines[$template_engine])){
|
||||
if(isset($this->template_engine_instance[$template_engine])){
|
||||
return $this->template_engine_instance[$template_engine];
|
||||
} else {
|
||||
$class = $this->template_engines[$template_engine];
|
||||
$obj = new $class;
|
||||
$this->template_engine_instance[$template_engine] = $obj;
|
||||
return $obj;
|
||||
}
|
||||
}
|
||||
if (isset($this->template_engines[$template_engine])){
|
||||
if(isset($this->template_engine_instance[$template_engine])){
|
||||
return $this->template_engine_instance[$template_engine];
|
||||
} else {
|
||||
$class = $this->template_engines[$template_engine];
|
||||
$obj = new $class;
|
||||
$this->template_engine_instance[$template_engine] = $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() {
|
||||
@ -1443,8 +1443,8 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
||||
'$logout' => t('Logout'),
|
||||
'$login' => t('Login'),
|
||||
'$form_id' => $form_id,
|
||||
'$lname' => array('username', t('Email') , '', ''),
|
||||
'$lpassword' => array('password', t('Password'), '', ''),
|
||||
'$lname' => array('username', t('Email') , '', ''),
|
||||
'$lpassword' => array('password', t('Password'), '', ''),
|
||||
'$remember' => array('remember', t('Remember me'), '', ''),
|
||||
'$hiddens' => $hiddens,
|
||||
|
||||
@ -1642,8 +1642,8 @@ function current_theme(){
|
||||
|
||||
$is_mobile = $a->is_mobile || $a->is_tablet;
|
||||
|
||||
$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_system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
|
||||
$standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
|
||||
|
||||
if($is_mobile) {
|
||||
if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) {
|
||||
@ -1759,24 +1759,24 @@ function load_contact_links($uid) {
|
||||
*/
|
||||
|
||||
function build_querystring($params, $name=null) {
|
||||
$ret = "";
|
||||
foreach($params as $key=>$val) {
|
||||
if(is_array($val)) {
|
||||
if($name==null) {
|
||||
$ret .= build_querystring($val, $key);
|
||||
} else {
|
||||
$ret .= build_querystring($val, $name."[$key]");
|
||||
}
|
||||
} else {
|
||||
$val = urlencode($val);
|
||||
if($name!=null) {
|
||||
$ret.=$name."[$key]"."=$val&";
|
||||
} else {
|
||||
$ret.= "$key=$val&";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
$ret = "";
|
||||
foreach($params as $key=>$val) {
|
||||
if(is_array($val)) {
|
||||
if($name==null) {
|
||||
$ret .= build_querystring($val, $key);
|
||||
} else {
|
||||
$ret .= build_querystring($val, $name."[$key]");
|
||||
}
|
||||
} else {
|
||||
$val = urlencode($val);
|
||||
if($name!=null) {
|
||||
$ret .= $name . "[$key]" . "=$val&";
|
||||
} else {
|
||||
$ret .= "$key=$val&";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
@ -1849,8 +1849,8 @@ function construct_page(&$a) {
|
||||
$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'));
|
||||
|
||||
@ -1943,7 +1943,7 @@ function construct_page(&$a) {
|
||||
$link = $a->get_baseurl() . '/toggle_mobile?f=&off=1&address=' . curPageURL();
|
||||
}
|
||||
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(
|
||||
'$toggle_link' => $link,
|
||||
'$toggle_text' => t('toggle mobile')
|
||||
|
Reference in New Issue
Block a user