Adam writes about his problems, you know where there are still bugs in version 3.5.1 beta I have no problems with deleting files just like I want to delete a file it is bad redirect to the remote server on which the file resides. Regards
This isn't a timed download page. So the image at the bottom is just a link to the next page/download.joelfcarvalho3427 said:_download_page_compare_all.inc.php -> nothing happens when I'm a guest and click the free download image on the bottom. It was supposed to start a counter.
I would create a page before this which doesn't have a counter, then it loads this one that starts the counter automatically. You can chain the pages together. Alternatively you should be able to copy it and easily change the javascript to run on click rather than page load.joelfcarvalho3427 said:_download_page_compare_timed.inc.php -> I should click on "slow download" and only then the counter would start ticking, but the "slow download" button is replaced by the counter right after the page completes loading. Looking at the code I can see why this happens, but it is wrong and I couldn't change it in a satisfactory way by myself.
Hi Adam,adam said:This isn't a timed download page. So the image at the bottom is just a link to the next page/download.joelfcarvalho3427 said:_download_page_compare_all.inc.php -> nothing happens when I'm a guest and click the free download image on the bottom. It was supposed to start a counter.
I would create a page before this which doesn't have a counter, then it loads this one that starts the counter automatically. You can chain the pages together. Alternatively you should be able to copy it and easily change the javascript to run on click rather than page load.joelfcarvalho3427 said:_download_page_compare_timed.inc.php -> I should click on "slow download" and only then the counter would start ticking, but the "slow download" button is replaced by the counter right after the page completes loading. Looking at the code I can see why this happens, but it is wrong and I couldn't change it in a satisfactory way by myself.
$('body').on('click','#mybutton, function(e) {
// code to start the counter
})
Thanks for reporting. Fix for the final release due later today.sultime3732 said:Hello,
Display problem in flags add a language.
Cordialement
The delete issue should be fixed now. It'll be in the release later today. To patch it you can remove these lines from delete_file.php, they're not required any more:ballevill3616 said:Re: v3.5.1 beta - Report Bugs or Issues Here
Unread postby alexandreweb123407 » 26 Mar 2014 01:14
adam wrote:
ballevill3616 wrote:And here's another problem with the remote server when you set everything right in the configuration file on the remote server does not work removing and carefully if want to let the master server to delete the file using a link is a redirection error on the remote server if you mix it in the config redirection is working, but when uploading a file is a link to download instead of being the main server in the form www.xxx.com / link to a file is www.s1.xxx.com/link to the file server configuration is set url main option is set to yes
Sorry I don't understand the issue, could you give more information?
I'm tired of talking to Adam who is giving error when deleting via remote server. But he always says it works, so I changed it!!!
replace your code, for me.
delete_file.php
Code: Select all
alexandreweb123407Code:<?php /* setup includes */ require_once('includes/master.inc.php'); /* setup page */ define("PAGE_NAME", t("delete_file_page_name", "Delete File")); define("PAGE_DESCRIPTION", t("delete_file_meta_description", "Delete File")); define("PAGE_KEYWORDS", t("delete_file_meta_keywords", "delete, remove, file")); // load file $file = null; if (isset($_REQUEST['u'])) { // figure out the delete hash $deleteHash = ''; foreach($_REQUEST AS $k=>$item) { if(strlen($k) == 32) { $deleteHash = $k; } } // only keep the initial part if there's a forward slash $shortUrl = current(explode("/", str_replace("~d", "", $_REQUEST['u']))); $file = file::loadByShortUrl($shortUrl); // check it's active if($file->deleteHash != $deleteHash) { $file = null; } } // do we have a return page $returnAccount = false; if((isset($_REQUEST['returnAccount'])) && ((int)$_REQUEST['returnAccount'] == 1)) { $returnAccount = true; } /* load file details */ if(!$file) { /* if no file found, redirect to home page */ redirect(WEB_ROOT . "/index." . SITE_CONFIG_PAGE_EXTENSION); } /* delete file if submitted */ if ((int) $_REQUEST['delete']) { // reomve file $file->removeByUser(); // redirect to confirmation page $resultMsg = t('file_permanently_removed', 'File permanently removed.'); if($file->errorMsg) { $resultMsg = $file->errorMsg; } if($returnAccount) { redirect(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION.'?s='.urlencode($resultMsg)); } redirect(CORE_WEB_ROOT . "/error." . SITE_CONFIG_PAGE_EXTENSION.'?e='.urlencode($resultMsg)); } // get file path $filePath = file::getFileDomainAndPath($file->id); require_once('_header.php'); ?> <div class="contentPageWrapper"> <?php if (isErrors()) { echo outputErrors(); } ?> <!-- delete file form --> <div class="pageSectionMain ui-corner-all"> <div class="pageSectionMainInternal"> <div id="pageHeader"> <h2><?php echo t("delete_file", "Delete File"); ?></h2> </div> <div> <p class="introText"> <?php echo t("delete_file_intro", "Please confirm whether to delete the file below. Note: Once deleted, this file is removed from our servers and can not be recovered."); ?> <br/><br/> </p> <form class="international" method="post" action="<?php echo $file->getDeleteUrl($returnAccount, true); ?>" id="form-join" AUTOCOMPLETE="off"> <ul> <li class="field-container"> <?php echo t('file', 'File'); ?>: <a href="<?php echo _CONFIG_SITE_PROTOCOL; ?>://<?php echo $filePath; ?>/<?php echo $file->shortUrl; ?>" target="_blank"><?php echo $file->originalFilename; ?></a> (<?php echo formatSize($file->fileSize); ?>) </li> <li class="field-container"> <span class="field-name"></span> <input name="delete" type="hidden" value="1"/> <input name="submitme" type="hidden" value="1"/> <input name="returnAccount" type="hidden" value="<?php echo (int)$returnAccount; ?>"/> <input tabindex="99" type="submit" name="submit" value="<?php echo t("delete_file", "Delete File"); ?>" class="submitInput" /> <input tabindex="100" type="reset" name="reset" value="<?php echo t("cancel", "Cancel"); ?>" class="cancelInput" onClick="window.location='<?php echo $returnAccount?(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION):WEB_ROOT; ?>';" /> </li> </ul> </form> <div class="clear"></div> </div> </div> </div> <?php include_once("_bannerRightContent.inc.php"); ?> <div class="clear"><!-- --></div> </div> <?php require_once('_footer.php'); ?>
Posts: 15
Joined: 31 Dec 2013 17:06
Adam as you can see not only I have this problem may specifically have a look at this problem?
// make sure we're on the correct server for deletes
if($file->getFullShortUrl(true) != $file->getFullShortUrl())
{
redirect($file->getDeleteUrl($returnAccount, true));
}