/** * Tag a record. * * @return void * @access public */ public function tagRecord() { $user = UserAccount::isLoggedIn(); if ($user === false) { return $this->output(translate('You must be logged in first'), JSON::STATUS_NEED_AUTH); } include_once 'services/Record/AddTag.php'; if (!AddTag::save($user)) { return $this->output(translate('Failed'), JSON::STATUS_ERROR); } return $this->output(translate('Done'), JSON::STATUS_OK); }
function SaveTag() { $user = UserAccount::isLoggedIn(); if ($user === false) { return "<result>Unauthorized</result>"; } require_once 'AddTag.php'; AddTag::save('eContent'); return '<result>Done</result>'; }