/[drupal]/contributions/modules/storm/stormorganization/stormorganization.module
ViewVC logotype

Diff of /contributions/modules/storm/stormorganization/stormorganization.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11.4.8, Fri Jul 25 08:51:21 2008 UTC revision 1.11.4.9, Fri Aug 1 08:15:10 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: stormorganization.module,v 1.11.4.7 2008/07/23 19:37:49 robertogerola Exp $  // $Id: stormorganization.module,v 1.11.4.8 2008/07/25 08:51:21 robertogerola Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 107  function stormorganization_access_sql($s Line 107  function stormorganization_access_sql($s
107    return storm_rewrite_sql($sql, $where);    return storm_rewrite_sql($sql, $where);
108  }  }
109    
110  function stormorganization_storm_rewrite_where_sql($query, $primary_table ='n', $account = NULL) {  function stormorganization_storm_rewrite_where_sql($query, $primary_table, $account = NULL) {
111    static $conds = array();    static $conds = array();
112    
113    if (!$account) {    if (!$account) {
# Line 133  function stormorganization_storm_rewrite Line 133  function stormorganization_storm_rewrite
133      }      }
134      if (user_access('Storm organization: view belonged', $account)) {      if (user_access('Storm organization: view belonged', $account)) {
135        if ($cond) $cond .= ' OR ';        if ($cond) $cond .= ' OR ';
136        $cond .= 'sor1.nid='. $account->stormorganization_nid;        $cond .= ' sor1.nid='. $account->stormorganization_nid;
137      }      }
138      if ($cond) {      if ($cond) {
139        $cond = "WHEN 'stormorganization' THEN (SELECT IF($cond,1,0) FROM {stormorganization} sor1 WHERE sor1.vid=${primary_table}.vid) ";        $cond = " WHEN 'stormorganization' THEN (SELECT IF($cond,1,0) FROM {stormorganization} sor1 WHERE sor1.vid=${primary_table}.vid) ";
140      }      }
141      else {      else {
142        $cond = "WHEN 'stormorganization' THEN 0 ";        $cond = " WHEN 'stormorganization' THEN 0 ";
143      }      }
144    }    }
145    

Legend:
Removed from v.1.11.4.8  
changed lines
  Added in v.1.11.4.9

  ViewVC Help
Powered by ViewVC 1.1.2