added spaces + some curly braces + some usage of dbm::is_result()

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-26 15:23:30 +01:00 committed by Roland Haeder
parent 720e7d6034
commit 0cd241bcbe
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
92 changed files with 1190 additions and 1087 deletions

View file

@ -861,6 +861,7 @@ function admin_page_site(App $a) {
foreach ($files as $file) {
if (intval(file_exists($file.'/unsupported')))
continue;
}
$f = basename($file);
@ -1274,7 +1275,7 @@ function admin_page_users(App $a) {
if ($a->argc>2) {
$uid = $a->argv[3];
$user = q("SELECT `username`, `blocked` FROM `user` WHERE `uid` = %d", intval($uid));
if (count($user) == 0) {
if (!dbm::is_result($user)) {
notice('User not found'.EOL);
goaway('admin/users');
return ''; // NOTREACHED
@ -1609,7 +1610,7 @@ function admin_page_plugins(App $a) {
* @param int $result
*/
function toggle_theme(&$themes,$th,&$result) {
for($x = 0; $x < count($themes); $x ++) {
for ($x = 0; $x < count($themes); $x ++) {
if ($themes[$x]['name'] === $th) {
if ($themes[$x]['allowed']) {
$themes[$x]['allowed'] = 0;
@ -1629,7 +1630,7 @@ function toggle_theme(&$themes,$th,&$result) {
* @return int
*/
function theme_status($themes,$th) {
for($x = 0; $x < count($themes); $x ++) {
for ($x = 0; $x < count($themes); $x ++) {
if ($themes[$x]['name'] === $th) {
if ($themes[$x]['allowed']) {
return 1;
@ -1761,7 +1762,7 @@ function admin_page_themes(App $a) {
$status="off"; $action= t("Enable");
}
$readme = Null;
$readme = null;
if (is_file("view/theme/$theme/README.md")) {
$readme = file_get_contents("view/theme/$theme/README.md");
$readme = Markdown($readme);