diff --git a/core/Core.php b/core/Core.php index fde24dbd5..aaf5a030d 100644 --- a/core/Core.php +++ b/core/Core.php @@ -38,8 +38,9 @@ /////////////////////////////////////////////////////////////////////////////// // ENVIRONMENT CONFIG -if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_STRICT)); -else error_reporting(E_ALL); +// ALL errors are reported, including E_STRICT by default *unless* the site is in +// live mode, where reporting is limited to fatal errors and warnings (see later in this file) +error_reporting(E_ALL | E_STRICT); /** * Include _ss_environment.php files @@ -253,13 +254,11 @@ SS_TemplateLoader::instance()->pushManifest(new SS_TemplateManifest( BASE_PATH, false, isset($_GET['flush']) )); -// If this is a dev site, enable php error reporting -// This is necessary to force developers to acknowledge and fix -// notice level errors (you can override this directive in your _config.php) -if (Director::isLive()) { - if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE)); - else error_reporting(E_ALL & ~E_NOTICE); +// If in live mode, ensure deprecation, strict and notices are not reported +if(Director::isLive()) { + error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE)); } + /////////////////////////////////////////////////////////////////////////////// // POST-MANIFEST COMMANDS diff --git a/core/Object.php b/core/Object.php index 4051da256..22532ea9f 100755 --- a/core/Object.php +++ b/core/Object.php @@ -531,7 +531,7 @@ abstract class Object { * @return array Numeric array of either {@link DataExtension} classnames, * or eval'ed classname strings with constructor arguments. */ - function get_extensions($class, $includeArgumentString = false) { + public static function get_extensions($class, $includeArgumentString = false) { $extensions = Config::inst()->get($class, 'extensions'); if($includeArgumentString) { diff --git a/filesystem/File.php b/filesystem/File.php index 9b0ad6458..8e9f4ba5a 100644 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -796,7 +796,7 @@ class File extends DataObject { * @param string $phpIniValue * @return int */ - public function ini2bytes($PHPiniValue) { + public static function ini2bytes($PHPiniValue) { switch(strtolower(substr(trim($PHPiniValue), -1))) { case 'g': $PHPiniValue *= 1024; diff --git a/forms/CompositeField.php b/forms/CompositeField.php index dbb540c4c..2fda6399c 100644 --- a/forms/CompositeField.php +++ b/forms/CompositeField.php @@ -298,39 +298,42 @@ class CompositeField extends FormField { } /** - * Return a readonly version of this field. Keeps the composition but returns readonly - * versions of all the children + * Return a readonly version of this field. Keeps the composition but returns readonly + * versions of all the child {@link FormField} objects. + * + * @return CompositeField */ public function performReadonlyTransformation() { $newChildren = new FieldList(); $clone = clone $this; - foreach($clone->getChildren() as $idx => $child) { + if($clone->getChildren()) foreach($clone->getChildren() as $idx => $child) { if(is_object($child)) $child = $child->transform(new ReadonlyTransformation()); $newChildren->push($child, $idx); } $clone->children = $newChildren; $clone->readonly = true; + return $clone; } /** - * Return a readonly version of this field. Keeps the composition but returns readonly - * versions of all the children + * Return a disabled version of this field. Keeps the composition but returns disabled + * versions of all the child {@link FormField} objects. + * + * @return CompositeField */ - public function performDisabledTransformation($trans) { + public function performDisabledTransformation() { $newChildren = new FieldList(); $clone = clone $this; if($clone->getChildren()) foreach($clone->getChildren() as $idx => $child) { - if(is_object($child)) { - $child = $child->transform($trans); - } + if(is_object($child)) $child = $child->transform(new DisabledTransformation()); $newChildren->push($child, $idx); } $clone->children = $newChildren; $clone->readonly = true; - + return $clone; } @@ -394,15 +397,14 @@ class CompositeField extends FormField { $result .= ""; return $result; } - - function validate($validator){ - + + function validate($validator) { $valid = true; foreach($this->children as $idx => $child){ $valid = ($child && $child->validate($validator) && $valid); } - return $valid; } + } diff --git a/forms/ConfirmedPasswordField.php b/forms/ConfirmedPasswordField.php index 2ee1b49df..d0cd40229 100644 --- a/forms/ConfirmedPasswordField.php +++ b/forms/ConfirmedPasswordField.php @@ -216,8 +216,7 @@ class ConfirmedPasswordField extends FormField { return (!$this->showOnClick || ($this->showOnClick && $isVisible && $isVisible->Value())); } - function validate() { - $validator = $this->form->getValidator(); + function validate($validator) { $name = $this->name; // if field isn't visible, don't validate diff --git a/forms/CurrencyField.php b/forms/CurrencyField.php index 2d2d0ac05..9ef8c48dc 100644 --- a/forms/CurrencyField.php +++ b/forms/CurrencyField.php @@ -37,15 +37,9 @@ class CurrencyField extends TextField { * Create a new class for this field */ function performReadonlyTransformation() { - $field = new CurrencyField_Readonly($this->name, $this->title, $this->value); $field -> addExtraClass($this->extraClass()); return $field; - - /* - $this is-a object and cant be passed as_a string of the first parameter of formfield constructor. - return new CurrencyField_Readonly($this); - */ } function validate($validator) { @@ -71,9 +65,8 @@ class CurrencyField_Readonly extends ReadonlyField{ if($this->value){ $val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); $val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2); - - }else { - $val = ''._t('CurrencyField.CURRENCYSYMBOL', '$').'0.00'; + } else { + $val = ''._t('CurrencyField.CURRENCYSYMBOL', '$').'0.00'; } $valforInput = $this->value ? Convert::raw2att($val) : ""; return "extraClass()."\" id=\"" . $this->id() . "\">$valname."\" value=\"".$valforInput."\" />"; @@ -104,9 +97,8 @@ class CurrencyField_Disabled extends CurrencyField{ if($this->value){ $val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); $val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2); - - }else { - $val = ''._t('CurrencyField.CURRENCYSYMBOL', '$').'0.00'; + } else { + $val = ''._t('CurrencyField.CURRENCYSYMBOL', '$').'0.00'; } $valforInput = $this->value ? Convert::raw2att($val) : ""; return "name."\" value=\"".$valforInput."\" />"; diff --git a/forms/EmailField.php b/forms/EmailField.php index 94a6bb13e..4e8ed4bcc 100644 --- a/forms/EmailField.php +++ b/forms/EmailField.php @@ -19,18 +19,17 @@ class EmailField extends TextField { * @param Validator $validator * @return String */ - function validate($validator){ + function validate($validator) { $this->value = trim($this->value); - - $pcrePattern = '^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$'; + $pcrePattern = '^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$'; // PHP uses forward slash (/) to delimit start/end of pattern, so it must be escaped $pregSafePattern = str_replace('/', '\\/', $pcrePattern); if($this->value && !preg_match('/' . $pregSafePattern . '/i', $this->value)){ - $validator->validationError( - $this->name, + $validator->validationError( + $this->name, _t('EmailField.VALIDATION', "Please enter an email address."), "validation" ); diff --git a/forms/FormField.php b/forms/FormField.php index c8cb87d74..2baf6ea3e 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -88,6 +88,30 @@ class FormField extends RequestHandler { */ protected $attributes = array(); + /** + * Takes a fieldname and converts camelcase to spaced + * words. Also resolves combined fieldnames with dot syntax + * to spaced words. + * + * Examples: + * - 'TotalAmount' will return 'Total Amount' + * - 'Organisation.ZipCode' will return 'Organisation Zip Code' + * + * @param string $fieldName + * @return string + */ + public static function name_to_label($fieldName) { + if(strpos($fieldName, '.') !== false) { + $parts = explode('.', $fieldName); + $label = $parts[count($parts)-2] . ' ' . $parts[count($parts)-1]; + } else { + $label = $fieldName; + } + $label = preg_replace("/([a-z]+)([A-Z])/","$1 $2", $label); + + return $label; + } + /** * Create a new field. * @param name The internal field name, passed to forms. @@ -582,8 +606,8 @@ class FormField extends RequestHandler { /** * @return boolean */ - function isDisabled() { - return $this->disabled; + function isDisabled() { + return $this->disabled; } /** @@ -591,8 +615,8 @@ class FormField extends RequestHandler { * to actually transform this instance. * @param $bool boolean Setting "false" has no effect on the field-state. */ - function setDisabled($bool) { - $this->disabled = $bool; + function setDisabled($bool) { + $this->disabled = $bool; return $this; } @@ -607,21 +631,23 @@ class FormField extends RequestHandler { } /** - * Return a disabled version of this field + * Return a disabled version of this field. + * Tries to find a class of the class name of this field suffixed with "_Disabled", + * failing that, finds a method {@link setDisabled()}. + * + * @return FormField */ function performDisabledTransformation() { $clone = clone $this; $disabledClassName = $clone->class . '_Disabled'; - if( ClassInfo::exists( $disabledClassName ) ) - return new $disabledClassName( $this->name, $this->title, $this->value ); - elseif($clone->hasMethod('setDisabled')){ + if(ClassInfo::exists($disabledClassName)) { + return new $disabledClassName($this->name, $this->title, $this->value); + } else { $clone->setDisabled(true); return $clone; - }else{ - return $this->performReadonlyTransformation(); } } - + function transform(FormTransformation $trans) { return $trans->transform($this); } @@ -662,14 +688,16 @@ class FormField extends RequestHandler { if($content || $tag != 'input') return "<$tag$preparedAttributes>$content"; else return "<$tag$preparedAttributes />"; } - + /** - * Validation Functions for each field type by default - * formfield doesnt have a validation function - * - * @todo shouldn't this be an abstract method? + * Abstract method each {@link FormField} subclass must implement, + * determines whether the field is valid or not based on the value. + * @todo Make this abstract. + * + * @param Validator + * @return boolean */ - function validate() { + function validate($validator) { return true; } @@ -690,7 +718,7 @@ class FormField extends RequestHandler { */ function setDescription($description) { $this->description = $description; - return $this; + return $this; } /** @@ -721,31 +749,7 @@ class FormField extends RequestHandler { return $validator->fieldIsRequired($this->name); } } - - /** - * Takes a fieldname and converts camelcase to spaced - * words. Also resolves combined fieldnames with dot syntax - * to spaced words. - * - * Examples: - * - 'TotalAmount' will return 'Total Amount' - * - 'Organisation.ZipCode' will return 'Organisation Zip Code' - * - * @param string $fieldName - * @return string - */ - public function name_to_label($fieldName) { - if(strpos($fieldName, '.') !== false) { - $parts = explode('.', $fieldName); - $label = $parts[count($parts)-2] . ' ' . $parts[count($parts)-1]; - } else { - $label = $fieldName; - } - $label = preg_replace("/([a-z]+)([A-Z])/","$1 $2", $label); - - return $label; - } - + /** * Set the FieldList that contains this field. * diff --git a/forms/MemberDatetimeOptionsetField.php b/forms/MemberDatetimeOptionsetField.php index 052249445..edc7b37bf 100644 --- a/forms/MemberDatetimeOptionsetField.php +++ b/forms/MemberDatetimeOptionsetField.php @@ -89,12 +89,11 @@ class MemberDatetimeOptionsetField extends OptionsetField { } } - function validate() { + function validate($validator) { $value = isset($_POST[$this->name . '_custom']) ? $_POST[$this->name . '_custom'] : null; if(!$value) return true; // no custom value, don't validate // Check that the current date with the date format is valid or not - $validator = $this->form ? $this->form->getValidator() : null; require_once 'Zend/Date.php'; $date = Zend_Date::now()->toString($value); $valid = Zend_Date::isDate($date, $value); @@ -107,4 +106,4 @@ class MemberDatetimeOptionsetField extends OptionsetField { return false; } } -} \ No newline at end of file +} diff --git a/forms/SelectionGroup.php b/forms/SelectionGroup.php index b2aabefdc..bc95395eb 100644 --- a/forms/SelectionGroup.php +++ b/forms/SelectionGroup.php @@ -27,25 +27,6 @@ class SelectionGroup extends CompositeField { Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css'); } - - /** - * Return a readonly version of this field. Keeps the composition but returns readonly - * versions of all the children - */ - public function performDisabledTransformation($trans) { - $newChildren = array(); - $clone = clone $this; - if($clone->children) foreach($clone->getChildren() as $idx => $child) { - if(is_object($child)) { - $child = $child->transform($trans); - } - $newChildren[$idx] = $child; - } - - $clone->setChildren(new FieldList($newChildren)); - $clone->setReadonly(true); - return $clone; - } function FieldSet() { return $this->FieldList(); @@ -76,7 +57,7 @@ class SelectionGroup extends CompositeField { if(is_object($item)) $newItems[] = $item->customise($extra); else $newItems[] = new ArrayData($extra); - $firstSelected = $checked =""; + $firstSelected = $checked =""; } return new ArrayList($newItems); } diff --git a/forms/TabSet.php b/forms/TabSet.php index defcfbe52..03ff06689 100644 --- a/forms/TabSet.php +++ b/forms/TabSet.php @@ -129,7 +129,7 @@ class TabSet extends CompositeField { /** * Add a new child field to the end of the set. */ - public function push($field) { + public function push(FormField $field) { parent::push($field); $field->setTabSet($this); } @@ -155,4 +155,4 @@ class TabSet extends CompositeField { public function removeByName( $tabName, $dataFieldOnly = false ) { parent::removeByName( $tabName, $dataFieldOnly ); } -} \ No newline at end of file +} diff --git a/forms/TableField.php b/forms/TableField.php index 0d202ccc8..2ac169eef 100644 --- a/forms/TableField.php +++ b/forms/TableField.php @@ -687,7 +687,7 @@ class TableField_Item extends TableListField_Item { return new FieldList($this->fields); } - function Fields() { + function Fields($xmlSafe = true) { return $this->fields; } diff --git a/model/Hierarchy.php b/model/Hierarchy.php index 743fba886..1c5f58837 100644 --- a/model/Hierarchy.php +++ b/model/Hierarchy.php @@ -25,7 +25,7 @@ class Hierarchy extends DataExtension { function augmentWrite(&$manipulation) { } - static function add_to_class($class, $extensionClass, $args) { + static function add_to_class($class, $extensionClass, $args = null) { Config::inst()->update($class, 'has_one', array('Parent' => $class)); parent::add_to_class($class, $extensionClass, $args); } diff --git a/model/Versioned.php b/model/Versioned.php index dc9a62500..7b6924c1f 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -107,7 +107,7 @@ class Versioned extends DataExtension { 'Version' => 'Int' ); - static function add_to_class($class, $extensionClass, $args) { + static function add_to_class($class, $extensionClass, $args = null) { Config::inst()->update($class, 'has_many', array('Versions' => $class)); parent::add_to_class($class, $extensionClass, $args); } diff --git a/model/fieldtypes/CompositeDBField.php b/model/fieldtypes/CompositeDBField.php index b1aa39055..b1d48f57a 100644 --- a/model/fieldtypes/CompositeDBField.php +++ b/model/fieldtypes/CompositeDBField.php @@ -7,7 +7,7 @@ * * Example with a combined street name and number: * -* class Street extends DBFields implements CompositeDBField() { +* class Street extends DBField implements CompositeDBField { * protected $streetNumber; * protected $streetName; * protected $isChanged = false; @@ -42,7 +42,7 @@ * } * * function setValue($value, $record = null, $markChanged=true) { -* if ($value instanceof Street && $value->hasValue()) { +* if ($value instanceof Street && $value->exists()) { * $this->setStreetName($value->getStreetName(), $markChanged); * $this->setStreetNumber($value->getStreetNumber(), $markChanged); * if($markChanged) $this->isChanged = true; @@ -85,7 +85,7 @@ * return $this->isChanged; * } * -* function hasValue() { +* function exists() { * return ($this->getStreetName() || $this->getStreetNumber()); * } * } @@ -179,4 +179,4 @@ interface CompositeDBField { */ function exists(); -} \ No newline at end of file +} diff --git a/model/fieldtypes/Time.php b/model/fieldtypes/Time.php index 50b92cf63..a9b85b02d 100644 --- a/model/fieldtypes/Time.php +++ b/model/fieldtypes/Time.php @@ -16,7 +16,7 @@ */ class Time extends DBField { - function setValue($value) { + function setValue($value, $record = null) { if($value) { if(preg_match( '/(\d{1,2})[:.](\d{2})([a|A|p|P|][m|M])/', $value, $match )) $this->TwelveHour( $match ); else $this->value = date('H:i:s', strtotime($value)); diff --git a/search/FulltextSearchable.php b/search/FulltextSearchable.php index a69c13436..d3449c444 100644 --- a/search/FulltextSearchable.php +++ b/search/FulltextSearchable.php @@ -75,7 +75,7 @@ class FulltextSearchable extends DataExtension { parent::__construct(); } - static function add_to_class($class, $extensionClass, $args) { + static function add_to_class($class, $extensionClass, $args = null) { Config::inst()->update($class, 'indexes', array('SearchFields' => array( 'type' => 'fulltext', 'name' => 'SearchFields', @@ -90,7 +90,7 @@ class FulltextSearchable extends DataExtension { * * @return Array */ - function get_searchable_classes() { + static function get_searchable_classes() { return self::$searchable_classes; } diff --git a/security/ChangePasswordForm.php b/security/ChangePasswordForm.php index 21deb3402..77872cc7b 100644 --- a/security/ChangePasswordForm.php +++ b/security/ChangePasswordForm.php @@ -111,7 +111,7 @@ class ChangePasswordForm extends Form { } else { // Redirect to default location - the login form saying "You are logged in as..." - $redirectURL = HTTP::setGetVar('BackURL', Director::absoluteBaseURL(), Security::Link('login')); + $redirectURL = HTTP::setGetVar('BackURL', Director::absoluteBaseURL(), $this->controller->Link('login')); Director::redirect($redirectURL); } } else { diff --git a/security/MemberLoginForm.php b/security/MemberLoginForm.php index 9675b7c4a..f85263992 100644 --- a/security/MemberLoginForm.php +++ b/security/MemberLoginForm.php @@ -130,14 +130,14 @@ JS if(isset($_REQUEST['BackURL'])) $backURL = $_REQUEST['BackURL']; else $backURL = null; - if($backURL) Session::set('BackURL', $backURL); + if($backURL) Session::set('BackURL', $backURL); if($badLoginURL = Session::get("BadLoginURL")) { $this->controller->redirect($badLoginURL); } else { // Show the right tab on failed login - $loginLink = Director::absoluteURL(Security::Link("login")); - if($backURL) $loginLink .= '?BackURL=' . urlencode($backURL); + $loginLink = Director::absoluteURL($this->controller->Link('login')); + if($backURL) $loginLink .= '?BackURL=' . urlencode($backURL); $this->controller->redirect($loginLink . '#' . $this->FormName() .'_tab'); } } diff --git a/security/PermissionCheckboxSetField.php b/security/PermissionCheckboxSetField.php index db9027068..cad6474a6 100644 --- a/security/PermissionCheckboxSetField.php +++ b/security/PermissionCheckboxSetField.php @@ -281,7 +281,7 @@ class PermissionCheckboxSetField_Readonly extends PermissionCheckboxSetField { protected $readonly = true; - function saveInto($record) { + function saveInto(DataObjectInterface $record) { return false; } } diff --git a/security/Security.php b/security/Security.php index dfa658259..5d69b99ce 100644 --- a/security/Security.php +++ b/security/Security.php @@ -514,7 +514,9 @@ class Security extends Controller { */ public static function getPasswordResetLink($autoLoginHash) { $autoLoginHash = urldecode($autoLoginHash); - return self::Link('changepassword') . "?h=$autoLoginHash"; + $selfControllerClass = __CLASS__; + $selfController = new $selfControllerClass(); + return $selfController->Link('changepassword') . "?h=$autoLoginHash"; } /** diff --git a/tests/forms/MemberDatetimeOptionsetFieldTest.php b/tests/forms/MemberDatetimeOptionsetFieldTest.php index b2a381651..608ddf3b6 100644 --- a/tests/forms/MemberDatetimeOptionsetFieldTest.php +++ b/tests/forms/MemberDatetimeOptionsetFieldTest.php @@ -83,11 +83,11 @@ class MemberDatetimeOptionsetFieldTest extends SapphireTest { function testDateFormValid() { $field = new MemberDatetimeOptionsetField('DateFormat', 'DateFormat'); - $this->assertTrue($field->validate()); + $this->assertTrue($field->validate(null)); $_POST['DateFormat_custom'] = 'dd MM yyyy'; - $this->assertTrue($field->validate()); + $this->assertTrue($field->validate(null)); $_POST['DateFormat_custom'] = 'sdfdsfdfd1244'; - $this->assertFalse($field->validate()); + $this->assertFalse($field->validate(null)); } } @@ -97,4 +97,4 @@ class MemberDatetimeOptionsetFieldTest_Controller extends Controller { return 'test'; } -} \ No newline at end of file +} diff --git a/thirdparty/simpletest/compatibility.php b/thirdparty/simpletest/compatibility.php index 4e0f78a4b..31f31b7df 100644 --- a/thirdparty/simpletest/compatibility.php +++ b/thirdparty/simpletest/compatibility.php @@ -19,7 +19,7 @@ class SimpleTestCompatibility { * @access public * @static */ - function copy($object) { + static function copy($object) { if (version_compare(phpversion(), '5') >= 0) { eval('$copy = clone $object;'); return $copy; @@ -170,4 +170,4 @@ class SimpleTestCompatibility { } } } -?> \ No newline at end of file +?> diff --git a/thirdparty/simpletest/form.php b/thirdparty/simpletest/form.php index b359552f4..be85e2e01 100644 --- a/thirdparty/simpletest/form.php +++ b/thirdparty/simpletest/form.php @@ -120,7 +120,7 @@ class SimpleForm { $class = $this->_encoding; $encoding = new $class(); for ($i = 0, $count = count($this->_widgets); $i < $count; $i++) { - $this->_widgets[$i]->write($encoding); + $this->_widgets[$i]->write($encoding, 0, 0); } return $encoding; } @@ -305,7 +305,7 @@ class SimpleForm { foreach ($this->_buttons as $button) { if ($selector->isMatch($button)) { $encoding = $this->_encode(); - $button->write($encoding); + $button->write($encoding, 0, 0); if ($additional) { $encoding->merge($additional); } diff --git a/thirdparty/simpletest/page.php b/thirdparty/simpletest/page.php index 6c037626c..54b26acfd 100644 --- a/thirdparty/simpletest/page.php +++ b/thirdparty/simpletest/page.php @@ -980,4 +980,4 @@ class SimplePage { return null; } } -?> + diff --git a/thirdparty/simpletest/parser.php b/thirdparty/simpletest/parser.php index 93f8cf980..35616d717 100644 --- a/thirdparty/simpletest/parser.php +++ b/thirdparty/simpletest/parser.php @@ -690,7 +690,7 @@ class SimpleHtmlSaxParser { * @access public * @static */ - function decodeHtml($html) { + static function decodeHtml($html) { return html_entity_decode($html, ENT_QUOTES); } @@ -703,7 +703,7 @@ class SimpleHtmlSaxParser { * @access public * @static */ - function normalise($html) { + static function normalise($html) { $text = preg_replace('||', '', $html); $text = preg_replace('|]*>.*?|', '', $text); $text = preg_replace('|]*alt\s*=\s*"([^"]*)"[^>]*>|', ' \1 ', $text); @@ -761,4 +761,4 @@ class SimpleSaxListener { function addContent($text) { } } -?> + diff --git a/thirdparty/simpletest/tag.php b/thirdparty/simpletest/tag.php index 7bccae205..b7749db03 100644 --- a/thirdparty/simpletest/tag.php +++ b/thirdparty/simpletest/tag.php @@ -325,7 +325,7 @@ class SimpleWidget extends SimpleTag { * @param SimpleEncoding $encoding Form packet. * @access public */ - function write(&$encoding) { + function write(&$encoding, $x, $y) { if ($this->getName()) { $encoding->add($this->getName(), $this->getValue()); } @@ -680,7 +680,7 @@ class SimpleUploadTag extends SimpleWidget { * @param SimpleEncoding $encoding Form packet. * @access public */ - function write(&$encoding) { + function write(&$encoding, $x, $y) { if (! file_exists($this->getValue())) { return; } @@ -1415,4 +1415,4 @@ class SimpleFrameTag extends SimpleTag { return false; } } -?> \ No newline at end of file +