aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-02-06 18:26:44 +0000
committerSam Tuke <samtuke@owncloud.com>2013-02-06 18:26:44 +0000
commitfaf6cb08686ed618eb08bce4a3035b3831ab10c8 (patch)
treee382af4f563d3228124d702507750b27504c8836 /apps
parent954a6274836e8fbf83fbbfb34fc89c250c7da13b (diff)
parenta26f17c1303d0f4e08144d9ca508488f09cbba3b (diff)
downloadnextcloud-server-faf6cb08686ed618eb08bce4a3035b3831ab10c8.tar.gz
nextcloud-server-faf6cb08686ed618eb08bce4a3035b3831ab10c8.zip
Merge branch 'master' into files_encryption
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.css8
-rw-r--r--apps/files/templates/index.php2
-rw-r--r--apps/files_versions/ajax/getVersions.php2
-rw-r--r--apps/files_versions/ajax/rollbackVersion.php2
-rw-r--r--apps/files_versions/appinfo/app.php10
-rw-r--r--apps/files_versions/history.php4
-rw-r--r--apps/files_versions/lib/hooks.php2
-rw-r--r--apps/files_versions/lib/versions.php5
8 files changed, 18 insertions, 17 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 661a2e827a4..f37ac4c262a 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -3,7 +3,7 @@
See the COPYING-README file. */
/* FILE MENU */
-.actions { padding:.3em; float:left; height:2em; }
+.actions { padding:.3em; float:left; height:2em; width: 100%; }
.actions input, .actions button, .actions .button { margin:0; float:left; }
#new {
@@ -23,7 +23,7 @@
#new>ul>li>p { cursor:pointer; }
#new>ul>li>form>input { padding:0.3em; margin:-0.3em; }
-#trash { height:17px; margin:0 0 0 1em; z-index:1010; position:absolute; right:13.5em; }
+#trash { height:17px; margin: 0 1em; z-index:1010; float: right; }
#upload {
height:27px; padding:0; margin-left:0.2em; overflow:hidden;
@@ -44,7 +44,7 @@
z-index:20; position:relative; cursor:pointer; overflow:hidden;
}
-#uploadprogresswrapper { position:absolute; right:13.5em; top:0em; }
+#uploadprogresswrapper { float: right; position: relative; }
#uploadprogresswrapper #uploadprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; }
/* FILE TABLE */
@@ -55,7 +55,7 @@
font-size:1.5em; font-weight:bold;
color:#888; text-shadow:#fff 0 1px 0;
}
-table { position:relative; top:37px; width:100%; }
+table { position:relative; width:100%; }
tbody tr { background-color:#fff; height:2.5em; }
tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; }
tbody tr.selected { background-color:#eee; }
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 2d4ed9ab2d9..0b4aa21eac3 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -59,7 +59,7 @@
<div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
<?php endif; ?>
-<table>
+<table class="hascontrols">
<thead>
<tr>
<th id='headerName'>
diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php
index 600e69cf798..53fc04625c6 100644
--- a/apps/files_versions/ajax/getVersions.php
+++ b/apps/files_versions/ajax/getVersions.php
@@ -5,7 +5,7 @@ $userDirectory = "/".OCP\USER::getUser()."/files";
$source = $_GET['source'];
$count = 5; //show the newest revisions
-if( ($versions = OCA_Versions\Storage::getVersions( $source, $count)) ) {
+if( ($versions = OCA\Files_Versions\Storage::getVersions( $source, $count)) ) {
$versionsFormatted = array();
diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php
index f2c211d9c1e..dc5a59cb4af 100644
--- a/apps/files_versions/ajax/rollbackVersion.php
+++ b/apps/files_versions/ajax/rollbackVersion.php
@@ -8,7 +8,7 @@ $userDirectory = "/".OCP\USER::getUser()."/files";
$file = $_GET['file'];
$revision=(int)$_GET['revision'];
-if(OCA_Versions\Storage::rollback( $file, $revision )) {
+if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
}else{
OCP\JSON::error(array("data" => array( "message" => "Could not revert:" . $file )));
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php
index edd0a2f7022..f7c6989ce2d 100644
--- a/apps/files_versions/appinfo/app.php
+++ b/apps/files_versions/appinfo/app.php
@@ -1,8 +1,8 @@
<?php
//require_once 'files_versions/versions.php';
-OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/versions.php';
-OC::$CLASSPATH['OCA_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php';
+OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'apps/files_versions/lib/versions.php';
+OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php';
OCP\App::registerAdmin('files_versions', 'settings');
OCP\App::registerPersonal('files_versions', 'settings-personal');
@@ -10,7 +10,7 @@ OCP\App::registerPersonal('files_versions', 'settings-personal');
OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals
-OCP\Util::connectHook('OC_Filesystem', 'write', "OCA_Versions\Hooks", "write_hook");
+OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "write_hook");
// Listen to delete and rename signals
-OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA_Versions\Hooks", "remove_hook");
-OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA_Versions\Hooks", "rename_hook"); \ No newline at end of file
+OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA\Files_Versions\Hooks", "remove_hook");
+OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook");
diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php
index 6071240e583..1bd5cde44be 100644
--- a/apps/files_versions/history.php
+++ b/apps/files_versions/history.php
@@ -29,7 +29,7 @@ if ( isset( $_GET['path'] ) ) {
$path = $_GET['path'];
$tmpl->assign( 'path', $path );
- $versions = new OCA_Versions\Storage();
+ $versions = new OCA\Files_Versions\Storage();
// roll back to old version if button clicked
if( isset( $_GET['revert'] ) ) {
@@ -52,7 +52,7 @@ if ( isset( $_GET['path'] ) ) {
// show the history only if there is something to show
$count = 999; //show the newest revisions
- if( ($versions = OCA_Versions\Storage::getVersions( $path, $count)) ) {
+ if( ($versions = OCA\Files_Versions\Storage::getVersions( $path, $count)) ) {
$tmpl->assign( 'versions', array_reverse( $versions ) );
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index 5cefc532895..dc02c605c44 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -10,7 +10,7 @@
* This class contains all hooks.
*/
-namespace OCA_Versions;
+namespace OCA\Files_Versions;
class Hooks {
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 5063ef3e21c..b54bc4a4422 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -13,7 +13,7 @@
* A class to handle the versioning of files.
*/
-namespace OCA_Versions;
+namespace OCA\Files_Versions;
class Storage {
@@ -195,6 +195,7 @@ class Storage {
$files_view = new \OC_FilesystemView('/'.$uid.'/files');
$local_file = $files_view->getLocalFile($filename);
+ $local_file_md5 = \md5_file( $local_file );
foreach( $matches as $ma ) {
$parts = explode( '.v', $ma );
@@ -206,7 +207,7 @@ class Storage {
$versions[$key]['size'] = $versions_fileview->filesize($filename.'.v'.$version);
// if file with modified date exists, flag it in array as currently enabled version
- ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$key]['fileMatch'] = 1 : $versions[$key]['fileMatch'] = 0 );
+ ( \md5_file( $ma ) == $local_file_md5 ? $versions[$key]['fileMatch'] = 1 : $versions[$key]['fileMatch'] = 0 );
}