aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/controller/helper.php4
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php47
-rw-r--r--phpBB/phpbb/extension/finder.php15
-rw-r--r--phpBB/phpbb/log/log.php8
-rw-r--r--phpBB/phpbb/recursive_dot_prefix_filter_iterator.php28
5 files changed, 91 insertions, 11 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index 10fdbb1375..54c30c93fc 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -77,9 +77,9 @@ class helper
* @param int $status_code The status code to be sent to the page header
* @return Response object containing rendered page
*/
- public function render($template_file, $page_title = '', $status_code = 200)
+ public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false)
{
- page_header($page_title);
+ page_header($page_title, $display_online_list);
$this->template->set_filenames(array(
'body' => $template_file,
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php
new file mode 100644
index 0000000000..54ff2a31eb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_location_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_from');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_location',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_from',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_from' => array('VCHAR_UNI:100', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php
index c9c16ae6d5..6cc6e1808a 100644
--- a/phpBB/phpbb/extension/finder.php
+++ b/phpBB/phpbb/extension/finder.php
@@ -475,14 +475,19 @@ class finder
}
$directory_pattern = '#' . $directory_pattern . '#';
- $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST);
+ $iterator = new \RecursiveIteratorIterator(
+ new \phpbb\recursive_dot_prefix_filter_iterator(
+ new \RecursiveDirectoryIterator(
+ $path,
+ \FilesystemIterator::SKIP_DOTS
+ )
+ ),
+ \RecursiveIteratorIterator::SELF_FIRST
+ );
+
foreach ($iterator as $file_info)
{
$filename = $file_info->getFilename();
- if ($filename == '.' || $filename == '..')
- {
- continue;
- }
if ($file_info->isDir() == $is_dir)
{
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 62edc6a77f..68b023e244 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -308,7 +308,7 @@ class log implements \phpbb\log\log_interface
* @since 3.1-A1
*/
$vars = array('mode', 'user_id', 'log_ip', 'log_operation', 'log_time', 'additional_data', 'sql_ary');
- extract($this->dispatcher->trigger_event('core.add_log', $vars));
+ extract($this->dispatcher->trigger_event('core.add_log', compact($vars)));
// We didn't find a log_type, so we don't save it in the database.
if (!isset($sql_ary['log_type']))
@@ -406,7 +406,7 @@ class log implements \phpbb\log\log_interface
* @since 3.1-A1
*/
$vars = array('mode', 'count_logs', 'limit', 'offset', 'forum_id', 'topic_id', 'user_id', 'log_time', 'sort_by', 'keywords', 'profile_url', 'log_type', 'sql_additional');
- extract($this->dispatcher->trigger_event('core.get_logs_modify_type', $vars));
+ extract($this->dispatcher->trigger_event('core.get_logs_modify_type', compact($vars)));
if ($log_type === false)
{
@@ -502,7 +502,7 @@ class log implements \phpbb\log\log_interface
* @since 3.1-A1
*/
$vars = array('row', 'log_entry_data');
- extract($this->dispatcher->trigger_event('core.get_logs_modify_entry_data', $vars));
+ extract($this->dispatcher->trigger_event('core.get_logs_modify_entry_data', compact($vars)));
$log[$i] = $log_entry_data;
@@ -561,7 +561,7 @@ class log implements \phpbb\log\log_interface
* @since 3.1-A1
*/
$vars = array('log', 'topic_id_list', 'reportee_id_list');
- extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', $vars));
+ extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', compact($vars)));
if (sizeof($topic_id_list))
{
diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
new file mode 100644
index 0000000000..6ef63ec906
--- /dev/null
+++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* Class recursive_dot_prefix_filter_iterator
+*
+* This filter ignores directories starting with a dot.
+* When searching for php classes and template files of extensions
+* we don't need to look inside these directories.
+*
+* @package phpbb
+*/
+class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
+{
+ public function accept()
+ {
+ $filename = $this->current()->getFilename();
+ return !$this->current()->isDir() || $filename[0] !== '.';
+ }
+}