diff --git a/ext/pools/main.php b/ext/pools/main.php
index 0845e861..cba63ea9 100644
--- a/ext/pools/main.php
+++ b/ext/pools/main.php
@@ -108,10 +108,9 @@ class Pools extends Extension {
global $page, $user;
if ($event->page_matches("pool")) {
-
$pool_id = 0;
$pool = array();
-
+
// Check if we have pool id, since this is most often the case.
if (isset($_POST["pool_id"])) {
$pool_id = int_escape($_POST["pool_id"]);
@@ -502,7 +501,7 @@ class Pools extends Extension {
$poolsMaxResults = $config->get_int("poolsMaxImportResults", 1000);
$images = $images = Image::find_images(0, $poolsMaxResults, Tag::explode($_POST["pool_tag"]));
- $this->theme->pool_result($page, $images, $pool_id);
+ $this->theme->pool_result($page, $images, $this->get_pool($pool_id));
}
diff --git a/ext/pools/theme.php b/ext/pools/theme.php
index c42bdbb0..b546d129 100644
--- a/ext/pools/theme.php
+++ b/ext/pools/theme.php
@@ -87,12 +87,6 @@ class PoolsTheme extends Themelet {
$html .= "";
- $nav_html = '
- Index
-
Create Pool
-
Pool Changes
- ';
-
$order_html = '
';
- $blockTitle = "Pools";
- $page->set_title(html_escape($blockTitle));
- $page->set_heading(html_escape($blockTitle));
- $page->add_block(new Block($blockTitle, $html, "main", 10));
- $page->add_block(new Block("Navigation", $nav_html, "left", 10));
+ $this->display_top(null, "Pools");
$page->add_block(new Block("Order By", $order_html, "left", 15));
+ $page->add_block(new Block("Pools", $html, "main", 10));
+
+
+
$this->display_paginator($page, "pool/list", null, $pageNumber, $totalPages);
}
-
/*
* HERE WE DISPLAY THE NEW POOL COMPOSER
*/
@@ -128,9 +121,7 @@ class PoolsTheme extends Themelet {
";
- $blockTitle = "Create Pool";
- $page->set_title(html_escape($blockTitle));
- $page->set_heading(html_escape($blockTitle));
+ $this->display_top(null, "Create Pool");
$page->add_block(new Block("Create Pool", $create_html, "main", 20));
}
@@ -144,6 +135,17 @@ class PoolsTheme extends Themelet {
$page->set_title($heading);
$page->set_heading($heading);
+
+ $nav_html = 'Index';
+ $poolnav_html = '
+ Index
+
Create Pool
+
Pool Changes
+ ';
+
+ $page->add_block(new Block($nav_html, null, "left", 5));
+ $page->add_block(new Block("Pool Navigation", $poolnav_html, "left", 10));
+
if(count($pools) == 1) {
$pool = $pools[0];
if($pool['public'] == "Y" || $user->is_admin()) {// IF THE POOL IS PUBLIC OR IS ADMIN SHOW EDIT PANEL
@@ -155,34 +157,8 @@ class PoolsTheme extends Themelet {
$bb = new BBCode();
$page->add_block(new Block(html_escape($pool['title']), $bb->format($pool['description']), "main", 10));
}
- else {
- $pool_info = '
-
Title | -Description | -
---|---|
".html_escape($pool['title'])." | ". - "".html_escape($pool['description'])." | ". - "