diff options
Diffstat (limited to 'settings')
-rw-r--r-- | settings/ajax/changepassword.php | 6 | ||||
-rw-r--r-- | settings/ajax/setlanguage.php | 4 | ||||
-rw-r--r-- | settings/appinfo/app.php | 4 | ||||
-rw-r--r-- | settings/index.php | 22 |
4 files changed, 18 insertions, 18 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index f568d3ef876..c8c1f740889 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -9,7 +9,7 @@ $l=new OC_L10N('settings'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t( "Authentication error" ) ))); exit(); } @@ -21,13 +21,13 @@ if( !isset( $_POST["password"] ) && !isset( $_POST["oldpassword"] )){ } // Check if the old password is correct -if( !OC_USER::checkPassword( $_SESSION["user_id"], $_POST["oldpassword"] )){ +if( !OC_User::checkPassword( $_SESSION["user_id"], $_POST["oldpassword"] )){ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Your old password is wrong!") ))); exit(); } // Change password -if( OC_USER::setPassword( $_SESSION["user_id"], $_POST["password"] )){ +if( OC_User::setPassword( $_SESSION["user_id"], $_POST["password"] )){ echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Password changed") ))); } else{ diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index bc467fb9004..a5ba3d81ba3 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -9,7 +9,7 @@ $l=new OC_L10N('settings'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") ))); exit(); } @@ -17,7 +17,7 @@ if( !OC_USER::isLoggedIn()){ // Get data if( isset( $_POST['lang'] ) ){ $lang=$_POST['lang']; - OC_PREFERENCES::setValue( OC_USER::getUser(), 'core', 'lang', $lang ); + OC_Preferences::setValue( OC_User::getUser(), 'core', 'lang', $lang ); echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Language changed") ))); }else{ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") ))); diff --git a/settings/appinfo/app.php b/settings/appinfo/app.php index f0bf1c71bb4..db4594dcc2d 100644 --- a/settings/appinfo/app.php +++ b/settings/appinfo/app.php @@ -1,6 +1,6 @@ <?php -OC_APP::register( array( "id" => "settings", "name" => "Settings" )); -OC_APP::addSettingsPage( array( "id" => "settings", "order" => -1000, "href" => OC_HELPER::linkTo( "settings", "index.php" ), "name" => "Personal", "icon" => OC_HELPER::imagePath( "settings", "personal.png" ))); +OC_App::register( array( "id" => "settings", "name" => "Settings" )); +OC_App::addSettingsPage( array( "id" => "settings", "order" => -1000, "href" => OC_Helper::linkTo( "settings", "index.php" ), "name" => "Personal", "icon" => OC_Helper::imagePath( "settings", "personal.png" ))); ?> diff --git a/settings/index.php b/settings/index.php index 17c878b1a25..a37ae7e6ea2 100644 --- a/settings/index.php +++ b/settings/index.php @@ -1,32 +1,32 @@ <?php require_once('../lib/base.php'); -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } // Highlight navigation entry -OC_APP::setActiveNavigationEntry( "settings" ); -OC_UTIL::addScript( "settings", "main" ); -OC_UTIL::addStyle( "settings", "settings" ); +OC_App::setActiveNavigationEntry( "settings" ); +OC_Util::addScript( "settings", "main" ); +OC_Util::addStyle( "settings", "settings" ); // calculate the disc space -$used=OC_FILESYSTEM::filesize('/'); -$free=OC_FILESYSTEM::free_space(); +$used=OC_Filesystem::filesize('/'); +$free=OC_Filesystem::free_space(); $total=$free+$used; $relative=round(($used/$total)*100); -$lang=OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang', 'en' ); +$lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', 'en' ); $languages=OC_L10N::findAvailableLanguages(); //put the current language in the front unset($languages[array_search($lang,$languages)]); array_unshift($languages,$lang); // Return template -$tmpl = new OC_TEMPLATE( "settings", "index", "admin"); -$tmpl->assign('usage',OC_HELPER::humanFileSize($used)); -$tmpl->assign('total_space',OC_HELPER::humanFileSize($total)); +$tmpl = new OC_Template( "settings", "index", "admin"); +$tmpl->assign('usage',OC_Helper::humanFileSize($used)); +$tmpl->assign('total_space',OC_Helper::humanFileSize($total)); $tmpl->assign('usage_relative',$relative); $tmpl->assign('languages',$languages); $tmpl->printPage(); |