summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/ajax/update.php6
-rw-r--r--core/css/header.css3
-rw-r--r--core/css/styles.css29
-rw-r--r--core/js/js.js1
-rw-r--r--core/js/share.js7
-rw-r--r--core/js/tests/specs/shareSpec.js6
-rw-r--r--core/l10n/az.php3
-rw-r--r--core/l10n/de_DE.php8
-rw-r--r--core/l10n/et_EE.php4
-rw-r--r--core/routes.php5
-rw-r--r--core/share/controller.php23
-rw-r--r--core/templates/layout.base.php1
-rw-r--r--core/templates/layout.guest.php1
-rw-r--r--core/templates/layout.user.php2
14 files changed, 71 insertions, 28 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 627ada080c8..419992c9891 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -3,8 +3,12 @@ set_time_limit(0);
require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
+ // if a user is currently logged in, their session must be ignored to
+ // avoid side effects
+ \OC_User::setIncognitoMode(true);
+
$l = new \OC_L10N('core');
- $eventSource = new OC_EventSource();
+ $eventSource = \OC::$server->createEventSource();
$updater = new \OC\Updater(\OC_Log::$object);
$updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
diff --git a/core/css/header.css b/core/css/header.css
index 36fe57bdc85..90ed6f1387e 100644
--- a/core/css/header.css
+++ b/core/css/header.css
@@ -42,8 +42,7 @@
}
#header .logo {
- background-image: url(../img/logo.svg);
- background-repeat: no-repeat;
+ background: url(../img/logo.svg) no-repeat center;
width: 252px;
height: 120px;
margin: 0 auto;
diff --git a/core/css/styles.css b/core/css/styles.css
index 2f8f9612f78..64b37c89b0b 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -39,31 +39,31 @@ body {
#nojavascript {
- position: absolute;
+ position: fixed;
top: 0;
bottom: 0;
- z-index: 999;
+ z-index: 9000;
width: 100%;
text-align: center;
- background-color: rgba(50,0,0,0.5);
- color: white;
- text-shadow: 0px 0px 5px black;
+ background-color: rgba(0,0,0,0.5);
+ color: #fff;
line-height: 125%;
- font-size: x-large;
+ font-size: 24px;
}
#nojavascript div {
+ display: block;
+ position: relative;
width: 50%;
- top: 40%;
- position: absolute;
- left: 50%;
- margin-left: -25%;
+ top: 35%;
+ margin: 0px auto;
}
#nojavascript a {
- color: #ccc;
- text-decoration: underline;
+ color: #fff;
+ border-bottom: 2px dotted #fff;
}
-#nojavascript a:hover {
- color: #aaa;
+#nojavascript a:hover,
+#nojavascript a:focus {
+ color: #ddd;
}
@@ -678,7 +678,6 @@ label.infield {
#body-login .wrapper {
min-height: 100%;
margin: 0 auto -70px;
- width: 300px;
}
#body-login footer, #body-login .push {
height: 70px;
diff --git a/core/js/js.js b/core/js/js.js
index 9a60b0aad69..bf33e3f2e48 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -246,6 +246,7 @@ var OC={
url = '/' + url;
}
+ // TODO save somewhere whether the webserver is able to skip the index.php to have shorter links (e.g. for sharing)
return OC.webroot + '/index.php' + _build(url, params);
},
diff --git a/core/js/share.js b/core/js/share.js
index f1652370d35..67ddd9c4870 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -672,8 +672,11 @@ OC.Share={
}
// TODO: use oc webroot ?
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
-
+ if (service !== 'files') {
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
+ } else {
+ var link = parent.location.protocol+'//'+location.host+OC.generateUrl('/s/')+token;
+ }
}
$('#linkText').val(link);
$('#linkText').show('blind');
diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js
index 06c4b98df2a..e712ea58bc2 100644
--- a/core/js/tests/specs/shareSpec.js
+++ b/core/js/tests/specs/shareSpec.js
@@ -151,7 +151,7 @@ describe('OC.Share tests', function() {
expect($('#dropdown #linkCheckbox').prop('checked')).toEqual(true);
// this is how the OC.Share class does it...
var link = parent.location.protocol + '//' + location.host +
- OC.linkTo('', 'public.php')+'?service=files&t=tehtoken';
+ OC.generateUrl('/s/') + 'tehtoken';
expect($('#dropdown #linkText').val()).toEqual(link);
});
it('does not show populated link share when a link share exists for a different file', function() {
@@ -243,7 +243,7 @@ describe('OC.Share tests', function() {
expect($('#dropdown #linkCheckbox').prop('checked')).toEqual(true);
// this is how the OC.Share class does it...
var link = parent.location.protocol + '//' + location.host +
- OC.linkTo('', 'public.php')+'?service=files&t=tehtoken';
+ OC.generateUrl('/s/') + 'tehtoken';
expect($('#dropdown #linkText').val()).toEqual(link);
// nested one
@@ -258,7 +258,7 @@ describe('OC.Share tests', function() {
expect($('#dropdown #linkCheckbox').prop('checked')).toEqual(true);
// this is how the OC.Share class does it...
link = parent.location.protocol + '//' + location.host +
- OC.linkTo('', 'public.php')+'?service=files&t=anothertoken';
+ OC.generateUrl('/s/') + 'anothertoken';
expect($('#dropdown #linkText').val()).toEqual(link);
});
describe('expiration date', function() {
diff --git a/core/l10n/az.php b/core/l10n/az.php
index a214bb0334b..a2b65e38217 100644
--- a/core/l10n/az.php
+++ b/core/l10n/az.php
@@ -13,6 +13,8 @@ $TRANSLATIONS = array(
"Settings" => "Quraşdırmalar",
"Folder" => "Qovluq",
"Saving..." => "Saxlama...",
+"No" => "Xeyir",
+"Yes" => "Bəli",
"Ok" => "Oldu",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"Cancel" => "Dayandır",
@@ -23,6 +25,7 @@ $TRANSLATIONS = array(
"Strong password" => "Çətin şifrə",
"Share" => "Yayımla",
"Error" => "Səhv",
+"Share link" => "Linki yayımla",
"Send" => "Göndər",
"group" => "qrup",
"can share" => "yayımlaya bilərsiniz",
diff --git a/core/l10n/de_DE.php b/core/l10n/de_DE.php
index e7532730969..1e81dbf80c8 100644
--- a/core/l10n/de_DE.php
+++ b/core/l10n/de_DE.php
@@ -6,7 +6,7 @@ $TRANSLATIONS = array(
"Updated database" => "Datenbank aktualisiert",
"Checked database schema update" => "Datenbank-Schemenaktualisierung geprüft",
"Checked database schema update for apps" => "Datenbank-Schemenaktualisierung für Apps geprüft",
-"Updated \"%s\" to %s" => "\"%s\" zu %s aktualisiert",
+"Updated \"%s\" to %s" => "»%s« zu %s aktualisiert",
"Disabled incompatible apps: %s" => "Deaktivierte inkompatible Apps: %s",
"No image or file provided" => "Weder Bild noch ein Datei wurden zur Verfügung gestellt",
"Unknown filetype" => "Unbekannter Dateityp",
@@ -37,7 +37,7 @@ $TRANSLATIONS = array(
"Folder" => "Ordner",
"Image" => "Bild",
"Audio" => "Audio",
-"Saving..." => "Speichern...",
+"Saving..." => "Speichervorgang …",
"Couldn't send reset email. Please contact your administrator." => "Die E-Mail zum Zurücksetzen konnte nicht versendet werden. Bitte kontaktieren Sie Ihren Administrator.",
"The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." => "Der Link zum Rücksetzen Ihres Passworts ist an Ihre E-Mail-Adresse geschickt worden. Wenn Sie ihn nicht innerhalb einer vernünftigen Zeit empfängen, prüfen Sie Ihre Spam-Verzeichnisse.<br>Wenn er nicht dort ist, fragen Sie Ihren lokalen Administrator.",
"Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" => "Ihre Dateien sind verschlüsselt. Wenn Sie den Wiederherstellungsschlüssel nicht aktiviert haben, wird es keine Möglichkeit geben, um Ihre Daten wiederzubekommen, nachdem Ihr Passwort zurückgesetzt wurde.<br />Wenn Sie sich nicht sicher sind, was Sie tun sollen, wenden Sie sich bitte an Ihren Administrator, bevor Sie fortfahren.<br />Wollen Sie wirklich fortfahren?",
@@ -166,7 +166,7 @@ $TRANSLATIONS = array(
"This application requires JavaScript to be enabled for correct operation. Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable JavaScript</a> and re-load this interface." => "Diese Anwendung benötigt ein aktiviertes JavaScript zum korrekten Betrieb. Bitte <a href=\"http://enable-javascript.com/\" target=\"_blank\">aktivieren Sie JavaScript</a> und laden Sie diese Schnittstelle neu.",
"%s is available. Get more information on how to update." => "%s ist verfügbar. Holen Sie weitere Informationen zu Aktualisierungen ein.",
"Log out" => "Abmelden",
-"Server side authentication failed!" => "Die Authentifizierung auf dem Server ist fehlgeschlagen!",
+"Server side authentication failed!" => "Die Legitimierung auf dem Server ist fehlgeschlagen!",
"Please contact your administrator." => "Bitte kontaktieren Sie Ihren Administrator.",
"Forgot your password? Reset it!" => "Passwort vergessen? Setzen Sie es zurück!",
"remember" => "merken",
@@ -180,7 +180,7 @@ $TRANSLATIONS = array(
"You are accessing the server from an untrusted domain." => "Sie greifen von einer nicht vertrauenswürdigen Domain auf den Server zu.",
"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Bitte kontaktieren Sie Ihren Administrator. Wenn Sie aktuell Administrator dieser Instanz sind, konfigurieren Sie bitte die \"trusted_domain\" - Einstellung in config/config.php. Eine Beispielkonfiguration wird unter config/config.sample.php bereit gestellt.",
"Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." => "Abhängig von Ihrer Konfiguration können Sie auch als Administrator, zum Vertrauen dieser Domain, den unteren Button verwenden.",
-"Add \"%s\" as trusted domain" => "\"%s\" als vertrauenswürdige Domain hinzufügen",
+"Add \"%s\" as trusted domain" => "»%s« als vertrauenswürdige Domain hinzufügen",
"%s will be updated to version %s." => "%s wird auf Version %s aktualisiert.",
"The following apps will be disabled:" => "Die folgenden Apps werden deaktiviert:",
"The theme %s has been disabled." => "Das Theme %s wurde deaktiviert.",
diff --git a/core/l10n/et_EE.php b/core/l10n/et_EE.php
index 74277e96641..91c0a7fb009 100644
--- a/core/l10n/et_EE.php
+++ b/core/l10n/et_EE.php
@@ -5,6 +5,8 @@ $TRANSLATIONS = array(
"Turned off maintenance mode" => "Haldusrežiimis välja lülitatud",
"Updated database" => "Uuendatud andmebaas",
"Checked database schema update" => "Andmebaasi skeemi uuendus kontrollitud",
+"Checked database schema update for apps" => "Andmebaasi skeemi uuendus rakendustele on kontrollitud",
+"Updated \"%s\" to %s" => "Uuendatud \"%s\" -> %s",
"Disabled incompatible apps: %s" => "Keelatud mitteühilduvad rakendid: %s",
"No image or file provided" => "Ühtegi pilti või faili pole pakutud",
"Unknown filetype" => "Tundmatu failitüüp",
@@ -177,12 +179,14 @@ $TRANSLATIONS = array(
"Thank you for your patience." => "Täname kannatlikkuse eest.",
"You are accessing the server from an untrusted domain." => "Sa kasutad serverit usalduseta asukohast",
"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Palun võta ühendust oma saidi administraatoriga. Kui sa oled ise administraator, siis seadista failis config/config.php sätet \"trusted_domain\". Näidis seadistused leiad failist config/config.sample.php.",
+"Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain." => "Sõltuvalt sinu seadetest võib ka administraator kasutada allolevat nuppu, et seda domeeni usaldusväärseks märkida.",
"Add \"%s\" as trusted domain" => "Lisa \"%s\" usaldusväärse domeenina",
"%s will be updated to version %s." => "%s uuendatakse versioonile %s.",
"The following apps will be disabled:" => "Järgnevad rakendid keelatakse:",
"The theme %s has been disabled." => "Teema %s on keelatud.",
"Please make sure that the database, the config folder and the data folder have been backed up before proceeding." => "Enne jätkamist veendu, et andmebaas, seadete ning andmete kataloog on varundatud.",
"Start update" => "Käivita uuendus",
+"To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" => "Suurtel saitidel aegumise vältimiseks võid sa paigalduskaustas käivitada järgmise käsu:",
"This ownCloud instance is currently being updated, which may take a while." => "Seda ownCloud instantsi hetkel uuendatakse, võib võtta veidi aega.",
"Please reload this page after a short time to continue using ownCloud." => "Palun laadi see leht uuesti veidi aja pärast jätkamaks ownCloud kasutamist."
);
diff --git a/core/routes.php b/core/routes.php
index 28a3680dd91..fac67f23175 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -100,6 +100,11 @@ $this->create('core_avatar_post_cropped', '/avatar/cropped')
->post()
->action('OC\Core\Avatar\Controller', 'postCroppedAvatar');
+// Sharing routes
+$this->create('core_share_show_share', '/s/{token}')
+ ->get()
+ ->action('OC\Core\Share\Controller', 'showShare');
+
// used for heartbeat
$this->create('heartbeat', '/heartbeat')->action(function(){
// do nothing
diff --git a/core/share/controller.php b/core/share/controller.php
new file mode 100644
index 00000000000..c1741af0d98
--- /dev/null
+++ b/core/share/controller.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Copyright (c) 2014 Christopher Schäpers <christopher@schaepers.it>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Core\Share;
+
+class Controller {
+ public static function showShare($args) {
+ \OC_Util::checkAppEnabled('files_sharing');
+
+ $token = $args['token'];
+
+ \OC_App::loadApp('files_sharing');
+ \OC_User::setIncognitoMode(true);
+
+ require_once \OC_App::getAppPath('files_sharing') .'/public.php';
+ }
+}
+?>
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 127e99be84d..009cfe21c3f 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -31,6 +31,7 @@
<?php endforeach; ?>
</head>
<body id="body-public">
+ <noscript><div id="nojavascript"><div><?php print_unescaped($l->t('This application requires JavaScript for correct operation. Please <a href="http://enable-javascript.com/" target="_blank">enable JavaScript</a> and reload the page.')); ?></div></div></noscript>
<?php print_unescaped($_['content']); ?>
</body>
</html>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 24706b77b19..fb34769ff7c 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -33,6 +33,7 @@
<?php endforeach; ?>
</head>
<body id="body-login">
+ <noscript><div id="nojavascript"><div><?php print_unescaped($l->t('This application requires JavaScript for correct operation. Please <a href="http://enable-javascript.com/" target="_blank">enable JavaScript</a> and reload the page.')); ?></div></div></noscript>
<div class="wrapper"><!-- for sticky footer -->
<div class="v-align"><!-- vertically centred box -->
<header><div id="header">
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 51470fb07fa..7bc2511f03e 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -40,7 +40,7 @@
<?php endforeach; ?>
</head>
<body id="<?php p($_['bodyid']);?>">
- <noscript><div id="nojavascript"><div><?php print_unescaped($l->t('This application requires JavaScript to be enabled for correct operation. Please <a href="http://enable-javascript.com/" target="_blank">enable JavaScript</a> and re-load this interface.')); ?></div></div></noscript>
+ <noscript><div id="nojavascript"><div><?php print_unescaped($l->t('This application requires JavaScript for correct operation. Please <a href="http://enable-javascript.com/" target="_blank">enable JavaScript</a> and reload the page.')); ?></div></div></noscript>
<div id="notification-container">
<div id="notification"></div>
<?php if ($_['updateAvailable']): ?>