1: <?php
2: /**
3: * Ansel_Ajax_Imple_ToggleGalleryActions:: class for performing Ajax setting of
4: * the gallery show_galleryactions user pref.
5: *
6: * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
7: *
8: * @author Michael J. Rubinsky <mrubinsk@horde.org>
9: * @package Ansel
10: */
11: class Ansel_Ajax_Imple_MapLayerSelect extends Horde_Core_Ajax_Imple
12: {
13: public function attach()
14: {
15: // noop
16: }
17:
18: public function getUrl()
19: {
20: return $this->_getUrl('MapLayerSelect', 'ansel', array('sessionWrite' => true));
21: }
22:
23: public function handle($args, $post)
24: {
25: if (!isset($post['name'])) {
26: return 0;
27: }
28: $GLOBALS['prefs']->setValue('current_maplayer', $post['name']);
29: //return $GLOBALS['prefs']->getValue('current_maplayer');
30: return 1;
31: }
32:
33: }
34: