Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-08-31 12:05:59 +0400
committerRobin Appelman <icewind@owncloud.com>2014-08-31 12:08:22 +0400
commitd0266c0bf85e431a3b1b39cbfaced4e8df52a264 (patch)
treedfea49fa907a3b7543f8849077d75cfc29a54279 /apps
parent23137f4798cb89b188329050a85f2f3a706947c5 (diff)
Use public api for getting l10n
Diffstat (limited to 'apps')
-rw-r--r--apps/files/ajax/list.php2
-rw-r--r--apps/files/ajax/move.php2
-rw-r--r--apps/files/ajax/newfile.php2
-rw-r--r--apps/files/ajax/newfolder.php2
-rw-r--r--apps/files/ajax/rename.php2
-rw-r--r--apps/files/ajax/upload.php2
-rw-r--r--apps/files/appinfo/app.php2
-rw-r--r--apps/files_encryption/ajax/adminrecovery.php2
-rw-r--r--apps/files_encryption/ajax/changeRecoveryPassword.php2
-rw-r--r--apps/files_encryption/ajax/updatePrivateKeyPassword.php2
-rw-r--r--apps/files_encryption/files/error.php2
-rw-r--r--apps/files_external/ajax/dropbox.php2
-rw-r--r--apps/files_external/ajax/google.php2
-rw-r--r--apps/files_external/appinfo/app.php2
-rw-r--r--apps/files_sharing/ajax/external.php2
-rw-r--r--apps/files_sharing/appinfo/app.php2
-rw-r--r--apps/files_trashbin/ajax/delete.php2
-rw-r--r--apps/files_trashbin/ajax/undelete.php2
-rw-r--r--apps/files_trashbin/appinfo/app.php2
-rw-r--r--apps/files_trashbin/lib/trashbin.php2
-rw-r--r--apps/files_versions/ajax/rollbackVersion.php2
-rw-r--r--apps/user_ldap/ajax/clearMappings.php2
-rw-r--r--apps/user_ldap/ajax/deleteConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/testConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/wizard.php2
-rw-r--r--apps/user_ldap/lib/wizard.php2
-rw-r--r--apps/user_ldap/settings.php2
27 files changed, 27 insertions, 27 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index 2f2f7054566..16e48a2c2af 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -2,7 +2,7 @@
OCP\JSON::checkLoggedIn();
\OC::$server->getSession()->close();
-$l = OC_L10N::get('files');
+$l = \OC::$server->getL10N('files');
// Load the files
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php
index e9a34a1b2f9..3a07554ad00 100644
--- a/apps/files/ajax/move.php
+++ b/apps/files/ajax/move.php
@@ -9,7 +9,7 @@ $dir = stripslashes($_POST["dir"]);
$file = stripslashes($_POST["file"]);
$target = stripslashes(rawurldecode($_POST["target"]));
-$l = OC_L10N::get('files');
+$l = \OC::$server->getL10N('files');
if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) {
OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) )));
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 8173816af3a..606576760ec 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -46,7 +46,7 @@ function progress($notification_code, $severity, $message, $message_code, $bytes
}
}
-$l10n = \OC_L10n::get('files');
+$l10n = \OC::$server->getL10N('files');
$result = array(
'success' => false,
diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php
index 4ea2ee71de2..ea7a10c2ab9 100644
--- a/apps/files/ajax/newfolder.php
+++ b/apps/files/ajax/newfolder.php
@@ -11,7 +11,7 @@ OCP\JSON::callCheck();
$dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : '';
$foldername = isset( $_POST['foldername'] ) ? stripslashes($_POST['foldername']) : '';
-$l10n = \OC_L10n::get('files');
+$l10n = \OC::$server->getL10N('files');
$result = array(
'success' => false,
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php
index e5fdf8af98c..00c8a1e44db 100644
--- a/apps/files/ajax/rename.php
+++ b/apps/files/ajax/rename.php
@@ -27,7 +27,7 @@ OCP\JSON::callCheck();
$files = new \OCA\Files\App(
\OC\Files\Filesystem::getView(),
- \OC_L10n::get('files')
+ \OC::$server->getL10N('files')
);
$result = $files->rename(
$_GET["dir"],
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 4eca13f1933..b960e02ced7 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -10,7 +10,7 @@ OCP\JSON::setContentTypeHeader('text/plain');
$allowedPermissions = OCP\PERMISSION_ALL;
$errorCode = null;
-$l = OC_L10N::get('files');
+$l = \OC::$server->getL10N('files');
if (empty($_POST['dirToken'])) {
// The standard case, files are uploaded through logged in users :)
OCP\JSON::checkLoggedIn();
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 9af36c682fd..3567bc26def 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
-$l = OC_L10N::get('files');
+$l = \OC::$server->getL10N('files');
OCP\App::registerAdmin('files', 'admin');
diff --git a/apps/files_encryption/ajax/adminrecovery.php b/apps/files_encryption/ajax/adminrecovery.php
index 303ba0e16e1..070ca6f667e 100644
--- a/apps/files_encryption/ajax/adminrecovery.php
+++ b/apps/files_encryption/ajax/adminrecovery.php
@@ -13,7 +13,7 @@ use OCA\Encryption;
\OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck();
-$l = OC_L10N::get('files_encryption');
+$l = \OC::$server->getL10N('files_encryption');
$return = false;
// Enable recoveryAdmin
diff --git a/apps/files_encryption/ajax/changeRecoveryPassword.php b/apps/files_encryption/ajax/changeRecoveryPassword.php
index 99cc7b3cdde..71fbe333fe0 100644
--- a/apps/files_encryption/ajax/changeRecoveryPassword.php
+++ b/apps/files_encryption/ajax/changeRecoveryPassword.php
@@ -15,7 +15,7 @@ use OCA\Encryption;
\OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck();
-$l = OC_L10N::get('core');
+$l = \OC::$server->getL10N('core');
$return = false;
diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php
index a14c9fe5076..f88e9c64dfd 100644
--- a/apps/files_encryption/ajax/updatePrivateKeyPassword.php
+++ b/apps/files_encryption/ajax/updatePrivateKeyPassword.php
@@ -15,7 +15,7 @@ use OCA\Encryption;
\OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck();
-$l = OC_L10N::get('core');
+$l = \OC::$server->getL10N('core');
$return = false;
diff --git a/apps/files_encryption/files/error.php b/apps/files_encryption/files/error.php
index b436587dfaf..c33a5a531f5 100644
--- a/apps/files_encryption/files/error.php
+++ b/apps/files_encryption/files/error.php
@@ -4,7 +4,7 @@ if (!isset($_)) { //also provide standalone error page
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
- $l = OC_L10N::get('files_encryption');
+ $l = \OC::$server->getL10N('files_encryption');
if (isset($_GET['errorCode'])) {
$errorCode = $_GET['errorCode'];
diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php
index bbedf8e9cac..db417de4b2d 100644
--- a/apps/files_external/ajax/dropbox.php
+++ b/apps/files_external/ajax/dropbox.php
@@ -5,7 +5,7 @@ require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
-$l = OC_L10N::get('files_external');
+$l = \OC::$server->getL10N('files_external');
if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
$oauth = new Dropbox_OAuth_Curl($_POST['app_key'], $_POST['app_secret']);
diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index 13e74071846..40c10aa5d07 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -6,7 +6,7 @@ require_once 'Google_Client.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
-$l = OC_L10N::get('files_external');
+$l = \OC::$server->getL10N('files_external');
if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST['redirect'])) {
$client = new Google_Client();
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php
index 04c48187e37..50a73bd5f9a 100644
--- a/apps/files_external/appinfo/app.php
+++ b/apps/files_external/appinfo/app.php
@@ -6,7 +6,7 @@
* later.
* See the COPYING-README file.
*/
-$l = \OC_L10N::get('files_external');
+$l = \OC::$server->getL10N('files_external');
OC::$CLASSPATH['OC\Files\Storage\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
OC::$CLASSPATH['OC\Files\Storage\FTP'] = 'files_external/lib/ftp.php';
diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php
index 37d0607cd3f..544a97e80be 100644
--- a/apps/files_sharing/ajax/external.php
+++ b/apps/files_sharing/ajax/external.php
@@ -10,7 +10,7 @@ OCP\JSON::callCheck();
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('files_sharing');
-$l = OC_L10N::get('files_sharing');
+$l = \OC::$server->getL10N('files_sharing');
// check if server admin allows to mount public links from other servers
if (OCA\Files_Sharing\Helper::isIncomingServer2serverShareEnabled() === false) {
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index b22c553ec93..543cae7b0c1 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -1,5 +1,5 @@
<?php
-$l = OC_L10N::get('files_sharing');
+$l = \OC::$server->getL10N('files_sharing');
OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php';
OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 9d9c1dd100f..a2302802649 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -55,7 +55,7 @@ if ( $error ) {
foreach ( $error as $e ) {
$filelist .= $e.', ';
}
- $l = OC_L10N::get('files_trashbin');
+ $l = \OC::$server->getL10N('files_trashbin');
$message = $l->t("Couldn't delete %s permanently", array(rtrim($filelist, ', ')));
OCP\JSON::error(array("data" => array("message" => $message,
"success" => $success, "error" => $error)));
diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php
index afab79fcac6..02d651925ca 100644
--- a/apps/files_trashbin/ajax/undelete.php
+++ b/apps/files_trashbin/ajax/undelete.php
@@ -60,7 +60,7 @@ if ( $error ) {
foreach ( $error as $e ) {
$filelist .= $e.', ';
}
- $l = OC_L10N::get('files_trashbin');
+ $l = OC::$server->getL10N('files_trashbin');
$message = $l->t("Couldn't restore %s", array(rtrim($filelist, ', ')));
OCP\JSON::error(array("data" => array("message" => $message,
"success" => $success, "error" => $error)));
diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php
index 718c2f45a34..fe428121a25 100644
--- a/apps/files_trashbin/appinfo/app.php
+++ b/apps/files_trashbin/appinfo/app.php
@@ -1,5 +1,5 @@
<?php
-$l = OC_L10N::get('files_trashbin');
+$l = \OC::$server->getL10N('files_trashbin');
OC::$CLASSPATH['OCA\Files_Trashbin\Exceptions\CopyRecursiveException'] = 'files_trashbin/lib/exceptions.php';
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index ee3969323cf..69eef09d1e9 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -891,7 +891,7 @@ class Trashbin {
private static function getUniqueFilename($location, $filename, $view) {
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$name = pathinfo($filename, PATHINFO_FILENAME);
- $l = \OC_L10N::get('files_trashbin');
+ $l = \OC::$server->getL10N('files_trashbin');
// if extension is not empty we set a dot in front of it
if ($ext !== '') {
diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php
index 900d8cd6e28..e6133507738 100644
--- a/apps/files_versions/ajax/rollbackVersion.php
+++ b/apps/files_versions/ajax/rollbackVersion.php
@@ -9,6 +9,6 @@ $revision=(int)$_GET['revision'];
if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
}else{
- $l = OC_L10N::get('files_versions');
+ $l = \OC::$server->getL10N('files_versions');
OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) ))));
}
diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php
index 9118d58c5cf..4e713c59f96 100644
--- a/apps/user_ldap/ajax/clearMappings.php
+++ b/apps/user_ldap/ajax/clearMappings.php
@@ -30,6 +30,6 @@ $subject = $_POST['ldap_clear_mapping'];
if(\OCA\user_ldap\lib\Helper::clearMapping($subject)) {
OCP\JSON::success();
} else {
- $l=OC_L10N::get('user_ldap');
+ $l = \OC::$server->getL10N('user_ldap');
OCP\JSON::error(array('message' => $l->t('Failed to clear the mappings.')));
}
diff --git a/apps/user_ldap/ajax/deleteConfiguration.php b/apps/user_ldap/ajax/deleteConfiguration.php
index ade57110d34..bca687c81ab 100644
--- a/apps/user_ldap/ajax/deleteConfiguration.php
+++ b/apps/user_ldap/ajax/deleteConfiguration.php
@@ -30,6 +30,6 @@ $prefix = $_POST['ldap_serverconfig_chooser'];
if(\OCA\user_ldap\lib\Helper::deleteServerConfiguration($prefix)) {
OCP\JSON::success();
} else {
- $l=OC_L10N::get('user_ldap');
+ $l = \OC::$server->getL10N('user_ldap');
OCP\JSON::error(array('message' => $l->t('Failed to delete the server configuration')));
}
diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php
index a6375209611..c6372eb2ced 100644
--- a/apps/user_ldap/ajax/testConfiguration.php
+++ b/apps/user_ldap/ajax/testConfiguration.php
@@ -26,7 +26,7 @@ OCP\JSON::checkAdminUser();
OCP\JSON::checkAppEnabled('user_ldap');
OCP\JSON::callCheck();
-$l=OC_L10N::get('user_ldap');
+$l = \OC::$server->getL10N('user_ldap');
$ldapWrapper = new OCA\user_ldap\lib\LDAP();
$connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, '', null);
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php
index adbcf6ff414..ef1241b9147 100644
--- a/apps/user_ldap/ajax/wizard.php
+++ b/apps/user_ldap/ajax/wizard.php
@@ -26,7 +26,7 @@ OCP\JSON::checkAdminUser();
OCP\JSON::checkAppEnabled('user_ldap');
OCP\JSON::callCheck();
-$l=OC_L10N::get('user_ldap');
+$l = \OC::$server->getL10N('user_ldap');
if(!isset($_POST['action'])) {
\OCP\JSON::error(array('message' => $l->t('No action specified')));
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 4118b45bc35..dceb2206dbe 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -53,7 +53,7 @@ class Wizard extends LDAPUtility {
parent::__construct($ldap);
$this->configuration = $configuration;
if(is_null(Wizard::$l)) {
- Wizard::$l = \OC_L10N::get('user_ldap');
+ Wizard::$l = \OC::$server->getL10N('user_ldap');
}
$this->access = $access;
$this->result = new WizardResult;
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index fcde5df3716..e7cdd0d926a 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -46,7 +46,7 @@ $wControls = $wControls->fetchPage();
$sControls = new OCP\Template('user_ldap', 'part.settingcontrols');
$sControls = $sControls->fetchPage();
-$l = \OC_L10N::get('user_ldap');
+$l = \OC::$server->getL10N('user_ldap');
$wizTabs = array();
$wizTabs[] = array('tpl' => 'part.wizard-server', 'cap' => $l->t('Server'));