Fix: use entity in auguria menu

This commit is contained in:
Regis Houssin
2009-05-27 15:56:00 +00:00
parent 1063772919
commit fb6a137b80
3 changed files with 272 additions and 262 deletions

View File

@@ -217,6 +217,15 @@ function run_sql($sqlfile,$silent=1)
$newsql=str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
}
// Replace __ENTITY__ with current entity id
while (eregi('(__ENTITY__)',$newsql,$reg))
{
$from = $reg[1];
$to = $conf->entity;
$newsql = str_replace($from,$to,$newsql);
dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
}
$result=$db->query($newsql);
if ($result)