Author Topic: [1.7.8] Database Backup shows only *.sql files (no *.sql.gz)  (Read 15321 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[1.7.8] Database Backup shows only *.sql files (no *.sql.gz)
« on: August 21, 2010, 07:37:42 AM »
When 4images is setup to use compression (Settings -> Use GZip compression), the database backup compresses backup files into .gz files and thes files not being showed in backup list.

The fix is simple:
in admin/backup.php find:
    if (is_file(ROOT_PATH.DATABASE_DIR."/".$file) && $file != "." && $file != ".." && preg_match("/\.sql$/i",$file)) {

Replace it with:
    if (is_file(ROOT_PATH.DATABASE_DIR."/".$file) && $file != "." && $file != ".." && preg_match("/\.sql/i",$file)) {
« Last Edit: October 13, 2010, 02:36:07 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [1.7.8] Database Backup shows only *.sql files (no *.sql.gz)
« Reply #1 on: October 13, 2010, 10:18:23 PM »
Hi,

thx Vano :thumbup:
Is the restore also working after that change or is it only
to show, download and delete them?

I don't want to test it out for nothing ;)


Greetz X23

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7.8] Database Backup shows only *.sql files (no *.sql.gz)
« Reply #2 on: October 14, 2010, 12:59:32 AM »
nothing else has been changed, so it should work as before.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [1.7.8] Database Backup shows only *.sql files (no *.sql.gz)
« Reply #3 on: October 14, 2010, 01:42:41 AM »
nothing else has been changed, so it should work as before.

Hi,

never used it... so i only wanted to get sure ;) thx


Greetz X23

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--