More issues fixed
- Replaced sizeof by count - Used DBM::is_result()
This commit is contained in:
parent
278068c713
commit
392f66f152
|
@ -671,7 +671,7 @@ function admin_page_queue(App $a)
|
||||||
return replace_macros($t, array(
|
return replace_macros($t, array(
|
||||||
'$title' => t('Administration'),
|
'$title' => t('Administration'),
|
||||||
'$page' => t('Inspect Queue'),
|
'$page' => t('Inspect Queue'),
|
||||||
'$count' => sizeof($r),
|
'$count' => count($r),
|
||||||
'id_header' => t('ID'),
|
'id_header' => t('ID'),
|
||||||
'$to_header' => t('Recipient Name'),
|
'$to_header' => t('Recipient Name'),
|
||||||
'$url_header' => t('Recipient Profile'),
|
'$url_header' => t('Recipient Profile'),
|
||||||
|
@ -836,11 +836,8 @@ function admin_page_site_post(App $a)
|
||||||
|
|
||||||
$upds = implode(", ", $upd);
|
$upds = implode(", ", $upd);
|
||||||
|
|
||||||
|
$r = q("UPDATE %s SET %s;", $table_name, $upds);
|
||||||
|
if (!DBM::is_result($r)) {
|
||||||
$q = sprintf("UPDATE %s SET %s;", $table_name, $upds);
|
|
||||||
$r = q($q);
|
|
||||||
if (!$r) {
|
|
||||||
notice("Failed updating '$table_name': " . dba::errorMessage());
|
notice("Failed updating '$table_name': " . dba::errorMessage());
|
||||||
goaway('admin/site');
|
goaway('admin/site');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue