mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed some php notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39034 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fe2314a08e
commit
97ff1db6f9
@ -179,7 +179,7 @@ class ManifestBuilder {
|
|||||||
|
|
||||||
} else if(substr($item,-4) == '.css') {
|
} else if(substr($item,-4) == '.css') {
|
||||||
$cssName = substr($item, 0, -4);
|
$cssName = substr($item, 0, -4);
|
||||||
Debug::message($item);
|
// Debug::message($item);
|
||||||
|
|
||||||
if($themeName) {
|
if($themeName) {
|
||||||
$cssManifest[$cssName]['themes'][$themeName] = "$folder/$item";
|
$cssManifest[$cssName]['themes'][$themeName] = "$folder/$item";
|
||||||
|
@ -71,8 +71,8 @@ class ErrorPage extends Page {
|
|||||||
// Temporarily log out when producing this page
|
// Temporarily log out when producing this page
|
||||||
$loggedInMember = Member::currentUser();
|
$loggedInMember = Member::currentUser();
|
||||||
Session::clear("loggedInAs");
|
Session::clear("loggedInAs");
|
||||||
$alc_enc = $_COOKIE['alc_enc'];
|
$alc_enc = isset($_COOKIE['alc_enc']) ? $_COOKIE['alc_enc'] : null;
|
||||||
Cookie::set('alc_enc',null);
|
Cookie::set('alc_enc', null);
|
||||||
|
|
||||||
// Run the page
|
// Run the page
|
||||||
Requirements::clear();
|
Requirements::clear();
|
||||||
@ -86,7 +86,9 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Log back in
|
// Log back in
|
||||||
Session::set("loggedInAs", $loggedInMember->ID);
|
Session::set("loggedInAs", $loggedInMember->ID);
|
||||||
Cookie::set('alc_enc',$alc_enc);
|
if(isset($alc_enc)) {
|
||||||
|
Cookie::set('alc_enc', $alc_enc);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
|
return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ class Versioned extends DataObjectDecorator {
|
|||||||
$from = Versioned::get_one_by_stage($this->owner->class, $fromStage, "`{$baseClass}`.ID = {$this->owner->ID}");
|
$from = Versioned::get_one_by_stage($this->owner->class, $fromStage, "`{$baseClass}`.ID = {$this->owner->ID}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$publisherID = Member::currentUser()->ID ? Member::currentUser()->ID : 0;
|
$publisherID = isset(Member::currentUser()->ID) ? Member::currentUser()->ID : 0;
|
||||||
|
|
||||||
if($from) {
|
if($from) {
|
||||||
$from->forceChange();
|
$from->forceChange();
|
||||||
|
@ -404,7 +404,7 @@ class Member extends DataObject {
|
|||||||
function requireDefaultRecords() {
|
function requireDefaultRecords() {
|
||||||
parent::requireDefaultRecords();
|
parent::requireDefaultRecords();
|
||||||
|
|
||||||
if(!DB::query("SELECT * FROM Member")->value() && $_REQUEST['username'] && $_REQUEST['password']) {
|
if(!DB::query("SELECT * FROM Member")->value() && isset($_REQUEST['username']) && isset($_REQUEST['password'])) {
|
||||||
Security::findAnAdministrator($_REQUEST['username'], $_REQUEST['password']);
|
Security::findAnAdministrator($_REQUEST['username'], $_REQUEST['password']);
|
||||||
|
|
||||||
if(!Database::$supressOutput) {
|
if(!Database::$supressOutput) {
|
||||||
|
@ -211,7 +211,7 @@ class Security extends Controller {
|
|||||||
Permission::grant($adminGroup->ID, "ADMIN");
|
Permission::grant($adminGroup->ID, "ADMIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$member) {
|
if(!isset($member)) {
|
||||||
$member = Object::create('Member');
|
$member = Object::create('Member');
|
||||||
$member->FirstName = $member->Surname = 'Admin';
|
$member->FirstName = $member->Surname = 'Admin';
|
||||||
$member->Email = $username;
|
$member->Email = $username;
|
||||||
|
Loading…
Reference in New Issue
Block a user