mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-27 21:56:50 +01:00
Merge branch 'develop' into feature/login-by-email
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
function getCookie(name)
|
||||
{
|
||||
if (document.cookie.length>0)
|
||||
{
|
||||
c_start=document.cookie.indexOf(name + "=");
|
||||
if (c_start!=-1)
|
||||
{
|
||||
c_start=c_start + name.length+1;
|
||||
c_end=document.cookie.indexOf(";",c_start);
|
||||
if (c_end==-1) c_end=document.cookie.length;
|
||||
|
||||
return unescape(document.cookie.substring(c_start,c_end));
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function setCookie(name, value, expireDays)
|
||||
{
|
||||
var exdate=new Date();
|
||||
exdate.setDate(exdate.getDate()+expireDays);
|
||||
document.cookie=name+ "=" +escape(value)+
|
||||
((expireDays==null) ? "" : ";expires="+exdate.toGMTString());
|
||||
}
|
||||
@@ -29,7 +29,7 @@ function performInstall(url) {
|
||||
}
|
||||
});
|
||||
// On completed
|
||||
ajaxRequest.done(function(data) {
|
||||
ajaxRequest.done(function(/*data*/) {
|
||||
$('#spinner').hide();
|
||||
$('#reload_button').show();
|
||||
});
|
||||
@@ -38,4 +38,4 @@ function performInstall(url) {
|
||||
console.log('Error: ', error);
|
||||
$('<span class="error">Error while doing AJAX request. Please refresh the page.</span>').insertAfter("#success-" + lastId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ else if(isset($_GET['name']))
|
||||
if(!admin() && !Validator::newCharacterName($name))
|
||||
error_(Validator::getLastError());
|
||||
|
||||
$player = new OTS_Player();
|
||||
$player->find($name);
|
||||
if($player->isLoaded()) {
|
||||
error_('Character with this name already exist.');
|
||||
require_once LIBS . 'CreateCharacter.php';
|
||||
$createCharacter = new CreateCharacter();
|
||||
if (!$createCharacter->checkName($name, $errors)) {
|
||||
error_($errors['name']);
|
||||
}
|
||||
|
||||
success_('Good. Your name will be:<br /><b>' . (admin() ? $name : ucwords($name)) . '</b>');
|
||||
|
||||
Reference in New Issue
Block a user