diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index a2493218b..4e62941f6 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -148,7 +148,7 @@ class news_cat_ui extends e_admin_ui // $this->newspost->show_categories(); // } - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { if(empty($new_data['category_sef'])) { @@ -260,7 +260,7 @@ class news_sub_ui extends e_admin_ui // $this->newspost->show_categories(); // } - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { } @@ -477,7 +477,7 @@ class news_admin_ui extends e_admin_ui //'5' => LAN_NEWS_75 ); - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { if(!empty($new_data['news_thumbnail']) && !empty($_GET['sub'])) // From SubmitNews. { @@ -661,7 +661,7 @@ class news_admin_ui extends e_admin_ui - public function afterDelete() + public function afterDelete($deleted_data, $id, $deleted_check) { $this->clearCache(); } diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 104a2201e..9c2fbdde6 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -886,7 +886,15 @@ class news_shortcodes extends e_shortcode function sc_newstitlelink($parm = '') { - parse_str($parm, $parms); + if(is_string($parm)) + { + parse_str($parm, $parms); + } + else + { + $parms = $parm; + } + $url = e107::getUrl()->create('news/view/item', $this->news_item); if(isset($parms['href'])) { diff --git a/e107_core/url/news/sef_noid_url.php b/e107_core/url/news/sef_noid_url.php index 147bd062c..72bf4336f 100644 --- a/e107_core/url/news/sef_noid_url.php +++ b/e107_core/url/news/sef_noid_url.php @@ -165,8 +165,9 @@ class core_news_sef_noid_url extends eUrlConfig * - news/Category/Category-Name?page=10 -> list.xxx.10 * - news/Day|Month-xxx -> day|month-xxx */ - public function parse($pathInfo, $params, $request, $router, $config) + public function parse($pathInfo, $params = array(), eRequest $request = null, eRouter $router = null, $config = array()) { + $page = !empty($params['page']) ? intval($params['page']) : '0'; if(!$pathInfo) { diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index d195cff5b..5b56116dc 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3506,6 +3506,7 @@ class e_parser if(!isset($userData['user_image']) && USERID) { + $userData = array(); $userData['user_id'] = USERID; $userData['user_image'] = USERIMAGE; $userData['user_name'] = USERNAME; diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index b21bd4f32..b509b8141 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3885,7 +3885,7 @@ class e_form // copy url config if(!$model->getUrl()) $model->setUrl($this->getController()->getUrl()); // assemble the url - $link = $model->url(); + $link = $model->url(null); } elseif(vartrue($data[$parms['link']])) // support for a field-name as the link. eg. link_url. { diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 0dab10755..375709243 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -647,7 +647,7 @@ class e_model extends e_object * @param boolean $extended [optional] if true, method will return an array containing url, title and description of the url * @return mixed URL string or extended array data */ - public function url($options = array(), $extended = false) + public function url($ids, $options = array(), $extended = false) { $urldata = $this->getUrl(); if(empty($urldata) || !vartrue($urldata['route'])) return ($extended ? array() : null); @@ -2885,7 +2885,7 @@ class e_admin_model extends e_front_model return $this->dbInsert($session_messages); } - public function delete($destroy = true, $session_messages = false) + public function delete($ids, $destroy = true, $session_messages = false) { $ret = $this->dbDelete(); if($ret) @@ -3688,7 +3688,7 @@ class e_admin_tree_model extends e_front_tree_model $model = $this->getNode($id); if($this->getUrl()) $model->setUrl($this->getUrl()); // copy url config data if available - $ret[$id] = $model->url($options, $extended); + $ret[$id] = $model->url(null, $options, $extended); } return $ret; }