File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 175175}
176176
177177if ($ jsonrpc ->getMethod () == 'geolocSave ' ){
178- log::add ('mobile ' , 'debug ' , 'Geoloc ADD ' . $ params ['id ' ] .' > ' . $ params ['name ' ]);
179- mobile::SaveGeoloc ($ params );
180- $ jsonrpc ->makeSuccess ();
178+ log::add ('mobile ' , 'debug ' , 'Geoloc SAVE ' . $ params ['id ' ] .' > ' . $ params ['name ' ]);
179+ if ($ params ['id ' ] != '' || $ params ['id ' ] != null ){
180+ mobile::SaveGeoloc ($ params );
181+ $ jsonrpc ->makeSuccess ();
182+ }else {
183+ throw new Exception (__ ('pas d \'id : ' , __FILE__ ) . $ params ['name ' ]);
184+ }
181185}
182186
183187if ($ jsonrpc ->getMethod () == 'geolocDel ' ){
184188 log::add ('mobile ' , 'debug ' , 'Geoloc DEL ' . $ params ['id ' ] .' > ' . $ params ['name ' ]);
185- mobile::DelGeoloc ($ params );
189+ mobile::delGeoloc ($ params );
186190 $ jsonrpc ->makeSuccess ();
187191}
188192
189193
190194throw new Exception (__ ('Aucune demande ' , __FILE__ ));
191195?>
196+
You can’t perform that action at this time.
0 commit comments