Changeset 1326
Legend:
- Unmodified
- Added
- Removed
-
g-map/files/lib/data/gmap/GmapApi.class.php
r1309 r1326 40 40 } 41 41 42 /** 43 * @var array<string> 44 */ 42 45 public function getFields() { 43 46 if(defined('GMAP_CUSTOMINPUT') && $const = GMAP_CUSTOMINPUT && !empty($const)) { 44 $cols = explode(",", GMAP_CUSTOMINPUT); 47 $tmp = explode(",", GMAP_CUSTOMINPUT); 48 $cols = array(); 49 foreach($tmp as $field) { 50 $col = User::getUserOptionID($field); 51 if($col) { 52 $cols[] = $field; 53 } 54 } 45 55 } else { 46 56 $cols = array('location'); … … 49 59 } 50 60 61 /** 62 * @var string 63 */ 51 64 public function getColumn() { 52 65 $cols = array(); -
g-map/optionals/de.easy-coding.wcf.map.custominput/acptemplates/mapCustomInput.tpl
r1306 r1326 8 8 <a href="#" onclick="return changeCustomInput('{$opt.optionName}')"> 9 9 <h3 class="itemListTitle"> 10 { $opt.optionName}10 {lang}wcf.user.option.{$opt.optionName}{/lang} 11 11 </h3> 12 12 </a> -
g-map/optionals/de.easy-coding.wcf.map.custominput/files/lib/system/event/listener/MapCustomInputListener.class.php
r1306 r1326 2 2 // wcf imports 3 3 require_once(WCF_DIR.'lib/system/event/EventListener.class.php'); 4 require_once(WCF_DIR.'lib/data/gmap/GmapApi.class.php'); 4 5 5 6 /** … … 12 13 */ 13 14 class MapCustomInputListener implements EventListener { 15 16 public function validate($tmp) { 17 $cols = array(); 18 foreach($tmp as $field) { 19 $col = User::getUserOptionID($field); 20 if($col) { 21 $cols[] = $col; 22 } 23 } 24 return $cols; 25 } 26 14 27 /** 15 28 * @see EventListener::execute() … … 23 36 switch($eventName) { 24 37 case 'readData': 38 25 39 $this->current = explode(",", $eventObj->activeOptions['gmap_custominput']['optionValue']); 40 $this->current = $this->validate($this->current); 41 $eventObj->activeOptions['gmap_custominput']['optionValue'] = implode(",", $this->current); 26 42 $this->getOptionIDs(); 27 43 $this->readOptions(); … … 59 75 document.getElementById("gmap_custominputDiv").appendChild(d); 60 76 77 var d = document.getElementById("gmap_custominput").value = ""; 61 78 document.getElementById("gmap_custominput").style.display = "none"; 62 79 });
