Fix deprecation warning with word_list

This commit is contained in:
Will Rossiter 2014-08-31 15:49:30 +12:00
parent 98ab540aba
commit 4b6a03bb0b
2 changed files with 9 additions and 3 deletions

View File

@ -675,8 +675,10 @@ class Member extends DataObject implements TemplateGlobalProvider {
* @return string Returns a random password.
*/
public static function create_new_password() {
if(file_exists(Security::get_word_list())) {
$words = file(Security::get_word_list());
$words = Config::inst()->get('Security', 'word_list');
if($words && file_exists($words)) {
$words = file($words);
list($usec, $sec) = explode(' ', microtime());
srand($sec + ((float) $usec * 100000));

View File

@ -78,8 +78,12 @@ class Security extends Controller implements TemplateGlobalProvider {
* @config
* @var string
*/
protected static $word_list = './wordlist.txt';
private static $word_list = './wordlist.txt';
/**
* @config
* @var string
*/
private static $template = 'BlankPage';
/**