mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11103] data -> notification_data
PHPBB3-11103
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user