Ignore:
Timestamp:
Apr 3, 2014, 8:03:58 PM (10 years ago)
Author:
mistic100
Message:

add recursive option for album filter
fix choosen display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/maintain.inc.php

    r27300 r28063  
    119119    pwg_query('UPDATE `' . $this->table . '` SET cond = "" WHERE type = "limit" AND cond = "limit";');
    120120    pwg_query('ALTER TABLE `' . $this->table . '` CHANGE `cond` `cond` VARCHAR(32) NULL ;');
     121   
     122    $result = pwg_query('SELECT COUNT(*) FROM `' . $this->table . '` WHERE type="album" AND (value NOT LIKE "true,%" OR value NOT LIKE "false,%");');
     123    if (pwg_db_num_rows(pwg_query($query)))
     124    {
     125      pwg_query('UPDATE `' . $this->table . '` SET value = CONCAT("false,", value) WHERE type="album";');
     126    }
    121127
    122128    $this->installed = true;
Note: See TracChangeset for help on using the changeset viewer.