aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-10-29 18:15:01 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-10-29 18:15:01 -0500
commitecf6f1eb8ca34da43b14b2da642cc7f1aa397d36 (patch)
treecda7c4b8e0dc11b20fd04c726ca780fc15d6b049 /phpBB
parente549b7663da47d7518b93074e513c7e1d034bf52 (diff)
downloadforums-ecf6f1eb8ca34da43b14b2da642cc7f1aa397d36.tar
forums-ecf6f1eb8ca34da43b14b2da642cc7f1aa397d36.tar.gz
forums-ecf6f1eb8ca34da43b14b2da642cc7f1aa397d36.tar.bz2
forums-ecf6f1eb8ca34da43b14b2da642cc7f1aa397d36.tar.xz
forums-ecf6f1eb8ca34da43b14b2da642cc7f1aa397d36.zip
[ticket/11103] Code cleanup
PHPBB3-11103
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/notification/manager.php2
-rw-r--r--phpBB/includes/notification/type/approve_post.php32
-rw-r--r--phpBB/includes/notification/type/approve_topic.php30
-rw-r--r--phpBB/styles/prosilver/theme/colours.css2
4 files changed, 2 insertions, 64 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php
index 3e816108f4..ffdce2032d 100644
--- a/phpBB/includes/notification/manager.php
+++ b/phpBB/includes/notification/manager.php
@@ -231,7 +231,7 @@ class phpbb_notification_manager
return;
}
- $time = ($time) ?: time();
+ $time = ($time !== false) ? $time : time();
$sql = 'UPDATE ' . NOTIFICATIONS_TABLE . "
SET unread = 0
diff --git a/phpBB/includes/notification/type/approve_post.php b/phpBB/includes/notification/type/approve_post.php
index 26f56e6333..60b66fd4f6 100644
--- a/phpBB/includes/notification/type/approve_post.php
+++ b/phpBB/includes/notification/type/approve_post.php
@@ -79,38 +79,6 @@ class phpbb_notification_type_approve_post extends phpbb_notification_type_post
}
/**
- * Pre create insert array function
- * This allows you to perform certain actions, like run a query
- * and load data, before create_insert_array() is run. The data
- * returned from this function will be sent to create_insert_array().
- *
- * @param array $post Post data from submit_post
- * @param array $notify_users Notify users list
- * Formated from find_users_for_notification()
- * @return array Whatever you want to send to create_insert_array().
- */
- public function pre_create_insert_array($post, $notify_users)
- {
- /*if (!sizeof($notify_users))
- {
- return array();
- }
-
- // Mark the topic unread before the post
- $sql = 'UPDATE ' . TOPICS_TRACK_TABLE . '
- SET mark_time = ' . (int) ($post['post_time'] - 1) . '
- WHERE topic_id = ' . (int) $post['topic_id'] . '
- AND ' . $this->db->sql_in_set('user_id', array_keys($notify_users));
- $this->db->sql_query($sql);*/
-
- // In the parent class, this is used to check if the post is already
- // read by a user and marks the notification read if it was marked read.
- // Returning an empty array in effect, forces it to be marked as unread
- // (and also saves a query)
- return array();
- }
-
- /**
* Function for preparing the data for insertion in an SQL query
* (The service handles insertion)
*
diff --git a/phpBB/includes/notification/type/approve_topic.php b/phpBB/includes/notification/type/approve_topic.php
index 78837f643d..4fd247a789 100644
--- a/phpBB/includes/notification/type/approve_topic.php
+++ b/phpBB/includes/notification/type/approve_topic.php
@@ -79,36 +79,6 @@ class phpbb_notification_type_approve_topic extends phpbb_notification_type_topi
}
/**
- * Pre create insert array function
- * This allows you to perform certain actions, like run a query
- * and load data, before create_insert_array() is run. The data
- * returned from this function will be sent to create_insert_array().
- *
- * @param array $post Post data from submit_post
- * @param array $notify_users Notify users list
- * Formated from find_users_for_notification()
- * @return array Whatever you want to send to create_insert_array().
- */
- public function pre_create_insert_array($post, $notify_users)
- {
- /*if (!sizeof($notify_users))
- {
- return array();
- }
-
- // Mark the topic unread
- $sql = 'DELETE FROM ' . TOPICS_TRACK_TABLE . '
- WHERE topic_id = ' . (int) $post['topic_id'] . '
- AND ' . $this->db->sql_in_set('user_id', array_keys($notify_users));
- $this->db->sql_query($sql*/
-
- // In the parent class, this is used to check if the post is already
- // read by a user and marks the notification read if it was marked read.
- // Returning an empty array in effect, forces it to be marked as unread
- return array();
- }
-
- /**
* Function for preparing the data for insertion in an SQL query
* (The service handles insertion)
*
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 49e404a903..88e48e845a 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -1056,4 +1056,4 @@ input.disabled {
#notification_list > .header, .notification_list > .footer {
border-color: #00608F;
-} \ No newline at end of file
+}