mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
PHP 7.1 Fixes.
This commit is contained in:
parent
982fa869e3
commit
e05425fbb2
@ -512,10 +512,10 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
}
|
||||
|
||||
function sc_extended($parm='')
|
||||
function sc_extended($parm=null)
|
||||
{
|
||||
|
||||
$class = vartrue($parm['class']) ? "class='".$parm['class']."'" : '';
|
||||
$class = !empty($parm['class']) ? "class='".$parm['class']."'" : '';
|
||||
|
||||
if ($this->news_item['news_extended'] && ($this->param['current_action'] != 'extend' || $parm == 'force'))
|
||||
{
|
||||
@ -931,6 +931,10 @@ class news_shortcodes extends e_shortcode
|
||||
/* @deprecated - use {NEWS_CATEGORY_ICON} instead */
|
||||
function sc_newscaticon($parm = array())
|
||||
{
|
||||
if(is_string($parm))
|
||||
{
|
||||
$parm = array('type'=>$parm);
|
||||
}
|
||||
// BC
|
||||
$category_icon = str_replace('../', '', trim($this->news_item['category_icon']));
|
||||
if (!$category_icon) { return ''; }
|
||||
@ -955,7 +959,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
$icon = e107::getParser()->toIcon($category_icon, $parm);
|
||||
|
||||
switch($parm)
|
||||
switch($parm['type'])
|
||||
{
|
||||
/* @deprecated - Will cause issues with glyphs */
|
||||
case 'src':
|
||||
|
@ -140,7 +140,7 @@ class e_menu
|
||||
*/
|
||||
public function pref()
|
||||
{
|
||||
return $this->_current_parms;
|
||||
return (empty($this->_current_parms)) ? array() : $this->_current_parms;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1007,7 +1007,12 @@ class e_parse_shortcode
|
||||
$parm = trim($parm);
|
||||
$parm = str_replace(array('[[', ']]'), array('{', '}'), $parm);
|
||||
}
|
||||
|
||||
|
||||
if(empty($parm))
|
||||
{
|
||||
$parm = array();
|
||||
}
|
||||
|
||||
|
||||
if (E107_DBG_BBSC || E107_DBG_SC || E107_DBG_TIMEDETAILS)
|
||||
{
|
||||
|
@ -187,9 +187,8 @@ class social_shortcodes extends e_shortcode
|
||||
* $socialArray = array('url'=>'your-url-here', 'title'=>'your-title-here');
|
||||
e107::getScBatch('social')->setVars($socialArray);
|
||||
*/
|
||||
function sc_socialshare($parm='') // Designed so that no additional JS required.
|
||||
function sc_socialshare($parm=array()) // Designed so that no additional JS required.
|
||||
{
|
||||
|
||||
$pref = e107::pref('social');
|
||||
|
||||
if(varset($pref['sharing_mode']) == 'off')
|
||||
|
Loading…
x
Reference in New Issue
Block a user