Skip to content

Commit

Permalink
Finally remove \OCP\JSON
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Mar 23, 2018
1 parent 3dac15a commit 26073ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 178 deletions.
2 changes: 1 addition & 1 deletion apps/files_external/ajax/applicable.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@

$results = array('groups' => $groups, 'users' => $users);

\\OC_JSON::success($results);
\OC_JSON::success($results);
4 changes: 2 additions & 2 deletions apps/files_versions/ajax/getVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
unset($version['path']);
}

\\OC_JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
\OC_JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));

} else {

\\OC_JSON::success(array('data' => array('versions' => [], 'endReached' => true)));
\OC_JSON::success(array('data' => array('versions' => [], 'endReached' => true)));

}
18 changes: 9 additions & 9 deletions apps/user_ldap/ajax/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
$l = \OC::$server->getL10N('user_ldap');

if(!isset($_POST['action'])) {
\\OC_JSON::error(array('message' => $l->t('No action specified')));
\OC_JSON::error(array('message' => $l->t('No action specified')));
}
$action = (string)$_POST['action'];


if(!isset($_POST['ldap_serverconfig_chooser'])) {
\\OC_JSON::error(array('message' => $l->t('No configuration specified')));
\OC_JSON::error(array('message' => $l->t('No configuration specified')));
}
$prefix = (string)$_POST['ldap_serverconfig_chooser'];

Expand Down Expand Up @@ -98,10 +98,10 @@
exit;
}
} catch (\Exception $e) {
\\OC_JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode()));
\OC_JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode()));
exit;
}
\\OC_JSON::error();
\OC_JSON::error();
exit;
break;

Expand All @@ -114,10 +114,10 @@
exit;
}
} catch (\Exception $e) {
\\OC_JSON::error(array('message' => $e->getMessage()));
\OC_JSON::error(array('message' => $e->getMessage()));
exit;
}
\\OC_JSON::error();
\OC_JSON::error();
exit;
break;
}
Expand All @@ -126,14 +126,14 @@
$key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false;
$val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null;
if($key === false || is_null($val)) {
\\OC_JSON::error(array('message' => $l->t('No data specified')));
\OC_JSON::error(array('message' => $l->t('No data specified')));
exit;
}
$cfg = array($key => $val);
$setParameters = array();
$configuration->setConfiguration($cfg, $setParameters);
if(!in_array($key, $setParameters)) {
\\OC_JSON::error(array('message' => $l->t($key.
\OC_JSON::error(array('message' => $l->t($key.
' Could not set configuration %s', $setParameters[0])));
exit;
}
Expand All @@ -144,6 +144,6 @@
\OC_JSON::success();
break;
default:
\\OC_JSON::error(array('message' => $l->t('Action does not exist')));
\OC_JSON::error(array('message' => $l->t('Action does not exist')));
break;
}
166 changes: 0 additions & 166 deletions lib/public/JSON.php

This file was deleted.

0 comments on commit 26073ea

Please sign in to comment.