Download Mod 5.0.5 Delete file Bug

Enthält archivierte Beiträge von Hotschi's Board zum Download MOD.
Posten ist hier nicht möglich, bitte das Supportforum dafür verwenden!
Gesperrt
intelx86

Download Mod 5.0.5 Delete file Bug

Beitrag von intelx86 »

Go to the Moderator panel.
Select a file and click Delete.
Check the box "Also delete the file(s)".
Click Yes.

The file will never be removed.

The problem is that in dl_mod/includes/dl_modcp.php
line 487, you check the parameter del_file if it is true.
This parameter cannot take the value True. It only takes the values Yes and No.
Purpose of the parameter del_file is to check the users answer whether to
delete the file information or not.
Note: The administration panel doesn't have this problem.

Solution:

Code: Alles auswählen

#
#-----[ OPEN ]----------------------------------------------------------
#
dl_mod/includes/dl_modcp.php

#
#-----[ FIND ]----------------------------------------------------------
#
				if ($del_file)

#
#-----[ REPLACE WITH ]--------------------------------------------------
#
				if ($delete_file_too)

#
#-----[ OPEN ]----------------------------------------------------------
#
downloads.php

#
#-----[ FIND ]----------------------------------------------------------
#
	'del_file' => 'del_file'

#
#-----[ REPLACE WITH ]--------------------------------------------------
#
	'del_file' => 'del_file',
	'delete_file_too' => 'delete_file_too'

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
oxpus

Beitrag von oxpus »

Known issue.
The now released version will fix this.
intelx86

Beitrag von intelx86 »

Using version 5.0.6:
Still not working.

On the other hand, my solution works!
oxpus

Beitrag von oxpus »

Ompf, the new files have the same changes as you've posted ...
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:Ompf, the new files have the same changes as you've posted ...
I've downloaded again 5.0.6. No such change!
MD5 hash 0843B97543982ADCBD66B52F93D4F85E for file 1_Download_Mod_5_0_6.zip
oxpus

Beitrag von oxpus »

Okay, the dl_modcp.php was not named for the update, but this file and the downloads.php are modded as you posted...
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:Okay, the dl_modcp.php was not named for the update, but this file and the downloads.php are modded as you posted...
I still cannot find the changes. See the zip file that you've uploaded. Just tell me the lines for downloads.php which concern me.

The only changes for downloads.php where

Code: Alles auswählen

	$page_title = $lang['Downloads'];
is replaced by

Code: Alles auswählen

	$page_title = $lang['Download'] . ' - ' . $dl_files['description'];


And

Code: Alles auswählen

	$page_title = $lang['Downloads'];

	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
is replaced by

Code: Alles auswählen

	$path_dl_array = array();
	$page_title = $lang['Downloads'] . (($cat) ? ' ' . $dl_mod->dl_nav($cat, 'text') : '');
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
	$path_dl_array = array();
After

Code: Alles auswählen

			$long_desc = stripslashes($dl_files[$i]['long_desc']);
is added

Code: Alles auswählen

			if (intval($dl_config['limit_desc_on_index']) && strlen($long_desc) > intval($dl_config['limit_desc_on_index']))
			{
				$long_desc = substr($long_desc, 0, intval($dl_config['limit_desc_on_index'])) . ' [...]';
			}
And

Code: Alles auswählen

		'U_DL_CAT' => ($cat) ? $dl_mod->dl_nav($cat) : '',
is replaced by

Code: Alles auswählen

		'U_DL_CAT' => ($cat) ? $dl_mod->dl_nav($cat, 'url') : '',
oxpus

Beitrag von oxpus »

NOT on download.php only, look on dl_modcp.php, too!!!
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:NOT on download.php only, look on dl_modcp.php, too!!!
dl_modcp.php has no changes. Only the version of the mod was changed.
oxpus

Beitrag von oxpus »

??? The download package form here is the latest one with the fixed dl_modcp.php.
Exactly the same files as I uses and on my boards files will be deleted, if choosen...

Are you sure, you have updated the dl_modcp.php on your forum?

The code form dl_modcp.php from the package you can download here:

Code: Alles auswählen

				if ($del_file)
				{
					@unlink($dl_config['dl_path'] . $path . $file_name);
				}
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:??? The download package form here is the latest one with the fixed dl_modcp.php.
Exactly the same files as I uses and on my boards files will be deleted, if choosen...

Are you sure, you have updated the dl_modcp.php on your forum?
I've downloaded once more the 5.0.6 version. (1_Download_Mod_5_0_6.zip MD5 hash: 0843B97543982ADCBD66B52F93D4F85E)

The only deference between the dl_modcp.php include in the above file and the dl_modcp.php included in Download_Mod_5_0_5.zip (MD5 hash:D321B5E0DED70A8E0DDBC4DA58BB27C6) is at line 6, the version number. Maybe you uploaded wrong file. I've solved this problem but i advise you tou upload the correct files to your server for the other users of Download Mod.

If you don't believe me check by yourself with UltraCompare
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:??? The download package form here is the latest one with the fixed dl_modcp.php.
Exactly the same files as I uses and on my boards files will be deleted, if choosen...

Are you sure, you have updated the dl_modcp.php on your forum?
I've downloaded once more the 5.0.6 version. (1_Download_Mod_5_0_6.zip MD5 hash: 0843B97543982ADCBD66B52F93D4F85E)

The only deference between the dl_modcp.php include in the above file and the dl_modcp.php included in Download_Mod_5_0_5.zip (MD5 hash:D321B5E0DED70A8E0DDBC4DA58BB27C6) is at line 6, the version number. Maybe you uploaded wrong file. I've solved this problem but i advise you tou upload the correct files to your server for the other users of Download Mod.

If you don't believe me check by yourself with UltraCompare
oxpus

Beitrag von oxpus »

:( I uploaded the MOD now again (the same as at least), so retry...
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben::( I uploaded the MOD now again (the same as at least), so retry...
You uploaded exactly the same version! I'll stop posting in this thread because there is no point in doing so. I hope 5.0.7 will have the right changes. :grr:
oxpus

Beitrag von oxpus »

??? The download on oxpus.de (my board) is now exactly the same as you can find here.
And on dl_modcp.php the $del_file variable is still in use there...

Use the dl_modcp.php from the "latest" download package and search for the code I've posted here:
http://www.phpbb.hotschi.de/board/viewt ... =2233#2233

AND BTW:
The dl_modcp.php will not be changes from know to 5.0.7. It's already working on deleting download AND file...
Gesperrt