summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-09-03 19:12:52 +0200
committerBart Visscher <bartv@thisnet.nl>2012-09-03 21:51:32 +0200
commit5153b8b293b5485b9aa3d321f6a93979ec302068 (patch)
treeefeaeac952647be092a405d247c92e7ec27f5aa9
parent1a461924336f8ab227c135e13d7661b7a4f1e1df (diff)
downloadnextcloud-server-5153b8b293b5485b9aa3d321f6a93979ec302068.tar.gz
nextcloud-server-5153b8b293b5485b9aa3d321f6a93979ec302068.zip
Add url-params to url with new parameter in linkTo function
-rw-r--r--apps/files_versions/templates/history.php2
-rw-r--r--core/lostpassword/index.php2
-rw-r--r--lib/search/provider/file.php10
-rwxr-xr-xlib/util.php2
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php
index d4f875a36e8..99bc153a816 100644
--- a/apps/files_versions/templates/history.php
+++ b/apps/files_versions/templates/history.php
@@ -22,7 +22,7 @@ if( isset( $_['message'] ) ) {
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 />';
}
diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php
index 8f86fe23aad..58dab597324 100644
--- a/core/lostpassword/index.php
+++ b/core/lostpassword/index.php
@@ -17,7 +17,7 @@ if (isset($_POST['user'])) {
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();
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index a37af495599..12a535876fe 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -8,23 +8,23 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$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');
}
}
}
diff --git a/lib/util.php b/lib/util.php
index 581b6bdb317..42a0f5c7df1 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -320,7 +320,7 @@ class OC_Util {
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();
}
}