upgrade 1.1.2 pour XML, MySql et SQLite
[mw_sourceml] / app / data / modules / sql / sml_data_source_groupes.php
index 45d07b1..0ada4f0 100644 (file)
 
     function get_editor_groupes($groupes){
       $editor_groupes = array();
-      if(is_array($groupes)) foreach($groupes as $source_groupe)
-      { if(
+      if(is_array($groupes)) foreach($groupes as $source_groupe){
+        if(
               $source_groupe["id_groupe_status"] == $this->id_groupe_status_admin()
           ||  $source_groupe["id_groupe_status"] == $this->id_groupe_status_editeur()
         ){
       return $permissions;
     }
 
+// --------------------------------------------------------------------
+
+    function sources_invitations($groupes, $id_user){
+      $groupes_in = "";
+      foreach($groupes as $id_groupe => $groupe) $groupes_in .= ($groupes_in ? "," : "").$id_groupe;
+      return $this->list_sml_sources_invitations(
+        array(
+          "index_name" => "id",
+          "where"=> ($groupes_in ? "id_author IN(".$groupes_in.") OR " : "")."id_user=".$id_user,
+          "order_by" => "date_invitation",
+          "order" => "DESC"
+        )
+      );
+    }
+
   }
 
 ?>
\ No newline at end of file