aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/config/services.yml1
-rw-r--r--phpBB/develop/create_schema_files.php16
-rw-r--r--phpBB/includes/acp/acp_groups.php10
-rw-r--r--phpBB/includes/db/migration/data/310/notifications_schema_fix.php92
-rw-r--r--phpBB/includes/notification/exception.php29
-rw-r--r--phpBB/includes/notification/manager.php242
-rw-r--r--phpBB/includes/notification/method/base.php2
-rw-r--r--phpBB/includes/notification/type/base.php22
-rw-r--r--phpBB/includes/notification/type/bookmark.php8
-rw-r--r--phpBB/includes/notification/type/post.php8
-rw-r--r--phpBB/includes/notification/type/quote.php22
-rw-r--r--phpBB/includes/template/filter.php28
-rw-r--r--phpBB/includes/ucp/ucp_groups.php10
-rw-r--r--phpBB/install/schemas/firebird_schema.sql21
-rw-r--r--phpBB/install/schemas/mssql_schema.sql13
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql12
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql12
-rw-r--r--phpBB/install/schemas/oracle_schema.sql28
-rw-r--r--phpBB/install/schemas/postgres_schema.sql12
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql11
-rw-r--r--phpBB/language/en/common.php1
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js55
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html30
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html13
-rw-r--r--phpBB/styles/prosilver/template/mcp_front.html38
-rw-r--r--phpBB/styles/prosilver/template/mcp_queue.html12
-rw-r--r--phpBB/styles/prosilver/template/mcp_reports.html20
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html1
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html10
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html6
-rw-r--r--phpBB/styles/prosilver/template/search_results.html42
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html1
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html10
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_manage.html31
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_membership.html62
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html49
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_drafts.html18
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_front.html34
-rwxr-xr-xphpBB/styles/prosilver/template/ucp_main_subscribed.html54
-rw-r--r--phpBB/styles/prosilver/template/ucp_notifications.html28
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html9
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html5
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html41
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css58
-rw-r--r--phpBB/styles/prosilver/theme/colours.css5
-rw-r--r--phpBB/styles/prosilver/theme/content.css122
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css19
-rw-r--r--tests/notification/fixtures/submit_post_bookmark.xml8
-rw-r--r--tests/notification/fixtures/submit_post_post.xml10
-rw-r--r--tests/notification/fixtures/submit_post_post_in_queue.xml8
-rw-r--r--tests/notification/fixtures/submit_post_quote.xml8
-rw-r--r--tests/notification/manager_helper.php (renamed from tests/mock/notifications_notification_manager.php)10
-rw-r--r--tests/notification/notification_test.php82
-rw-r--r--tests/notification/submit_post_base.php48
-rw-r--r--tests/template/template_test.php14
-rw-r--r--tests/template/templates/define.html2
-rw-r--r--tests/template/templates/define_advanced.html12
-rw-r--r--tests/template/templates/define_include2.html11
-rw-r--r--tests/template/templates/define_unclosed.html2
60 files changed, 1027 insertions, 562 deletions
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index 306dc2dc77..7a0fddf0c1 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -217,6 +217,7 @@ services:
- @service_container
- @user_loader
- @dbal.conn
+ - @cache
- @user
- %core.root_path%
- %core.php_ext%
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index b454fb2c16..0fd1a722ca 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1317,16 +1317,20 @@ function get_schema_struct()
$schema_data['phpbb_notification_types'] = array(
'COLUMNS' => array(
- 'notification_type' => array('VCHAR:255', ''),
+ 'notification_type_id' => array('USINT', NULL, 'auto_increment'),
+ 'notification_type_name' => array('VCHAR:255', ''),
'notification_type_enabled' => array('BOOL', 1),
),
- 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'),
+ 'PRIMARY_KEY' => array('notification_type_id'),
+ 'KEYS' => array(
+ 'type' => array('UNIQUE', array('notification_type_name')),
+ ),
);
$schema_data['phpbb_notifications'] = array(
'COLUMNS' => array(
- 'notification_id' => array('UINT', NULL, 'auto_increment'),
- 'item_type' => array('VCHAR:255', ''),
+ 'notification_id' => array('UINT:10', NULL, 'auto_increment'),
+ 'notification_type_id' => array('USINT', 0),
'item_id' => array('UINT', 0),
'item_parent_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
@@ -1336,7 +1340,7 @@ function get_schema_struct()
),
'PRIMARY_KEY' => 'notification_id',
'KEYS' => array(
- 'item_ident' => array('INDEX', array('item_type', 'item_id')),
+ 'item_ident' => array('INDEX', array('notification_type_id', 'item_id')),
'user' => array('INDEX', array('user_id', 'notification_read')),
),
);
@@ -1814,7 +1818,7 @@ function get_schema_struct()
);
$schema_data['phpbb_user_notifications'] = array(
- 'COLUMNS' => array(
+ 'COLUMNS' => array(
'item_type' => array('VCHAR:255', ''),
'item_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 865810687b..37c49d7d72 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -381,6 +381,9 @@ class acp_groups
$submit_ary['avatar_width'] = 0;
$submit_ary['avatar_height'] = 0;
}
+
+ // Merge any avatar errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
// Validate the length of "Maximum number of allowed recipients per private message" setting.
@@ -570,8 +573,11 @@ class acp_groups
$avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
- // Merge any avatar errors into the primary error array
- $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
+ if (!$update)
+ {
+ // Merge any avatar errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
+ }
$back_link = request_var('back_link', '');
diff --git a/phpBB/includes/db/migration/data/310/notifications_schema_fix.php b/phpBB/includes/db/migration/data/310/notifications_schema_fix.php
new file mode 100644
index 0000000000..27e63e10d0
--- /dev/null
+++ b/phpBB/includes/db/migration/data/310/notifications_schema_fix.php
@@ -0,0 +1,92 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+class phpbb_db_migration_data_310_notifications_schema_fix extends phpbb_db_migration
+{
+ static public function depends_on()
+ {
+ return array('phpbb_db_migration_data_310_notifications');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'notification_types',
+ $this->table_prefix . 'notifications',
+ ),
+ 'add_tables' => array(
+ $this->table_prefix . 'notification_types' => array(
+ 'COLUMNS' => array(
+ 'notification_type_id' => array('USINT', NULL, 'auto_increment'),
+ 'notification_type_name' => array('VCHAR:255', ''),
+ 'notification_type_enabled' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => array('notification_type_id'),
+ 'KEYS' => array(
+ 'type' => array('UNIQUE', array('notification_type_name')),
+ ),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'COLUMNS' => array(
+ 'notification_id' => array('UINT:10', NULL, 'auto_increment'),
+ 'notification_type_id' => array('USINT', 0),
+ 'item_id' => array('UINT', 0),
+ 'item_parent_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notification_read' => array('BOOL', 0),
+ 'notification_time' => array('TIMESTAMP', 1),
+ 'notification_data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'notification_id',
+ 'KEYS' => array(
+ 'item_ident' => array('INDEX', array('notification_type_id', 'item_id')),
+ 'user' => array('INDEX', array('user_id', 'notification_read')),
+ ),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'notification_types',
+ $this->table_prefix . 'notifications',
+ ),
+ 'add_tables' => array(
+ $this->table_prefix . 'notification_types' => array(
+ 'COLUMNS' => array(
+ 'notification_type' => array('VCHAR:255', ''),
+ 'notification_type_enabled' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'COLUMNS' => array(
+ 'notification_id' => array('UINT', NULL, 'auto_increment'),
+ 'item_type' => array('VCHAR:255', ''),
+ 'item_id' => array('UINT', 0),
+ 'item_parent_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notification_read' => array('BOOL', 0),
+ 'notification_time' => array('TIMESTAMP', 1),
+ 'notification_data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'notification_id',
+ 'KEYS' => array(
+ 'item_ident' => array('INDEX', array('item_type', 'item_id')),
+ 'user' => array('INDEX', array('user_id', 'notification_read')),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/includes/notification/exception.php b/phpBB/includes/notification/exception.php
new file mode 100644
index 0000000000..a52d6fdc57
--- /dev/null
+++ b/phpBB/includes/notification/exception.php
@@ -0,0 +1,29 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Notifications exception
+*
+* @package notifications
+*/
+class phpbb_notification_exception extends \Exception
+{
+ public function __toString()
+ {
+ return $this->getMessage();
+ }
+}
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php
index 9eceeb753a..97833710c0 100644
--- a/phpBB/includes/notification/manager.php
+++ b/phpBB/includes/notification/manager.php
@@ -36,6 +36,9 @@ class phpbb_notification_manager
/** @var phpbb_db_driver */
protected $db;
+ /** @var phpbb_cache_service */
+ protected $cache;
+
/** @var phpbb_user */
protected $user;
@@ -70,7 +73,7 @@ class phpbb_notification_manager
* @param string $user_notifications_table
* @return phpbb_notification_manager
*/
- public function __construct($notification_types, $notification_methods, $phpbb_container, phpbb_user_loader $user_loader, phpbb_db_driver $db, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
+ public function __construct($notification_types, $notification_methods, $phpbb_container, phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
{
$this->notification_types = $notification_types;
$this->notification_methods = $notification_methods;
@@ -78,6 +81,7 @@ class phpbb_notification_manager
$this->user_loader = $user_loader;
$this->db = $db;
+ $this->cache = $cache;
$this->user = $user;
$this->phpbb_root_path = $phpbb_root_path;
@@ -145,7 +149,7 @@ class phpbb_notification_manager
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
WHERE n.user_id = ' . (int) $options['user_id'] . '
AND n.notification_read = 0
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
$unread_count = (int) $this->db->sql_fetchfield('unread_count', $result);
@@ -158,7 +162,7 @@ class phpbb_notification_manager
$sql = 'SELECT COUNT(n.notification_id) AS total_count
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
WHERE n.user_id = ' . (int) $options['user_id'] . '
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
$total_count = (int) $this->db->sql_fetchfield('total_count', $result);
@@ -170,11 +174,11 @@ class phpbb_notification_manager
$rowset = array();
// Get the main notifications
- $sql = 'SELECT n.*
+ $sql = 'SELECT n.*, nt.notification_type_name
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
WHERE n.user_id = ' . (int) $options['user_id'] .
(($options['notification_id']) ? ((is_array($options['notification_id'])) ? ' AND ' . $this->db->sql_in_set('n.notification_id', $options['notification_id']) : ' AND n.notification_id = ' . (int) $options['notification_id']) : '') . '
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1
ORDER BY n.' . $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']);
@@ -188,12 +192,12 @@ class phpbb_notification_manager
// Get all unread notifications
if ($unread_count && $options['all_unread'] && !empty($rowset))
{
- $sql = 'SELECT n.*
+ $sql = 'SELECT n.*, nt.notification_type_name
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
WHERE n.user_id = ' . (int) $options['user_id'] . '
AND n.notification_read = 0
AND ' . $this->db->sql_in_set('n.notification_id', array_keys($rowset), true) . '
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1
ORDER BY n.' . $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']);
@@ -207,17 +211,17 @@ class phpbb_notification_manager
foreach ($rowset as $row)
{
- $notification = $this->get_item_type_class($row['item_type'], $row);
+ $notification = $this->get_item_type_class($row['notification_type_name'], $row);
// Array of user_ids to query all at once
$user_ids = array_merge($user_ids, $notification->users_to_query());
// Some notification types also require querying additional tables themselves
- if (!isset($load_special[$row['item_type']]))
+ if (!isset($load_special[$row['notification_type_name']]))
{
- $load_special[$row['item_type']] = array();
+ $load_special[$row['notification_type_name']] = array();
}
- $load_special[$row['item_type']] = array_merge($load_special[$row['item_type']], $notification->get_load_special());
+ $load_special[$row['notification_type_name']] = array_merge($load_special[$row['notification_type_name']], $notification->get_load_special());
$notifications[$row['notification_id']] = $notification;
}
@@ -243,19 +247,21 @@ class phpbb_notification_manager
/**
* Mark notifications read
*
- * @param bool|string|array $item_type Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to mark read for all item types
+ * @param bool|string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to mark read for all item types
* @param bool|int|array $item_id Item id or array of item ids. False to mark read for all item ids
* @param bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
* @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
*/
- public function mark_notifications_read($item_type, $item_id, $user_id, $time = false)
+ public function mark_notifications_read($notification_type_name, $item_id, $user_id, $time = false)
{
$time = ($time !== false) ? $time : time();
$sql = 'UPDATE ' . $this->notifications_table . "
SET notification_read = 1
WHERE notification_time <= " . (int) $time .
- (($item_type !== false) ? ' AND ' . (is_array($item_type) ? $this->db->sql_in_set('item_type', $item_type) : " item_type = '" . $this->db->sql_escape($item_type) . "'") : '') .
+ (($notification_type_name !== false) ? ' AND ' .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name))
+ : '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') .
(($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
$this->db->sql_query($sql);
@@ -264,29 +270,21 @@ class phpbb_notification_manager
/**
* Mark notifications read from a parent identifier
*
- * @param string|array $item_type Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
* @param bool|int|array $item_parent_id Item parent id or array of item parent ids. False to mark read for all item parent ids
* @param bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
* @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
*/
- public function mark_notifications_read_by_parent($item_type, $item_parent_id, $user_id, $time = false)
+ public function mark_notifications_read_by_parent($notification_type_name, $item_parent_id, $user_id, $time = false)
{
- if (is_array($item_type))
- {
- foreach ($item_type as $type)
- {
- $this->mark_notifications_read_by_parent($type, $item_parent_id, $user_id, $time);
- }
-
- return;
- }
-
$time = ($time !== false) ? $time : time();
$sql = 'UPDATE ' . $this->notifications_table . "
SET notification_read = 1
- WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
- AND notification_time <= " . (int) $time .
+ WHERE notification_time <= " . (int) $time .
+ (($notification_type_name !== false) ? ' AND ' .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name))
+ : '') .
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
$this->db->sql_query($sql);
@@ -312,7 +310,7 @@ class phpbb_notification_manager
/**
* Add a notification
*
- * @param string|array $item_type Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
* Note: If you send an array of types, any user who could receive multiple notifications from this single item will only receive
* a single notification. If they MUST receive multiple notifications, call this function multiple times instead of sending an array
* @param array $data Data specific for this type that will be inserted
@@ -320,18 +318,18 @@ class phpbb_notification_manager
* ignore_users array of data to specify which users should not receive certain types of notifications
* @return array Information about what users were notified and how they were notified
*/
- public function add_notifications($item_type, $data, array $options = array())
+ public function add_notifications($notification_type_name, $data, array $options = array())
{
$options = array_merge(array(
'ignore_users' => array(),
), $options);
- if (is_array($item_type))
+ if (is_array($notification_type_name))
{
$notified_users = array();
$temp_options = $options;
- foreach ($item_type as $type)
+ foreach ($notification_type_name as $type)
{
$temp_options['ignore_users'] = $options['ignore_users'] + $notified_users;
$notified_users += $this->add_notifications($type, $data, $temp_options);
@@ -340,12 +338,12 @@ class phpbb_notification_manager
return $notified_users;
}
- $item_id = $this->get_item_type_class($item_type)->get_item_id($data);
+ $item_id = $this->get_item_type_class($notification_type_name)->get_item_id($data);
// find out which users want to receive this type of notification
- $notify_users = $this->get_item_type_class($item_type)->find_users_for_notification($data, $options);
+ $notify_users = $this->get_item_type_class($notification_type_name)->find_users_for_notification($data, $options);
- $this->add_notifications_for_users($item_type, $data, $notify_users);
+ $this->add_notifications_for_users($notification_type_name, $data, $notify_users);
return $notify_users;
}
@@ -353,15 +351,15 @@ class phpbb_notification_manager
/**
* Add a notification for specific users
*
- * @param string|array $item_type Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
* @param array $data Data specific for this type that will be inserted
* @param array $notify_users User list to notify
*/
- public function add_notifications_for_users($item_type, $data, $notify_users)
+ public function add_notifications_for_users($notification_type_name, $data, $notify_users)
{
- if (is_array($item_type))
+ if (is_array($notification_type_name))
{
- foreach ($item_type as $type)
+ foreach ($notification_type_name as $type)
{
$this->add_notifications_for_users($type, $data, $notify_users);
}
@@ -369,24 +367,9 @@ class phpbb_notification_manager
return;
}
- $sql = 'SELECT notification_type
- FROM ' . $this->notification_types_table . "
- WHERE notification_type = '" . $this->db->sql_escape($item_type) . "'";
- $result = $this->db->sql_query($sql);
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
- if ($this->db->sql_fetchrow($result) === false)
- {
- // Does not exist in the database, must add the item type
- $sql = 'INSERT INTO ' . $this->notification_types_table . ' ' . $this->db->sql_build_array('INSERT', array(
- 'notification_type' => $item_type,
- 'notification_type_enabled' => 1,
- ));
- $this->db->sql_query($sql);
- }
-
- $this->db->sql_freeresult($result);
-
- $item_id = $this->get_item_type_class($item_type)->get_item_id($data);
+ $item_id = $this->get_item_type_class($notification_type_name)->get_item_id($data);
$user_ids = array();
$notification_objects = $notification_methods = array();
@@ -397,10 +380,10 @@ class phpbb_notification_manager
// Make sure not to send new notifications to users who've already been notified about this item
// This may happen when an item was added, but now new users are able to see the item
$sql = 'SELECT n.user_id
- FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . " nt
- WHERE n.item_type = '" . $this->db->sql_escape($item_type) . "'
- AND n.item_id = " . (int) $item_id . '
- AND nt.notification_type = n.item_type
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $notification_type_id . '
+ AND n.item_id = ' . (int) $item_id . '
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
@@ -415,7 +398,7 @@ class phpbb_notification_manager
}
// Allow notifications to perform actions before creating the insert array (such as run a query to cache some data needed for all notifications)
- $notification = $this->get_item_type_class($item_type);
+ $notification = $this->get_item_type_class($notification_type_name);
$pre_create_data = $notification->pre_create_insert_array($data, $notify_users);
unset($notification);
@@ -424,7 +407,7 @@ class phpbb_notification_manager
// Go through each user so we can insert a row in the DB and then notify them by their desired means
foreach ($notify_users as $user => $methods)
{
- $notification = $this->get_item_type_class($item_type);
+ $notification = $this->get_item_type_class($notification_type_name);
$notification->user_id = (int) $user;
@@ -464,14 +447,14 @@ class phpbb_notification_manager
/**
* Update a notification
*
- * @param string|array $item_type Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
* @param array $data Data specific for this type that will be updated
*/
- public function update_notifications($item_type, $data)
+ public function update_notifications($notification_type_name, $data)
{
- if (is_array($item_type))
+ if (is_array($notification_type_name))
{
- foreach ($item_type as $type)
+ foreach ($notification_type_name as $type)
{
$this->update_notifications($type, $data);
}
@@ -479,7 +462,7 @@ class phpbb_notification_manager
return;
}
- $notification = $this->get_item_type_class($item_type);
+ $notification = $this->get_item_type_class($notification_type_name);
// Allow the notifications class to over-ride the update_notifications functionality
if (method_exists($notification, 'update_notifications'))
@@ -491,28 +474,29 @@ class phpbb_notification_manager
}
}
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
$item_id = $notification->get_item_id($data);
$update_array = $notification->create_update_array($data);
$sql = 'UPDATE ' . $this->notifications_table . '
- SET ' . $this->db->sql_build_array('UPDATE', $update_array) . "
- WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
- AND item_id = " . (int) $item_id;
+ SET ' . $this->db->sql_build_array('UPDATE', $update_array) . '
+ WHERE notification_type_id = ' . (int) $notification_type_id . '
+ AND item_id = ' . (int) $item_id;
$this->db->sql_query($sql);
}
/**
* Delete a notification
*
- * @param string|array $item_type Type identifier or array of item types (only acceptable if the $item_id is identical for the specified types)
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $item_id is identical for the specified types)
* @param int|array $item_id Identifier within the type (or array of ids)
* @param array $data Data specific for this type that will be updated
*/
- public function delete_notifications($item_type, $item_id)
+ public function delete_notifications($notification_type_name, $item_id)
{
- if (is_array($item_type))
+ if (is_array($notification_type_name))
{
- foreach ($item_type as $type)
+ foreach ($notification_type_name as $type)
{
$this->delete_notifications($type, $item_id);
}
@@ -520,9 +504,11 @@ class phpbb_notification_manager
return;
}
- $sql = 'DELETE FROM ' . $this->notifications_table . "
- WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
- AND " . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id);
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id . '
+ AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id);
$this->db->sql_query($sql);
}
@@ -655,7 +641,8 @@ class phpbb_notification_manager
{
if ($method !== '')
{
- $this->add_subscription($item_type, $item_type, '', $user_id);
+ // Make sure to subscribe them to the base subscription
+ $this->add_subscription($item_type, $item_id, '', $user_id);
}
$user_id = ($user_id === false) ? $this->user->data['user_id'] : $user_id;
@@ -755,13 +742,13 @@ class phpbb_notification_manager
* is disabled so that all those notifications are hidden and do not
* cause errors
*
- * @param string $item_type Type identifier of the subscription
+ * @param string $notification_type_name Type identifier of the subscription
*/
- public function disable_notifications($item_type)
+ public function disable_notifications($notification_type_name)
{
$sql = 'UPDATE ' . $this->notification_types_table . "
SET notification_type_enabled = 0
- WHERE notification_type = '" . $this->db->sql_escape($item_type) . "'";
+ WHERE notification_type_name = '" . $this->db->sql_escape($notification_type_name) . "'";
$this->db->sql_query($sql);
}
@@ -771,17 +758,21 @@ class phpbb_notification_manager
* This should be called when an extension which has notification types
* is purged so that all those notifications are removed
*
- * @param string $item_type Type identifier of the subscription
+ * @param string $notification_type_name Type identifier of the subscription
*/
- public function purge_notifications($item_type)
+ public function purge_notifications($notification_type_name)
{
- $sql = 'DELETE FROM ' . $this->notifications_table . "
- WHERE item_type = '" . $this->db->sql_escape($item_type) . "'";
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id;
$this->db->sql_query($sql);
- $sql = 'DELETE FROM ' . $this->notification_types_table . "
- WHERE notification_type = '" . $this->db->sql_escape($item_type) . "'";
+ $sql = 'DELETE FROM ' . $this->notification_types_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id;
$this->db->sql_query($sql);
+
+ $this->cache->destroy('notification_type_ids');
}
/**
@@ -791,13 +782,13 @@ class phpbb_notification_manager
* that was disabled is re-enabled so that all those notifications that
* were hidden are shown again
*
- * @param string $item_type Type identifier of the subscription
+ * @param string $notification_type_name Type identifier of the subscription
*/
- public function enable_notifications($item_type)
+ public function enable_notifications($notification_type_name)
{
$sql = 'UPDATE ' . $this->notification_types_table . "
SET notification_type_enabled = 1
- WHERE notification_type = '" . $this->db->sql_escape($item_type) . "'";
+ WHERE notification_type_name = '" . $this->db->sql_escape($notification_type_name) . "'";
$this->db->sql_query($sql);
}
@@ -816,11 +807,11 @@ class phpbb_notification_manager
/**
* Helper to get the notifications item type class and set it up
*/
- public function get_item_type_class($item_type, $data = array())
+ public function get_item_type_class($notification_type_name, $data = array())
{
- $item_type = (strpos($item_type, 'notification.type.') === 0) ? $item_type : 'notification.type.' . $item_type;
+ $notification_type_name = (strpos($notification_type_name, 'notification.type.') === 0) ? $notification_type_name : 'notification.type.' . $notification_type_name;
- $item = $this->load_object($item_type);
+ $item = $this->load_object($notification_type_name);
$item->set_initial_data($data);
@@ -851,4 +842,69 @@ class phpbb_notification_manager
return $object;
}
+
+ /**
+ * Get the notification type id from the name
+ *
+ * @param string $notification_type_name The name
+ * @return int the notification_type_id
+ */
+ public function get_notification_type_id($notification_type_name)
+ {
+ $notification_type_ids = $this->cache->get('notification_type_ids');
+
+ if ($notification_type_ids === false)
+ {
+ $notification_type_ids = array();
+
+ $sql = 'SELECT notification_type_id, notification_type_name
+ FROM ' . $this->notification_types_table;
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $notification_type_ids[$row['notification_type_name']] = (int) $row['notification_type_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->cache->put('notification_type_ids', $notification_type_ids);
+ }
+
+ if (!isset($notification_type_ids[$notification_type_name]))
+ {
+ if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
+ {
+ throw new phpbb_notification_exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name));
+ }
+
+ $sql = 'INSERT INTO ' . $this->notification_types_table . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'notification_type_name' => $notification_type_name,
+ 'notification_type_enabled' => 1,
+ ));
+ $this->db->sql_query($sql);
+
+ $notification_type_ids[$notification_type_name] = (int) $this->db->sql_nextid();
+
+ $this->cache->put('notification_type_ids', $notification_type_ids);
+ }
+
+ return $notification_type_ids[$notification_type_name];
+ }
+
+ /**
+ * Get notification type ids (as an array)
+ *
+ * @param array $notification_type_names Array of strings
+ * @return array Array of integers
+ */
+ public function get_notification_type_ids(array $notification_type_names)
+ {
+ $notification_type_ids = array();
+
+ foreach ($notification_type_names as $name)
+ {
+ $notification_type_ids[$name] = $this->get_notification_type_id($name);
+ }
+
+ return $notification_type_ids;
+ }
}
diff --git a/phpBB/includes/notification/method/base.php b/phpBB/includes/notification/method/base.php
index 22418c9be8..b633956d01 100644
--- a/phpBB/includes/notification/method/base.php
+++ b/phpBB/includes/notification/method/base.php
@@ -30,7 +30,7 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth
/** @var phpbb_db_driver */
protected $db;
- /** @var phpbb_cache_service */
+ /** @var phpbb_cache_driver_interface */
protected $cache;
/** @var phpbb_template */
diff --git a/phpBB/includes/notification/type/base.php b/phpBB/includes/notification/type/base.php
index 600ef7c965..46517f1c9b 100644
--- a/phpBB/includes/notification/type/base.php
+++ b/phpBB/includes/notification/type/base.php
@@ -30,7 +30,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
/** @var phpbb_db_driver */
protected $db;
- /** @var phpbb_cache_service */
+ /** @var phpbb_cache_driver_interface */
protected $cache;
/** @var phpbb_template */
@@ -69,10 +69,18 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
public static $notification_option = false;
/**
+ * The notification_type_id, set upon creation of the class
+ * This is the notification_type_id from the notification_types table
+ *
+ * @var int
+ */
+ protected $notification_type_id;
+
+ /**
* Indentification data
- * 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)
+ * notification_type_id - ID of the item type (auto generated, from notification types table)
+ * 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
* notification_read
* notification_time
@@ -124,6 +132,8 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
public function set_notification_manager(phpbb_notification_manager $notification_manager)
{
$this->notification_manager = $notification_manager;
+
+ $this->notification_type_id = $this->notification_manager->get_notification_type_id($this->get_type());
}
/**
@@ -211,7 +221,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
// Defaults
$this->data = array_merge(array(
'item_id' => static::get_item_id($type_data),
- 'item_type' => $this->get_type(),
+ 'notification_type_id' => $this->notification_type_id,
'item_parent_id' => static::get_item_parent_id($type_data),
'notification_time' => time(),
@@ -460,7 +470,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
$this->notification_read = (bool) !$unread;
$where = array(
- "item_type = '" . $this->db->sql_escape($this->item_type) . "'",
+ 'notification_type_id = ' . (int) $this->notification_type_id,
'item_id = ' . (int) $this->item_id,
'user_id = ' . (int) $this->user_id,
);
diff --git a/phpBB/includes/notification/type/bookmark.php b/phpBB/includes/notification/type/bookmark.php
index 946cb9b4ed..ae2e75d3eb 100644
--- a/phpBB/includes/notification/type/bookmark.php
+++ b/phpBB/includes/notification/type/bookmark.php
@@ -103,11 +103,11 @@ class phpbb_notification_type_bookmark extends phpbb_notification_type_post
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
$update_notifications = array();
$sql = 'SELECT n.*
- FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . " nt
- WHERE n.item_type = '" . $this->get_type() . "'
- AND n.item_parent_id = " . (int) self::get_item_parent_id($post) . '
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
AND n.notification_read = 0
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_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 626c13b7fd..9207fd866e 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -138,11 +138,11 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
$update_notifications = array();
$sql = 'SELECT n.*
- FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . " nt
- WHERE n.item_type = '" . $this->get_type() . "'
- AND n.item_parent_id = " . (int) self::get_item_parent_id($post) . '
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
AND n.notification_read = 0
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_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 e9eb7bea21..0ed13f36fb 100644
--- a/phpBB/includes/notification/type/quote.php
+++ b/phpBB/includes/notification/type/quote.php
@@ -122,11 +122,11 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
$update_notifications = array();
$sql = 'SELECT n.*
- FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . " nt
- WHERE n.item_type = '" . $this->get_type() . "'
- AND n.item_parent_id = " . (int) self::get_item_parent_id($post) . '
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
AND n.notification_read = 0
- AND nt.notification_type = n.item_type
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
@@ -154,10 +154,10 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
{
$old_notifications = array();
$sql = 'SELECT n.user_id
- FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . " nt
- WHERE n.item_type = '" . $this->get_type() . "'
- AND n.item_id = " . self::get_item_id($post) . '
- AND nt.notification_type = n.item_type
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_id = ' . self::get_item_id($post) . '
+ AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
@@ -185,9 +185,9 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
// Remove the necessary notifications
if (!empty($remove_notifications))
{
- $sql = 'DELETE FROM ' . $this->notifications_table . "
- WHERE item_type = '" . $this->get_type() . "'
- AND item_id = " . self::get_item_id($post) . '
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $this->notification_type_id . '
+ AND item_id = ' . self::get_item_id($post) . '
AND ' . $this->db->sql_in_set('user_id', $remove_notifications);
$this->db->sql_query($sql);
}
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index c2c100e93e..ea7990da53 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -335,6 +335,10 @@ class phpbb_template_filter extends php_user_filter
return '<?php ' . $this->compile_tag_define($matches[2], false) . ' ?>';
break;
+ case 'ENDDEFINE':
+ return '<?php ' . $this->compile_tag_enddefine() . ' ?>';
+ break;
+
case 'INCLUDE':
return '<?php ' . $this->compile_tag_include($matches[2]) . ' ?>';
break;
@@ -839,6 +843,16 @@ class phpbb_template_filter extends php_user_filter
$match = array();
preg_match('#^((?:' . self::REGEX_NS . '\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (.*?))?$#', $tag_args, $match);
+ if (!empty($match[2]) && !isset($match[3]) && $op)
+ {
+ // DEFINE tag with ENDDEFINE
+ $array = "\$_tpldata['DEFINE']['.vars']";
+ $code = 'ob_start(); ';
+ $code .= "if (!isset($array)) { $array = array(); } ";
+ $code .= "{$array}[] = '{$match[2]}'";
+ return $code;
+ }
+
if (empty($match[2]) || (!isset($match[3]) && $op))
{
return '';
@@ -866,6 +880,20 @@ class phpbb_template_filter extends php_user_filter
}
/**
+ * Compile ENDDEFINE tag
+ *
+ * @return string compiled template code
+ */
+ private function compile_tag_enddefine()
+ {
+ $array = "\$_tpldata['DEFINE']['.vars']";
+ $code = "if (!isset($array) || !sizeof($array)) { trigger_error('ENDDEFINE tag without DEFINE in ' . basename(__FILE__), E_USER_ERROR); }";
+ $code .= "\$define_var = array_pop($array); ";
+ $code .= "\$_tpldata['DEFINE']['.'][\$define_var] = ob_get_clean();";
+ return $code;
+ }
+
+ /**
* Compile INCLUDE tag
*
* @param string $tag_args Expression given with INCLUDE in source template
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 50d13e00b1..a633ce448c 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -547,6 +547,9 @@ class ucp_groups
$submit_ary['avatar_width'] = 0;
$submit_ary['avatar_height'] = 0;
}
+
+ // Merge any avatars errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
if (!check_form_key('ucp_groups'))
@@ -672,8 +675,11 @@ class ucp_groups
}
}
- // Merge any avatars errors into the primary error array
- $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
+ if (!$update)
+ {
+ // Merge any avatars errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
+ }
$template->assign_vars(array(
'S_EDIT' => true,
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 18ca184c65..a64b8eeffc 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -642,17 +642,30 @@ END;;
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
- notification_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ notification_type_id INTEGER NOT NULL,
+ notification_type_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
notification_type_enabled INTEGER DEFAULT 1 NOT NULL
);;
-ALTER TABLE phpbb_notification_types ADD PRIMARY KEY (notification_type, notification_type_enabled);;
+ALTER TABLE phpbb_notification_types ADD PRIMARY KEY (notification_type_id);;
+
+CREATE UNIQUE INDEX phpbb_notification_types_type ON phpbb_notification_types(notification_type_name);;
+
+CREATE GENERATOR phpbb_notification_types_gen;;
+SET GENERATOR phpbb_notification_types_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_notification_types FOR phpbb_notification_types
+BEFORE INSERT
+AS
+BEGIN
+ NEW.notification_type_id = GEN_ID(phpbb_notification_types_gen, 1);
+END;;
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
notification_id INTEGER NOT NULL,
- item_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ notification_type_id INTEGER DEFAULT 0 NOT NULL,
item_id INTEGER DEFAULT 0 NOT NULL,
item_parent_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
@@ -663,7 +676,7 @@ CREATE TABLE phpbb_notifications (
ALTER TABLE phpbb_notifications ADD PRIMARY KEY (notification_id);;
-CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications(item_type, item_id);;
+CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications(notification_type_id, item_id);;
CREATE INDEX phpbb_notifications_user ON phpbb_notifications(user_id, notification_read);;
CREATE GENERATOR phpbb_notifications_gen;;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 3530f9cd25..8465dc4d72 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -793,7 +793,8 @@ GO
Table: 'phpbb_notification_types'
*/
CREATE TABLE [phpbb_notification_types] (
- [notification_type] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [notification_type_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [notification_type_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[notification_type_enabled] [int] DEFAULT (1) NOT NULL
) ON [PRIMARY]
GO
@@ -801,18 +802,20 @@ GO
ALTER TABLE [phpbb_notification_types] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_notification_types] PRIMARY KEY CLUSTERED
(
- [notification_type],
- [notification_type_enabled]
+ [notification_type_id]
) ON [PRIMARY]
GO
+CREATE UNIQUE INDEX [type] ON [phpbb_notification_types]([notification_type_name]) ON [PRIMARY]
+GO
+
/*
Table: 'phpbb_notifications'
*/
CREATE TABLE [phpbb_notifications] (
[notification_id] [int] IDENTITY (1, 1) NOT NULL ,
- [item_type] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [notification_type_id] [int] DEFAULT (0) NOT NULL ,
[item_id] [int] DEFAULT (0) NOT NULL ,
[item_parent_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
@@ -829,7 +832,7 @@ ALTER TABLE [phpbb_notifications] WITH NOCHECK ADD
) ON [PRIMARY]
GO
-CREATE INDEX [item_ident] ON [phpbb_notifications]([item_type], [item_id]) ON [PRIMARY]
+CREATE INDEX [item_ident] ON [phpbb_notifications]([notification_type_id], [item_id]) ON [PRIMARY]
GO
CREATE INDEX [user] ON [phpbb_notifications]([user_id], [notification_read]) ON [PRIMARY]
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 8c405677a8..37e4e66ad7 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -452,16 +452,18 @@ CREATE TABLE phpbb_modules (
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
- notification_type varbinary(255) DEFAULT '' NOT NULL,
+ notification_type_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ notification_type_name varbinary(255) DEFAULT '' NOT NULL,
notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (notification_type, notification_type_enabled)
+ PRIMARY KEY (notification_type_id),
+ UNIQUE type (notification_type_name)
);
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
- notification_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- item_type varbinary(255) DEFAULT '' NOT NULL,
+ notification_id int(10) UNSIGNED NOT NULL auto_increment,
+ notification_type_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -469,7 +471,7 @@ CREATE TABLE phpbb_notifications (
notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL,
notification_data blob NOT NULL,
PRIMARY KEY (notification_id),
- KEY item_ident (item_type, item_id),
+ KEY item_ident (notification_type_id, 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 cb259aa57d..ff0f315f93 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -452,16 +452,18 @@ CREATE TABLE phpbb_modules (
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
- notification_type varchar(255) DEFAULT '' NOT NULL,
+ notification_type_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ notification_type_name varchar(255) DEFAULT '' NOT NULL,
notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (notification_type, notification_type_enabled)
+ PRIMARY KEY (notification_type_id),
+ UNIQUE type (notification_type_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
- notification_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- item_type varchar(255) DEFAULT '' NOT NULL,
+ notification_id int(10) UNSIGNED NOT NULL auto_increment,
+ notification_type_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -469,7 +471,7 @@ CREATE TABLE phpbb_notifications (
notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL,
notification_data text NOT NULL,
PRIMARY KEY (notification_id),
- KEY item_ident (item_type, item_id),
+ KEY item_ident (notification_type_id, item_id),
KEY user (user_id, notification_read)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 35f05e34cd..11f245869d 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -870,19 +870,37 @@ END;
Table: 'phpbb_notification_types'
*/
CREATE TABLE phpbb_notification_types (
- notification_type varchar2(255) DEFAULT '' ,
+ notification_type_id number(4) NOT NULL,
+ notification_type_name varchar2(255) DEFAULT '' ,
notification_type_enabled number(1) DEFAULT '1' NOT NULL,
- CONSTRAINT pk_phpbb_notification_types PRIMARY KEY (notification_type, notification_type_enabled)
+ CONSTRAINT pk_phpbb_notification_types PRIMARY KEY (notification_type_id),
+ CONSTRAINT u_phpbb_type UNIQUE (notification_type_name)
)
/
+CREATE SEQUENCE phpbb_notification_types_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_notification_types
+BEFORE INSERT ON phpbb_notification_types
+FOR EACH ROW WHEN (
+ new.notification_type_id IS NULL OR new.notification_type_id = 0
+)
+BEGIN
+ SELECT phpbb_notification_types_seq.nextval
+ INTO :new.notification_type_id
+ FROM dual;
+END;
+/
+
+
/*
Table: 'phpbb_notifications'
*/
CREATE TABLE phpbb_notifications (
- notification_id number(8) NOT NULL,
- item_type varchar2(255) DEFAULT '' ,
+ notification_id number(10) NOT NULL,
+ notification_type_id number(4) DEFAULT '0' NOT NULL,
item_id number(8) DEFAULT '0' NOT NULL,
item_parent_id number(8) DEFAULT '0' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
@@ -893,7 +911,7 @@ CREATE TABLE phpbb_notifications (
)
/
-CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (item_type, item_id)
+CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id)
/
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read)
/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 6dc507b46d..fea5700167 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -623,12 +623,16 @@ CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id
/*
Table: 'phpbb_notification_types'
*/
+CREATE SEQUENCE phpbb_notification_types_seq;
+
CREATE TABLE phpbb_notification_types (
- notification_type varchar(255) DEFAULT '' NOT NULL,
+ notification_type_id INT2 DEFAULT nextval('phpbb_notification_types_seq'),
+ notification_type_name varchar(255) DEFAULT '' NOT NULL,
notification_type_enabled INT2 DEFAULT '1' NOT NULL CHECK (notification_type_enabled >= 0),
- PRIMARY KEY (notification_type, notification_type_enabled)
+ PRIMARY KEY (notification_type_id)
);
+CREATE UNIQUE INDEX phpbb_notification_types_type ON phpbb_notification_types (notification_type_name);
/*
Table: 'phpbb_notifications'
@@ -637,7 +641,7 @@ CREATE SEQUENCE phpbb_notifications_seq;
CREATE TABLE phpbb_notifications (
notification_id INT4 DEFAULT nextval('phpbb_notifications_seq'),
- item_type varchar(255) DEFAULT '' NOT NULL,
+ notification_type_id INT2 DEFAULT '0' NOT NULL CHECK (notification_type_id >= 0),
item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0),
item_parent_id INT4 DEFAULT '0' NOT NULL CHECK (item_parent_id >= 0),
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
@@ -647,7 +651,7 @@ CREATE TABLE phpbb_notifications (
PRIMARY KEY (notification_id)
);
-CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (item_type, item_id);
+CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id);
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
/*
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index ccb67ad46f..02ffb9a857 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -439,16 +439,17 @@ CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
- notification_type varchar(255) NOT NULL DEFAULT '',
- notification_type_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1',
- PRIMARY KEY (notification_type, notification_type_enabled)
+ notification_type_id INTEGER PRIMARY KEY NOT NULL ,
+ notification_type_name varchar(255) NOT NULL DEFAULT '',
+ notification_type_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
+CREATE UNIQUE INDEX phpbb_notification_types_type ON phpbb_notification_types (notification_type_name);
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
notification_id INTEGER PRIMARY KEY NOT NULL ,
- item_type varchar(255) NOT NULL DEFAULT '',
+ notification_type_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
item_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
item_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
@@ -457,7 +458,7 @@ CREATE TABLE phpbb_notifications (
notification_data text(65535) NOT NULL DEFAULT ''
);
-CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (item_type, item_id);
+CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id);
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
# Table: 'phpbb_poll_options'
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index c1d6ef4af3..47a77d1dee 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -424,6 +424,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TOPIC_APPROVED' => 'Your topic "%2$s" in the forum "%3$s" was approved.',
'NOTIFICATION_TOPIC_DISAPPROVED' => 'Your topic "%1$s" was disapproved for reason: "%2$s".',
'NOTIFICATION_TOPIC_IN_QUEUE' => 'A new topic titled "%2$s" was posted by %1$s and needs approval.',
+ 'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.',
'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.',
'NOTIFY_ADMIN_EMAIL' => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',
'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.',
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 19fe5ca4d2..ef6b7de418 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -3,6 +3,14 @@
*/
/**
+* Find a member
+*/
+function find_username(url) {
+ popup(url, 760, 570, '_usersearch');
+ return false;
+}
+
+/**
* Window popup
*/
function popup(url, width, height, name) {
@@ -20,7 +28,7 @@ function popup(url, width, height, name) {
function jumpto() {
var page = prompt(jump_page, on_page);
- if (page !== null && !isNaN(page) && page === Math.floor(page) && page > 0) {
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
if (base_url.indexOf('?') === -1) {
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
} else {
@@ -356,41 +364,24 @@ function submit_default_button(event, selector, class_name) {
* The non-jQuery code is a mimick of the jQuery code ;)
*/
function apply_onkeypress_event() {
- // jQuery code in case jQuery is used
- if (jquery_present) {
- jQuery('form input[type=text], form input[type=password]').live('keypress', function (e) {
- var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
-
- if (!default_button || default_button.length <= 0) {
- return true;
- }
-
- if (phpbb_check_key(e)) {
- return true;
- }
-
- if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
- default_button.click();
- return false;
- }
+ jQuery('form input[type=text], form input[type=password]').live('keypress', function (e) {
+ var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
+ if (!default_button || default_button.length <= 0) {
return true;
- });
-
- return;
- }
+ }
- var input_tags = document.getElementsByTagName('input');
+ if (phpbb_check_key(e)) {
+ return true;
+ }
- for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i]) {
- if (element.type === 'text' || element.type === 'password') {
- // onkeydown is possible too
- element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
+ default_button.click();
+ return false;
}
- }
+
+ return true;
+ });
}
-/**
-* Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;)
-*/
-var jquery_present = typeof jQuery === 'function';
+jQuery(document).ready(apply_onkeypress_event);
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index 539ed047c9..0c67de76ec 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -13,7 +13,7 @@
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></dt>
+ <dt><div class="list-inner"><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></div></dt>
<dd class="topics">{L_TOPICS}</dd>
<dd class="posts">{L_POSTS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -27,20 +27,22 @@
<li class="row">
<dl class="icon {forumrow.FORUM_IMG_STYLE}">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
- <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
- <!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
- <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
- {forumrow.FORUM_DESC}
- <!-- IF forumrow.MODERATORS -->
- <br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}
- <!-- ENDIF -->
- <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
- <br /><strong>{forumrow.L_SUBFORUM_STR}</strong>
- <!-- BEGIN subforum -->
- <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF -->
- <!-- END subforum -->
- <!-- ENDIF -->
+ <!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
+ <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
+ {forumrow.FORUM_DESC}
+ <!-- IF forumrow.MODERATORS -->
+ <br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}
+ <!-- ENDIF -->
+ <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
+ <br /><strong>{forumrow.L_SUBFORUM_STR}</strong>
+ <!-- BEGIN subforum -->
+ <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF -->
+ <!-- END subforum -->
+ <!-- ENDIF -->
+ </div>
</dt>
<!-- IF forumrow.CLICKS -->
<dd class="redirect"><span>{L_REDIRECTS}{L_COLON} {forumrow.CLICKS}</span></dd>
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index e559f178f2..ac686932b7 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -24,22 +24,24 @@
<!-- ENDIF -->
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist<!-- IF S_MERGE_SELECT --> missing-column<!-- ENDIF -->">
<li class="header">
<dl class="icon">
- <dt>{L_TOPICS}</dt>
+ <dt><div class="list-inner">{L_TOPICS}</div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<!-- IF not S_MERGE_SELECT --><dd class="mark">{L_MARK}</dd><!-- ENDIF -->
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist<!-- IF S_MERGE_SELECT --> missing-column<!-- ENDIF -->">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <div class="list-inner">
+
<!-- IF topicrow.S_SELECT_TOPIC --><a href="{topicrow.U_SELECT_TOPIC}" class="topictitle">[ {L_SELECT_MERGE} ]</a>&nbsp;&nbsp; <!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
@@ -60,7 +62,10 @@
</ul>
</div>
<!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME} </dt>
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+
+ </div>
+ </dt>
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}<br />{topicrow.LAST_POST_TIME}</span>
</dd>
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html
index 886a4b784b..e88b7c62df 100644
--- a/phpBB/styles/prosilver/template/mcp_front.html
+++ b/phpBB/styles/prosilver/template/mcp_front.html
@@ -13,22 +13,24 @@
<p>{L_UNAPPROVED_TOTAL}</p>
<!-- IF .unapproved -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_TOPIC} &amp; {L_FORUM}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN unapproved -->
<li class="row<!-- IF unapproved.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
- {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} &raquo; {unapproved.POST_TIME}
+ <div class="list-inner">
+ <a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
+ {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} &raquo; {unapproved.POST_TIME}
+ </div>
</dt>
<dd class="moderation"><span>
{L_TOPIC}{L_COLON} <a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a> [<a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a>]<br />
@@ -65,22 +67,24 @@
<p>{L_REPORTS_TOTAL}</p>
<!-- IF .report -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER} &amp; {L_FORUM}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN report -->
<li class="row<!-- IF report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{report.U_POST_DETAILS}#reports" class="topictitle">{report.SUBJECT}</a> {report.ATTACH_ICON_IMG}<br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} &raquo; {report.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{report.U_POST_DETAILS}#reports" class="topictitle">{report.SUBJECT}</a> {report.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} &raquo; {report.POST_TIME}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} {report.REPORT_TIME}<br />
@@ -104,23 +108,25 @@
<p>{L_PM_REPORTS_TOTAL}</p>
<!-- IF .pm_report -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN pm_report -->
<li class="row<!-- IF pm_report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{pm_report.U_PM_DETAILS}" class="topictitle">{pm_report.PM_SUBJECT}</a> {pm_report.ATTACH_ICON_IMG}<br />
- <span>{L_MESSAGE_BY_AUTHOR} {pm_report.PM_AUTHOR_FULL} &raquo; {pm_report.PM_TIME}</span><br />
- <span>{L_MESSAGE_TO} {pm_report.RECIPIENTS}</span>
+ <div class="list-inner">
+ <a href="{pm_report.U_PM_DETAILS}" class="topictitle">{pm_report.PM_SUBJECT}</a> {pm_report.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {pm_report.PM_AUTHOR_FULL} &raquo; {pm_report.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {pm_report.RECIPIENTS}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{L_REPORTED} {L_POST_BY_AUTHOR} {pm_report.REPORTER_FULL} {L_REPORTED_ON_DATE} {pm_report.REPORT_TIME}</span>
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
index 847151a01e..4d20804e66 100644
--- a/phpBB/styles/prosilver/template/mcp_queue.html
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -26,16 +26,16 @@
<!-- ENDIF -->
</li>
</ul>
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt><!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --></dt>
+ <dt><div class="list-inner"><!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --></div></dt>
<dd class="moderation"><span><!-- IF not S_TOPICS -->{L_TOPIC} &amp; <!-- ENDIF -->{L_FORUM}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN postrow -->
@@ -46,8 +46,10 @@
<li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ </div>
</dt>
<dd class="moderation">
<span>
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html
index ea9a4edd6f..9a70b4a62a 100644
--- a/phpBB/styles/prosilver/template/mcp_reports.html
+++ b/phpBB/styles/prosilver/template/mcp_reports.html
@@ -28,33 +28,37 @@
<!-- ENDIF -->
</li>
</ul>
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER}<!-- IF not S_PM --> &amp; {L_FORUM}<!-- ENDIF --></span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN postrow -->
<li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<!-- IF S_PM -->
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.PM_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
- <span>{L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} &raquo; {postrow.PM_TIME}</span><br />
- <span>{L_MESSAGE_TO} {postrow.RECIPIENTS}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.PM_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} &raquo; {postrow.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {postrow.RECIPIENTS}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}</span>
</dd>
<!-- ELSE -->
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}<br />
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index bf5ce30f37..f2113b73ef 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -53,6 +53,7 @@
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS template/ajax.js -->
{SCRIPTS}
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index f56d11e554..1a068c4191 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -41,15 +41,6 @@
<!-- ENDIF -->
/**
- * Find a member
- */
- function find_username(url)
- {
- popup(url, 760, 570, '_usersearch');
- return false;
- }
-
- /**
* New function for handling multiple calls to window.onload and window.unload by pentapenguin
*/
window.onload = function()
@@ -70,7 +61,6 @@
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 8156968098..83dc6111dd 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -1,9 +1,3 @@
-<script type="text/javascript">
-// <![CDATA[
- onload_functions.push(apply_onkeypress_event);
-// ]]>
-</script>
-
<fieldset class="fields1">
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index 6e63a65993..34fbb4cb12 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -48,7 +48,7 @@
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt>{L_TOPICS}</dt>
+ <dt><div class="list-inner">{L_TOPICS}</div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="views">{L_VIEWS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -61,25 +61,29 @@
<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon {searchresults.TOPIC_IMG_STYLE}">
<dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
- <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
- <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
- <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF .searchresults.pagination -->
- <div class="pagination">
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF searchresults.pagination.S_IS_PREV -->
- <!-- ELSEIF searchresults.pagination.S_IS_CURRENT --><li class="active"><span>{searchresults.pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF searchresults.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF searchresults.pagination.S_IS_NEXT -->
- <!-- ELSE --><li><a href="{searchresults.pagination.PAGE_URL}">{searchresults.pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+ <div class="list-inner">
+
+ <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
+ <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
+ <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .searchresults.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF searchresults.pagination.S_IS_PREV -->
+ <!-- ELSEIF searchresults.pagination.S_IS_CURRENT --><li class="active"><span>{searchresults.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF searchresults.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF searchresults.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{searchresults.pagination.PAGE_URL}">{searchresults.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+
</div>
- <!-- ENDIF -->
- {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
</dt>
<dd class="posts">{searchresults.TOPIC_REPLIES}</dd>
<dd class="views">{searchresults.TOPIC_VIEWS}</dd>
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
index ec189304fc..144ae8e462 100644
--- a/phpBB/styles/prosilver/template/simple_footer.html
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -8,6 +8,7 @@
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
{SCRIPTS}
<!-- EVENT simple_footer_after -->
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 88b2c0c025..667698c371 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -40,7 +40,6 @@
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script>
<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index 478b14ab86..6e1bdfdd57 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -24,7 +24,7 @@
<ul class="topiclist">
<li class="header">
<dl>
- <dt style="width: 40%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
+ <dt><div class="list-inner"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></div></dt>
<dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd>
<dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd>
<dd class="mark">{L_MARK}</dd>
@@ -36,8 +36,12 @@
<!-- BEGIN attachrow -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt style="width: 40%"><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
- <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}{L_COLON} <!-- ELSE -->{L_TOPIC}{L_COLON} <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt>
+ <dt>
+ <div class="list-inner">
+ <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
+ <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}{L_COLON} <!-- ELSE -->{L_TOPIC}{L_COLON} <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a>
+ </div>
+ </dt>
<dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
<dd class="time"><span>{attachrow.POST_TIME}</span></dd>
<dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd>
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html
index f6fcfa043d..74cb9f4579 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_manage.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html
@@ -6,19 +6,18 @@
<div class="panel">
<div class="inner">
-
+
+ <!-- IF S_ERROR -->
+ <fieldset>
+ <p class="error">{ERROR_MSG}</p>
+ </fieldset>
+ <!-- ENDIF -->
+
<p>{L_GROUPS_EXPLAIN}</p>
<!-- IF S_EDIT -->
<h3>{L_GROUP_DETAILS}</h3>
-
- <!-- IF S_ERROR -->
- <div class="errorbox">
- <h3>{L_WARNING}</h3>
- <p>{ERROR_MSG}</p>
- </div>
- <!-- ENDIF -->
-
+
<fieldset>
<dl>
<dt><label for="group_name">{L_GROUP_NAME}{L_COLON}</label></dt>
@@ -207,21 +206,25 @@
<!-- ELSE -->
<!-- IF .leader -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_LEADER}</dt>
+ <dt><div class="list-inner">{L_GROUP_LEADER}</div></dt>
<dd class="info"><span>{L_OPTIONS}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN leader -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><a href="{leader.U_EDIT}" class="topictitle"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
- <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF --></dt>
+ <dt>
+ <div class="list-inner">
+ <a href="{leader.U_EDIT}" class="topictitle"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
+ </div>
+ </dt>
<dd class="option"><span><a href="{leader.U_EDIT}" >{L_EDIT}</a></span></dd>
<dd class="option"><span><a href="{leader.U_LIST}">{L_GROUP_LIST}</a></span></dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html
index bf266208f2..d7df3b02c2 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_membership.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html
@@ -10,15 +10,15 @@
<p>{L_GROUPS_EXPLAIN}</p>
<!-- DEFINE $SHOW_BUTTONS = 0 -->
<!-- IF .leader -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_LEADER}</dt>
+ <dt><div class="list-inner">{L_GROUP_LEADER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN leader -->
<!-- IF not leader.GROUP_SPECIAL -->
@@ -26,10 +26,13 @@
<!-- ENDIF -->
<li class="row<!-- IF leader.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /> <!-- ENDIF -->
- <a href="{leader.U_VIEW_GROUP}" class="forumtitle"<!-- IF leader.GROUP_COLOUR --> style="color:#{leader.GROUP_COLOUR}"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
- <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not leader.GROUP_SPECIAL --><br /><i>{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ <dt>
+ <div class="list-inner">
+ <!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{leader.U_VIEW_GROUP}" class="forumtitle"<!-- IF leader.GROUP_COLOUR --> style="color:#{leader.GROUP_COLOUR}"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not leader.GROUP_SPECIAL --><br /><i>{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{leader.GROUP_ID}" <!-- IF leader.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
@@ -39,15 +42,15 @@
<!-- ENDIF -->
<!-- IF .member -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_MEMBER}</dt>
+ <dt><div class="list-inner">{L_GROUP_MEMBER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN member -->
<!-- IF not member.GROUP_SPECIAL -->
@@ -55,10 +58,13 @@
<!-- ENDIF -->
<li class="row<!-- IF member.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /> <!-- ENDIF -->
- <a href="{member.U_VIEW_GROUP}" class="forumtitle"<!-- IF member.GROUP_COLOUR --> style="color:#{member.GROUP_COLOUR}"<!-- ENDIF -->>{member.GROUP_NAME}</a>
- <!-- IF member.GROUP_DESC --><br />{member.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not member.GROUP_SPECIAL --><br /><i>{member.GROUP_STATUS}</i><!-- ENDIF -->
+ <dt>
+ <div class="list-inner">
+ <!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{member.U_VIEW_GROUP}" class="forumtitle"<!-- IF member.GROUP_COLOUR --> style="color:#{member.GROUP_COLOUR}"<!-- ENDIF -->>{member.GROUP_NAME}</a>
+ <!-- IF member.GROUP_DESC --><br />{member.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not member.GROUP_SPECIAL --><br /><i>{member.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{member.GROUP_ID}" <!-- IF member.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
@@ -72,15 +78,15 @@
<!-- IF .pending -->
<div class="panel">
<div class="inner">
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_PENDING}</dt>
+ <dt><div class="list-inner">{L_GROUP_PENDING}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN pending -->
<!-- IF not pending.GROUP_SPECIAL -->
@@ -89,9 +95,11 @@
<li class="row<!-- IF pending.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{pending.U_VIEW_GROUP}" class="forumtitle"<!-- IF pending.GROUP_COLOUR --> style="color:#{pending.GROUP_COLOUR}"<!-- ENDIF -->>{pending.GROUP_NAME}</a>
- <!-- IF pending.GROUP_DESC --><br />{pending.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not pending.GROUP_SPECIAL --><br /><i>{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{pending.U_VIEW_GROUP}" class="forumtitle"<!-- IF pending.GROUP_COLOUR --> style="color:#{pending.GROUP_COLOUR}"<!-- ENDIF -->>{pending.GROUP_NAME}</a>
+ <!-- IF pending.GROUP_DESC --><br />{pending.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not pending.GROUP_SPECIAL --><br /><i>{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{pending.GROUP_ID}" <!-- IF pending.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
@@ -104,15 +112,15 @@
<!-- IF .nonmember -->
<div class="panel">
<div class="inner">
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_NONMEMBER}</dt>
+ <dt><div class="list-inner">{L_GROUP_NONMEMBER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN nonmember -->
<!-- IF nonmember.S_CAN_JOIN -->
@@ -121,9 +129,11 @@
<li class="row<!-- IF nonmember.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{nonmember.U_VIEW_GROUP}" class="forumtitle"<!-- IF nonmember.GROUP_COLOUR --> style="color:#{nonmember.GROUP_COLOUR}"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a>
- <!-- IF nonmember.GROUP_DESC --><br />{nonmember.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not nonmember.GROUP_SPECIAL --><br /><i>{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{nonmember.U_VIEW_GROUP}" class="forumtitle"<!-- IF nonmember.GROUP_COLOUR --> style="color:#{nonmember.GROUP_COLOUR}"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a>
+ <!-- IF nonmember.GROUP_DESC --><br />{nonmember.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not nonmember.GROUP_SPECIAL --><br /><i>{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{nonmember.GROUP_ID}" <!-- IF not nonmember.S_CAN_JOIN -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
index 8707a749c1..017fadad77 100644
--- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -14,43 +14,48 @@
<!-- ELSE -->
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_BOOKMARKS}</dt>
+ <dt><div class="list-inner">{L_BOOKMARKS}</div></dt>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ <dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<!-- IF topicrow.S_DELETED_TOPIC -->
- <dl><dt><strong>{L_DELETED_TOPIC}</strong></dt>
- <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
+ <dl>
+ <dt><div class="list-inner"><strong>{L_DELETED_TOPIC}</strong></div></dt>
+ <dd class="lastpost"><span>&nbsp;</span></dd>
+ <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
</dl>
<!-- ELSE -->
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF .topicrow.pagination -->
- <div class="pagination">
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF topicrow.pagination.S_IS_PREV -->
- <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
- <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</div>
- <!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</dt>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html
index a99c52cbfc..723186e20c 100644
--- a/phpBB/styles/prosilver/template/ucp_main_drafts.html
+++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html
@@ -24,26 +24,28 @@
<!-- ELSE -->
<!-- IF .draftrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt>{L_DRAFT_TITLE}</dt>
+ <dt><div class="list-inner">{L_DRAFT_TITLE}</div></dt>
<dd class="info"><span>{L_SAVE_DATE}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN draftrow -->
<li class="row<!-- IF draftrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a class="topictitle" href="{draftrow.U_VIEW_EDIT}">{draftrow.DRAFT_SUBJECT}</a><br />
- <!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSEIF S_PRIVMSGS -->
- <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF -->
+ <div class="list-inner">
+ <a class="topictitle" href="{draftrow.U_VIEW_EDIT}">{draftrow.DRAFT_SUBJECT}</a><br />
+ <!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF S_PRIVMSGS -->
+ <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF -->
+ </div>
</dt>
<dd class="info"><span>{draftrow.DATE}<br /><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a> &bull; <!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></span></dd>
<dd class="mark"><input type="checkbox" name="d[{draftrow.DRAFT_ID}]" id="d{draftrow.DRAFT_ID}" /></dd>
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
index b92ca7c8e2..1e26e43772 100644
--- a/phpBB/styles/prosilver/template/ucp_main_front.html
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -10,27 +10,29 @@
<!-- IF .topicrow -->
<h3>{L_IMPORTANT_NEWS}</h3>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
- <!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
- <!-- IF .topicrow.pagination -->
- <div class="pagination">
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF topicrow.pagination.S_IS_PREV -->
- <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
- <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</div>
- <!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</dt>
<dd class="lastpost"><span>{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index d5097a2191..90fa76cefc 100755
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -9,21 +9,21 @@
<p>{L_WATCHED_EXPLAIN}</p>
<!-- IF .forumrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_WATCHED_FORUMS}</dt>
- <dd class="lastpost">{L_LAST_POST}</dd>
+ <dt><div class="list-inner">{L_WATCHED_FORUMS}</div></dt>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN forumrow -->
<li class="row<!-- IF forumrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon {forumrow.FORUM_IMG_STYLE}">
- <dt><a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />{forumrow.FORUM_DESC}</dt>
+ <dt><div class="list-inner"><a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />{forumrow.FORUM_DESC}</div></dt>
<dd class="lastpost"><!-- IF forumrow.LAST_POST_TIME --><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{forumrow.LAST_POST_TIME}</span>
<!-- ELSE -->{L_NO_POSTS}<br />&nbsp;<!-- ENDIF -->
@@ -46,39 +46,41 @@
<br />
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_WATCHED_TOPICS}</dt>
- <dd class="lastpost">{L_LAST_POST}</dd>
+ <dt><div class="list-inner">{L_WATCHED_TOPICS}</div></dt>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF .topicrow.pagination -->
- <div class="pagination">
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF topicrow.pagination.S_IS_PREV -->
- <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
- <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</div>
- <!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</dt>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html
index 723609e460..6a1d3b8de4 100644
--- a/phpBB/styles/prosilver/template/ucp_notifications.html
+++ b/phpBB/styles/prosilver/template/ucp_notifications.html
@@ -55,30 +55,32 @@
<!-- ENDIF -->
<div class="notification_list">
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_NOTIFICATIONS}</dt>
+ <dt><div class="list-inner">{L_NOTIFICATIONS}</div></dt>
<dd class="mark">{L_MARK_READ}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN notification_list -->
<li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF -->">
<dl>
<dt>
- <!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
- {notification_list.AVATAR}
- <div class="notifications">
- <p class="notifications_title">{notification_list.FORMATTED_TITLE}</p>
- <p class="notifications_time">&raquo; {notification_list.TIME}</p>
+ <div class="list-inner">
+ <!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
+ {notification_list.AVATAR}
+ <div class="notifications">
+ <p class="notifications_title">{notification_list.FORMATTED_TITLE}</p>
+ <p class="notifications_time">&raquo; {notification_list.TIME}</p>
- <!-- IF not notification_list.URL and notification_list.U_MARK_READ -->
- <p><a href="{notification_list.U_MARK_READ}">{L_MARK_READ}</a></p>
- <!-- ENDIF -->
- </div>
- <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ <!-- IF not notification_list.URL and notification_list.U_MARK_READ -->
+ <p><a href="{notification_list.U_MARK_READ}">{L_MARK_READ}</a></p>
+ <!-- ENDIF -->
+ </div>
+ <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark">&nbsp;<!-- IF notification_list.UNREAD --><input type="checkbox" name="mark[]" value="{notification_list.NOTIFICATION_ID}" /> <dfn>{L_MARK_READ}</dfn><!-- ENDIF -->&nbsp;</dd>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index 96668284eb..00b735fae6 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -45,20 +45,21 @@
<!-- ENDIF -->
<!-- IF .messagerow -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_MESSAGE}</dt>
+ <dt><div class="list-inner">{L_MESSAGE}</div></dt>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist pmlist">
+ <ul class="topiclist cplist pmlist two-columns">
<!-- BEGIN messagerow -->
<li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
<dl class="icon {messagerow.FOLDER_IMG_STYLE}">
<dt<!-- IF messagerow.PM_ICON_URL and S_PM_ICONS --> style="background-image: url({messagerow.PM_ICON_URL}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <div class="list-inner">
<!-- IF messagerow.S_PM_DELETED -->
<a href="{messagerow.U_REMOVE_PM}" class="topictitle">{L_DELETE_MESSAGE}</a><br />
@@ -72,6 +73,8 @@
<!-- IF messagerow.S_PM_REPORTED --><a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> {messagerow.ATTACH_ICON_IMG}<br />
<!-- IF S_SHOW_RECIPIENTS -->{L_MESSAGE_TO} {messagerow.RECIPIENTS}<!-- ELSE -->{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} &raquo; {messagerow.SENT_TIME}<!-- ENDIF -->
+
+ </div>
</dt>
<!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}{L_COLON} {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
<!-- IF S_UNREAD --><dd class="info"><!-- IF messagerow.FOLDER --><a href="{messagerow.U_FOLDER}">{messagerow.FOLDER}</a><!-- ELSE -->{L_UNKNOWN_FOLDER}<!-- ENDIF --></dd><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index db95e5ba13..779c1fc2a3 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -10,11 +10,6 @@
document.forms['register'].change_lang.value = lang_iso;
document.forms['register'].submit.click();
}
-
- <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
- onload_functions.push(apply_onkeypress_event);
- <!-- ENDIF -->
-
// ]]>
</script>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 38566dece0..22c8796ebc 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -130,7 +130,7 @@
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt<!-- IF S_DISPLAY_ACTIVE --> id="active_topics"<!-- ENDIF -->><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
+ <dt<!-- IF S_DISPLAY_ACTIVE --> id="active_topics"<!-- ENDIF -->><div class="list-inner"><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="views">{L_VIEWS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -142,25 +142,28 @@
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
- <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF .topicrow.pagination -->
- <div class="pagination">
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF topicrow.pagination.S_IS_PREV -->
- <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
- <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
- <!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
- <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</dt>
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 5cff0a811b..f617428565 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -268,8 +268,45 @@
left: 0;
}
-.rtl ul.topiclist dt {
+.rtl ul.topiclist dt, .rtl li.header dt {
float: right;
+ margin-right: 0;
+ margin-left: -410px;
+}
+
+.rtl ul.topiclist.missing-column dt {
+ margin-right: 0;
+ margin-left: -330px;
+}
+
+.rtl ul.topiclist.two-long-columns dt {
+ margin-right: 0;
+ margin-left: -250px;
+}
+
+.rtl ul.topiclist.two-columns dt {
+ margin-right: 0;
+ margin-left: -80px;
+}
+
+.rtl ul.topiclist dt .list-inner {
+ margin-right: 0;
+ margin-left: 410px;
+}
+
+.rtl ul.topiclist.missing-column dt .list-inner {
+ margin-right: 0;
+ margin-left: 330px;
+}
+
+.rtl ul.topiclist.two-long-columns dt .list-inner {
+ margin-right: 0;
+ margin-left: 250px;
+}
+
+.rtl ul.topiclist.two-columns dt .list-inner {
+ margin-right: 0;
+ margin-left: 80px;
}
.rtl ul.topiclist dl {
@@ -308,31 +345,24 @@
background-position: 99.5% 50%;
}
-.rtl li.header dl.icon dt {
+.rtl li.header dl.icon dt .list-inner {
/* Tweak for headers alignment when folder icon used */
padding-right: 0;
padding-left: 50px;
}
.rtl dl.icon dt {
- padding-left: 0;
- padding-right: 45px; /* Space for folder icon */
background-position: 99.5% 95%; /* Position of topic icon */
}
-.rtl dd.lastpost span, .rtl ul.topiclist dd.searchby span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+.rtl dl.icon dt .list-inner {
padding-left: 0;
- padding-right: 5px;
-}
-
-.rtl dd.mark {
- float: left !important;
+ padding-right: 45px; /* Space for folder icon */
}
-.rtl ul.topiclist dd.searchextra {
- margin-left: 0;
- margin-right: 5px;
- border-right: none;
+.rtl dd.lastpost span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+ padding-left: 0;
+ padding-right: 5px;
}
/* Post body styles
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index baff88d6b7..a2fe112b45 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -406,11 +406,6 @@ li.header dt, li.header dd {
color: #FFFFFF;
}
-/* Forum list column styles */
-ul.topiclist dd.searchextra {
- color: #333333;
-}
-
/* Post body styles
----------------------------------------*/
.postbody {
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index bf9e587ce1..b6db4c7230 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -25,20 +25,53 @@ ul.topiclist li.row dl {
padding: 2px 0;
}
-ul.topiclist dt {
+ul.topiclist dt, ul.topiclist dd {
display: block;
float: left;
- width: 50%;
+}
+
+ul.topiclist dt {
+ width: 100%;
+ margin-right: -410px;
font-size: 1.1em;
+}
+
+ul.topiclist.missing-column dt {
+ margin-right: -330px;
+}
+
+ul.topiclist.two-long-columns dt {
+ margin-right: -250px;
+}
+
+ul.topiclist.two-columns dt {
+ margin-right: -80px;
+}
+
+ul.topiclist dt .list-inner {
+ margin-right: 410px;
padding-left: 5px;
padding-right: 5px;
}
+ul.topiclist.missing-column dt .list-inner {
+ margin-right: 330px;
+}
+
+ul.topiclist.two-long-columns dt .list-inner {
+ margin-right: 250px;
+}
+
+ul.topiclist.two-columns dt .list-inner {
+ margin-right: 80px;
+}
+
ul.topiclist dd {
- display: block;
- float: left;
border-left: 1px solid transparent;
padding: 4px 0;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
ul.topiclist dfn {
@@ -85,17 +118,26 @@ li.header dt, li.header dd {
li.header dt {
font-weight: bold;
+ width: 100%;
+ margin-right: -410px;
+}
+
+li.header dt .list-inner {
+ margin-right: 410px;
}
li.header dd {
- margin-left: 1px;
+ padding-left: 1px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
-li.header dl.icon {
+li.header dl.icon dt, li.header dl.icon dd {
min-height: 0;
}
-li.header dl.icon dt {
+li.header dl.icon dt .list-inner {
/* Tweak for headers alignment when folder icon used */
padding-left: 0;
padding-right: 50px;
@@ -103,19 +145,25 @@ li.header dl.icon dt {
/* Forum list column styles */
dl.icon {
- min-height: 35px;
background-position: 10px 50%; /* Position of folder icon */
background-repeat: no-repeat;
}
dl.icon dt {
- padding-left: 45px; /* Space for folder icon */
background-repeat: no-repeat;
background-position: 5px 95%; /* Position of topic icon */
}
-dd.posts, dd.topics, dd.views {
- width: 8%;
+dl.icon dt .list-inner {
+ padding-left: 45px; /* Space for folder icon */
+}
+
+dl.icon dt, dl.icon dd {
+ min-height: 40px;
+}
+
+dd.posts, dd.topics, dd.views, dd.extra, dd.mark {
+ width: 80px;
text-align: center;
line-height: 2.2em;
font-size: 1.2em;
@@ -133,73 +181,35 @@ dl.icon dt li {
list-style-type: inherit;
}
-dd.lastpost {
- width: 25%;
+dd.lastpost, dd.redirect, dd.moderation, dd.time, dd.info {
+ width: 250px;
font-size: 1.1em;
}
dd.redirect {
- font-size: 1.1em;
line-height: 2.5em;
}
-dd.moderation {
- font-size: 1.1em;
-}
-
-dd.lastpost span, ul.topiclist dd.searchby span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
- display: block;
- padding-left: 5px;
-}
-
dd.time {
- width: auto;
line-height: 200%;
- font-size: 1.1em;
}
-dd.extra {
- width: 12%;
- line-height: 200%;
- text-align: center;
- font-size: 1.1em;
+dd.lastpost span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
+ display: block;
+ padding-left: 5px;
}
-dd.mark {
- float: right !important;
- width: 9%;
- text-align: center;
+dd.extra, dd.mark {
line-height: 200%;
- font-size: 1.2em;
-}
-
-dd.info {
- width: 30%;
}
dd.option {
- width: 15%;
+ width: 125px;
line-height: 200%;
text-align: center;
font-size: 1.1em;
}
-dd.searchby {
- width: 47%;
- font-size: 1.1em;
- line-height: 1em;
-}
-
-ul.topiclist dd.searchextra {
- margin-left: 5px;
- padding: 0.2em 0;
- font-size: 1.1em;
- border-left: none;
- clear: both;
- width: 98%;
- overflow: hidden;
-}
-
/* Container for post/reply buttons and pagination */
.topic-actions {
margin-bottom: 3px;
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index cd6865f66f..89510aa32f 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -29,4 +29,21 @@ dl.details dd {
/* Headerbar height fix for IE7 */
#site-description p {
*margin-bottom: 1.0em;
-} \ No newline at end of file
+}
+
+/* Forum list column styles for IE7 */
+dl.icon dt, dl.icon dd {
+ *min-height: 32px;
+}
+
+dd.posts, dd.topics, dd.views, dd.extra, dd.mark {
+ *width: 79px;
+}
+
+dd.lastpost, dd.redirect, dd.moderation, dd.time, dd.info {
+ *width: 249px;
+}
+
+dd.option {
+ *width: 124px;
+}
diff --git a/tests/notification/fixtures/submit_post_bookmark.xml b/tests/notification/fixtures/submit_post_bookmark.xml
index b669d4c1b6..d4bf8df73f 100644
--- a/tests/notification/fixtures/submit_post_bookmark.xml
+++ b/tests/notification/fixtures/submit_post_bookmark.xml
@@ -29,14 +29,14 @@
</row>
</table>
<table name="phpbb_notifications">
- <column>item_type</column>
+ <column>notification_type_id</column>
<column>user_id</column>
<column>item_id</column>
<column>item_parent_id</column>
<column>notification_read</column>
<column>notification_data</column>
<row>
- <value>bookmark</value>
+ <value>1</value>
<value>5</value>
<value>1</value>
<value>1</value>
@@ -45,9 +45,11 @@
</row>
</table>
<table name="phpbb_notification_types">
- <column>notification_type</column>
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
<column>notification_type_enabled</column>
<row>
+ <value>1</value>
<value>bookmark</value>
<value>1</value>
</row>
diff --git a/tests/notification/fixtures/submit_post_post.xml b/tests/notification/fixtures/submit_post_post.xml
index cead4f7c26..b0ffa042c5 100644
--- a/tests/notification/fixtures/submit_post_post.xml
+++ b/tests/notification/fixtures/submit_post_post.xml
@@ -21,14 +21,14 @@
</row>
</table>
<table name="phpbb_notifications">
- <column>item_type</column>
+ <column>notification_type_id</column>
<column>user_id</column>
<column>item_id</column>
<column>item_parent_id</column>
<column>notification_read</column>
<column>notification_data</column>
<row>
- <value>post</value>
+ <value>1</value>
<value>5</value>
<value>1</value>
<value>1</value>
@@ -36,7 +36,7 @@
<value></value>
</row>
<row>
- <value>post</value>
+ <value>1</value>
<value>8</value>
<value>1</value>
<value>1</value>
@@ -45,9 +45,11 @@
</row>
</table>
<table name="phpbb_notification_types">
- <column>notification_type</column>
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
<column>notification_type_enabled</column>
<row>
+ <value>1</value>
<value>post</value>
<value>1</value>
</row>
diff --git a/tests/notification/fixtures/submit_post_post_in_queue.xml b/tests/notification/fixtures/submit_post_post_in_queue.xml
index eedcebf71d..090e90ea49 100644
--- a/tests/notification/fixtures/submit_post_post_in_queue.xml
+++ b/tests/notification/fixtures/submit_post_post_in_queue.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<table name="phpbb_notifications">
- <column>item_type</column>
+ <column>notification_type_id</column>
<column>user_id</column>
<column>item_id</column>
<column>item_parent_id</column>
<column>notification_read</column>
<column>notification_data</column>
<row>
- <value>post_in_queue</value>
+ <value>1</value>
<value>6</value>
<value>1</value>
<value>1</value>
@@ -17,9 +17,11 @@
</row>
</table>
<table name="phpbb_notification_types">
- <column>notification_type</column>
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
<column>notification_type_enabled</column>
<row>
+ <value>1</value>
<value>post_in_queue</value>
<value>1</value>
</row>
diff --git a/tests/notification/fixtures/submit_post_quote.xml b/tests/notification/fixtures/submit_post_quote.xml
index 884a84af4a..f22ed97d91 100644
--- a/tests/notification/fixtures/submit_post_quote.xml
+++ b/tests/notification/fixtures/submit_post_quote.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<table name="phpbb_notifications">
- <column>item_type</column>
+ <column>notification_type_id</column>
<column>user_id</column>
<column>item_id</column>
<column>item_parent_id</column>
<column>notification_read</column>
<column>notification_data</column>
<row>
- <value>quote</value>
+ <value>1</value>
<value>5</value>
<value>1</value>
<value>1</value>
@@ -17,9 +17,11 @@
</row>
</table>
<table name="phpbb_notification_types">
- <column>notification_type</column>
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
<column>notification_type_enabled</column>
<row>
+ <value>1</value>
<value>quote</value>
<value>1</value>
</row>
diff --git a/tests/mock/notifications_notification_manager.php b/tests/notification/manager_helper.php
index c995afb9ab..7a794f922f 100644
--- a/tests/mock/notifications_notification_manager.php
+++ b/tests/notification/manager_helper.php
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
* Notifications service class
* @package notifications
*/
-class phpbb_mock_notifications_notification_manager extends phpbb_notification_manager
+class phpbb_notification_manager_helper extends phpbb_notification_manager
{
public function set_var($name, $value)
{
@@ -28,12 +28,10 @@ class phpbb_mock_notifications_notification_manager extends phpbb_notification_m
// Extra dependencies for get_*_class functions
protected $auth = null;
- protected $cache = null;
protected $config = null;
- public function setDependencies($auth, $cache, $config)
+ public function setDependencies($auth, $config)
{
$this->auth = $auth;
- $this->cache = $cache;
$this->config = $config;
}
@@ -44,7 +42,7 @@ class phpbb_mock_notifications_notification_manager extends phpbb_notification_m
{
$item_type = 'phpbb_notification_type_' . $item_type;
- $item = new $item_type($this->user_loader, $this->db, $this->cache, $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
+ $item = new $item_type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
$item->set_notification_manager($this);
@@ -60,7 +58,7 @@ class phpbb_mock_notifications_notification_manager extends phpbb_notification_m
{
$method_name = 'phpbb_notification_method_' . $method_name;
- $method = new $method_name($this->user_loader, $this->db, $this->cache, $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
+ $method = new $method_name($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
$method->set_notification_manager($this);
diff --git a/tests/notification/notification_test.php b/tests/notification/notification_test.php
index beccf55371..8f7eb3b8a8 100644
--- a/tests/notification/notification_test.php
+++ b/tests/notification/notification_test.php
@@ -7,6 +7,8 @@
*
*/
+require_once dirname(__FILE__) . '/manager_helper.php';
+
class phpbb_notification_test extends phpbb_database_test_case
{
protected $notifications, $db, $container, $user, $config, $auth, $cache;
@@ -31,19 +33,26 @@ class phpbb_notification_test extends phpbb_database_test_case
'allow_topic_notify' => true,
'allow_forum_notify' => true,
));
- $this->user = new phpbb_mock_user();
+ $this->user = new phpbb_user();
$this->user_loader = new phpbb_user_loader($this->db, $phpbb_root_path, $phpEx, 'phpbb_users');
$this->auth = new phpbb_mock_notifications_auth();
- $this->cache = new phpbb_mock_cache();
+ $this->cache = new phpbb_cache_service(
+ new phpbb_cache_driver_null(),
+ $this->config,
+ $this->db,
+ $phpbb_root_path,
+ $phpEx
+ );
$this->container = new phpbb_mock_container_builder();
- $this->notifications = new phpbb_mock_notifications_notification_manager(
+ $this->notifications = new phpbb_notification_manager_helper(
array(),
array(),
$this->container,
$this->user_loader,
$this->db,
+ $this->cache,
$this->user,
$phpbb_root_path,
$phpEx,
@@ -52,7 +61,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'phpbb_user_notifications'
);
- $this->notifications->setDependencies($this->auth, $this->cache, $this->config);
+ $this->notifications->setDependencies($this->auth, $this->config);
$types = array();
foreach (array(
@@ -87,7 +96,36 @@ class phpbb_notification_test extends phpbb_database_test_case
{
global $phpbb_root_path, $phpEx;
- return new $type($this->user_loader, $this->db, $this->cache, $this->user, $this->auth, $this->config, $phpbb_root_path, $phpEx, 'phpbb_notification_types', 'phpbb_notifications', 'phpbb_user_notifications');
+ return new $type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $phpbb_root_path, $phpEx, 'phpbb_notification_types', 'phpbb_notifications', 'phpbb_user_notifications');
+ }
+
+ public function test_get_notification_type_id()
+ {
+ // They should be inserted the first time
+ $this->assertEquals(1, $this->notifications->get_notification_type_id('post'));
+ $this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
+ $this->assertEquals(3, $this->notifications->get_notification_type_id('test'));
+
+ $this->assertEquals(array(
+ 'test' => 3,
+ 'quote' => 2,
+ 'post' => 1,
+ ),
+ $this->notifications->get_notification_type_ids(array(
+ 'test',
+ 'quote',
+ 'post',
+ )
+ ));
+ $this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
+
+ try
+ {
+ $this->assertEquals(3, $this->notifications->get_notification_type_id('fail'));
+
+ $this->fail('Non-existent type should throw an exception');
+ }
+ catch (Exception $e) {}
}
public function test_get_subscription_types()
@@ -121,6 +159,20 @@ class phpbb_notification_test extends phpbb_database_test_case
public function test_notifications()
{
+ $this->db->sql_query('DELETE FROM phpbb_notification_types');
+
+ $types = array('quote', 'bookmark', 'post', 'test');
+ foreach ($types as $id => $type)
+ {
+ $this->db->sql_query('INSERT INTO phpbb_notification_types ' .
+ $this->db->sql_build_array('INSERT', array(
+ 'notification_type_id' => ($id + 1),
+ 'notification_type_name' => $type,
+ 'notification_type_enabled' => 1,
+ ))
+ );
+ }
+
// Used to test post notifications later
$this->db->sql_query('INSERT INTO ' . TOPICS_WATCH_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
'topic_id' => 2,
@@ -195,7 +247,7 @@ class phpbb_notification_test extends phpbb_database_test_case
$expected = array(
1 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 1,
'item_parent_id' => 1,
'user_id' => 0,
@@ -204,7 +256,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
2 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 2,
'item_parent_id' => 2,
'user_id' => 0,
@@ -213,7 +265,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
3 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 3,
'item_parent_id' => 2,
'user_id' => 0,
@@ -222,7 +274,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
4 => array(
- 'item_type' => 'post',
+ 'notification_type_id' => 3,
'item_id' => 4,
'item_parent_id' => 2,
'user_id' => 0,
@@ -238,7 +290,7 @@ class phpbb_notification_test extends phpbb_database_test_case
),
),
5 => array(
- 'item_type' => 'bookmark',
+ 'notification_type_id' => 2,
'item_id' => 5,
'item_parent_id' => 2,
'user_id' => 0,
@@ -301,7 +353,7 @@ class phpbb_notification_test extends phpbb_database_test_case
$expected = array(
1 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 1,
'item_parent_id' => 2,
'user_id' => 0,
@@ -310,7 +362,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
2 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 2,
'item_parent_id' => 2,
'user_id' => 0,
@@ -319,7 +371,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
3 => array(
- 'item_type' => 'test',
+ 'notification_type_id' => 4,
'item_id' => 3,
'item_parent_id' => 2,
'user_id' => 0,
@@ -328,7 +380,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'notification_data' => array(),
),
4 => array(
- 'item_type' => 'post',
+ 'notification_type_id' => 3,
'item_id' => 4,
'item_parent_id' => 2,
'user_id' => 0,
@@ -344,7 +396,7 @@ class phpbb_notification_test extends phpbb_database_test_case
),
),
5 => array(
- 'item_type' => 'bookmark',
+ 'notification_type_id' => 2,
'item_id' => 5,
'item_parent_id' => 2,
'user_id' => 0,
diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php
index 953bedac80..59daf6c9cb 100644
--- a/tests/notification/submit_post_base.php
+++ b/tests/notification/submit_post_base.php
@@ -52,9 +52,6 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
$this->db = $this->new_dbal();
$db = $this->db;
- // Cache
- $cache = new phpbb_mock_cache();
-
// Auth
$auth = $this->getMock('phpbb_auth');
$auth->expects($this->any())
@@ -72,6 +69,14 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
+ $cache = new phpbb_cache_service(
+ new phpbb_cache_driver_null(),
+ $config,
+ $db,
+ $phpbb_root_path,
+ $phpEx
+ );
+
// Event dispatcher
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
@@ -94,23 +99,28 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
$user_loader = new phpbb_user_loader($db, $phpbb_root_path, $phpEx, USERS_TABLE);
- // Notification Manager
- $phpbb_notifications = new phpbb_notification_manager(array(), array(),
- $phpbb_container, $user_loader, $db, $user,
- $phpbb_root_path, $phpEx,
- NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
- $phpbb_container->set('notification_manager', $phpbb_notifications);
-
// Notification Types
- $notification_types = array('quote', 'bookmark', 'post', 'post_in_queue');
+ $notification_types = array('quote', 'bookmark', 'post', 'post_in_queue', 'topic', 'approve_topic', 'approve_post');
+ $notification_types_array = array();
foreach ($notification_types as $type)
{
$class_name = 'phpbb_notification_type_' . $type;
- $phpbb_container->set('notification.type.' . $type, new $class_name(
- $user_loader, $db, $cache, $user, $auth, $config,
+ $class = new $class_name(
+ $user_loader, $db, $cache->get_driver(), $user, $auth, $config,
$phpbb_root_path, $phpEx,
- NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE));
+ NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
+
+ $phpbb_container->set('notification.type.' . $type, $class);
+
+ $notification_types_array['notification.type.' . $type] = $class;
}
+
+ // Notification Manager
+ $phpbb_notifications = new phpbb_notification_manager($notification_types_array, array(),
+ $phpbb_container, $user_loader, $db, $cache, $user,
+ $phpbb_root_path, $phpEx,
+ NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
+ $phpbb_container->set('notification_manager', $phpbb_notifications);
}
/**
@@ -119,8 +129,9 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
public function test_submit_post($additional_post_data, $expected_before, $expected_after)
{
$sql = 'SELECT user_id, item_id, item_parent_id
- FROM ' . NOTIFICATIONS_TABLE . "
- WHERE item_type = '" . $this->item_type . "'
+ FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
+ WHERE nt.notification_type_name = '" . $this->item_type . "'
+ AND n.notification_type_id = nt.notification_type_id
ORDER BY user_id, item_id ASC";
$result = $this->db->sql_query($sql);
$this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
@@ -131,8 +142,9 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false);
$sql = 'SELECT user_id, item_id, item_parent_id
- FROM ' . NOTIFICATIONS_TABLE . "
- WHERE item_type = '" . $this->item_type . "'
+ FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
+ WHERE nt.notification_type_name = '" . $this->item_type . "'
+ AND n.notification_type_id = nt.notification_type_id
ORDER BY user_id ASC, item_id ASC";
$result = $this->db->sql_query($sql);
$this->assertEquals($expected_after, $this->db->sql_fetchrowset($result));
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 56cc7a9de5..a3c0b69123 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -133,6 +133,20 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
"xyz\nabc\nabc\nbar\nbar\nabc",
),
array(
+ 'define_advanced.html',
+ array(),
+ array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
+ array(),
+ "abc\nzxc\ncde\nbcd",
+ ),
+ array(
+ 'define_unclosed.html',
+ array(),
+ array(),
+ array(),
+ "test",
+ ),
+ array(
'expressions.html',
array(),
array(),
diff --git a/tests/template/templates/define.html b/tests/template/templates/define.html
index 4459fffbe0..4e6d0ee793 100644
--- a/tests/template/templates/define.html
+++ b/tests/template/templates/define.html
@@ -7,5 +7,3 @@
{$VALUE}
<!-- UNDEFINE $VALUE -->
{$VALUE}
-<!-- DEFINE $VALUE -->
-
diff --git a/tests/template/templates/define_advanced.html b/tests/template/templates/define_advanced.html
new file mode 100644
index 0000000000..83467a5b4b
--- /dev/null
+++ b/tests/template/templates/define_advanced.html
@@ -0,0 +1,12 @@
+<!-- DEFINE $VALUE -->
+abc
+<!-- ENDDEFINE -->
+{$VALUE}
+<!-- DEFINE $VALUE1 -->
+bcd
+<!-- ENDDEFINE -->
+<!-- DEFINE $VALUE2 -->
+cde
+<!-- ENDDEFINE -->
+<!-- INCLUDE define_include2.html -->
+{$INCLUDED_VALUE3}
diff --git a/tests/template/templates/define_include2.html b/tests/template/templates/define_include2.html
new file mode 100644
index 0000000000..874f3e1852
--- /dev/null
+++ b/tests/template/templates/define_include2.html
@@ -0,0 +1,11 @@
+<!-- DEFINE $INCLUDED_VALUE1 -->
+zxc
+<!-- ENDDEFINE -->
+<!-- DEFINE $INCLUDED_VALUE2 -->
+qwe
+<!-- ENDDEFINE -->
+{$INCLUDED_VALUE1}
+<!-- DEFINE $INCLUDED_VALUE3 -->
+{$VALUE2}
+{$VALUE1}
+<!-- ENDDEFINE -->
diff --git a/tests/template/templates/define_unclosed.html b/tests/template/templates/define_unclosed.html
new file mode 100644
index 0000000000..1c975eab2b
--- /dev/null
+++ b/tests/template/templates/define_unclosed.html
@@ -0,0 +1,2 @@
+<!-- DEFINE $VALUE -->
+test