mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
PHP 7.1 Fixes.
This commit is contained in:
@@ -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'))
|
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 */
|
/* @deprecated - use {NEWS_CATEGORY_ICON} instead */
|
||||||
function sc_newscaticon($parm = array())
|
function sc_newscaticon($parm = array())
|
||||||
{
|
{
|
||||||
|
if(is_string($parm))
|
||||||
|
{
|
||||||
|
$parm = array('type'=>$parm);
|
||||||
|
}
|
||||||
// BC
|
// BC
|
||||||
$category_icon = str_replace('../', '', trim($this->news_item['category_icon']));
|
$category_icon = str_replace('../', '', trim($this->news_item['category_icon']));
|
||||||
if (!$category_icon) { return ''; }
|
if (!$category_icon) { return ''; }
|
||||||
@@ -955,7 +959,7 @@ class news_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
$icon = e107::getParser()->toIcon($category_icon, $parm);
|
$icon = e107::getParser()->toIcon($category_icon, $parm);
|
||||||
|
|
||||||
switch($parm)
|
switch($parm['type'])
|
||||||
{
|
{
|
||||||
/* @deprecated - Will cause issues with glyphs */
|
/* @deprecated - Will cause issues with glyphs */
|
||||||
case 'src':
|
case 'src':
|
||||||
|
@@ -140,7 +140,7 @@ class e_menu
|
|||||||
*/
|
*/
|
||||||
public function pref()
|
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 = trim($parm);
|
||||||
$parm = str_replace(array('[[', ']]'), array('{', '}'), $parm);
|
$parm = str_replace(array('[[', ']]'), array('{', '}'), $parm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($parm))
|
||||||
|
{
|
||||||
|
$parm = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (E107_DBG_BBSC || E107_DBG_SC || E107_DBG_TIMEDETAILS)
|
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');
|
* $socialArray = array('url'=>'your-url-here', 'title'=>'your-title-here');
|
||||||
e107::getScBatch('social')->setVars($socialArray);
|
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');
|
$pref = e107::pref('social');
|
||||||
|
|
||||||
if(varset($pref['sharing_mode']) == 'off')
|
if(varset($pref['sharing_mode']) == 'off')
|
||||||
|
Reference in New Issue
Block a user