fixed more warnings

This commit is contained in:
Botanic 2013-10-24 04:43:42 -07:00
parent ddb06c7f8c
commit e3c9670869
6 changed files with 9 additions and 7 deletions

View file

@ -29,13 +29,15 @@ class Users{
if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success" ) and ( $email == "success" ) and ( isset( $_POST["TaC"] ) ) ){ if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success" ) and ( $email == "success" ) and ( isset( $_POST["TaC"] ) ) ){
return "success"; return "success";
}else{ }else{
global $TOS_URL;
$pageElements = array( $pageElements = array(
//'GAME_NAME' => $GAME_NAME, //'GAME_NAME' => $GAME_NAME,
// 'WELCOME_MESSAGE' => $WELCOME_MESSAGE, // 'WELCOME_MESSAGE' => $WELCOME_MESSAGE,
'USERNAME' => $user, 'USERNAME' => $user,
'PASSWORD' => $pass, 'PASSWORD' => $pass,
'CPASSWORD' => $cpass, 'CPASSWORD' => $cpass,
'EMAIL' => $email 'EMAIL' => $email,
'TOS_URL' => $TOS_URL
); );
if ( $user != "success" ){ if ( $user != "success" ){
$pageElements['USERNAME_ERROR'] = 'TRUE'; $pageElements['USERNAME_ERROR'] = 'TRUE';
@ -344,7 +346,7 @@ class Users{
* @param $user the inserted username * @param $user the inserted username
* @param $pass the inserted password * @param $pass the inserted password
*/ */
protected function checkLoginMatch($user,$pass){ protected static function checkLoginMatch($user,$pass){
print('This is the base class!'); print('This is the base class!');
} }

View file

@ -72,7 +72,7 @@ class WebUsers extends Users{
* @param $password the inserted password (unhashed) * @param $password the inserted password (unhashed)
* @return the logged in user's db row as array if login was a success, else "fail" will be returned. * @return the logged in user's db row as array if login was a success, else "fail" will be returned.
*/ */
public function checkLoginMatch($username,$password){ public static function checkLoginMatch($username,$password){
if(!user_authenticate($username, $password)){ if(!user_authenticate($username, $password)){
return 'fail'; return 'fail';
}else{ }else{

View file

@ -71,7 +71,7 @@ $cfg['crypt']['enc_method'] = 'AES-256-CBC';
$cfg['crypt']['hash_method'] = "SHA512"; $cfg['crypt']['hash_method'] = "SHA512";
//terms of service url location //terms of service url location
$TOS_URL = variable_get('ryzommanage_TOS', 'www.mytosurlhere.com'); $TOS_URL = variable_get('ryzommanage_TOS', 'http://www.gnu.org/licenses/agpl-3.0.html');
//----------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------
// If true= the server will add automatically unknown user in the database // If true= the server will add automatically unknown user in the database
// (in nel.user= nel.permission= ring.ring_user and ring.characters // (in nel.user= nel.permission= ring.ring_user and ring.characters

View file

@ -75,7 +75,7 @@ class WebUsers extends Users{
* @param $password the inserted password (unhashed) * @param $password the inserted password (unhashed)
* @return the logged in user's db row as array if login was a success, else "fail" will be returned. * @return the logged in user's db row as array if login was a success, else "fail" will be returned.
*/ */
public function checkLoginMatch($username,$password){ public static function checkLoginMatch($username,$password){
$dbw = new DBLayer("web"); $dbw = new DBLayer("web");
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username)); $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username));

View file

@ -5,6 +5,6 @@
*/ */
function register(){ function register(){
global $TOS_URL; global $TOS_URL;
$pageElements['tos_url'] = $TOS_URL; $pageElements['TOS_URL'] = $TOS_URL;
return $pageElements; return $pageElements;
} }

View file

@ -64,7 +64,7 @@
isset($TAC) and $TAC eq "success"}success{else}{/if}"> isset($TAC) and $TAC eq "success"}success{else}{/if}">
<div class="controls"> <div class="controls">
<div class="input-prepend"> <div class="input-prepend">
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$tos_url}'>{$tac_tag2}</a> <input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$TOS_URL}'>{$tac_tag2}</a>
</div> </div>
</div> </div>