Changeset 18951
- Timestamp:
- Nov 6, 2012, 9:55:00 PM (12 years ago)
- Location:
- extensions/rv_gmaps/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/admin/admin_boot.php
r18728 r18951 172 172 173 173 $template->set_prefilter('batch_manager_unit', 'rvm_prefilter_batch_manager_unit'); 174 175 if (empty($page['cat_elements_id']))176 return;177 178 $query = '179 SELECT id,lat,lon180 FROM '.IMAGES_TABLE;181 182 if ($is_category)183 {184 $category_info = get_cat_info($_SESSION['bulk_manager_filter']['category']);185 186 $conf['order_by'] = $conf['order_by_inside_category'];187 if (!empty($category_info['image_order']))188 {189 $conf['order_by'] = ' ORDER BY '.$category_info['image_order'];190 }191 192 $query.= '193 JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';194 }195 196 $query.= '197 WHERE id IN ('.implode(',', $page['cat_elements_id']).')';198 199 if ($is_category)200 {201 $query.= '202 AND category_id = '.$_SESSION['bulk_manager_filter']['category'];203 }204 205 $query.= '206 '.$conf['order_by'].'207 LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].'208 ;';209 $result = pwg_query($query);210 211 $tpl_vars = array();212 while ($row = pwg_db_fetch_assoc($result))213 {214 // remove last zeros for better display215 $row['lat'] = preg_replace('#\.([0-9]*?)([0]+)$#', '.$1', $row['lat']);216 $row['lon'] = preg_replace('#\.([0-9]*?)([0]+)$#', '.$1', $row['lon']);217 218 $tpl_vars[ $row['id'] ] = array(219 'LAT' => rtrim($row['lat'], '.'),220 'LON' => rtrim($row['lon'], '.'),221 );222 }223 224 $template->assign('GEOTAG', $tpl_vars);225 174 } 226 175 … … 234 183 <td> 235 184 <label>{\'Latitude\'|@translate} 236 <input type="text" size="8" name="lat-{$element. ID}" value="{$GEOTAG[$element.ID].LAT}">185 <input type="text" size="8" name="lat-{$element.id}" value="{$element.lat}"> 237 186 </label> 238 187 <label>{\'Longitude\'|@translate} 239 <input type="text" size="9" name="lon-{$element. ID}" value="{$GEOTAG[$element.ID].LON}">188 <input type="text" size="9" name="lon-{$element.id}" value="{$element.lon}"> 240 189 </label> 241 190 </td> -
extensions/rv_gmaps/trunk/changelog.txt
r18928 r18951 1 2.5.a 2 - piwigo 2.5 3 1 4 2.4.g 2 5 - added missing trigger on category name translation... -
extensions/rv_gmaps/trunk/main.inc.php
r18928 r18951 1 1 <?php /* 2 2 Plugin Name: RV Maps&Earth 3 Version: 2. 4.g3 Version: 2.5.a 4 4 Description: Extend your gallery with Google Maps and Google Earth ... 5 5 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=122 … … 7 7 Author URI: http://www.modusoptimus.com/ 8 8 */ 9 define( 'RVM_PLUGIN_VERSION', '2. 4.f');9 define( 'RVM_PLUGIN_VERSION', '2.5.a'); 10 10 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 11 11 … … 101 101 global $rvm_dir; 102 102 $map_url = rvm_duplicate_map_picture_url(); 103 $link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current'][' name']) );103 $link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['TITLE']) ); 104 104 $template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL, 105 105 $map_url, $link_title, ' target="_top"', 'map', l10n('Map')
Note: See TracChangeset
for help on using the changeset viewer.