summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-05-07 11:47:14 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-05-07 11:47:14 +0200
commit46fe2e3e2a3d194d8ab17540ec991c5c8cc178e3 (patch)
tree78896053233f385afbdc6006eade163626048bf6 /apps/files
parent7d2a68fc314bcefa69413d85e69ffd10dc34ddc5 (diff)
parent3a184e2e1d7ae49d596e06b724ffc36382d02596 (diff)
downloadnextcloud-server-46fe2e3e2a3d194d8ab17540ec991c5c8cc178e3.tar.gz
nextcloud-server-46fe2e3e2a3d194d8ab17540ec991c5c8cc178e3.zip
fix merge conflicts
Diffstat (limited to 'apps/files')
-rwxr-xr-xapps/files/admin.php2
-rwxr-xr-xapps/files/ajax/list.php4
-rwxr-xr-xapps/files/ajax/rawlist.php2
-rw-r--r--apps/files/appinfo/info.xml1
-rw-r--r--apps/files/appinfo/remote.php4
-rwxr-xr-xapps/files/download.php2
-rwxr-xr-xapps/files/index.php6
-rwxr-xr-xapps/files/settings.php2
-rwxr-xr-xapps/files/templates/index.php14
-rwxr-xr-x[-rw-r--r--]apps/files/templates/part.breadcrumb.php2
-rwxr-xr-x[-rw-r--r--]apps/files/templates/part.list.php8
11 files changed, 23 insertions, 24 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php
index a59a73f0a5b..b0c2b35c696 100755
--- a/apps/files/admin.php
+++ b/apps/files/admin.php
@@ -51,7 +51,7 @@ $allowZipDownload = intval(OCP\Config::getSystemValue('allowZipDownload', true))
OCP\App::setActiveNavigationEntry( "files_administration" );
-$tmpl = new OC_Template( 'files', 'admin' );
+$tmpl = new OCP\Template( 'files', 'admin' );
$tmpl->assign( 'htaccessWorking', $htaccessWorking );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX));
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index 520e54e708d..ceb8d158580 100755
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -24,7 +24,7 @@ if($doBreadcrumb){
}
}
- $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" );
+ $breadcrumbNav = new OCP\Template( "files", "part.breadcrumb", "" );
$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
$data['breadcrumb'] = $breadcrumbNav->fetchPage();
@@ -37,7 +37,7 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
$files[] = $i;
}
-$list = new OC_Template( "files", "part.list", "" );
+$list = new OCP\Template( "files", "part.list", "" );
$list->assign( "files", $files );
$data = array('files' => $list->fetchPage());
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
index 36dd35cc73e..6e7ace91013 100755
--- a/apps/files/ajax/rawlist.php
+++ b/apps/files/ajax/rawlist.php
@@ -17,7 +17,7 @@ $mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : '';
$files = array();
foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){
$i["date"] = OCP\Util::formatDate($i["mtime"] );
- $i['mimetype_icon'] = $i['type'] == 'dir' ? mimetype_icon('dir'): mimetype_icon($i['mimetype']);
+ $i['mimetype_icon'] = $i['type'] == 'dir' ? OCP\mimetype_icon('dir'): OCP\mimetype_icon($i['mimetype']);
$files[] = $i;
}
diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml
index 2abf54e7da6..03076dee98c 100644
--- a/apps/files/appinfo/info.xml
+++ b/apps/files/appinfo/info.xml
@@ -6,5 +6,6 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
+ <standalone/>
<default_enable/>
</info>
diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php
index 0f618c391ad..94ae101bb00 100644
--- a/apps/files/appinfo/remote.php
+++ b/apps/files/appinfo/remote.php
@@ -22,11 +22,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
// only need filesystem apps
$RUNTIME_APPTYPES=array('filesystem','authentication');
-
-
+require_once('../lib/base.php');
// Backends
$authBackend = new OC_Connector_Sabre_Auth();
diff --git a/apps/files/download.php b/apps/files/download.php
index e98cf2ecd31..2b5d4e2d876 100755
--- a/apps/files/download.php
+++ b/apps/files/download.php
@@ -31,7 +31,7 @@ $filename = $_GET["file"];
if(!OC_Filesystem::file_exists($filename)){
header("HTTP/1.0 404 Not Found");
- $tmpl = new OC_Template( '', '404', 'guest' );
+ $tmpl = new OCP\Template( '', '404', 'guest' );
$tmpl->assign('file',$filename);
$tmpl->printPage();
exit;
diff --git a/apps/files/index.php b/apps/files/index.php
index e2a0eb80a03..0c439e4ae1a 100755
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -72,11 +72,11 @@ foreach( explode( "/", $dir ) as $i ){
}
// make breadcrumb und filelist markup
-$list = new OC_Template( "files", "part.list", "" );
+$list = new OCP\Template( "files", "part.list", "" );
$list->assign( "files", $files );
$list->assign( "baseURL", OCP\Util::linkTo("files", "index.php")."?dir=");
$list->assign( "downloadURL", OCP\Util::linkTo("files", "download.php")."?file=");
-$breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" );
+$breadcrumbNav = new OCP\Template( "files", "part.breadcrumb", "" );
$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
$breadcrumbNav->assign( "baseURL", OCP\Util::linkTo("files", "index.php")."?dir=");
@@ -88,7 +88,7 @@ $freeSpace=OC_Filesystem::free_space('/');
$freeSpace=max($freeSpace,0);
$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
-$tmpl = new OC_Template( "files", "index", "user" );
+$tmpl = new OCP\Template( "files", "index", "user" );
$tmpl->assign( "fileList", $list->fetchPage() );
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
$tmpl->assign( 'dir', $dir);
diff --git a/apps/files/settings.php b/apps/files/settings.php
index cfadc54573d..e5a66239ebd 100755
--- a/apps/files/settings.php
+++ b/apps/files/settings.php
@@ -52,7 +52,7 @@ foreach( explode( "/", $dir ) as $i ){
}
// return template
-$tmpl = new OC_Template( "files", "index", "user" );
+$tmpl = new OCP\Template( "files", "index", "user" );
$tmpl->assign( 'files', $files );
$tmpl->assign( "breadcrumb", $breadcrumb );
$tmpl->printPage();
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 25193648387..72e45d53275 100755
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -6,9 +6,9 @@
<div id='new' class='button'>
<a><?php echo $l->t('New');?></a>
<ul class="popup popupTop">
- <li style="background-image:url('<?php echo mimetype_icon('text/plain') ?>')" data-type='file'><p><?php echo $l->t('Text file');?></p></li>
- <li style="background-image:url('<?php echo mimetype_icon('dir') ?>')" data-type='folder'><p><?php echo $l->t('Folder');?></p></li>
- <li style="background-image:url('<?php echo image_path('core','actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From url');?></p></li>
+ <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')" data-type='file'><p><?php echo $l->t('Text file');?></p></li>
+ <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')" data-type='folder'><p><?php echo $l->t('Folder');?></p></li>
+ <li style="background-image:url('<?php echo OCP\image_path('core','actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From url');?></p></li>
</ul>
</div>
<div class="file_upload_wrapper svg">
@@ -16,7 +16,7 @@
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
<input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
<input type="hidden" name="dir" value="<?php echo htmlentities($_['dir']) ?>" id="dir">
- <button class="file_upload_filename">&nbsp;<img class='svg action' alt="Upload" src="<?php echo image_path("core", "actions/upload.svg"); ?>" /></button>
+ <button class="file_upload_filename">&nbsp;<img class='svg action' alt="Upload" src="<?php echo OCP\image_path("core", "actions/upload.svg"); ?>" /></button>
<input class="file_upload_start" type="file" name='files[]'/>
<a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo $l->t('Upload'); echo ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
<iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
@@ -46,14 +46,14 @@
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" id="select_all" /><?php } ?>
<span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'>
- <a href="" class="share"><img class='svg' alt="Share" src="<?php echo image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a>
+ <a href="" class="share"><img class='svg' alt="Share" src="<?php echo OCP\image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a>
<?php if($_['allowZipDownload']) : ?>
- <a href="" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /> <?php echo $l->t('Download')?></a>
+ <a href="" class="download"><img class='svg' alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /> <?php echo $l->t('Download')?></a>
<?php endif; ?>
</span>
</th>
<th id="headerSize"><?php echo $l->t( 'Size' ); ?></th>
- <th id="headerDate"><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete all')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo image_path("core", "actions/delete.svg"); ?>" /></a></span></th>
+ <th id="headerDate"><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete all')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span></th>
</tr>
</thead>
<tbody id="fileList" data-readonly="<?php echo $_['readonly'];?>">
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php
index 16da6bb97b4..41d2c5c8e76 100644..100755
--- a/apps/files/templates/part.breadcrumb.php
+++ b/apps/files/templates/part.breadcrumb.php
@@ -1,6 +1,6 @@
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
$crumb = $_["breadcrumb"][$i]; ?>
- <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'>
+ <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo OCP\image_path('core','breadcrumb.png');?>")'>
<a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlentities($crumb["name"]); ?></a>
</div>
<?php endfor;?> \ No newline at end of file
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index b2db4cbb8df..4506630c16d 100644..100755
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -1,9 +1,9 @@
<?php foreach($_['files'] as $file):
$write = ($file['writable']) ? 'true' : 'false';
- $simple_file_size = simple_file_size($file['size']);
+ $simple_file_size = OCP\simple_file_size($file['size']);
$simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2
if($simple_size_color<0) $simple_size_color = 0;
- $relative_modified_date = relative_modified_date($file['mtime']);
+ $relative_modified_date = OCP\relative_modified_date($file['mtime']);
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
if($relative_date_color>200) $relative_date_color = 200;
$name = str_replace('+','%20',urlencode($file['name']));
@@ -11,7 +11,7 @@
$directory = str_replace('+','%20',urlencode($file['directory']));
$directory = str_replace('%2F','/', $directory); ?>
<tr data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-write='<?php echo $write;?>'>
- <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mimetype']); ?>)">
+ <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)">
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?>
<a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
<span class="nametext">
@@ -27,7 +27,7 @@
<?php endif;?>
</a>
</td>
- <td class="filesize" title="<?php echo human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
+ <td class="filesize" title="<?php echo OCP\human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
<td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td>
</tr>
<?php endforeach; ?>