[core] From echo to p

This commit is contained in:
Lukas Reschke 2013-02-27 22:55:39 +01:00
parent 40e51d13d2
commit 229c907a57
23 changed files with 302 additions and 302 deletions

View File

@ -9,7 +9,7 @@ if(!isset($_)) {//also provide standalone error page
?> ?>
<ul> <ul>
<li class='error'> <li class='error'>
<?php echo $l->t( 'Access forbidden' ); ?><br/> <?php p($l->t( 'Access forbidden' )); ?><br/>
<p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p> <p class='hint'><?php if(isset($_['file'])) p($_['file'])?></p>
</li> </li>
</ul> </ul>

View File

@ -9,7 +9,7 @@ if(!isset($_)) {//also provide standalone error page
?> ?>
<ul> <ul>
<li class='error'> <li class='error'>
<?php echo $l->t( 'Cloud not found' ); ?><br/> <?php p($l->t( 'Cloud not found' )); ?><br/>
<p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p> <p class='hint'><?php if(isset($_['file'])) p($_['file'])?></p>
</li> </li>
</ul> </ul>

View File

@ -1,19 +1,19 @@
<?php <?php
$categories = isset($_['categories'])?$_['categories']:array(); $categories = isset($_['categories'])?$_['categories']:array();
?> ?>
<div id="edit_categories_dialog" title="<?php echo $l->t('Edit categories'); ?>"> <div id="edit_categories_dialog" title="<?php p($l->t('Edit categories')); ?>">
<!-- ?php print_r($types); ? --> <!-- ?php print_r($types); ? -->
<form method="post" id="categoryform"> <form method="post" id="categoryform">
<div class="scrollarea"> <div class="scrollarea">
<ul id="categorylist"> <ul id="categorylist">
<?php foreach($categories as $category): ?> <?php foreach($categories as $category): ?>
<li><input type="checkbox" name="categories[]" value="<?php echo $category; ?>" /><?php echo $category; ?></li> <li><input type="checkbox" name="categories[]" value="<?php p($category); ?>" /><?php p($category); ?></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</div> </div>
<div class="bottombuttons"> <div class="bottombuttons">
<input type="text" id="category_addinput" name="category" /> <input type="text" id="category_addinput" name="category" />
<button id="category_addbutton" disabled="disabled"><?php echo $l->t('Add'); ?></button> <button id="category_addbutton" disabled="disabled"><?php p($l->t('Add')); ?></button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,8 +1,8 @@
<ul> <ul>
<?php foreach($_["errors"] as $error):?> <?php foreach($_["errors"] as $error):?>
<li class='error'> <li class='error'>
<?php echo $error['error'] ?><br/> <?php p($error['error']) ?><br/>
<p class='hint'><?php if(isset($error['hint']))echo $error['hint'] ?></p> <p class='hint'><?php if(isset($error['hint']))p($error['hint']) ?></p>
</li> </li>
<?php endforeach ?> <?php endforeach ?>
</ul> </ul>

View File

@ -1,8 +1,8 @@
<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'> <input type='hidden' id='hasMySQL' value='<?php p($_['hasMySQL']) ?>'>
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'> <input type='hidden' id='hasSQLite' value='<?php p($_['hasSQLite']) ?>'>
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'> <input type='hidden' id='hasPostgreSQL' value='<?php p($_['hasPostgreSQL']) ?>'>
<input type='hidden' id='hasOracle' value='<?php echo $_['hasOracle'] ?>'> <input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
<input type='hidden' id='hasMSSQL' value='<?php echo $_['hasMSSQL'] ?>'> <input type='hidden' id='hasMSSQL' value='<?php p($_['hasMSSQL']) ?>'>
<form action="index.php" method="post"> <form action="index.php" method="post">
<input type="hidden" name="install" value="true" /> <input type="hidden" name="install" value="true" />
<?php if(count($_['errors']) > 0): ?> <?php if(count($_['errors']) > 0): ?>
@ -10,10 +10,10 @@
<?php foreach($_['errors'] as $err): ?> <?php foreach($_['errors'] as $err): ?>
<li> <li>
<?php if(is_array($err)):?> <?php if(is_array($err)):?>
<?php print $err['error']; ?> <?php print_unescaped($err['error']); ?>
<p class='hint'><?php print $err['hint']; ?></p> <p class='hint'><?php print_unescaped($err['hint']); ?></p>
<?php else: ?> <?php else: ?>
<?php print $err; ?> <?php print_unescaped($err); ?>
<?php endif; ?> <?php endif; ?>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
@ -21,54 +21,54 @@
<?php endif; ?> <?php endif; ?>
<?php if(!$_['secureRNG']): ?> <?php if(!$_['secureRNG']): ?>
<fieldset class="warning"> <fieldset class="warning">
<legend><strong><?php echo $l->t('Security Warning');?></strong></legend> <legend><strong><?php p($l->t('Security Warning'));?></strong></legend>
<p><?php echo $l->t('No secure random number generator is available, please enable the PHP OpenSSL extension.');?><br/> <p><?php p($l->t('No secure random number generator is available, please enable the PHP OpenSSL extension.'));?><br/>
<?php echo $l->t('Without a secure random number generator an attacker may be able to predict password reset tokens and take over your account.');?></p> <?php p($l->t('Without a secure random number generator an attacker may be able to predict password reset tokens and take over your account.'));?></p>
</fieldset> </fieldset>
<?php endif; ?> <?php endif; ?>
<?php if(!$_['htaccessWorking']): ?> <?php if(!$_['htaccessWorking']): ?>
<fieldset class="warning"> <fieldset class="warning">
<legend><strong><?php echo $l->t('Security Warning');?></strong></legend> <legend><strong><?php p($l->t('Security Warning'));?></strong></legend>
<p><?php echo $l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.');?><br> <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
<?php echo $l->t('For information how to properly configure your server, please see the <a href="http://doc.owncloud.org/server/5.0/admin_manual/installation.html" target="_blank">documentation</a>.');?></p> <?php print_unescaped($l->t('For information how to properly configure your server, please see the <a href="http://doc.owncloud.org/server/5.0/admin_manual/installation.html" target="_blank">documentation</a>.'));?></p>
</fieldset> </fieldset>
<?php endif; ?> <?php endif; ?>
<fieldset id="adminaccount"> <fieldset id="adminaccount">
<legend><?php echo $l->t( 'Create an <strong>admin account</strong>' ); ?></legend> <legend><?php print_unescaped($l->t( 'Create an <strong>admin account</strong>' )); ?></legend>
<p class="infield grouptop"> <p class="infield grouptop">
<input type="text" name="adminlogin" id="adminlogin" <input type="text" name="adminlogin" id="adminlogin"
value="<?php print OC_Helper::init_var('adminlogin'); ?>" autocomplete="off" autofocus required /> value="<?php p(OC_Helper::init_var('adminlogin')); ?>" autocomplete="off" autofocus required />
<label for="adminlogin" class="infield"><?php echo $l->t( 'Username' ); ?></label> <label for="adminlogin" class="infield"><?php p($l->t( 'Username' )); ?></label>
<img class="svg" src="<?php echo image_path('', 'actions/user.svg'); ?>" alt="" /> <img class="svg" src="<?php p(image_path('', 'actions/user.svg')); ?>" alt="" />
</p> </p>
<p class="infield groupbottom"> <p class="infield groupbottom">
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass" <input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
value="<?php print OC_Helper::init_var('adminpass'); ?>" /> value="<?php p(OC_Helper::init_var('adminpass')); ?>" />
<label for="adminpass" class="infield"><?php echo $l->t( 'Password' ); ?></label> <label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label>
<img class="svg" id="adminpass-icon" src="<?php echo image_path('', 'actions/password.svg'); ?>" alt="" /> <img class="svg" id="adminpass-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt="" />
<input type="checkbox" id="show" name="show" /> <input type="checkbox" id="show" name="show" />
<label for="show"></label> <label for="show"></label>
</p> </p>
</fieldset> </fieldset>
<fieldset id="datadirField"> <fieldset id="datadirField">
<legend><a id="showAdvanced"><?php echo $l->t( 'Advanced' ); ?> <img class="svg" src="<?php echo image_path('', 'actions/caret-dark.svg'); ?>" /></a></legend> <legend><a id="showAdvanced"><?php p($l->t( 'Advanced' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret-dark.svg')); ?>" /></a></legend>
<div id="datadirContent"> <div id="datadirContent">
<label for="directory"><?php echo $l->t( 'Data folder' ); ?></label> <label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
<input type="text" name="directory" id="directory" <input type="text" name="directory" id="directory"
value="<?php print OC_Helper::init_var('directory', $_['directory']); ?>" /> value="<?php p(OC_Helper::init_var('directory', $_['directory'])); ?>" />
</div> </div>
</fieldset> </fieldset>
<fieldset id='databaseField'> <fieldset id='databaseField'>
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL']) <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL'])
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?> $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
<legend><?php echo $l->t( 'Configure the database' ); ?></legend> <legend><?php p($l->t( 'Configure the database' ); ?></legend>
<div id="selectDbType"> <div id="selectDbType">
<?php if($_['hasSQLite']): ?> <?php if($_['hasSQLite']): ?>
<input type='hidden' id='hasSQLite' value="true" /> <input type='hidden' id='hasSQLite' value="true" />
<?php if(!$hasOtherDB): ?> <?php if(!$hasOtherDB): ?>
<p>SQLite <?php echo $l->t( 'will be used' ); ?>.</p> <p>SQLite <?php p($l->t( 'will be used' )); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="sqlite" /> <input type="hidden" id="dbtype" name="dbtype" value="sqlite" />
<?php else: ?> <?php else: ?>
<input type="radio" name="dbtype" value="sqlite" id="sqlite" <input type="radio" name="dbtype" value="sqlite" id="sqlite"
@ -80,7 +80,7 @@
<?php if($_['hasMySQL']): ?> <?php if($_['hasMySQL']): ?>
<input type='hidden' id='hasMySQL' value='true'/> <input type='hidden' id='hasMySQL' value='true'/>
<?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?> <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?>
<p>MySQL <?php echo $l->t( 'will be used' ); ?>.</p> <p>MySQL <?php p($l->t( 'will be used' )); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="mysql" /> <input type="hidden" id="dbtype" name="dbtype" value="mysql" />
<?php else: ?> <?php else: ?>
<input type="radio" name="dbtype" value="mysql" id="mysql" <input type="radio" name="dbtype" value="mysql" id="mysql"
@ -91,7 +91,7 @@
<?php if($_['hasPostgreSQL']): ?> <?php if($_['hasPostgreSQL']): ?>
<?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?> <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?>
<p>PostgreSQL <?php echo $l->t( 'will be used' ); ?>.</p> <p>PostgreSQL <?php p($l->t( 'will be used' )); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="pgsql" /> <input type="hidden" id="dbtype" name="dbtype" value="pgsql" />
<?php else: ?> <?php else: ?>
<label class="pgsql" for="pgsql">PostgreSQL</label> <label class="pgsql" for="pgsql">PostgreSQL</label>
@ -102,7 +102,7 @@
<?php if($_['hasOracle']): ?> <?php if($_['hasOracle']): ?>
<?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasMSSQL']): ?> <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasMSSQL']): ?>
<p>Oracle <?php echo $l->t( 'will be used' ); ?>.</p> <p>Oracle <?php p($l->t( 'will be used' )); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="oci" /> <input type="hidden" id="dbtype" name="dbtype" value="oci" />
<?php else: ?> <?php else: ?>
<label class="oci" for="oci">Oracle</label> <label class="oci" for="oci">Oracle</label>
@ -114,7 +114,7 @@
<?php if($_['hasMSSQL']): ?> <?php if($_['hasMSSQL']): ?>
<input type='hidden' id='hasMSSQL' value='true'/> <input type='hidden' id='hasMSSQL' value='true'/>
<?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?> <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?>
<p>MS SQL <?php echo $l->t( 'will be used' ); ?>.</p> <p>MS SQL <?php p($l->t( 'will be used' )); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="mssql" /> <input type="hidden" id="dbtype" name="dbtype" value="mssql" />
<?php else: ?> <?php else: ?>
<label class="mssql" for="mssql">MS SQL</label> <label class="mssql" for="mssql">MS SQL</label>
@ -126,19 +126,19 @@
<?php if($hasOtherDB): ?> <?php if($hasOtherDB): ?>
<div id="use_other_db"> <div id="use_other_db">
<p class="infield grouptop"> <p class="infield grouptop">
<label for="dbuser" class="infield"><?php echo $l->t( 'Database user' ); ?></label> <label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label>
<input type="text" name="dbuser" id="dbuser" <input type="text" name="dbuser" id="dbuser"
value="<?php print OC_Helper::init_var('dbuser'); ?>" autocomplete="off" /> value="<?php p(OC_Helper::init_var('dbuser')); ?>" autocomplete="off" />
</p> </p>
<p class="infield groupmiddle"> <p class="infield groupmiddle">
<label for="dbpass" class="infield"><?php echo $l->t( 'Database password' ); ?></label> <label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label>
<input type="password" name="dbpass" id="dbpass" <input type="password" name="dbpass" id="dbpass"
value="<?php print OC_Helper::init_var('dbpass'); ?>" /> value="<?php p(OC_Helper::init_var('dbpass')); ?>" />
</p> </p>
<p class="infield groupmiddle"> <p class="infield groupmiddle">
<label for="dbname" class="infield"><?php echo $l->t( 'Database name' ); ?></label> <label for="dbname" class="infield"><?php p($l->t( 'Database name' )); ?></label>
<input type="text" name="dbname" id="dbname" <input type="text" name="dbname" id="dbname"
value="<?php print OC_Helper::init_var('dbname'); ?>" value="<?php p(OC_Helper::init_var('dbname')); ?>"
autocomplete="off" pattern="[0-9a-zA-Z$_-]+" /> autocomplete="off" pattern="[0-9a-zA-Z$_-]+" />
</p> </p>
</div> </div>
@ -146,18 +146,18 @@
<?php if($_['hasOracle']): ?> <?php if($_['hasOracle']): ?>
<div id="use_oracle_db"> <div id="use_oracle_db">
<p class="infield groupmiddle"> <p class="infield groupmiddle">
<label for="dbtablespace" class="infield"><?php echo $l->t( 'Database tablespace' ); ?></label> <label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label>
<input type="text" name="dbtablespace" id="dbtablespace" <input type="text" name="dbtablespace" id="dbtablespace"
value="<?php print OC_Helper::init_var('dbtablespace'); ?>" autocomplete="off" /> value="<?php p(OC_Helper::init_var('dbtablespace')); ?>" autocomplete="off" />
</p> </p>
</div> </div>
<?php endif; ?> <?php endif; ?>
<p class="infield groupbottom"> <p class="infield groupbottom">
<label for="dbhost" class="infield" id="dbhostlabel"><?php echo $l->t( 'Database host' ); ?></label> <label for="dbhost" class="infield" id="dbhostlabel"><?php p($l->t( 'Database host' )); ?></label>
<input type="text" name="dbhost" id="dbhost" <input type="text" name="dbhost" id="dbhost"
value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" /> value="<?php p(OC_Helper::init_var('dbhost', 'localhost')); ?>" />
</p> </p>
</fieldset> </fieldset>
<div class="buttons"><input type="submit" class="primary" value="<?php echo $l->t( 'Finish setup' ); ?>" /></div> <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" /></div>
</form> </form>

View File

@ -3,26 +3,26 @@
<head> <head>
<title>ownCloud</title> <title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /> <link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
<link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" /> <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>" />
<?php foreach ($_['cssfiles'] as $cssfile): ?> <?php foreach ($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" type="text/css" media="screen" />
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach ($_['jsfiles'] as $jsfile): ?> <?php foreach ($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script> <script type="text/javascript" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach ($_['headers'] as $header): ?> <?php foreach ($_['headers'] as $header): ?>
<?php <?php
echo '<'.$header['tag'].' '; print_unescaped('<'.$header['tag'].' ');
foreach ($header['attributes'] as $name => $value) { foreach ($header['attributes'] as $name => $value) {
echo "$name='$value' "; print_unescaped("$name='$value' ");
}; };
echo '/>'; print_unescaped('/>)';
?> ?>
<?php endforeach; ?> <?php endforeach; ?>
</head> </head>
<body> <body>
<?php echo $_['content']; ?> <?php print_unescaped($_['content']); ?>
</body> </body>
</html> </html>

View File

@ -4,22 +4,22 @@
<title>ownCloud</title> <title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-itunes-app" content="app-id=543672169"> <meta name="apple-itunes-app" content="app-id=543672169">
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /> <link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
<link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" /> <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>" />
<?php foreach($_['cssfiles'] as $cssfile): ?> <?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" type="text/css" media="screen" />
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach($_['jsfiles'] as $jsfile): ?> <?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script> <script type="text/javascript" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach($_['headers'] as $header): ?> <?php foreach($_['headers'] as $header): ?>
<?php <?php
echo '<'.$header['tag'].' '; print_unescaped('<'.$header['tag'].' ');
foreach($header['attributes'] as $name=>$value) { foreach($header['attributes'] as $name=>$value) {
echo "$name='$value' "; print_unescaped("$name='$value' ");
}; };
echo '/>'; print_unescaped('/>');
?> ?>
<?php endforeach; ?> <?php endforeach; ?>
</head> </head>
@ -27,11 +27,11 @@
<body id="body-login"> <body id="body-login">
<div id="login"> <div id="login">
<header><div id="header"> <header><div id="header">
<img src="<?php echo image_path('', 'logo.svg'); ?>" class="svg" alt="ownCloud" /> <img src="<?php print_unescaped(image_path('', 'logo.svg')); ?>" class="svg" alt="ownCloud" />
</div></header> </div></header>
<?php echo $_['content']; ?> <?php print_unescaped($_['content']); ?>
</div> </div>
<footer><p class="info"><a href="http://owncloud.org/">ownCloud</a> &ndash; <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>
</body> </body>
</html> </html>

View File

@ -1,56 +1,56 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="ng-csp"> <html class="ng-csp">
<head> <head>
<title><?php echo !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
<?php echo !empty($_['user_displayname'])?' ('.$_['user_displayname'].') ':'' ?></title> <?php p(!empty($_['user_displayname'])?' ('.$_['user_displayname'].') ':'') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-itunes-app" content="app-id=543672169"> <meta name="apple-itunes-app" content="app-id=543672169">
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /> <link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
<link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" /> <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>" />
<?php foreach($_['cssfiles'] as $cssfile): ?> <?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" type="text/css" media="screen" />
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach($_['jsfiles'] as $jsfile): ?> <?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script> <script type="text/javascript" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach($_['headers'] as $header): ?> <?php foreach($_['headers'] as $header): ?>
<?php <?php
echo '<'.$header['tag'].' '; print_unescaped('<'.$header['tag'].' ');
foreach($header['attributes'] as $name=>$value) { foreach($header['attributes'] as $name=>$value) {
echo "$name='$value' "; print_unescaped("$name='$value' ");
}; };
echo '/>'; print_unescaped('/>');
?> ?>
<?php endforeach; ?> <?php endforeach; ?>
</head> </head>
<body id="<?php echo $_['bodyid'];?>"> <body id="<?php p($_['bodyid']);?>">
<div id="notification-container"> <div id="notification-container">
<div id="notification"></div> <div id="notification"></div>
</div> </div>
<header><div id="header"> <header><div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg" <a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg"
src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a> src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="ownCloud" /></a>
<ul id="settings" class="svg"> <ul id="settings" class="svg">
<span id="expand"> <span id="expand">
<span id="expandDisplayName"><?php echo $_['user_displayname'] ?></span> <span id="expandDisplayName"><?php p($_['user_displayname']) ?></span>
<img class="svg" src="<?php echo image_path('', 'actions/caret.svg'); ?>" /> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" />
</span> </span>
<div id="expanddiv"> <div id="expanddiv">
<?php foreach($_['settingsnavigation'] as $entry):?> <?php foreach($_['settingsnavigation'] as $entry):?>
<li> <li>
<a href="<?php echo $entry['href']; ?>" title="" <a href="<?php print_unescaped($entry['href']); ?>" title=""
<?php if( $entry["active"] ): ?> class="active"<?php endif; ?>> <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>>
<img class="svg" alt="" src="<?php echo $entry['icon']; ?>"> <img class="svg" alt="" src="<?php print_unescaped($entry['icon']); ?>">
<?php echo $entry['name'] ?> <?php p($entry['name']) ?>
</a> </a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
<li> <li>
<a id="logout" href="<?php echo link_to('', 'index.php'); ?>?logout=true"> <a id="logout" href="<?php print_unescaped(link_to('', 'index.php')); ?>?logout=true">
<img class="svg" alt="" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /> <img class="svg" alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>" />
<?php echo $l->t('Log out');?> <?php p($l->t('Log out'));?>
</a> </a>
</li> </li>
</div> </div>
@ -58,7 +58,7 @@
<form class="searchbox" action="#" method="post"> <form class="searchbox" action="#" method="post">
<input id="searchbox" class="svg" type="search" name="query" <input id="searchbox" class="svg" type="search" name="query"
value="<?php if(isset($_POST['query'])) {echo OC_Util::sanitizeHTML($_POST['query']);};?>" value="<?php if(isset($_POST['query'])) {p($_POST['query']);};?>"
autocomplete="off" x-webkit-speech /> autocomplete="off" x-webkit-speech />
</form> </form>
</div></header> </div></header>
@ -66,11 +66,11 @@
<nav><div id="navigation"> <nav><div id="navigation">
<ul id="apps" class="svg"> <ul id="apps" class="svg">
<?php foreach($_['navigation'] as $entry): ?> <?php foreach($_['navigation'] as $entry): ?>
<li data-id="<?php echo $entry['id']; ?>"> <li data-id="<?php p($entry['id']); ?>">
<a href="<?php echo $entry['href']; ?>" title="" <a href="<?php print_unescaped($entry['href']); ?>" title=""
<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
<img class="icon svg" src="<?php echo $entry['icon']; ?>"/> <img class="icon svg" src="<?php print_unescaped($entry['icon']); ?>"/>
<?php echo $entry['name']; ?> <?php p($entry['name']); ?>
</a> </a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
@ -79,7 +79,7 @@
<div id="content-wrapper"> <div id="content-wrapper">
<div id="content"> <div id="content">
<?php echo $_['content']; ?> <?php print_unescaped($_['content']); ?>
</div> </div>
</div> </div>
</body> </body>

View File

@ -2,54 +2,54 @@
<form method="post"> <form method="post">
<fieldset> <fieldset>
<?php if (!empty($_['redirect_url'])) { <?php if (!empty($_['redirect_url'])) {
echo '<input type="hidden" name="redirect_url" value="' . $_['redirect_url'] . '" />'; print_unescaped('<input type="hidden" name="redirect_url" value="' . OC_Util::sanitizeHTML($_['redirect_url']) . '" />');
} ?> } ?>
<ul> <ul>
<?php if (isset($_['invalidcookie']) && ($_['invalidcookie'])): ?> <?php if (isset($_['invalidcookie']) && ($_['invalidcookie'])): ?>
<li class="errors"> <li class="errors">
<?php echo $l->t('Automatic logon rejected!'); ?><br> <?php p($l->t('Automatic logon rejected!')); ?><br>
<small><?php echo $l->t('If you did not change your password recently, your account may be compromised!'); ?></small> <small><?php p($l->t('If you did not change your password recently, your account may be compromised!')); ?></small>
<br> <br>
<small><?php echo $l->t('Please change your password to secure your account again.'); ?></small> <small><?php p($l->t('Please change your password to secure your account again.')); ?></small>
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php if (isset($_['invalidpassword']) && ($_['invalidpassword'])): ?> <?php if (isset($_['invalidpassword']) && ($_['invalidpassword'])): ?>
<a href="<?php echo OC_Helper::linkToRoute('core_lostpassword_index') ?>"> <a href="<?php print_unescaped(OC_Helper::linkToRoute('core_lostpassword_index')) ?>">
<li class="errors"> <li class="errors">
<?php echo $l->t('Lost your password?'); ?> <?php p($l->t('Lost your password?')); ?>
</li> </li>
</a> </a>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
<p class="infield grouptop"> <p class="infield grouptop">
<input type="text" name="user" id="user" <input type="text" name="user" id="user"
value="<?php echo $_['username']; ?>"<?php echo $_['user_autofocus'] ? ' autofocus' : ''; ?> value="<?php p($_['username']); ?>"<?php p($_['user_autofocus'] ? ' autofocus' : ''); ?>
autocomplete="on" required/> autocomplete="on" required/>
<label for="user" class="infield"><?php echo $l->t('Username'); ?></label> <label for="user" class="infield"><?php p($l->t('Username')); ?></label>
<img class="svg" src="<?php echo image_path('', 'actions/user.svg'); ?>" alt=""/> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
</p> </p>
<p class="infield groupbottom"> <p class="infield groupbottom">
<input type="password" name="password" id="password" value="" data-typetoggle="#show" <input type="password" name="password" id="password" value="" data-typetoggle="#show"
required<?php echo $_['user_autofocus'] ? '' : ' autofocus'; ?> /> required<?php p($_['user_autofocus'] ? '' : ' autofocus'); ?> />
<label for="password" class="infield"><?php echo $l->t('Password'); ?></label> <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
<img class="svg" id="password-icon" src="<?php echo image_path('', 'actions/password.svg'); ?>" alt=""/> <img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/>
<input type="checkbox" id="show" name="show" /> <input type="checkbox" id="show" name="show" />
<label for="show"></label> <label for="show"></label>
</p> </p>
<input type="checkbox" name="remember_login" value="1" id="remember_login"/><label <input type="checkbox" name="remember_login" value="1" id="remember_login"/><label
for="remember_login"><?php echo $l->t('remember'); ?></label> for="remember_login"><?php p($l->t('remember')); ?></label>
<input type="hidden" name="timezone-offset" id="timezone-offset"/> <input type="hidden" name="timezone-offset" id="timezone-offset"/>
<input type="submit" id="submit" class="login primary" value="<?php echo $l->t('Log in'); ?>"/> <input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>"/>
</fieldset> </fieldset>
</form> </form>
<?php if (!empty($_['alt_login'])) { ?> <?php if (!empty($_['alt_login'])) { ?>
<form id="alternative-logins"> <form id="alternative-logins">
<fieldset> <fieldset>
<legend><?php echo $l->t('Alternative Logins') ?></legend> <legend><?php p($l->t('Alternative Logins')) ?></legend>
<ul> <ul>
<?php foreach($_['alt_login'] as $login): ?> <?php foreach($_['alt_login'] as $login): ?>
<li><a class="button" href="<?php echo $login['href']; ?>" ><?php echo $login['name']; ?></a></li> <li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</fieldset> </fieldset>

View File

@ -1,15 +1,15 @@
<ol class="pager"> <ol class="pager">
<?php if($_['page']>0):?> <?php if($_['page']>0):?>
<li class="pagerbutton1"><a href="<?php echo $_['url'].($_['page']-1);?>"><?php echo $l->t( 'prev' ); ?></a></li> <li class="pagerbutton1"><a href="<?php print_unescaped($_['url'].($_['page']-1));?>"><?php p($l->t( 'prev' )); ?></a></li>
<?php endif; ?> <?php endif; ?>
<?php if ($_['pagestart']>0):?> <?php if ($_['pagestart']>0):?>
&hellip; &hellip;
<?php endif;?> <?php endif;?>
<?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?> <?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?>
<?php if ($_['page']!=$i):?> <?php if ($_['page']!=$i):?>
<li><a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?></a></li> <li><a href="<?php print_unescaped($_['url'].$i);?>"><?php p($i+1);?></a></li>
<?php else:?> <?php else:?>
<li><?php echo $i+1;?></li> <li><?php p($i+1);?></li>
<?php endif?> <?php endif?>
<?php endfor;?> <?php endfor;?>
<?php if ($_['pagestop']<$_['pagecount']):?> <?php if ($_['pagestop']<$_['pagecount']):?>
@ -17,6 +17,6 @@
<?php endif;?> <?php endif;?>
<?php if(($_['page']+1)<$_['pagecount']):?> <?php if(($_['page']+1)<$_['pagecount']):?>
<li class="pagerbutton2"><a href="<?php echo $_['url'].($_['page']+1);?>"><?php echo $l->t( 'next' ); ?></a></li> <li class="pagerbutton2"><a href="<?php print_unescaped($_['url'].($_['page']+1));?>"><?php p($l->t( 'next' )); ?></a></li>
<?php endif; ?> <?php endif; ?>
</ol> </ol>

View File

@ -1,6 +1,6 @@
<ul> <ul>
<li class='update'> <li class='update'>
<?php echo $l->t('Updating ownCloud to version %s, this may take a while.', <?php p($l->t('Updating ownCloud to version %s, this may take a while.',
array($_['version'])); ?><br /><br /> array($_['version']))); ?><br /><br />
</li> </li>
</ul> </ul>

View File

@ -851,7 +851,7 @@ class OC_Setup {
'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html');
$tmpl = new OC_Template('', 'error', 'guest'); $tmpl = new OC_Template('', 'error', 'guest');
$tmpl->assign('errors', array(1 => array('error' => $error, 'hint' => $hint)), false); $tmpl->assign('errors', array(1 => array('error' => $error, 'hint' => $hint)));
$tmpl->printPage(); $tmpl->printPage();
exit(); exit();
} }

View File

@ -482,7 +482,7 @@ class OC_Template{
public static function printUserPage( $application, $name, $parameters = array() ) { public static function printUserPage( $application, $name, $parameters = array() ) {
$content = new OC_Template( $application, $name, "user" ); $content = new OC_Template( $application, $name, "user" );
foreach( $parameters as $key => $value ) { foreach( $parameters as $key => $value ) {
$content->assign( $key, $value, false ); $content->assign( $key, $value );
} }
print $content->printPage(); print $content->printPage();
} }
@ -497,7 +497,7 @@ class OC_Template{
public static function printAdminPage( $application, $name, $parameters = array() ) { public static function printAdminPage( $application, $name, $parameters = array() ) {
$content = new OC_Template( $application, $name, "admin" ); $content = new OC_Template( $application, $name, "admin" );
foreach( $parameters as $key => $value ) { foreach( $parameters as $key => $value ) {
$content->assign( $key, $value, false ); $content->assign( $key, $value );
} }
return $content->printPage(); return $content->printPage();
} }
@ -512,7 +512,7 @@ class OC_Template{
public static function printGuestPage( $application, $name, $parameters = array() ) { public static function printGuestPage( $application, $name, $parameters = array() ) {
$content = new OC_Template( $application, $name, "guest" ); $content = new OC_Template( $application, $name, "guest" );
foreach( $parameters as $key => $value ) { foreach( $parameters as $key => $value ) {
$content->assign( $key, $value, false ); $content->assign( $key, $value );
} }
return $content->printPage(); return $content->printPage();
} }

View File

@ -13,19 +13,19 @@ class OC_TemplateLayout extends OC_Template {
if( $renderas == 'user' ) { if( $renderas == 'user' ) {
parent::__construct( 'core', 'layout.user' ); parent::__construct( 'core', 'layout.user' );
if(in_array(OC_APP::getCurrentApp(), array('settings','admin', 'help'))!==false) { if(in_array(OC_APP::getCurrentApp(), array('settings','admin', 'help'))!==false) {
$this->assign('bodyid', 'body-settings', false); $this->assign('bodyid', 'body-settings');
}else{ }else{
$this->assign('bodyid', 'body-user', false); $this->assign('bodyid', 'body-user');
} }
// Add navigation entry // Add navigation entry
$this->assign( 'application', '', false ); $this->assign( 'application', '', false );
$navigation = OC_App::getNavigation(); $navigation = OC_App::getNavigation();
$this->assign( 'navigation', $navigation, false); $this->assign( 'navigation', $navigation);
$this->assign( 'settingsnavigation', OC_App::getSettingsNavigation(), false); $this->assign( 'settingsnavigation', OC_App::getSettingsNavigation());
foreach($navigation as $entry) { foreach($navigation as $entry) {
if ($entry['active']) { if ($entry['active']) {
$this->assign( 'application', $entry['name'], false ); $this->assign( 'application', $entry['name'] );
break; break;
} }
} }

View File

@ -49,7 +49,7 @@ usort( $combinedApps, 'app_sort' );
$tmpl = new OC_Template( "settings", "apps", "user" ); $tmpl = new OC_Template( "settings", "apps", "user" );
$tmpl->assign('apps', $combinedApps, false); $tmpl->assign('apps', $combinedApps);
$appid = (isset($_GET['appid'])?strip_tags($_GET['appid']):''); $appid = (isset($_GET['appid'])?strip_tags($_GET['appid']):'');

View File

@ -12,10 +12,10 @@ $levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal');
if (!$_['htaccessworking']) { if (!$_['htaccessworking']) {
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Security Warning');?></strong></legend> <legend><strong><?php p($l->t('Security Warning'));?></strong></legend>
<span class="securitywarning"> <span class="securitywarning">
<?php echo $l->t('Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.'); ?> <?php p($l->t('Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root.')); ?>
</span> </span>
</fieldset> </fieldset>
@ -26,11 +26,11 @@ if (!$_['htaccessworking']) {
if (!$_['isWebDavWorking']) { if (!$_['isWebDavWorking']) {
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Setup Warning');?></strong></legend> <legend><strong><?php p($l->t('Setup Warning'));?></strong></legend>
<span class="securitywarning"> <span class="securitywarning">
<?php echo $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.'); ?> <?php p($l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.')); ?>
<?php echo $l->t('Please double check the <a href=\'%s\'>installation guides</a>.', 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); ?> <?php print_unescaped($l->t('Please double check the <a href=\'%s\'>installation guides</a>.', 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html')); ?>
</span> </span>
</fieldset> </fieldset>
@ -41,10 +41,10 @@ if (!$_['isWebDavWorking']) {
if (!$_['has_fileinfo']) { if (!$_['has_fileinfo']) {
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Module \'fileinfo\' missing');?></strong></legend> <legend><strong><?php p($l->t('Module \'fileinfo\' missing'));?></strong></legend>
<span class="connectionwarning"> <span class="connectionwarning">
<?php echo $l->t('The PHP module \'fileinfo\' is missing. We strongly recommend to enable this module to get best results with mime-type detection.'); ?> <?php p($l->t('The PHP module \'fileinfo\' is missing. We strongly recommend to enable this module to get best results with mime-type detection.')); ?>
</span> </span>
</fieldset> </fieldset>
@ -55,12 +55,12 @@ if (!$_['has_fileinfo']) {
if (!$_['islocaleworking']) { if (!$_['islocaleworking']) {
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Locale not working');?></strong></legend> <legend><strong><?php p($l->t('Locale not working'));?></strong></legend>
<span class="connectionwarning"> <span class="connectionwarning">
<?php <?php
$locales = 'en_US.UTF-8/en_US.UTF8'; $locales = 'en_US.UTF-8/en_US.UTF8';
echo $l->t('This ownCloud server can\'t set system locale to %s. This means that there might be problems with certain characters in file names. We strongly suggest to install the required packages on your system to support %s.', array($locales, $locales)); p($l->t('This ownCloud server can\'t set system locale to %s. This means that there might be problems with certain characters in file names. We strongly suggest to install the required packages on your system to support %s.', array($locales, $locales)));
?> ?>
</span> </span>
@ -72,10 +72,10 @@ if (!$_['islocaleworking']) {
if (!$_['internetconnectionworking']) { if (!$_['internetconnectionworking']) {
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Internet connection not working');?></strong></legend> <legend><strong><?php p($l->t('Internet connection not working'));?></strong></legend>
<span class="connectionwarning"> <span class="connectionwarning">
<?php echo $l->t('This ownCloud server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features of ownCloud.'); ?> <?php p($l->t('This ownCloud server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features of ownCloud.')); ?>
</span> </span>
</fieldset> </fieldset>
@ -84,106 +84,106 @@ if (!$_['internetconnectionworking']) {
?> ?>
<?php foreach ($_['forms'] as $form) { <?php foreach ($_['forms'] as $form) {
echo $form; print_unescaped($form);
} }
;?> ;?>
<fieldset class="personalblock" id="backgroundjobs"> <fieldset class="personalblock" id="backgroundjobs">
<legend><strong><?php echo $l->t('Cron');?></strong></legend> <legend><strong><?php p($l->t('Cron'));?></strong></legend>
<table class="nostyle"> <table class="nostyle">
<tr> <tr>
<td> <td>
<input type="radio" name="mode" value="ajax" <input type="radio" name="mode" value="ajax"
id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] == "ajax") { id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] == "ajax") {
echo 'checked="checked"'; print_unescaped('checked="checked"');
} ?>> } ?>>
<label for="backgroundjobs_ajax">AJAX</label><br/> <label for="backgroundjobs_ajax">AJAX</label><br/>
<em><?php echo $l->t("Execute one task with each page loaded"); ?></em> <em><?php p($l->t("Execute one task with each page loaded")); ?></em>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<input type="radio" name="mode" value="webcron" <input type="radio" name="mode" value="webcron"
id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] == "webcron") { id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] == "webcron") {
echo 'checked="checked"'; print_unescaped('checked="checked"');
} ?>> } ?>>
<label for="backgroundjobs_webcron">Webcron</label><br/> <label for="backgroundjobs_webcron">Webcron</label><br/>
<em><?php echo $l->t("cron.php is registered at a webcron service. Call the cron.php page in the owncloud root once a minute over http."); ?></em> <em><?php p($l->t("cron.php is registered at a webcron service. Call the cron.php page in the owncloud root once a minute over http.")); ?></em>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<input type="radio" name="mode" value="cron" <input type="radio" name="mode" value="cron"
id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] == "cron") { id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] == "cron") {
echo 'checked="checked"'; print_unescaped('checked="checked"');
} ?>> } ?>>
<label for="backgroundjobs_cron">Cron</label><br/> <label for="backgroundjobs_cron">Cron</label><br/>
<em><?php echo $l->t("Use systems cron service. Call the cron.php file in the owncloud folder via a system cronjob once a minute."); ?></em> <em><?php p($l->t("Use systems cron service. Call the cron.php file in the owncloud folder via a system cronjob once a minute.")); ?></em>
</td> </td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
<fieldset class="personalblock" id="shareAPI"> <fieldset class="personalblock" id="shareAPI">
<legend><strong><?php echo $l->t('Sharing');?></strong></legend> <legend><strong><?php p($l->t('Sharing'));?></strong></legend>
<table class="shareAPI nostyle"> <table class="shareAPI nostyle">
<tr> <tr>
<td id="enable"> <td id="enable">
<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled"
value="1" <?php if ($_['shareAPIEnabled'] == 'yes') echo 'checked="checked"'; ?> /> value="1" <?php if ($_['shareAPIEnabled'] == 'yes') print_unescaped('checked="checked"'); ?> />
<label for="shareAPIEnabled"><?php echo $l->t('Enable Share API');?></label><br/> <label for="shareAPIEnabled"><?php p($l->t('Enable Share API'));?></label><br/>
<em><?php echo $l->t('Allow apps to use the Share API'); ?></em> <em><?php p($l->t('Allow apps to use the Share API')); ?></em>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <?php if ($_['shareAPIEnabled'] == 'no') echo 'style="display:none"';?>> <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>>
<input type="checkbox" name="shareapi_allow_links" id="allowLinks" <input type="checkbox" name="shareapi_allow_links" id="allowLinks"
value="1" <?php if ($_['allowLinks'] == 'yes') echo 'checked="checked"'; ?> /> value="1" <?php if ($_['allowLinks'] == 'yes') print_unescaped('checked="checked"'); ?> />
<label for="allowLinks"><?php echo $l->t('Allow links');?></label><br/> <label for="allowLinks"><?php p($l->t('Allow links'));?></label><br/>
<em><?php echo $l->t('Allow users to share items to the public with links'); ?></em> <em><?php p($l->t('Allow users to share items to the public with links')); ?></em>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <?php if ($_['shareAPIEnabled'] == 'no') echo 'style="display:none"';?>> <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>>
<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing"
value="1" <?php if ($_['allowResharing'] == 'yes') echo 'checked="checked"'; ?> /> value="1" <?php if ($_['allowResharing'] == 'yes') print_unescaped('checked="checked"'); ?> />
<label for="allowResharing"><?php echo $l->t('Allow resharing');?></label><br/> <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
<em><?php echo $l->t('Allow users to share items shared with them again'); ?></em> <em><?php p($l->t('Allow users to share items shared with them again')); ?></em>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <?php if ($_['shareAPIEnabled'] == 'no') echo 'style="display:none"';?>> <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>>
<input type="radio" name="shareapi_share_policy" id="sharePolicyGlobal" <input type="radio" name="shareapi_share_policy" id="sharePolicyGlobal"
value="global" <?php if ($_['sharePolicy'] == 'global') echo 'checked="checked"'; ?> /> value="global" <?php if ($_['sharePolicy'] == 'global') print_unescaped('checked="checked"'); ?> />
<label for="sharePolicyGlobal"><?php echo $l->t('Allow users to share with anyone'); ?></label><br/> <label for="sharePolicyGlobal"><?php p($l->t('Allow users to share with anyone')); ?></label><br/>
<input type="radio" name="shareapi_share_policy" id="sharePolicyGroupsOnly" <input type="radio" name="shareapi_share_policy" id="sharePolicyGroupsOnly"
value="groups_only" <?php if ($_['sharePolicy'] == 'groups_only') echo 'checked="checked"'; ?> /> value="groups_only" <?php if ($_['sharePolicy'] == 'groups_only') print_unescaped('checked="checked"'); ?> />
<label for="sharePolicyGroupsOnly"><?php echo $l->t('Allow users to only share with users in their groups');?></label><br/> <label for="sharePolicyGroupsOnly"><?php p($l->t('Allow users to only share with users in their groups'));?></label><br/>
</td> </td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
<fieldset class="personalblock" id="security"> <fieldset class="personalblock" id="security">
<legend><strong><?php echo $l->t('Security');?></strong></legend> <legend><strong><?php p($l->t('Security'));?></strong></legend>
<table class="nostyle"> <table class="nostyle">
<tr> <tr>
<td id="enable"> <td id="enable">
<input type="checkbox" name="forcessl" id="enforceHTTPSEnabled" <input type="checkbox" name="forcessl" id="enforceHTTPSEnabled"
<?php if ($_['enforceHTTPSEnabled']) { <?php if ($_['enforceHTTPSEnabled']) {
echo 'checked="checked" '; print_unescaped('checked="checked" ');
echo 'value="false"'; print_unescaped('value="false"');
} else { } else {
echo 'value="true"'; print_unescaped('value="true"');
} }
?> ?>
<?php if (!$_['isConnectedViaHTTPS']) echo 'disabled'; ?> /> <?php if (!$_['isConnectedViaHTTPS']) p('disabled'); ?> />
<label for="forcessl"><?php echo $l->t('Enforce HTTPS');?></label><br/> <label for="forcessl"><?php p($l->t('Enforce HTTPS'));?></label><br/>
<em><?php echo $l->t('Enforces the clients to connect to ownCloud via an encrypted connection.'); ?></em> <em><?php p($l->t('Enforces the clients to connect to ownCloud via an encrypted connection.')); ?></em>
<?php if (!$_['isConnectedViaHTTPS']) { <?php if (!$_['isConnectedViaHTTPS']) {
echo "<br/><em>"; print_unescaped("<br/><em>");
echo $l->t('Please connect to this ownCloud instance via HTTPS to enable or disable the SSL enforcement.'); p($l->t('Please connect to this ownCloud instance via HTTPS to enable or disable the SSL enforcement.'));
echo "</em>"; print_unescaped("</em>");
} }
?> ?>
</td> </td>
@ -192,12 +192,12 @@ if (!$_['internetconnectionworking']) {
</fieldset> </fieldset>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Log');?></strong></legend> <legend><strong><?php p($l->t('Log'));?></strong></legend>
<?php echo $l->t('Log level');?> <select name='loglevel' id='loglevel'> <?php p($l->t('Log level'));?> <select name='loglevel' id='loglevel'>
<option value='<?php echo $_['loglevel']?>'><?php echo $levels[$_['loglevel']]?></option> <option value='<?php p($_['loglevel'])?>'><?php p($levels[$_['loglevel']])?></option>
<?php for ($i = 0; $i < 5; $i++): <?php for ($i = 0; $i < 5; $i++):
if ($i != $_['loglevel']):?> if ($i != $_['loglevel']):?>
<option value='<?php echo $i?>'><?php echo $levels[$i]?></option> <option value='<?php p($i)?>'><?php p($levels[$i])?></option>
<?php endif; <?php endif;
endfor;?> endfor;?>
</select> </select>
@ -205,31 +205,31 @@ endfor;?>
<?php foreach ($_['entries'] as $entry): ?> <?php foreach ($_['entries'] as $entry): ?>
<tr> <tr>
<td> <td>
<?php echo $levels[$entry->level];?> <?php p($levels[$entry->level]);?>
</td> </td>
<td> <td>
<?php echo $entry->app;?> <?php p($entry->app);?>
</td> </td>
<td> <td>
<?php echo $entry->message;?> <?php p($entry->message);?>
</td> </td>
<td> <td>
<?php echo OC_Util::formatDate($entry->time);?> <?php p(OC_Util::formatDate($entry->time));?>
</td> </td>
</tr> </tr>
<?php endforeach;?> <?php endforeach;?>
</table> </table>
<?php if ($_['entriesremain']): ?> <?php if ($_['entriesremain']): ?>
<input id='moreLog' type='button' value='<?php echo $l->t('More');?>...'> <input id='moreLog' type='button' value='<?php p($l->t('More'));?>...'>
<?php endif; ?> <?php endif; ?>
</fieldset> </fieldset>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Version');?></strong></legend> <legend><strong><?php p($l->t('Version'));?></strong></legend>
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?> <?php echo(OC_Util::getEditionString()); ?> <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?> <?php p(OC_Util::getEditionString()); ?>
(<?php echo(OC_Updater::ShowUpdatingHint()); ?>)<br/> (<?php p(OC_Updater::ShowUpdatingHint()); ?>)<br/>
<?php echo $l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.'); ?> <?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
</fieldset> </fieldset>

View File

@ -4,37 +4,37 @@
* See the COPYING-README file. * See the COPYING-README file.
*/?> */?>
<script type="text/javascript" <script type="text/javascript"
src="<?php echo OC_Helper::linkToRoute('apps_custom');?>?appid=<?php echo $_['appid']; ?>"></script> src="<?php print_unescaped(OC_Helper::linkToRoute('apps_custom'));?>?appid=<?php p($_['appid']); ?>"></script>
<script type="text/javascript" src="<?php echo OC_Helper::linkTo('settings/js', 'apps.js');?>"></script> <script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkTo('settings/js', 'apps.js'));?>"></script>
<div id="controls"> <div id="controls">
<a class="button" target="_blank" href="http://owncloud.org/dev"><?php echo $l->t('Add your App');?></a> <a class="button" target="_blank" href="http://owncloud.org/dev"><?php p($l->t('Add your App'));?></a>
<a class="button" target="_blank" href="http://apps.owncloud.com"><?php echo $l->t('More Apps');?></a> <a class="button" target="_blank" href="http://apps.owncloud.com"><?php p($l->t('More Apps'));?></a>
</div> </div>
<ul id="leftcontent" class="applist hascontrols"> <ul id="leftcontent" class="applist hascontrols">
<?php foreach($_['apps'] as $app):?> <?php foreach($_['apps'] as $app):?>
<li <?php if($app['active']) echo 'class="active"'?> data-id="<?php echo $app['id'] ?>" <li <?php if($app['active']) print_unescaped('class="active"')?> data-id="<?php p($app['id']) ?>"
<?php if ( isset( $app['ocs_id'] ) ) { echo "data-id-ocs=\"{$app['ocs_id']}\""; } ?> <?php if ( isset( $app['ocs_id'] ) ) { print_unescaped("data-id-ocs=\"{".OC_Util::sanitizeHTML($app['ocs_id'])."}\""); } ?>
data-type="<?php echo $app['internal'] ? 'internal' : 'external' ?>" data-installed="1"> data-type="<?php p($app['internal'] ? 'internal' : 'external') ?>" data-installed="1">
<a class="app<?php if(!$app['internal']) echo ' externalapp' ?>" <a class="app<?php if(!$app['internal']) p(' externalapp') ?>"
href="?appid=<?php echo $app['id'] ?>"><?php echo htmlentities($app['name']) ?></a> href="?appid=<?php p($app['id']) ?>"><?php p($app['name']) ?></a>
<?php if(!$app['internal']) <?php if(!$app['internal'])
echo '<small class="'.$app['internalclass'].' list">'.$app['internallabel'].'</small>' ?> print_unescaped('<small class="'.OC_Util::sanitizeHTML($app['internalclass']).' list">'.OC_Util::sanitizeHTML($app['internallabel']).'</small>') ?>
</li> </li>
<?php endforeach;?> <?php endforeach;?>
</ul> </ul>
<div id="rightcontent"> <div id="rightcontent">
<div class="appinfo"> <div class="appinfo">
<h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span <h3><strong><span class="name"><?php p($l->t('Select an App'));?></span></strong><span
class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3> class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
<span class="score"></span> <span class="score"></span>
<p class="description"></p> <p class="description"></p>
<img src="" class="preview" /> <img src="" class="preview" />
<p class="appslink hidden"><a href="#" target="_blank"><?php <p class="appslink hidden"><a href="#" target="_blank"><?php
echo $l->t('See application page at apps.owncloud.com');?></a></p> p($l->t('See application page at apps.owncloud.com'));?></a></p>
<p class="license hidden"><?php <p class="license hidden"><?php
echo $l->t('<span class="licence"></span>-licensed by <span class="author"></span>');?></p> print_unescaped($l->t('<span class="licence"></span>-licensed by <span class="author"></span>'));?></p>
<input class="enable hidden" type="submit" /> <input class="enable hidden" type="submit" />
<input class="update hidden" type="submit" value="<?php echo($l->t('Update')); ?>" /> <input class="update hidden" type="submit" value="<?php p($l->t('Update')); ?>" />
</div> </div>
</div> </div>

View File

@ -1,21 +1,21 @@
<div id="controls"> <div id="controls">
<?php if($_['admin']) { ?> <?php if($_['admin']) { ?>
<a class="button newquestion <?php echo($_['style1']); ?>" <a class="button newquestion <?php p($_['style1']); ?>"
href="<?php echo($_['url1']); ?>"><?php echo $l->t( 'User Documentation' ); ?></a> href="<?php print_unescaped($_['url1']); ?>"><?php p($l->t( 'User Documentation' )); ?></a>
<a class="button newquestion <?php echo($_['style2']); ?>" <a class="button newquestion <?php p($_['style2']); ?>"
href="<?php echo($_['url2']); ?>"><?php echo $l->t( 'Administrator Documentation' ); ?></a> href="<?php print_unescaped($_['url2']); ?>"><?php p($l->t( 'Administrator Documentation' )); ?></a>
<?php } ?> <?php } ?>
<a class="button newquestion" href="http://owncloud.org/support" target="_blank"><?php <a class="button newquestion" href="http://owncloud.org/support" target="_blank"><?php
echo $l->t( 'Online Documentation' ); ?></a> p($l->t( 'Online Documentation' )); ?></a>
<a class="button newquestion" href="http://forum.owncloud.org" target="_blank"><?php <a class="button newquestion" href="http://forum.owncloud.org" target="_blank"><?php
echo $l->t( 'Forum' ); ?></a> p($l->t( 'Forum' )); ?></a>
<?php if($_['admin']) { ?> <?php if($_['admin']) { ?>
<a class="button newquestion" href="https://github.com/owncloud/core/issues" target="_blank"><?php <a class="button newquestion" href="https://github.com/owncloud/core/issues" target="_blank"><?php
echo $l->t( 'Bugtracker' ); ?></a> p($l->t( 'Bugtracker' )); ?></a>
<?php } ?> <?php } ?>
<a class="button newquestion" href="http://owncloud.com" target="_blank"><?php <a class="button newquestion" href="http://owncloud.com" target="_blank"><?php
echo $l->t( 'Commercial Support' ); ?></a> p($l->t( 'Commercial Support' )); ?></a>
</div> </div>
<div class="help-includes"> <div class="help-includes">
<iframe src="<?php echo($_['url']); ?>" class="help-iframe">abc</iframe> <iframe src="<?php print_unescaped($_['url']); ?>" class="help-iframe">abc</iframe>
</div> </div>

View File

@ -6,14 +6,14 @@
*/ */
?> ?>
<div id="oauth-request" class="guest-container"> <div id="oauth-request" class="guest-container">
<p><strong><?php echo $_['consumer']['name'].'</strong> '.$_['message']; ?></p> <p><strong><?php print_unescaped(OC_Util::sanitizeHTML($_['consumer']['name']).'</strong> '.OC_Util::sanitizeHTML($_['message'])); ?></p>
<ul> <ul>
<?php <?php
// Foreach requested scope // Foreach requested scope
foreach($_['requiredapps'] as $requiredapp){ foreach($_['requiredapps'] as $requiredapp){
echo '<li>'.$requiredapp.'</li>'; print_unescaped('<li>'.OC_Util::sanitizeHTML($requiredapp).'</li>');
} }
?> ?>
</ul> </ul>
<a href="<?php echo OC::$WEBROOT; ?>" id="back-home" class="button">Back to ownCloud</a> <a href="<?php print_unescaped(OC::$WEBROOT); ?>" id="back-home" class="button">Back to ownCloud</a>
</div> </div>

View File

@ -6,12 +6,12 @@
*/ */
?> ?>
<div id="oauth-request" class="guest-container"> <div id="oauth-request" class="guest-container">
<p><strong><?php echo $_['consumer']['name']; ?></strong> is requesting your permission to read, write, modify and delete data from the following apps:</p> <p><strong><?php p($_['consumer']['name']); ?></strong> is requesting your permission to read, write, modify and delete data from the following apps:</p>
<ul> <ul>
<?php <?php
// Foreach requested scope // Foreach requested scope
foreach($_['consumer']['scopes'] as $app){ foreach($_['consumer']['scopes'] as $app){
echo '<li>'.$app.'</li>'; print_unescaped('<li>'.OC_Util:sanitzeHTML($app).'</li>)';
} }
?> ?>
</ul> </ul>

View File

@ -4,26 +4,26 @@
* See the COPYING-README file. * See the COPYING-README file.
*/?> */?>
<div id="quota" class="personalblock"><div style="width:<?php echo $_['usage_relative'];?>%;"> <div id="quota" class="personalblock"><div style="width:<?php p($_['usage_relative']);?>%;">
<p id="quotatext"><?php echo $l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>', <p id="quotatext"><?php print_unescaped($l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>',
array($_['usage'], $_['total_space']));?></p> array($_['usage'], $_['total_space'])));?></p>
</div></div> </div></div>
<div class="clientsbox"> <div class="clientsbox">
<h2><?php echo $l->t('Get the apps to sync your files');?></h2> <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
<a href="<?php echo $_['clients']['desktop']; ?>" target="_blank"> <a href="<?php p($_['clients']['desktop']); ?>" target="_blank">
<img src="<?php echo OCP\Util::imagePath('core', 'desktopapp.png'); ?>" /> <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'desktopapp.png')); ?>" />
</a> </a>
<a href="<?php echo $_['clients']['android']; ?>" target="_blank"> <a href="<?php p($_['clients']['android']); ?>" target="_blank">
<img src="<?php echo OCP\Util::imagePath('core', 'googleplay.png'); ?>" /> <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'googleplay.png')); ?>" />
</a> </a>
<a href="<?php echo $_['clients']['ios']; ?>" target="_blank"> <a href="<?php p($_['clients']['ios']); ?>" target="_blank">
<img src="<?php echo OCP\Util::imagePath('core', 'appstore.png'); ?>" /> <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'appstore.png')); ?>" />
</a> </a>
<?php if(OC_APP::isEnabled('firstrunwizard')) {?> <?php if(OC_APP::isEnabled('firstrunwizard')) {?>
<center><a class="button" href="#" id="showWizard"><?php echo $l->t('Show First Run Wizard again');?></a></center> <center><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></center>
<?php }?> <?php }?>
</div> </div>
@ -34,7 +34,7 @@ if($_['passwordChangeSupported']) {
?> ?>
<form id="passwordform"> <form id="passwordform">
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Password');?></strong></legend> <legend><strong><?php p($l->t('Password'));?></strong></legend>
<div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div> <div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div>
<div id="passworderror"><?php echo $l->t('Unable to change your password');?></div> <div id="passworderror"><?php echo $l->t('Unable to change your password');?></div>
<input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" /> <input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" />
@ -54,11 +54,11 @@ if($_['displayNameChangeSupported']) {
<form id="displaynameform"> <form id="displaynameform">
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Display Name');?></strong></legend> <legend><strong><?php echo $l->t('Display Name');?></strong></legend>
<div id="displaynamechanged"><?php echo $l->t('Your display name was changed');?></div> <div id="displaynamechanged"><?php p($l->t('Your display name was changed'));?></div>
<div id="displaynameerror"><?php echo $l->t('Unable to change your display name');?></div> <div id="displaynameerror"><?php p($l->t('Unable to change your display name'));?></div>
<input type="text" id="displayName" name="displayName" value="<?php echo $_['displayName']?>" /> <input type="text" id="displayName" name="displayName" value="<?php p($_['displayName'])?>" />
<input type="hidden" id="oldDisplayName" name="oldDisplayName" value="<?php echo $_['displayName']?>" /> <input type="hidden" id="oldDisplayName" name="oldDisplayName" value="<?php p($_['displayName'])?>" />
<input id="displaynamebutton" type="submit" value="<?php echo $l->t('Change display name');?>" /> <input id="displaynamebutton" type="submit" value="<?php p($l->t('Change display name'));?>" />
</fieldset> </fieldset>
</form> </form>
<?php <?php
@ -67,42 +67,42 @@ if($_['displayNameChangeSupported']) {
<form id="lostpassword"> <form id="lostpassword">
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Email');?></strong></legend> <legend><strong><?php p($l->t('Email'));?></strong></legend>
<input type="text" name="email" id="email" value="<?php echo $_['email']; ?>" <input type="text" name="email" id="email" value="<?php p($_['email']); ?>"
placeholder="<?php echo $l->t('Your email address');?>" /><span class="msg"></span><br /> placeholder="<?php p($l->t('Your email address'));?>" /><span class="msg"></span><br />
<em><?php echo $l->t('Fill in an email address to enable password recovery');?></em> <em><?php p($l->t('Fill in an email address to enable password recovery'));?></em>
</fieldset> </fieldset>
</form> </form>
<form> <form>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Language');?></strong></legend> <legend><strong><?php p($l->t('Language'));?></strong></legend>
<select id="languageinput" class="chzen-select" name="lang" data-placeholder="<?php echo $l->t('Language');?>"> <select id="languageinput" class="chzen-select" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
<?php foreach($_['languages'] as $language):?> <?php foreach($_['languages'] as $language):?>
<option value="<?php echo $language['code'];?>"><?php echo $language['name'];?></option> <option value="<?php p($language['code']);?>"><?php p($language['name']);?></option>
<?php endforeach;?> <?php endforeach;?>
</select> </select>
<a href="https://www.transifex.net/projects/p/owncloud/team/<?php echo $_['languages'][0]['code'];?>/" <a href="https://www.transifex.net/projects/p/owncloud/team/<?php p($_['languages'][0]['code']);?>/"
target="_blank"><em><?php echo $l->t('Help translate');?></em></a> target="_blank"><em><?php p($l->t('Help translate'));?></em></a>
</fieldset> </fieldset>
</form> </form>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('WebDAV');?></strong></legend> <legend><strong><?php p($l->t('WebDAV'));?></strong></legend>
<code><?php echo OC_Helper::linkToRemote('webdav'); ?></code><br /> <code><?php print_unescaped(OC_Helper::linkToRemote('webdav')); ?></code><br />
<em><?php echo $l->t('Use this address to connect to your ownCloud in your file manager');?></em> <em><?php p($l->t('Use this address to connect to your ownCloud in your file manager'));?></em>
</fieldset> </fieldset>
<?php foreach($_['forms'] as $form) { <?php foreach($_['forms'] as $form) {
echo $form; print_unescaped($form);
};?> };?>
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><strong><?php echo $l->t('Version');?></strong></legend> <legend><strong><?php p($l->t('Version'));?></strong></legend>
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?> <strong>ownCloud</strong> <?php p(OC_Util::getVersionString()); ?>
<?php echo(OC_Util::getEditionString()); ?> <br /> <?php p(OC_Util::getEditionString()); ?> <br />
<?php echo $l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.'); ?> <?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
</fieldset> </fieldset>

View File

@ -5,5 +5,5 @@
*/?> */?>
<?php foreach($_['forms'] as $form) { <?php foreach($_['forms'] as $form) {
echo $form; print_unescaped($form);
}; };

View File

@ -14,49 +14,49 @@ unset($items['admin']);
$_['subadmingroups'] = array_flip($items); $_['subadmingroups'] = array_flip($items);
?> ?>
<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('isadmin');?>"></script> <script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkToRoute('isadmin'));?>"></script>
<div id="controls"> <div id="controls">
<form id="newuser" autocomplete="off"> <form id="newuser" autocomplete="off">
<input id="newusername" type="text" placeholder="<?php echo $l->t('Login Name')?>" /> <input <input id="newusername" type="text" placeholder="<?php p($l->t('Login Name'))?>" /> <input
type="password" id="newuserpassword" type="password" id="newuserpassword"
placeholder="<?php echo $l->t('Password')?>" /> <select placeholder="<?php p($l->t('Password'))?>" /> <select
class="groupsselect" class="groupsselect"
id="newusergroups" data-placeholder="groups" id="newusergroups" data-placeholder="groups"
title="<?php echo $l->t('Groups')?>" multiple="multiple"> title="<?php p($l->t('Groups'))?>" multiple="multiple">
<?php foreach($_["groups"] as $group): ?> <?php foreach($_["groups"] as $group): ?>
<option value="<?php echo $group['name'];?>"> <option value="<?php p($group['name']);?>">
<?php echo $group['name'];?> <?php p($group['name']);?>
</option> </option>
<?php endforeach;?> <?php endforeach;?>
</select> <input type="submit" value="<?php echo $l->t('Create')?>" /> </select> <input type="submit" value="<?php p($l->t('Create'))?>" />
</form> </form>
<div class="quota"> <div class="quota">
<span><?php echo $l->t('Default Storage');?></span> <span><?php p($l->t('Default Storage'));?></span>
<?php if((bool) $_['isadmin']): ?> <?php if((bool) $_['isadmin']): ?>
<select class='quota'> <select class='quota'>
<option <option
<?php if($_['default_quota']=='none') echo 'selected="selected"';?> <?php if($_['default_quota']=='none') print_unescaped('selected="selected"');?>
value='none'> value='none'>
<?php echo $l->t('Unlimited');?> <?php p($l->t('Unlimited'));?>
</option> </option>
<?php foreach($_['quota_preset'] as $preset):?> <?php foreach($_['quota_preset'] as $preset):?>
<?php if($preset!='default'):?> <?php if($preset!='default'):?>
<option <option
<?php if($_['default_quota']==$preset) echo 'selected="selected"';?> <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?>
value='<?php echo $preset;?>'> value='<?php p($preset);?>'>
<?php echo $preset;?> <?php p($preset);?>
</option> </option>
<?php endif;?> <?php endif;?>
<?php endforeach;?> <?php endforeach;?>
<?php if($_['defaultQuotaIsUserDefined']):?> <?php if($_['defaultQuotaIsUserDefined']):?>
<option selected="selected" <option selected="selected"
value='<?php echo $_['default_quota'];?>'> value='<?php p($_['default_quota']);?>'>
<?php echo $_['default_quota'];?> <?php p($_['default_quota']);?>
</option> </option>
<?php endif;?> <?php endif;?>
<option value='other'> <option value='other'>
<?php echo $l->t('Other');?> <?php p($l->t('Other'));?>
... ...
</option> </option>
</select> </select>
@ -64,49 +64,49 @@ $_['subadmingroups'] = array_flip($items);
<?php if((bool) !$_['isadmin']): ?> <?php if((bool) !$_['isadmin']): ?>
<select class='quota' disabled="disabled"> <select class='quota' disabled="disabled">
<option selected="selected"> <option selected="selected">
<?php echo $_['default_quota'];?> <?php p($_['default_quota']);?>
</option> </option>
</select> </select>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
<table class="hascontrols" data-groups="<?php echo implode(', ', $allGroups);?>"> <table class="hascontrols" data-groups="<?php p(implode(', ', $allGroups));?>">
<thead> <thead>
<tr> <tr>
<th id='headerName'><?php echo $l->t('Login Name')?></th> <th id='headerName'><?php p($l->t('Login Name'))?></th>
<th id="headerDisplayName"><?php echo $l->t( 'Display Name' ); ?></th> <th id="headerDisplayName"><?php p($l->t( 'Display Name' )); ?></th>
<th id="headerPassword"><?php echo $l->t( 'Password' ); ?></th> <th id="headerPassword"><?php p($l->t( 'Password' )); ?></th>
<th id="headerGroups"><?php echo $l->t( 'Groups' ); ?></th> <th id="headerGroups"><?php p($l->t( 'Groups' )); ?></th>
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?> <?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
<th id="headerSubAdmins"><?php echo $l->t('Group Admin'); ?></th> <th id="headerSubAdmins"><?php p($l->t('Group Admin')); ?></th>
<?php endif;?> <?php endif;?>
<th id="headerQuota"><?php echo $l->t('Storage'); ?></th> <th id="headerQuota"><?php p($l->t('Storage')); ?></th>
<th id="headerRemove">&nbsp;</th> <th id="headerRemove">&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($_["users"] as $user): ?> <?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>" <tr data-uid="<?php p($user["name"]) ?>"
data-displayName="<?php echo $user["displayName"] ?>"> data-displayName="<?php p($user["displayName"]) ?>">
<td class="name"><?php echo $user["name"]; ?></td> <td class="name"><?php p($user["name"]); ?></td>
<td class="displayName"><span><?php echo $user["displayName"]; ?></span> <img class="svg action" <td class="displayName"><span><?php p($user["displayName"]); ?></span> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>" src="<?php p(image_path('core', 'actions/rename.svg'))?>"
alt="<?php echo $l->t("change display name")?>" title="<?php echo $l->t("change display name")?>"/> alt="<?php p($l->t("change display name"))?>" title="<?php p($l->t("change display name"))?>"/>
</td> </td>
<td class="password"><span>●●●●●●●</span> <img class="svg action" <td class="password"><span>●●●●●●●</span> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>" src="<?php print_unescaped(image_path('core', 'actions/rename.svg'))?>"
alt="<?php echo $l->t("set new password")?>" title="<?php echo $l->t("set new password")?>"/> alt="<?php p($l->t("set new password"))?>" title="<?php p($l->t("set new password"))?>"/>
</td> </td>
<td class="groups"><select <td class="groups"><select
class="groupsselect" class="groupsselect"
data-username="<?php echo $user['name'] ;?>" data-username="<?php p($user['name']) ;?>"
data-user-groups="<?php echo $user['groups'] ;?>" data-user-groups="<?php p($user['groups']) ;?>"
data-placeholder="groups" title="<?php echo $l->t('Groups')?>" data-placeholder="groups" title="<?php p($l->t('Groups'))?>"
multiple="multiple"> multiple="multiple">
<?php foreach($_["groups"] as $group): ?> <?php foreach($_["groups"] as $group): ?>
<option value="<?php echo $group['name'];?>"> <option value="<?php p($group['name']);?>">
<?php echo $group['name'];?> <?php p($group['name']);?>
</option> </option>
<?php endforeach;?> <?php endforeach;?>
</select> </select>
@ -114,13 +114,13 @@ $_['subadmingroups'] = array_flip($items);
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?> <?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
<td class="subadmins"><select <td class="subadmins"><select
class="subadminsselect" class="subadminsselect"
data-username="<?php echo $user['name'] ;?>" data-username="<?php p($user['name']) ;?>"
data-subadmin="<?php echo $user['subadmin'] ;?>" data-subadmin="<?php p($user['subadmin']);?>"
data-placeholder="subadmins" title="<?php echo $l->t('Group Admin')?>" data-placeholder="subadmins" title="<?php p($l->t('Group Admin'))?>"
multiple="multiple"> multiple="multiple">
<?php foreach($_["subadmingroups"] as $group): ?> <?php foreach($_["subadmingroups"] as $group): ?>
<option value="<?php echo $group;?>"> <option value="<?php p($group);?>">
<?php echo $group;?> <?php p($group);?>
</option> </option>
<?php endforeach;?> <?php endforeach;?>
</select> </select>
@ -129,37 +129,37 @@ $_['subadmingroups'] = array_flip($items);
<td class="quota"> <td class="quota">
<select class='quota-user'> <select class='quota-user'>
<option <option
<?php if($user['quota']=='default') echo 'selected="selected"';?> <?php if($user['quota']=='default') print_unescaped('selected="selected"');?>
value='default'> value='default'>
<?php echo $l->t('Default');?> <?php p($l->t('Default'));?>
</option> </option>
<option <option
<?php if($user['quota']=='none') echo 'selected="selected"';?> <?php if($user['quota']=='none') print_unescaped('selected="selected"');?>
value='none'> value='none'>
<?php echo $l->t('Unlimited');?> <?php p($l->t('Unlimited'));?>
</option> </option>
<?php foreach($_['quota_preset'] as $preset):?> <?php foreach($_['quota_preset'] as $preset):?>
<option <option
<?php if($user['quota']==$preset) echo 'selected="selected"';?> <?php if($user['quota']==$preset) print_unescaped('selected="selected"');?>
value='<?php echo $preset;?>'> value='<?php p($preset);?>'>
<?php echo $preset;?> <?php p($preset);?>
</option> </option>
<?php endforeach;?> <?php endforeach;?>
<?php if($user['isQuotaUserDefined']):?> <?php if($user['isQuotaUserDefined']):?>
<option selected="selected" value='<?php echo $user['quota'];?>'> <option selected="selected" value='<?php p($user['quota']);?>'>
<?php echo $user['quota'];?> <?php p($user['quota']);?>
</option> </option>
<?php endif;?> <?php endif;?>
<option value='other' data-new> <option value='other' data-new>
<?php echo $l->t('Other');?> <?php p($l->t('Other'));?>
... ...
</option> </option>
</select> </select>
</td> </td>
<td class="remove"> <td class="remove">
<?php if($user['name']!=OC_User::getUser()):?> <?php if($user['name']!=OC_User::getUser()):?>
<a href="#" class="action delete" original-title="<?php echo $l->t('Delete')?>"> <a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>">
<img src="<?php echo image_path('core', 'actions/delete.svg') ?>" class="svg" /> <img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" class="svg" />
</a> </a>
<?php endif;?> <?php endif;?>
</td> </td>