Update security.php

This commit is contained in:
Namhyeon Go 2018-03-07 12:10:24 +09:00 committed by GitHub
parent e8b5bf958c
commit ea39c6d7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -478,5 +478,24 @@ if(!function_exists("decapsulate_text")) {
}
}
// https://wiki.ubuntu.com/DevelopmentCodeNames
if(!function_exists("get_generated_name")) {
function get_generated_name() {
global $config;
$generated_name = "";
$adjectives = explode(',', $config['adjectives']);
$animals = explode(',', $config['animals']);
$c_adjective = ucfirst($adjectives[rand(0, count($adjectives) - 1)]);
$c_animal = ucfirst($animals[rand(0, count($animals) - 1)]);
$generated_name = $c_adjective . " " . $c_animal;
return $generated_name;
}
}
// start session (enable $_SESSION)
session_start();