- * $emailWriter = new SS_LogEmailWriter('my@email.com');
- * SS_Log::add_writer($emailWriter, SS_Log::ERR);
- *
- *
- * @param string $emailAddress
- * @param string $errno
- * @param string $errstr
- * @param string $errfile
- * @param int $errline
- * @param string $errcontext
- * @param string $errorType "warning" or "error"
- * @return boolean
- */
- public static function emailError($emailAddress, $errno, $errstr, $errfile, $errline, $errcontext,
- $errorType = "Error") {
-
- Deprecation::notice('2.5',
- 'Use SS_Log instead. See the class documentation in SS_Log.php for more information.');
- $priority = ($errorType == 'Error') ? SS_Log::ERR : SS_Log::WARN;
- $writer = new SS_LogEmailWriter($emailAddress);
- SS_Log::add_writer($writer, $priority);
- SS_Log::log(
- array(
- 'errno' => $errno,
- 'errstr' => $errstr,
- 'errfile' => $errfile,
- 'errline' => $errline,
- 'errcontext' => $errcontext
- ),
- $priority
- );
- SS_Log::remove_writer($writer);
- }
-
- /**
- * Log the given error, if self::$log_errors is set.
- * Uses the native error_log() funtion in PHP.
- *
- * Format: [d-M-Y h:i:s]
- * array('*' => 200, 'jpg' => 1000)
- *
- *
- * @deprecated 2.5 Please use Upload_Validator::setAllowedMaxFileSize() instead
- *
- * @param array|int $rules
- */
- public function setAllowedMaxFileSize($rules) {
- Deprecation::notice('2.5', 'Use Upload_Validator::setAllowedMaxFileSize() instead.');
- $this->validator->setAllowedMaxFileSize($rules);
- }
-
- /**
- * @deprecated 2.5 Please use Upload_Validator::getAllowedExtensions() instead
- * @return array
- */
- public function getAllowedExtensions() {
- Deprecation::notice('2.5', 'Use Upload_Validator::getAllowedExtensions() instead.');
- return $this->validator->getAllowedExtensions();
- }
-
- /**
- * @deprecated 2.5 Please use Upload_Validator::setAllowedExtensions() instead
- * @param array $rules
- */
- public function setAllowedExtensions($rules) {
- Deprecation::notice('2.5', 'Use Upload_Validator::setAllowedExtensions() instead.');
- $this->validator->setAllowedExtensions($rules);
- }
-
- /**
- * Determines if the bytesize of an uploaded
- * file is valid - can be defined on an
- * extension-by-extension basis in {$allowedMaxFileSize}
- *
- * @deprecated 2.5 Please use Upload_Validator::isValidExtension() instead
- *
- * @param array $tmpFile
- * @return boolean
- */
- public function isValidSize($tmpFile) {
- Deprecation::notice('2.5', 'Use Upload_Validator::isValidSize() instead.');
- $validator = new Upload_Validator();
- $validator->setTmpFile($tmpFile);
- return $validator->isValidSize();
- }
-
- /**
- * Determines if the temporary file has a valid extension
- *
- * @deprecated 2.5 Please use Upload_Validator::isValidExtension() instead
- *
- * @param array $tmpFile
- * @return boolean
- */
- public function isValidExtension($tmpFile) {
- Deprecation::notice('2.5', 'Use Upload_Validator::isValidExtension() instead.');
- $validator = new Upload_Validator();
- $validator->setTmpFile($tmpFile);
- return $validator->isValidExtension();
- }
-
/**
* Clear out all errors (mostly set by {loadUploaded()})
*/
diff --git a/forms/AjaxUniqueTextField.php b/forms/AjaxUniqueTextField.php
index 952f507f5..d41fed224 100644
--- a/forms/AjaxUniqueTextField.php
+++ b/forms/AjaxUniqueTextField.php
@@ -52,7 +52,7 @@ class AjaxUniqueTextField extends TextField {
'maxlength' => ($this->maxLength) ? $this->maxLength : null
);
- return $this->createTag('input', $attributes);
+ return FormField::create_tag('input', $attributes);
}
public function validate( $validator ) {
diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php
index 3ec2deb1a..2cbc9ff81 100644
--- a/forms/ComplexTableField.php
+++ b/forms/ComplexTableField.php
@@ -21,7 +21,7 @@
* - childID Identifier of the database-record (the targeted table is determined by the $sourceClass
* parameter)
*
- * @deprecated 3.0 Use GridField with GridFieldConfig_RecordEditor
+ * @deprecated 3.1 Use GridField with GridFieldConfig_RecordEditor
*
* @todo Control width/height of popup by constructor (hardcoded at the moment)
* @package forms
@@ -453,7 +453,7 @@ JS;
}
/**
- * @deprecated 3.0
+ * @deprecated 3.1
*/
public function setRelationAutoSetting($value) {
Deprecation::notice('3.0', 'Manipulate the DataList instead.');
diff --git a/forms/CompositeField.php b/forms/CompositeField.php
index 37923a7f8..1887b5b53 100644
--- a/forms/CompositeField.php
+++ b/forms/CompositeField.php
@@ -69,14 +69,6 @@ class CompositeField extends FormField {
return $this->children;
}
- /**
- * @deprecated 3.0 Please use {@link FieldList()}.
- */
- public function FieldSet() {
- Deprecation::notice('3.0', 'Use FieldList() instead.');
- return $this->FieldList();
- }
-
public function setID($id) {
$this->id = $id;
return $this;
diff --git a/forms/FieldSet.php b/forms/FieldSet.php
deleted file mode 100644
index 307015c87..000000000
--- a/forms/FieldSet.php
+++ /dev/null
@@ -1,17 +0,0 @@
- 1 ? func_get_args(): $items);
- }
-}
diff --git a/forms/FileField.php b/forms/FileField.php
index 6b1b8d210..95ffc1d98 100644
--- a/forms/FileField.php
+++ b/forms/FileField.php
@@ -43,30 +43,6 @@
*/
class FileField extends FormField {
- /**
- * Restrict filesize for either all filetypes
- * or a specific extension, with extension-name
- * as array-key and the size-restriction in bytes as array-value.
- *
- * @deprecated 2.5
- * @var array
- */
- public $allowedMaxFileSize = array();
-
- /**
- * @var array Collection of extensions.
- * Extension-names are treated case-insensitive.
- *
- * Example:
- *
- * array("jpg","GIF")
- *
- *
- * @deprecated 2.5
- * @var array
- */
- public $allowedExtensions = array();
-
/**
* Flag to automatically determine and save a has_one-relationship
* on the saved record (e.g. a "Player" has_one "PlayerImage" would
@@ -102,14 +78,6 @@ class FileField extends FormField {
* @param int $value The value of the field.
*/
public function __construct($name, $title = null, $value = null) {
- if(count(func_get_args()) > 3) {
- Deprecation::notice(
- '3.0',
- 'Use setRightTitle() and setFolderName() instead of constructor arguments',
- Deprecation::SCOPE_GLOBAL
- );
- }
-
$this->upload = new Upload();
parent::__construct($name, $title, $value);
@@ -223,4 +191,4 @@ class FileField extends FormField {
$this->upload = $upload;
}
-}
\ No newline at end of file
+}
diff --git a/forms/FileIFrameField.php b/forms/FileIFrameField.php
deleted file mode 100644
index 7e122de9f..000000000
--- a/forms/FileIFrameField.php
+++ /dev/null
@@ -1,277 +0,0 @@
-canUploadNewFile = $can;
- }
-
- /**
- * @return boolean
- */
- public function getCanUploadNewFile() {
- return $this->canUploadNewFile;
- }
-
- /**
- * The data class that this field is editing.
- * @return string Class name
- */
- public function dataClass() {
- if($this->form && $this->form->getRecord()) {
- $class = $this->form->getRecord()->has_one($this->getName());
- return ($class) ? $class : 'File';
- } else {
- return 'File';
- }
- }
-
- /**
- * @return string
- */
- public function Field($properties = array()) {
- Deprecation::notice('3.0', 'Use UploadField');
-
- Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
- Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
- Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
- Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
-
-
- if($this->form->getRecord() && $this->form->getRecord()->exists()) {
- $record = $this->form->getRecord();
- if(class_exists('Translatable') && SiteTree::has_extension('Translatable') && $record->Locale){
- $iframe = "iframe?locale=".$record->Locale;
- }else{
- $iframe = "iframe";
- }
-
- return $this->createTag (
- 'iframe',
- array (
- 'name' => $this->getName() . '_iframe',
- 'src' => Controller::join_links($this->Link(), $iframe),
- 'style' => 'height: 152px; width: 100%; border: none;'
- )
- ) . $this->createTag (
- 'input',
- array (
- 'type' => 'hidden',
- 'id' => $this->ID(),
- 'name' => $this->getName() . 'ID',
- 'value' => $this->attrValue()
- )
- );
- } else {
- return _t(
- 'FileIFrameField.ATTACHONCESAVED',
- '{type}s can be attached once you have saved the record for the first time.',
- array('type' => $this->FileTypeName())
- );
- }
- }
-
- /**
- * Attempt to retreive a File object that has already been attached to this forms data record
- *
- * @return File|null
- */
- public function AttachedFile() {
- return $this->form->getRecord() ? $this->form->getRecord()->{$this->getName()}() : null;
- }
-
- /**
- * @return string
- */
- public function iframe() {
- // clear the requirements added by any parent controllers
- Requirements::clear();
- Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
- Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
- Requirements::javascript(FRAMEWORK_DIR . '/javascript/FileIFrameField.js');
-
- Requirements::css(FRAMEWORK_DIR . '/css/FileIFrameField.css');
-
- return $this->renderWith('FileIframeField_iframe');
- }
-
- /**
- * @return Form
- */
- public function EditFileForm() {
- $uploadFile = _t('FileIFrameField.FROMCOMPUTER', 'From your Computer');
- $selectFile = _t('FileIFrameField.FROMFILESTORE', 'From the File Store');
-
- if($this->AttachedFile() && $this->AttachedFile()->ID) {
- $title = _t('FileIFrameField.REPLACE', 'Replace {type}', array('type' => $this->FileTypeName()));
- } else {
- $title = _t('FileIFrameField.ATTACH', 'Attach {type}', array('type' => $this->FileTypeName()));
- }
-
- $fileSources = array();
-
- if(singleton($this->dataClass())->canCreate()) {
- if($this->canUploadNewFile) {
- $fileSources["new//$uploadFile"] = new FileField('Upload', '');
- }
- }
-
- $fileSources["existing//$selectFile"] = new TreeDropdownField('ExistingFile', '', 'File');
-
- $fields = new FieldList (
- new HeaderField('EditFileHeader', $title),
- new SelectionGroup('FileSource', $fileSources)
- );
-
- // locale needs to be passed through from the iframe source
- if(isset($_GET['locale'])) {
- $fields->push(new HiddenField('locale', '', $_GET['locale']));
- }
-
- return new Form (
- $this,
- 'EditFileForm',
- $fields,
- new FieldList(
- new FormAction('save', $title)
- )
- );
- }
-
- public function save($data, $form) {
- // check the user has entered all the required information
- if (
- !isset($data['FileSource'])
- || ($data['FileSource'] == 'new' && (!isset($_FILES['Upload']) || !$_FILES['Upload']))
- || ($data['FileSource'] == 'existing' && (!isset($data['ExistingFile']) || !$data['ExistingFile']))
- ) {
- $form->sessionMessage(_t('FileIFrameField.NOSOURCE', 'Please select a source file to attach'), 'required');
- $form->getController()->redirectBack();
- return;
- }
-
- $desiredClass = $this->dataClass();
- $controller = $this->form->getController();
-
- // upload a new file
- if($data['FileSource'] == 'new') {
- $fileObject = Object::create($desiredClass);
-
- try {
- $this->upload->loadIntoFile($_FILES['Upload'], $fileObject, $this->folderName);
- } catch (Exception $e){
- $form->sessionMessage(_t('FileIFrameField.DISALLOWEDFILETYPE',
- 'This filetype is not allowed to be uploaded'), 'bad');
- $controller->redirectBack();
- return;
- }
-
- if($this->upload->isError()) {
- $controller->redirectBack();
- return;
- }
-
- $this->form->getRecord()->{$this->getName() . 'ID'} = $fileObject->ID;
-
- $fileObject->write();
- }
-
- // attach an existing file from the assets store
- if($data['FileSource'] == 'existing') {
- $fileObject = DataObject::get_by_id('File', $data['ExistingFile']);
-
- // dont allow the user to attach a folder by default
- if(!$fileObject || ($fileObject instanceof Folder && $desiredClass != 'Folder')) {
- $controller->redirectBack();
- return;
- }
-
- $this->form->getRecord()->{$this->getName() . 'ID'} = $fileObject->ID;
-
- if(!$fileObject instanceof $desiredClass) {
- $fileObject->ClassName = $desiredClass;
- $fileObject->write();
- }
- }
-
- $this->form->getRecord()->write();
- $controller->redirectBack();
- }
-
- /**
- * @return Form
- */
- public function DeleteFileForm() {
- $form = new Form (
- $this,
- 'DeleteFileForm',
- new FieldList (
- new HiddenField('DeleteFile', null, false)
- ),
- new FieldList (
- $deleteButton = new FormAction (
- 'delete', _t('FileIFrameField.DELETE', 'Delete {type}', array('type' => $this->FileTypeName()))
- )
- )
- );
-
- $deleteButton->addExtraClass('delete');
- return $form;
- }
-
- public function delete($data, $form) {
- // delete the actual file, or just un-attach it?
- if(isset($data['DeleteFile']) && $data['DeleteFile']) {
- $file = DataObject::get_by_id('File', $this->form->getRecord()->{$this->getName() . 'ID'});
-
- if($file) {
- $file->delete();
- }
- }
-
- // then un-attach file from this record
- $this->form->getRecord()->{$this->getName() . 'ID'} = 0;
- $this->form->getRecord()->write();
-
- $this->form->getController()->redirectBack();
- }
-
- /**
- * Get the type of file this field is used to attach (e.g. File, Image)
- *
- * @return string
- */
- public function FileTypeName() {
- return _t('FileIFrameField.FILE', 'File');
- }
-
-}
diff --git a/forms/Form.php b/forms/Form.php
index c93d1e453..5c451f7e2 100644
--- a/forms/Form.php
+++ b/forms/Form.php
@@ -575,24 +575,6 @@ class Form extends RequestHandler {
return $this;
}
- /**
- * Get a named field from this form's fields.
- * It will traverse into composite fields for you, to find the field you want.
- * It will only return a data field.
- *
- * @deprecated 3.0 Use Fields() and FieldList API instead
- * @return FormField
- */
- public function dataFieldByName($name) {
- Deprecation::notice('3.0', 'Use Fields() and FieldList API instead');
-
- foreach($this->getExtraFields() as $field) {
- if(!$this->fields->dataFieldByName($field->getName())) $this->fields->push($field);
- }
-
- return $this->fields->dataFieldByName($name);
- }
-
/**
* Return the form's action buttons - used by the templates
*
@@ -620,18 +602,6 @@ class Form extends RequestHandler {
return $this;
}
- /**
- * Unset the form's action button by its name.
- *
- * @deprecated 3.0 Use Actions() and FieldList API instead
- * @param string $name
- */
- public function unsetActionByName($name) {
- Deprecation::notice('3.0', 'Use Actions() and FieldList API instead');
-
- $this->actions->removeByName($name);
- }
-
/**
* @param String
* @param String
@@ -667,34 +637,6 @@ class Form extends RequestHandler {
return $attrs;
}
- /**
- * Unset the form's dataField by its name
- *
- * @deprecated 3.0 Use Fields() and FieldList API instead
- */
- public function unsetDataFieldByName($fieldName){
- Deprecation::notice('3.0', 'Use Fields() and FieldList API instead');
-
- foreach($this->Fields()->dataFields() as $child) {
- if(is_object($child) && ($child->getName() == $fieldName || $child->Title() == $fieldName)) {
- $child = null;
- }
- }
- }
-
- /**
- * Remove a field from the given tab.
- *
- * @deprecated 3.0 Use Fields() and FieldList API instead
- */
- public function unsetFieldFromTab($tabName, $fieldName) {
- Deprecation::notice('3.0', 'Use Fields() and FieldList API instead');
-
- // Find the tab
- $tab = $this->Fields()->findOrMakeTab($tabName);
- $tab->removeByName($fieldName);
- }
-
/**
* Return the attributes of the form tag - used by the templates.
*
@@ -806,14 +748,6 @@ class Form extends RequestHandler {
return $this;
}
- /**
- * @deprecated 3.0 Please use {@link getEncType}.
- */
- public function FormEncType() {
- Deprecation::notice('3.0', 'Please use Form->getEncType() instead.');
- return $this->getEncType();
- }
-
/**
* Returns the real HTTP method for the form:
* GET, POST, PUT, DELETE or HEAD.
@@ -1216,25 +1150,6 @@ class Form extends RequestHandler {
return $data;
}
- /**
- * Resets a specific field to its passed default value.
- * Does NOT clear out all submitted data in the form.
- *
- * @deprecated 3.0 Use Fields() and FieldList API instead
- * @param string $fieldName
- * @param mixed $fieldValue
- */
- public function resetField($fieldName, $fieldValue = null) {
- Deprecation::notice('3.0', 'Use Fields() and FieldList API instead');
-
- $dataFields = $this->fields->dataFields();
- if($dataFields) foreach($dataFields as $field) {
- if($field->getName()==$fieldName) {
- $field = $field->setValue($fieldValue);
- }
- }
- }
-
/**
* Call the given method on the given field.
* This is used by Ajax-savvy form fields. By putting '&action=callfieldmethod' to the end
@@ -1380,34 +1295,6 @@ class Form extends RequestHandler {
return $this;
}
- /**
- * Disable security tokens for every form.
- * Note that this doesn't apply to {@link SecurityToken}
- * instances outside of the Form class, nor applies
- * to existing form instances.
- *
- * See {@link enable_all_security_tokens()}.
- *
- * @deprecated 2.5 Use SecurityToken::disable()
- */
- public static function disable_all_security_tokens() {
- Deprecation::notice('2.5', 'Use SecurityToken::disable() instead.');
- SecurityToken::disable();
- }
-
- /**
- * Returns true if security is enabled - that is if the security token
- * should be included and checked on this form.
- *
- * @deprecated 2.5 Use Form->getSecurityToken()->isEnabled()
- *
- * @return bool
- */
- public function securityTokenEnabled() {
- Deprecation::notice('2.5', 'Use Form->getSecurityToken()->isEnabled() instead.');
- return $this->securityToken->isEnabled();
- }
-
/**
* Returns the security token for this form (if any exists).
* Doesn't check for {@link securityTokenEnabled()}.
diff --git a/forms/FormField.php b/forms/FormField.php
index a0c749259..0ec3dd06a 100644
--- a/forms/FormField.php
+++ b/forms/FormField.php
@@ -117,6 +117,23 @@ class FormField extends RequestHandler {
return $label;
}
+ /**
+ * Construct and return HTML tag.
+ */
+ public static function create_tag($tag, $attributes, $content = null) {
+ $preparedAttributes = '';
+ foreach($attributes as $k => $v) {
+ // Note: as indicated by the $k == value item here; the decisions over what to include in the attributes
+ // can sometimes get finicky
+ if(!empty($v) || $v === '0' || $k == 'value') {
+ $preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
+ }
+ }
+
+ if($content || $tag != 'input') return "<$tag$preparedAttributes>$content$tag>";
+ else return "<$tag$preparedAttributes />";
+ }
+
/**
* Create a new field.
* @param name The internal field name, passed to forms.
@@ -159,14 +176,6 @@ class FormField extends RequestHandler {
return $this->name;
}
- /**
- * @deprecated 3.0 Use {@link getName()}.
- */
- public function Name() {
- Deprecation::notice('3.0', 'Use getName() instead.');
- return $this->getName();
- }
-
/**
* Returns the field message, used by form validation.
* Use {@link setError()} to set this property.
@@ -254,30 +263,6 @@ class FormField extends RequestHandler {
return $this;
}
- /**
- * Set tabindex HTML attribute
- * (defaults to none).
- *
- * @deprecated 3.0 Use setAttribute("tabindex") instead
- * @param int $index
- */
- public function setTabIndex($index) {
- Deprecation::notice('3.0', 'Use setAttribute("tabindex") instead');
- $this->setAttribute($index);
- return $this;
- }
-
- /**
- * Get tabindex (if previously set)
- *
- * @deprecated 3.0 Use getAttribute("tabindex") instead
- * @return int
- */
- public function getTabIndex() {
- Deprecation::notice('3.0', 'Use getAttribute("tabindex") instead');
- return $this->getAttribute('tabindex');
- }
-
/**
* Compiles all CSS-classes. Optionally includes a "nolabel"-class
* if no title was set on the formfield.
@@ -771,26 +756,9 @@ class FormField extends RequestHandler {
return strtolower(preg_replace('/Field$/', '', $this->class));
}
- /**
- * Construct and return HTML tag.
- *
- * @deprecated 3.0 Please define your own FormField template using {@link setFieldTemplate()}
- * and/or {@link renderFieldTemplate()}
- *
- * @todo Transform to static helper method.
- */
public function createTag($tag, $attributes, $content = null) {
- $preparedAttributes = '';
- foreach($attributes as $k => $v) {
- // Note: as indicated by the $k == value item here; the decisions over what to include in the attributes
- // can sometimes get finicky
- if(!empty($v) || $v === '0' || $k == 'value') {
- $preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
- }
- }
-
- if($content || $tag != 'input') return "<$tag$preparedAttributes>$content$tag>";
- else return "<$tag$preparedAttributes />";
+ Deprecation::notice('3.1', 'Use FormField::create_tag()');
+ return self::create_tag($tag, $attributes, $content);
}
/**
@@ -805,15 +773,6 @@ class FormField extends RequestHandler {
return true;
}
- /**
- * @deprecated 3.0 Use setDescription()
- */
- public function describe($description) {
- Deprecation::notice('3.0', 'Use setDescription()');
- $this->setDescription($description);
- return $this;
- }
-
/**
* Describe this field, provide help text for it.
* By default, renders as a "title" attribute on the form field.
diff --git a/forms/GroupedDropdownField.php b/forms/GroupedDropdownField.php
index 50e2ae724..3ab4bab5b 100644
--- a/forms/GroupedDropdownField.php
+++ b/forms/GroupedDropdownField.php
@@ -55,7 +55,7 @@ class GroupedDropdownField extends DropdownField {
}
}
- return $this->createTag('select', $this->getAttributes(), $options);
+ return FormField::create_tag('select', $this->getAttributes(), $options);
}
public function Type() {
diff --git a/forms/HasManyComplexTableField.php b/forms/HasManyComplexTableField.php
index 864eee721..667c44bda 100644
--- a/forms/HasManyComplexTableField.php
+++ b/forms/HasManyComplexTableField.php
@@ -31,7 +31,7 @@
*
* @see http://doc.silverstripe.org/tutorial/5-dataobject-relationship-management
*
- * @deprecated 3.0 Use GridField with GridFieldConfig_RelationEditor
+ * @deprecated 3.1 Use GridField with GridFieldConfig_RelationEditor
*
* @package forms
* @subpackage fields-relational
diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php
index 23750ae01..deee5bccd 100644
--- a/forms/HtmlEditorField.php
+++ b/forms/HtmlEditorField.php
@@ -46,11 +46,6 @@ class HtmlEditorField extends TextareaField {
* @see TextareaField::__construct()
*/
public function __construct($name, $title = null, $value = '') {
- if(count(func_get_args()) > 3) {
- Deprecation::notice('3.0', 'Use setRows() and setColumns() instead of constructor arguments',
- Deprecation::SCOPE_GLOBAL);
- }
-
parent::__construct($name, $title, $value);
self::include_js();
@@ -81,11 +76,10 @@ class HtmlEditorField extends TextareaField {
}
}
- return $this->createTag (
- 'textarea',
- $this->getAttributes(),
- htmlentities($value->getContent(), ENT_COMPAT, 'UTF-8')
- );
+ $properties['Value'] = htmlentities($value->getContent(), ENT_COMPAT, 'UTF-8');
+ $obj = $this->customise($properties);
+
+ return $obj->renderWith($this->getTemplates());
}
public function getAttributes() {
diff --git a/forms/ImageField.php b/forms/ImageField.php
deleted file mode 100644
index b478d5344..000000000
--- a/forms/ImageField.php
+++ /dev/null
@@ -1,60 +0,0 @@
-Usage
- *
- * If you want to upload all assets from this field to a given folder you can define the folder in 2 ways. Either in
- * the constructor or as a method on the field
- *
- *
- * $myField = new ImageField("myName", "Upload image below", null, null, null, "myFolder");
- *
- *
- * Will upload images into the assets/myFolder folder. If that folder does not exist it will create it for you. You can
- * also define it as a method
- *
- *
- * $myField = new ImageField("myName");
- * $myField->setFolderName('myFolder');
- *
- *
- * @deprecated 3.0 Use UploadField with $myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'));
- *
- * @package forms
- * @subpackage fields-files
- */
-class ImageField extends FileIFrameField {
-
- /**
- * @return SimpleImageField_Disabled
- */
- public function performReadonlyTransformation() {
- return new SimpleImageField_Disabled($this->name, $this->title, $this->value, $this->form);
- }
-
- /**
- * @return string
- */
- public function FileTypeName() {
- return _t('ImageField.IMAGE', 'Image');
- }
-
- /**
- * Adds the filter, so the dropdown displays only images and folders.
- *
- * @return Form
- */
- public function EditFileForm() {
- Deprecation::notice('3.0', 'Use UploadField', Deprecation::SCOPE_CLASS);
-
- $filter = create_function('$item', 'return (in_array("Folder", ClassInfo::ancestry($item->ClassName)) ||'
- . ' in_array("Image", ClassInfo::ancestry($item->ClassName)));');
-
- $form = parent::EditFileForm();
- $form->Fields()->dataFieldByName('ExistingFile')->setFilterFunction($filter);
-
- return $form;
- }
-}
diff --git a/forms/ImageFormAction.php b/forms/ImageFormAction.php
deleted file mode 100644
index 81d9e859e..000000000
--- a/forms/ImageFormAction.php
+++ /dev/null
@@ -1,43 +0,0 @@
-image = $image;
- $this->hoverImage = $hoverImage;
- $this->className = $className;
- parent::__construct($action, $title, $form);
- }
-
- public function Field($properties = array()) {
- Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
- Requirements::javascript(FRAMEWORK_DIR . '/javascript/ImageFormAction.js');
-
- $classClause = '';
- if($this->className) $classClause = $this->className . ' ';
- if($this->hoverImage) $classClause .= 'rollover ';
- return "id() . "\" type=\"image\" name=\"{$this->name}\""
- . " src=\"{$this->image}\" title=\"{$this->title}\" alt=\"{$this->title}\" />";
- }
-}
diff --git a/forms/ManyManyComplexTableField.php b/forms/ManyManyComplexTableField.php
index fbd1e505d..c0fb9d064 100644
--- a/forms/ManyManyComplexTableField.php
+++ b/forms/ManyManyComplexTableField.php
@@ -30,7 +30,7 @@
* );
*
*
- * @deprecated 3.0 Use GridField with GridFieldConfig_RelationEditor
+ * @deprecated 3.1 Use GridField with GridFieldConfig_RelationEditor
*
* @package forms
* @subpackage fields-relational
diff --git a/forms/SimpleImageField.php b/forms/SimpleImageField.php
deleted file mode 100644
index 56c4fce38..000000000
--- a/forms/SimpleImageField.php
+++ /dev/null
@@ -1,173 +0,0 @@
-Usage
- *
- *
- * class Article extends DataObject {
- * static $has_one = array('MyImage' => 'Image');
- * }
- * // use in your form constructor etc.
- * $myField = new SimpleImageField('MyImage');
- *
- *
- * Usage within a controller
- *
- * First add your $has_one relationship:
- *
- *
- * static $has_one = array(
- * 'FileName' => 'FileType'
- * );
- *
- * (i.e. Image for a FileType)
- *
- * Then add your Field into your form:
- *
- *
- * function Form() {
- * return new Form($this, "Form", new FieldList(
- * new SimpleImageField (
- * $name = "FileTypeID",
- * $title = "Upload your FileType"
- * )
- * ), new FieldList(
- *
- * // List the action buttons here - doform executes the function 'doform' below
- * new FormAction("doform", "Submit")
- *
- * // List the required fields here
- * ), new RequiredFields(
- * "FileTypeID"
- * ));
- * }
- * // Then make sure that the file is saved into the assets area:
- * function doform($data, $form) {
- * $file = new File();
- * $file->loadUploaded($_FILES['FileTypeID']);
- *
- * // Redirect to a page thanking people for registering
- * $this->redirect('thanks-for-your-submission/');
- * }
- *
- *
- * Your file should be now in the uploads directory
- *
- * @package forms
- * @subpackage fields-files
- */
-
-/**
- * @deprecated 3.0 Use UploadField with $myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'));
- */
-class SimpleImageField extends FileField {
-
- public function __construct($name, $title = null, $value = null) {
- Deprecation::notice('3.0',
- "SimpleImageField is deprecated. Use UploadField with "
- . "\$myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'))",
- Deprecation::SCOPE_CLASS);
-
- if(count(func_get_args()) > 3) {
- Deprecation::notice('3.0', 'Use setRightTitle() and setFolderName() instead of constructor arguments',
- Deprecation::SCOPE_GLOBAL);
- }
-
- parent::__construct($name, $title, $value);
-
- $this->getValidator()->setAllowedExtensions(array('jpg','gif','png'));
- }
-
- public function Field($properties = array()) {
- if($this->form) $record = $this->form->getRecord();
- $fieldName = $this->name;
- if(isset($record)&&$record) {
- $imageField = $record->$fieldName();
- } else {
- $imageField = "";
- }
-
- $html = "' + deleteMessage + '
').dialog({ - bgiframe: true, - resizable: false, - modal: true, - height: 140, - overlay: { - backgroundColor: '#000', - opacity: 0.5 - }, - title: ss.i18n._t('FILEIFRAMEFIELD.DELETEIMAGE', 'Delete Image'), - buttons: buttons - }); - - e.preventDefault(); - } else if(!confirm(deleteMessage)) { - e.preventDefault(); - } - }); - -})(jQuery); \ No newline at end of file diff --git a/javascript/ImageFormAction.js b/javascript/ImageFormAction.js deleted file mode 100644 index 5e1b85128..000000000 --- a/javascript/ImageFormAction.js +++ /dev/null @@ -1,18 +0,0 @@ -(function($) { - $(document).ready(function() { - $("input.rollover").live('mouseover', function(){ - if(!this.overSrc) { - var srcParts = $(this).attr('src').match( /(.*)\.([a-zA-Z]+)$/ ); - var fileName = srcParts[1]; - var extension = srcParts[2]; - this.overSrc = fileName + '_over.' + extension; - this.outSrc = $(this).attr('src'); - } - $(this).attr('src', this.overSrc); - }); - - $("input.rollover").live('mouseout', function(){ - $(this).attr('src', this.outSrc); - }); - }); -})(jQuery); \ No newline at end of file diff --git a/model/ComponentSet.php b/model/ComponentSet.php deleted file mode 100644 index c66dbf11f..000000000 --- a/model/ComponentSet.php +++ /dev/null @@ -1,10 +0,0 @@ -alterDataQuery_30(function($query) use ($join){ - $query->join($join); - }); - } - /** * Return a new DataList instance with the records returned in this query restricted by a limit clause * @@ -257,10 +243,6 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab if(!$limit && !$offset) { return $this; } - if($limit && !is_numeric($limit)) { - Deprecation::notice('3.0', 'Please pass limits as 2 arguments, rather than an array or SQL fragment.', - Deprecation::SCOPE_GLOBAL); - } return $this->alterDataQuery_30(function($query) use ($limit, $offset){ $query->limit($limit, $offset); }); diff --git a/model/DataObject.php b/model/DataObject.php index 61156610e..b3839579e 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -1454,20 +1454,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return 'ParentID'; } - /** - * Sets the component of a relationship. - * This should only need to be called internally, - * and is mainly due to the caching logic in {@link getComponents()} - * and {@link getManyManyComponents()}. - * - * @param string $componentName Name of the component - * @param DataObject|HasManyList|ManyManyList $componentValue Value of the component - * @deprecated 3.0 Not used internally anymore. - */ - public function setComponent($componentName, $componentValue) { - Deprecation::notice('3.0', 'Not used internally anymore.'); - } - /** * Returns a many-to-many component, as a ManyManyList. * @param string $componentName Name of the many-many component @@ -2030,17 +2016,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return isset($this->record[$field]) ? $this->record[$field] : null; } - /** - * Return a map of all the fields for this record - * @deprecated 2.4 Use toMap() - * - * @return array A map of field names to field values. - */ - public function getAllFields() { - Deprecation::notice('3.0', 'Use toMap() instead.'); - return $this->toMap(); - } - /** * Loads all the stub fields that an initial lazy load didn't load fully. * @@ -2657,23 +2632,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return false; } - /** - * @deprecated 3.0 Use DataList::create and DataList to do your querying - */ - public function buildSQL($filter = "", $sort = "", $limit = "", $join = "", $restrictClasses = true, $having="") { - Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.'); - return $this->extendedSQL($filter, $sort, $limit, $join, $having); - } - - /** - * @deprecated 3.0 Use DataList::create and DataList to do your querying - */ - public function extendedSQL($filter = "", $sort = "", $limit = "", $join = ""){ - Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.'); - $dataList = DataObject::get($this->class, $filter, $sort, $join, $limit); - return $dataList->dataQuery()->query(); - } - /** * Return all objects matching the filter * sub-classes are automatically selected and included @@ -2708,13 +2666,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return $result; } - // Todo: Determine if we can deprecate for 3.0.0 and use DI or something instead - // Todo: Make the $containerClass method redundant - if($containerClass != 'DataList') { - Deprecation::notice('3.0', 'DataObject::get() - $containerClass argument is deprecated.', - Deprecation::SCOPE_GLOBAL); - } - $result = DataList::create($callerClass)->where($filter)->sort($sort); if($limit && strpos($limit, ',') !== false) { @@ -2731,10 +2682,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity } /** - * @deprecated 3.0 Use DataList::create and DataList to do your querying + * @deprecated 3.1 Use DataList::create and DataList to do your querying */ public function Aggregate($class = null) { - Deprecation::notice('3.0', 'Call aggregate methods on a DataList directly instead. In templates' + Deprecation::notice('3.1', 'Call aggregate methods on a DataList directly instead. In templates' . ' an example of the new syntax is <% cached List(Member).max(LastEdited) %> instead' . ' (check partial-caching.md documentation for more details.)'); @@ -2752,70 +2703,14 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity } /** - * @deprecated 3.0 Use DataList::create and DataList to do your querying + * @deprecated 3.1 Use DataList::create and DataList to do your querying */ public function RelationshipAggregate($relationship) { - Deprecation::notice('3.0', 'Call aggregate methods on a relationship directly instead.'); + Deprecation::notice('3.1', 'Call aggregate methods on a relationship directly instead.'); return $this->$relationship(); } - /** - * DataList::create("Table")->where("filter") is the same as singleton("Table")->instance_get("filter") - * - * @deprecated 3.0 Use DataList::create and DataList to do your querying - * - * @param string $filter A filter to be inserted into the WHERE clause. - * @param string $sort A sort expression to be inserted into the ORDER BY clause. If omitted, self::$default_sort - * will be used. - * @param string $join A single join clause. This can be used for filtering, only 1 instance of each DataObject - * will be returned. - * @param string $limit A limit expression to be inserted into the LIMIT clause. - * @param string $containerClass The container class to return the results in. - * - * @return mixed The objects matching the filter, in the class specified by $containerClass - */ - public function instance_get($filter = "", $sort = "", $join = "", $limit="", $containerClass = "DataObjectSet") { - Deprecation::notice('3.0', 'Use DataList::create and DataList to do your querying instead.'); - return self::get($this->class, $filter, $sort, $join, $limit, $containerClass); - } - - /** - * Take a database {@link SS_Query} and instanciate an object for each record. - * - * @deprecated 3.0 Replaced by DataList - * - * @param SS_Query|array $records The database records, a {@link SS_Query} object or an array of maps. - * @param string $containerClass The class to place all of the objects into. - * - * @return mixed The new objects in an object of type $containerClass - */ - public function buildDataObjectSet($records, $containerClass = "DataObjectSet", $query = null, $baseClass = null) { - Deprecation::notice('3.0', 'Use DataList instead.'); - - foreach($records as $record) { - if(empty($record['RecordClassName'])) { - $record['RecordClassName'] = $record['ClassName']; - } - if(class_exists($record['RecordClassName'])) { - $results[] = new $record['RecordClassName']($record); - } else { - if(!$baseClass) { - user_error("Bad RecordClassName '{$record['RecordClassName']}' and " - . "\$baseClass not set", E_USER_ERROR); - } else if(!is_string($baseClass) || !class_exists($baseClass)) { - user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad " - . "\$baseClass '$baseClass not set", E_USER_ERROR); - } - $results[] = new $baseClass($record); - } - } - - if(isset($results)) { - return new $containerClass($results); - } - } - /** * Return the first item matching the given query. * All calls to get_one() are cached. @@ -2909,23 +2804,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity DataObject::$_cache_field_labels = array(); } - /** - * Does the hard work for get_one() - * - * @deprecated 3.0 Use DataList::create($this->class)->where($filter)->sort($orderby)->First() instead - * - * @uses DataExtension->augmentSQL() - * - * @param string $filter A filter to be inserted into the WHERE clause - * @param string $orderby A sort expression to be inserted into the ORDER BY clause. - * @return DataObject The first item matching the query - */ - public function instance_get_one($filter, $orderby = null) { - Deprecation::notice('3.0', - 'Use DataList::create($this->class)->where($filter)->sort($orderby)->First() instead.'); - return DataObject::get_one($this->class, $filter, true, $orderby); - } - /** * Return the given element, searching by ID * @@ -3066,24 +2944,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity $this->extend('requireDefaultRecords', $dummy); } - /** - * @deprecated 3.0 Use DataObject::database_fields() instead - * @see DataObject::database_fields() - */ - public function databaseFields() { - Deprecation::notice('3.0', 'Use DataObject::database_fields() instead.'); - return self::database_fields($this->class); - } - - /** - * @deprecated 3.0 Use DataObject::custom_database_fields() instead - * @see DataObject::custom_database_fields() - */ - public function customDatabaseFields() { - Deprecation::notice('3.0', 'Use DataObject::custom_database_fields() instead.'); - return self::custom_database_fields($this->class); - } - /** * Returns fields bu traversing the class heirachy in a bottom-up direction. * diff --git a/model/DataObjectDecorator.php b/model/DataObjectDecorator.php deleted file mode 100644 index 0bcd41c04..000000000 --- a/model/DataObjectDecorator.php +++ /dev/null @@ -1,15 +0,0 @@ - 1) { - $items = func_get_args(); - } - - foreach ($items as $i => $item) { - if ($item instanceof ViewableData) { - continue; - } - - if (is_object($item) || ArrayLib::is_associative($item)) { - $items[$i] = new ArrayData($item); - } else { - user_error( - "DataObjectSet::__construct: Passed item #{$i} is not an" - . ' and object or associative array, can\'t be properly' - . ' iterated on in templates', E_USER_WARNING - ); - } - } - } - - parent::__construct($items); - } - -} diff --git a/model/DataQuery.php b/model/DataQuery.php index aea38eff3..d9b195972 100644 --- a/model/DataQuery.php +++ b/model/DataQuery.php @@ -530,24 +530,6 @@ class DataQuery { return $this; } - /** - * Add a join clause to this query - * @deprecated 3.0 Use innerJoin() or leftJoin() instead. - */ - public function join($join) { - Deprecation::notice('3.0', 'Use innerJoin() or leftJoin() instead.'); - if($join) { - $this->query->addFrom($join); - // TODO: This needs to be resolved for all databases - - if(DB::getConn() instanceof MySQLDatabase) { - $from = $this->query->getFrom(); - $this->query->setGroupBy(reset($from) . ".\"ID\""); - } - } - return $this; - } - /** * Add an INNER JOIN clause to this query. * diff --git a/model/fieldtypes/StringField.php b/model/fieldtypes/StringField.php index 9f1037f49..a580a0531 100644 --- a/model/fieldtypes/StringField.php +++ b/model/fieldtypes/StringField.php @@ -11,8 +11,6 @@ abstract class StringField extends DBField { static $casting = array( "LimitCharacters" => "Text", - "Lower" => "Text", - "Upper" => "Text", "LowerCase" => "Text", "UpperCase" => "Text", ); @@ -114,15 +112,6 @@ abstract class StringField extends DBField { public function LowerCase() { return mb_strtolower($this->value); } - - /** - * Return another DBField object with this value in lowercase. - * @deprecated 3.0 Use LowerCase() instead. - */ - public function Lower() { - Deprecation::notice('3.0', 'Use LowerCase() instead.'); - return $this->LowerCase(); - } /** * Converts the current value for this Enum DBField to uppercase. @@ -132,13 +121,4 @@ abstract class StringField extends DBField { return mb_strtoupper($this->value); } - /** - * Return another DBField object with this value in uppercase. - * @deprecated 3.0 Use UpperCase() instead. - */ - public function Upper() { - Deprecation::notice('3.0', 'Use UpperCase() instead.'); - return $this->UpperCase(); - } - } diff --git a/model/fieldtypes/Text.php b/model/fieldtypes/Text.php index 392bafa02..822d4a535 100644 --- a/model/fieldtypes/Text.php +++ b/model/fieldtypes/Text.php @@ -78,17 +78,7 @@ class Text extends StringField { public function NoHTML() { return strip_tags($this->value); } - /** - * Return the value of the field with XML tags escaped. - * - * @deprecated 3.0 Use DBField->XML() instead. - * @return string - */ - public function EscapeXML() { - Deprecation::notice('3.0', 'Use DBField->XML() instead.'); - return str_replace(array('&','<','>','"'), array('&','<','>','"'), $this->value); - } - + /** * Return the value of the field with relative links converted to absolute urls. * @return string diff --git a/scss/FileIFrameField.scss b/scss/FileIFrameField.scss deleted file mode 100755 index 6df5e66ce..000000000 --- a/scss/FileIFrameField.scss +++ /dev/null @@ -1,175 +0,0 @@ -/* -typography.css has been removed from framework, why shall we still has this? a dynamic typographp.css should be used by -server side call, like Requirements::css(); -@import url("typography.css"); -*/ - -html,body { - padding: 0; - margin: 0; - border-style: none; - height: 100%; - overflow: hidden; -} - -form { - margin: 0; padding: 0; -} - -h2 { - margin: 0; - font-size: 1.4em; -} - -/** - * Selection Groups - */ -.SelectionGroup { - padding: 0; - margin: 10px 0 0 0; -} -.SelectionGroup li { - list-style-type: none; - margin: 0 0 4px; -} -.SelectionGroup li label { - font-size: 11px; -} -.SelectionGroup li input.selector { - width: 20px; - margin-top: 0; -} - - -.SelectionGroup li div.field { - display: none; -} -.SelectionGroup li.selected div.field { - display: block; - margin-left: 30px; - margin-bottom: 1em; - margin-top: 4px; -} -.mainblock .SelectionGroup li.selected div.field { - margin-left: 27px; - margin-bottom: 4px; -} - -.SelectionGroup li.selected label.selector { - font-weight: bold; -} - - - -/** - * TreeDropdownField stying - */ -.SelectionGroup div.TreeDropdownField { - width: 241px; - padding: 0; -} -html>body div.TreeDropdownField { - position:relative; -} - -.SelectionGroup div.TreeDropdownField span.items { - display: block; - height: 100%; - border: 1px #7f9db9 solid; - cursor: pointer; - width: 214px; - float: left; - padding-top: 2px; - padding-bottom: 2px; - background-color: white; -} - -.SelectionGroup div.TreeDropdownField div.tree_holder { - clear: left; - cursor: default; - border: 1px black solid; - margin: 0; - height: 180px; - overflow: auto; - background-color: white; - /** - * HACK IE6, see http://www.hedgerwow.com/360/bugs/css-select-free.html - */ - position:absolute; - z-index:10; - width:238px;/*must have for any value*/ -} - -html>body div.TreeDropdownField div.tree_holder { - top: 20px; - left: 0px; - z-index: 1000; -} - -/** - * HACK IE6, see http://www.hedgerwow.com/360/bugs/css-select-free.html - */ -.SelectionGroup div.TreeDropdownField div.tree_holder iframe { - display:none;/* IE5*/ - display/**/:block;/* IE5*/ - position:absolute; - top:0; - left:0; - z-index:-1; - filter:mask(); - width:180px; /*must have for any big value*/ - height:200px/*must have for any big value*/; - border: 0; -} - -div.TreeDropdownField a.editLink { - border-width: 1px 1px 1px 0; - background: url(../images/TreeDropdownField_button.gif) left top no-repeat; - width: 19px; - height: 21px; - margin: 0; - padding: 0; - float: left; - clear: right; - z-index: 0; - overflow: hidden; -} - -/* added block/width so tree values don't disappear in ie7 */ -.SelectionGroup div.TreeDropdownField ul.tree li { - display: block; - width: 100%; -} - -.Actions { - text-align: right; - margin: 0; - position: absolute; - right: 5px; - bottom: 5px; -} - -.mainblock { - float: left; - border: 1px solid #ccc; - padding: 5px; - margin-right: 5px; - height: 140px; - position: relative; -} - .mainblock.editform { - width: 275px; - } - .mainblock.attached { - position: absolute; - left: 270px; - width: 100px; - } - -.mainblock form fieldset { - border: none; -} - -.mainblock form div.Actions input { - font-size: 11px; -} diff --git a/search/filters/SubstringFilter.php b/search/filters/SubstringFilter.php deleted file mode 100755 index 470963443..000000000 --- a/search/filters/SubstringFilter.php +++ /dev/null @@ -1,44 +0,0 @@ -getValue(); - $filter = new PartialMatchFilter($this->getFullName(), $values, $this->getModifiers()); - return $filter->apply($query); - } - - protected function applyOne(DataQuery $query) { - /* NO OP */ - } - - public function exclude(DataQuery $query) { - $values = $this->getValue(); - $filter = new PartialMatchFilter($this->getFullName(), $values, $this->getModifiers()); - return $filter->exclude($query); - } - - protected function excludeOne(DataQuery $query) { - /* NO OP */ - } - - public function isEmpty() { - return $this->getValue() === array() || $this->getValue() === null || $this->getValue() === ''; - } -} - diff --git a/security/Group.php b/security/Group.php index 518011e6a..772712a21 100755 --- a/security/Group.php +++ b/security/Group.php @@ -216,15 +216,6 @@ class Group extends DataObject { return $labels; } - /** - * @deprecated 2.5 - */ - public static function addToGroupByName($member, $groupcode) { - Deprecation::notice('2.5', 'Use $member->addToGroupByCode($groupcode) instead.'); - - return $member->addToGroupByCode($groupcode); - } - /** * Get many-many relation to {@link Member}, * including all members which are "inherited" from children groups of this record. @@ -323,14 +314,6 @@ class Group extends DataObject { ); } - /** - * @deprecated 3.0 Use getTreeTitle() - */ - public function TreeTitle() { - Deprecation::notice('3.0', 'Use getTreeTitle() instead.'); - return $this->getTreeTitle(); - } - public function getTreeTitle() { if($this->hasMethod('alternateTreeTitle')) return $this->alternateTreeTitle(); else return htmlspecialchars($this->Title, ENT_QUOTES); diff --git a/security/PasswordEncryptor.php b/security/PasswordEncryptor.php index d2258d307..5d5bc093e 100644 --- a/security/PasswordEncryptor.php +++ b/security/PasswordEncryptor.php @@ -102,22 +102,6 @@ abstract class PasswordEncryptor { return substr($generator->generateHash('sha1'), 0, 50); } - /** - * This usually just returns a strict string comparison, - * but is necessary for {@link PasswordEncryptor_LegacyPHPHash}. - * - * @param String $hash1 - * @param String $hash2 - * @return boolean - * - * @deprecated 3.0 - Use PasswordEncryptor::check() instead. - */ - public function compare($hash1, $hash2) { - Deprecation::notice('3.0.0', - 'PasswordEncryptor::compare() is deprecated, replaced by PasswordEncryptor::check().'); - return ($hash1 === $hash2); - } - /** * This usually just returns a strict string comparison, * but is necessary for retain compatibility with password hashed @@ -355,15 +339,6 @@ class PasswordEncryptor_LegacyPHPHash extends PasswordEncryptor_PHPHash { // letters. return substr(base_convert($password, 16, 36), 0, 64); } - - public function compare($hash1, $hash2) { - Deprecation::notice('3.0.0', - 'PasswordEncryptor::compare() is deprecated, replaced by PasswordEncryptor::check().'); - - // Due to flawed base_convert() floating poing precision, - // only the first 10 characters are consistently useful for comparisons. - return (substr($hash1, 0, 10) === substr($hash2, 0, 10)); - } public function check($hash, $password, $salt = null, $member = null) { // Due to flawed base_convert() floating poing precision, diff --git a/templates/FileIFrameField_iframe.ss b/templates/FileIFrameField_iframe.ss deleted file mode 100644 index e44766a17..000000000 --- a/templates/FileIFrameField_iframe.ss +++ /dev/null @@ -1,26 +0,0 @@ - - - - - <% base_tag %> - -