fix execute of statement if variables != replacers in sql-prepare query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -37,6 +37,7 @@ if ($page == 'overview') {
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$domainresult = false;
|
||||
$query_params = array('id' => $row['id']);
|
||||
|
||||
$query = "SELECT * FROM `".TABLE_PANEL_DOMAINS."`
|
||||
WHERE `phpsettingid` = :id
|
||||
@@ -44,6 +45,7 @@ if ($page == 'overview') {
|
||||
|
||||
if ((int)$userinfo['domains_see_all'] == 0) {
|
||||
$query .= " AND `adminid` = :adminid";
|
||||
$query_params['adminid'] = $userinfo['adminid'];
|
||||
}
|
||||
|
||||
if ((int)$settings['panel']['phpconfigs_hidestdsubdomain'] == 1) {
|
||||
@@ -61,7 +63,7 @@ if ($page == 'overview') {
|
||||
}
|
||||
|
||||
$domainresult_stmt = Database::prepare($query);
|
||||
Database::pexecute($domainresult_stmt, array('id' => $id, 'adminid' => $userinfo['adminid']));
|
||||
Database::pexecute($domainresult_stmt, $query_params);
|
||||
|
||||
$domains = '';
|
||||
if (Database::num_rows() > 0) {
|
||||
|
||||
@@ -17,31 +17,28 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if($settings['logger']['log_cron'] == '1')
|
||||
{
|
||||
if ($settings['logger']['log_cron'] == '1') {
|
||||
$cronlog->setCronLog(0);
|
||||
fwrite($debugHandler, 'Logging for cron has been shutdown' . "\n");
|
||||
}
|
||||
|
||||
// TODO remove when completely migrated to PDO
|
||||
$db->close();
|
||||
fwrite($debugHandler, 'Closing database connection' . "\n");
|
||||
|
||||
if(isset($db_root))
|
||||
{
|
||||
if (isset($db_root)) {
|
||||
$db_root->close();
|
||||
fwrite($debugHandler, 'Closing database rootconnection' . "\n");
|
||||
}
|
||||
|
||||
if($keepLockFile === true)
|
||||
{
|
||||
if ($keepLockFile === true) {
|
||||
fwrite($debugHandler, '=== Keep lockfile because of exception ===');
|
||||
}
|
||||
|
||||
fclose($debugHandler);
|
||||
|
||||
if($keepLockFile === false
|
||||
&& $cronscriptDebug === false)
|
||||
{
|
||||
if ($keepLockFile === false
|
||||
&& $cronscriptDebug === false
|
||||
) {
|
||||
unlink($lockfile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user