1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

PHP Warning Fixes.

This commit is contained in:
Cameron
2016-06-09 16:43:36 -07:00
parent 5a820eaf52
commit 7fdb27510f
6 changed files with 20 additions and 10 deletions

View File

@@ -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();
}

View File

@@ -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']))
{

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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.
{

View File

@@ -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;
}