- Modificatie & Versie: 1.0.0
Directe link naar de modificatie: https://www.phpbb.com/customise/db/mod/tmm/
Adres van je forum: http://www.fun2play.net
phpBB versie: 3.0.11
Wat is het probleem?
http://www.fun2play.net/viewforum.php?f=9
En ik heb echt geen idee waar deze fout zou kunnen liggen..
Kan iemand me hierbij helpen?
Code: Selecteer alles
Fatal error: Cannot redeclare recalc_nested_sets() (previously declared in /home/andy/public_html/includes/functions_admin.php:30) in /home/andy/public_html/includes/functions_admin.php on line 60
Functions_admin.php 30 tpt 60 :
Code: Selecteer alles
function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = array())
{
global $db;
$sql = 'SELECT *
FROM ' . $table . '
WHERE parent_id = ' . (int) $parent_id .
((!empty($where)) ? ' AND ' . implode(' AND ', $where) : '') . '
ORDER BY left_id ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// First we update the left_id for this module
if ($row['left_id'] != $new_id)
{
$db->sql_query('UPDATE ' . $table . ' SET ' . $db->sql_build_array('UPDATE', array('left_id' => $new_id)) . " WHERE $pkey = {$row[$pkey]}");
}
$new_id++;
// Then we go through any children and update their left/right id's
recalc_nested_sets($new_id, $pkey, $table, $row[$pkey], $where);
// Then we come back and update the right_id for this module
if ($row['right_id'] != $new_id)
{
$db->sql_query('UPDATE ' . $table . ' SET ' . $db->sql_build_array('UPDATE', array('right_id' => $new_id)) . " WHERE $pkey = {$row[$pkey]}");
}
$new_id++;
}
$db->sql_freeresult($result);
}