summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/index.php14
-rw-r--r--apps/files/templates/admin.php22
-rw-r--r--apps/files/templates/index.php76
-rw-r--r--apps/files/templates/part.breadcrumb.php10
-rw-r--r--apps/files/templates/part.list.php41
-rw-r--r--apps/files/templates/upgrade.php2
-rw-r--r--apps/files_encryption/templates/settings-personal.php8
-rw-r--r--apps/files_encryption/templates/settings.php8
-rwxr-xr-xapps/files_external/personal.php4
-rw-r--r--apps/files_external/settings.php4
-rw-r--r--apps/files_external/templates/settings.php108
-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
-rw-r--r--apps/files_trashbin/index.php15
-rw-r--r--apps/files_trashbin/templates/index.php22
-rw-r--r--apps/files_trashbin/templates/part.list.php46
-rw-r--r--apps/files_versions/templates/history.php22
-rw-r--r--apps/user_ldap/settings.php2
-rw-r--r--apps/user_ldap/templates/settings.php108
-rwxr-xr-xapps/user_webdavauth/templates/settings.php8
21 files changed, 290 insertions, 293 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 434e98c6ea8..20fbf7f93be 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -90,13 +90,13 @@ foreach (explode('/', $dir) as $i) {
// make breadcrumb und filelist markup
$list = new OCP\Template('files', 'part.list', '');
-$list->assign('files', $files, false);
-$list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false);
-$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/')), false);
+$list->assign('files', $files);
+$list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=');
+$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/')));
$list->assign('disableSharing', false);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
-$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
-$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false);
+$breadcrumbNav->assign('breadcrumb', $breadcrumb);
+$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=');
$permissions = OCP\PERMISSION_READ;
if (\OC\Files\Filesystem::isCreatable($dir . '/')) {
@@ -125,8 +125,8 @@ if ($needUpgrade) {
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'keyboardshortcuts');
$tmpl = new OCP\Template('files', 'index', 'user');
- $tmpl->assign('fileList', $list->fetchPage(), false);
- $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
+ $tmpl->assign('fileList', $list->fetchPage());
+ $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage());
$tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($dir));
$tmpl->assign('isCreatable', \OC\Files\Filesystem::isCreatable($dir . '/'));
$tmpl->assign('permissions', $permissions);
diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php
index ad69b5519d9..0ab931a467c 100644
--- a/apps/files/templates/admin.php
+++ b/apps/files/templates/admin.php
@@ -2,27 +2,27 @@
<form name="filesForm" action='#' method='post'>
<fieldset class="personalblock">
- <legend><strong><?php echo $l->t('File handling');?></strong></legend>
+ <legend><strong><?php p($l->t('File handling')); ?></strong></legend>
<?php if($_['uploadChangable']):?>
- <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label>
- <input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>
+ <label for="maxUploadSize"><?php p($l->t( 'Maximum upload size' )); ?> </label>
+ <input name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']) ?>'/>
<?php if($_['displayMaxPossibleUploadSize']):?>
- (<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)
+ (<?php p($l->t('max. possible: ')); p($_['maxPossibleUploadSize']) ?>)
<?php endif;?>
<br/>
<?php endif;?>
<input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1"
- title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"
+ title="<?php p($l->t( 'Needed for multi-file and folder downloads.' )); ?>"
<?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> />
- <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label><br/>
+ <label for="allowZipDownload"><?php p($l->t( 'Enable ZIP-download' )); ?></label><br/>
- <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>'
- title="<?php echo $l->t( '0 is unlimited' ); ?>"
+ <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php p($_['maxZipInputSize']) ?>'
+ title="<?php p($l->t( '0 is unlimited' )); ?>"
<?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> /><br />
- <em><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </em><br />
+ <em><?php p($l->t( 'Maximum input size for ZIP files' )); ?> </em><br />
- <input type="hidden" value="<?php echo $_['requesttoken']; ?>" name="requesttoken" />
+ <input type="hidden" value="<?php p($_['requesttoken']); ?>" name="requesttoken" />
<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
- value="<?php echo $l->t( 'Save' ); ?>"/>
+ value="<?php p($l->t( 'Save' )); ?>"/>
</fieldset>
</form>
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 5053dff95e5..78c0901c110 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -1,63 +1,63 @@
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
<div id="controls">
- <?php echo($_['breadcrumb']); ?>
+ <?php print_unescaped($_['breadcrumb']); ?>
<?php if ($_['isCreatable']):?>
<div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>">
<div id="new" class="button">
- <a><?php echo $l->t('New');?></a>
+ <a><?php p($l->t('New'));?></a>
<ul>
- <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 link');?></p></li>
+ <li style="background-image:url('<?php p(OCP\mimetype_icon('text/plain')) ?>')"
+ data-type='file'><p><?php p($l->t('Text file'));?></p></li>
+ <li style="background-image:url('<?php p(OCP\mimetype_icon('dir')) ?>')"
+ data-type='folder'><p><?php p($l->t('Folder'));?></p></li>
+ <li style="background-image:url('<?php p(OCP\image_path('core', 'actions/public.png')) ?>')"
+ data-type='web'><p><?php p($l->t('From link'));?></p></li>
</ul>
</div>
<div id="upload" class="button"
- title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>">
+ title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
<form data-upload-id='1'
id="data-upload-form"
class="file_upload_form"
- action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>"
+ action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>"
method="post"
enctype="multipart/form-data"
target="file_upload_target_1">
<input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
- value="<?php echo $_['uploadMaxFilesize'] ?>">
+ value="<?php p($_['uploadMaxFilesize']) ?>">
<!-- Send the requesttoken, this is needed for older IE versions
because they don't send the CSRF token via HTTP header in this case -->
- <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
<input type="hidden" class="max_human_file_size"
- value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
- <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
+ value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)">
+ <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
<input type="file" id="file_upload_start" name='files[]'/>
<a href="#" class="svg" onclick="return false;"></a>
</form>
</div>
<?php if ($_['trash'] ): ?>
<div id="trash" class="button">
- <a><?php echo $l->t('Deleted files');?></a>
+ <a><?php p($l->t('Deleted files'));?></a>
</div>
<?php endif; ?>
<div id="uploadprogresswrapper">
<div id="uploadprogressbar"></div>
<input type="button" class="stop" style="display:none"
- value="<?php echo $l->t('Cancel upload');?>"
+ value="<?php p($l->t('Cancel upload'));?>"
onclick="javascript:Files.cancelUploads();"
/>
</div>
</div>
<div id="file_action_panel"></div>
- <?php else: ?>
+ <?php else:?>
<div class="crumb last"><?php p($l->t('You don’t have write permissions here.'))?></div>
- <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
+ <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
<?php endif;?>
- <input type="hidden" name="permissions" value="<?php echo $_['permissions']; ?>" id="permissions">
+ <input type="hidden" name="permissions" value="<?php p($_['permissions']); ?>" id="permissions">
</div>
<?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?>
- <div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
+ <div id="emptyfolder"><?php p($l->t('Nothing in here. Upload something!'))?></div>
<?php endif; ?>
<table>
@@ -65,33 +65,33 @@
<tr>
<th id='headerName'>
<input type="checkbox" id="select_all" />
- <span class='name'><?php echo $l->t( 'Name' ); ?></span>
+ <span class='name'><?php p($l->t( 'Name' )); ?></span>
<span class='selectedActions'>
<?php if($_['allowZipDownload']) : ?>
<a href="" class="download">
<img class="svg" alt="Download"
- src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" />
- <?php echo $l->t('Download')?>
+ src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>" />
+ <?php p($l->t('Download'))?>
</a>
<?php endif; ?>
</span>
</th>
- <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th>
+ <th id="headerSize"><?php p($l->t( 'Size' )); ?></th>
<th id="headerDate">
- <span id="modified"><?php echo $l->t( 'Modified' ); ?></span>
+ <span id="modified"><?php p($l->t( 'Modified' )); ?></span>
<?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?>
<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder -->
<?php if ($_['dir'] == '/Shared'): ?>
<span class="selectedActions"><a href="" class="delete">
- <?php echo $l->t('Unshare')?>
- <img class="svg" alt="<?php echo $l->t('Unshare')?>"
- src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
+ <?php p($l->t('Unshare'))?>
+ <img class="svg" alt="<?php p($l->t('Unshare'))?>"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
</a></span>
<?php else: ?>
<span class="selectedActions"><a href="" class="delete">
- <?php echo $l->t('Delete')?>
- <img class="svg" alt="<?php echo $l->t('Delete')?>"
- src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
+ <?php p($l->t('Delete'))?>
+ <img class="svg" alt="<?php p($l->t('Delete'))?>"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
</a></span>
<?php endif; ?>
<?php endif; ?>
@@ -99,24 +99,24 @@
</tr>
</thead>
<tbody id="fileList">
- <?php echo($_['fileList']); ?>
+ <?php print_unescaped($_['fileList']); ?>
</tbody>
</table>
<div id="editor"></div>
-<div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>">
+<div id="uploadsize-message" title="<?php p($l->t('Upload too large'))?>">
<p>
- <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
+ <?php p($l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.'));?>
</p>
</div>
<div id="scanning-message">
<h3>
- <?php echo $l->t('Files are being scanned, please wait.');?> <span id='scan-count'></span>
+ <?php p($l->t('Files are being scanned, please wait.'));?> <span id='scan-count'></span>
</h3>
<p>
- <?php echo $l->t('Current scanning');?> <span id='scan-current'></span>
+ <?php p($l->t('Current scanning'));?> <span id='scan-current'></span>
</p>
</div>
<!-- config hints for javascript -->
-<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />
-<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php echo $_['usedSpacePercent']; ?>" />
+<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" />
+<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" />
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php
index f01cb8d212a..7ea1755d1d7 100644
--- a/apps/files/templates/part.breadcrumb.php
+++ b/apps/files/templates/part.breadcrumb.php
@@ -1,7 +1,7 @@
<?php if(count($_["breadcrumb"])):?>
<div class="crumb">
- <a href="<?php echo $_['baseURL']; ?>">
- <img src="<?php echo OCP\image_path('core', 'places/home.svg');?>" class="svg" />
+ <a href="<?php print_unescaped($_['baseURL']); ?>">
+ <img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
</a>
</div>
<?php endif;?>
@@ -9,8 +9,8 @@
$crumb = $_["breadcrumb"][$i];
$dir = str_replace('+', '%20', urlencode($crumb["dir"]));
$dir = str_replace('%2F', '/', $dir); ?>
- <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg"
- data-dir='<?php echo $dir;?>'>
- <a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
+ <div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
+ data-dir='<?php p($dir);?>'>
+ <a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
</div>
<?php endfor;
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index eefebd6649b..50330cc4911 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -1,4 +1,4 @@
-<input type="hidden" id="disableSharing" data-status="<?php echo $_['disableSharing']; ?>">
+<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>">
<?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']);
@@ -13,31 +13,30 @@
$name = str_replace('%2F', '/', $name);
$directory = str_replace('+', '%20', urlencode($file['directory']));
$directory = str_replace('%2F', '/', $directory); ?>
- <tr data-id="<?php echo $file['fileid']; ?>"
- 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-permissions='<?php echo $file['permissions']; ?>'>
+ <tr data-id="<?php p($file['fileid']); ?>"
+ data-file="<?php p($name);?>"
+ data-type="<?php p($file['type'] == 'dir')?'dir':'file'?>"
+ data-mime="<?php p($file['mimetype'])?>"
+ data-size='<?php p($file['size']);?>'
+ data-permissions='<?php p($file['permissions']); ?>'>
<td class="filename svg"
<?php if($file['type'] == 'dir'): ?>
- style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
+ style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)"
<?php else: ?>
- style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
+ style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)"
<?php endif; ?>
>
<?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
<?php if($file['type'] == 'dir'): ?>
- <a class="name" href="<?php echo rtrim($_['baseURL'],'/').'/'.trim($directory,'/').'/'.$name; ?>" title="">
+ <a class="name" href="<?php p(rtrim($_['baseURL'],'/').'/'.trim($directory,'/').'/'.$name); ?>" title="">
<?php else: ?>
- <a class="name" href="<?php echo rtrim($_['downloadURL'],'/').'/'.trim($directory,'/').'/'.$name; ?>" title="">
+ <a class="name" href="<?php p(rtrim($_['downloadURL'],'/').'/'.trim($directory,'/').'/'.$name); ?>" title="">
<?php endif; ?>
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
- <?php echo htmlspecialchars($file['name']);?>
+ <?php print_unescaped(htmlspecialchars($file['name']));?>
<?php else:?>
- <?php echo htmlspecialchars($file['basename']);?><span
- class='extension'><?php echo $file['extension'];?></span>
+ <?php print_unescaped(htmlspecialchars($file['basename']));?><span class='extension'><?php p($file['extension']);?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
@@ -47,17 +46,17 @@
</a>
</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; ?>
+ title="<?php p(OCP\human_file_size($file['size'])); ?>"
+ style="color:rgb(<?php p($simple_size_color.','.$simple_size_color.','.$simple_size_color) ?>)">
+ <?php print_unescaped($simple_file_size); ?>
</td>
<td class="date">
<span class="modified"
- title="<?php echo $file['date']; ?>"
- style="color:rgb(<?php echo $relative_date_color.','
+ title="<?php p($file['date']); ?>"
+ style="color:rgb(<?php p($relative_date_color.','
.$relative_date_color.','
- .$relative_date_color ?>)">
- <?php echo $relative_modified_date; ?>
+ .$relative_date_color) ?>)">
+ <?php p($relative_modified_date); ?>
</span>
</td>
</tr>
diff --git a/apps/files/templates/upgrade.php b/apps/files/templates/upgrade.php
index de6cc713028..e03f086e47d 100644
--- a/apps/files/templates/upgrade.php
+++ b/apps/files/templates/upgrade.php
@@ -1,4 +1,4 @@
<div id="upgrade">
- <?php echo $l->t('Upgrading filesystem cache...');?>
+ <?php p($l->t('Upgrading filesystem cache...'));?>
<div id="progressbar" />
</div>
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php
index 8c3bf491d84..5f0accaed5f 100644
--- a/apps/files_encryption/templates/settings-personal.php
+++ b/apps/files_encryption/templates/settings-personal.php
@@ -1,19 +1,19 @@
<form id="encryption">
<fieldset class="personalblock">
<legend>
- <?php echo $l->t( 'Encryption' ); ?>
+ <?php p($l->t( 'Encryption' )); ?>
</legend>
<p>
- <?php echo $l->t( 'File encryption is enabled.' ); ?>
+ <?php p($l->t( 'File encryption is enabled.' )); ?>
</p>
<?php if ( ! empty( $_["blacklist"] ) ): ?>
<p>
- <?php echo $l->t( 'The following file types will not be encrypted:' ); ?>
+ <?php p($l->t( 'The following file types will not be encrypted:' )); ?>
</p>
<ul>
<?php foreach( $_["blacklist"] as $type ): ?>
<li>
- <?php echo $type; ?>
+ <?php p($type); ?>
</li>
<?php endforeach; ?>
</ul>
diff --git a/apps/files_encryption/templates/settings.php b/apps/files_encryption/templates/settings.php
index f7ef8a8efe6..b873d7f5aaf 100644
--- a/apps/files_encryption/templates/settings.php
+++ b/apps/files_encryption/templates/settings.php
@@ -2,17 +2,17 @@
<fieldset class="personalblock">
<p>
- <strong><?php echo $l->t( 'Encryption' ); ?></strong>
+ <strong><?php p($l->t( 'Encryption' )); ?></strong>
- <?php echo $l->t( "Exclude the following file types from encryption:" ); ?>
+ <?php p($l->t( "Exclude the following file types from encryption:" )); ?>
<br />
<select
id='encryption_blacklist'
- title="<?php echo $l->t( 'None' )?>"
+ title="<?php p($l->t( 'None' ))?>"
multiple="multiple">
<?php foreach($_["blacklist"] as $type): ?>
- <option selected="selected" value="<?php echo $type; ?>"> <?php echo $type; ?> </option>
+ <option selected="selected" value="<?php p($type); ?>"> <?php p($type); ?> </option>
<?php endforeach;?>
</select>
</p>
diff --git a/apps/files_external/personal.php b/apps/files_external/personal.php
index 268d1880232..90f5e159535 100755
--- a/apps/files_external/personal.php
+++ b/apps/files_external/personal.php
@@ -26,9 +26,9 @@ $backends = OC_Mount_Config::getBackends();
// Remove local storage
unset($backends['\OC\Files\Storage\Local']);
$tmpl = new OCP\Template('files_external', 'settings');
-$tmpl->assign('isAdminPage', false, false);
+$tmpl->assign('isAdminPage', false);
$tmpl->assign('mounts', OC_Mount_Config::getPersonalMountPoints());
$tmpl->assign('certs', OC_Mount_Config::getCertificates());
-$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies(), false);
+$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies());
$tmpl->assign('backends', $backends);
return $tmpl->fetchPage();
diff --git a/apps/files_external/settings.php b/apps/files_external/settings.php
index cd0bfa99585..1a39affe2e6 100644
--- a/apps/files_external/settings.php
+++ b/apps/files_external/settings.php
@@ -27,11 +27,11 @@ OCP\Util::addscript('3rdparty', 'chosen/chosen.jquery.min');
OCP\Util::addStyle('files_external', 'settings');
OCP\Util::addStyle('3rdparty', 'chosen/chosen');
$tmpl = new OCP\Template('files_external', 'settings');
-$tmpl->assign('isAdminPage', true, false);
+$tmpl->assign('isAdminPage', true);
$tmpl->assign('mounts', OC_Mount_Config::getSystemMountPoints());
$tmpl->assign('backends', OC_Mount_Config::getBackends());
$tmpl->assign('groups', OC_Group::getGroups());
$tmpl->assign('users', OCP\User::getUsers());
-$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies(), false);
+$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies());
$tmpl->assign('allowUserMounting', OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes'));
return $tmpl->fetchPage();
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 76d691eedb2..76d3db1404f 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -1,44 +1,44 @@
<form id="files_external">
<fieldset class="personalblock">
- <legend><strong><?php echo $l->t('External Storage'); ?></strong></legend>
- <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) echo ''.$_['dependencies'].''; ?>
- <table id="externalStorage" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
+ <legend><strong><?php p($l->t('External Storage')); ?></strong></legend>
+ <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?>
+ <table id="externalStorage" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'>
<thead>
<tr>
<th></th>
- <th><?php echo $l->t('Folder name'); ?></th>
- <th><?php echo $l->t('External storage'); ?></th>
- <th><?php echo $l->t('Configuration'); ?></th>
- <!--<th><?php echo $l->t('Options'); ?></th> -->
- <?php if ($_['isAdminPage']) echo '<th>'.$l->t('Applicable').'</th>'; ?>
+ <th><?php p($l->t('Folder name')); ?></th>
+ <th><?php p($l->t('External storage')); ?></th>
+ <th><?php p($l->t('Configuration')); ?></th>
+ <!--<th><?php p($l->t('Options')); ?></th> -->
+ <?php if ($_['isAdminPage']) print_unescaped('<th>'.OC_Util::sanitizeHTML($l->t('Applicable')).'</th>'); ?>
<th>&nbsp;</th>
</tr>
</thead>
<tbody width="100%">
<?php $_['mounts'] = array_merge($_['mounts'], array('' => array())); ?>
<?php foreach ($_['mounts'] as $mountPoint => $mount): ?>
- <tr <?php echo ($mountPoint != '') ? 'class="'.$mount['class'].'"' : 'id="addMountPoint"'; ?>>
+ <tr <?php print_unescaped(($mountPoint != '') ? 'class="'.OC_Util::sanitizeHTML($mount['class']).'"' : 'id="addMountPoint"'); ?>>
<td class="status">
<?php if (isset($mount['status'])): ?>
- <span class="<?php echo ($mount['status']) ? 'success' : 'error'; ?>"></span>
+ <span class="<?php p(($mount['status']) ? 'success' : 'error'); ?>"></span>
<?php endif; ?>
</td>
<td class="mountPoint"><input type="text" name="mountPoint"
value="<?php p($mountPoint); ?>"
- placeholder="<?php echo $l->t('Folder name'); ?>" /></td>
+ placeholder="<?php p($l->t('Folder name')); ?>" /></td>
<?php if ($mountPoint == ''): ?>
<td class="backend">
- <select id="selectBackend" data-configurations='<?php echo json_encode($_['backends']); ?>'>
+ <select id="selectBackend" data-configurations='<?php print_unescaped(json_encode($_['backends'])); ?>'>
<option value="" disabled selected
- style="display:none;"><?php echo $l->t('Add storage'); ?></option>
+ style="display:none;"><?php p($l->t('Add storage')); ?></option>
<?php foreach ($_['backends'] as $class => $backend): ?>
- <option value="<?php echo $class; ?>"><?php echo $backend['backend']; ?></option>
+ <option value="<?php p($class); ?>"><?php p($backend['backend']); ?></option>
<?php endforeach; ?>
</select>
</td>
<?php else: ?>
<td class="backend"
- data-class="<?php echo $mount['class']; ?>"><?php echo $mount['backend']; ?></td>
+ data-class="<?php p($mount['class']); ?>"><?php p($mount['backend']); ?></td>
<?php endif; ?>
<td class ="configuration" width="100%">
<?php if (isset($mount['configuration'])): ?>
@@ -47,29 +47,29 @@
<?php $placeholder = $_['backends'][$mount['class']]['configuration'][$parameter]; ?>
<?php if (strpos($placeholder, '*') !== false): ?>
<input type="password"
- data-parameter="<?php echo $parameter; ?>"
- value="<?php echo $value; ?>"
- placeholder="<?php echo substr($placeholder, 1); ?>" />
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>"
+ placeholder="<?php p(substr($placeholder, 1)); ?>" />
<?php elseif (strpos($placeholder, '!') !== false): ?>
<label><input type="checkbox"
- data-parameter="<?php echo $parameter; ?>"
+ data-parameter="<?php p($parameter); ?>"
<?php if ($value == 'true'): ?> checked="checked"<?php endif; ?>
- /><?php echo substr($placeholder, 1); ?></label>
+ /><?php p(substr($placeholder, 1)); ?></label>
<?php elseif (strpos($placeholder, '&') !== false): ?>
<input type="text"
class="optional"
- data-parameter="<?php echo $parameter; ?>"
- value="<?php echo $value; ?>"
- placeholder="<?php echo substr($placeholder, 5); ?>" />
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>"
+ placeholder="<?php p(substr($placeholder, 5)); ?>" />
<?php elseif (strpos($placeholder, '#') !== false): ?>
<input type="hidden"
- data-parameter="<?php echo $parameter; ?>"
- value="<?php echo $value; ?>" />
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>" />
<?php else: ?>
<input type="text"
- data-parameter="<?php echo $parameter; ?>"
- value="<?php echo $value; ?>"
- placeholder="<?php echo $placeholder; ?>" />
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>"
+ placeholder="<?php p($placeholder); ?>" />
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
@@ -82,27 +82,27 @@
<td class="applicable"
align="right"
data-applicable-groups='<?php if (isset($mount['applicable']['groups']))
- echo json_encode($mount['applicable']['groups']); ?>'
+ print_unescaped(json_encode($mount['applicable']['groups'])); ?>'
data-applicable-users='<?php if (isset($mount['applicable']['users']))
- echo json_encode($mount['applicable']['users']); ?>'>
+ print_unescaped(json_encode($mount['applicable']['users'])); ?>'>
<select class="chzn-select"
multiple style="width:20em;"
- data-placeholder="<?php echo $l->t('None set'); ?>">
- <option value="all" <?php if (isset($mount['applicable']['users']) && in_array('all', $mount['applicable']['users'])) echo 'selected="selected"';?> ><?php echo $l->t('All Users'); ?></option>
- <optgroup label="<?php echo $l->t('Groups'); ?>">
+ data-placeholder="<?php p($l->t('None set')); ?>">
+ <option value="all" <?php if (isset($mount['applicable']['users']) && in_array('all', $mount['applicable']['users'])) print_unescaped('selected="selected"');?> ><?php p($l->t('All Users')); ?></option>
+ <optgroup label="<?php p($l->t('Groups')); ?>">
<?php foreach ($_['groups'] as $group): ?>
- <option value="<?php echo $group; ?>(group)"
+ <option value="<?php p($group); ?>(group)"
<?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])): ?>
selected="selected"
- <?php endif; ?>><?php echo $group; ?></option>
+ <?php endif; ?>><?php p($group); ?></option>
<?php endforeach; ?>
</optgroup>
- <optgroup label="<?php echo $l->t('Users'); ?>">
+ <optgroup label="<?php p($l->t('Users')); ?>">
<?php foreach ($_['users'] as $user): ?>
- <option value="<?php echo $user; ?>"
+ <option value="<?php p($user); ?>"
<?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])): ?>
selected="selected"
- <?php endif; ?>><?php echo $user; ?></option>
+ <?php endif; ?>><?php p($user); ?></option>
<?php endforeach; ?>
</optgroup>
</select>
@@ -110,10 +110,10 @@
<?php endif; ?>
<td <?php if ($mountPoint != ''): ?>class="remove"
<?php else: ?>style="visibility:hidden;"
- <?php endif ?>><img alt="<?php echo $l->t('Delete'); ?>"
- title="<?php echo $l->t('Delete'); ?>"
+ <?php endif ?>><img alt="<?php p($l->t('Delete')); ?>"
+ title="<?php p($l->t('Delete')); ?>"
class="svg action"
- src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td>
+ src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>" /></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -125,9 +125,9 @@
<input type="checkbox"
name="allowUserMounting"
id="allowUserMounting"
- value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> />
- <label for="allowUserMounting"><?php echo $l->t('Enable User External Storage'); ?></label><br/>
- <em><?php echo $l->t('Allow users to mount their own external storage'); ?></em>
+ value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> />
+ <label for="allowUserMounting"><?php p($l->t('Enable User External Storage')); ?></label><br/>
+ <em><?php p($l->t('Allow users to mount their own external storage')); ?></em>
<?php endif; ?>
</fieldset>
</form>
@@ -136,27 +136,27 @@
<form id="files_external"
method="post"
enctype="multipart/form-data"
- action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>">
+ action="<?php p(OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php')); ?>">
<fieldset class="personalblock">
- <legend><strong><?php echo $l->t('SSL root certificates');?></strong></legend>
- <table id="sslCertificate" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
+ <legend><strong><?php p($l->t('SSL root certificates'));?></strong></legend>
+ <table id="sslCertificate" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'>
<tbody width="100%">
<?php foreach ($_['certs'] as $rootCert): ?>
- <tr id="<?php echo $rootCert ?>">
- <td class="rootCert"><?php echo $rootCert ?></td>
+ <tr id="<?php p($rootCert) ?>">
+ <td class="rootCert"><?php p($rootCert) ?></td>
<td <?php if ($rootCert != ''): ?>class="remove"
<?php else: ?>style="visibility:hidden;"
- <?php endif; ?>><img alt="<?php echo $l->t('Delete'); ?>"
- title="<?php echo $l->t('Delete'); ?>"
+ <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
+ title="<?php p($l->t('Delete')); ?>"
class="svg action"
- src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td>
+ src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>" /></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
- <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken']; ?>">
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
<input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">
- <input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" />
+ <input type="submit" name="cert_import" value="<?php p($l->t('Import Root Certificate')); ?>" />
</fieldset>
</form>
<?php endif; ?>
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>
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 31b46cc2dec..8e726836f8a 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -96,19 +96,18 @@ foreach (explode('/', $dir) as $i) {
}
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
-$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
-$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir=', false);
+$breadcrumbNav->assign('breadcrumb', $breadcrumb);
+$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir=');
$list = new OCP\Template('files_trashbin', 'part.list', '');
-$list->assign('files', $files, false);
-$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$dir, false);
-$list->assign('downloadURL', OCP\Util::linkTo('files_trashbin', 'download.php') . '?file='.$dir, false);
+$list->assign('files', $files);
+$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$dir);
+$list->assign('downloadURL', OCP\Util::linkTo('files_trashbin', 'download.php') . '?file='.$dir);
$list->assign('disableSharing', true);
$list->assign('dirlisting', $dirlisting);
$list->assign('disableDownloadActions', true);
-$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
-$tmpl->assign('dirlisting', $dirlisting);
-$tmpl->assign('fileList', $list->fetchPage(), false);
+$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage());
+$tmpl->assign('fileList', $list->fetchPage());
$tmpl->assign('files', $files);
$tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($view->getAbsolutePath()));
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index aaeeb5c6f6e..4c865d8981c 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -1,12 +1,12 @@
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
<div id="controls">
- <?php echo($_['breadcrumb']); ?>
+ <?php print_unescaped($_['breadcrumb']); ?>
<div id="file_action_panel"></div>
</div>
<div id='notification'></div>
<?php if (isset($_['files']) && count($_['files'])==0 && $_['dirlisting'] == false):?>
- <div id="emptyfolder"><?php echo $l->t('Nothing in here. Your trash bin is empty!')?></div>
+ <div id="emptyfolder"><?php p($l->t('Nothing in here. Your trash bin is empty!'))?></div>
<?php endif; ?>
<table>
@@ -14,28 +14,28 @@
<tr>
<th id='headerName'>
<input type="checkbox" id="select_all" />
- <span class='name'><?php echo $l->t( 'Name' ); ?></span>
+ <span class='name'><?php p($l->t( 'Name' )); ?></span>
<span class='selectedActions'>
<a href="" class="undelete">
- <img class="svg" alt="<?php echo $l->t( 'Restore' ); ?>"
- src="<?php echo OCP\image_path("core", "actions/undelete.png"); ?>" />
- <?php echo $l->t('Restore')?>
+ <img class="svg" alt="<?php p($l->t( 'Restore' )); ?>"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/undelete.png")); ?>" />
+ <?php p($l->t('Restore'))?>
</a>
</span>
</th>
<th id="headerDate">
- <span id="modified"><?php echo $l->t( 'Deleted' ); ?></span>
+ <span id="modified"><?php p($l->t( 'Deleted' )); ?></span>
<span class="selectedActions">
<a href="" class="delete">
- <?php echo $l->t('Delete')?>
- <img class="svg" alt="<?php echo $l->t('Delete')?>"
- src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
+ <?php p($l->t('Delete'))?>
+ <img class="svg" alt="<?php p($l->t('Delete'))?>"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
</a>
</span>
</th>
</tr>
</thead>
<tbody id="fileList">
- <?php echo($_['fileList']); ?>
+ <?php print_unescaped($_['fileList']); ?>
</tbody>
</table>
diff --git a/apps/files_trashbin/templates/part.list.php b/apps/files_trashbin/templates/part.list.php
index dea0a43cd4c..176ed6f03b3 100644
--- a/apps/files_trashbin/templates/part.list.php
+++ b/apps/files_trashbin/templates/part.list.php
@@ -1,4 +1,4 @@
-<input type="hidden" id="disableSharing" data-status="<?php echo $_['disableSharing']; ?>">
+<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>">
<?php foreach($_['files'] as $file):
$relative_deleted_date = OCP\relative_modified_date($file['timestamp']);
// the older the file, the brighter the shade of grey; days*14
@@ -8,48 +8,48 @@
$name = str_replace('%2F', '/', $name);
$directory = str_replace('+', '%20', urlencode($file['directory']));
$directory = str_replace('%2F', '/', $directory); ?>
- <tr data-filename="<?php echo $file['name'];?>"
- data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>"
- data-mime="<?php echo $file['mimetype']?>"
- data-permissions='<?php echo $file['permissions']; ?>'
+ <tr data-filename="<?php p($file['name']);?>"
+ data-type="<?php p(($file['type'] == 'dir')?'dir':'file')?>"
+ data-mime="<?php p($file['mimetype'])?>"
+ data-permissions='<?php p($file['permissions']); ?>'
<?php if ( $_['dirlisting'] ): ?>
- id="<?php echo $file['directory'].'/'.$file['name'];?>"
- data-file="<?php echo $file['directory'].'/'.$file['name'];?>"
+ id="<?php p($file['directory'].'/'.$file['name']);?>"
+ data-file="<?php p($file['directory'].'/'.$file['name']);?>"
data-timestamp=''
data-dirlisting=1
<?php else: ?>
- id="<?php echo $file['name'].'.d'.$file['timestamp'];?>"
- data-file="<?php echo $file['name'].'.d'.$file['timestamp'];?>"
- data-timestamp='<?php echo $file['timestamp'];?>'
+ id="<?php p($file['name'].'.d'.$file['timestamp']);?>"
+ data-file="<?php p($file['name'].'.d'.$file['timestamp']);?>"
+ data-timestamp='<?php p($file['timestamp']);?>'
data-dirlisting=0
<?php endif; ?>>
<td class="filename svg"
<?php if($file['type'] == 'dir'): ?>
- style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
+ style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)"
<?php else: ?>
- style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
+ style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)"
<?php endif; ?>
>
<?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
<?php if($file['type'] == 'dir'): ?>
<?php if( $_['dirlisting'] ): ?>
- <a class="name" href="<?php echo $_['baseURL'].'/'.$name; ?>" title="">
+ <a class="name" href="<?php p($_['baseURL'].'/'.$name); ?>" title="">
<?php else: ?>
- <a class="name" href="<?php echo $_['baseURL'].'/'.$name.'.d'.$file['timestamp']; ?>" title="">
+ <a class="name" href="<?php p($_['baseURL'].'/'.$name.'.d'.$file['timestamp']); ?>" title="">
<?php endif; ?>
<?php else: ?>
<?php if( $_['dirlisting'] ): ?>
- <a class="name" href="<?php echo $_['downloadURL'].'/'.$name; ?>" title="">
+ <a class="name" href="<?php p($_['downloadURL'].'/'.$name); ?>" title="">
<?php else: ?>
- <a class="name" href="<?php echo $_['downloadURL'].'/'.$name.'.d'.$file['timestamp'];?>" title="">
+ <a class="name" href="<?php p($_['downloadURL'].'/'.$name.'.d'.$file['timestamp']);?>" title="">
<?php endif; ?>
<?php endif; ?>
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
- <?php echo htmlspecialchars($file['name']);?>
+ <?php print_unescaped(htmlspecialchars($file['name']));?>
<?php else:?>
- <?php echo htmlspecialchars($file['basename']);?><span
- class='extension'><?php echo $file['extension'];?></span>
+ <?php print_unescaped(htmlspecialchars($file['basename']));?><span
+ class='extension'><?php p($file['extension']);?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
@@ -60,11 +60,11 @@
</td>
<td class="date">
<span class="modified"
- title="<?php echo $file['date']; ?>"
- style="color:rgb(<?php echo $relative_date_color.','
+ title="<?php p($file['date']); ?>"
+ style="color:rgb(<?php p($relative_date_color.','
.$relative_date_color.','
- .$relative_date_color ?>)">
- <?php echo $relative_deleted_date; ?>
+ .$relative_date_color) ?>)">
+ <?php p($relative_deleted_date); ?>
</span>
</td>
</tr>
diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php
index c450af66ad5..f7284439041 100644
--- a/apps/files_versions/templates/history.php
+++ b/apps/files_versions/templates/history.php
@@ -5,29 +5,29 @@
if( isset( $_['message'] ) ) {
- if( isset($_['path'] ) ) echo('<strong>File: '.$_['path'] ).'</strong><br>';
- echo('<strong>'.$_['message'] ).'</strong><br>';
+ if( isset($_['path'] ) ) print_unescaped('<strong>File: '.OC_Util::sanitizeHTML($_['path'])).'</strong><br>';
+ print_unescaped('<strong>'.OC_Util::sanitizeHTML($_['message']) ).'</strong><br>';
}else{
if( isset( $_['outcome_stat'] ) ) {
- echo( '<div id="feedback-messages" class="'.$_['outcome_stat'].'"><h3>'.$_['outcome_msg'] ).'</h3></div><br>';
+ print_unescaped( '<div id="feedback-messages" class="'.OC_Util::sanitizeHTML($_['outcome_stat']).'"><h3>'.OC_Util::sanitizeHTML($_['outcome_msg']) ).'</h3></div><br>';
}
- echo( '<strong>Versions of '.$_['path'] ).'</strong><br>';
- echo('<p><em>'.$l->t('Revert a file to a previous version by clicking on its revert button').'</em></p><br />');
+ print_unescaped( '<strong>Versions of '.OC_Util::sanitizeHTML($_['path']) ).'</strong><br>';
+ print_unescaped('<p><em>'.OC_Util::sanitizeHTML($l->t('Revert a file to a previous version by clicking on its revert button')).'</em></p><br />');
foreach ( $_['versions'] as $v ) {
- echo ' ';
- echo OCP\Util::formatDate( doubleval($v['version']) );
- echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php',
- array('path' => $_['path'], 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />';
+ p(' ');
+ p(OCP\Util::formatDate( doubleval($v['version'])));
+ print_unescaped(' <a href="'.OCP\Util::linkTo('files_versions', 'history.php',
+ array('path' => $_['path'], 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />');
if ( $v['cur'] ) {
- echo ' (<b>Current</b>)';
+ print_unescaped(' (<b>Current</b>)');
}
- echo '<br /><br />';
+ print_unescaped('<br /><br />');
}
}
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index d5d2f648b38..c55a718a82a 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -52,7 +52,7 @@ foreach($prefixes as $prefix) {
if(count($prefixes) == 0) {
$scoHtml .= '<option value="" selected>1. Server</option>';
}
-$tmpl->assign('serverConfigurationOptions', $scoHtml, false);
+$tmpl->assign('serverConfigurationOptions', $scoHtml);
// assign default values
if(!isset($ldap)) {
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index a882e5b7548..cd004cec4b3 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -5,85 +5,85 @@
<li><a href="#ldapSettings-2">Advanced</a></li>
</ul>
<?php if(OCP\App::isEnabled('user_webdavauth')) {
- echo '<p class="ldapwarning">'.$l->t('<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them.').'</p>';
+ print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them.').'</p>');
}
if(!function_exists('ldap_connect')) {
- echo '<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>';
+ print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>');
}
?>
<fieldset id="ldapSettings-1">
- <p><label for="ldap_serverconfig_chooser"><?php echo $l->t('Server configuration');?></label>
+ <p><label for="ldap_serverconfig_chooser"><?php p($l->t('Server configuration'));?></label>
<select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
- <?php echo $_['serverConfigurationOptions']; ?>
- <option value="NEW"><?php echo $l->t('Add Server Configuration');?></option>
+ <?php p($_['serverConfigurationOptions']); ?>
+ <option value="NEW"><?php p($l->t('Add Server Configuration'));?></option>
</select>
<button id="ldap_action_delete_configuration"
name="ldap_action_delete_configuration">Delete Configuration</button>
</p>
- <p><label for="ldap_host"><?php echo $l->t('Host');?></label>
- <input type="text" id="ldap_host" name="ldap_host" data-default="<?php echo $_['ldap_host_default']; ?>"
- title="<?php echo $l->t('You can omit the protocol, except you require SSL. Then start with ldaps://');?>"></p>
- <p><label for="ldap_base"><?php echo $l->t('Base DN');?></label>
- <textarea id="ldap_base" name="ldap_base" placeholder="<?php echo $l->t('One Base DN per line');?>"
- title="<?php echo $l->t('You can specify Base DN for users and groups in the Advanced tab');?>"
- data-default="<?php echo $_['ldap_base_default']; ?>" ></textarea></p>
- <p><label for="ldap_dn"><?php echo $l->t('User DN');?></label>
- <input type="text" id="ldap_dn" name="ldap_dn" data-default="<?php echo $_['ldap_dn_default']; ?>"
- title="<?php echo $l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.');?>" /></p>
- <p><label for="ldap_agent_password"><?php echo $l->t('Password');?></label>
+ <p><label for="ldap_host"><?php p($l->t('Host'));?></label>
+ <input type="text" id="ldap_host" name="ldap_host" data-default="<?php p($_['ldap_host_default']); ?>"
+ title="<?php p($l->t('You can omit the protocol, except you require SSL. Then start with ldaps://'));?>"></p>
+ <p><label for="ldap_base"><?php p($l->t('Base DN'));?></label>
+ <textarea id="ldap_base" name="ldap_base" placeholder="<?php p($l->t('One Base DN per line'));?>"
+ title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>"
+ data-default="<?php p($_['ldap_base_default']); ?>" ></textarea></p>
+ <p><label for="ldap_dn"><?php p($l->t('User DN'));?></label>
+ <input type="text" id="ldap_dn" name="ldap_dn" data-default="<?php p($_['ldap_dn_default']); ?>"
+ title="<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>" /></p>
+ <p><label for="ldap_agent_password"><?php p($l->t('Password'));?></label>
<input type="password" id="ldap_agent_password" name="ldap_agent_password"
- data-default="<?php echo $_['ldap_agent_password_default']; ?>"
- title="<?php echo $l->t('For anonymous access, leave DN and Password empty.');?>" /></p>
- <p><label for="ldap_login_filter"><?php echo $l->t('User Login Filter');?></label>
+ data-default="<?php p($_['ldap_agent_password_default']); ?>"
+ title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>" /></p>
+ <p><label for="ldap_login_filter"><?php p($l->t('User Login Filter'));?></label>
<input type="text" id="ldap_login_filter" name="ldap_login_filter"
- data-default="<?php echo $_['ldap_login_filter_default']; ?>"
- title="<?php echo $l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action.');?>" />
- <br /><small><?php echo $l->t('use %%uid placeholder, e.g. "uid=%%uid"');?></small></p>
- <p><label for="ldap_userlist_filter"><?php echo $l->t('User List Filter');?></label>
+ data-default="<?php p($_['ldap_login_filter_default']); ?>"
+ title="<?php p($l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action.'));?>" />
+ <br /><small><?php p($l->t('use %%uid placeholder, e.g. "uid=%%uid"'));?></small></p>
+ <p><label for="ldap_userlist_filter"><?php p($l->t('User List Filter'));?></label>
<input type="text" id="ldap_userlist_filter" name="ldap_userlist_filter"
- data-default="<?php echo $_['ldap_userlist_filter_default']; ?>"
- title="<?php echo $l->t('Defines the filter to apply, when retrieving users.');?>" />
- <br /><small><?php echo $l->t('without any placeholder, e.g. "objectClass=person".');?></small></p>
- <p><label for="ldap_group_filter"><?php echo $l->t('Group Filter');?></label>
+ data-default="<?php p($_['ldap_userlist_filter_default']); ?>"
+ title="<?php p($l->t('Defines the filter to apply, when retrieving users.'));?>" />
+ <br /><small><?php p($l->t('without any placeholder, e.g. "objectClass=person".'));?></small></p>
+ <p><label for="ldap_group_filter"><?php p($l->t('Group Filter'));?></label>
<input type="text" id="ldap_group_filter" name="ldap_group_filter"
- data-default="<?php echo $_['ldap_group_filter_default']; ?>"
- title="<?php echo $l->t('Defines the filter to apply, when retrieving groups.');?>" />
- <br /><small><?php echo $l->t('without any placeholder, e.g. "objectClass=posixGroup".');?></small></p>
+ data-default="<?php p($_['ldap_group_filter_default']); ?>"
+ title="<?php p($l->t('Defines the filter to apply, when retrieving groups.'));?>" />
+ <br /><small><?php p($l->t('without any placeholder, e.g. "objectClass=posixGroup".'));?></small></p>
</fieldset>
<fieldset id="ldapSettings-2">
<div id="ldapAdvancedAccordion">
- <h3><?php echo $l->t('Connection Settings');?></h3>
+ <h3><?php p($l->t('Connection Settings'));?></h3>
<div>
- <p><label for="ldap_configuration_active"><?php echo $l->t('Configuration Active');?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php echo $_['ldap_configuration_active_default']; ?>" title="<?php echo $l->t('When unchecked, this configuration will be skipped.');?>" /></p>
- <p><label for="ldap_port"><?php echo $l->t('Port');?></label><input type="number" id="ldap_port" name="ldap_port" data-default="<?php echo $_['ldap_port_default']; ?>" /></p>
- <p><label for="ldap_backup_host"><?php echo $l->t('Backup (Replica) Host');?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php echo $_['ldap_backup_host_default']; ?>" title="<?php echo $l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.');?>"></p>
- <p><label for="ldap_backup_port"><?php echo $l->t('Backup (Replica) Port');?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php echo $_['ldap_backup_port_default']; ?>" /></p>
- <p><label for="ldap_override_main_server"><?php echo $l->t('Disable Main Server');?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php echo $_['ldap_override_main_server_default']; ?>" title="<?php echo $l->t('When switched on, ownCloud will only connect to the replica server.');?>" /></p>
- <p><label for="ldap_tls"><?php echo $l->t('Use TLS');?></label><input type="checkbox" id="ldap_tls" name="ldap_tls" value="1" data-default="<?php echo $_['ldap_tls_default']; ?>" title="<?php echo $l->t('Do not use it additionally for LDAPS connections, it will fail.');?>" /></p>
- <p><label for="ldap_nocase"><?php echo $l->t('Case insensitve LDAP server (Windows)');?></label><input type="checkbox" id="ldap_nocase" name="ldap_nocase" data-default="<?php echo $_['ldap_nocase_default']; ?>" value="1"<?php if (isset($_['ldap_nocase']) && ($_['ldap_nocase'])) echo ' checked'; ?>></p>
- <p><label for="ldap_turn_off_cert_check"><?php echo $l->t('Turn off SSL certificate validation.');?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php echo $l->t('If connection only works with this option, import the LDAP server\'s SSL certificate in your ownCloud server.');?>" data-default="<?php echo $_['ldap_turn_off_cert_check_default']; ?>" value="1"><br/><small><?php echo $l->t('Not recommended, use for testing only.');?></small></p>
- <p><label for="ldap_cache_ttl">Cache Time-To-Live</label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php echo $l->t('in seconds. A change empties the cache.');?>" data-default="<?php echo $_['ldap_cache_ttl_default']; ?>" /></p>
+ <p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active'));?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>" title="<?php p($l->t('When unchecked, this configuration will be skipped.'));?>" /></p>
+ <p><label for="ldap_port"><?php p($l->t('Port'));?></label><input type="number" id="ldap_port" name="ldap_port" data-default="<?php p($_['ldap_port_default']); ?>" /></p>
+ <p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
+ <p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
+ <p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('When switched on, ownCloud will only connect to the replica server.'));?>" /></p>
+ <p><label for="ldap_tls"><?php p($l->t('Use TLS'));?></label><input type="checkbox" id="ldap_tls" name="ldap_tls" value="1" data-default="<?php p($_['ldap_tls_default']); ?>" title="<?php p($l->t('Do not use it additionally for LDAPS connections, it will fail.'));?>" /></p>
+ <p><label for="ldap_nocase"><?php p($l->t('Case insensitve LDAP server (Windows)'));?></label><input type="checkbox" id="ldap_nocase" name="ldap_nocase" data-default="<?php p($_['ldap_nocase_default']); ?>" value="1"<?php if (isset($_['ldap_nocase']) && ($_['ldap_nocase'])) p(' checked'); ?>></p>
+ <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('If connection only works with this option, import the LDAP server\'s SSL certificate in your ownCloud server.'));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/><small><?php p($l->t('Not recommended, use for testing only.'));?></small></p>
+ <p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
</div>
- <h3><?php echo $l->t('Directory Settings');?></h3>
+ <h3><?php p($l->t('Directory Settings'));?></h3>
<div>
- <p><label for="ldap_display_name"><?php echo $l->t('User Display Name Field');?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php echo $_['ldap_display_name_default']; ?>" title="<?php echo $l->t('The LDAP attribute to use to generate the user`s ownCloud name.');?>" /></p>
- <p><label for="ldap_base_users"><?php echo $l->t('Base User Tree');?></label><textarea id="ldap_base_users" name="ldap_base_users" placeholder="<?php echo $l->t('One User Base DN per line');?>" data-default="<?php echo $_['ldap_base_users_default']; ?>" title="<?php echo $l->t('Base User Tree');?>"></textarea></p>
- <p><label for="ldap_attributes_for_user_search"><?php echo $l->t('User Search Attributes');?></label><textarea id="ldap_attributes_for_user_search" name="ldap_attributes_for_user_search" placeholder="<?php echo $l->t('Optional; one attribute per line');?>" data-default="<?php echo $_['ldap_attributes_for_user_search_default']; ?>" title="<?php echo $l->t('User Search Attributes');?>"></textarea></p>
- <p><label for="ldap_group_display_name"><?php echo $l->t('Group Display Name Field');?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php echo $_['ldap_group_display_name_default']; ?>" title="<?php echo $l->t('The LDAP attribute to use to generate the groups`s ownCloud name.');?>" /></p>
- <p><label for="ldap_base_groups"><?php echo $l->t('Base Group Tree');?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php echo $l->t('One Group Base DN per line');?>" data-default="<?php echo $_['ldap_base_groups_default']; ?>" title="<?php echo $l->t('Base Group Tree');?>"></textarea></p>
- <p><label for="ldap_attributes_for_group_search"><?php echo $l->t('Group Search Attributes');?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php echo $l->t('Optional; one attribute per line');?>" data-default="<?php echo $_['ldap_attributes_for_group_search_default']; ?>" title="<?php echo $l->t('Group Search Attributes');?>"></textarea></p>
- <p><label for="ldap_group_member_assoc_attribute"><?php echo $l->t('Group-Member association');?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php echo $_['ldap_group_member_assoc_attribute_default']; ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'uniqueMember')) echo ' selected'; ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'memberUid')) echo ' selected'; ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'member')) echo ' selected'; ?>>member (AD)</option></select></p>
+ <p><label for="ldap_display_name"><?php p($l->t('User Display Name Field'));?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php p($_['ldap_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the user`s ownCloud name.'));?>" /></p>
+ <p><label for="ldap_base_users"><?php p($l->t('Base User Tree'));?></label><textarea id="ldap_base_users" name="ldap_base_users" placeholder="<?php p($l->t('One User Base DN per line'));?>" data-default="<?php p($_['ldap_base_users_default']); ?>" title="<?php p($l->t('Base User Tree'));?>"></textarea></p>
+ <p><label for="ldap_attributes_for_user_search"><?php p($l->t('User Search Attributes'));?></label><textarea id="ldap_attributes_for_user_search" name="ldap_attributes_for_user_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_user_search_default']); ?>" title="<?php p($l->t('User Search Attributes'));?>"></textarea></p>
+ <p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field'));?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups`s ownCloud name.'));?>" /></p>
+ <p><label for="ldap_base_groups"><?php p($l->t('Base Group Tree'));?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php p($l->t('One Group Base DN per line'));?>" data-default="<?php p($_['ldap_base_groups_default']); ?>" title="<?php p($l->t('Base Group Tree'));?>"></textarea></p>
+ <p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes'));?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes'));?>"></textarea></p>
+ <p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] == 'member')) p(' selected'); ?>>member (AD)</option></select></p>
</div>
- <h3><?php echo $l->t('Special Attributes');?></h3>
+ <h3><?php p($l->t('Special Attributes'));?></h3>
<div>
- <p><label for="ldap_quota_attr">Quota Field</label><input type="text" id="ldap_quota_attr" name="ldap_quota_attr" data-default="<?php echo $_['ldap_quota_attr_default']; ?>"/></p>
- <p><label for="ldap_quota_def">Quota Default</label><input type="text" id="ldap_quota_def" name="ldap_quota_def" data-default="<?php echo $_['ldap_quota_def_default']; ?>" title="<?php echo $l->t('in bytes');?>" /></p>
- <p><label for="ldap_email_attr">Email Field</label><input type="text" id="ldap_email_attr" name="ldap_email_attr" data-default="<?php echo $_['ldap_email_attr_default']; ?>" /></p>
- <p><label for="home_folder_naming_rule">User Home Folder Naming Rule</label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php echo $l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.');?>" data-default="<?php echo $_['home_folder_naming_rule_default']; ?>" /></p>
+ <p><label for="ldap_quota_attr"><?php p($l->t('Quota Field'));?></label><input type="text" id="ldap_quota_attr" name="ldap_quota_attr" data-default="<?php p($_['ldap_quota_attr_default']); ?>"/></p>
+ <p><label for="ldap_quota_def"><?php p($l->t('Quota Default'));?></label><input type="text" id="ldap_quota_def" name="ldap_quota_def" data-default="<?php p($_['ldap_quota_def_default']); ?>" title="<?php p($l->t('in bytes'));?>" /></p>
+ <p><label for="ldap_email_attr"><?php p($l->t('Email Field'));?></label><input type="text" id="ldap_email_attr" name="ldap_email_attr" data-default="<?php p($_['ldap_email_attr_default']); ?>" /></p>
+ <p><label for="home_folder_naming_rule"><?php p($l->t('User Home Folder Naming Rule'));?></label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php p($l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.'));?>" data-default="<?php p($_['home_folder_naming_rule_default']); ?>" /></p>
</div>
</div>
</fieldset>
- <input id="ldap_submit" type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection">Test Configuration</button> <a href="http://doc.owncloud.org/server/5.0/admin_manual/auth_ldap.html" target="_blank"><img src="<?php echo OCP\Util::imagePath('', 'actions/info.png'); ?>" style="height:1.75ex" /> <?php echo $l->t('Help');?></a>
+ <input id="ldap_submit" type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection"><?php p($l->t('Test Configuration'));?></button> <a href="http://doc.owncloud.org/server/5.0/admin_manual/auth_ldap.html" target="_blank"><img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" style="height:1.75ex" /> <?php p($l->t('Help'));?></a>
</div>
</form>
diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php
index 45f4d81aecf..ec6524ee4f7 100755
--- a/apps/user_webdavauth/templates/settings.php
+++ b/apps/user_webdavauth/templates/settings.php
@@ -1,9 +1,9 @@
<form id="webdavauth" action="#" method="post">
<fieldset class="personalblock">
- <legend><strong><?php echo $l->t('WebDAV Authentication');?></strong></legend>
- <p><label for="webdav_url"><?php echo $l->t('URL: http://');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label>
- <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
+ <legend><strong><?php p($l->t('WebDAV Authentication'));?></strong></legend>
+ <p><label for="webdav_url"><?php p($l->t('URL: http://'));?><input type="text" id="webdav_url" name="webdav_url" value="<?php p($_['webdav_url']); ?>"></label>
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
<input type="submit" value="Save" />
- <br /><?php echo $l->t('ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.'); ?>
+ <br /><?php p($l->t('ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.')); ?>
</fieldset>
</form>