diff --git a/.gitignore b/.gitignore
index 71e3ec1baf..9cfb7a5861 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ _darcs/*
CVS/*
.svn/*
RCS/*
+.kdev
+*.kdev4
diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php
index 04f8caf138..e87013bd99 100644
--- a/admin/appinfo/app.php
+++ b/admin/appinfo/app.php
@@ -2,10 +2,10 @@
OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" ));
-OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System setting", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
+OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "users.png" )));
OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" )));
-OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "apps.png" )));
+OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "plugins.png" )));
// Add subentries for App installer
OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?add=some¶meters=here" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" )));
diff --git a/admin/img/apps.png b/admin/img/apps.png
index 1e6f16651c..ee3e8355e6 100644
Binary files a/admin/img/apps.png and b/admin/img/apps.png differ
diff --git a/admin/img/plugins.png b/admin/img/plugins.png
new file mode 100644
index 0000000000..1e6f16651c
Binary files /dev/null and b/admin/img/plugins.png differ
diff --git a/admin/img/users.png b/admin/img/users.png
index 0d3701918b..ea2ed9e333 100644
Binary files a/admin/img/users.png and b/admin/img/users.png differ
diff --git a/css/styles.css b/css/styles.css
index f0832d0594..d5b5f59f70 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -99,6 +99,9 @@ table td.download { background-image:url('../img/download.png'); }
table td.upload { background-image:url('../img/upload.png'); }
table td.create { background-image:url('../img/folder-new.png'); }
table td.delete { background-image:url('../img/delete.png'); }
+#fileList tr input[type=checkbox] { display:none; }
+#fileList tr input[type=checkbox]:checked { display:inline; }
+#fileList tr:hover input[type=checkbox] { display:inline; }
/* NAVIGATION BAR */
p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; }
diff --git a/files/appinfo/app.php b/files/appinfo/app.php
index c542f47b24..bf67812cf3 100644
--- a/files/appinfo/app.php
+++ b/files/appinfo/app.php
@@ -2,7 +2,7 @@
OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
-OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "navicon.png" ), "name" => "Files" ));
+OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "home.png" ), "name" => "Files" ));
OC_APP::addSettingsPage( array( "id" => "files_administration", "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" )));
diff --git a/files/img/file.png b/files/img/file.png
new file mode 100644
index 0000000000..4979044889
Binary files /dev/null and b/files/img/file.png differ
diff --git a/files/img/folder.png b/files/img/folder.png
index 3e7a3ba8cf..3edbe257a3 100644
Binary files a/files/img/folder.png and b/files/img/folder.png differ
diff --git a/files/img/home.png b/files/img/home.png
new file mode 100644
index 0000000000..b3fb9bbaf6
Binary files /dev/null and b/files/img/home.png differ
diff --git a/files/img/navicon.png b/files/img/navicon.png
deleted file mode 100644
index 3802c98fc4..0000000000
Binary files a/files/img/navicon.png and /dev/null differ
diff --git a/files/index.php b/files/index.php
index 2a78e8a438..7ac3bce605 100644
--- a/files/index.php
+++ b/files/index.php
@@ -42,6 +42,9 @@ $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
$files = array();
foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){
$i["date"] = OC_UTIL::formatDate($i["mtime"] );
+ if($i['directory']=='/'){
+ $i['directory']='';
+ }
$files[] = $i;
}
diff --git a/files/js/files.js b/files/js/files.js
index 5c11bddeb5..019758dc49 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -39,6 +39,19 @@ $(document).ready(function() {
$('.browser input:checkbox').attr('checked', false);
});
+ // Delete current file
+ $('#delete_single_file').click(function() {
+ filename = $('#file_menu').parents('tr:first').find('.filename:first').children('a:first').text();
+ $.ajax({
+ url: 'ajax/delete.php',
+ data: "dir="+$('#dir').val()+"&file="+filename,
+ complete: function(data){
+ boolOperationFinished(data, true, $('#file_menu').parents('tr:first'));
+ }
+ });
+ return false;
+ });
+
$('#file_upload_start').click(function() {
$('#file_upload_target').load(uploadFinished);
});
@@ -47,7 +60,7 @@ $(document).ready(function() {
$.ajax({
url: 'ajax/newfolder.php',
data: "dir="+$('#dir').val()+"&foldername="+$('#file_new_dir_name').val(),
- complete: boolOpFinished
+ complete: function(data){boolOperationFinished(data, false);}
});
});
@@ -98,14 +111,20 @@ function resetFileActionPanel() {
$('#file_action_panel').attr('activeAction', false);
}
-function boolOpFinished(data) {
+function boolOperationFinished(data, single, el) {
result = eval("("+data.responseText+");");
if(result.status == 'success'){
- $.ajax({
- url: 'ajax/list.php',
- data: "dir="+$('#dir').val(),
- complete: refreshContents
- });
+ if(single) {
+ $('#file_menu').slideToggle(0);
+ $('body').append($('#file_menu'));
+ $(el).remove();
+ } else {
+ $.ajax({
+ url: 'ajax/list.php',
+ data: "dir="+$('#dir').val(),
+ complete: refreshContents
+ });
+ }
} else {
alert(result.data.message);
}
@@ -117,7 +136,11 @@ function refreshContents(data) {
updateBreadcrumb(result.data.breadcrumb);
}
updateFileList(result.data.files);
- $('#file_upload_button').click();
+ $('td.fileaction a').click(function() {
+ $(this).parent().append($('#file_menu'));
+ $('#file_menu').slideToggle(250);
+ return false;
+ });
resetFileActionPanel();
}
diff --git a/files/templates/index.php b/files/templates/index.php
index 75eef0d16e..d38e771c2e 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -40,6 +40,6 @@ name="file_upload_target" src="">
diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php
index 4d11edb984..da9544008b 100644
--- a/files/templates/part.breadcrumb.php
+++ b/files/templates/part.breadcrumb.php
@@ -1,4 +1,4 @@
"> " alt="Root" />
- ">
+ ">
\ No newline at end of file
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index 76d938326b..0d4fcc7548 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -1,9 +1,9 @@
- )" href="" title="">
+ )" href="" title="">
-
+
\ No newline at end of file
diff --git a/help/img/help.png b/help/img/help.png
index aa222ed83b..487c6e6fd9 100644
Binary files a/help/img/help.png and b/help/img/help.png differ
diff --git a/img/help_about.png b/img/help_about.png
deleted file mode 100644
index 792d18b1a5..0000000000
Binary files a/img/help_about.png and /dev/null differ
diff --git a/img/mimetypes/application-octet-stream.png b/img/mimetypes/application-octet-stream.png
index 0a90cf06b5..4979044889 100644
Binary files a/img/mimetypes/application-octet-stream.png and b/img/mimetypes/application-octet-stream.png differ
diff --git a/img/places/folder.png b/img/places/folder.png
index 3e7a3ba8cf..3edbe257a3 100644
Binary files a/img/places/folder.png and b/img/places/folder.png differ
diff --git a/img/task-attention.png b/img/task-attention.png
deleted file mode 100644
index 35a112e9d5..0000000000
Binary files a/img/task-attention.png and /dev/null differ
diff --git a/lib/base.php b/lib/base.php
index ec30525080..352474e1e8 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -242,35 +242,20 @@ class OC_UTIL {
public static function showPageNavi($pagecount,$page,$url) {
$pagelinkcount=8;
- $txt='';
if ($pagecount>1) {
- $txt.=' ';
+
+ $tmpl = new OC_TEMPLATE( '', 'part.pagenavi', '' );
+ $tmpl->assign('page',$page);
+ $tmpl->assign('pagecount',$pagecount);
+ $tmpl->assign('pagestart',$pagestart);
+ $tmpl->assign('pagestop',$pagestop);
+ $tmpl->assign('url',$url);
+ $tmpl->printPage();
}
- echo($txt);
}
diff --git a/plugins/publiclink/get.php b/plugins/publiclink/get.php
new file mode 100644
index 0000000000..cdfe42ef26
--- /dev/null
+++ b/plugins/publiclink/get.php
@@ -0,0 +1,76 @@
+ $pathtohere, "name" => $i );
+ }
+ }
+
+ $breadcrumbNav = new OC_TEMPLATE( "plugins/publiclink", "breadcrumb", "" );
+ $breadcrumbNav->assign( "breadcrumb", $breadcrumb );
+ $breadcrumbNav->assign('token',$token);
+
+ $list = new OC_TEMPLATE( 'plugins/publiclink', 'files', '' );
+ $list->assign( 'files', $files );
+ $list->assign('token',$token);
+
+ $tmpl = new OC_TEMPLATE( 'plugins/publiclink', 'index', 'user' );
+ $tmpl->assign('fileList', $list->fetchPage());
+ $tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
+ $tmpl->printPage();
+ }else{
+ //get time mimetype and set the headers
+ $mimetype=OC_FILESYSTEM::getMimeType($path);
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Disposition: attachment; filename="'.basename($path).'"');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Type: ' . $mimetype);
+ header('Content-Length: ' . OC_FILESYSTEM::filesize($path));
+
+ //download the file
+ ob_clean();
+ OC_FILESYSTEM::readfile($path);
+ }
+}else{
+ header("HTTP/1.0 404 Not Found");
+ echo '404 Not Found';
+ die();
+}
+?>
\ No newline at end of file
diff --git a/plugins/publiclink/getfile.php b/plugins/publiclink/getfile.php
deleted file mode 100644
index 15a568df3d..0000000000
--- a/plugins/publiclink/getfile.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/publiclink/lib_public.php b/plugins/publiclink/lib_public.php
index 7c25c938fd..20b538d3ac 100644
--- a/plugins/publiclink/lib_public.php
+++ b/plugins/publiclink/lib_public.php
@@ -6,9 +6,9 @@ class OC_PublicLink{
* @param int (optional) expiretime time the link expires, as timestamp
*/
public function __construct($path,$expiretime=0){
- if($path && OC_FILESYSTEM::file_exists($path)){
- $token=sha1("$path-$expiretime");
+ if($path and OC_FILESYSTEM::file_exists($path) and OC_FILESYSTEM::is_readable($path)){
$user=$_SESSION['user_id'];
+ $token=sha1("$user-$path-$expiretime");
$query=OC_DB::prepare("INSERT INTO *PREFIX*publiclink VALUES(?,?,?,?)");
$result=$query->execute(array($token,$path,$user,$expiretime));
if( PEAR::isError($result)) {
@@ -22,10 +22,9 @@ class OC_PublicLink{
}
/**
- * download a file shared by a public link
- * @param string token
+ * get the path of that shared file
*/
- public static function downloadFile($token){
+ public static function getPath($token){
//remove expired links
$query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE expire_time < NOW() AND expire_time!=0");
$query->execute();
@@ -41,23 +40,9 @@ class OC_PublicLink{
//prepare the filesystem
OC_UTIL::setupFS($user);
- //get time mimetype and set the headers
- $mimetype=OC_FILESYSTEM::getMimeType($path);
- // header('Content-Disposition: attachment; filename="'.basename($path).'"');
- header('Content-Transfer-Encoding: binary');
- header('Expires: 0');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- header('Pragma: public');
- header('Content-Type: ' . $mimetype);
- header('Content-Length: ' . OC_FILESYSTEM::filesize($path));
-
- //download the file
- ob_clean();
- OC_FILESYSTEM::readfile($path);
+ return $path;
}else{
- header("HTTP/1.0 404 Not Found");
- echo '404 Not Found';
- die();
+ return false;
}
}
diff --git a/plugins/publiclink/templates/breadcrumb.php b/plugins/publiclink/templates/breadcrumb.php
new file mode 100644
index 0000000000..3f4ae863ee
--- /dev/null
+++ b/plugins/publiclink/templates/breadcrumb.php
@@ -0,0 +1,4 @@
+ "> " alt="Root" />
+
+ ">
+
\ No newline at end of file
diff --git a/plugins/publiclink/templates/files.php b/plugins/publiclink/templates/files.php
new file mode 100644
index 0000000000..6473ad4c5c
--- /dev/null
+++ b/plugins/publiclink/templates/files.php
@@ -0,0 +1,9 @@
+
+
+
+ )" href="" title="">
+
+
+
+
+
\ No newline at end of file
diff --git a/plugins/publiclink/templates/index.php b/plugins/publiclink/templates/index.php
new file mode 100644
index 0000000000..9e23845260
--- /dev/null
+++ b/plugins/publiclink/templates/index.php
@@ -0,0 +1,17 @@
+
+
+
+
\ No newline at end of file
diff --git a/settings/img/personal.png b/settings/img/personal.png
index 95b4ca396c..ae22c1c1da 100644
Binary files a/settings/img/personal.png and b/settings/img/personal.png differ
diff --git a/templates/part.pagenavi.php b/templates/part.pagenavi.php
new file mode 100644
index 0000000000..d48d0cada3
--- /dev/null
+++ b/templates/part.pagenavi.php
@@ -0,0 +1,31 @@
+
+
+
\ No newline at end of file