aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/db/migrator.php2
-rw-r--r--phpBB/phpbb/event/php_exporter.php25
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php2
-rw-r--r--phpBB/phpbb/session.php8
4 files changed, 31 insertions, 6 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index a425df56e8..2b0c66fc58 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -760,7 +760,7 @@ class migrator
$condition = $parameters[0];
- if (!$condition)
+ if (!$condition || (is_array($condition) && !$this->run_step($condition, $last_result, $reverse)))
{
return false;
}
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php
index 64d1e429b7..71c94a681d 100644
--- a/phpBB/phpbb/event/php_exporter.php
+++ b/phpBB/phpbb/event/php_exporter.php
@@ -264,7 +264,30 @@ class php_exporter
// Find event description line
$description_line_num = $this->find_description();
- $description = substr(trim($this->file_lines[$description_line_num]), strlen('* '));
+ $description_lines = array();
+
+ while (true)
+ {
+ $description_line = substr(trim($this->file_lines[$description_line_num]), strlen('*'));
+ $description_line = trim(str_replace("\t", " ", $description_line));
+
+ // Reached end of description if line is a tag
+ if (strlen($description_line) && $description_line[0] == '@')
+ {
+ break;
+ }
+
+ $description_lines[] = $description_line;
+ $description_line_num++;
+ }
+
+ // If there is an empty line between description and first tag, remove it
+ if (!strlen(end($description_lines)))
+ {
+ array_pop($description_lines);
+ }
+
+ $description = trim(implode('<br/>', $description_lines));
if (isset($this->events[$this->current_event]))
{
diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php
index 3f39448f05..bfafdf5ddd 100644
--- a/phpBB/phpbb/filesystem/filesystem.php
+++ b/phpBB/phpbb/filesystem/filesystem.php
@@ -367,7 +367,7 @@ class filesystem implements filesystem_interface
$common_php_group = @filegroup(__FILE__);
// And the owner and the groups PHP is running under.
- $php_uid = (function_exists('posic_getuid')) ? @posix_getuid() : false;
+ $php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
$php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false;
// If we are unable to get owner/group, then do not try to set them by guessing
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index de9345ca85..80934dc411 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1614,13 +1614,15 @@ class session
return;
}
+ // Do not update the session page for ajax requests, so the view online still works as intended
+ $page_changed = $this->update_session_page && $this->data['session_page'] != $this->page['page'] && !$request->is_ajax();
+
// Only update session DB a minute or so after last update or if page changes
- if ($this->time_now - ((isset($this->data['session_time'])) ? $this->data['session_time'] : 0) > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
+ if ($this->time_now - (isset($this->data['session_time']) ? $this->data['session_time'] : 0) > 60 || $page_changed)
{
$sql_ary = array('session_time' => $this->time_now);
- // Do not update the session page for ajax requests, so the view online still works as intended
- if ($this->update_session_page && !$request->is_ajax())
+ if ($page_changed)
{
$sql_ary['session_page'] = substr($this->page['page'], 0, 199);
$sql_ary['session_forum_id'] = $this->page['forum'];