summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-14 16:44:15 +0200
committerRobin Appelman <icewind@owncloud.com>2012-04-14 16:44:15 +0200
commitb1bcc60d83866627b1b28a0eda336e0f246dbe8e (patch)
treea7100fbd8425e90c8b90888bc16a15349519038a /apps
parent721311c9099780ecc22b6b186ed79dc5c9c92271 (diff)
downloadnextcloud-server-b1bcc60d83866627b1b28a0eda336e0f246dbe8e.tar.gz
nextcloud-server-b1bcc60d83866627b1b28a0eda336e0f246dbe8e.zip
reuse OC_L10N objects
Diffstat (limited to 'apps')
-rw-r--r--apps/admin_dependencies_chk/appinfo/app.php2
-rw-r--r--apps/admin_dependencies_chk/settings.php2
-rw-r--r--apps/bookmarks/bookmarksHelper.php2
-rw-r--r--apps/bookmarks/templates/bookmarklet.php2
-rw-r--r--apps/calendar/ajax/calendar/new.form.php1
-rw-r--r--apps/calendar/ajax/calendar/overview.php2
-rw-r--r--apps/calendar/ajax/event/delete.php2
-rw-r--r--apps/calendar/ajax/event/new.php2
-rwxr-xr-xapps/calendar/ajax/events.php2
-rw-r--r--apps/calendar/ajax/import/dialog.php1
-rwxr-xr-xapps/calendar/ajax/settings/guesstimezone.php2
-rw-r--r--apps/calendar/ajax/settings/settimezone.php2
-rw-r--r--apps/calendar/appinfo/app.php2
-rw-r--r--apps/calendar/lib/app.php2
-rw-r--r--apps/contacts/lib/app.php2
-rw-r--r--apps/gallery/appinfo/app.php2
-rw-r--r--apps/gallery/templates/index.php2
-rw-r--r--apps/gallery/templates/view_album.php2
-rw-r--r--apps/media/appinfo/app.php2
19 files changed, 15 insertions, 21 deletions
diff --git a/apps/admin_dependencies_chk/appinfo/app.php b/apps/admin_dependencies_chk/appinfo/app.php
index e2169b5dd77..f282b103c87 100644
--- a/apps/admin_dependencies_chk/appinfo/app.php
+++ b/apps/admin_dependencies_chk/appinfo/app.php
@@ -1,5 +1,5 @@
<?php
-$l=new OC_L10N('admin_dependencies_chk');
+$l=OC_L10N::get('admin_dependencies_chk');
OC_App::register( array(
'order' => 14,
diff --git a/apps/admin_dependencies_chk/settings.php b/apps/admin_dependencies_chk/settings.php
index ce90dd604ca..ea1ce9fb3dc 100644
--- a/apps/admin_dependencies_chk/settings.php
+++ b/apps/admin_dependencies_chk/settings.php
@@ -20,7 +20,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-$l=new OC_L10N('admin_dependencies_chk');
+$l=OC_L10N::get('admin_dependencies_chk');
$tmpl = new OC_Template( 'admin_dependencies_chk', 'settings');
$modules = array();
diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php
index 7ada69014fb..f1464be79de 100644
--- a/apps/bookmarks/bookmarksHelper.php
+++ b/apps/bookmarks/bookmarksHelper.php
@@ -94,7 +94,7 @@ function addBookmark($url, $title, $tags='') {
}
if(empty($title)) {
- $l = new OC_L10N('bookmarks');
+ $l = OC_L10N::get('bookmarks');
$title = $l->t('unnamed');
}
diff --git a/apps/bookmarks/templates/bookmarklet.php b/apps/bookmarks/templates/bookmarklet.php
index 5ea67f04df2..f7074462a79 100644
--- a/apps/bookmarks/templates/bookmarklet.php
+++ b/apps/bookmarks/templates/bookmarklet.php
@@ -1,7 +1,7 @@
<?php
function createBookmarklet() {
- $l = new OC_L10N('bookmarks');
+ $l = OC_L10N::get('bookmarks');
echo '<small>' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '</small>'
. '<a class="bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
. $l->t('Read later') . '</a>';
diff --git a/apps/calendar/ajax/calendar/new.form.php b/apps/calendar/ajax/calendar/new.form.php
index 6e7423cbe92..fa014351f77 100644
--- a/apps/calendar/ajax/calendar/new.form.php
+++ b/apps/calendar/ajax/calendar/new.form.php
@@ -7,7 +7,6 @@
*/
require_once('../../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
diff --git a/apps/calendar/ajax/calendar/overview.php b/apps/calendar/ajax/calendar/overview.php
index 2f73f5d0710..dd55f3e018f 100644
--- a/apps/calendar/ajax/calendar/overview.php
+++ b/apps/calendar/ajax/calendar/overview.php
@@ -7,7 +7,7 @@
*/
require_once('../../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
+$l10n = OC_L10N::get('calendar');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar");
diff --git a/apps/calendar/ajax/event/delete.php b/apps/calendar/ajax/event/delete.php
index 862dec6bf5b..5fc12900ef3 100644
--- a/apps/calendar/ajax/event/delete.php
+++ b/apps/calendar/ajax/event/delete.php
@@ -7,8 +7,6 @@
*/
require_once('../../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
diff --git a/apps/calendar/ajax/event/new.php b/apps/calendar/ajax/event/new.php
index 59fda79da73..7070bbf05d7 100644
--- a/apps/calendar/ajax/event/new.php
+++ b/apps/calendar/ajax/event/new.php
@@ -8,8 +8,6 @@
require_once('../../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
index c62f93c540e..d053df2e4c1 100755
--- a/apps/calendar/ajax/events.php
+++ b/apps/calendar/ajax/events.php
@@ -8,7 +8,7 @@
require_once ('../../../lib/base.php');
require_once('when/When.php');
-$l = new OC_L10N('calendar');
+$l = OC_L10N::get('calendar');
$unnamed = $l->t('unnamed');
function create_return_event($event, $vevent){
$return_event = array();
diff --git a/apps/calendar/ajax/import/dialog.php b/apps/calendar/ajax/import/dialog.php
index 2e002092150..16ec54d14a2 100644
--- a/apps/calendar/ajax/import/dialog.php
+++ b/apps/calendar/ajax/import/dialog.php
@@ -9,7 +9,6 @@
require_once('../../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
-$l10n = new OC_L10N('calendar');
$tmpl = new OC_Template('calendar', 'part.import');
$tmpl->assign('path', $_POST['path']);
$tmpl->assign('filename', $_POST['filename']);
diff --git a/apps/calendar/ajax/settings/guesstimezone.php b/apps/calendar/ajax/settings/guesstimezone.php
index d45a70e1ce3..c02b8d10b8d 100755
--- a/apps/calendar/ajax/settings/guesstimezone.php
+++ b/apps/calendar/ajax/settings/guesstimezone.php
@@ -10,7 +10,7 @@ require_once('../../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
-$l = new OC_L10N('calendar');
+$l = OC_L10N::get('calendar');
$lat = $_GET['lat'];
$lng = $_GET['long'];
diff --git a/apps/calendar/ajax/settings/settimezone.php b/apps/calendar/ajax/settings/settimezone.php
index c639753fe2f..8dda28335f7 100644
--- a/apps/calendar/ajax/settings/settimezone.php
+++ b/apps/calendar/ajax/settings/settimezone.php
@@ -9,7 +9,7 @@
// Init owncloud
require_once('../../../../lib/base.php');
-$l=new OC_L10N('calendar');
+$l=OC_L10N::get('calendar');
// Check if we are a user
OC_JSON::checkLoggedIn();
diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php
index f297c4d16d4..1fece8077ac 100644
--- a/apps/calendar/appinfo/app.php
+++ b/apps/calendar/appinfo/app.php
@@ -1,5 +1,5 @@
<?php
-$l=new OC_L10N('calendar');
+$l=OC_L10N::get('calendar');
OC::$CLASSPATH['OC_Calendar_App'] = 'apps/calendar/lib/app.php';
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index 22c1133e006..4b481a4f286 100644
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -9,7 +9,7 @@
/**
* This class manages our app actions
*/
-OC_Calendar_App::$l10n = new OC_L10N('calendar');
+OC_Calendar_App::$l10n = OC_L10N::get('calendar');
class OC_Calendar_App{
public static $l10n;
protected static $categories = null;
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 78fdfe6a10a..475d2c8dc2e 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -9,7 +9,7 @@
/**
* This class manages our app actions
*/
-OC_Contacts_App::$l10n = new OC_L10N('contacts');
+OC_Contacts_App::$l10n = OC_L10N::get('contacts');
OC_Contacts_App::$categories = new OC_VCategories('contacts');
class OC_Contacts_App {
public static $l10n;
diff --git a/apps/gallery/appinfo/app.php b/apps/gallery/appinfo/app.php
index 325c2acf249..b8e7c14fcaf 100644
--- a/apps/gallery/appinfo/app.php
+++ b/apps/gallery/appinfo/app.php
@@ -27,7 +27,7 @@ OC::$CLASSPATH['OC_Gallery_Scanner'] = 'apps/gallery/lib/scanner.php';
OC::$CLASSPATH['OC_Gallery_Sharing'] = 'apps/gallery/lib/sharing.php';
OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.php';
-$l = new OC_L10N('gallery');
+$l = OC_L10N::get('gallery');
OC_App::register(array(
'order' => 20,
diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php
index 9bec5db1b91..cf654b68c0b 100644
--- a/apps/gallery/templates/index.php
+++ b/apps/gallery/templates/index.php
@@ -7,7 +7,7 @@ OC_Util::addStyle('files', 'files');
OC_Util::addScript('files_imageviewer', 'jquery.mousewheel-3.0.4.pack');
OC_Util::addScript('files_imageviewer', 'jquery.fancybox-1.3.4.pack');
OC_Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' );
-$l = new OC_L10N('gallery');
+$l = OC_L10N::get('gallery');
?>
<script type="text/javascript">var gallery_scanning_root='<? echo OC_Preferences::getValue(OC_User::getUser(), 'gallery', 'root', '/'); ?>'; var gallery_default_order = '<? echo OC_Preferences::getValue(OC_User::getUser(), 'gallery', 'order', 'ASC'); ?>';</script>
<div id="controls">
diff --git a/apps/gallery/templates/view_album.php b/apps/gallery/templates/view_album.php
index 6b513a672d5..f938e487954 100644
--- a/apps/gallery/templates/view_album.php
+++ b/apps/gallery/templates/view_album.php
@@ -5,7 +5,7 @@ OC_Util::addScript('gallery', 'album_cover');
OC_Util::addScript('files_imageviewer', 'jquery.mousewheel-3.0.4.pack');
OC_Util::addScript('files_imageviewer', 'jquery.fancybox-1.3.4.pack');
OC_Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' );
-$l = new OC_L10N('gallery');
+$l = OC_L10N::get('gallery');
?>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php
index 651067fbbe1..b0891874f7b 100644
--- a/apps/media/appinfo/app.php
+++ b/apps/media/appinfo/app.php
@@ -20,7 +20,7 @@
*
*/
-$l=new OC_L10N('media');
+$l=OC_L10N::get('media');
require_once('apps/media/lib_media.php');