From 4a9b4c1819e3faf4ea2b628d9a56d065c1199052 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 12 Jan 2014 08:05:12 -0800 Subject: [PATCH] Correct some keyword fields with the 'tag' form element. --- class2.php | 9 ++++++--- e107_admin/cpage.php | 6 +++--- e107_handlers/form_handler.php | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/class2.php b/class2.php index 840b1dfe1..ba21ef32d 100644 --- a/class2.php +++ b/class2.php @@ -1266,9 +1266,12 @@ function check_email($email) } //--------------------------------------------------------------------------------------------------------------------------------------------- -// $var is a single class number or name, or a comma-separated list of the same. -// If a class is prefixed with '-' this means 'exclude' - returns FALSE if the user is in this class (overrides 'includes'). -// Otherwise returns TRUE if the user is in any of the classes listed in $var. +/** + * @param $var is a single class number or name, or a comma-separated list of the same. + * @param $userclass a custom list of userclasses or leave blank for the current user's permissions. +* If a class is prefixed with '-' this means 'exclude' - returns FALSE if the user is in this class (overrides 'includes'). +* Otherwise returns TRUE if the user is in any of the classes listed in $var. + */ function check_class($var, $userclass = USERCLASS_LIST, $uid = 0) { $e107 = e107::getInstance(); diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 3732dd728..77192d861 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -134,9 +134,9 @@ class page_chapters_ui extends e_admin_ui 'chapter_template' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''), 'chapter_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'readonly'=>FALSE), - 'chapter_meta_keywords' => array('title'=> "Meta Keywords", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), + 'chapter_meta_keywords' => array('title'=> "Meta Keywords", 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), 'chapter_sef' => array('title'=> "SEF Url String", 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE, 'inline'=>true, 'writeParms'=>'size=xxlarge'), // Display name - 'chapter_manager' => array('title'=> "Can be edited by", 'type' => 'userclass', 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), + 'chapter_manager' => array('title'=> "Can be edited by", 'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), 'chapter_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => 'auto', 'thclass' => 'right', 'class'=> 'right' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'left last', 'class' => 'left', 'readParms'=>'sort=1') @@ -231,7 +231,7 @@ class page_chapters_form_ui extends e_admin_form_ui if($mode == 'write') { - return $frm->text('chapter_name',$curVal); + return $frm->text('chapter_name',$curVal,255,'size=xxlarge'); } if($mode == 'filter') diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index fb3e230e3..f3c2c21f7 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3260,8 +3260,8 @@ class e_form $ret = vartrue($eloptions['pre']).$this->selectbox($key, $options, $value, $eloptions).vartrue($eloptions['post']); break; - default: - $ret = $value; + default:// No LAN necessary, debug only. + $ret = (ADMIN) ? "".LAN_ERROR." Unknown 'type' : ".$attributes['type'] ."" : $value; break; }