From 5104d94f3b2250f766b9c520e2da8da9b4cab2e9 Mon Sep 17 00:00:00 2001 From: mattab Date: Tue, 23 Jul 2013 09:52:15 +0200 Subject: Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master --- core/QuickForm2.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'core/QuickForm2.php') diff --git a/core/QuickForm2.php b/core/QuickForm2.php index a41f2e5eb9..23f0690e45 100644 --- a/core/QuickForm2.php +++ b/core/QuickForm2.php @@ -9,8 +9,17 @@ * @package Piwik */ +namespace Piwik; + +use HTML_QuickForm2; +use HTML_QuickForm2_InvalidArgumentException; +use HTML_QuickForm2_Node; +use HTML_QuickForm2_NotFoundException; +use HTML_QuickForm2_Renderer; +use Piwik\Url; + /** - * Parent class for forms to be included in Smarty + * Manages forms displayed in Twig * * For an example, @see Piwik_Login_FormLogin * @@ -18,14 +27,14 @@ * @see HTML_QuickForm2, libs/HTML/QuickForm2.php * @link http://pear.php.net/package/HTML_QuickForm2/ */ -abstract class Piwik_QuickForm2 extends HTML_QuickForm2 +abstract class QuickForm2 extends HTML_QuickForm2 { protected $a_formElements = array(); function __construct($id, $method = 'post', $attributes = null, $trackSubmit = false) { if (!isset($attributes['action'])) { - $attributes['action'] = Piwik_Url::getCurrentQueryString(); + $attributes['action'] = Url::getCurrentQueryString(); } if (!isset($attributes['name'])) { $attributes['name'] = $id; -- cgit v1.2.3