svn: /pear/pearweb/trunk/ include/HTML/QuickForm2/Element/InputEmail.php include/HTML/QuickForm2/Element/InputUrl.php public_html/channels/add.php
public_html/channels/edit.php

From: Date: Wed, 13 Apr 2011 00:10:23 +0000
Subject: svn: /pear/pearweb/trunk/ include/HTML/QuickForm2/Element/InputEmail.php include/HTML/QuickForm2/Element/InputUrl.php public_html/channels/add.php
public_html/channels/edit.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9870@lists.php.net to get a copy of this message
clockwerx Wed, 13 Apr 2011 00:10:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310172 Log: Shift classes, DRY Changed paths: A pear/pearweb/trunk/include/HTML/ A pear/pearweb/trunk/include/HTML/QuickForm2/ A pear/pearweb/trunk/include/HTML/QuickForm2/Element/ A pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputEmail.php A pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputUrl.php U pear/pearweb/trunk/public_html/channels/add.php U pear/pearweb/trunk/public_html/channels/edit.php Added: pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputEmail.php =================================================================== --- pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputEmail.php (rev 0) +++ pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputEmail.php 2011-04-13 00:10:23 UTC (rev 310172) @@ -0,0 +1,11 @@ +<?php +require_once 'HTML/QuickForm2/Element/Input.php'; + +if (!class_exists('HTML_QuickForm2_Element_InputEmail')) { + class HTML_QuickForm2_Element_InputEmail extends HTML_QuickForm2_Element_Input + { + protected $attributes = array('type' => 'email'); + } + + HTML_QuickForm2_Factory::registerElement('email', 'HTML_QuickForm2_Element_InputEmail'); +} Added: pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputUrl.php =================================================================== --- pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputUrl.php (rev 0) +++ pear/pearweb/trunk/include/HTML/QuickForm2/Element/InputUrl.php 2011-04-13 00:10:23 UTC (rev 310172) @@ -0,0 +1,11 @@ +<?php +require_once 'HTML/QuickForm2/Element/Input.php'; + +if (!class_exists('HTML_QuickForm2_Element_InputUrl')) { + class HTML_QuickForm2_Element_InputUrl extends HTML_QuickForm2_Element_Input + { + protected $attributes = array('type' => 'url'); + } + + HTML_QuickForm2_Factory::registerElement('url', 'HTML_QuickForm2_Element_InputUrl'); +} Modified: pear/pearweb/trunk/public_html/channels/add.php =================================================================== --- pear/pearweb/trunk/public_html/channels/add.php 2011-04-12 23:37:37 UTC (rev 310171) +++ pear/pearweb/trunk/public_html/channels/add.php 2011-04-13 00:10:23 UTC (rev 310172) @@ -26,30 +26,12 @@ require_once "Damblan/Log/Mail.php"; require_once 'pear-database-channel.php'; require_once 'HTML/QuickForm2/Renderer.php'; -require_once 'HTML/QuickForm2/Element/Input.php'; +/** @todo Remove once these become available in QF2 */ +require_once 'HTML/QuickForm2/Element/InputUrl.php'; +require_once 'HTML/QuickForm2/Element/InputEmail.php'; + require_once 'PEAR/ChannelFile.php'; -/** @todo Shift ! */ -if (!class_exists('HTML_QuickForm2_Element_InputUrl')) { - class HTML_QuickForm2_Element_InputUrl extends HTML_QuickForm2_Element_Input - { - protected $attributes = array('type' => 'url'); - } - - HTML_QuickForm2_Factory::registerElement('url', 'HTML_QuickForm2_Element_InputUrl'); -} - - -/** @todo Shift ! */ -if (!class_exists('HTML_QuickForm2_Element_InputEmai')) { - class HTML_QuickForm2_Element_InputEmail extends HTML_QuickForm2_Element_Input - { - protected $attributes = array('type' => 'email'); - } - - HTML_QuickForm2_Factory::registerElement('email', 'HTML_QuickForm2_Element_InputEmail'); -} - $chan = new PEAR_ChannelFile; $tabs = array("List" => array("url" => "/channels/index.php", Modified: pear/pearweb/trunk/public_html/channels/edit.php =================================================================== --- pear/pearweb/trunk/public_html/channels/edit.php 2011-04-12 23:37:37 UTC (rev 310171) +++ pear/pearweb/trunk/public_html/channels/edit.php 2011-04-13 00:10:23 UTC (rev 310172) @@ -22,31 +22,14 @@ require_once "Net/URL2.php"; require_once 'pear-database-channel.php'; require_once 'HTML/QuickForm2/Renderer.php'; -require_once 'HTML/QuickForm2/Element/Input.php'; -require_once 'PEAR/ChannelFile.php'; +/** @todo Remove once these become available in QF2 */ +require_once 'HTML/QuickForm2/Element/InputUrl.php'; +require_once 'HTML/QuickForm2/Element/InputEmail.php'; -/** @todo Shift ! */ -if (!class_exists('HTML_QuickForm2_Element_InputUrl')) { - class HTML_QuickForm2_Element_InputUrl extends HTML_QuickForm2_Element_Input - { - protected $attributes = array('type' => 'url'); - } +require_once 'PEAR/ChannelFile.php'; - HTML_QuickForm2_Factory::registerElement('url', 'HTML_QuickForm2_Element_InputUrl'); -} - -/** @todo Shift ! */ -if (!class_exists('HTML_QuickForm2_Element_InputEmai')) { - class HTML_QuickForm2_Element_InputEmail extends HTML_QuickForm2_Element_Input - { - protected $attributes = array('type' => 'email'); - } - - HTML_QuickForm2_Factory::registerElement('email', 'HTML_QuickForm2_Element_InputEmail'); -} - auth_require('pear.admin'); if (empty($_REQUEST['channel']) || !channel::exists($_REQUEST['channel'])) {

« previous php.pear.core (#9870) next »