1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Code optimization and cleaning

This commit is contained in:
Cameron
2020-12-17 13:13:29 -08:00
parent 2cd0005b68
commit 0e90d4aa66
16 changed files with 34 additions and 33 deletions

View File

@@ -68,7 +68,7 @@ class pmbox_manager
$pm_info[$which] = $this->pmDB->fetch();
if ($which == 'inbox' && ($this->pmPrefs['animate'] == 1 || $this->pmPrefs['popup'] == 1))
{
if($new = $this->pmDB->db_Count('private_msg', '(*)', "WHERE pm_sent > '".USERLV."' AND pm_read = 0 AND pm_to = '".USERID."' AND pm_read_del != 1"))
if($new = $this->pmDB->count('private_msg', '(*)', "WHERE pm_sent > '".USERLV."' AND pm_read = 0 AND pm_to = '".USERID."' AND pm_read_del != 1"))
{
$pm_info['inbox']['new'] = $new;
}

View File

@@ -31,8 +31,8 @@ class pm_setup
function uninstall_post()
{
$sql = e107::getDb();
$sql->db_Delete('core', "e107_name = 'pm_prefs'");
$sql->db_Delete('menus', "menu_name = 'private_msg_menu'");
$sql->delete('core', "e107_name = 'pm_prefs'");
$sql->delete('menus', "menu_name = 'private_msg_menu'");
}
}