summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-02-27 21:37:14 +0100
committerLukas Reschke <lukas@statuscode.ch>2013-02-27 21:37:14 +0100
commit221ecf63ab92cfbdfe2204dfccbb90ff68e09426 (patch)
tree4c7bb06b15430f4d1954f25d63fc72b7612d778e
parent236507a19fe4d541c931944603cd38ec823cb3af (diff)
downloadnextcloud-server-221ecf63ab92cfbdfe2204dfccbb90ff68e09426.tar.gz
nextcloud-server-221ecf63ab92cfbdfe2204dfccbb90ff68e09426.zip
[files_sharing] From echo to p
-rw-r--r--apps/files_sharing/public.php17
-rw-r--r--apps/files_sharing/templates/authenticate.php6
-rw-r--r--apps/files_sharing/templates/public.php40
3 files changed, 31 insertions, 32 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 243ee668f1f..e345b91e293 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -168,18 +168,17 @@ if (isset($path)) {
}
}
$list = new OCP\Template('files', 'part.list', '');
- $list->assign('files', $files, false);
+ $list->assign('files', $files);
$list->assign('disableSharing', true);
- $list->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=', false);
+ $list->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=');
$list->assign('downloadURL',
- OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=',
- false);
+ OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=');
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
- $breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
- $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=', false);
+ $breadcrumbNav->assign('breadcrumb', $breadcrumb);
+ $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=');
$folder = new OCP\Template('files', 'index', '');
- $folder->assign('fileList', $list->fetchPage(), false);
- $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
+ $folder->assign('fileList', $list->fetchPage());
+ $folder->assign('breadcrumb', $breadcrumbNav->fetchPage());
$folder->assign('dir', $getPath);
$folder->assign('isCreatable', false);
$folder->assign('permissions', 0);
@@ -188,7 +187,7 @@ if (isset($path)) {
$folder->assign('uploadMaxHumanFilesize', 0);
$folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$folder->assign('usedSpacePercent', 0);
- $tmpl->assign('folder', $folder->fetchPage(), false);
+ $tmpl->assign('folder', $folder->fetchPage());
$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$tmpl->assign('downloadURL',
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php
index 6bce6857ac8..b6ef82da6f0 100644
--- a/apps/files_sharing/templates/authenticate.php
+++ b/apps/files_sharing/templates/authenticate.php
@@ -1,9 +1,9 @@
-<form action="<?php echo $_['URL']; ?>" method="post">
+<form action="<?php p($_['URL']); ?>" method="post">
<fieldset>
<p class="infield">
- <label for="password" class="infield"><?php echo $l->t('Password'); ?></label>
+ <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
<input type="password" name="password" id="password" value="" autofocus />
- <input type="submit" value="<?php echo $l->t('Submit'); ?>" />
+ <input type="submit" value="<?php p($l->t('Submit')); ?>" />
</p>
</fieldset>
</form> \ No newline at end of file
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index f9ff12679bc..88692445ec3 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -1,43 +1,43 @@
-<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
-<input type="hidden" name="downloadURL" value="<?php echo $_['downloadURL'] ?>" id="downloadURL">
-<input type="hidden" name="filename" value="<?php echo $_['filename'] ?>" id="filename">
-<input type="hidden" name="mimetype" value="<?php echo $_['mimetype'] ?>" id="mimetype">
+<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
+<input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
+<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
+<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
<header><div id="header">
- <a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg"
- src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a>
+ <a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg"
+ src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="ownCloud" /></a>
<div class="header-right">
<?php if (isset($_['folder'])): ?>
- <span id="details"><?php echo $l->t('%s shared the folder %s with you',
- array($_['displayName'], $_['fileTarget'])) ?></span>
+ <span id="details"><?php p($l->t('%s shared the folder %s with you',
+ array($_['displayName'], $_['fileTarget']))) ?></span>
<?php else: ?>
- <span id="details"><?php echo $l->t('%s shared the file %s with you',
- array($_['displayName'], $_['fileTarget'])) ?></span>
+ <span id="details"><?php p($l->t('%s shared the file %s with you',
+ array($_['displayName'], $_['fileTarget']))) ?></span>
<?php endif; ?>
<?php if (!isset($_['folder']) || $_['allowZipDownload']): ?>
- <a href="<?php echo $_['downloadURL']; ?>" class="button" id="download"><img
- class="svg" alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>"
- /><?php echo $l->t('Download')?></a>
+ <a href="<?php p($_['downloadURL']); ?>" class="button" id="download"><img
+ class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"
+ /><?php p($l->t('Download'))?></a>
<?php endif; ?>
</div>
</div></header>
<div id="preview">
<?php if (isset($_['folder'])): ?>
- <?php echo $_['folder']; ?>
+ <?php print_unescaped($_['folder']); ?>
<?php else: ?>
<?php if (substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'image'): ?>
<div id="imgframe">
- <img src="<?php echo $_['downloadURL']; ?>" />
+ <img src="<?php p($_['downloadURL']); ?>" />
</div>
<?php endif; ?>
<ul id="noPreview">
<li class="error">
- <?php echo $l->t('No preview available for').' '.$_['fileTarget']; ?><br />
- <a href="<?php echo $_['downloadURL']; ?>" id="download"><img class="svg" alt="Download"
- src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>"
- /><?php echo $l->t('Download')?></a>
+ <?php p($l->t('No preview available for').' '.$_['fileTarget']); ?><br />
+ <a href="<?php p($_['downloadURL']); ?>" id="download"><img class="svg" alt="Download"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"
+ /><?php p($l->t('Download'))?></a>
</li>
</ul>
<?php endif; ?>
</div>
<footer><p class="info"><a href="http://owncloud.org/">ownCloud</a> &ndash;
-<?php echo $l->t('web services under your control'); ?></p></footer>
+<?php p($l->t('web services under your control')); ?></p></footer>