mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed deprecations
This commit is contained in:
parent
3932241844
commit
b416e50bff
@ -330,7 +330,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
|||||||
} else {
|
} else {
|
||||||
$this->RememberLoginToken = null;
|
$this->RememberLoginToken = null;
|
||||||
Cookie::set('alc_enc', null);
|
Cookie::set('alc_enc', null);
|
||||||
Cookie::forceExpiry('alc_enc');
|
Cookie::force_expiry('alc_enc');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the incorrect log-in count
|
// Clear the incorrect log-in count
|
||||||
|
@ -177,19 +177,23 @@ class DataExtensionTest_Player extends DataObject implements TestOnly {
|
|||||||
|
|
||||||
class DataExtensionTest_PlayerExtension extends DataExtension implements TestOnly {
|
class DataExtensionTest_PlayerExtension extends DataExtension implements TestOnly {
|
||||||
|
|
||||||
public static function add_to_class($class = null, $extensionClass = null, $args = null) {
|
public static function get_extra_config($class = null, $extensionClass = null, $args = null) {
|
||||||
|
$config = array();
|
||||||
|
|
||||||
// Only add these extensions if the $class is set to DataExtensionTest_Player, to
|
// Only add these extensions if the $class is set to DataExtensionTest_Player, to
|
||||||
// test that the argument works.
|
// test that the argument works.
|
||||||
if($class == 'DataExtensionTest_Player') {
|
if($class == 'DataExtensionTest_Player') {
|
||||||
Config::inst()->update($class, 'db', array(
|
$config['db'] = array(
|
||||||
'Address' => 'Text',
|
'Address' => 'Text',
|
||||||
'DateBirth' => 'Date',
|
'DateBirth' => 'Date',
|
||||||
'Status' => "Enum('Shooter,Goalie')"
|
'Status' => "Enum('Shooter,Goalie')"
|
||||||
));
|
);
|
||||||
Config::inst()->update($class, 'defaults', array(
|
$config['defaults'] = array(
|
||||||
'Status' => 'Goalie'
|
'Status' => 'Goalie'
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user