Updates ChangeLog, core, and adds the new upgrade directory.
[platal.git] / classes / platalglobals.php.in
index 409b68c..0fb6e6f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -26,6 +26,7 @@ class PlatalGlobals extends PlGlobals
 
     /** db params */
     public $dbdb               = 'x4dat';
+    public $dbprefix           = '';
     public $dbhost             = 'localhost';
     public $dbuser             = 'x4dat';
     public $dbpwd              = 'x4dat';
@@ -38,6 +39,13 @@ class PlatalGlobals extends PlGlobals
     public function __construct()
     {
         parent::__construct(array('platal.ini', 'platal.conf'));
+        if (isset($GLOBALS['IS_XNET_SITE'])) {
+            $this->core->sitename = 'Polytechnique.net';
+        }
+    }
+
+    public function init()
+    {
         $this->bootstrap(array('NbIns'), array($this, 'updateNbIns'));
         $this->bootstrap(array('NbValid'), array($this, 'updateNbValid'));
     }
@@ -53,12 +61,13 @@ class PlatalGlobals extends PlGlobals
             }
 
             if ($gp) {
-                $res = XDB::query('SELECT  a.*, d.nom AS domnom,
-                                           FIND_IN_SET(\'wiki_desc\', a.flags) AS wiki_desc,
-                                           FIND_IN_SET(\'notif_unsub\', a.flags) AS notif_unsub
-                                     FROM  groupex.asso AS a
-                                LEFT JOIN  groupex.dom  AS d ON d.id = a.dom
-                                    WHERE  diminutif = {?}', $gp);
+                $res = XDB::query("SELECT  a.*, d.nom AS domnom,
+                                           FIND_IN_SET('notif_unsub', a.flags) AS notif_unsub,
+                                           FIND_IN_SET('has_ml', a.flags) AS has_ml
+                                     FROM  #groupex#.asso AS a
+                                LEFT JOIN  #groupex#.dom  AS d ON d.id = a.dom
+                                    WHERE  diminutif = {?}",
+                                  $gp);
                 if (!($aid = $res->fetchOneAssoc())) {
                     $aid = array();
                 }