Add url-params to url with new parameter in linkTo function
This commit is contained in:
parent
1a46192433
commit
5153b8b293
4 changed files with 8 additions and 8 deletions
|
@ -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 />';
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue