1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

PHP7 Warnings Fix - requires testing.

This commit is contained in:
Cameron
2016-04-21 12:04:09 -07:00
parent 6a91e5abfb
commit fd4c707fce
2 changed files with 8 additions and 8 deletions

View File

@@ -440,7 +440,7 @@ class e_pref extends e_front_model
* @param boolean $force * @param boolean $force
* @return e_pref * @return e_pref
*/ */
public function load($force = false) public function load($id=null, $force = false)
{ {
global $pref; global $pref;
if($force || !$this->hasData()) if($force || !$this->hasData())

View File

@@ -952,7 +952,7 @@ class e_user_model extends e_admin_model
if(false !== $ret && null !== $this->_extended_model) // don't load extended fields if not already used if(false !== $ret && null !== $this->_extended_model) // don't load extended fields if not already used
{ {
$ret_e = $this->_extended_model->save($force, $session); $ret_e = $this->_extended_model->save(true, $force, $session);
if(false !== $ret_e) if(false !== $ret_e)
{ {
return ($ret_e + $ret); return ($ret_e + $ret);
@@ -2290,7 +2290,7 @@ class e_user_extended_model extends e_admin_model
* @see e_model#load($id, $force) * @see e_model#load($id, $force)
* @return e_user_extended_model * @return e_user_extended_model
*/ */
public function load($force = false) public function load($id=null, $force = false)
{ {
if ($this->getId() && !$force) if ($this->getId() && !$force)
return $this; return $this;
@@ -2434,7 +2434,7 @@ class e_user_extended_model extends e_admin_model
* Build data types and rules on the fly and save * Build data types and rules on the fly and save
* @see e_front_model::save() * @see e_front_model::save()
*/ */
public function save($force = false, $session = false) public function save($from_post = true, $force = false, $session = false)
{ {
// when not loaded from db, see the construct check // when not loaded from db, see the construct check
if(!$this->getId()) if(!$this->getId())
@@ -2730,7 +2730,7 @@ class e_user_pref extends e_front_model
* @param boolean $force * @param boolean $force
* @return e_user_pref * @return e_user_pref
*/ */
public function load($force = false) public function load($id = null, $force = false)
{ {
if($force || !$this->hasData()) if($force || !$this->hasData())
{ {
@@ -2785,13 +2785,13 @@ class e_user_pref extends e_front_model
} }
/** /**
* Remove & apply user prefeferences, optionally - save to DB * Remove & apply user preferences, optionally - save to DB
* @return boolean success * @return boolean success
*/ */
public function delete($save = false) public function delete($ids, $destroy = true, $session_messages = false) // replaced $save = false for PHP7 fix.
{ {
$this->removeData()->apply(); $this->removeData()->apply();
if($save) return $this->save(); // if($save) return $this->save(); //FIXME adjust within the context of the variables in the method.
return true; return true;
} }
} }