diff --git a/class2.php b/class2.php index f00a72c73..61b2ae8a4 100755 --- a/class2.php +++ b/class2.php @@ -1559,7 +1559,11 @@ function check_class($var, $userclass = USERCLASS_LIST, $uid = 0) if(e107::isCli()) { - return true; + global $_E107; + if(empty($_E107['phpunit'])) + { + return true; + } } if(is_numeric($uid) && $uid > 0) diff --git a/e107_plugins/social/e_admin.php b/e107_plugins/social/e_admin.php index 5099373f7..560e3470f 100644 --- a/e107_plugins/social/e_admin.php +++ b/e107_plugins/social/e_admin.php @@ -27,7 +27,7 @@ class social_admin * @param $ui admin-ui object * @return array */ - public function config($ui) + public function config(e_admin_ui $ui) { $action = $ui->getAction(); // current mode: create, edit, list $type = $ui->getEventName(); // 'wmessage', 'news' etc. @@ -85,7 +85,7 @@ class social_admin $data['news_id'] = $id; $shareData = array( - 'title' => $data['news_title'], + 'title' => $tp->post_toHTML($data['news_title']), 'url' => e107::getUrl()->create('news/view/item', $data, 'full=1'), 'hashtags' => $data['news_meta_keywords'] ); @@ -96,8 +96,8 @@ class social_admin
'.$tp->toImage($data['news_thumbnail'][0], array('w'=>100, 'h'=>100, 'class'=>'media-object')).'
-

'.$data['news_title'].'

-

'.$data['news_meta_description']."

".$this->share($shareData).' +

'.$tp->post_toHTML($data['news_title']).'

+

'.$tp->post_toHTML($data['news_meta_description'])."

".$this->share($shareData).'
@@ -118,6 +118,7 @@ class social_admin { // $pref = e107::pref('social'); + /** @var social_shortcodes $soc */ $soc = e107::getScBatch('social'); $tp = e107::getParser();