mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed notice level errors for better cli-script operation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48146 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5896e37f0d
commit
1d304a995c
@ -11,8 +11,8 @@
|
|||||||
* @subpackage core
|
* @subpackage core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if(isset($_SERVER['argv'][2])) $_SERVER['HTTP_HOST'] = $_SERVER['argv'][2];
|
||||||
|
|
||||||
$_SERVER['HTTP_HOST'] = $_SERVER['argv'][2];
|
|
||||||
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
|
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
|
||||||
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
|
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ if($_REQUEST && get_magic_quotes_gpc()) {
|
|||||||
stripslashes_recursively($_REQUEST);
|
stripslashes_recursively($_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_REQUEST['trace']) apd_set_pprof_trace();
|
if(isset($_REQUEST['trace'])) apd_set_pprof_trace();
|
||||||
|
|
||||||
require_once("core/ManifestBuilder.php");
|
require_once("core/ManifestBuilder.php");
|
||||||
require_once("core/ClassInfo.php");
|
require_once("core/ClassInfo.php");
|
||||||
@ -96,7 +96,7 @@ if(ManifestBuilder::staleManifest()){
|
|||||||
|
|
||||||
require_once(MANIFEST_FILE);
|
require_once(MANIFEST_FILE);
|
||||||
|
|
||||||
if($_GET['debugmanifest']) Debug::show(file_get_contents(MANIFEST_FILE));
|
if(isset($_GET['debugmanifest'])) Debug::show(file_get_contents(MANIFEST_FILE));
|
||||||
|
|
||||||
if(!isset(Director::$environment_type)) Director::set_environment_type($envType);
|
if(!isset(Director::$environment_type)) Director::set_environment_type($envType);
|
||||||
|
|
||||||
|
@ -5,10 +5,17 @@
|
|||||||
* @subpackage email
|
* @subpackage email
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
if(isset($_SERVER['SERVER_NAME'])) {
|
||||||
* X-Mailer header value on emails sent
|
/**
|
||||||
*/
|
* X-Mailer header value on emails sent
|
||||||
define('X_MAILER', 'SilverStripe Mailer - version 2006.06.21 (Sent from "'.$_SERVER['SERVER_NAME'].'")');
|
*/
|
||||||
|
define('X_MAILER', 'SilverStripe Mailer - version 2006.06.21 (Sent from "'.$_SERVER['SERVER_NAME'].'")');
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
define('X_MAILER', 'SilverStripe Mailer - version 2006.06.21');
|
||||||
|
}
|
||||||
// Note: The constant 'BOUNCE_EMAIL' should be defined as a valid email address for where bounces should be returned to.
|
// Note: The constant 'BOUNCE_EMAIL' should be defined as a valid email address for where bounces should be returned to.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,13 +46,13 @@ class ContentNegotiator {
|
|||||||
} else {
|
} else {
|
||||||
// The W3C validator doesn't send an HTTP_ACCEPT header, but it can support xhtml. We put this special case in here so that
|
// The W3C validator doesn't send an HTTP_ACCEPT header, but it can support xhtml. We put this special case in here so that
|
||||||
// designers don't get worried that their templates are HTML4.
|
// designers don't get worried that their templates are HTML4.
|
||||||
if(substr($_SERVER['HTTP_USER_AGENT'], 0, 14) == 'W3C_Validator/') {
|
if(isset($_SERVER['HTTP_USER_AGENT']) && substr($_SERVER['HTTP_USER_AGENT'], 0, 14) == 'W3C_Validator/') {
|
||||||
$chosenFormat = "xhtml";
|
$chosenFormat = "xhtml";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
foreach($mimes as $format => $mime) {
|
foreach($mimes as $format => $mime) {
|
||||||
$regExp = '/' . str_replace(array('+','/'),array('\+','\/'), $mime) . '(;q=(\d+\.\d+))?/i';
|
$regExp = '/' . str_replace(array('+','/'),array('\+','\/'), $mime) . '(;q=(\d+\.\d+))?/i';
|
||||||
if (preg_match($regExp, $_SERVER['HTTP_ACCEPT'], $matches)) {
|
if (isset($_SERVER['HTTP_ACCEPT']) && preg_match($regExp, $_SERVER['HTTP_ACCEPT'], $matches)) {
|
||||||
$preference = isset($matches[2]) ? $matches[2] : 1;
|
$preference = isset($matches[2]) ? $matches[2] : 1;
|
||||||
if(!isset($q[$preference])) $q[$preference] = $format;
|
if(!isset($q[$preference])) $q[$preference] = $format;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user