summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
m---------3rdparty0
-rw-r--r--apps/files/js/filelist.js2
-rw-r--r--apps/files/js/files.js3
-rw-r--r--apps/files/templates/part.list.php2
-rw-r--r--apps/files_encryption/appinfo/info.xml6
-rw-r--r--apps/files_external/lib/webdav.php2
-rw-r--r--apps/files_sharing/lib/watcher.php2
-rw-r--r--apps/files_sharing/public.php2
-rw-r--r--apps/files_trashbin/lib/trashbin.php2
-rw-r--r--apps/files_versions/lib/versions.php2
-rw-r--r--core/js/js.js3
-rw-r--r--lib/private/app.php4
-rw-r--r--lib/private/files/cache/watcher.php4
-rw-r--r--lib/private/files/storage/wrapper/quota.php2
-rw-r--r--lib/private/files/view.php7
-rw-r--r--lib/private/installer.php3
-rwxr-xr-xlib/private/util.php5
-rw-r--r--settings/css/settings.css6
-rw-r--r--settings/js/apps.js30
-rw-r--r--settings/templates/apps.php9
-rw-r--r--tests/data/db_structure.xml1
-rw-r--r--tests/enable_all.php24
-rw-r--r--tests/lib/files/cache/cache.php5
-rw-r--r--tests/lib/files/storage/wrapper/quota.php19
24 files changed, 114 insertions, 31 deletions
diff --git a/3rdparty b/3rdparty
-Subproject faeedfcc0573868a2f0bde81f25a67a940c100a
+Subproject 7c2c94c904c2721763e97d5bafd115f863080a6
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 30aea9c8c8d..66968ab54c7 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -27,6 +27,8 @@ var FileList={
Files.setupDragAndDrop();
}
FileList.updateFileSummary();
+ procesSelection();
+
$fileList.trigger(jQuery.Event("updated"));
},
createRow:function(type, name, iconurl, linktarget, size, lastModified, permissions) {
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 1f12ade8d79..dc7e893340f 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -612,11 +612,12 @@ function procesSelection() {
return el.type==='dir';
});
if (selectedFiles.length === 0 && selectedFolders.length === 0) {
- $('#headerName>span.name').text(t('files','Name'));
+ $('#headerName span.name').text(t('files','Name'));
$('#headerSize').text(t('files','Size'));
$('#modified').text(t('files','Modified'));
$('table').removeClass('multiselect');
$('.selectedActions').hide();
+ $('#select_all').removeAttr('checked');
}
else {
$('.selectedActions').show();
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index 2f630e1f014..f4fb96a7a7c 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -18,7 +18,7 @@ $totalsize = 0; ?>
data-size="<?php p($file['size']);?>"
data-etag="<?php p($file['etag']);?>"
data-permissions="<?php p($file['permissions']); ?>">
- <?php if($file['isPreviewAvailable']): ?>
+ <?php if(isset($file['isPreviewAvailable']) and $file['isPreviewAvailable']): ?>
<td class="filename svg preview-icon"
<?php else: ?>
<td class="filename svg"
diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml
index 9d495916d26..b6d9d6bb0a3 100644
--- a/apps/files_encryption/appinfo/info.xml
+++ b/apps/files_encryption/appinfo/info.xml
@@ -2,11 +2,15 @@
<info>
<id>files_encryption</id>
<name>Encryption</name>
- <description>The new ownCloud 5 files encryption system. After the app was enabled you need to re-login to initialize your encryption keys.</description>
+ <description>The ownCloud files encryption system provides server side-encryption. After the app was enabled you need to re-login to initialize your encryption keys.</description>
<licence>AGPL</licence>
<author>Sam Tuke, Bjoern Schiessle, Florin Peter</author>
<require>4</require>
<shipped>true</shipped>
+ <documentation>
+ <user>http://doc.owncloud.org/server/6.0/user_manual/files/encryption.html</user>
+ <admin>http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuration_encryption.html</admin>
+ </documentation>
<rememberlogin>false</rememberlogin>
<types>
<filesystem/>
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 0f8034e57d9..f6f4cb16e87 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -224,7 +224,7 @@ class DAV extends \OC\Files\Storage\Common{
if (isset($response['{DAV:}quota-available-bytes'])) {
return (int)$response['{DAV:}quota-available-bytes'];
} else {
- return 0;
+ return \OC\Files\SPACE_UNKNOWN;
}
} catch(\Exception $e) {
return \OC\Files\SPACE_UNKNOWN;
diff --git a/apps/files_sharing/lib/watcher.php b/apps/files_sharing/lib/watcher.php
index c40cf6911b8..285b1a58c6e 100644
--- a/apps/files_sharing/lib/watcher.php
+++ b/apps/files_sharing/lib/watcher.php
@@ -32,7 +32,7 @@ class Shared_Watcher extends Watcher {
* @param string $path
*/
public function checkUpdate($path) {
- if ($path != '' && parent::checkUpdate($path)) {
+ if ($path != '' && parent::checkUpdate($path) === true) {
// since checkUpdate() has already updated the size of the subdirs,
// only apply the update to the owner's parent dirs
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index ef4345da20e..d050efd5b32 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -189,8 +189,8 @@ if (isset($path)) {
} else {
$i['extension'] = '';
}
- $i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
}
+ $i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
$i['directory'] = $getPath;
$i['permissions'] = OCP\PERMISSION_READ;
$i['icon'] = determineIcon($i, $basePath, $token);
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 769fd8d8990..7544980e071 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -734,7 +734,7 @@ class Trashbin {
// calculate available space for trash bin
// subtract size of files and current trash bin size from quota
if ($softQuota) {
- $rootInfo = $view->getFileInfo('/files/');
+ $rootInfo = $view->getFileInfo('/files/', false);
$free = $quota - $rootInfo['size']; // remaining free space for user
if ($free > 0) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 7e6cc818efb..f268fa10b66 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -445,7 +445,7 @@ class Storage {
// subtract size of files and current versions size from quota
if ($softQuota) {
$files_view = new \OC\Files\View('/'.$uid.'/files');
- $rootInfo = $files_view->getFileInfo('/');
+ $rootInfo = $files_view->getFileInfo('/', false);
$free = $quota-$rootInfo['size']; // remaining free space for user
if ( $free > 0 ) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - ($versionsSize + $offset); // how much space can be used for versions
diff --git a/core/js/js.js b/core/js/js.js
index f380234af05..e84f482d672 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -416,6 +416,9 @@ var OC={
throw e;
});
}
+ if(!SVGSupport()) {
+ replaceSVG();
+ }
}).show();
}, 'html');
}
diff --git a/lib/private/app.php b/lib/private/app.php
index 34c00e97fb9..0c60557914a 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -555,6 +555,10 @@ class OC_App{
}elseif($child->getName()=='description') {
$xml=(string)$child->asXML();
$data[$child->getName()]=substr($xml, 13, -14);//script <description> tags
+ }elseif($child->getName()=='documentation') {
+ foreach($child as $subchild) {
+ $data["documentation"][$subchild->getName()] = (string)$subchild;
+ }
}else{
$data[$child->getName()]=(string)$child;
}
diff --git a/lib/private/files/cache/watcher.php b/lib/private/files/cache/watcher.php
index 58f624c8990..251ecbe7071 100644
--- a/lib/private/files/cache/watcher.php
+++ b/lib/private/files/cache/watcher.php
@@ -40,7 +40,7 @@ class Watcher {
* check $path for updates
*
* @param string $path
- * @return boolean true if path was updated, false otherwise
+ * @return boolean | array true if path was updated, otherwise the cached data is returned
*/
public function checkUpdate($path) {
$cachedEntry = $this->cache->get($path);
@@ -56,7 +56,7 @@ class Watcher {
$this->cache->correctFolderSize($path);
return true;
}
- return false;
+ return $cachedEntry;
}
/**
diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php
index 43016e0892f..a430e3e4617 100644
--- a/lib/private/files/storage/wrapper/quota.php
+++ b/lib/private/files/storage/wrapper/quota.php
@@ -95,7 +95,7 @@ class Quota extends Wrapper {
public function fopen($path, $mode) {
$source = $this->storage->fopen($path, $mode);
$free = $this->free_space('');
- if ($free >= 0 && $mode !== 'r') {
+ if ($source && $free >= 0 && $mode !== 'r' && $mode !== 'rb') {
return \OC\Files\Stream\Quota::wrap($source, $free);
} else {
return $source;
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 8893911ed5d..d97544b865e 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -801,6 +801,7 @@ class View {
* @var string $internalPath
*/
list($storage, $internalPath) = Filesystem::resolvePath($path);
+ $data = null;
if ($storage) {
$cache = $storage->getCache($internalPath);
$permissionsCache = $storage->getPermissionsCache($internalPath);
@@ -811,10 +812,12 @@ class View {
$scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW);
} else {
$watcher = $storage->getWatcher($internalPath);
- $watcher->checkUpdate($internalPath);
+ $data = $watcher->checkUpdate($internalPath);
}
- $data = $cache->get($internalPath);
+ if (!is_array($data)) {
+ $data = $cache->get($internalPath);
+ }
if ($data and $data['fileid']) {
if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') {
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 8375b231e9b..835b6b4c01a 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -407,6 +407,9 @@ class OC_Installer{
include OC_App::getAppPath($app)."/appinfo/install.php";
}
$info=OC_App::getAppInfo($app);
+ if (is_null($info)) {
+ return false;
+ }
OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app));
//set remote/public handelers
diff --git a/lib/private/util.php b/lib/private/util.php
index be8b5439543..72afa6f9478 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -892,6 +892,11 @@ class OC_Util {
return false;
}
+ // in case the connection is via proxy return true to avoid connecting to owncloud.org
+ if(OC_Config::getValue('proxy', '') != '') {
+ return true;
+ }
+
// try to connect to owncloud.org to see if http connections to the internet are possible.
$connected = @fsockopen("www.owncloud.org", 80);
if ($connected) {
diff --git a/settings/css/settings.css b/settings/css/settings.css
index a93c675d466..8a96885b789 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -131,6 +131,12 @@ span.version { margin-left:1em; margin-right:1em; color:#555; }
.appslink { text-decoration: underline; }
.score { color:#666; font-weight:bold; font-size:0.8em; }
+.appinfo .documentation {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+
/* LOG */
#log { white-space:normal; }
#lessLog { display:none; }
diff --git a/settings/js/apps.js b/settings/js/apps.js
index a55c55e24cf..2c6f77d9314 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -37,6 +37,30 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
page.find('span.licence').text(appLicense);
+ var userDocumentation = false;
+ var adminDocumentation = false;
+ if (typeof(app.documentation) !== 'undefined') {
+ if (typeof(app.documentation.user) !== 'undefined') {
+ userDocumentation = true;
+ page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>");
+ page.find('p.documentation').show();
+ }
+ if (typeof(app.documentation.admin) !== 'undefined') {
+ adminDocumentation = true;
+ page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>");
+ page.find('p.documentation').show();
+ }
+
+ if(userDocumentation && adminDocumentation) {
+ page.find('span.userDocumentation').after(', ');
+ }
+ }
+
+ if (typeof(app.website) !== 'undefined') {
+ page.find('p.website').show();
+ page.find('a#websitelink').attr('href', app.website);
+ }
+
if (app.update !== false) {
page.find('input.update').show();
page.find('input.update').data('appid', app.id);
@@ -51,8 +75,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
page.find('input.enable').data('active', app.active);
if (app.internal === false) {
page.find('span.score').show();
- page.find('p.appslink').show();
- page.find('a').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id);
+ page.find('p.appstore').show();
+ page.find('a#appstorelink').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id);
page.find('small.externalapp').hide();
} else {
page.find('p.appslink').hide();
@@ -110,7 +134,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
element.val(t('settings','Disable'));
}
},'json')
- .fail(function() {
+ .fail(function() {
OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app'));
appitem.data('errormsg', t('settings', 'Error while enabling app'));
appitem.data('active',false);
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 0b76f775fea..e04815f9b99 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -34,9 +34,16 @@
class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
<span class="score"></span>
<p class="description"></p>
+ <p class="documentation hidden">
+ <?php p($l->t("Documentation:"));?>
+ <span class="userDocumentation appslink"></span>
+ <span class="adminDocumentation appslink"></span>
+ </p>
<img src="" class="preview hidden" />
- <p class="appslink hidden"><a href="#" target="_blank"><?php
+ <p class="appslink appstore hidden"><a id="appstorelink" href="#" target="_blank"><?php
p($l->t('See application page at apps.owncloud.com'));?></a></p>
+ <p class="appslink website hidden"><a id="websitelink" href="#" target="_blank"><?php
+ p($l->t('See application website'));?></a></p>
<p class="license hidden"><?php
print_unescaped($l->t('<span class="licence"></span>-licensed by <span class="author"></span>'));?></p>
<input class="enable hidden" type="submit" />
diff --git a/tests/data/db_structure.xml b/tests/data/db_structure.xml
index bfff2143349..d98066c4b7e 100644
--- a/tests/data/db_structure.xml
+++ b/tests/data/db_structure.xml
@@ -21,6 +21,7 @@
<autoincrement>1</autoincrement>
<unsigned>true</unsigned>
<length>4</length>
+ <comments>This is the id</comments>
</field>
<field>
diff --git a/tests/enable_all.php b/tests/enable_all.php
index 4f2fe5cdb60..d54418ff8e4 100644
--- a/tests/enable_all.php
+++ b/tests/enable_all.php
@@ -8,16 +8,16 @@
require_once __DIR__.'/../lib/base.php';
-OC_App::enable('files_sharing');
-OC_App::enable('files_encryption');
-OC_App::enable('user_ldap');
-OC_App::enable('calendar');
-OC_App::enable('contacts');
-OC_App::enable('apptemplateadvanced');
-OC_App::enable('appframework');
-#OC_App::enable('files_archive');
-#OC_App::enable('mozilla_sync');
-#OC_App::enable('news');
-#OC_App::enable('provisioning_api');
-#OC_App::enable('user_external');
+function enableApp($app) {
+ try {
+ OC_App::enable($app);
+ } catch (Exception $e) {
+ echo $e;
+ }
+}
+
+enableApp('files_sharing');
+enableApp('files_encryption');
+//enableApp('files_external');
+enableApp('user_ldap');
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index 7d9329328a3..5d876932479 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -169,8 +169,9 @@ class Cache extends \PHPUnit_Framework_TestCase {
$this->assertEquals(916, $this->cache->calculateFolderSize($file1));
// direct cache entry retrieval returns the original values
- $this->assertEquals(1025, $this->cache->get($file1)['size']);
- $this->assertEquals(916, $this->cache->get($file1)['unencrypted_size']);
+ $entry = $this->cache->get($file1);
+ $this->assertEquals(1025, $entry['size']);
+ $this->assertEquals(916, $entry['unencrypted_size']);
$this->cache->remove($file2);
$this->cache->remove($file3);
diff --git a/tests/lib/files/storage/wrapper/quota.php b/tests/lib/files/storage/wrapper/quota.php
index 9b14335782f..87bafb64d41 100644
--- a/tests/lib/files/storage/wrapper/quota.php
+++ b/tests/lib/files/storage/wrapper/quota.php
@@ -59,6 +59,20 @@ class Quota extends \Test\Files\Storage\Storage {
$this->assertEquals('foobarqwe', $instance->file_get_contents('foo'));
}
+ public function testReturnFalseWhenFopenFailed(){
+ $failStorage = $this->getMock(
+ '\OC\Files\Storage\Local',
+ array('fopen'),
+ array(array('datadir' => $this->tmpDir)));
+ $failStorage->expects($this->any())
+ ->method('fopen')
+ ->will($this->returnValue(false));
+
+ $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $failStorage, 'quota' => 1000));
+
+ $this->assertFalse($instance->fopen('failedfopen', 'r'));
+ }
+
public function testReturnRegularStreamOnRead(){
$instance = $this->getLimitedStorage(9);
@@ -71,6 +85,11 @@ class Quota extends \Test\Files\Storage\Storage {
$meta = stream_get_meta_data($stream);
$this->assertEquals('plainfile', $meta['wrapper_type']);
fclose($stream);
+
+ $stream = $instance->fopen('foo', 'rb');
+ $meta = stream_get_meta_data($stream);
+ $this->assertEquals('plainfile', $meta['wrapper_type']);
+ fclose($stream);
}
public function testReturnQuotaStreamOnWrite(){