[PATCH] Deprecate html_attbuild in favor of buildAttributes

  • From: Tom N Harris <tnharris@xxxxxxxxxxxxx>
  • Date: Thu, 21 Oct 2010 13:20:08 -0400

---
 inc/form.php              |    4 ++--
 inc/html.php              |    1 +
 lib/plugins/acl/admin.php |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/inc/form.php b/inc/form.php
index 70190d2..e614d2f 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -252,7 +252,7 @@ class Doku_Form {
         global $lang;
         $form = '';
         $this->params['accept-charset'] = $lang['encoding'];
-        $form .= '<form ' . html_attbuild($this->params) . '><div class="no">' 
. DOKU_LF;
+        $form .= '<form ' . buildAttributes($this->params,true) . '><div 
class="no">' . DOKU_LF;
         if (!empty($this->_hidden)) {
             foreach ($this->_hidden as $name=>$value)
                 $form .= form_hidden(array('name'=>$name, 'value'=>$value));
@@ -597,7 +597,7 @@ function form_makeListboxField($name, $values, 
$selected='', $label=null, $id=''
  * @author  Tom N Harris <tnharris@xxxxxxxxxxxxx>
  */
 function form_tag($attrs) {
-    return '<'.$attrs['_tag'].' '.buildAttributes($attrs).'/>';
+    return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'/>';
 }
 
 /**
diff --git a/inc/html.php b/inc/html.php
index 02afa00..a02cc02 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -26,6 +26,7 @@ function html_wikilink($id,$name=null,$search=''){
 /**
  * Helps building long attribute lists
  *
+ * @deprecated Use buildAttributes instead
  * @author Andreas Gohr <andi@xxxxxxxxxxxxxx>
  */
 function html_attbuild($attributes){
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 84932f7..3e7bd81 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -765,7 +765,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
 
             //build code
             $ret .= '<label for="pbox'.$label.'" 
title="'.$this->getLang('acl_perm'.$perm).'"'.$class.'>';
-            $ret .= '<input '.html_attbuild($atts).' />&nbsp;';
+            $ret .= '<input '.buildAttributes($atts).' />&nbsp;';
             $ret .= $this->getLang('acl_perm'.$perm);
             $ret .= '</label>'.NL;
         }
-- 
1.7.1


--------------030300040900050701030008--
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts:

  • » [PATCH] Deprecate html_attbuild in favor of buildAttributes - Tom N Harris