mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 18:30:53 +02:00
PHP Notice fixes.
This commit is contained in:
@@ -647,6 +647,7 @@ class news_admin_ui extends e_admin_ui
|
||||
'news_meta_description' ,
|
||||
'news_ping',
|
||||
|
||||
'news_email_notify',
|
||||
'news_allow_comments' ,
|
||||
'news_start' ,
|
||||
'news_end' ,
|
||||
@@ -655,6 +656,7 @@ class news_admin_ui extends e_admin_ui
|
||||
'news_sticky',
|
||||
|
||||
'news_comment_total' ,
|
||||
'submitted_id',
|
||||
'options' );
|
||||
|
||||
|
||||
@@ -672,10 +674,11 @@ class news_admin_ui extends e_admin_ui
|
||||
|
||||
$order = array_flip($newOrder);
|
||||
|
||||
if ($order[$a] == $order[$b])
|
||||
if($order[$a] == $order[$b])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($order[$a] < $order[$b]) ? -1 : 1;
|
||||
|
||||
}
|
||||
|
@@ -5519,7 +5519,7 @@ class e_admin_ui extends e_admin_controller_ui
|
||||
unset($_parms);
|
||||
}
|
||||
|
||||
if($att['data'] == 'array' && ($this->getAction() == 'inline')) // FIX for arrays being saved incorrectly with inline editing.
|
||||
if(!empty($att['data']) && $att['data'] == 'array' && ($this->getAction() == 'inline')) // FIX for arrays being saved incorrectly with inline editing.
|
||||
{
|
||||
$att['data'] = 'set';
|
||||
}
|
||||
|
@@ -1267,6 +1267,11 @@ class e_form
|
||||
if(is_string($options)) parse_str($options, $options);
|
||||
// auto-height support
|
||||
|
||||
if(empty($options['class']))
|
||||
{
|
||||
$options['class'] = '';
|
||||
}
|
||||
|
||||
if(vartrue($options['size']) && !is_numeric($options['size']))
|
||||
{
|
||||
$options['class'] .= " form-control input-".$options['size'];
|
||||
@@ -1300,6 +1305,7 @@ class e_form
|
||||
//size - large|medium|small
|
||||
//width should be explicit set by current admin theme
|
||||
// $size = 'input-large';
|
||||
$height = '';
|
||||
|
||||
switch($size)
|
||||
{
|
||||
@@ -1746,7 +1752,15 @@ class e_form
|
||||
|
||||
if(vartrue($options['size']) && !is_numeric($options['size']))
|
||||
{
|
||||
$options['class'] .= " input-".$options['size'];
|
||||
if(!empty($options['class']))
|
||||
{
|
||||
$options['class'] .= " input-".$options['size'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$options['class'] = "input-".$options['size'];
|
||||
}
|
||||
|
||||
unset($options['size']); // don't include in html 'size='.
|
||||
}
|
||||
$options = $this->format_options('select', $name, $options);
|
||||
@@ -4105,7 +4119,15 @@ class e_form
|
||||
{
|
||||
$sefSource = $this->name2id($parms['sef']);
|
||||
$sefTarget = $this->name2id($key);
|
||||
$parms['tdClassRight'] .= 'input-group';
|
||||
if(!empty($parms['tdClassRight']))
|
||||
{
|
||||
$parms['tdClassRight'] .= 'input-group';
|
||||
}
|
||||
else
|
||||
{
|
||||
$parms['tdClassRight'] = 'input-group';
|
||||
}
|
||||
|
||||
$parms['post'] = "<span class='form-inline input-group-btn pull-left'><a class='e-sef-generate btn btn-default' data-src='".$sefSource."' data-target='".$sefTarget."' data-confirm=\"".LAN_WILL_OVERWRITE_SEF." ".LAN_JSCONFIRM."\">".LAN_GENERATE."</a></span>";
|
||||
}
|
||||
|
||||
@@ -4785,7 +4807,16 @@ class e_form
|
||||
|
||||
if(!empty($writeParms['sef'])) // group sef generate button with input element.
|
||||
{
|
||||
$writeParms['tdClassRight'] .= 'input-group';
|
||||
if(empty($writeParms['tdClassRight']))
|
||||
{
|
||||
$writeParms['tdClassRight'] = 'input-group';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$writeParms['tdClassRight'] .= ' input-group';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if('hidden' === $att['type'])
|
||||
|
@@ -2044,7 +2044,7 @@ class e_front_model extends e_model
|
||||
{
|
||||
$d = $this->getDataFields();
|
||||
|
||||
if($d[$key] == 'array')
|
||||
if(!empty($d[$key]) && ($d[$key] == 'array'))
|
||||
{
|
||||
return e107::unserialize($this->getData((string) $key, $default, $index));
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$caption = "Newspost Help";
|
||||
if (e_QUERY) list($action,$junk) = explode('.',e_QUERY); else $action = 'list';
|
||||
$action = varset($_GET['action']);
|
||||
switch ($action)
|
||||
{
|
||||
case 'create' :
|
||||
|
Reference in New Issue
Block a user