aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-09-12 15:32:11 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-09-12 15:32:11 +0000
commite503216834c466de1eb5746d1b2998a8db5de086 (patch)
tree316a5c451d9188a35a629b457adc697df568a93f /phpBB
parent01b46eb4e0cc637c0b3440a49a58580133679bb0 (diff)
downloadforums-e503216834c466de1eb5746d1b2998a8db5de086.tar
forums-e503216834c466de1eb5746d1b2998a8db5de086.tar.gz
forums-e503216834c466de1eb5746d1b2998a8db5de086.tar.bz2
forums-e503216834c466de1eb5746d1b2998a8db5de086.tar.xz
forums-e503216834c466de1eb5746d1b2998a8db5de086.zip
some tiny fixes...
git-svn-id: file:///svn/phpbb/trunk@8087 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/cron.php21
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/db/dbal.php4
-rw-r--r--phpBB/includes/functions_jabber.php15
-rw-r--r--phpBB/includes/functions_upload.php2
-rw-r--r--phpBB/search.php2
-rw-r--r--phpBB/styles/prosilver/theme/common.css2
7 files changed, 35 insertions, 12 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index a4880b119f..18ed42dbae 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -259,18 +259,29 @@ switch ($cron_type)
// Unloading cache and closing db after having done the dirty work.
if ($use_shutdown_function)
{
+ register_shutdown_function('unlock_cron');
register_shutdown_function('garbage_collection');
}
else
{
+ unlock_cron();
garbage_collection();
}
-$sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '0'
- WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
-$db->sql_query($sql);
-
exit;
+
+/**
+* Unlock cron script
+*/
+function unlock_cron()
+{
+ global $db;
+
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '0'
+ WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
+ $db->sql_query($sql);
+}
+
?> \ No newline at end of file
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 43afbd4411..921ae212a7 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -204,6 +204,7 @@ p a {
<li>[Fix] Allow the merge selection screen to work (Bug #14363)</li>
<li>[Change] Require additional permissions for copying permission when editing forums </li>
<li>[Fix] Local magic URLs no longer get an additional trailing slash (Bug #14362)</li>
+ <li>[Fix] Do not let the cron script stale for one hour if register_shutdown_function is not able to be called (Bug #14436)</li>
</ul>
</div>
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index f79b196e68..d838210d10 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -99,8 +99,8 @@ class dbal
*/
function sql_add_num_queries($cached = false)
{
- $this->num_queries['cached'] += ($cached) ? 1 : 0;
- $this->num_queries['normal'] += ($cached) ? 0 : 1;
+ $this->num_queries['cached'] += ($cached !== false) ? 1 : 0;
+ $this->num_queries['normal'] += ($cached !== false) ? 0 : 1;
$this->num_queries['total'] += 1;
}
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index e3edcfc0be..6297dac4bf 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -695,25 +695,34 @@ class jabber
}
/**
- * parse_data like a="b",c="d",...
+ * parse_data like a="b",c="d",... or like a="a, b", c, d="e", f=g,...
* @param string $data
* @access public
* @return array a => b ...
*/
function parse_data($data)
{
- // super basic, but should suffice
$data = explode(',', $data);
$pairs = array();
+ $key = false;
foreach ($data as $pair)
{
$dd = strpos($pair, '=');
+
if ($dd)
{
- $pairs[substr($pair, 0, $dd)] = trim(substr($pair, $dd + 1), '"');
+ $key = trim(substr($pair, 0, $dd));
+ $pairs[$key] = trim(trim(substr($pair, $dd + 1)), '"');
+ }
+ else if (strpos(strrev(trim($pair)), '"') === 0 && $key)
+ {
+ // We are actually having something left from "a, b" values, add it to the last one we handled.
+ $pairs[$key] .= ',' . trim(trim($pair), '"');
+ continue;
}
}
+
return $pairs;
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 68e06765a5..d3110869af 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -577,7 +577,7 @@ class fileupload
if (function_exists('mime_content_type'))
{
- $mimetype = mime_content_type($filename);
+ $mimetype = mime_content_type($source_file);
}
// Some browsers choke on a mimetype of application/octet-stream
diff --git a/phpBB/search.php b/phpBB/search.php
index dfeb76e946..97f4ca655c 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -447,6 +447,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
+ $user->add_lang('viewtopic');
+
// Grab icons
$icons = $cache->obtain_icons();
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index a99c82bd05..c3fa42115f 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -275,7 +275,7 @@ span.corners-bottom {
}
span.corners-bottom span {
- background-image: none;;
+ background-image: none;
background-position: 100% 100%;
}