mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Code cleanup
This commit is contained in:
@@ -91,9 +91,6 @@ foreach($filtered as $key => $value)
|
||||
|
||||
// $ns->tablerender($caption, $mes->render() . $text);
|
||||
|
||||
|
||||
$check = TRUE;
|
||||
//$check = $emote -> installCheck();
|
||||
$check = $emote->installCheck($one_pack);
|
||||
if($check!==FALSE)
|
||||
{
|
||||
|
@@ -863,7 +863,7 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
|
||||
|
||||
$label = vartrue($section['label'], $index == 0 ? LAN_EURL_DEFAULT : eHelper::labelize(ltrim(strstr($location, '/'), '/')));
|
||||
$cssClass = $checked ? 'e-showme' : 'e-hideme';
|
||||
// $cssClass = $checked ? 'e-showme' : 'e-hideme';
|
||||
$cssClass = 'e-hideme'; // always hidden for now, some interface changes could come after pre-alpha
|
||||
|
||||
$exampleUrl = array();
|
||||
|
@@ -578,13 +578,13 @@ class media_form_ui extends e_admin_form_ui
|
||||
|
||||
$pref = e107::getPref();
|
||||
|
||||
$options = array(
|
||||
// $options = array(
|
||||
// "news-image" => LAN_IMA_O_001,
|
||||
// "news-bbcode" => LAN_IMA_O_002,
|
||||
// "page-bbcode" => LAN_IMA_O_003,
|
||||
// "featurebox-image" => LAN_IMA_O_004,
|
||||
// "featurebox-bbcode" => LAN_IMA_O_005,
|
||||
);
|
||||
// );
|
||||
|
||||
$options = $pref['resize_dimensions'];
|
||||
|
||||
@@ -3265,10 +3265,10 @@ class media_admin_ui extends e_admin_ui
|
||||
if(is_readable($xmlFile))
|
||||
{
|
||||
$data = file_get_contents($xmlFile);
|
||||
$tmp = preg_match("/<author name=(?:'|\")([^'\"]*)/i",$data,$authorName);
|
||||
$tmp = preg_match("/email=(?:'|\")([^'\"]*)/i",$data,$authorEmail);
|
||||
$tmp = preg_match("/<title>(.*)<\/title>/i",$data,$title);
|
||||
$tmp = preg_match("/<description>(.*)<\/description>/i",$data,$diz);
|
||||
preg_match("/<author name=(?:'|\")([^'\"]*)/i",$data,$authorName);
|
||||
preg_match("/email=(?:'|\")([^'\"]*)/i",$data,$authorEmail);
|
||||
preg_match("/<title>(.*)<\/title>/i",$data,$title);
|
||||
preg_match("/<description>(.*)<\/description>/i",$data,$diz);
|
||||
|
||||
return array(
|
||||
'title' => $title[1],
|
||||
|
@@ -359,8 +359,7 @@ class signup_shortcodes extends e_shortcode
|
||||
|
||||
$options = array('size'=>30);
|
||||
$options['required'] = ($pref==2) ? 1 : 0;
|
||||
$options['class'] = 'tbox input-text e-email';
|
||||
$options['class'] = vartrue($parm['class'],'tbox input-text e-email');
|
||||
$options['class'] = vartrue($parm['class'],'tbox input-text e-email');
|
||||
$options['placeholder'] = vartrue($parm['placeholder'],'');
|
||||
|
||||
$val = !empty($_POST['email_confirm']) ? filter_var($_POST['email_confirm'], FILTER_SANITIZE_EMAIL) : '';
|
||||
|
@@ -773,11 +773,11 @@ class user_shortcodes extends e_shortcode
|
||||
foreach($ueCatList as $catnum => $cat)
|
||||
{
|
||||
$key = $cat[0]['user_extended_struct_text'] ? $cat[0]['user_extended_struct_text'] : $cat[0]['user_extended_struct_name'];
|
||||
$cat_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$this->var['user_id']}}", TRUE); //XXX FIXME Fails
|
||||
// $cat_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$this->var['user_id']}}", TRUE); //XXX FIXME Fails
|
||||
|
||||
// $cat_name = true; //XXX TEMP Fix.
|
||||
|
||||
$cat_name = true; //XXX TEMP Fix.
|
||||
|
||||
if($cat_name != FALSE && isset($ueFieldList[$catnum]) && count($ueFieldList[$catnum]))
|
||||
if(/*$cat_name != FALSE && */isset($ueFieldList[$catnum]) && count($ueFieldList[$catnum]))
|
||||
{
|
||||
|
||||
$ret .= str_replace("{EXTENDED_NAME}", $key, $EXTENDED_CATEGORY_START);
|
||||
|
@@ -2375,7 +2375,7 @@ class eRouter
|
||||
if ('' === $pathInfo) return;
|
||||
|
||||
if ($equal != $ampersand) $pathInfo = str_replace($equal, $ampersand, $pathInfo);
|
||||
$segs = explode($ampersand, $pathInfo.$ampersand);
|
||||
// $segs = explode($ampersand, $pathInfo.$ampersand);
|
||||
|
||||
$segs = explode('/', $pathInfo);
|
||||
$ret = array();
|
||||
|
@@ -445,7 +445,7 @@ class e_array {
|
||||
$first2Chars = substr($ArrayData,0,2);
|
||||
if($first2Chars === 'a:' || $first2Chars === 's:') // php serialize.
|
||||
{
|
||||
$dat = unserialize($ArrayData);
|
||||
$dat = unserialize($ArrayData, ['allowed_classes' => false]);
|
||||
$ArrayData = $this->WriteArray($dat,FALSE);
|
||||
}
|
||||
elseif(strpos($ArrayData,'{') === 0 || strpos($ArrayData,'[') === 0) // json
|
||||
|
@@ -904,7 +904,7 @@ class db_verify
|
||||
// print_a($sql_data);
|
||||
// $regex = "/CREATE TABLE `?([\w]*)`?\s*?\(([\s\w\+\-_\(\),'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
|
||||
|
||||
$regex = "/CREATE TABLE (?:IF NOT EXISTS )?`?([\w]*)`?\s*?\(([\s\w\+\-_\(\),:'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
|
||||
// $regex = "/CREATE TABLE (?:IF NOT EXISTS )?`?([\w]*)`?\s*?\(([\s\w\+\-_\(\),:'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
|
||||
|
||||
// also support non-alphanumeric chars.
|
||||
$regex = "/CREATE TABLE (?:IF NOT EXISTS )?`?([\w]*)`?\s*?\(([^;]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
|
||||
|
@@ -3231,7 +3231,7 @@ class themeHandler
|
||||
/**
|
||||
* Set the Theme layouts, as found in theme.xml
|
||||
*/
|
||||
function setLayouts($name='')
|
||||
function setLayouts()
|
||||
{
|
||||
$name = $this->id;
|
||||
$layout = is_array($this->themeArray[$name]['layouts']) ? $this->themeArray[$name]['layouts'] : array();
|
||||
|
@@ -216,8 +216,8 @@ class gallery_shortcodes extends e_shortcode
|
||||
{
|
||||
// we passs both fields, the router will convert one of them to 'cat' variable, based on the current URL config
|
||||
$url = 'route::gallery/index/list?media_cat_category=' . $this->curCat . '--AMP--media_cat_sef=' . $this->var['media_cat_sef'] . '--AMP--frm=--FROM--::full=1';
|
||||
$parm = 'total=' . $this->total . '&amount=' . $this->amount . '¤t=' . $this->from . '&url=' . rawurlencode($url); // .'&url='.$url;
|
||||
$text = e107::getParser()->parseTemplate("{NEXTPREV=" . $parm . "}");
|
||||
$param = 'total=' . $this->total . '&amount=' . $this->amount . '¤t=' . $this->from . '&url=' . rawurlencode($url); // .'&url='.$url;
|
||||
$text = e107::getParser()->parseTemplate("{NEXTPREV=" . $param . "}");
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user