From 5c973fb66f1543fc446eaeb8615f40f52eb56260 Mon Sep 17 00:00:00 2001 From: secretr Date: Wed, 2 May 2012 14:24:19 +0000 Subject: [PATCH] admin UI - consistent arguments of 'options' override methods --- e107_admin/cron.php | 4 ++-- e107_handlers/form_handler.php | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 5f706ba7e..d90d57fc8 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -502,7 +502,7 @@ class cron_admin_form_ui extends e_admin_form_ui } // Override the default Options field. - function options($field, $value, $attributes, $id) + function options($parms, $value, $id, $attributes) { if($attributes['mode'] == 'read') @@ -905,7 +905,7 @@ class cron Cron Password " - .$frm->password('cron_password', 100)." + .$frm->password('cron_password', '', 100)." diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 921d01291..eb5fdd4fb 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -608,7 +608,7 @@ class e_form foreach ($elements as $value => $label) { $label = defset($label, $label); - $text[] = $this->radio($name, $value, $checked == $value)."".$this->label($label, $name, $value).(isset($help[$value]) ? "
".$help[$value]."
" : ''); + $text[] = $this->radio($name, $value, (string) $checked === (string) $value)."".$this->label($label, $name, $value).(isset($help[$value]) ? "
".$help[$value]."
" : ''); } if(!$multi_line) return implode("  ", $text); @@ -1316,13 +1316,14 @@ class e_form if(isset($attributes['method']) && $attributes['method'] && method_exists($this, $attributes['method'])) { $method = $attributes['method']; - return $this->$method($parms, $value, $id); + return $this->$method($parms, $value, $id, $attributes); } elseif(method_exists($this, 'options')) { - return $this->options($field, $value, $attributes, $id); - // return $this->options($parms, $value, $id); // breaks admin->cron 'options' column + //return $this->options($field, $value, $attributes, $id); + // consistent method arguments, fixed in admin cron administration + return $this->options($parms, $value, $id, $attributes); // OLD breaks admin->cron 'options' column } }