foreach ( $_['versions'] as $v ) {
echo ' ';
echo OCP\Util::formatDate( doubleval($v['version']) );
- echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php').'?path='.urlencode( $_['path'] ).'&revert='. $v['version'] .'" class="button">Revert</a><br /><br />';
+ echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php', array('path' => urlencode( $_['path'] ), 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />';
if ( $v['cur'] ) { echo ' (<b>Current</b>)'; }
echo '<br /><br />';
}
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token);
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
if (!empty($email) and isset($_POST['sectoken']) and isset($_SESSION['sectoken']) and ($_POST['sectoken']==$_SESSION['sectoken']) ) {
- $link = OC_Helper::linkToAbsolute('core/lostpassword', 'resetpassword.php').'?user='.urlencode($_POST['user']).'&token='.$token;
+ $link = OC_Helper::linkToAbsolute('core/lostpassword', 'resetpassword.php', array('user' => urlencode($_POST['user']), 'token' => $token));
$tmpl = new OC_Template('core/lostpassword', 'email');
$tmpl->assign('link', $link, false);
$msg = $tmpl->fetchPage();
$file=$fileData['path'];
$mime=$fileData['mimetype'];
if($mime=='httpd/unix-directory'){
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'index.php' ).'?dir='.$file,'Files');
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'index.php', array('dir' => $file)),'Files');
}else{
$mimeBase=$fileData['mimepart'];
switch($mimeBase){
case 'audio':
break;
case 'text':
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php' ).'?file='.$file,'Text');
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php', array('dir' => $file) ),'Text');
break;
case 'image':
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php' ).'?file='.$file,'Images');
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php', array('dir' => $file) ),'Images');
break;
default:
if($mime=='application/xml'){
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php' ).'?file='.$file,'Text');
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php', array('dir' => $file) ),'Text');
}else{
- $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php' ).'?file='.$file,'Files');
+ $results[]=new OC_Search_Result(basename($file),'',OC_Helper::linkTo( 'files', 'download.php', array('dir' => $file) ),'Files');
}
}
}
public static function checkLoggedIn(){
// Check if we are a user
if( !OC_User::isLoggedIn()){
- header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ).'?redirect_url='.urlencode($_SERVER["REQUEST_URI"]));
+ header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php', array('redirect_url' => urlencode($_SERVER["REQUEST_URI"]))));
exit();
}
}