mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added docblock headers and removed notice-level errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40912 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
79460dadfc
commit
f199dc6cd4
@ -223,6 +223,8 @@ class Debug {
|
||||
$caller = $bt[2];
|
||||
$caller['line'] = $bt[1]['line'];
|
||||
$caller['file'] = $bt[1]['file'];
|
||||
if(!isset($caller['class'])) $caller['class'] = '';
|
||||
if(!isset($caller['type'])) $caller['type'] = '';
|
||||
return $caller;
|
||||
}
|
||||
|
||||
|
@ -389,9 +389,10 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
||||
dieprintr($headers);
|
||||
}
|
||||
|
||||
if(strpos($subject,"&#") !== false) $subjectIsUnicode = true;
|
||||
if(strpos($htmlContent,"&#") !== false) $bodyIsUnicode = true;
|
||||
|
||||
$subjectIsUnicode = (strpos($subject,"&#") !== false);
|
||||
$bodyIsUnicode = (strpos($htmlContent,"&#") !== false);
|
||||
$plainEncoding = "";
|
||||
|
||||
// We generate plaintext content by default, but you can pass custom stuff
|
||||
if(!$plainContent) {
|
||||
@ -468,7 +469,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
||||
$headers["From"] = validEmailAddr($from);
|
||||
|
||||
// Messages with the X-SilverStripeMessageID header can be tracked
|
||||
if($customheaders["X-SilverStripeMessageID"]) {
|
||||
if(isset($customheaders["X-SilverStripeMessageID"])) {
|
||||
$bounceAddress = BOUNCE_EMAIL;
|
||||
// Get the human name from the from address, if there is one
|
||||
if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts))
|
||||
@ -479,7 +480,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
||||
|
||||
// $headers["Sender"] = $from;
|
||||
$headers["X-Mailer"] = X_MAILER;
|
||||
if (!$customheaders["X-Priority"]) $headers["X-Priority"] = 3;
|
||||
if (!isset($customheaders["X-Priority"])) $headers["X-Priority"] = 3;
|
||||
|
||||
$headers = array_merge((array)$headers, (array)$customheaders);
|
||||
|
||||
|
@ -121,7 +121,8 @@ class Hierarchy extends DataObjectDecorator {
|
||||
return true;
|
||||
}
|
||||
|
||||
if($parameterName = $this->markingFilter['parameter']) {
|
||||
if(isset($this->markingFilter['parameter'])) {
|
||||
$parameterName = $this->markingFilter['parameter'];
|
||||
if(is_array($this->markingFilter['value'])) {
|
||||
$ret = false;
|
||||
foreach($this->markingFilter['value'] as $value) {
|
||||
|
@ -9,12 +9,12 @@ class DropdownField extends FormField {
|
||||
|
||||
/**
|
||||
* Creates a new dropdown field.
|
||||
* @param name The field name
|
||||
* @param title The field title
|
||||
* @param source An map of the dropdown items
|
||||
* @param value The current value
|
||||
* @param form The parent form
|
||||
* @param emptyString mixed Add an empty selection on to of the {source}-Array
|
||||
* @param $name The field name
|
||||
* @param $title The field title
|
||||
* @param $source An map of the dropdown items
|
||||
* @param $value The current value
|
||||
* @param $form The parent form
|
||||
* @param $emptyString mixed Add an empty selection on to of the {source}-Array
|
||||
* (can also be boolean, which results in an empty string)
|
||||
*/
|
||||
function __construct($name, $title = "", $source = array(), $value = "", $form = null, $emptyString = null) {
|
||||
|
@ -19,8 +19,8 @@ class FormAction extends FormField {
|
||||
$this->extraData = $extraData;
|
||||
parent::__construct("action_$action", $title, null, $form);
|
||||
}
|
||||
static function create($action, $title = "") {
|
||||
return new FormAction($action, $title);
|
||||
static function create($action, $title = "", $extraData = null) {
|
||||
return new FormAction($action, $title, $extraData);
|
||||
}
|
||||
|
||||
function actionName() {
|
||||
|
@ -16,7 +16,7 @@ class RequiredFields extends Validator{
|
||||
*/
|
||||
function __construct() {
|
||||
$Required = func_get_args();
|
||||
if( is_array( $Required[0] ) )
|
||||
if( isset($Required[0]) && is_array( $Required[0] ) )
|
||||
$Required = $Required[0];
|
||||
$this->required = $Required;
|
||||
|
||||
|
@ -7,12 +7,12 @@ class TextareaField extends FormField {
|
||||
|
||||
/**
|
||||
* Create a new multi-line text area field.
|
||||
* @param name Field name
|
||||
* @param title Field title
|
||||
* @param rows The number of rows
|
||||
* @param cols The number of columns
|
||||
* @param value The current value
|
||||
* @param form The parent form. Auto-set when the field is placed in a form.
|
||||
* @param $name Field name
|
||||
* @param $title Field title
|
||||
* @param $rows The number of rows
|
||||
* @param $cols The number of columns
|
||||
* @param $value The current value
|
||||
* @param $form The parent form. Auto-set when the field is placed in a form.
|
||||
*/
|
||||
function __construct($name, $title = "", $rows = 5, $cols = 20, $value = "", $form = null) {
|
||||
$this->rows = $rows;
|
||||
|
Loading…
Reference in New Issue
Block a user