|
114 | 114 | // Update conf if submitted in admin site |
115 | 115 | if (isset($_POST['submit']) && !empty($_POST['osm_height'])) |
116 | 116 | { |
117 | | - // On post admin form |
118 | | - $conf['osm_conf'] = array( |
119 | | - 'right_panel' => array( |
120 | | - 'enabled' => get_boolean($_POST['osm_right_panel']), |
121 | | - 'add_before' => $_POST['osm_add_before'], |
122 | | - 'height' => $_POST['osm_height'], |
123 | | - 'zoom' => $_POST['osm_zoom'], |
124 | | - 'link' => $_POST['osm_right_link'], |
125 | | - 'linkcss' => $_POST['osm_right_linkcss'], |
126 | | - 'showosm' => get_boolean($_POST['osm_showosm']), |
127 | | - ), |
128 | | - 'left_menu' => array( |
129 | | - 'enabled' => get_boolean($_POST['osm_left_menu']), |
130 | | - 'link' => $_POST['osm_left_link'], |
131 | | - 'popup' => $_POST['osm_left_popup'], |
132 | | - 'popupinfo_name' => isset($_POST['osm_left_popupinfo_name']), |
133 | | - 'popupinfo_img' => isset($_POST['osm_left_popupinfo_img']), |
134 | | - 'popupinfo_link' => isset($_POST['osm_left_popupinfo_link']), |
135 | | - 'popupinfo_comment' => isset($_POST['osm_left_popupinfo_comment']), |
136 | | - 'popupinfo_author' => isset($_POST['osm_left_popupinfo_author']), |
137 | | - ), |
138 | | - 'category_description' => array( |
139 | | - 'enabled' => get_boolean($_POST['osm_category_description']), |
140 | | - 'height' => $_POST['osm_cat_height'], |
141 | | - 'width' => $_POST['osm_cat_width'], |
142 | | - ), |
143 | | - 'main_menu' => array( |
144 | | - 'enabled' => get_boolean($_POST['osm_main_menu']), |
145 | | - 'height' => $_POST['osm_menu_height'], |
146 | | - ), |
147 | | - 'map' => array( |
148 | | - 'baselayer' => $_POST['osm_baselayer'], |
149 | | - 'custombaselayer' => $_POST['osm_custombaselayer'], |
150 | | - 'custombaselayerurl' => $_POST['osm_custombaselayerurl'], |
151 | | - 'noworldwarp' => get_boolean($_POST['osm_noworldwarp']), |
152 | | - 'attrleaflet' => get_boolean($_POST['osm_attrleaflet']), |
153 | | - 'attrimagery' => get_boolean($_POST['osm_attrimagery']), |
154 | | - 'attrplugin' => get_boolean($_POST['osm_attrplugin']), |
155 | | - ), |
156 | | - 'pin' => array( |
157 | | - 'pin' => $_POST['osm_pin'], |
158 | | - 'pinpath' => $_POST['osm_pinpath'], |
159 | | - 'pinsize' => $_POST['osm_pinsize'], |
160 | | - 'pinshadowpath' => $_POST['osm_pinshadowpath'], |
161 | | - 'pinshadowsize' => $_POST['osm_pinshadowsize'], |
162 | | - 'pinoffset' => $_POST['osm_pinoffset'], |
163 | | - 'pinpopupoffset' => $_POST['osm_pinpopupoffset'], |
164 | | - ), |
165 | | - |
166 | | - ); |
| 117 | + // On post admin form |
| 118 | + $conf['osm_conf'] = array( |
| 119 | + 'right_panel' => array( |
| 120 | + 'enabled' => get_boolean($_POST['osm_right_panel']), |
| 121 | + 'add_before' => $_POST['osm_add_before'], |
| 122 | + 'height' => $_POST['osm_height'], |
| 123 | + 'zoom' => $_POST['osm_zoom'], |
| 124 | + 'link' => $_POST['osm_right_link'], |
| 125 | + 'linkcss' => $_POST['osm_right_linkcss'], |
| 126 | + 'showosm' => get_boolean($_POST['osm_showosm']), |
| 127 | + ), |
| 128 | + 'left_menu' => array( |
| 129 | + 'enabled' => get_boolean($_POST['osm_left_menu']), |
| 130 | + 'link' => $_POST['osm_left_link'], |
| 131 | + 'popup' => $_POST['osm_left_popup'], |
| 132 | + 'popupinfo_name' => isset($_POST['osm_left_popupinfo_name']), |
| 133 | + 'popupinfo_img' => isset($_POST['osm_left_popupinfo_img']), |
| 134 | + 'popupinfo_link' => isset($_POST['osm_left_popupinfo_link']), |
| 135 | + 'popupinfo_comment' => isset($_POST['osm_left_popupinfo_comment']), |
| 136 | + 'popupinfo_author' => isset($_POST['osm_left_popupinfo_author']), |
| 137 | + 'zoom' => $_POST['osm_left_zoom'], |
| 138 | + 'center' => $_POST['osm_left_center'], |
| 139 | + ), |
| 140 | + 'map' => array( |
| 141 | + 'baselayer' => $_POST['osm_baselayer'], |
| 142 | + 'custombaselayer' => $_POST['osm_custombaselayer'], |
| 143 | + 'custombaselayerurl' => $_POST['osm_custombaselayerurl'], |
| 144 | + 'noworldwarp' => get_boolean($_POST['osm_noworldwarp']), |
| 145 | + 'attrleaflet' => get_boolean($_POST['osm_attrleaflet']), |
| 146 | + 'attrimagery' => get_boolean($_POST['osm_attrimagery']), |
| 147 | + 'attrplugin' => get_boolean($_POST['osm_attrplugin']), |
| 148 | + ), |
| 149 | + 'pin' => array( |
| 150 | + 'pin' => $_POST['osm_pin'], |
| 151 | + 'pinpath' => $_POST['osm_pinpath'], |
| 152 | + 'pinsize' => $_POST['osm_pinsize'], |
| 153 | + 'pinshadowpath' => $_POST['osm_pinshadowpath'], |
| 154 | + 'pinshadowsize' => $_POST['osm_pinshadowsize'], |
| 155 | + 'pinoffset' => $_POST['osm_pinoffset'], |
| 156 | + 'pinpopupoffset' => $_POST['osm_pinpopupoffset'], |
| 157 | + ), |
| 158 | + ); |
167 | 159 |
|
168 | 160 | // Update config to DB |
169 | 161 | conf_update_param('osm_conf', serialize($conf['osm_conf'])); |
|
0 commit comments