diff options
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/apps/ocs.php | 8 | ||||
-rw-r--r-- | settings/ajax/changedisplayname.php | 7 | ||||
-rw-r--r-- | settings/ajax/updateapp.php | 17 |
3 files changed, 28 insertions, 4 deletions
diff --git a/settings/ajax/apps/ocs.php b/settings/ajax/apps/ocs.php index 1ffba26ad1d..d0205a1ba34 100644 --- a/settings/ajax/apps/ocs.php +++ b/settings/ajax/apps/ocs.php @@ -44,6 +44,11 @@ if(is_array($catagoryNames)) { } else { $pre=$app['preview']; } + if($app['label']=='recommended') { + $label='3rd Party App'; + } else { + $label='Recommended'; + } $apps[]=array( 'name'=>$app['name'], 'id'=>$app['id'], @@ -53,7 +58,8 @@ if(is_array($catagoryNames)) { 'license'=>$app['license'], 'preview'=>$pre, 'internal'=>false, - 'internallabel'=>'3rd Party App', + 'internallabel'=>$label, + 'update'=>false, ); } } diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php index f80ecb7a0c9..8f2ff865bd5 100644 --- a/settings/ajax/changedisplayname.php +++ b/settings/ajax/changedisplayname.php @@ -1,5 +1,6 @@ <?php
// Check if we are a user
+
OCP\JSON::callCheck();
OC_JSON::checkLoggedIn();
@@ -15,14 +16,14 @@ if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { }
if(is_null($userstatus)) {
- OC_JSON::error( array( "data" => array( "message" => "Authentication error" )));
+ OC_JSON::error( array( "data" => array( "message" => $l->t("Authentication error") )));
exit();
}
// Return Success story
if( OC_User::setDisplayName( $username, $displayName )) {
- OC_JSON::success(array("data" => array( "username" => $username )));
+ OC_JSON::success(array("data" => array( "username" => $username, 'displayName' => $displayName )));
}
else{
- OC_JSON::error(array("data" => array( "message" => "Unable to change display name" )));
+ OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change display name"), displayName => OC_User::getDisplayName($username) )));
}
\ No newline at end of file diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php new file mode 100644 index 00000000000..77c0bbc3e36 --- /dev/null +++ b/settings/ajax/updateapp.php @@ -0,0 +1,17 @@ +<?php + +OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); + +$appid = $_POST['appid']; + +$result = OC_Installer::updateApp($appid); +if($result !== false) { + OC_JSON::success(array('data' => array('appid' => $appid))); +} else { + $l = OC_L10N::get('settings'); + OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't update app.") ))); +} + + + |