aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/develop/create_schema_files.php4
-rw-r--r--phpBB/includes/notification/manager.php10
-rw-r--r--phpBB/includes/notification/type/base.php12
-rw-r--r--phpBB/includes/notification/type/bookmark.php2
-rw-r--r--phpBB/includes/notification/type/post.php2
-rw-r--r--phpBB/includes/notification/type/quote.php4
-rw-r--r--phpBB/install/database_update.php4
7 files changed, 19 insertions, 19 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 69aca10e6c..aa0f13ccb3 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1303,7 +1303,7 @@ function get_schema_struct()
'item_parent_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
'unread' => array('BOOL', 1),
- 'is_disabled' => array('BOOL', 0),
+ 'is_enabled' => array('BOOL', 0),
'time' => array('TIMESTAMP', 1),
'data' => array('TEXT_UNI', ''),
),
@@ -1315,7 +1315,7 @@ function get_schema_struct()
'user_id' => array('INDEX', 'user_id'),
'time' => array('INDEX', 'time'),
'unread' => array('INDEX', 'unread'),
- 'is_disabled' => array('INDEX', 'is_disabled'),
+ 'is_enabled' => array('INDEX', 'is_enabled'),
),
);
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))
{
diff --git a/phpBB/includes/notification/type/base.php b/phpBB/includes/notification/type/base.php
index 22824dc2ed..ab2f76c650 100644
--- a/phpBB/includes/notification/type/base.php
+++ b/phpBB/includes/notification/type/base.php
@@ -68,14 +68,14 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
/**
* Indentification data
- * item_type
- * item_id
- * item_parent_id - Parent item id (ex: for topic => forum_id, for post => topic_id, etc)
+ * item_type - Type of the item (translates to the notification type)
+ * item_id - ID of the item (e.g. post_id, msg_id)
+ * item_parent_id - Parent item id (ex: for topic => forum_id, for post => topic_id, etc)
* user_id
* unread
- * is_disabled - EXTENSION AUTHORS TAKE NOTE! This is to prevent errors with notifications from extensions!
- * - Set is_disabled to 1 for all your notifications when your extension is disabled so they are ignored and do not cause errors.
- * - When your extension is enabled again, set is_disabled to 0 and your notifications will be working again.
+ * is_enabled - EXTENSION AUTHORS TAKE NOTE! This is to prevent errors with notifications from extensions!
+ * - Set is_enabled to 0 for all your notifications when your extension is disabled so they are ignored and do not cause errors.
+ * - When your extension is enabled again, set is_enabled to 1 and your notifications will be working again.
*
* time
* data (special serialized field that each notification type can use to store stuff)
diff --git a/phpBB/includes/notification/type/bookmark.php b/phpBB/includes/notification/type/bookmark.php
index e5435b5829..dff7ac4c7d 100644
--- a/phpBB/includes/notification/type/bookmark.php
+++ b/phpBB/includes/notification/type/bookmark.php
@@ -114,7 +114,7 @@ class phpbb_notification_type_bookmark extends phpbb_notification_type_post
WHERE item_type = '" . self::get_item_type() . "'
AND item_parent_id = " . (int) self::get_item_parent_id($post) . '
AND unread = 1
- AND is_disabled = 0';
+ AND is_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index f5f3936c63..a5e822336d 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -145,7 +145,7 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
WHERE item_type = '" . self::get_item_type() . "'
AND item_parent_id = " . (int) self::get_item_parent_id($post) . '
AND unread = 1
- AND is_disabled = 0';
+ AND is_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
diff --git a/phpBB/includes/notification/type/quote.php b/phpBB/includes/notification/type/quote.php
index 0cc183346f..4c615d8dc6 100644
--- a/phpBB/includes/notification/type/quote.php
+++ b/phpBB/includes/notification/type/quote.php
@@ -133,7 +133,7 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
WHERE item_type = '" . self::get_item_type() . "'
AND item_parent_id = " . (int) self::get_item_parent_id($post) . '
AND unread = 1
- AND is_disabled = 0';
+ AND is_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
@@ -163,7 +163,7 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
FROM ' . NOTIFICATIONS_TABLE . "
WHERE item_type = '" . self::get_item_type() . "'
AND item_id = " . self::get_item_id($post) . '
- AND is_disabled = 0';
+ AND is_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 73637122ce..eceb0c8fc3 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1133,7 +1133,7 @@ function database_update_info()
'item_parent_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
'unread' => array('BOOL', 1),
- 'is_disabled' => array('BOOL', 0),
+ 'is_enabled' => array('BOOL', 0),
'time' => array('TIMESTAMP', 1),
'data' => array('TEXT_UNI', ''),
),
@@ -1145,7 +1145,7 @@ function database_update_info()
'user_id' => array('INDEX', 'user_id'),
'time' => array('INDEX', 'time'),
'unread' => array('INDEX', 'unread'),
- 'is_disabled' => array('INDEX', 'is_disabled'),
+ 'is_enabled' => array('INDEX', 'is_enabled'),
),
),
USER_NOTIFICATIONS_TABLE => array(