diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 21:17:05 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 22:08:10 -0600 |
commit | eeb40181956b578ca98ed0106f3019d8c8299ed3 (patch) | |
tree | e138516ffddae340733bef3216a276dc076e9744 /phpBB | |
parent | fad6bc5a7e58ddd370b88f73712de350b61bca29 (diff) | |
download | forums-eeb40181956b578ca98ed0106f3019d8c8299ed3.tar forums-eeb40181956b578ca98ed0106f3019d8c8299ed3.tar.gz forums-eeb40181956b578ca98ed0106f3019d8c8299ed3.tar.bz2 forums-eeb40181956b578ca98ed0106f3019d8c8299ed3.tar.xz forums-eeb40181956b578ca98ed0106f3019d8c8299ed3.zip |
[ticket/11103] data -> notification_data
PHPBB3-11103
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/develop/create_schema_files.php | 2 | ||||
-rw-r--r-- | phpBB/includes/notification/type/base.php | 10 | ||||
-rw-r--r-- | phpBB/includes/notification/type/post.php | 6 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index b3c10b1cfa..9ffd989597 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -1312,7 +1312,7 @@ function get_schema_struct() 'user_id' => array('UINT', 0), 'notification_read' => array('BOOL', 0), 'notification_time' => array('TIMESTAMP', 1), - 'data' => array('TEXT_UNI', ''), + 'notification_data' => array('TEXT_UNI', ''), ), 'PRIMARY_KEY' => 'notification_id', 'KEYS' => array( diff --git a/phpBB/includes/notification/type/base.php b/phpBB/includes/notification/type/base.php index cdca9aa642..c262fbeedb 100644 --- a/phpBB/includes/notification/type/base.php +++ b/phpBB/includes/notification/type/base.php @@ -110,7 +110,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i { // The row from the database (unless this is a new notification we're going to add) $this->data = $data; - $this->data['data'] = (isset($this->data['data'])) ? unserialize($this->data['data']) : array(); + $this->data['notification_data'] = (isset($this->data['notification_data'])) ? unserialize($this->data['notification_data']) : array(); } public function __get($name) @@ -137,7 +137,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i */ protected function get_data($name) { - return ($name === false) ? $this->data['data'] : ((isset($this->data['data'][$name])) ? $this->data['data'][$name] : null); + return ($name === false) ? $this->data['notification_data'] : ((isset($this->data['notification_data'][$name])) ? $this->data['notification_data'][$name] : null); } /** @@ -148,7 +148,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i */ protected function set_data($name, $value) { - $this->data['data'][$name] = $value; + $this->data['notification_data'][$name] = $value; } /** @@ -171,12 +171,12 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i 'notification_time' => time(), 'notification_read' => false, - 'data' => array(), + 'notification_data' => array(), ), $this->data); $data = $this->data; - $data['data'] = serialize($data['data']); + $data['notification_data'] = serialize($data['notification_data']); return $data; } diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php index f29372923e..ddfa720e5e 100644 --- a/phpBB/includes/notification/type/post.php +++ b/phpBB/includes/notification/type/post.php @@ -342,7 +342,7 @@ class phpbb_notification_type_post extends phpbb_notification_type_base // Do not add them as a responder if they were the original poster that created the notification if ($this->get_data('poster_id') == $post['poster_id']) { - return array('data' => serialize($this->get_data(false))); + return array('notification_data' => serialize($this->get_data(false))); } $responders = $this->get_data('responders'); @@ -354,7 +354,7 @@ class phpbb_notification_type_post extends phpbb_notification_type_base // Do not add them as a responder multiple times if ($responder['poster_id'] == $post['poster_id']) { - return array('data' => serialize($this->get_data(false))); + return array('notification_data' => serialize($this->get_data(false))); } } @@ -365,6 +365,6 @@ class phpbb_notification_type_post extends phpbb_notification_type_base $this->set_data('responders', $responders); - return array('data' => serialize($this->get_data(false))); + return array('notification_data' => serialize($this->get_data(false))); } } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 364eca9267..ed1c6ee847 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1200,7 +1200,7 @@ function database_update_info() 'notification_read' => array('BOOL', 0), 'is_enabled' => array('BOOL', 1), 'notification_time' => array('TIMESTAMP', 1), - 'data' => array('TEXT_UNI', ''), + 'notification_data' => array('TEXT_UNI', ''), ), 'PRIMARY_KEY' => 'notification_id', 'KEYS' => array( diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index bb4e413ba1..260b75947a 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -636,7 +636,7 @@ CREATE TABLE phpbb_notifications ( user_id INTEGER DEFAULT 0 NOT NULL, notification_read INTEGER DEFAULT 0 NOT NULL, notification_time INTEGER DEFAULT 1 NOT NULL, - data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL + notification_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_notifications ADD PRIMARY KEY (notification_id);; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 1fa3616857..aa9766f91f 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -780,7 +780,7 @@ CREATE TABLE [phpbb_notifications] ( [user_id] [int] DEFAULT (0) NOT NULL , [notification_read] [int] DEFAULT (0) NOT NULL , [notification_time] [int] DEFAULT (1) NOT NULL , - [data] [varchar] (4000) DEFAULT ('') NOT NULL + [notification_data] [varchar] (4000) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 8163b7a051..ebadc93f05 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -447,7 +447,7 @@ CREATE TABLE phpbb_notifications ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notification_read tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL, - data blob NOT NULL, + notification_data blob NOT NULL, PRIMARY KEY (notification_id), KEY item_ident (item_type, item_id), KEY user (user_id, notification_read) diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 6654734ab8..ff46c13fef 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -447,7 +447,7 @@ CREATE TABLE phpbb_notifications ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, notification_read tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL, - data text NOT NULL, + notification_data text NOT NULL, PRIMARY KEY (notification_id), KEY item_ident (item_type, item_id), KEY user (user_id, notification_read) diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index a65fe63167..7a285c6d55 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -862,7 +862,7 @@ CREATE TABLE phpbb_notifications ( user_id number(8) DEFAULT '0' NOT NULL, notification_read number(1) DEFAULT '0' NOT NULL, notification_time number(11) DEFAULT '1' NOT NULL, - data clob DEFAULT '' , + notification_data clob DEFAULT '' , CONSTRAINT pk_phpbb_notifications PRIMARY KEY (notification_id) ) / diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 504ffe8282..1035dd1ce8 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -619,7 +619,7 @@ CREATE TABLE phpbb_notifications ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), notification_read INT2 DEFAULT '0' NOT NULL CHECK (notification_read >= 0), notification_time INT4 DEFAULT '1' NOT NULL CHECK (notification_time >= 0), - data varchar(4000) DEFAULT '' NOT NULL, + notification_data varchar(4000) DEFAULT '' NOT NULL, PRIMARY KEY (notification_id) ); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 836d0a0bd0..3586a9040d 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -434,7 +434,7 @@ CREATE TABLE phpbb_notifications ( user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', notification_read INTEGER UNSIGNED NOT NULL DEFAULT '0', notification_time INTEGER UNSIGNED NOT NULL DEFAULT '1', - data text(65535) NOT NULL DEFAULT '' + notification_data text(65535) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (item_type, item_id); |