diff --git a/contrib/pools/main.php b/contrib/pools/main.php index 33186e92..ddc703ea 100644 --- a/contrib/pools/main.php +++ b/contrib/pools/main.php @@ -137,32 +137,32 @@ class Pools extends SimpleExtension { break; case "edit": - $poolID = int_escape($event->get_arg(1)); - $pools = $this->get_pool($poolID); + //$poolID = int_escape($event->get_arg(1)); + //$pools = $this->get_pool($poolID); - foreach($pools as $pool) { + //foreach($pools as $pool) { if ($this->have_permission($user, $pool)) { $this->theme->edit_pool($page, $this->get_pool($poolID), $this->edit_posts($poolID)); } else { $page->set_mode("redirect"); $page->set_redirect(make_link("pool/view/".$poolID)); } - } + //} break; case "order": - if($_SERVER["REQUEST_METHOD"] == "GET") { - $poolID = int_escape($event->get_arg(1)); - $pools = $this->get_pool($poolID); + if (isset($_POST["order_view"])) { + //$poolID = int_escape($event->get_arg(1)); + //$pools = $this->get_pool($poolID); - foreach($pools as $pool) { + //foreach($pools as $pool) { if ($this->have_permission($user, $pool)) { $this->theme->edit_order($page, $this->get_pool($poolID), $this->edit_order($poolID)); } else { $page->set_mode("redirect"); $page->set_redirect(make_link("pool/view/".$poolID)); } - } + //} } else { if ($this->have_permission($user, $pool)) { diff --git a/contrib/pools/theme.php b/contrib/pools/theme.php index 4fa35ca6..80269e6f 100644 --- a/contrib/pools/theme.php +++ b/contrib/pools/theme.php @@ -168,21 +168,24 @@ class PoolsTheme extends Themelet { public function sidebar_options(Page $page, $pool, $check_all) { global $user; - $editor = " - ".make_form(make_link("pool/import"))." - - - + $editor = "\n".make_form( make_link('pool/import') ).' + + + - -
- + + '.make_form( make_link('pool/edit') ).' + + +
- -
- + + '.make_form( make_link('pool/order') ).' + + +
- "; + '; if($user->id == $pool['user_id'] || $user->is_admin()){ $editor .= " @@ -193,8 +196,8 @@ class PoolsTheme extends Themelet { ".make_form(make_link("pool/nuke"))." - - + + "; }