Skip to content

Commit

Permalink
Remove Notes default from API
Browse files Browse the repository at this point in the history
  • Loading branch information
Fmstrat committed Mar 10, 2016
1 parent b0b00a7 commit 8d819fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions controller/ownnoteajaxcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($appName, IRequest $request){
* @NoAdminRequired
*/
public function ajaxindex() {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
return $this->backend->getListing($FOLDER, false);
}

Expand All @@ -55,7 +55,7 @@ public function ajaxannouncement() {
* @NoAdminRequired
*/
public function ajaxcreate($name, $group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group))
return $this->backend->createNote($FOLDER, $name, $group);
}
Expand All @@ -64,7 +64,7 @@ public function ajaxcreate($name, $group) {
* @NoAdminRequired
*/
public function ajaxdel($name, $group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group))
return $this->backend->deleteNote($FOLDER, $name, $group);
}
Expand All @@ -81,7 +81,7 @@ public function ajaxedit($name, $group) {
* @NoAdminRequired
*/
public function ajaxsave($name, $group, $content) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group) && isset($content))
return $this->backend->saveNote($FOLDER, $name, $group, $content, 0);
}
Expand All @@ -90,7 +90,7 @@ public function ajaxsave($name, $group, $content) {
* @NoAdminRequired
*/
public function ajaxren($name, $group, $newname, $newgroup) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($newname) && isset($group) && isset($newgroup))
return $this->backend->renameNote($FOLDER, $name, $group, $newname, $newgroup);
}
Expand All @@ -99,7 +99,7 @@ public function ajaxren($name, $group, $newname, $newgroup) {
* @NoAdminRequired
*/
public function ajaxdelgroup($group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($group))
return $this->backend->deleteGroup($FOLDER, $group);
}
Expand All @@ -108,7 +108,7 @@ public function ajaxdelgroup($group) {
* @NoAdminRequired
*/
public function ajaxrengroup($group, $newgroup) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($group) && isset($newgroup))
return $this->backend->renameGroup($FOLDER, $group, $newgroup);
}
Expand Down
18 changes: 9 additions & 9 deletions controller/ownnoteapicontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct($appName, IRequest $request){
* @NoCSRFRequired
*/
public function index() {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
return $this->backend->getListing($FOLDER, false);
}

Expand All @@ -52,7 +52,7 @@ public function index() {
* @NoCSRFRequired
*/
public function mobileindex() {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
return $this->backend->getListing($FOLDER, true);
}

Expand All @@ -62,7 +62,7 @@ public function mobileindex() {
* @NoCSRFRequired
*/
public function remoteindex() {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
return json_encode($this->backend->getListing($FOLDER, true));
}

Expand All @@ -72,7 +72,7 @@ public function remoteindex() {
* @NoCSRFRequired
*/
public function create($name, $group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group))
return $this->backend->createNote($FOLDER, $name, $group);
}
Expand All @@ -83,7 +83,7 @@ public function create($name, $group) {
* @NoCSRFRequired
*/
public function del($name, $group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group))
return $this->backend->deleteNote($FOLDER, $name, $group);
}
Expand All @@ -104,7 +104,7 @@ public function edit($name, $group) {
* @NoCSRFRequired
*/
public function save($name, $group, $content) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($group) && isset($content))
return $this->backend->saveNote($FOLDER, $name, $group, $content, 0);
}
Expand All @@ -115,7 +115,7 @@ public function save($name, $group, $content) {
* @NoCSRFRequired
*/
public function ren($name, $group, $newname, $newgroup) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($name) && isset($newname) && isset($group) && isset($newgroup))
return $this->backend->renameNote($FOLDER, $name, $group, $newname, $newgroup);
}
Expand All @@ -126,7 +126,7 @@ public function ren($name, $group, $newname, $newgroup) {
* @NoCSRFRequired
*/
public function delgroup($group) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($group))
return $this->backend->deleteGroup($FOLDER, $group);
}
Expand All @@ -137,7 +137,7 @@ public function delgroup($group) {
* @NoCSRFRequired
*/
public function rengroup($group, $newgroup) {
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', 'Notes');
$FOLDER = \OCP\Config::getAppValue('ownnote', 'folder', '');
if (isset($group) && isset($newgroup))
return $this->backend->renameGroup($FOLDER, $group, $newgroup);
}
Expand Down

0 comments on commit 8d819fe

Please sign in to comment.