diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-19 15:49:49 -0500 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-19 15:50:32 -0500 |
| commit | 471ca5e7dc8276e80e790e05a2ae36dfe35cfe10 (patch) | |
| tree | bf2fd0ba9d1778be4e9b5058d93c07f948401e00 /phpBB/includes/notification/manager.php | |
| parent | c7c3ab07c64b0cefa46231a92dc47080c108e4cf (diff) | |
| download | forums-471ca5e7dc8276e80e790e05a2ae36dfe35cfe10.tar forums-471ca5e7dc8276e80e790e05a2ae36dfe35cfe10.tar.gz forums-471ca5e7dc8276e80e790e05a2ae36dfe35cfe10.tar.bz2 forums-471ca5e7dc8276e80e790e05a2ae36dfe35cfe10.tar.xz forums-471ca5e7dc8276e80e790e05a2ae36dfe35cfe10.zip | |
[ticket/11103] Change is_disabled to is_enabled
If you're following along and would like to update your DB, you can run
the following queries to do so:
ALTER TABLE phpbb_notifications CHANGE `is_disabled` `is_enabled`
TINYINT( 1 ) NOT NULL DEFAULT '1';
UPDATE `phpbb_notifications` SET is_enabled = 1;
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/notification/manager.php')
| -rw-r--r-- | phpBB/includes/notification/manager.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php index 38c72ad755..3a4c4cd696 100644 --- a/phpBB/includes/notification/manager.php +++ b/phpBB/includes/notification/manager.php @@ -120,7 +120,7 @@ class phpbb_notification_manager FROM ' . NOTIFICATIONS_TABLE . ' WHERE user_id = ' . (int) $options['user_id'] . ' AND unread = 1 - AND is_disabled = 0'; + AND is_enabled = 1'; $result = $this->db->sql_query($sql); $unread_count = (int) $this->db->sql_fetchfield('count', $result); $this->db->sql_freeresult($result); @@ -132,7 +132,7 @@ class phpbb_notification_manager $sql = 'SELECT COUNT(*) AS count FROM ' . NOTIFICATIONS_TABLE . ' WHERE user_id = ' . (int) $options['user_id'] . ' - AND is_disabled = 0'; + AND is_enabled = 1'; $result = $this->db->sql_query($sql); $total_count = (int) $this->db->sql_fetchfield('count', $result); $this->db->sql_freeresult($result); @@ -145,7 +145,7 @@ class phpbb_notification_manager FROM ' . NOTIFICATIONS_TABLE . ' WHERE user_id = ' . (int) $options['user_id'] . (($options['notification_id']) ? ((is_array($options['notification_id'])) ? ' AND ' . $this->db->sql_in_set('notification_id', $options['notification_id']) : ' AND notification_id = ' . (int) $options['notification_id']) : '') . ' - AND is_disabled = 0 + AND is_enabled = 1 ORDER BY ' . $this->db->sql_escape($options['order_by']) . ' ' . $this->db->sql_escape($options['order_dir']); $result = $this->db->sql_query_limit($sql, $options['limit'], $options['start']); @@ -163,7 +163,7 @@ class phpbb_notification_manager WHERE user_id = ' . (int) $options['user_id'] . ' AND unread = 1 AND ' . $this->db->sql_in_set('notification_id', array_keys($rowset), true) . ' - AND is_disabled = 0 + AND is_is_enabled = 1 ORDER BY ' . $this->db->sql_escape($options['order_by']) . ' ' . $this->db->sql_escape($options['order_dir']); $result = $this->db->sql_query_limit($sql, $options['limit'], $options['start']); @@ -374,7 +374,7 @@ class phpbb_notification_manager FROM ' . NOTIFICATIONS_TABLE . " WHERE item_type = '" . $this->db->sql_escape($item_type) . "' AND item_id = " . (int) $item_id . ' - AND is_disabled = 0'; + AND is_enabled = 1'; $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { |
