Ignore:
Timestamp:
Oct 9, 2010, 12:28:05 AM (14 years ago)
Author:
grum
Message:

KML files manager implemented + fixe some small bugs + forgotten file for the search page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/gmaps_root.class.inc.php

    r7128 r7132  
    7676      $this->section_name=$this->getPluginNameFiles();
    7777
    78       $this->setTablesList(array('maps', 'category_maps', 'cache'));
     78      $this->setTablesList(array('maps', 'category_maps', 'cache', 'kmlfiles'));
    7979      $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
    8080    }
     
    203203       */
    204204      $sql="SELECT DISTINCT pgcm.id, pgcm.categoryId,
    205               pgcm.imgSort, pgcm.applySubCat, pgcm.kmlFileUrl,
     205              pgcm.imgSort, pgcm.applySubCat, pgcm.kmlFileUrl, pgcm.kmlFileId, pgkf.file AS kmlFileUrlId,
    206206              pgcm.icon, pgcm.title,
    207207              pgmm.displayType, pgmm.sizeMode,
     
    210210              pgmm.navigationControl, pgmm.style,
    211211              IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank
    212             FROM (".$this->tables['category_maps']." pgcm
    213               LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id)
    214               LEFT JOIN ".CATEGORIES_TABLE." pct ON (FIND_IN_SET(pgcm.categoryId, pct.uppercats)!=0 OR pgcm.categoryId=0)
     212            FROM ((".$this->tables['category_maps']." pgcm
     213                  LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id)
     214                  LEFT JOIN ".CATEGORIES_TABLE." pct ON (FIND_IN_SET(pgcm.categoryId, pct.uppercats)!=0 OR pgcm.categoryId=0))
     215                  LEFT JOIN ".$this->tables['kmlfiles']." pgkf ON  pgkf.id = pgcm.kmlFileId
    215216            WHERE $where ";
    216217      if($category!=0)
     
    237238        while($row=pwg_db_fetch_assoc($result))
    238239        {
     240          // if an kml file id is given, apply the url of the file (needs to give the complete URI for google)
     241          if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).'/plugins/GMaps/kml/'.$row['kmlFileUrlId'];
     242
    239243          if($row['displayType']!='MP')
    240244          {
Note: See TracChangeset for help on using the changeset viewer.