1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
-
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ApiQvitterSetProfilePrefAction extends ApiAuthAction
- {
- var $prefNamespace = null;
- var $prefTopic = null;
- var $prefData = null;
- protected $needPost = true;
-
- protected function prepare(array $args=array())
- {
- parent::prepare($args);
- $this->prefNamespace = $this->trimmed('namespace');
- $this->prefTopic = $this->trimmed('topic');
- $this->prefData = $this->trimmed('data');
- return true;
- }
-
- protected function handle()
- {
- parent::handle();
-
- $saved = Profile_prefs::setData($this->scoped, $this->prefNamespace, $this->prefTopic, $this->prefData);
- $this->initDocument('json');
- $this->showJsonObjects($saved);
- $this->endDocument('json');
- }
- }
|