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