1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

User Ranks cache handling fixup

This commit is contained in:
mcfly 2009-01-18 16:47:41 +00:00
parent 39a5445c5b
commit a5828e4dcd
2 changed files with 8 additions and 6 deletions

View File

@ -9,8 +9,8 @@
* Administration Area - Users
*
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
* $Revision: 1.29 $
* $Date: 2009-01-18 01:39:20 $
* $Revision: 1.30 $
* $Date: 2009-01-18 16:47:41 $
* $Author: mcfly_e107 $
*
*/
@ -1465,6 +1465,7 @@ function deleteRank($rankId)
$e107 = e107::getInstance();
$rankId = (int)$rankId;
$e107->ecache->clear_sys('nomd5_user_ranks');
if($e107->sql->db_Delete('generic', "gen_id='{$rankId}'"))
{
$emessage->add(USRLAN_218, E_MESSAGE_SUCCESS);
@ -1562,6 +1563,7 @@ function updateRanks()
$tmp['data']['gen_intdata'] = varset($_POST['new_calc_lower']);
$e107->sql->db_Insert('generic', $tmp);
}
$e107->ecache->clear_sys('nomd5_user_ranks');
$emessage->add(USRLAN_217, E_MESSAGE_SUCCESS);
}

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/level_handler.php,v $
| $Revision: 1.7 $
| $Date: 2009-01-18 01:39:20 $
| $Revision: 1.8 $
| $Date: 2009-01-18 16:47:41 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
@ -135,7 +135,7 @@ class e107UserRank
//Check to see if we can get it from cache
if($force == false && ($ranks = $e107->ecache->retrieve_sys('nomd5_user_ranks')))
{
$this->ranks = $ranks;
$this->ranks = $e107->arrayStorage->ReadArray($ranks);
}
else
{
@ -162,7 +162,7 @@ class e107UserRank
}
}
}
$e107->ecache->set_sys('nomd5_user_ranks', $this->ranks);
$e107->ecache->set_sys('nomd5_user_ranks', $e107->arrayStorage->WriteArray($this->ranks, false));
}
}