[xoops-cvslog 1775] CVS update: xoops2jp/html/modules/legacyRender/admin/forms

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 1月 15日 (日) 03:30:49 JST


Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.5
--- xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.4	Sat Jan 14 21:23:24 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php	Sun Jan 15 03:30:49 2006
@@ -33,6 +33,9 @@
 	var $_mAttributes = array();
 	
 	var $_mNavi = null;
+	
+	var $mTplset = null;
+	var $mModule = null;
 
 	function LegacyRender_TplfileFilterForm(&$navi)
 	{
@@ -44,18 +47,27 @@
 	{
 		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
 	
-		if ($this->mSort > TPLFILE_SORT_KEY_MAXVALUE) {
+		if (abs($this->mSort) > TPLFILE_SORT_KEY_MAXVALUE) {
 			$this->mSort = TPLFILE_SORT_KEY_DEFAULT;
 		}
 	
 		if (isset($_REQUEST['tpl_module'])) {
 			$this->_mNavi->addExtra('tpl_module', xoops_getrequest('tpl_module'));
 			$this->_mCriteria->add(new Criteria('tpl_module', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_module'))));
+			
+			$handler =& xoops_gethandler('module');
+			$this->mModule =& $handler->getByDirname(xoops_getrequest('tpl_module'));
 		}
 	
 		if (isset($_REQUEST['tpl_tplset'])) {
 			$this->_mNavi->addExtra('tpl_tplset', xoops_getrequest('tpl_tplset'));
 			$this->_mCriteria->add(new Criteria('tpl_tplset', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_tplset'))));
+			
+			$handler =& xoops_getmodulehandler('tplset');
+			$tplsets =& $handler->getObjects(new Criteria('tplset_name', xoops_getrequest('tpl_tplset')));
+			if (count($tplsets) > 0) {
+				$this->mTplset =& $tplsets[0];
+			}
 		}
 	
 		if (isset($_REQUEST['tpl_file'])) {
@@ -67,6 +79,16 @@
 			$this->_mNavi->addExtra('tpl_type', xoops_getrequest('tpl_type'));
 			$this->_mCriteria->add(new Criteria('tpl_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_type'))));
 		}
+
+		$this->_mNavi->addExtra('sort', $this->mSort);
+
+		//
+		// check filtering criterion and if module & tplset specified mode, then remove paging function.
+		//
+		if ($this->mModule != null && $this->mTplset != null) {
+			$this->_mNavi->setPerpage(0);
+			$this->_mNavi->freezePerpage();
+		}
 	}
 
 	function getSort()
@@ -86,7 +108,7 @@
 	
 		$criteria->setStart($start);
 		$criteria->setLimit($limit);
-	
+
 		$criteria->setSort($this->getSort());
 		$criteria->setOrder($this->getOrder());
 	


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index