From 7c4635c4cfa34ef378423e198f9e78548cce62f0 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 19 Nov 2009 15:05:51 +0100 Subject: Introduce event HTML_EDIT_FORMSELECTION darcs-hash:20091119140551-e4919-7aa50fb6452dc6c402bfcd581f08d21de401999d.gz --- inc/html.php | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 48d4370dc..dda797f9e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1110,11 +1110,9 @@ function html_updateprofile(){ } /** - * This displays the edit form (lots of logic included) + * Preprocess edit form data * - * @fixme this is a huge lump of code and should be modularized * @triggers HTML_PAGE_FROMTEMPLATE - * @triggers HTML_EDITFORM_INJECTION * @author Andreas Gohr */ function html_edit($text=null,$include='edit'){ //FIXME: include needed? @@ -1128,7 +1126,6 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed? global $SUM; global $lang; global $conf; - global $license; //set summary default if(!$SUM){ @@ -1182,20 +1179,44 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed? print p_locale_xhtml('read'); } if(!$DATE) $DATE = $INFO['lastmod']; - ?> -
-
-
-
+ $data = compact('wr', 'text', 'mod', 'check'); + trigger_event('HTML_EDIT_FORMSELECTION', $data, 'html_edit_form', true); +} +/** + * Display the default edit form + * + * Is the default action for HTML_EDIT_FORMSELECTION. + * + * @triggers HTML_EDITFORM_OUTPUT + */ +function html_edit_form($param) { + extract($param); + global $conf; + global $license; + global $lang; + global $REV; + global $DATE; + global $PRE; + global $SUF; + global $INFO; + global $SUM; + global $ID; + ?> +
+ +
+
+
+
'dw__editform')); -- cgit v1.2.3