Changeset 2817
- Timestamp:
- 12/30/10 11:34:16 (13 years ago)
- Location:
- plugins/myGmaps
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/myGmaps/_define.php
r2816 r2817 15 15 /* Description*/ "Create Google Maps objects to include in maps associated to your posts", 16 16 /* Author */ "Philippe aka amalgame", 17 /* Version */ '0.6. 3',17 /* Version */ '0.6.4', 18 18 /* Permissions */ 'usage,contentadmin' 19 19 ); -
plugins/myGmaps/addmap.php
r2814 r2817 14 14 15 15 dcPage::check('usage,contentadmin'); 16 17 global $core; 16 18 17 19 $p_url = 'plugin.php?p='.basename(dirname(__FILE__)); … … 477 479 '</div>' 478 480 ); 479 if ($maps_array) { 481 482 if (isset($maps_array)) { 480 483 for ($i = 0; $i < sizeof($maps_array); ++$i) { 481 484 echo '<p style="display:none">'.form::checkbox(array('entries[]'),$maps_array[$i],'true','','','').'</p>'; 482 485 } 483 486 } 487 484 488 echo 485 489 '<p><input type="hidden" name="myGmaps_center" id="myGmaps_center" value="'.$myGmaps_center.'" />'. … … 492 496 echo '<div class="multi-part" id="settings" title="'.__('Settings').'">'; 493 497 498 494 499 $meta =& $GLOBALS['core']->meta; 495 500 $my_params['post_id'] = $post_id; … … 497 502 498 503 $rs = $core->blog->getPosts($my_params); 499 $meta_rs = $meta->getMetaStr($post->post_meta,'map_options'); 500 501 if ($meta_rs) { 502 $map_options = explode(",",$meta_rs); 503 $myGmaps_center = $map_options[0].','.$map_options[1]; 504 $myGmaps_zoom = $map_options[2]; 505 $myGmaps_type = $map_options[3]; 504 if(isset($post)) { 505 $meta_rs = $meta->getMetaStr($post->post_meta,'map_options'); 506 if ($meta_rs) { 507 $map_options = explode(",",$meta_rs); 508 $myGmaps_center = $map_options[0].','.$map_options[1]; 509 $myGmaps_zoom = $map_options[2]; 510 $myGmaps_type = $map_options[3]; 511 } 506 512 } 507 513 … … 517 523 $core->formNonce(); 518 524 519 if ( $has_map) {525 if (isset($has_map) && $has_map == true) { 520 526 echo '<p>'.($post_id ? form::hidden('post_id',$post_id) : '').'<input type="submit" value="'.__('Save').'" name="updmap" /></p>'; 521 527 }
Note: See TracChangeset
for help on using the changeset viewer.