aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-01-09 14:10:44 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-01-09 14:10:44 +0000
commit2b35b9d60d42c750485ba84b31818fad0b4e0a91 (patch)
treeaca204f65d9e65f3b10433af1cb6e42daca9b89e /phpBB/includes/functions_convert.php
parent164fb66f44322ccf5997cff8ccf154a1aa7f01d3 (diff)
downloadforums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar
forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.gz
forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.bz2
forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.xz
forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.zip
- some bugfixes
- bugfixes for the convertor (typecasting for example was totally broken) git-svn-id: file:///svn/phpbb/trunk@6865 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r--phpBB/includes/functions_convert.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index a356101e9a..1d78b29968 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -37,10 +37,13 @@ function still_on_time()
// If zero, then set to something higher to not let the user catch the ten seconds barrier.
if ($max_execution_time === 0)
{
- $max_execution_time = 300;
+ $max_execution_time = 250;
}
- $max_execution_time = min(max(10, $max_execution_time), 300);
+ $max_execution_time = min(max(10, ($max_execution_time - 15)), 250);
+
+ // For debugging purposes
+ // $max_execution_time = 30;
global $starttime;
$start_time = (empty($starttime)) ? $current_time : $starttime;
@@ -1417,8 +1420,12 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $sql = "INSERT INTO $table ($id_field, forum_id, auth_role_id) VALUES ($ug_id, $forum_id, " . $row['role_id'] . ')';
- $db->sql_query($sql);
+ // If we have no role id there is something wrong here
+ if ($row)
+ {
+ $sql = "INSERT INTO $table ($id_field, forum_id, auth_role_id) VALUES ($ug_id, $forum_id, " . $row['role_id'] . ')';
+ $db->sql_query($sql);
+ }
return;
}