]> mop.ddnsfree.com - git repositories - brisk.git/commitdiff
G_base var added to fix relative path problem in include of includes
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 10 Feb 2011 18:17:43 +0000 (19:17 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 10 Feb 2011 18:17:43 +0000 (19:17 +0100)
13 files changed:
web/Obj/auth.phh
web/Obj/brisk.phh
web/Obj/dbase_file.phh
web/Obj/dbase_pgsql.phh
web/briskin5/Obj/briskin5.phh
web/briskin5/index.php
web/briskin5/index_rd.php
web/briskin5/index_wr.php
web/briskin5/statadm.php
web/donometer.php
web/index.php
web/index_rd.php
web/index_wr.php

index f25e01a53a6af02d16412d9f269b1074e4453f4f..eff784f77d25292a0b83f02174a5b710dc347a80 100644 (file)
@@ -22,7 +22,7 @@
    *
    */
 
-require_once("Obj/dbase_".$G_dbasetype.".phh");
+require_once("${G_base}Obj/dbase_${G_dbasetype}.phh");
 
 define(CHAL_SHM_DIMS_MIN, 16384);
 define(CHAL_SHM_DIMS_MAX, 65536);
index 5be9eac4d1b7f26b69581634c2bbe25fff01d25c..ed630cebf734b6efbfb7bd1e94f27b4eae86d217 100644 (file)
@@ -925,7 +925,7 @@ class Room {
 
   function garbage_manager($force)
   {
-    GLOBAL $G_lang, $mlang_brisk;
+    GLOBAL $G_lang, $mlang_brisk, $G_base;
 
     $ismod = FALSE;
 
@@ -936,7 +936,7 @@ class Room {
     if ($force || $this->garbage_timeout < $curtime) {
       
       // FIXME BRISK4: include for each kind of table
-      require_once("briskin5/Obj/briskin5.phh");
+      require_once("${G_base}briskin5/Obj/briskin5.phh");
 
       // Before all align times with table timeout
       for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) {
@@ -1425,7 +1425,7 @@ class Room {
 
   function chatt_send(&$user, $mesg)
   {
-    GLOBAL $G_alarm_passwd, $mlang_brisk, $G_lang;
+    GLOBAL $G_base, $G_alarm_passwd, $mlang_brisk, $G_lang;
     $only_you = FALSE;
     
     // common settings
@@ -1770,7 +1770,7 @@ class Room {
     
     if ($to_tabl) {
       // FIXME BRISK4: include for each kind of table
-      require_once("briskin5/Obj/briskin5.phh");
+      require_once("${G_base}briskin5/Obj/briskin5.phh");
       // Before all align times with table timeout
       for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) {
         $table_cur =& $this->table[$table_idx];
@@ -1867,7 +1867,7 @@ class Room {
 
   function &add_user(&$sess, &$idx, $name, $pass, $ip)
   {
-    GLOBAL $G_false, $CO_list;
+    GLOBAL $G_base, $G_false, $CO_list;
 
     $idx = 0;
 
@@ -1951,7 +1951,7 @@ class Room {
       $table_idx = $ghost_user->table;
       if ($ghost_user->stat == "table" && $this->table[$table_idx]->player_n == PLAYERS_N) {
         // FIXME BRISK4: include for each kind of table
-        require_once("briskin5/Obj/briskin5.phh");
+        require_once("${G_base}briskin5/Obj/briskin5.phh");
         if (($brisem = Briskin5::lock_data($table_idx)) != FALSE) { 
           if (($bri = &Briskin5::load_data($table_idx)) != FALSE) {
             if ($bri->the_end != TRUE) {
index 2cf1a3327389cf282e0889572c6f5cdbbb5bb279..d09f5df5a221c271e2cb8e07ead59fd56d2bc9af 100644 (file)
@@ -22,7 +22,7 @@
    *
    */
 
-require_once("Obj/dbase_base.phh");
+require_once("${G_base}Obj/dbase_base.phh");
 
 define(BRISK_AUTH_CONF,   "brisk_auth.conf.pho");
 
index ff314b1cb61992366cdaa8a9b39eac084be170f2..2c274dd524713fdd416ffbbaf41ac4b678aa3fff 100644 (file)
@@ -22,7 +22,7 @@
    *
    */
 
-require_once("Obj/dbase_base.phh");
+require_once("${G_base}Obj/dbase_base.phh");
 
 $escsql_from = array( "\\",   "'"   );
 $escsql_to   = array( "\\\\", "\\'" );
index e05e7b99f3a73c5983216216079650607ac2495f..2990da4742f19fe35b20ad22d296e105c1020885 100644 (file)
@@ -575,7 +575,8 @@ class Briskin5 {
 
   function garbage_manager($force)
   {
-    
+    GLOBAL $G_base;
+
     /* Garbage collector degli utenti in timeout */
     $ismod = FALSE;
     $curtime = time();
@@ -606,7 +607,7 @@ class Briskin5 {
             /* se gli altri utenti non erano d'accordo questo utente viene bannato */
             $remcalc = $this->table[0]->exitlock_calc(&$this->user, $user_cur->table_pos);
             if ($remcalc < 3) {
-                require_once("/var/www/webspace/trusty/Obj/hardban.phh");
+                require_once("${G_base}Obj/hardban.phh");
                 Hardbans::add(($user_cur->flags & USER_FLAG_AUTH ? $user_cur->name : FALSE),
                               $user_cur->ip, $user_cur->sess, $user_cur->laccwr + BAN_TIME);
             }
index a3fb80ac0883d76b462314f97ba7c42d4fe9df7e..3d7f2ece68ef3e893474d47977084d64327720b1 100644 (file)
@@ -24,6 +24,8 @@
 
 /* MLANG: le img dell'asta */
 
+$G_base = "../";
+
 require_once("../Obj/brisk.phh");
 require_once("../Obj/proxyscan.phh");
 require_once("Obj/briskin5.phh");
index 995486b868f00433ac02d1c8a00ce32f1511b44f..2a3522079859f3bc5ecfa3119de93a6f283eb9a5 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+$G_base = "../";
+
 require_once("../Obj/brisk.phh");
 // require_once("../Obj/proxyscan.phh");
 require_once("Obj/briskin5.phh");
index bc349a3a3e59dcded4b32e64d4329d80c9eea12f..9b269f7f74e0f5dd01b32bc02cdb0cfa38b67df0 100644 (file)
@@ -22,6 +22,9 @@
  *
  */
 
+
+$G_base = "../";
+
 require_once("../Obj/brisk.phh");
 // require_once("../Obj/proxyscan.phh");
 require_once("Obj/briskin5.phh");
index 2c488f019c0f2cc518793b05e4b47e7c68fcba19..257bf3fa0a3953e9c8771da2b728d2514024949b 100644 (file)
@@ -33,6 +33,8 @@ TODO:
    
 */
 
+$G_base = "../";
+
 ini_set("max_execution_time",  "240");
 
 require_once("../Obj/brisk.phh");
index 620a39dfc3a404b81e714d8eb3b50d0470f1dc89..e6a21d365bc1ef9c4053381ad54f0554099e59d5 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+$G_base = "";
+
 require_once("Obj/brisk.phh");
 
 
index f0b05c787d543da58ef95ab7c30c93a5ac387c63..5fd269d04e5c8d0d1e88638b639648da34954710 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+$G_base = "";
+
 require_once("Obj/brisk.phh");
 require_once("Obj/auth.phh");
 require_once("Obj/proxyscan.phh");
index 80c41d139948f53e14fee43f28542da93678b6bc..711218267114f7da4bcff8aa90696e8b9bc2fd25 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+$G_base = "";
+
 require_once("Obj/brisk.phh");
 // require_once("Obj/proxyscan.phh");
 require_once("briskin5/Obj/briskin5.phh");
index 8dda399193b48eb33ed1013d5d83bae7c73d2c3c..0db96eb66e598844ef1a87e42032b5dfa6ccad7e 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+$G_base = "";
+
 require_once("Obj/brisk.phh");
 require_once("Obj/auth.phh");
 // require_once("Obj/proxyscan.phh");