fixed more warnings

--HG--
branch : rc-botanic-webdev
This commit is contained in:
Botanic 2013-10-24 04:43:42 -07:00
parent b8fdefe10d
commit 2d174cf15c
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"] ) ) ){
return "success";
}else{
global $TOS_URL;
$pageElements = array(
//'GAME_NAME' => $GAME_NAME,
// 'WELCOME_MESSAGE' => $WELCOME_MESSAGE,
'USERNAME' => $user,
'PASSWORD' => $pass,
'CPASSWORD' => $cpass,
'EMAIL' => $email
'EMAIL' => $email,
'TOS_URL' => $TOS_URL
);
if ( $user != "success" ){
$pageElements['USERNAME_ERROR'] = 'TRUE';
@ -344,7 +346,7 @@ class Users{
* @param $user the inserted username
* @param $pass the inserted password
*/
protected function checkLoginMatch($user,$pass){
protected static function checkLoginMatch($user,$pass){
print('This is the base class!');
}

View file

@ -72,7 +72,7 @@ class WebUsers extends Users{
* @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.
*/
public function checkLoginMatch($username,$password){
public static function checkLoginMatch($username,$password){
if(!user_authenticate($username, $password)){
return 'fail';
}else{

View file

@ -71,7 +71,7 @@ $cfg['crypt']['enc_method'] = 'AES-256-CBC';
$cfg['crypt']['hash_method'] = "SHA512";
//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
// (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)
* @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");
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username));

View file

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

View file

@ -64,7 +64,7 @@
isset($TAC) and $TAC eq "success"}success{else}{/if}">
<div class="controls">
<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>