Add url-params to url with new parameter in linkTo function
This commit is contained in:
parent
1a46192433
commit
5153b8b293
|
@ -22,7 +22,7 @@ if( isset( $_['message'] ) ) {
|
||||||
foreach ( $_['versions'] as $v ) {
|
foreach ( $_['versions'] as $v ) {
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo OCP\Util::formatDate( doubleval($v['version']) );
|
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>)'; }
|
if ( $v['cur'] ) { echo ' (<b>Current</b>)'; }
|
||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ if (isset($_POST['user'])) {
|
||||||
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token);
|
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token);
|
||||||
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
|
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
|
||||||
if (!empty($email) and isset($_POST['sectoken']) and isset($_SESSION['sectoken']) and ($_POST['sectoken']==$_SESSION['sectoken']) ) {
|
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 = new OC_Template('core/lostpassword', 'email');
|
||||||
$tmpl->assign('link', $link, false);
|
$tmpl->assign('link', $link, false);
|
||||||
$msg = $tmpl->fetchPage();
|
$msg = $tmpl->fetchPage();
|
||||||
|
|
|
@ -8,23 +8,23 @@ class OC_Search_Provider_File extends OC_Search_Provider{
|
||||||
$file=$fileData['path'];
|
$file=$fileData['path'];
|
||||||
$mime=$fileData['mimetype'];
|
$mime=$fileData['mimetype'];
|
||||||
if($mime=='httpd/unix-directory'){
|
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{
|
}else{
|
||||||
$mimeBase=$fileData['mimepart'];
|
$mimeBase=$fileData['mimepart'];
|
||||||
switch($mimeBase){
|
switch($mimeBase){
|
||||||
case 'audio':
|
case 'audio':
|
||||||
break;
|
break;
|
||||||
case 'text':
|
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;
|
break;
|
||||||
case 'image':
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
if($mime=='application/xml'){
|
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{
|
}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(){
|
public static function checkLoggedIn(){
|
||||||
// Check if we are a user
|
// Check if we are a user
|
||||||
if( !OC_User::isLoggedIn()){
|
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();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue