diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 54 | ||||
-rw-r--r-- | phpBB/phpbb/feed/forum.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/feed/news.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/feed/overall.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/feed/topic.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/feed/topics.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/feed/topics_active.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/twig.php | 4 |
8 files changed, 13 insertions, 63 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 8bc63e564a..44bea3c5d2 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -715,60 +715,6 @@ class migrator } /** - * Load migration data files from a directory - * - * @param \phpbb\finder $finder - * @param string $path Path to migration data files - * @param bool $check_fulfillable If TRUE (default), we will check - * if all of the migrations are fulfillable after loading them. - * If FALSE, we will not check. You SHOULD check at least once - * to prevent errors (if including multiple directories, check - * with the last call to prevent throwing errors unnecessarily). - * @return array Array of migration names - * @throws \phpbb\db\migration\exception - */ - public function load_migrations(\phpbb\finder $finder, $path, $check_fulfillable = true) - { - if (!is_dir($path)) - { - throw new \phpbb\db\migration\exception('DIRECTORY INVALID', $path); - } - - $migrations = array(); - - $files = $finder - ->extension_directory("/") - ->find_from_paths(array('/' => $path)); - foreach ($files as $file) - { - $migrations[$file['path'] . $file['filename']] = ''; - } - $migrations = $finder->get_classes_from_files($migrations); - - foreach ($migrations as $migration) - { - if (!in_array($migration, $this->migrations)) - { - $this->migrations[] = $migration; - } - } - - if ($check_fulfillable) - { - foreach ($this->migrations as $name) - { - $unfulfillable = $this->unfulfillable($name); - if ($unfulfillable !== false) - { - throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable); - } - } - } - - return $this->migrations; - } - - /** * Creates the migrations table if it does not exist. * @return null */ diff --git a/phpBB/phpbb/feed/forum.php b/phpBB/phpbb/feed/forum.php index 610b755af3..7a2087c1cd 100644 --- a/phpBB/phpbb/feed/forum.php +++ b/phpBB/phpbb/feed/forum.php @@ -94,7 +94,7 @@ class forum extends \phpbb\feed\post_base WHERE forum_id = ' . $this->forum_id . ' AND topic_moved_id = 0 AND ' . $this->content_visibility->get_visibility_sql('topic', $this->forum_id) . ' - ORDER BY topic_last_post_time DESC'; + ORDER BY topic_last_post_time DESC, topic_last_post_id DESC'; $result = $this->db->sql_query_limit($sql, $this->num_items); $topic_ids = array(); @@ -123,7 +123,7 @@ class forum extends \phpbb\feed\post_base AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . ' AND p.post_time >= ' . $min_post_time . ' AND p.poster_id = u.user_id', - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/feed/news.php b/phpBB/phpbb/feed/news.php index ea5f4febf5..a02c199d85 100644 --- a/phpBB/phpbb/feed/news.php +++ b/phpBB/phpbb/feed/news.php @@ -99,7 +99,7 @@ class news extends \phpbb\feed\topic_base ), 'WHERE' => 'p.topic_id = t.topic_id AND ' . $this->db->sql_in_set('p.post_id', $post_ids), - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/feed/overall.php b/phpBB/phpbb/feed/overall.php index f6847c041e..ab452f5386 100644 --- a/phpBB/phpbb/feed/overall.php +++ b/phpBB/phpbb/feed/overall.php @@ -34,7 +34,7 @@ class overall extends \phpbb\feed\post_base FROM ' . TOPICS_TABLE . ' WHERE topic_moved_id = 0 AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $forum_ids) . ' - ORDER BY topic_last_post_time DESC'; + ORDER BY topic_last_post_time DESC, topic_last_post_id DESC'; $result = $this->db->sql_query_limit($sql, $this->num_items); $topic_ids = array(); @@ -71,7 +71,7 @@ class overall extends \phpbb\feed\post_base AND ' . $this->content_visibility->get_forums_visibility_sql('post', $forum_ids, 'p.') . ' AND p.post_time >= ' . $min_post_time . ' AND u.user_id = p.poster_id', - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/feed/topic.php b/phpBB/phpbb/feed/topic.php index 78e0b4b8ab..66c49e55cf 100644 --- a/phpBB/phpbb/feed/topic.php +++ b/phpBB/phpbb/feed/topic.php @@ -101,7 +101,7 @@ class topic extends \phpbb\feed\post_base 'WHERE' => 'p.topic_id = ' . $this->topic_id . ' AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . ' AND p.poster_id = u.user_id', - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/feed/topics.php b/phpBB/phpbb/feed/topics.php index 88ca7c33f3..2b9cb3501a 100644 --- a/phpBB/phpbb/feed/topics.php +++ b/phpBB/phpbb/feed/topics.php @@ -71,7 +71,7 @@ class topics extends \phpbb\feed\topic_base ), 'WHERE' => 'p.topic_id = t.topic_id AND ' . $this->db->sql_in_set('p.post_id', $post_ids), - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/feed/topics_active.php b/phpBB/phpbb/feed/topics_active.php index cde6d36f45..6d5eddfc16 100644 --- a/phpBB/phpbb/feed/topics_active.php +++ b/phpBB/phpbb/feed/topics_active.php @@ -56,7 +56,7 @@ class topics_active extends \phpbb\feed\topic_base WHERE topic_moved_id = 0 AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $in_fid_ary) . ' ' . $last_post_time_sql . ' - ORDER BY topic_last_post_time DESC'; + ORDER BY topic_last_post_time DESC, topic_last_post_id DESC'; $result = $this->db->sql_query_limit($sql, $this->num_items); $post_ids = array(); @@ -88,7 +88,7 @@ class topics_active extends \phpbb\feed\topic_base ), 'WHERE' => 'p.topic_id = t.topic_id AND ' . $this->db->sql_in_set('p.post_id', $post_ids), - 'ORDER_BY' => 'p.post_time DESC', + 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC', ); return true; diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 5e2057f818..a3b002f350 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -177,6 +177,10 @@ class twig extends \phpbb\template\base } $names = $this->get_user_style(); + // Add 'all' folder to $names array + // It allows extensions to load a template file from 'all' folder, + // if a style doesn't include it. + $names[] = 'all'; $paths = array(); foreach ($style_directories as $directory) |