
Originally Posted by
Aggy Hi,
I'm getting the same error, so here are my files, should they help.
I've ammended the RebuildAudit.php file to check in a similar way to the fix for RebuildRelationship.php but it didn't fix it, obviously. I'm not a php developer however, so might be my coding.
Cheers,
Aggy
Thank you Aggy! That really helped. It turns out that the ZuckerDocs' Plugin was the culprit of all of this. However, our code should have had better error checking. Nevertheless, the fixes for rebuildrelationships and rebuildaudit tables have been rolled into the next patch. Here is the valid code for RebuildAudit.php
Code:
include('include/modules.php');
global $beanFiles;
echo 'Searching for new audit enabled modules <BR>';
foreach ($beanFiles as $bean => $file)
{
if(strlen($file) > 0 && file_exists($file)) {
require_once($file);
$focus = new $bean();
if ($focus->is_AuditEnabled()) {
if (!$focus->db->tableExists($focus->get_audit_table_name())) {
echo "creating table ".$focus->get_audit_table_name().' for '. $focus->object_name.'.<BR>';
$focus->create_audit_table();
} else {
echo "Audit table for ". $focus->object_name." already exists. skipping...<BR>";
}
}
}
}
echo 'done';
Bookmarks