From 72f46d119be8110e03d150271d9c90711fba3496 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 6 Jan 2007 20:31:06 +0000 Subject: [PATCH] MDL-8039 formslib Form id collission with body id when editing course, user details, etc. --- lib/formslib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/formslib.php b/lib/formslib.php index f93c04c29a..46a7b2e052 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -109,8 +109,7 @@ class moodleform { $action = strip_querystring(qualified_me()); } - //strip '_form' from the end of class name to make form name attribute. - $this->_formname = preg_replace('/_form$/', '', get_class($this), 1); + $this->_formname = get_class($this); // '_form' suffix kept in order to prevent collisions of form id and other element $this->_customdata = $customdata; $this->_form =& new MoodleQuickForm($this->_formname, $method, $action, $target, $attributes); $this->set_upload_manager(new upload_manager()); -- 2.39.5