fix translations within subfolder /lib

remotes/origin/stable45
Thomas Mueller 13 years ago
parent 6324daecc0
commit 58b1e841f1
  1. 2
      lib/app.php
  2. 4
      lib/files.php
  3. 10
      lib/json.php
  4. 2
      lib/template.php

@ -279,7 +279,7 @@ class OC_App{
* entries are sorted by the key 'order' ascending. * entries are sorted by the key 'order' ascending.
*/ */
public static function getSettingsNavigation(){ public static function getSettingsNavigation(){
$l=OC_L10N::get('core'); $l=OC_L10N::get('lib');
$settings = array(); $settings = array();
// by default, settings only contain the help menu // by default, settings only contain the help menu

@ -268,7 +268,7 @@ class OC_Files {
*/ */
static function validateZipDownload($dir, $files) { static function validateZipDownload($dir, $files) {
if(!OC_Config::getValue('allowZipDownload', true)) { if(!OC_Config::getValue('allowZipDownload', true)) {
$l = OC_L10N::get('files'); $l = OC_L10N::get('lib');
header("HTTP/1.0 409 Conflict"); header("HTTP/1.0 409 Conflict");
$tmpl = new OC_Template( '', 'error', 'user' ); $tmpl = new OC_Template( '', 'error', 'user' );
$errors = array( $errors = array(
@ -293,7 +293,7 @@ class OC_Files {
$totalsize += OC_Filesystem::filesize($dir.'/'.$files); $totalsize += OC_Filesystem::filesize($dir.'/'.$files);
} }
if($totalsize > $zipLimit) { if($totalsize > $zipLimit) {
$l = OC_L10N::get('files'); $l = OC_L10N::get('lib');
header("HTTP/1.0 409 Conflict"); header("HTTP/1.0 409 Conflict");
$tmpl = new OC_Template( '', 'error', 'user' ); $tmpl = new OC_Template( '', 'error', 'user' );
$errors = array( $errors = array(

@ -24,7 +24,7 @@ class OC_JSON{
*/ */
public static function checkAppEnabled($app){ public static function checkAppEnabled($app){
if( !OC_App::isEnabled($app)){ if( !OC_App::isEnabled($app)){
$l = OC_L10N::get('core'); $l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled') ))); self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled') )));
exit(); exit();
} }
@ -35,7 +35,7 @@ class OC_JSON{
*/ */
public static function checkLoggedIn(){ public static function checkLoggedIn(){
if( !OC_User::isLoggedIn()){ if( !OC_User::isLoggedIn()){
$l = OC_L10N::get('core'); $l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit(); exit();
} }
@ -47,7 +47,7 @@ class OC_JSON{
*/ */
public static function callCheck(){ public static function callCheck(){
if( !OC_Util::isCallRegistered()){ if( !OC_Util::isCallRegistered()){
$l = OC_L10N::get('core'); $l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Token expired. Please reload page.') ))); self::error(array( 'data' => array( 'message' => $l->t('Token expired. Please reload page.') )));
exit(); exit();
} }
@ -59,7 +59,7 @@ class OC_JSON{
public static function checkAdminUser(){ public static function checkAdminUser(){
self::checkLoggedIn(); self::checkLoggedIn();
if( !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ if( !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
$l = OC_L10N::get('core'); $l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit(); exit();
} }
@ -71,7 +71,7 @@ class OC_JSON{
public static function checkSubAdminUser(){ public static function checkSubAdminUser(){
self::checkLoggedIn(); self::checkLoggedIn();
if(!OC_Group::inGroup(OC_User::getUser(),'admin') && !OC_SubAdmin::isSubAdmin(OC_User::getUser())){ if(!OC_Group::inGroup(OC_User::getUser(),'admin') && !OC_SubAdmin::isSubAdmin(OC_User::getUser())){
$l = OC_L10N::get('core'); $l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit(); exit();
} }

@ -76,7 +76,7 @@ function simple_file_size($bytes) {
} }
function relative_modified_date($timestamp) { function relative_modified_date($timestamp) {
$l=OC_L10N::get('template'); $l=OC_L10N::get('lib');
$timediff = time() - $timestamp; $timediff = time() - $timestamp;
$diffminutes = round($timediff/60); $diffminutes = round($timediff/60);
$diffhours = round($diffminutes/60); $diffhours = round($diffminutes/60);

Loading…
Cancel
Save