Merge branch 'master' of /home/git/platal
authorStéphane Jacob <jacou@m4x.org>
Tue, 25 Mar 2008 19:33:35 +0000 (20:33 +0100)
committerStéphane Jacob <jacou@m4x.org>
Tue, 25 Mar 2008 19:33:35 +0000 (20:33 +0100)
ChangeLog
modules/profile.php
modules/search.php
upgrade/0.9.16/10_logger.sql [new file with mode: 0644]

index 3ff6d39..54452d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,9 @@ New:
 
 Bug/Wish:
 
+    * Carnet:
+        - #734: Fix notification emails and carnet for female users        -VZA
+
     * Emails:
         - #726: Don't send the email if an attachment can't be downloaded  -FRU
         - #750: Fix email list in test email                               -FRU
index fc6bd7d..d8780f2 100644 (file)
@@ -208,6 +208,9 @@ class ProfileModule extends PLModule
             }
             return PL_NOT_FOUND;
         }
+        if (S::logged()) {
+            $_SESSION['log']->log('view_profile', $login);
+        }
 
         $new   = Env::v('modif') == 'new';
         $user  = get_user_details($login, S::v('uid'), $view);
index f74b4f5..a708d12 100644 (file)
@@ -89,6 +89,9 @@ class SearchModule extends PLModule
 
         if (Env::has('quick') || $action == 'geoloc') {
             $quick = trim(Env::v('quick'));
+            if (S::logged() && !Env::has('page')) {
+                $_SESSION['log']->log('search', 'quick=' . $quick);
+            }
             $list = 'profile|prf|fiche|fic|referent|ref|mentor';
             if (S::has_perms()) {
                 $list .= '|admin|adm|ax';
@@ -180,6 +183,9 @@ class SearchModule extends PLModule
                 'school' => array('field' => 'id', 'table' => 'applis_def', 'text' => 'text', 'exact' => false),
                 'city' => array('table' => 'geoloc_city', 'text' => 'name', 'exact' => false)
             );
+            if (!Env::has('page')) {
+                $_SESSION['log']->log('search', 'adv=' . var_export($_GET, true));
+            }
             foreach ($textFields as $field=>&$query) {
                 if (!Env::v($field) && Env::v($field . 'Txt')) {
                     $res = XDB::query("SELECT  {$query['field']}
diff --git a/upgrade/0.9.16/10_logger.sql b/upgrade/0.9.16/10_logger.sql
new file mode 100644 (file)
index 0000000..5be5ad2
--- /dev/null
@@ -0,0 +1,5 @@
+INSERT INTO logger.actions (text, description)
+     VALUES ('view_profile', 'Consultation d\'une fiche'),
+            ('search', 'Réalisation d\'une recherche');
+
+# vim:set syntax=mysql: