mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 12:49:06 +02:00
Fixed whitespace usage
This commit is contained in:
parent
92458d9f43
commit
0c6ac1960e
@ -1,5 +1,5 @@
|
|||||||
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
||||||
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
|
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
|
||||||
} else {
|
} else {
|
||||||
ss.i18n.addDictionary('nl_NL', {
|
ss.i18n.addDictionary('nl_NL', {
|
||||||
'LeftAndMain.CONFIRMUNSAVED': "Weet u zeker dat u deze pagina wilt verlaten?\n\WAARSCHUWING: Uw veranderingen zijn niet opgeslagen.\n\nKies OK om te verlaten, of Cancel om op de huidige pagina te blijven.",
|
'LeftAndMain.CONFIRMUNSAVED': "Weet u zeker dat u deze pagina wilt verlaten?\n\WAARSCHUWING: Uw veranderingen zijn niet opgeslagen.\n\nKies OK om te verlaten, of Cancel om op de huidige pagina te blijven.",
|
||||||
|
@ -714,8 +714,8 @@ class Director implements TemplateGlobalProvider {
|
|||||||
$matched = false;
|
$matched = false;
|
||||||
|
|
||||||
if($patterns) {
|
if($patterns) {
|
||||||
// Calling from the command-line?
|
// Calling from the command-line?
|
||||||
if(!isset($_SERVER['REQUEST_URI'])) return;
|
if(!isset($_SERVER['REQUEST_URI'])) return;
|
||||||
|
|
||||||
// protect portions of the site based on the pattern
|
// protect portions of the site based on the pattern
|
||||||
$relativeURL = self::makeRelative(Director::absoluteURL($_SERVER['REQUEST_URI']));
|
$relativeURL = self::makeRelative(Director::absoluteURL($_SERVER['REQUEST_URI']));
|
||||||
|
@ -224,21 +224,21 @@ class SS_HTTPResponse {
|
|||||||
<meta http-equiv=\"refresh\" content=\"1; url=$url\" />
|
<meta http-equiv=\"refresh\" content=\"1; url=$url\" />
|
||||||
<script type=\"text/javascript\">setTimeout('window.location.href = \"$url\"', 50);</script>";
|
<script type=\"text/javascript\">setTimeout('window.location.href = \"$url\"', 50);</script>";
|
||||||
} else {
|
} else {
|
||||||
$line = $file = null;
|
$line = $file = null;
|
||||||
if(!headers_sent($file, $line)) {
|
if(!headers_sent($file, $line)) {
|
||||||
header($_SERVER['SERVER_PROTOCOL'] . " $this->statusCode " . $this->getStatusDescription());
|
header($_SERVER['SERVER_PROTOCOL'] . " $this->statusCode " . $this->getStatusDescription());
|
||||||
foreach($this->headers as $header => $value) {
|
foreach($this->headers as $header => $value) {
|
||||||
header("$header: $value", true, $this->statusCode);
|
header("$header: $value", true, $this->statusCode);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// It's critical that these status codes are sent; we need to report a failure if not.
|
// It's critical that these status codes are sent; we need to report a failure if not.
|
||||||
if($this->statusCode >= 300) {
|
if($this->statusCode >= 300) {
|
||||||
user_error(
|
user_error(
|
||||||
"Couldn't set response type to $this->statusCode because " .
|
"Couldn't set response type to $this->statusCode because " .
|
||||||
"of output on line $line of $file",
|
"of output on line $line of $file",
|
||||||
E_USER_WARNING
|
E_USER_WARNING
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only show error pages or generic "friendly" errors if the status code signifies
|
// Only show error pages or generic "friendly" errors if the status code signifies
|
||||||
|
@ -230,7 +230,7 @@ class Debug {
|
|||||||
if(Director::isDev()) {
|
if(Director::isDev()) {
|
||||||
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Notice");
|
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Notice");
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,8 +278,8 @@ class Debug {
|
|||||||
if(Director::isDev()) {
|
if(Director::isDev()) {
|
||||||
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +91,7 @@ class DB {
|
|||||||
|
|
||||||
$key = md5($key); // Ensure key is correct length for chosen cypher
|
$key = md5($key); // Ensure key is correct length for chosen cypher
|
||||||
$ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB);
|
$ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB);
|
||||||
$iv = mcrypt_create_iv($ivSize);
|
$iv = mcrypt_create_iv($ivSize);
|
||||||
$encrypted = mcrypt_encrypt(
|
$encrypted = mcrypt_encrypt(
|
||||||
MCRYPT_RIJNDAEL_256, $key, $name, MCRYPT_MODE_CFB, $iv
|
MCRYPT_RIJNDAEL_256, $key, $name, MCRYPT_MODE_CFB, $iv
|
||||||
);
|
);
|
||||||
|
@ -244,7 +244,7 @@ class Security extends Controller {
|
|||||||
|
|
||||||
$controller->redirect(
|
$controller->redirect(
|
||||||
Config::inst()->get('Security', 'login_url')
|
Config::inst()->get('Security', 'login_url')
|
||||||
. "?BackURL=" . urlencode($_SERVER['REQUEST_URI'])
|
. "?BackURL=" . urlencode($_SERVER['REQUEST_URI'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -941,14 +941,15 @@ class Security extends Controller {
|
|||||||
* Set a custom log-in URL if you have built your own log-in page.
|
* Set a custom log-in URL if you have built your own log-in page.
|
||||||
*/
|
*/
|
||||||
public static function set_login_url($loginUrl) {
|
public static function set_login_url($loginUrl) {
|
||||||
self::$login_url = $loginUrl;
|
self::$login_url = $loginUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the URL of the log-in page.
|
* Get the URL of the log-in page.
|
||||||
* Defaults to Security/login but can be re-set with {@link set_login_url()}
|
* Defaults to Security/login but can be re-set with {@link set_login_url()}
|
||||||
*/
|
*/
|
||||||
public static function login_url() {
|
public static function login_url() {
|
||||||
return self::$login_url;
|
return self::$login_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user