From 2d174cf15c6909860c43c8223bf570815eeaebcb Mon Sep 17 00:00:00 2001 From: Botanic Date: Thu, 24 Oct 2013 04:43:42 -0700 Subject: [PATCH] fixed more warnings --HG-- branch : rc-botanic-webdev --- .../ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php | 6 ++++-- .../drupal_module/ryzommanage/autoload/webusers.php | 2 +- .../ryzom_ams/drupal_module/ryzommanage/config.default.php | 2 +- .../tools/server/ryzom_ams/www/html/autoload/webusers.php | 2 +- code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php | 2 +- .../tools/server/ryzom_ams/www/html/templates/register.tpl | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php index 43dc91a99..867aa270b 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php @@ -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!'); } diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php index bc0d325a3..1b68ae4f0 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php @@ -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{ diff --git a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.default.php b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.default.php index ec810a402..1e2193bca 100644 --- a/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.default.php +++ b/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.default.php @@ -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 diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php index 5c5860532..d8e59d1f9 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php @@ -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)); diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php index d4d240ac5..156ce92bf 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php @@ -5,6 +5,6 @@ */ function register(){ global $TOS_URL; - $pageElements['tos_url'] = $TOS_URL; + $pageElements['TOS_URL'] = $TOS_URL; return $pageElements; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/register.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/register.tpl index 44d81f9c7..5f820e5fa 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/register.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/register.tpl @@ -64,7 +64,7 @@ isset($TAC) and $TAC eq "success"}success{else}{/if}">
- {$tac_tag1}{$tac_tag2} + {$tac_tag1}{$tac_tag2}