/[drupal]/contributions/modules/storm/stormorganization/stormorganization.admin.inc
ViewVC logotype

Diff of /contributions/modules/storm/stormorganization/stormorganization.admin.inc

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

revision 1.6, Wed Jun 11 12:56:52 2008 UTC revision 1.7, Tue Jul 1 07:47:42 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: stormorganization.admin.inc,v 1.5 2008/05/20 08:11:56 robertogerola Exp $  // $Id: stormorganization.admin.inc,v 1.6 2008/06/11 12:56:52 robertogerola Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 34  function stormorganization_list() { Line 34  function stormorganization_list() {
34      ),      ),
35    );    );
36    
37    $s = "SELECT n.*, sor.* FROM {stormorganization} sor INNER JOIN {node} n ON n.nid=sor.nid WHERE n.status=1 AND n.type='stormorganization'";    $s = "SELECT n.*, sor.* FROM {node} AS n INNER JOIN {stormorganization} AS sor ON n.nid=sor.nid WHERE n.status=1 AND n.type='stormorganization'";
38    $where = array();    $where = array();
39    if ($_SESSION['stormorganization_list_filter']['country']) {    if ($_SESSION['stormorganization_list_filter']['country']) {
40      $where[] = "sor.country='". $_SESSION['stormorganization_list_filter']['country'] ."'";      $where[] = "sor.country='". $_SESSION['stormorganization_list_filter']['country'] ."'";
# Line 44  function stormorganization_list() { Line 44  function stormorganization_list() {
44    }    }
45    $itemsperpage = $_SESSION['stormorganization_list_filter']['itemsperpage'];    $itemsperpage = $_SESSION['stormorganization_list_filter']['itemsperpage'];
46    
47    $s = db_rewrite_sql($s, 'stormorganization', 'nid');    $s = db_rewrite_sql($s);
48    $s = stormorganization_access_sql($s, $where);    $s = stormorganization_access_sql($s, $where);
49    
50    $tablesort = tablesort_sql($header);    $tablesort = tablesort_sql($header);
# Line 153  function stormorganization_list_filter_r Line 153  function stormorganization_list_filter_r
153  function stormorganization_autocomplete($string = '') {  function stormorganization_autocomplete($string = '') {
154    $matches = array();    $matches = array();
155    if ($string) {    if ($string) {
156      $result = db_query_range("SELECT title FROM {node} n WHERE n.type='stormorganization' AND LOWER(title) LIKE LOWER('%s%%')", $string, 0, 10);      $s = "SELECT title FROM {node} AS n WHERE n.type='stormorganization' AND LOWER(title) LIKE LOWER('%s%%')";
157        $s = stormorganization_access_sql($s);
158        $s = db_rewrite_sql($s);
159    
160        $result = db_query_range($s, $string, 0, 10);
161      while ($org = db_fetch_object($result)) {      while ($org = db_fetch_object($result)) {
162        $matches[$org->title] = check_plain($org->title);        $matches[$org->title] = check_plain($org->title);
163      }      }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2