nits
This commit is contained in:
parent
89673fb776
commit
848797030e
2 changed files with 62 additions and 67 deletions
|
@ -105,9 +105,8 @@ class Pool
|
|||
$row = $database->get_row("SELECT * FROM pools WHERE title=:title", ["title" => $poolTitle]);
|
||||
if ($row != null) {
|
||||
return $row['id'];
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -224,14 +223,12 @@ class Pools extends Extension
|
|||
if (count($event->args) >= 4) { // Assume first 2 args are search and page num
|
||||
$search = $event->get_arg(0); // Search is based on name comparison instead of tag search
|
||||
$page_num = $event->try_page_num(1);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$search = "";
|
||||
$page_num = $event->try_page_num(0);
|
||||
}
|
||||
$this->list_pools($page, $page_num, $search);
|
||||
}
|
||||
elseif ($event->page_matches("pool")) {
|
||||
} elseif ($event->page_matches("pool")) {
|
||||
$pool_id = 0;
|
||||
$pool = [];
|
||||
|
||||
|
@ -364,14 +361,12 @@ class Pools extends Extension
|
|||
$image_order = $image_order + 1;
|
||||
}
|
||||
$database->commit();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$database->rollback();
|
||||
}
|
||||
$page->set_mode(PageMode::REDIRECT);
|
||||
$page->set_redirect(make_link("pool/view/" . $pool_id));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->theme->display_error(403, "Permission Denied", "You do not have permission to access this page");
|
||||
}
|
||||
break;
|
||||
|
|
Reference in a new issue