Ignore:
Timestamp:
Oct 28, 2010, 12:45:15 PM (13 years ago)
Author:
grum
Message:

fix bug:1972

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/gmaps_ajax.php

    r7308 r7453  
    10841084              );
    10851085*/
     1086
    10861087        $result=pwg_query($sql);
    10871088        if($result)
     
    12741275            $coords['lng']+=$point['longitude'];
    12751276
    1276             $coords['imgTn'][]=substr($point['imageTnFile'],12);
     1277            $coords['imgTn'][]=$point['imageTnFile'];
    12771278            $coords['imgCatsNames'][]=$tmpCatsNames;
    12781279            $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']);
     
    13351336    }
    13361337
     1338    /**
     1339     * replace the root directroy for image
     1340     *  => './galleries/' becomes "G"
     1341     *  => './upload/' becomes "U"
     1342     *  => other case : no chnages
     1343     *
     1344     * @param String $value : path
     1345     * @returned String :
     1346     */
     1347    private function replaceImgRoot($value)
     1348    {
     1349      if(preg_match('/^\.\/galleries\//i', $value)>0)
     1350      {
     1351        return("G".substr($value,12));
     1352      }
     1353      elseif("U".preg_match('/^\.\/upload\//i', $value)>0)
     1354      {
     1355        return(substr($value,9));
     1356      }
     1357      return($value);
     1358    }
     1359
    13371360  } //class
    13381361
Note: See TracChangeset for help on using the changeset viewer.