diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index 57f6ab3..137d901 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -126,12 +126,14 @@ public function getPlugins($topicFrameSetting, $conditions = []) { ) ), true); + $conditions = Hash::merge( + array($this->alias . '.frame_key' => Current::read('Frame.key')), + $conditions + ); $plugin = $this->find('list', array( 'recursive' => 0, 'fields' => array('Plugin.key', 'Plugin.name'), - 'conditions' => array( - $this->alias . '.frame_key' => Current::read('Frame.key'), - ), + 'conditions' => $conditions, 'order' => 'weight' )); } else { diff --git a/View/Elements/Topics/header.ctp b/View/Elements/Topics/header.ctp index 057fd67..6c08f3f 100644 --- a/View/Elements/Topics/header.ctp +++ b/View/Elements/Topics/header.ctp @@ -8,13 +8,22 @@ * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project */ +$named = $this->Paginator->params['named']; +$named['page'] = '1'; +$url = NetCommonsUrl::blockUrl($named); ?>
- DisplayNumber->dropDownToggleDays(array('currentDays' => $topicFrameSetting['display_days'])); ?> + DisplayNumber->dropDownToggleDays(array( + 'currentDays' => $topicFrameSetting['display_days'], + 'url' => $url + )); ?> - DisplayNumber->dropDownToggle(array('currentLimit' => $topicFrameSetting['display_number'])); ?> + DisplayNumber->dropDownToggle(array( + 'currentLimit' => $topicFrameSetting['display_number'], + 'url' => $url + )); ?> diff --git a/View/Elements/Topics/select_status.ctp b/View/Elements/Topics/select_status.ctp index f155f9b..36428e3 100644 --- a/View/Elements/Topics/select_status.ctp +++ b/View/Elements/Topics/select_status.ctp @@ -18,7 +18,7 @@ diff --git a/View/Topics/json/index_plugins.ctp b/View/Topics/json/index_plugins.ctp index 5d73e46..8d2f899 100644 --- a/View/Topics/json/index_plugins.ctp +++ b/View/Topics/json/index_plugins.ctp @@ -14,4 +14,4 @@ $pluginKey = $this->request->query['plugin_key']; echo $this->NetCommonsHtml->json(array( 'paging' => $topics[$pluginKey]['paging'], 'topics' => $this->Topics->camelizeKeyRecursive($topics[$pluginKey]['topics']) -)); +), 'OK', 200, false); diff --git a/View/Topics/json/index_rooms.ctp b/View/Topics/json/index_rooms.ctp index aee86e9..0fd667a 100644 --- a/View/Topics/json/index_rooms.ctp +++ b/View/Topics/json/index_rooms.ctp @@ -14,4 +14,4 @@ $roomId = $this->request->query['room_id']; echo $this->NetCommonsHtml->json(array( 'paging' => $topics[$roomId]['paging'], 'topics' => $this->Topics->camelizeKeyRecursive($topics[$roomId]['topics']) -)); +), 'OK', 200, false);