1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

Remove some references to deprecated functions/methods.

This commit is contained in:
Cameron 2015-02-14 23:34:15 -08:00
parent db057b3788
commit e576370e57
84 changed files with 319 additions and 317 deletions

View File

@ -1098,7 +1098,7 @@ if(e_ADMIN_AREA) // Load admin phrases ASAP
if(!defined('THEME'))
{
if (e_ADMIN_AREA && varsettrue($pref['admintheme']))
if (e_ADMIN_AREA && vartrue($pref['admintheme']))
{
//We have now e_IFRAME mod and USER_AREA force
// && (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE)

View File

@ -875,7 +875,7 @@ switch ($action)
if (!isset($banlist_notes)) $banlist_notes = '';
$page_title = array('edit' => BANLAN_60, 'add' => BANLAN_9, 'whedit' => BANLAN_59, 'whadd' => BANLAN_58);
$rdns_warn = varsettrue($pref['enable_rdns']) ? '' : '<div class="field-help error">'.BANLAN_12.'</div>';
$rdns_warn = vartrue($pref['enable_rdns']) ? '' : '<div class="field-help error">'.BANLAN_12.'</div>';
$next = ($action == 'whedit' || $action == 'whadd') ? '?white' : '?list';
// Edit/add form first
$text .= "
@ -1003,7 +1003,7 @@ switch ($action)
$error = true;
$mes->addError(BANLAN_47);
}
if(empty($files) || varsettrue($files[0]['error']))
if(empty($files) || vartrue($files[0]['error']))
{
$error = true;
if(varset($files[0]['message']))

View File

@ -1118,7 +1118,7 @@ class file_inspector {
if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
if (!deftrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
{
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";

View File

@ -96,7 +96,7 @@ if (varset($e107_popup) != 1)
// B.2 Send footer template, stop timing, send simple page stats
//
//NEW - Iframe mod
if (!defsettrue('e_IFRAME'))
if (!deftrue('e_IFRAME'))
{
parse_admin($ADMIN_FOOTER);
}

View File

@ -281,7 +281,7 @@ if (isset($eplug_css) && $eplug_css)
}
//NEW - Iframe mod
if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'] && !vartrue($_GET['configure']))
if (!deftrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'] && !vartrue($_GET['configure']))
{
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";

View File

@ -2406,7 +2406,7 @@ if (isset($_POST['submit_avdelete_multi']))
$search_users = $sql->db_getList('ALL', FALSE, FALSE, 'user_id');
foreach($_POST['multiaction'] as $uid)
{
if (varsettrue($search_users[$uid]))
if (vartrue($search_users[$uid]))
{
$avname = avatar($search_users[$uid]['user_image']);
if (strpos($avname, "http://") === FALSE)

View File

@ -360,7 +360,7 @@ class lancheck
}
// Write the language file.
if(isset($_POST['submit']) && varsettrue($_POST['lan']) && in_array($_POST['lan'],$acceptedLans))
if(isset($_POST['submit']) && vartrue($_POST['lan']) && in_array($_POST['lan'],$acceptedLans))
{
$this->write_lanfile($_POST['lan']);
@ -368,7 +368,7 @@ class lancheck
}
// Edit the Language File.
if(varsettrue($_GET['f']) && varsettrue($_GET['lan']) && in_array($_GET['lan'],$acceptedLans))
if(vartrue($_GET['f']) && vartrue($_GET['lan']) && in_array($_GET['lan'],$acceptedLans))
{
if (!$_GET['mode'])
@ -491,13 +491,13 @@ class lancheck
$icon = ($_SESSION['lancheck'][$_POST['language']]['total']>0) ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON;
$errors_diz = (defsettrue('LAN_CHECK_23')) ? LAN_CHECK_23 : "Errors Found";
$errors_diz = (deftrue('LAN_CHECK_23')) ? LAN_CHECK_23 : "Errors Found";
$message .= $errors_diz.": ".$_SESSION['lancheck'][$_POST['language']]['total'];
$just_go_diz = (defsettrue('LAN_CHECK_20')) ? LAN_CHECK_20 : "Generate Language Pack";
$lang_sel_diz = (defsettrue('LAN_CHECK_21')) ? LAN_CHECK_21 : "Verify Again";
$lan_pleasewait = (defsettrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : "Please Wait";
$just_go_diz = (deftrue('LAN_CHECK_20')) ? LAN_CHECK_20 : "Generate Language Pack";
$lang_sel_diz = (deftrue('LAN_CHECK_21')) ? LAN_CHECK_21 : "Verify Again";
$lan_pleasewait = (deftrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : "Please Wait";
$message .= "
<br /><br />
@ -540,7 +540,7 @@ class lancheck
$kom_start = chr(47)."*";
$kom_end = "*".chr(47);
if(varsettrue($_SESSION['lancheck-edit-file']))
if(vartrue($_SESSION['lancheck-edit-file']))
{
$writeit = $_SESSION['lancheck-edit-file'];
}
@ -614,7 +614,7 @@ class lancheck
$defvar = $_POST['newdef'][$i];
}
if($_POST['newdef'][$i] == "LC_ALL" && varsettrue($_SESSION['lancheck-edit-file']))
if($_POST['newdef'][$i] == "LC_ALL" && vartrue($_SESSION['lancheck-edit-file']))
{
$message .= $notdef_start.'setlocale('.htmlentities($defvar).','.$deflang.');<br />'.$notdef_end;
$input .= $notdef_start."setlocale(".$defvar.",".$deflang.");".$notdef_end;

View File

@ -946,8 +946,8 @@ function show_packs()
$release_diz = defined("LANG_LAN_30") ? LANG_LAN_30 : "Release Date";
$compat_diz = defined("LANG_LAN_31") ? LANG_LAN_31 : "Compatibility";
$lan_pleasewait = (defsettrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : "Please Wait";
$lan_displayerrors = (defsettrue('LANG_LAN_33')) ? LANG_LAN_33 : "Display only errors during verification";
$lan_pleasewait = (deftrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : "Please Wait";
$lan_displayerrors = (deftrue('LANG_LAN_33')) ? LANG_LAN_33 : "Display only errors during verification";
$text = "<form id='lancheck' method='post' action='".e_SELF."?tools'>
@ -1021,7 +1021,7 @@ function show_packs()
$srch = array("[","]");
$repl = array("<a rel='external' href='http://e107.org/content/About-Us:The-Team#translation-team'>","</a>");
$diz = (defsettrue("LANG_LAN_28")) ? LANG_LAN_28 : "Check this box if you're an [e107 certified translator].";
$diz = (deftrue("LANG_LAN_28")) ? LANG_LAN_28 : "Check this box if you're an [e107 certified translator].";
$checked = varset($_COOKIE['e107_certified']) == 1 ? true : false;

View File

@ -1004,7 +1004,7 @@ class mailout_main_ui extends e_admin_ui
$text .= "<tr>
<td>".LAN_MAILOUT_57."</td><td>
";
$checked = (varsettrue($pref['smtp_keepalive']) ) ? "checked='checked'" : '';
$checked = (vartrue($pref['smtp_keepalive']) ) ? "checked='checked'" : '';
$text .= "<input type='checkbox' name='smtp_keepalive' value='1' {$checked} />
</td>
</tr>";
@ -1271,8 +1271,8 @@ class mailout_main_ui extends e_admin_ui
$smtp_opts[] = 'pop3auth';
break;
}
if (varsettrue($_POST['smtp_keepalive'])) $smtp_opts[] = 'keepalive';
if (varsettrue($_POST['smtp_useVERP'])) $smtp_opts[] = 'useVERP';
if (vartrue($_POST['smtp_keepalive'])) $smtp_opts[] = 'keepalive';
if (vartrue($_POST['smtp_useVERP'])) $smtp_opts[] = 'useVERP';
$temp['smtp_options'] = implode(',',$smtp_opts);

View File

@ -644,7 +644,7 @@ class e_layout
*/
$this->curLayout = varsettrue($_GET['configure'], $pref['sitetheme_deflayout']);
$this->curLayout = vartrue($_GET['configure'], $pref['sitetheme_deflayout']);
$this->renderLayout($this->curLayout);

View File

@ -1053,7 +1053,7 @@ class admin_newspost
function parseRequest($qry)
{
$tmp = explode(".", $qry);
$action = varsettrue($tmp[0], 'main');
$action = vartrue($tmp[0], 'main');
$sub_action = varset($tmp[1], '');
$id = isset($tmp[2]) && is_numeric($tmp[2]) ? intval($tmp[2]) : 0;
$this->_sort_order = isset($tmp[2]) && !is_numeric($tmp[2]) ? $tmp[2] : 'desc';
@ -2149,7 +2149,7 @@ class admin_newspost
$_POST['news_body'] = $row['submitnews_item'];
$_POST['cat_id'] = $row['submitnews_category'];
if (defsettrue('e_WYSIWYG'))
if (deftrue('e_WYSIWYG'))
{
if (substr($_POST['news_body'],-7,7) == '[/html]') $_POST['news_body'] = substr($_POST['news_body'],0,-7);
if (substr($_POST['news_body'],0,6) == '[html]') $_POST['news_body'] = substr($_POST['news_body'],6);

View File

@ -127,7 +127,7 @@ class pluginmanager_form extends e_form
{
$text .= ($this->plug['plugin_installflag'] ? "<a class='btn' href=\"".e_SELF."?uninstall.{$this->plug['plugin_id']}\" title='".EPL_ADLAN_1."' >".ADMIN_UNINSTALLPLUGIN_ICON."</a>" : "<a class='btn' href=\"".e_SELF."?install.{$this->plug['plugin_id']}\" title='".EPL_ADLAN_0."' >".ADMIN_INSTALLPLUGIN_ICON."</a>");
// $text .= ($this->plug['plugin_installflag'] ? "<button type='button' class='delete' value='no-value' onclick=\"location.href='".e_SELF."?uninstall.{$this->plug['plugin_id']}'\"><span>".EPL_ADLAN_1."</span></button>" : "<button type='button' class='update' value='no-value' onclick=\"location.href='".e_SELF."?install.{$this->plug['plugin_id']}'\"><span>".EPL_ADLAN_0."</span></button>");
if (PLUGIN_SHOW_REFRESH && !varsettrue($this->plug_vars['plugin_php']))
if (PLUGIN_SHOW_REFRESH && !vartrue($this->plug_vars['plugin_php']))
{
$text .= "<br /><br /><input type='button' class='btn button' onclick=\"location.href='".e_SELF."?refresh.{$this->plug['plugin_id']}'\" title='".'Refresh plugin settings'."' value='".'Refresh plugin settings'."' /> ";
}

View File

@ -91,20 +91,22 @@ if(e_AJAX_REQUEST)
echo $mp->renderLoginForm();
exit;
break;
/*
case 'download':
$string = base64_decode($_GET['src']);
parse_str($string, $p);
$mp = $themec->getMarketplace();
$mp->generateAuthKey($e107SiteUsername, $e107SiteUserpass);
// Server flush useless. It's ajax ready state 4, we can't flush (sadly) before that (at least not for all browsers)
echo "<pre>Connecting...\n"; flush(); // FIXME change the modal default label, default is Loading...
echo "<pre>Connecting...\n"; flush();
// download and flush
$mp->download($p['id'], $p['mode'], $p['type']);
echo "</pre>"; flush();
exit;
break;
*/
case 'info':
$string = base64_decode($_GET['src']);
parse_str($string,$p);

View File

@ -183,7 +183,7 @@ class e107Update
{
$installed = call_user_func("update_".$func);
//?! (LAN_UPDATE == $_POST[$func])
if(varsettrue($_POST['update_core'][$func]) && !$installed)
if(vartrue($_POST['update_core'][$func]) && !$installed)
{
if(function_exists("update_".$func))
{
@ -203,8 +203,8 @@ class e107Update
}
}
else
{
$mes->addDebug("could run 'update_".$func);
{
$mes->addDebug("could run 'update_".$func);
}
//}
@ -881,7 +881,7 @@ function update_706_to_800($type='')
}
// Check need for user timezone before we delete the field
if (varsettrue($pref['signup_option_timezone']))
if (vartrue($pref['signup_option_timezone']))
{
if ($sql->db_Field('user', 'user_timezone', '', TRUE) && !$sql->db_Field('user_extended','user_timezone','',TRUE))
{
@ -1143,8 +1143,8 @@ function update_706_to_800($type='')
asort($exclude);
}
else
{
$exclude = false;
{
$exclude = false;
}
$dbv->compareAll($exclude); // core & plugins, but not plugins calling for an update with xxxxx_setup.php
@ -1498,8 +1498,8 @@ function update_706_to_800($type='')
}
else
{
// $log->addDebug("Media COUNT was ".$count. " LINE: ".__LINE__);
{
// $log->addDebug("Media COUNT was ".$count. " LINE: ".__LINE__);
}
// Check for Legacy Download Images.
@ -1652,9 +1652,9 @@ function update_706_to_800($type='')
}
else
{
{
$log->toFile('upgrade_v1_to_v2_check');
}

View File

@ -36,7 +36,7 @@ if (isset($_POST['update_settings']))
$userData['data']['user_password'] = $sql->escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE);
unset($_POST['a_password']);
unset($_POST['a_password2']);
if (varsettrue($pref['allowEmailLogin']))
if (vartrue($pref['allowEmailLogin']))
{
$user_prefs = e107::getArrayStorage()->unserialize($currentUser['user_prefs']);
$user_prefs['email_password'] = $userMethods->HashPassword($new_pass, $email);

View File

@ -507,10 +507,10 @@ switch ($action)
$file_text = "<e107Filetypes>\n";
foreach ($_POST['file_class_select'] as $k => $c)
{
if (!isset($_POST['file_line_delete_'.$c]) && varsettrue($_POST['file_type_list'][$k]))
if (!isset($_POST['file_line_delete_'.$c]) && vartrue($_POST['file_type_list'][$k]))
{
// echo "Key: {$k} Class: {$c} Delete: {$_POST['file_line_delete'][$k]} List: {$_POST['file_type_list'][$k]} Size: {$_POST['file_maxupload'][$k]}<br />";
$file_text .= " <class name='{$c}' type='{$_POST['file_type_list'][$k]}' maxupload='".varsettrue($_POST['file_maxupload'][$k],ini_get('upload_max_filesize'))."' />\n";
$file_text .= " <class name='{$c}' type='{$_POST['file_type_list'][$k]}' maxupload='".vartrue($_POST['file_maxupload'][$k],ini_get('upload_max_filesize'))."' />\n";
}
}
$file_text .= "</e107Filetypes>\n";

View File

@ -31,9 +31,9 @@ class bb_block extends e_bb_base
$parms = eHelper::scParams($parm);
$safe = array();
if(varsettrue($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']);
if(varsettrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
if(varsettrue($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']);
if(vartrue($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']);
if(vartrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
if(vartrue($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']);
if($safe)
{
return '[block='.eHelper::buildAttr($safe).']'.$code_text.'[/block]';
@ -54,8 +54,8 @@ class bb_block extends e_bb_base
$class = e107::getBB()->getClass('block').(varset($parms['class']) ? ' '.$parms['class'] : '');
$class = ' class="'.$class.'"';
$id = varsettrue($parms['id']) ? ' id="'.eHelper::secureIdAttr($parms['id']).'"' : '';
$style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
$id = vartrue($parms['id']) ? ' id="'.eHelper::secureIdAttr($parms['id']).'"' : '';
$style = vartrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
if(empty($code_text)) $code_text = '<!-- -->';
return '<div'.$id.$class.$style.'>'.$code_text.'</div>';

View File

@ -67,8 +67,8 @@ class bb_h extends e_bb_base
$class = " class='".e107::getBB()->getClass($h)."'"; // consistent classes across all themes.
$id = varsettrue($parms['id']) ? ' id='.eHelper::secureIdAttr($parms['id']) : '';
$style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
$id = vartrue($parms['id']) ? ' id='.eHelper::secureIdAttr($parms['id']) : '';
$style = vartrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
return "<{$h}{$id}{$class}{$style}>".$code_text."</{$h}>";
}

View File

@ -20,9 +20,9 @@ class bb_img extends e_bb_base
$parms = eHelper::scParams($parm);
$safe = array();
if(varsettrue($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']);
if(varsettrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
if(varsettrue($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']);
if(vartrue($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']);
if(vartrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
if(vartrue($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']);
if($safe)
{
return '[img='.eHelper::buildAttr($safe).']'.$code_text.'[/img]';
@ -202,7 +202,7 @@ class bb_img extends e_bb_base
// Check for whether we can display image down here - so we can show image name if appropriate
if (!varsettrue($pref['image_post']) || !check_class($pref['image_post_class']))
if (!vartrue($pref['image_post']) || !check_class($pref['image_post_class']))
{
switch ($pref['image_post_disabled_method'])
{

View File

@ -62,8 +62,8 @@ class bb_p extends e_bb_base
$class = " ".e107::getBB()->getClass('p'); // consistent classes across all themes.
$id = varsettrue($parms['id']) ? ' id="'.eHelper::secureIdAttr($parms['id']).'"' : '';
$style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
$id = vartrue($parms['id']) ? ' id="'.eHelper::secureIdAttr($parms['id']).'"' : '';
$style = vartrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : '';
return "<p{$id}{$class}{$style}>".$code_text.'</p>';
}

View File

@ -1483,7 +1483,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
// ---------------- Cameron's Bit ---------------------------------
if(!varsettrue($pref['admin_separate_plugins']))
if(!vartrue($pref['admin_separate_plugins']))
{
// Convert Plugin Categories to Core Categories.
$convert = array(
@ -1517,7 +1517,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
// ------------------------------------------------------------------
//added option to disable leave/logout (ll) - more flexibility for theme developers
if(!varsettrue($parms['disable_ll']))
if(!vartrue($parms['disable_ll']))
{
// $menu_vars += $this->getOtherNav('home');
}

View File

@ -153,7 +153,7 @@ class news_shortcodes extends e_shortcode
function sc_trackback($parm)
{
global $pref;
if(!varsettrue($pref['trackbackEnabled'])) { return ''; }
if(!vartrue($pref['trackbackEnabled'])) { return ''; }
$news_item = $this->news_item;
$news_item['#'] = 'track';

View File

@ -186,7 +186,7 @@ class signup_shortcodes extends e_shortcode
function sc_signup_loginname()
{
global $rs, $pref;
if (varsettrue($pref['predefinedLoginName']))
if (vartrue($pref['predefinedLoginName']))
{
return LAN_SIGNUP_67;
}

View File

@ -27,7 +27,7 @@ function imageselector_shortcode($parm = '', $mod = '')
$path = ""; // remove the default path if a constant is used.
}
$scaction = varsettrue($scaction, 'all');
$scaction = vartrue($scaction, 'all');
$text = '';
$name_id = e107::getForm()->name2id($name);
$imagelist = array();

View File

@ -409,7 +409,7 @@ function nextprev_shortcode($parm = '')
if($total_pages > 1)
{
if(varsettrue($pref['old_np']))
if(vartrue($pref['old_np']))
{
$NP_PRE_ACTIVE = '';

View File

@ -1,11 +1,11 @@
<?php
/**
* e107 website system
*
* Copyright (C) 2008-2010 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* e107 website system
*
* Copyright (C) 2008-2010 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Admin Log Handler
*
* USAGE:
@ -13,24 +13,24 @@
* @example Log and Add to Message Handler: e107::getAdminLog()->addSuccess("Successfully executed")->save('PREF_01');
* @example Log Only: e107::getAdminLog()->addSuccess("Successfully executed",false)->save('PREF_01');
* @example Log Array Diff: e107::getAdminLog()->addArray($array1, $array2)->save('PREF_01');
* @example Log Array Diff and Add to Message Handler: e107::getAdminLog()->addArray($array1, $array2, E_MESSAGE_ERROR )->save('PREF_01');
*
*/
* @example Log Array Diff and Add to Message Handler: e107::getAdminLog()->addArray($array1, $array2, E_MESSAGE_ERROR )->save('PREF_01');
*
*/
if (!defined('e107_INIT'))
{
exit;
}
define('LOG_MESSAGE_NODISPLAY', 'nodisplay');
define('LOG_MESSAGE_NODISPLAY', 'nodisplay');
/**
* Admin logging class.
*
* @package e107
* @subpackage e107_handlers
* @version $Id$;
* @author e107steved
* @version $Id$;
* @author e107steved
*/
class e_admin_log
{
@ -47,16 +47,16 @@ class e_admin_log
protected $logFile = null;
/**
* Log messages
* @var array
*/
/**
* Log messages
* @var array
*/
protected $_messages;
protected $_allMessages; // similar to $_messages except it is never flushed.
/**
* Constructor. Sets up constants and overwrites default options where set.
*
@ -98,14 +98,14 @@ class e_admin_log
define('USER_AUDIT_BANNED', 22); // User banned
define('USER_AUDIT_BOUNCE_RESET', 23); // User bounce reset
define('USER_AUDIT_TEMP_ACCOUNT', 24); // User temporary account
// Init E_MESSAGE_* constants if not already done
// Init E_MESSAGE_* constants if not already done
// e107::getMessage(); - just include, message handler is creating session in construct
// it breaks stuff (see class2 - language detection and comments)
require_once(e_HANDLER.'message_handler.php');
require_once(e_HANDLER.'message_handler.php');
$this->_messages = array();
$this->_allMessages = array();
}
/**
@ -175,7 +175,7 @@ class e_admin_log
{
// handled inside e_log_event();
/*
/*
$tmp = array();
if (isset($event_detail['data']))
{
@ -187,7 +187,7 @@ class e_admin_log
}
$event_detail = implode("[!br!]\n", $tmp);
unset($tmp);
*/
*/
}
else
@ -313,7 +313,7 @@ class e_admin_log
//---------------------------------------
// Rolling Log
//---------------------------------------
if (($target_logs & LOG_TO_ROLLING) && varsettrue($pref['roll_log_active']))
if (($target_logs & LOG_TO_ROLLING) && vartrue($pref['roll_log_active']))
{ // Rolling log
// Process source_call info
@ -462,7 +462,7 @@ class e_admin_log
*
* @return bool true if changes found and logged, false otherwise.
*/
function logArrayDiffs($new, $old, $event, $logNow = true)
function logArrayDiffs($new, $old, $event, $logNow = true)
{
// $changes = array();
@ -478,7 +478,7 @@ class e_admin_log
{
$this->logMessage($changes, LOG_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
}
return TRUE;
}
@ -528,24 +528,24 @@ class e_admin_log
}
$this->add($event, $logString, E_LOG_INFORMATIVE, '');
}
/**
* The next two routines accept and buffers messages which are destined for both admin log and message handler
* The next two routines accept and buffers messages which are destined for both admin log and message handler
*/
/**
* Add a message to the queue
*
* @param string $text - the message text for logging/display
* @param int $type - the 'importance' of the message. E_MESSAGE_SUCCESS|E_MESSAGE_ERROR|E_MESSAGE_INFO|E_MESSAGE_DEBUG|E_MESSAGE_NODISPLAY
* @param int $type - the 'importance' of the message. E_MESSAGE_SUCCESS|E_MESSAGE_ERROR|E_MESSAGE_INFO|E_MESSAGE_DEBUG|E_MESSAGE_NODISPLAY
* (Values as used in message handler, apart from the last, which causes the message to not be passed to the message handler
* @param boolean|int $logLevel - TRUE to give same importance as for message display. FALSE to not log.
* one of the values specified for $mesLevel to determine the prefix attached to the log message
* @param boolean $session add session message
*
* @return e_admin_log
* @param boolean $session add session message
*
* @return e_admin_log
*/
public function logMessage($text, $type = '', $logLevel = TRUE, $session = FALSE)
public function logMessage($text, $type = '', $logLevel = TRUE, $session = FALSE)
{
if(is_array($text))
@ -558,17 +558,17 @@ class e_admin_log
e107::getMessage()->addDebug("Log Message was empty: ".print_a($bt[1],true));
return $this; // changing to text will break chained methods.
}
if(!$type) $type = E_MESSAGE_INFO;
if(!$type) $type = E_MESSAGE_INFO;
if($logLevel === TRUE) $logLevel = $type;
$logArray = array('message' => $text, 'dislevel' => $type, 'loglevel' => $logLevel, 'session' => $session, 'time'=>time());
$this->_messages[] = $logArray;
$this->_allMessages[] = $logArray;
return $this;
}
return $this;
}
@ -607,18 +607,18 @@ class e_admin_log
}
/**
* Add an error message to the log queue
*
* @param string $text
* @param boolean $message if true (default) - register with eMessage handler, set to false to hide.
* @param boolean $session add session message
* @return e_admin_log
*/
public function addError($text, $message = true, $session = false)
{
return $this->logMessage($text, ($message ? E_MESSAGE_ERROR : LOG_MESSAGE_NODISPLAY), E_MESSAGE_ERROR, $session);
}
/**
* Add an error message to the log queue
*
* @param string $text
* @param boolean $message if true (default) - register with eMessage handler, set to false to hide.
* @param boolean $session add session message
* @return e_admin_log
*/
public function addError($text, $message = true, $session = false)
{
return $this->logMessage($text, ($message ? E_MESSAGE_ERROR : LOG_MESSAGE_NODISPLAY), E_MESSAGE_ERROR, $session);
}
/**
@ -681,7 +681,7 @@ class e_admin_log
* @param int $logImportance - passed directly to admin log
* @param string $logEventCode - passed directly to admin log
* @param string $mstack [optional] message stack passed to message handler
* @return e_admin_log
* @return e_admin_log
*/
public function flushMessages($logTitle, $logImportance = E_LOG_INFORMATIVE, $logEventCode = '', $mstack = false)
{
@ -690,34 +690,34 @@ class e_admin_log
$resultTypes = array(E_MESSAGE_SUCCESS - 'Success', E_MESSAGE_ERROR => 'Fail'); // Add LANS here. Could add other codes
$separator = '';
$logString = '';
foreach ($this->_messages as $m)
foreach ($this->_messages as $m)
{
if ($m['loglevel'] !== FALSE)
{
$logString .= $separator;
if ($m['loglevel'] == LOG_MESSAGE_NODISPLAY) { $logString .= ' '; } // Indent supplementary messages
// Not sure about next line - might want to log the <br /> as text, rather than it forcing a newline
$logString .= strip_tags(str_replace(array('<br>', '<br/>', '<br />'), '[!br!]', $m['message']));
// Not sure about next line - might want to log the <br /> as text, rather than it forcing a newline
$logString .= strip_tags(str_replace(array('<br>', '<br/>', '<br />'), '[!br!]', $m['message']));
if (isset($resultTypes[$m['loglevel']]))
{
$logString .= ' - '.$resultTypes[$m['loglevel']];
}
$separator = '[!br!]';
}
if ($m['dislevel'] != LOG_MESSAGE_NODISPLAY)
if ($m['dislevel'] != LOG_MESSAGE_NODISPLAY)
{
if($mstack)
{
$mes->addStack($m['message'], $mstack, $m['dislevel'], $m['session']);
// move to main stack OUTSIDE if needed
}
else $mes->add($m['message'], $m['dislevel'], $m['session']);
else $mes->add($m['message'], $m['dislevel'], $m['session']);
}
}
e107::getAdminLog()->add($logTitle, $logString, $logImportance, $logEventCode);
$this->_messages = array(); // Clear the memory for reuse
return $this;
return $this;
}
@ -751,8 +751,8 @@ class e_admin_log
$head .= "-------------------------------------------------------------------------------------------\n\n";
}
else
{
return;
{
return;
}
foreach($this->_allMessages as $m)
@ -785,9 +785,9 @@ class e_admin_log
}
}
else
{
{
$app = null;
$text = $head . $text;
$text = $head . $text;
}
if(file_put_contents($fileName, $text, $app))
@ -796,8 +796,8 @@ class e_admin_log
return $this->logFile;
}
elseif(getperms('0') && E107_DEBUG_LEVEL > 0)
{
echo "Could Save to Log File: ".$fileName;
{
echo "Could Save to Log File: ".$fileName;
}
return false;

View File

@ -63,8 +63,7 @@ function defset($str, $default='')
*/
function varsettrue(&$val, $default='')
{
if (isset($val) && $val) { return $val; }
return $default;
return vartrue($val, $default);
}
/**
@ -76,7 +75,9 @@ function varsettrue(&$val, $default='')
*/
function vartrue(&$val, $default='')
{
return varsettrue($val, $default);
if (isset($val) && $val) { return $val; }
return $default;
}
/**
@ -468,7 +469,7 @@ class e_array {
/**
* @DEPRECATED: Use e107::unserialize(); instead.
* Returns an array from stored array data.
*
* @deprecated
* @param string $ArrayData
* @return array stored data
*/

View File

@ -292,7 +292,7 @@ class db_table_admin
{
$def .= ' default '.$list['default'];
}
if (varsettrue($list['autoinc']))
if (vartrue($list['autoinc']))
{
$def .= ' auto_increment';
}

View File

@ -3287,7 +3287,7 @@ class e107
if (
(!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory
|| ($isPluginDir && (strpos(e_PAGE,'_admin.php') !== false || strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== FALSE)) // Plugin admin file or directory
|| (varsettrue($eplug_admin) || defsettrue('ADMIN_AREA')) // Admin forced
|| (vartrue($eplug_admin) || deftrue('ADMIN_AREA')) // Admin forced
|| (preg_match('/^\/(.*?)\/user(settings\.php|\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI']) && ADMIN)
)
{

View File

@ -1390,15 +1390,15 @@ class e_parse extends e_parser
}
// Turn off a few things if not enabled in options
if(!varsettrue($pref['smiley_activate']))
if(!vartrue($pref['smiley_activate']))
{
$opts['emotes'] = FALSE;
}
if(!varsettrue($pref['make_clickable']))
if(!vartrue($pref['make_clickable']))
{
$opts['link_click'] = FALSE;
}
if(!varsettrue($pref['link_replace']))
if(!vartrue($pref['link_replace']))
{
$opts['link_replace'] = FALSE;
}

View File

@ -28,7 +28,7 @@ class e_ranks
//Check to see if we can get it from cache
if($force == false && ($ranks = $e107->ecache->retrieve_sys('nomd5_user_ranks')))
{
$this->ranks = $e107->arrayStorage->ReadArray($ranks);
$this->ranks = e107::unserialize($ranks);
}
else
{

View File

@ -2452,7 +2452,7 @@ class e_form
$count = 0;
foreach($fieldarray as $key=>$val)
{
if ((in_array($key, $columnPref) || $key=='options' || varsettrue($val['forced'])) && !vartrue($val['nolist']))
if ((in_array($key, $columnPref) || $key=='options' || vartrue($val['forced'])) && !vartrue($val['nolist']))
{
$class = vartrue($val['class']) ? 'class="'.$val['class'].'"' : '';
$width = vartrue($val['width']) ? ' style="width:'.$val['width'].'"' : '';
@ -2523,7 +2523,7 @@ class e_form
<th id='e-column-".str_replace('_', '-', $key)."'{$cl}>
";
if($querypattern!="" && !varsettrue($val['nosort']) && $key != "options" && $key != "checkboxes")
if($querypattern!="" && !vartrue($val['nosort']) && $key != "options" && $key != "checkboxes")
{
$from = ($key == $field) ? $fromval : 0;
$srch = array("[FIELD]","[ASC]","[FROM]");

View File

@ -894,7 +894,7 @@ class eIPHandler
}
// User is banned hereafter - just need to sort out the details.
if (varsettrue($pref['ban_retrigger']) && varsettrue($pref['ban_durations'][$row['banlist_bantype']]))
if (vartrue($pref['ban_retrigger']) && vartrue($pref['ban_durations'][$row['banlist_bantype']]))
{ // May need to retrigger ban period
$sql->db_Update('banlist', "`banlist_banexpires`=".intval(time()+($pref['ban_durations'][$row['banlist_bantype']]*60*60)), "WHERE `banlist_ip`='{$row['banlist_ip']}'");
$this->regenerateFiles();
@ -979,7 +979,7 @@ class eIPHandler
//$admin_log->e_log_event(4, __FILE__."|".__FUNCTION__."@".__LINE__, "BANLIST_11", 'LAN_AL_BANLIST_11', $ban_ip, FALSE, LOG_TO_ROLLING);
return FALSE;
} */
if(varsettrue($pref['enable_rdns_on_ban']))
if(vartrue($pref['enable_rdns_on_ban']))
{
$ban_message .= 'Host: '.$this->get_host_name($ban_ip);
}
@ -990,7 +990,7 @@ class eIPHandler
'banlist_ip' => $ban_ip ,
'banlist_bantype' => $bantype ,
'banlist_datestamp' => time() ,
'banlist_banexpires' => (varsettrue($pref['ban_durations'][$bantype]) ? time()+($pref['ban_durations'][$bantype]*60*60) : 0) ,
'banlist_banexpires' => (vartrue($pref['ban_durations'][$bantype]) ? time()+($pref['ban_durations'][$bantype]*60*60) : 0) ,
'banlist_admin' => $ban_user ,
'banlist_reason' => $ban_message ,
'banlist_notes' => $ban_notes

View File

@ -1033,7 +1033,7 @@ class e_jsmanager
break;
case 'header':
$this->renderFile(varsettrue($this->_runtime_header[$zone], array()), $external, 'Header JS include - zone #'.$zone, $mod);
$this->renderFile(vartrue($this->_runtime_header[$zone], array()), $external, 'Header JS include - zone #'.$zone, $mod);
unset($this->_runtime_header[$zone]);
break;
@ -1075,13 +1075,13 @@ class e_jsmanager
}
else
{
$this->renderFile(varsettrue($this->_runtime_footer[$zone], array()), $external, 'Footer JS include - priority #'.$zone, $mod);
$this->renderFile(vartrue($this->_runtime_footer[$zone], array()), $external, 'Footer JS include - priority #'.$zone, $mod);
unset($this->_runtime_footer[$zone]);
}
break;
case 'header_inline':
$this->renderInline(varsettrue($this->_runtime_header_src[$zone], array()), 'Header JS - zone #'.$zone);
$this->renderInline(vartrue($this->_runtime_header_src[$zone], array()), 'Header JS - zone #'.$zone);
unset($this->_runtime_header_src[$zone]);
break;
@ -1097,7 +1097,7 @@ class e_jsmanager
}
else
{
$this->renderInline(varsettrue($this->_runtime_footer_src[$zone], array()), 'Footer JS - priority #'.$zone);
$this->renderInline(vartrue($this->_runtime_footer_src[$zone], array()), 'Footer JS - priority #'.$zone);
unset($this->_runtime_footer_src[$zone]);
}
break;
@ -1354,7 +1354,7 @@ class e_jsmanager
public function getCurrentTheme()
{
// XXX - USERTHEME is defined only on user session init
return ($this->isInAdmin() ? e107::getPref('admintheme') : defsettrue('USERTHEME', e107::getPref('sitetheme')));
return ($this->isInAdmin() ? e107::getPref('admintheme') : deftrue('USERTHEME', e107::getPref('sitetheme')));
}
/**

View File

@ -435,7 +435,7 @@ class language{
if(false !== $this->detect && !$force) return $this->detect;
$this->_cookie_domain = '';
if(varsettrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== FALSE))
if(vartrue($pref['multilanguage_subdomain']) && $this->isLangDomain(e_DOMAIN) && (defset('MULTILANG_SUBDOMAIN') !== FALSE))
{
$detect_language = (e_SUBDOMAIN) ? $this->isValid(e_SUBDOMAIN) : $pref['sitelanguage'];
// Done in session handler now, based on MULTILANG_SUBDOMAIN value

View File

@ -401,7 +401,7 @@ class userlogin
if($forceLogin === 'provider') return true;
if ($this->lookEmail && varsettrue($pref['passwordEncoding']))
if ($this->lookEmail && vartrue($pref['passwordEncoding']))
{
$tmp = e107::getArrayStorage()->unserialize($this->userData['user_prefs']);
if(!$tmp && $this->userData['user_prefs']) $tmp = unserialize($this->userData['user_prefs']); // try old storage type

View File

@ -401,8 +401,7 @@ class e107MailManager
}
if (isset($data['mail_target_info']))
{
$array = new ArrayData;
$tmp = $array->ReadArray($data['mail_target_info']);
$tmp = e107::unserialize($data['mail_target_info']);
$res['mail_target_info'] = $tmp;
}
return $res;

View File

@ -89,7 +89,7 @@ class core_mailout
$res = array();
foreach ($this->selectFields as $k)
{
if (varsettrue($_POST[$k]))
if (vartrue($_POST[$k]))
{
$res[$k] = $tp->toDB($_POST[$k]);
}

View File

@ -58,7 +58,7 @@ class e_menuManager {
}
else
{
$this->curLayout = varsettrue($_GET['configure'], $pref['sitetheme_deflayout']);
$this->curLayout = vartrue($_GET['configure'], $pref['sitetheme_deflayout']);
}
$this->dbLayout = ($this->curLayout != $pref['sitetheme_deflayout']) ? $this->curLayout : ""; //menu_layout is left blank when it's default.
@ -1154,7 +1154,7 @@ class e_menuManager {
function menuSetCode($matches, &$ret)
{
if(!$matches || !varsettrue($matches[1]))
if(!$matches || !vartrue($matches[1]))
{
return;
}

View File

@ -383,7 +383,7 @@ class eMessage
{
return constant('EMESSLAN_TITLE_'.strtoupper($type.'_'.$message_stack));
}
return defsettrue('EMESSLAN_TITLE_'.strtoupper($type), '');
return deftrue('EMESSLAN_TITLE_'.strtoupper($type), '');
}

View File

@ -1535,7 +1535,7 @@ class e_model extends e_object
$cached = e107::getCache()->retrieve_sys($this->getCacheString(true), false, $this->_cache_force);
if(false !== $cached)
{
return e107::getArrayStorage()->ReadArray($cached);
return e107::unserialize($cached);
}
return false;

View File

@ -370,7 +370,7 @@ class e_db_mysql
$userstring = ( USER === true ? USERNAME : "LAN_ANONYMOUS");
$ip = e107::getIPHandler()->getIP(FALSE);
$qry = $tp->toDB($log_query);
$this->db_Insert('dblog', "0, {$time_sec}, {$time_usec}, '{$log_type}', 'DBDEBUG', {$uid}, '{$userstring}', '{$ip}', '', '{$log_remark}', '{$qry}'");
$this->insert('dblog', "0, {$time_sec}, {$time_usec}, '{$log_type}', 'DBDEBUG', {$uid}, '{$userstring}', '{$ip}', '', '{$log_remark}', '{$qry}'");
}
@ -1280,7 +1280,10 @@ class e_db_mysql
}
}
}
/**
* @deprecated use $sql->delete();
*/
function db_Delete($table, $arg = '', $debug = FALSE, $log_type = '', $log_remark = '')
{
return $this->delete($table, $arg, $debug, $log_type, $log_remark);
@ -2191,8 +2194,7 @@ class e_db_mysql
$temp = file_get_contents(e_CACHE_DB.$tableName.'.php', FILE_TEXT);
if ($temp !== FALSE)
{
$array = e107::getArrayStorage();
$typeDefs = $array->ReadArray($temp);
$typeDefs = e107::unserialize($temp);
unset($temp);
$this->dbFieldDefs[$tableName] = $typeDefs;
}

View File

@ -476,7 +476,7 @@ class e_news_item extends e_front_model
$val = $this->field($field, '');
//do more with $parm array, just an example here
if(varsettrue($parm['format']))
if(vartrue($parm['format']))
{
switch ($parm['format'])
{
@ -485,7 +485,7 @@ class e_news_item extends e_front_model
$method = 'toHTML';
$callback = e107::getParser();
$parm['arg'] = explode(',', varset($parm['arg']));
$parm['arg'][0] = varsettrue($parm['arg'][0]) ? true : false; //to boolean
$parm['arg'][0] = vartrue($parm['arg'][0]) ? true : false; //to boolean
$params = array($val); //value is always the first callback argument
$params += $parm['arg'];
break;

View File

@ -111,13 +111,13 @@ $email_info = unserialize($row['gen_chardata']); // Gives us sender_name, sende
$mail = new PHPMailer();
$mail->From = varsettrue($email_info['sender_email'],$pref['siteadminemail']);
$mail->FromName = varsettrue($email_info['sender_name'], $pref['siteadmin']);
$mail->From = vartrue($email_info['sender_email'],$pref['siteadminemail']);
$mail->FromName = vartrue($email_info['sender_name'], $pref['siteadmin']);
// $mail->Host = "smtp1.site.com;smtp2.site.com";
if ($pref['mailer']== 'smtp')
{
$mail->Mailer = "smtp";
$mail->SMTPKeepAlive = varsettrue($pref['smtp_keepalive']) ? TRUE : FALSE;
$mail->SMTPKeepAlive = vartrue($pref['smtp_keepalive']) ? TRUE : FALSE;
if($pref['smtp_server'])
{
$mail->Host = $pref['smtp_server'];
@ -205,7 +205,7 @@ $email_info = unserialize($row['gen_chardata']); // Gives us sender_name, sende
$mail_head .= "<html xmlns='http://www.w3.org/1999/xhtml' >\n";
$mail_head .= "<head><meta http-equiv='content-type' content='text/html; charset=".CHARSET."' />\n";
if (varsettrue($email_info['use_theme']))
if (vartrue($email_info['use_theme']))
{
$theme = $THEMES_DIRECTORY.$pref['sitetheme']."/";
$style_css = file_get_contents(e_THEME.$pref['sitetheme']."/style.css");

View File

@ -392,7 +392,7 @@ class e107plugin
{
// print_a($plug_info);
$pluginDBList[$plugin_path]['status'] = 'update';
$pluginDBList[$plugin_path]['plugin_category'] = (varsettrue($plug_info['category'])) ? $plug_info['category'] : "misc";
$pluginDBList[$plugin_path]['plugin_category'] = (vartrue($plug_info['category'])) ? $plug_info['category'] : "misc";
}
// If plugin not installed, and version number of files changed, update version as well
@ -2140,7 +2140,7 @@ class e107plugin
case 'uninstall': //If uninstalling, remove all userclasses (active or inactive)
if (varsettrue($this->unInstallOpts['delete_userclasses'], FALSE))
if (vartrue($this->unInstallOpts['delete_userclasses'], FALSE))
{
$status = $this->manage_userclass('remove', $name, $description) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add('Removing Userclass: '.$name, $status);
@ -2205,7 +2205,7 @@ class e107plugin
case 'uninstall': //If uninstalling, remove all extended fields (active or inactive)
if (varsettrue($this->unInstallOpts['delete_xfields'], FALSE))
if (vartrue($this->unInstallOpts['delete_xfields'], FALSE))
{
$status = ($this->manage_extended_field('remove', $name, $attrib, $source)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add('Removing Extended Field: '.$name.' ... ', $status);

View File

@ -443,7 +443,7 @@ class e_session
if (empty($this->_options['domain']))
{
// MULTILANG_SUBDOMAIN set during initial language detection in language handler
$doma = ((!e_SUBDOMAIN || defsettrue('MULTILANG_SUBDOMAIN')) && e_DOMAIN != FALSE) ? ".".e_DOMAIN : FALSE; // from v1.x
$doma = ((!e_SUBDOMAIN || deftrue('MULTILANG_SUBDOMAIN')) && e_DOMAIN != FALSE) ? ".".e_DOMAIN : FALSE; // from v1.x
$this->_options['domain'] = $doma;
}

View File

@ -1162,7 +1162,7 @@ class e_parse_shortcode
}
else
{
$cur_shortcodes = $eArrayStorage->ReadArray($sc_cache);
$cur_shortcodes = e107::unserialize($sc_cache);
$sc_batch = "";
}
}

View File

@ -216,7 +216,7 @@ class sitelinks
{
return;
}
$sub['link_expand'] = ((isset($pref['sitelinks_expandsub']) && $pref['sitelinks_expandsub']) && !varsettrue($style['linkmainonly']) && !defined("LINKSRENDERONLYMAIN") && isset($this->eLinkList[$main_linkid]) && is_array($this->eLinkList[$main_linkid])) ? TRUE : FALSE;
$sub['link_expand'] = ((isset($pref['sitelinks_expandsub']) && $pref['sitelinks_expandsub']) && !vartrue($style['linkmainonly']) && !defined("LINKSRENDERONLYMAIN") && isset($this->eLinkList[$main_linkid]) && is_array($this->eLinkList[$main_linkid])) ? TRUE : FALSE;
foreach($this->eLinkList[$main_linkid] as $val) // check that something in the submenu is actually selected.
{
@ -236,7 +236,7 @@ class sitelinks
foreach ($this->eLinkList[$main_linkid] as $sub)
{
$id = "sub_".$sub['link_id'];
$sub['link_expand'] = ((isset($pref['sitelinks_expandsub']) && $pref['sitelinks_expandsub']) && !varsettrue($style['linkmainonly']) && !defined("LINKSRENDERONLYMAIN") && isset($this->eLinkList[$id]) && is_array($this->eLinkList[$id])) ? TRUE : FALSE;
$sub['link_expand'] = ((isset($pref['sitelinks_expandsub']) && $pref['sitelinks_expandsub']) && !vartrue($style['linkmainonly']) && !defined("LINKSRENDERONLYMAIN") && isset($this->eLinkList[$id]) && is_array($this->eLinkList[$id])) ? TRUE : FALSE;
$class = "sublink-level-".($level+1);
$class .= ($css_class) ? " ".$css_class : "";
$text .= $this->makeLink($sub, TRUE, $aSubStyle,$class );
@ -1251,9 +1251,9 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$replace[0] = str_replace(" ", "&nbsp;", $e107_vars[$act]['text']);
// valid URLs
$replace[1] = str_replace(array('&amp;', '&'), array('&', '&amp;'), varsettrue($e107_vars[$act]['link'], "#{$act}"));
$replace[1] = str_replace(array('&amp;', '&'), array('&', '&amp;'), vartrue($e107_vars[$act]['link'], "#{$act}"));
$replace[2] = '';
if (varsettrue($e107_vars[$act]['include']))
if (vartrue($e107_vars[$act]['include']))
{
$replace[2] = $e107_vars[$act]['include'];
//$replace[2] = $js ? " onclick=\"showhideit('".$act."');\"" : " onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\"";
@ -1286,7 +1286,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$START_SUB = $tmpl['start_sub'];
}
if (varsettrue($e107_vars[$act]['sub']))
if (vartrue($e107_vars[$act]['sub']))
{
$replace[6] = $id ? " id='eplug-nav-{$rid}-sub'" : '';
$replace[7] = ' '.varset($e107_vars[$act]['link_class'], 'e-expandit');

View File

@ -1683,11 +1683,14 @@ class themeHandler
}
/**
* @param $name
*/
function installContentCheck($name)
{
$file = e_THEME.$name."/install/install.xml";
$frm = e107::getForm();
$tp = e107::getParser();
if(!is_readable($file))
{
@ -1711,7 +1714,7 @@ class themeHandler
$data = array('x'=> $count, 'y' => $val['@attributes']['name']);
$lan = "Replace/Overwrite [x] record(s) in your [y] table. ";
$text .= "<li>".$lng->translate($lan, $data)."</li>";
$text .= "<li>".$tp->lanVars($lan, $data)."</li>";
}
$text .= "</ul>
@ -1734,19 +1737,12 @@ class themeHandler
e107::getXml()->e107Import($file, 'replace', true, false); // Overwrite specific core pref and tables entries.
$mes->addSuccess(LAN_UPDATED);
}
/**
* @param $theme
* @return int|string
*/
function findDefault($theme)
{
if(varset($_POST['layout_default']))

View File

@ -1608,8 +1608,8 @@ class e_user extends e_user_model
if(!$adapter->getUserProfile()->identifier) continue;
$id = $providerId.'_'.$adapter->getUserProfile()->identifier;
$where[] = "user_xup='".$sql->escape($id)."'";
$id = $providerId.'_'.$adapter->getUserProfile()->identifier;
$where[] = "user_xup='".$sql->escape($id)."'";
}
$where = implode(' OR ', $where);
if($sql->db_Select('user', 'user_id, user_password, user_xup', $where))
@ -2626,7 +2626,7 @@ class e_user_pref extends e_front_model
if(!empty($data))
{
// BC
$data = substr($data, 0, 5) == "array" ? e107::getArrayStorage()->ReadArray($data) : unserialize($data);
$data = substr($data, 0, 5) == "array" ? e107::unserialize($data) : unserialize($data);
if(!$data) $data = array();
}
else $data = array();

View File

@ -1010,7 +1010,7 @@ class validatorClass
}
else
{
if (!varsettrue($defs['fieldOptional']))
if (!vartrue($defs['fieldOptional']))
{
$ret['errors'][$dest] = ERR_MISSING_VALUE; // No source value
}
@ -1021,7 +1021,7 @@ class validatorClass
$value = $sourceFields[$src];
if (!$errNum && isset($defs['enablePref']))
{ // Only process this field if a specified pref enables it
if (!varsettrue($pref[$defs['enablePref']]))
if (!vartrue($pref[$defs['enablePref']]))
{
continue; // Just loop to the next field - ignore this one.
}
@ -1049,7 +1049,7 @@ class validatorClass
{
if ($value == '')
{
if (!varsettrue($defs['fieldOptional']))
if (!vartrue($defs['fieldOptional']))
{
$errNum = ERR_MISSING_VALUE;
}
@ -1061,7 +1061,7 @@ class validatorClass
}
if (!$errNum && isset($defs['maxLength']) && $tp->ustrlen($value) > $defs['maxLength'])
{
if (varsettrue($defs['longtrim']))
if (vartrue($defs['longtrim']))
{
$value = substr($value,0,$defs['maxLength']);
}
@ -1240,7 +1240,7 @@ class validatorClass
if (isset($definitions[$f]))
{
$options = $definitions[$f]; // Validation options to use
if (!varsettrue($options['fieldOptional']) || ($v != ''))
if (!vartrue($options['fieldOptional']) || ($v != ''))
{
$toDo = explode(',',$options['vetMethod']);
foreach ($toDo as $vm)
@ -1281,7 +1281,7 @@ class validatorClass
}
break;
case 3 : // Check email address against remote server
if (varsettrue($pref['signup_remote_emailcheck']))
if (vartrue($pref['signup_remote_emailcheck']))
{
require_once(e_HANDLER."mail_validation_class.php");
list($adminuser,$adminhost) = split ("@", SITEADMINEMAIL);

View File

@ -1081,7 +1081,7 @@ class xmlClass
// var_dump(e107::getArrayStorage()->ReadArray($val['@value']));
// echo $val['@value'].'</pre>';
// }
$value = strpos($val['@value'], 'array (') === 0 ? e107::getArrayStorage()->ReadArray($val['@value']) : $val['@value'];
$value = strpos($val['@value'], 'array (') === 0 ? e107::unserialize($val['@value']) : $val['@value'];
$pref[$name] = $value;
// $mes->add("Setting up ".$prefType." Pref [".$name."] => ".$value, E_MESSAGE_DEBUG);

View File

@ -139,7 +139,7 @@ class alt_auth_admin extends alt_auth_base
$ret = '';
foreach ($this->alt_auth_user_fields as $f => $v)
{
if (varsettrue($v['showAll']) || varsettrue($v[$tableType]))
if (vartrue($v['showAll']) || vartrue($v[$tableType]))
{
$ret .= "<tr><td$log>";
if ($v['optional'] == FALSE) $ret .= '*&nbsp;';
@ -196,7 +196,7 @@ class alt_auth_admin extends alt_auth_base
$ret = array();
foreach ($this->alt_auth_user_fields as $f => $v)
{
if (varsettrue($v['showAll']) || varsettrue($v[$tableType]))
if (vartrue($v['showAll']) || vartrue($v[$tableType]))
{
// $fieldname = $tableType.'_'.$v['optname'];
$fieldname = $tableType.'_xf_'.$f; // Name of the input box

View File

@ -674,7 +674,7 @@ if (isset($_POST['delete_cancel'])) // delete cancelled - redirect back to 'mana
exit;
}
if (vartrue($action) == "delete" && $sub_action && varsettrue($_POST['delete_confirm'])) // delete has been confirmed, process
if (vartrue($action) == "delete" && $sub_action && vartrue($_POST['delete_confirm'])) // delete has been confirmed, process
{
if($sql->db_Delete("banner", "banner_id=".intval($sub_action)))
{

View File

@ -557,9 +557,9 @@ if ($action == "uopt")
$file_text = "<e107Filetypes>\n";
foreach ($_POST['file_class_select'] as $k => $c)
{
if (!isset($_POST['file_line_delete_'.$c]) && varsettrue($_POST['file_type_list'][$k]))
if (!isset($_POST['file_line_delete_'.$c]) && vartrue($_POST['file_type_list'][$k]))
{
$file_text .= " <class name='{$c}' type='{$_POST['file_type_list'][$k]}' maxupload='".varsettrue($_POST['file_maxupload'][$k],ini_get('upload_max_filesize'))."'/>\n";
$file_text .= " <class name='{$c}' type='{$_POST['file_type_list'][$k]}' maxupload='".vartrue($_POST['file_maxupload'][$k],ini_get('upload_max_filesize'))."'/>\n";
}
}
$file_text .= "</e107Filetypes>";

View File

@ -60,9 +60,9 @@ class list_download
$rowheading = $this->parent->parse_heading($row['download_name']);
$record['icon'] = $bullet;
$record['heading'] = "<a href='".e_BASE."download.php?view.".$row['download_id']."'>".$rowheading."</a>";
$record['author'] = (varsettrue($this->parent->settings['author']) ? $row['download_author'] : "");
$record['category'] = (varsettrue($this->parent->settings['category']) ? "<a href='".e_BASE."download.php?list.".$row['download_category_id']."'>".$row['download_category_name']."</a>" : "");
$record['date'] = (varsettrue($this->parent->settings['date']) ? $this->parent->getListDate($row['download_datestamp']) : "");
$record['author'] = (vartrue($this->parent->settings['author']) ? $row['download_author'] : "");
$record['category'] = (vartrue($this->parent->settings['category']) ? "<a href='".e_BASE."download.php?list.".$row['download_category_id']."'>".$row['download_category_name']."</a>" : "");
$record['date'] = (vartrue($this->parent->settings['date']) ? $this->parent->getListDate($row['download_datestamp']) : "");
$record['info'] = "";
$list_data[] = $record;

View File

@ -205,7 +205,7 @@ if (USER && vartrue($allread) != TRUE && $total_new_threads && $total_new_thread
$fVars->INFO .= "<br /><a href='".e_SELF."?mark.all.as.read'>".LAN_FORUM_0057.'</a>'.(e_QUERY != 'new' ? ", <a href='".e_SELF."?new'>".LAN_FORUM_0058."</a>" : '');
}
if (USER && varsettrue($forum->prefs->get('track')) && e_QUERY != 'track')
if (USER && vartrue($forum->prefs->get('track')) && e_QUERY != 'track')
{
$fVars->INFO .= "<br /><a href='".e_SELF."?track'>".LAN_FORUM_0030.'</a>';
}

View File

@ -454,12 +454,12 @@ class e107forum
$e107 = e107::getInstance();
if($tmp = $e107->ecache->retrieve_sys('forum_perms'))
{
$this->permList = $e107->arrayStorage->ReadArray($tmp);
$this->permList = e107::unserialize($tmp);
}
else
{
$this->_getForumPermList();
$tmp = $e107->arrayStorage->WriteArray($this->permList, false);
$tmp = e107::serialize($this->permList, false);
$e107->ecache->set_sys('forum_perms', $tmp);
}
unset($tmp);

View File

@ -56,12 +56,12 @@ if(e_QUERY)
}
//set mode
$rc->mode = (varsettrue($mode) == 'new' ? 'new_page' : 'recent_page');
$rc->mode = (vartrue($mode) == 'new' ? 'new_page' : 'recent_page');
//parse page
$text = $rc->displayPage();
$caption = varsettrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$caption = vartrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$rc->e107->ns->tablerender($caption, $text);
unset($text);

View File

@ -117,7 +117,7 @@ class list_admin
$this->row['FIELD'] = "";
for($i=0;$i<count($this->parent->sections);$i++)
{
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_display", 1, (varsettrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_display"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_display", 1, (vartrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_display"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
}
$text .= $this->parseTemplate('TOPIC_ROW');
@ -129,7 +129,7 @@ class list_admin
$this->row['FIELD'] = "";
for($i=0;$i<count($this->parent->sections);$i++)
{
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_open", 1, (varsettrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_open"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_open", 1, (vartrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_open"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
}
$text .= $this->parseTemplate('TOPIC_ROW');
@ -141,7 +141,7 @@ class list_admin
$this->row['FIELD'] = "";
for($i=0;$i<count($this->parent->sections);$i++)
{
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_author", 1, (varsettrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_author"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_author", 1, (vartrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_author"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
}
$text .= $this->parseTemplate('TOPIC_ROW');
@ -153,7 +153,7 @@ class list_admin
$this->row['CONTID'] = "list-new-{$type}-expandable-category";
for($i=0;$i<count($this->parent->sections);$i++)
{
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_category", 1, (varsettrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_category"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_category", 1, (vartrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_category"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
}
$text .= $this->parseTemplate('TOPIC_ROW');
@ -165,7 +165,7 @@ class list_admin
$this->row['CONTID'] = "list-new-{$type}-expandable-date";
for($i=0;$i<count($this->parent->sections);$i++)
{
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_date", 1, (varsettrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_date"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
$this->row['FIELD'] .= $rs->form_checkbox($this->parent->sections[$i]."_".$type."_date", 1, (vartrue($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_date"]) ? "1" : "0"))." ".$this->parent->titles[$i]."<br />";
}
$text .= $this->parseTemplate('TOPIC_ROW');

View File

@ -160,17 +160,17 @@ class listclass
for($i=0;$i<count($this->sections);$i++)
{
$s = $this->sections[$i];
if(varsettrue($this->list_pref[$s."_".$mode."_display"]) == '1')
if(vartrue($this->list_pref[$s."_".$mode."_display"]) == '1')
{
$arr[$s]['caption'] = varsettrue($this->list_pref[$s."_".$mode."_caption"]);
$arr[$s]['display'] = varsettrue($this->list_pref[$s."_".$mode."_display"]);
$arr[$s]['open'] = varsettrue($this->list_pref[$s."_".$mode."_open"]);
$arr[$s]['author'] = varsettrue($this->list_pref[$s."_".$mode."_author"]);
$arr[$s]['category'] = varsettrue($this->list_pref[$s."_".$mode."_category"]);
$arr[$s]['date'] = varsettrue($this->list_pref[$s."_".$mode."_date"]);
$arr[$s]['icon'] = varsettrue($this->list_pref[$s."_".$mode."_icon"]);
$arr[$s]['amount'] = varsettrue($this->list_pref[$s."_".$mode."_amount"]);
$arr[$s]['order'] = varsettrue($this->list_pref[$s."_".$mode."_order"]);
$arr[$s]['caption'] = vartrue($this->list_pref[$s."_".$mode."_caption"]);
$arr[$s]['display'] = vartrue($this->list_pref[$s."_".$mode."_display"]);
$arr[$s]['open'] = vartrue($this->list_pref[$s."_".$mode."_open"]);
$arr[$s]['author'] = vartrue($this->list_pref[$s."_".$mode."_author"]);
$arr[$s]['category'] = vartrue($this->list_pref[$s."_".$mode."_category"]);
$arr[$s]['date'] = vartrue($this->list_pref[$s."_".$mode."_date"]);
$arr[$s]['icon'] = vartrue($this->list_pref[$s."_".$mode."_icon"]);
$arr[$s]['amount'] = vartrue($this->list_pref[$s."_".$mode."_amount"]);
$arr[$s]['order'] = vartrue($this->list_pref[$s."_".$mode."_order"]);
$arr[$s]['section'] = $s;
}
}
@ -224,7 +224,7 @@ class listclass
while($row = $sql->fetch())
{
$content_types[] = "content_".$row['content_id'];
if(varsettrue($mode) == "add")
if(vartrue($mode) == "add")
{
$this->sections[] = "content_".$row['content_id'];
$this->titles[] = $content_name." : ".$row['content_heading'];
@ -602,11 +602,11 @@ class listclass
global $qs;
$lvisit = defined('USERLV') ? USERLV : time() + 1000; // Set default value
if(varsettrue($qs[0]) == "new")
if(vartrue($qs[0]) == "new")
{
if(varsettrue($this->list_pref['new_page_timelapse']))
if(vartrue($this->list_pref['new_page_timelapse']))
{
if(varsettrue($this->list_pref['new_page_timelapse_days']) && is_numeric($this->list_pref['new_page_timelapse_days']))
if(vartrue($this->list_pref['new_page_timelapse_days']) && is_numeric($this->list_pref['new_page_timelapse_days']))
{
$days = $this->list_pref['new_page_timelapse_days'];
}
@ -660,7 +660,7 @@ class listclass
}
}
}
$bullet = varsettrue($bullet, $default_bullet);
$bullet = vartrue($bullet, $default_bullet);
return $bullet;
}
@ -782,7 +782,7 @@ class listclass
$arr = $this->prepareSectionArray($this->mode);
//timelapse
if(varsettrue($qs[0]) == "new")
if(vartrue($qs[0]) == "new")
{
$text .= $this->displayTimelapse();
}

View File

@ -44,7 +44,7 @@ $rc->mode = "new_menu";
//parse menu
$text = $rc->displayMenu();
$caption = varsettrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$caption = vartrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$caption = $rc->e107->tp->toHtml($caption, FALSE, 'USER_TITLE');
$text = $rc->e107->tp->toHtml($text, TRUE, 'USER_BODY');
$rc->e107->ns->tablerender($caption, $text, 'list_new');

View File

@ -44,7 +44,7 @@ $rc->mode = "recent_menu";
//parse menu
$text = $rc->displayMenu();
$caption = varsettrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$caption = vartrue($rc->list_pref[$rc->mode."_caption"], LIST_MENU_1);
$caption = $rc->e107->tp->toHtml($caption, FALSE, 'USER_TITLE');
$text = $rc->e107->tp->toHtml($text, TRUE, 'USER_BODY');
$rc->e107->ns->tablerender($caption, $text, 'list_recent');

View File

@ -84,7 +84,7 @@ class list_shortcodes
function sc_list_displaystyle()
{
//open sections if content exists ? yes if true, else use individual setting of section
return (varsettrue($this->list_pref[$this->rc->mode."_openifrecords"]) && is_array($this->rc->data['records']) ? "" : $this->rc->data['display']);
return (vartrue($this->list_pref[$this->rc->mode."_openifrecords"]) && is_array($this->rc->data['records']) ? "" : $this->rc->data['display']);
}
function sc_list_col_cols()

View File

@ -76,7 +76,7 @@ class list_comment
$record['heading'] = $this->parent->e107->tp->toHTML($rowheading, true);
}
$category = '';
if(varsettrue($this->parent->settings['category']))
if(vartrue($this->parent->settings['category']))
{
if($row['comment_category_url'])
{
@ -87,8 +87,8 @@ class list_comment
$record['category'] = $row['comment_category_heading'];
}
}
$record['author'] = (varsettrue($this->parent->settings['author']) ? $row['comment_author'] : '');
$record['date'] = (varsettrue($this->parent->settings['date']) ? $this->parent->getListDate($row['comment_datestamp']) : "");
$record['author'] = (vartrue($this->parent->settings['author']) ? $row['comment_author'] : '');
$record['date'] = (vartrue($this->parent->settings['date']) ? $this->parent->getListDate($row['comment_datestamp']) : "");
$record['icon'] = $bullet;
$record['info'] = '';

View File

@ -54,7 +54,7 @@ class list_members
$record['heading'] = (USER ? "<a href='".e_BASE."user.php?id.".$row['user_id']."'>".$rowheading."</a>" : $rowheading);
$record['category'] = '';
$record['author'] = '';
$record['date'] = (varsettrue($this->parent->settings['date']) ? $this->parent->getListDate($row['user_join']) : "");
$record['date'] = (vartrue($this->parent->settings['date']) ? $this->parent->getListDate($row['user_join']) : "");
$record['info'] = '';
$list_data[] = $record;
}

View File

@ -45,7 +45,7 @@ class list_news
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
$list_caption = $this->parent->settings['caption'];
$list_display = (varsettrue($this->parent->settings['open']) ? '' : 'none');
$list_display = (vartrue($this->parent->settings['open']) ? '' : 'none');
$qry = "
SELECT n.*, c.category_id AS news_category_id, c.category_name AS news_category_name, u.user_id AS news_author_id, u.user_name AS news_author_name
@ -72,7 +72,7 @@ class list_news
$record['heading'] = "<a href='".e_BASE."news.php?item.".$row['news_id']."'>".$rowheading."</a>";
$record['author'] = '';
if(varsettrue($this->parent->settings['author']))
if(vartrue($this->parent->settings['author']))
{
if($row['news_author'] == 0)
{
@ -80,7 +80,7 @@ class list_news
}
else
{
if(varsettrue($row['news_author_name']))
if(vartrue($row['news_author_name']))
{
$record['author'] = "<a href='".e_BASE."user.php?id.".$row['news_author_id']."'>".$row['news_author_name']."</a>";
}
@ -88,13 +88,13 @@ class list_news
}
$record['category'] = '';
if(varsettrue($this->parent->settings['category']))
if(vartrue($this->parent->settings['category']))
{
$record['category'] = "<a href='".e_BASE."news.php?cat.".$row['news_category_id']."'>".$row['news_category_name']."</a>";
}
$record['date'] = '';
if(varsettrue($this->parent->settings['date']))
if(vartrue($this->parent->settings['date']))
{
$record['date'] = $this->parent->getListDate($row['news_datestamp']);
}

View File

@ -102,7 +102,7 @@ if (USER == TRUE || ADMIN == TRUE)
// ------------ News Stats -----------
if (varsettrue($loginPrefs['new_news']))
if (vartrue($loginPrefs['new_news']))
{
$nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'";
$menu_data['new_news'] = $sql->count("news", "(*)", "WHERE `news_datestamp` > {$time} AND news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.")");
@ -111,7 +111,7 @@ if (USER == TRUE || ADMIN == TRUE)
// ------------ Comments Stats -----------
if (varsettrue($loginPrefs['new_comments']))
if (vartrue($loginPrefs['new_comments']))
{
$menu_data['new_comments'] = $sql->count('comments', '(*)', 'WHERE `comment_datestamp` > '.$time);
$new_total += $menu_data['new_comments'];
@ -119,7 +119,7 @@ if (USER == TRUE || ADMIN == TRUE)
// ------------ Member Stats -----------
if (varsettrue($loginPrefs['new_members']))
if (vartrue($loginPrefs['new_members']))
{
$menu_data['new_users'] = $sql->count('user', '(user_join)', 'WHERE user_join > '.$time);
$new_total += $menu_data['new_users'];
@ -127,7 +127,7 @@ if (USER == TRUE || ADMIN == TRUE)
// ------------ Enable stats / other ---------------
$menu_data['enable_stats'] = $menu_data || varsettrue($loginPrefs['external_stats']) ? true : false;
$menu_data['enable_stats'] = $menu_data || vartrue($loginPrefs['external_stats']) ? true : false;
$menu_data['new_total'] = $new_total + $loginClass->get_stats_total();
$menu_data['link_bullet'] = $bullet;
$menu_data['link_bullet_src'] = $bullet_src;
@ -176,7 +176,7 @@ else
}
$text = '<form method="post" action="'.e_SELF.(e_QUERY ? '?'.e_QUERY : '');
if (varsettrue($pref['password_CHAP'],0))
if (vartrue($pref['password_CHAP'],0))
{
$text .= '" onsubmit="hashLoginPassword(this)';
}

View File

@ -122,8 +122,8 @@ class login_menu_class
//$lbox_admin = varsettrue($eplug_admin, false);
$coreplugs = $this->get_coreplugs();
$lprefs = varsettrue($this->loginPrefs['external_links']) ? explode(',', $this->loginPrefs['external_links']) : array();
$sprefs = varsettrue($this->loginPrefs['external_stats']) ? explode(',', $this->loginPrefs['external_stats']) : array();
$lprefs = vartrue($this->loginPrefs['external_links']) ? explode(',', $this->loginPrefs['external_links']) : array();
$sprefs = vartrue($this->loginPrefs['external_stats']) ? explode(',', $this->loginPrefs['external_stats']) : array();
if($active)
{
@ -226,15 +226,15 @@ class login_menu_class
$ret = '';
$lbox_infos = $this->parse_external_list(false);
if(!varsettrue($lbox_infos['links'])) return '';
if(!vartrue($lbox_infos['links'])) return '';
$enabled = varsettrue($this->loginPrefs['external_links']) ? explode(',', $this->loginPrefs['external_links']) : array();
$enabled = vartrue($this->loginPrefs['external_links']) ? explode(',', $this->loginPrefs['external_links']) : array();
$num = 1;
foreach ($lbox_infos['links'] as $id => $stack) {
$links = array();
foreach ($stack as $value) {
$links[] = '<a href="'.$value['link_url'].'">'.varsettrue($value['link_label'], '['.LOGIN_MENU_L44.']').'</a>';
$links[] = '<a href="'.$value['link_url'].'">'.vartrue($value['link_label'], '['.LOGIN_MENU_L44.']').'</a>';
}
$plug_data = $this->get_plugin_data($id);
@ -276,11 +276,11 @@ class login_menu_class
{
$ret = '';
$lbox_infos = $this->parse_external_list(false);
$lbox_infos = varsettrue($lbox_infos['stats'], array());
$lbox_infos = vartrue($lbox_infos['stats'], array());
if(!$lbox_infos) return '';
$enabled = varsettrue($this->loginPrefs['external_stats']) ? explode(',', $this->loginPrefs['external_stats']) : array();
$enabled = vartrue($this->loginPrefs['external_stats']) ? explode(',', $this->loginPrefs['external_stats']) : array();
$num = 1;
foreach ($lbox_infos as $id => $stack)
@ -314,7 +314,7 @@ class login_menu_class
function get_stats_total()
{
$lbox_infos = $this->parse_external_list(true, false);
if(!varsettrue($lbox_infos['stats']))
if(!vartrue($lbox_infos['stats']))
{
return 0;
}
@ -380,7 +380,7 @@ class login_menu_class
foreach($link_items as $key => $value)
{
if(!varsettrue($value['link_url']))
if(!vartrue($value['link_url']))
{
unset($link_items[$key]);
}

View File

@ -267,10 +267,10 @@ class login_menu_shortcodes extends e_shortcode
function sc_lm_external_links($parm='')
{
global $tp, $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK;
if(!varsettrue($menu_pref['login_menu']['external_links'])) return '';
if(!vartrue($menu_pref['login_menu']['external_links'])) return '';
$lbox_infos = login_menu_class::parse_external_list(true, false);
$lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array();
if(!varsettrue($lbox_infos['links'])) return '';
if(!vartrue($lbox_infos['links'])) return '';
$ret = '';
foreach ($lbox_active as $stackid) {
$lbox_items = login_menu_class::clean_links(varset($lbox_infos['links'][$stackid]));
@ -287,13 +287,13 @@ class login_menu_shortcodes extends e_shortcode
function sc_lm_external_link($parm='')
{
$lbox_item = getcachedvars('login_menu_linkdata');
return $parm == 'href' ? $lbox_item['link_url'] : '<a href="'.$lbox_item['link_url'].'" class="login_menu_link external" id="login_menu_link_external_'.$lbox_item['link_id'].'">'.varsettrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']').'</a>';
return $parm == 'href' ? $lbox_item['link_url'] : '<a href="'.$lbox_item['link_url'].'" class="login_menu_link external" id="login_menu_link_external_'.$lbox_item['link_id'].'">'.vartrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']').'</a>';
}
function sc_lm_external_link_label($parm='')
{
$lbox_item = getcachedvars('login_menu_linkdata');
return varsettrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']');
return vartrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']');
}
function sc_lm_stats($parm='')
@ -361,9 +361,9 @@ class login_menu_shortcodes extends e_shortcode
function sc_lm_plugin_stats($parm='')
{
global $tp, $menu_pref, $new_total, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR;
if(!varsettrue($menu_pref['login_menu']['external_stats'])) return '';
if(!vartrue($menu_pref['login_menu']['external_stats'])) return '';
$lbox_infos = login_menu_class::parse_external_list(true, false);
if(!varsettrue($lbox_infos['stats'])) return '';
if(!vartrue($lbox_infos['stats'])) return '';
$lbox_active_sorted = $menu_pref['login_menu']['external_stats'] ? explode(',', $menu_pref['login_menu']['external_stats']) : array();
$ret = array();
$sep = varset($LM_STATITEM_SEPARATOR, '<br />');
@ -400,7 +400,7 @@ class login_menu_shortcodes extends e_shortcode
function sc_lm_message($parm='')
{
global $tp, $LOGIN_MENU_MESSAGE;
if(!defsettrue('LOGINMESSAGE')) return '';
if(!deftrue('LOGINMESSAGE')) return '';
if($parm == "popup"){
$srch = array("<br />","'");
$rep = array("\\n","\'");
@ -415,7 +415,7 @@ class login_menu_shortcodes extends e_shortcode
function sc_lm_message_text($parm='')
{
return defsettrue('LOGINMESSAGE', '');
return deftrue('LOGINMESSAGE', '');
}

View File

@ -32,6 +32,7 @@ if(isset($_POST['updatesettings']))
$pref['nfp_posts'] = intval(vartrue($_POST['nfp_posts']));
$pref['nfp_layer_height'] = intval(($_POST['nfp_layer_height'] ? $_POST['nfp_layer_height'] : 200));
save_prefs();
}
$ns->tablerender($caption, $mes->render() . $text);

View File

@ -79,7 +79,7 @@ class newsfeedClass
if (!$force && $temp = $e107->ecache->retrieve(NEWSFEED_LIST_CACHE_TAG))
{
$this->feedList = $eArrayStorage->ReadArray($temp);
$this->feedList = e107::unserialize($temp);
return;
}
}
@ -91,9 +91,9 @@ class newsfeedClass
$fieldList = 'newsfeed_id, newsfeed_name, newsfeed_url, newsfeed_timestamp, newsfeed_description, newsfeed_image, newsfeed_active, newsfeed_updateint';
}
if ($sql -> db_Select("newsfeed", $fieldList, '`newsfeed_active` > 0')) // Read in all the newsfeed info on the first go
if ($sql->select("newsfeed", $fieldList, '`newsfeed_active` > 0')) // Read in all the newsfeed info on the first go
{
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
while ($row = $sql->fetch(MYSQL_ASSOC))
{
$nfID = $row['newsfeed_id'];
@ -112,7 +112,7 @@ class newsfeedClass
if ($this->useCache)
{ // Cache enabled - we need to save some updated info
$temp = $eArrayStorage->WriteArray($this->feedList, FALSE);
$temp = e107::serialize($this->feedList, FALSE);
$e107->ecache->set(NEWSFEED_LIST_CACHE_TAG,$temp);
}
}
@ -242,7 +242,7 @@ class newsfeedClass
}
}
return $eArrayStorage->ReadArray($this->newsList[$feedID]['newsfeed_data']);
return e107::unserialize($this->newsList[$feedID]['newsfeed_data']);
}

View File

@ -30,7 +30,7 @@ else
$menu_pref = e107::getConfig('menu')->getPref('');
$tp = e107::getParser();
$num = intval(varsettrue($menu_pref['online_ls_amount'],10));
$num = intval(vartrue($menu_pref['online_ls_amount'],10));
$sql -> db_Select('user', 'user_id, user_name, user_currentvisit', 'ORDER BY user_currentvisit DESC LIMIT 0,'.$num, 'nowhere');
$lslist = $sql -> db_getList();
@ -43,7 +43,7 @@ foreach($lslist as $row)
}
$text .= $tp -> parseTemplate($LASTSEEN_TEMPLATE['end'], TRUE);
$caption = varsettrue($menu_pref['online_ls_caption'],LAN_LASTSEEN_1);
$caption = vartrue($menu_pref['online_ls_caption'],LAN_LASTSEEN_1);
$ns->tablerender($caption, $text, 'lastseen');
?>

View File

@ -116,7 +116,7 @@ else
$img = (is_readable(THEME.'images/online_menu.png') ? "<img src='".THEME_ABS."images/online_menu.png' alt='' />" : '');
$caption = $img.' '.varsettrue($menu_pref['online_caption'],LAN_ONLINE_10);
$caption = $img.' '.vartrue($menu_pref['online_caption'],LAN_ONLINE_10);
if (getperms('1'))
{

View File

@ -131,13 +131,14 @@ class pm_cron // include plugin-folder in the name.
// Start of the 'real' code
if ($this->ourDB->db_Select('generic', '*', "`gen_type` = 'pm_bulk' LIMIT 1"))
if ($this->ourDB->select('generic', '*', "`gen_type` = 'pm_bulk' LIMIT 1"))
{
$pmRow = $this->ourDB->db_Fetch(MYSQL_ASSOC);
$pmRow = $this->ourDB->fetch(MYSQL_ASSOC);
$this->logLine("\r\n\r\n".str_replace('--NUM--',$pmRow['gen_intdata'],LAN_EC_PM_06).date('D j M Y G:i:s'));
$this->ourDB->db_Delete('generic', "`gen_type` = 'pm_bulk' AND `gen_id` = ".$pmRow['gen_id']);
$array = new ArrayData;
$pmData = $array->ReadArray($pmRow['gen_chardata']);
$this->ourDB->delete('generic', "`gen_type` = 'pm_bulk' AND `gen_id` = ".$pmRow['gen_id']);
$pmData = e107::unserialize($pmRow['gen_chardata']);
unset($pmRow);
$this->pmClass = new private_message;
$this->pmClass->add($pmData);

View File

@ -24,12 +24,12 @@ require_once(HEADERF);
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$tag = new tagwords();
//echo e107::getUrl()->create('tagwords/search/area', 'area=news&q=something');
if(varsettrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
if(vartrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
{
header("location:".SITEURL); exit;
}
if(varsettrue($_GET['q']))
if(vartrue($_GET['q']))
{
$tag->TagSearchResults();
}

View File

@ -360,12 +360,12 @@ class tagwords
if($tagarea!='menu')
{
//if user is able to manually set a area
if(varsettrue($this->pref['tagwords_view_area'])=='1')
if(vartrue($this->pref['tagwords_view_area'])=='1')
{
foreach($this->tagwords as $area)
{
//limit data to only one area, if so, which area
if(varsettrue($_GET['area'])==$area)
if(vartrue($_GET['area'])==$area)
{
$ins = "e_tagwords_{$area}";
$typeqry = " AND tag_type='".$this->$ins->settings['table']."'";
@ -434,7 +434,7 @@ class tagwords
//MENU
if($tagarea=='menu')
{
if(varsettrue($this->pref['tagwords_menu_default_sort'])==1)
if(vartrue($this->pref['tagwords_menu_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
@ -449,7 +449,7 @@ class tagwords
//PAGE
//user can set own sort
if(varsettrue($this->pref['tagwords_view_sort'])==1)
if(vartrue($this->pref['tagwords_view_sort'])==1)
{
$s = varset($_GET['sort'],'');
switch($s)
@ -463,7 +463,7 @@ class tagwords
arsort($array);
break;
default:
if(varsettrue($this->pref['tagwords_default_sort'])==1)
if(vartrue($this->pref['tagwords_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
@ -480,7 +480,7 @@ class tagwords
}
else
{
if(varsettrue($this->pref['tagwords_default_sort'])==1)
if(vartrue($this->pref['tagwords_default_sort'])==1)
{
//alphabetically
ksort($array, SORT_STRING);
@ -530,7 +530,7 @@ class tagwords
//decide whether to show the taglist or the tagcloud
//user can set own tag style
if(varsettrue($this->pref['tagwords_view_style'])=='1')
if(vartrue($this->pref['tagwords_view_style'])=='1')
{
$t = varset($_GET['type'],'');
switch($t)
@ -542,14 +542,14 @@ class tagwords
$type='list';
break;
default:
$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
$type = (vartrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
break;
}
}
else
{
//user cannot set tag style, so use default tag style value
$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
$type = (vartrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');
}
//show the taglist or tagcloud
@ -807,7 +807,7 @@ class tagwords
$sql->gen("SELECT * FROM #core WHERE e107_name='".$this->table."' ");
}
$row = $sql->fetch();
$p = $this->e107->arrayStorage->ReadArray($row['e107_value']);
$p = e107::unserialize($row['e107_value']);
//validation
if(!array_key_exists('tagwords_activeareas', $p))

View File

@ -18,7 +18,7 @@ $e107 = e107::getInstance();
require_once(e_PLUGIN."tagwords/tagwords_class.php");
$tag = new tagwords();
if(varsettrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
if(vartrue($tag->pref['tagwords_class']) && !check_class($tag->pref['tagwords_class']) )
{
return;
}

View File

@ -49,7 +49,7 @@ class tagwords_shortcodes extends e_shortcode
switch($sc_mode)
{
case 'menu':
if(varsettrue($tag->pref['tagwords_menu_view_search'])!=1)
if(vartrue($tag->pref['tagwords_menu_view_search'])!=1)
{
return;
}
@ -65,7 +65,7 @@ class tagwords_shortcodes extends e_shortcode
break;
case 'search':
if(varsettrue($tag->pref['tagwords_view_search'])!=1)
if(vartrue($tag->pref['tagwords_view_search'])!=1)
{
return;
}
@ -80,7 +80,7 @@ class tagwords_shortcodes extends e_shortcode
break;
default:
if(varsettrue($tag->pref['tagwords_view_search'])!=1)
if(vartrue($tag->pref['tagwords_view_search'])!=1)
{
return;
}
@ -94,7 +94,7 @@ class tagwords_shortcodes extends e_shortcode
function sc_tag_area_heading()
{
global $tag;
return (varsettrue($tag->area->settings['caption']) ? defset($tag->area->settings['caption'], $tag->area->settings['caption']) : '');
return (vartrue($tag->area->settings['caption']) ? defset($tag->area->settings['caption'], $tag->area->settings['caption']) : '');
}
function sc_tag_link($parm, $sc_mode)
@ -158,13 +158,13 @@ class tagwords_shortcodes extends e_shortcode
return $tag->number;
break;
case 'menu':
if(varsettrue($tag->pref['tagwords_menu_view_freq'])==1)
if(vartrue($tag->pref['tagwords_menu_view_freq'])==1)
{
return $tag->number;
}
break;
default:
if(varsettrue($tag->pref['tagwords_view_freq'])==1)
if(vartrue($tag->pref['tagwords_view_freq'])==1)
{
return $tag->number;
}
@ -176,7 +176,7 @@ class tagwords_shortcodes extends e_shortcode
{
global $tag;
if(varsettrue($tag->pref['tagwords_view_sort'])==1)
if(vartrue($tag->pref['tagwords_view_sort'])==1)
{
$s = varset($_GET['sort'],'');
switch($s)
@ -207,7 +207,7 @@ class tagwords_shortcodes extends e_shortcode
{
global $tag;
if(varsettrue($tag->pref['tagwords_view_style'])==1)
if(vartrue($tag->pref['tagwords_view_style'])==1)
{
$t = varset($_GET['type'],'');
switch($t)
@ -237,7 +237,7 @@ class tagwords_shortcodes extends e_shortcode
function sc_tag_area()
{
global $tag;
if(varsettrue($tag->pref['tagwords_view_area'])==1)
if(vartrue($tag->pref['tagwords_view_area'])==1)
{
$text = "
<select id='area' name='area' class='tbox'>
@ -247,7 +247,7 @@ class tagwords_shortcodes extends e_shortcode
if(array_key_exists($area,$tag->pref['tagwords_activeareas']))
{
$name = "e_tagwords_{$area}";
$selected = (varsettrue($_GET['area'])==$area ? "selected=selected" : '');
$selected = (vartrue($_GET['area'])==$area ? "selected=selected" : '');
$text .= "<option value='".$area."' ".$selected." >".defset($tag->$name->settings['caption'], $tag->$name->settings['caption'])."</option>";
}
}
@ -261,7 +261,7 @@ class tagwords_shortcodes extends e_shortcode
function sc_tag_button()
{
global $tag;
if(varsettrue($tag->pref['tagwords_view_sort']) || varsettrue($tag->pref['tagwords_view_style']) || varsettrue($tag->pref['tagwords_view_area']))
if(vartrue($tag->pref['tagwords_view_sort']) || vartrue($tag->pref['tagwords_view_style']) || vartrue($tag->pref['tagwords_view_area']))
return "<input class='btn btn-default button' type='submit' name='so' value='".LAN_TAG_SEARCH_3."' />";
return '';
}
@ -269,7 +269,7 @@ class tagwords_shortcodes extends e_shortcode
function sc_tag_options()
{
global $tag;
if( varsettrue($tag->pref['tagwords_view_search'])==1 || varsettrue($tag->pref['tagwords_view_sort'])==1 || varsettrue($tag->pref['tagwords_view_style'])==1 || varsettrue($tag->pref['tagwords_view_area'])==1 )
if( vartrue($tag->pref['tagwords_view_search'])==1 || vartrue($tag->pref['tagwords_view_sort'])==1 || vartrue($tag->pref['tagwords_view_style'])==1 || vartrue($tag->pref['tagwords_view_area'])==1 )
{
return e107::getParser()->parseTemplate($tag->template['options'], true, $tag->shortcodes);
}

View File

@ -632,9 +632,9 @@ class e_install
$page_content .= "<br /><i class='icon-ok'></i> Deleted existing database";
}
else
{
{
$success = false;
$page_content .= "<br /><br />".LANINS_043.nl2br("\n\n<b>".LANINS_083."\n</b><i>".mysql_error()."</i>");
$page_content .= "<br /><br />".LANINS_043.nl2br("\n\n<b>".LANINS_083."\n</b><i>".mysql_error()."</i>");
}
}
@ -1448,9 +1448,9 @@ class e_install
*/
public function install_plugin($plugpath) //FIXME - requires default plugin table entries, see above.
{
e107::getDb()->db_Select_gen("SELECT * FROM #plugin WHERE plugin_path = '".$plugpath."' LIMIT 1");
$row = e107::getDb()->db_Fetch(MYSQL_ASSOC);
e107::getSingleton('e107plugin')->install_plugin($row['plugin_id']);
e107::getDb()->gen("SELECT * FROM #plugin WHERE plugin_path = '".$plugpath."' LIMIT 1");
$row = e107::getDb()->fetch(MYSQL_ASSOC);
e107::getPlugin()->install_plugin($row['plugin_id']);
e107::getMessage()->reset(false, false, true);

View File

@ -271,7 +271,7 @@ Think these are no longer used
$online_location_page = ADMINAREA;
}
$ONLINE_TABLE_ICON = (varsettrue($pref['plug_installed']['pm']) && $oid != USERID ? $tp->parseTemplate("{SENDPM={$oid}}", 'sendpm.sc') : "<img src='".e_PLUGIN."online_extended_menu/images/user.png' alt='' style='vertical-align:middle' />");
$ONLINE_TABLE_ICON = (vartrue($pref['plug_installed']['pm']) && $oid != USERID ? $tp->parseTemplate("{SENDPM={$oid}}", 'sendpm.sc') : "<img src='".e_PLUGIN."online_extended_menu/images/user.png' alt='' style='vertical-align:middle' />");
$ONLINE_TABLE_USERNAME = "<a href='".e_BASE."user.php?id.$oid'>{$oname}</a>";
$ONLINE_TABLE_LOCATION = ($class_check ? "<a href='{$online_location}'>{$online_location_page}</a>" : $online_location_page);

View File

@ -205,8 +205,8 @@ class search extends e_shortcode
return "<input type='radio' name='adv' value='0' ".(varsettrue($_GET['adv']) ? "" : "checked='checked'")." /> ".LAN_SEARCH_29."&nbsp;
<input type='radio' name='adv' value='1' ".(varsettrue($_GET['adv']) ? "checked='checked'" : "" )." /> ".LAN_SEARCH_30;
return "<input type='radio' name='adv' value='0' ".(vartrue($_GET['adv']) ? "" : "checked='checked'")." /> ".LAN_SEARCH_29."&nbsp;
<input type='radio' name='adv' value='1' ".(vartrue($_GET['adv']) ? "checked='checked'" : "" )." /> ".LAN_SEARCH_30;
}
function sc_search_dropdown($parm = '')
@ -1123,7 +1123,7 @@ $enhanced_types['be'] = LAN_SEARCH_27.':';
$SEARCH_VARS->ENHANCED_DISPLAY = $enhanced ? "" : "style='display: none'";
// advanced search config
if (!varsettrue($_GET['adv']) || $_GET['t'] == 'all')
if (!vartrue($_GET['adv']) || $_GET['t'] == 'all')
{
foreach ($_GET as $gk => $gv)
{

View File

@ -55,7 +55,7 @@ if (isset($_POST['submitnews_submit']) && $_POST['submitnews_title'] && $_POST['
}
// ==== Process File Upload ====
if (FILE_UPLOADS && $_FILES['file_userfile'] && varsettrue($pref['subnews_attach']) && varsettrue($pref['upload_enabled']) && check_class($pref['upload_class']))
if (FILE_UPLOADS && $_FILES['file_userfile'] && vartrue($pref['subnews_attach']) && vartrue($pref['upload_enabled']) && check_class($pref['upload_class']))
{
require_once(e_HANDLER.'upload_handler.php');
$uploaded = process_uploaded_files(e_UPLOAD, FALSE, array('file_mask' => 'jpg,gif,png', 'max_file_count' => 1));

View File

@ -306,7 +306,7 @@ if (isset($_POST['updatesettings']) || isset($_POST['SaveValidatedInfo']))
if (isset($_POST['updatesettings']))
{
if (!varsettrue($pref['auth_method']))
if (!vartrue($pref['auth_method']))
{
$pref['auth_method'] = 'e107';
}
@ -788,7 +788,7 @@ if ($error)
{
$temp[] = validatorClass::makeErrorList($allData,'USER_ERR_','%n - %x - %t: %v', '<br />', $userMethods->userVettingInfo);
}
if (varsettrue($eufVals['errors']))
if (vartrue($eufVals['errors']))
{
$temp[] = '<br />'.validatorClass::makeErrorList($eufVals,'USER_ERR_','%n - %x - %t: %v', '<br />', NULL);
}