]> mj.ucw.cz Git - pciids.git/commitdiff
Merge branch 'master' of /home/vorner/pciids
authorThe PCI ID Mail Robot <pciids@ucw.cz>
Sat, 4 Oct 2008 18:36:24 +0000 (20:36 +0200)
committerThe PCI ID Mail Robot <pciids@ucw.cz>
Sat, 4 Oct 2008 18:36:24 +0000 (20:36 +0200)
PciIds/DBQ.pm
scripts/pciids-export

index d3893695b212def42bcb745fdf09631418e4f896..0446fb43433ad3803290a31f0681b8717ff4a241 100644 (file)
@@ -113,8 +113,8 @@ sub new( $ ) {
                'dropnotifsxmpp' => 'DELETE FROM pending WHERE notification = 1 AND EXISTS ( SELECT 1 FROM users WHERE users.id = pending.user AND nextxmpp <= ? )',
                'dropnotifsmail' => 'DELETE FROM pending WHERE notification = 0 AND EXISTS ( SELECT 1 FROM users WHERE users.id = pending.user AND nextmail <= ? )',
                'time' => 'SELECT NOW()',
-               'searchname' => 'SELECT l.id, l.name, p.name FROM locations AS l JOIN locations AS p ON l.parent = p.id WHERE l.name LIKE ? ORDER BY l.id',
-               'searchlocalname' => 'SELECT l.id, l.name, p.name FROM locations AS l JOIN locations AS p ON l.parent = p.id WHERE l.name LIKE ? AND l.id LIKE ? ORDER BY l.id',
+               'searchname' => 'SELECT l.id, l.name, p.name FROM locations AS l JOIN locations AS p ON l.parent = p.id WHERE l.name LIKE ? ORDER BY LENGTH(l.id), l.id',
+               'searchlocalname' => 'SELECT l.id, l.name, p.name FROM locations AS l JOIN locations AS p ON l.parent = p.id WHERE l.name LIKE ? AND l.id LIKE ? ORDER BY LENGTH(l.id), l.id',
                'hasChildren' => 'SELECT DISTINCT 1 FROM locations WHERE parent = ?',
                'hasMain' => 'SELECT DISTINCT 1 FROM locations WHERE id = ? AND mainhistory IS NOT NULL',
                'notif-exists' => 'SELECT DISTINCT 1 FROM notifications WHERE user = ? AND ( location = ? OR ( recursive = 1 AND type <= 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) )'
index b459305376f09c085db6b9d8c39b4f70c656bf55..43fb26a29c195008abace917d4cc0b3deb8136d8 100755 (executable)
@@ -27,15 +27,18 @@ cat cf/class_head.ids >> ../pci.ids.new
 cd ..
 if ! [ -f docs/pci.ids.nohead ] || ! cmp docs/pci.ids.nohead pci.ids.new >/dev/null ; then
        cp perl/cf/head.ids pci.ids.final
-       echo '# Version: '`date +%Y%m%d` >> pci.ids.final
+       echo '# Generated at: '`date '+%F %T'` >> pci.ids.final
        echo >> pci.ids.final
        cat pci.ids.new >> pci.ids.final
 #      ln -f pci.ids.final ~/origs/00-current
        ln -f pci.ids.final docs/pci.ids
+       ln -f pci.ids.final docs/v2.2/pci.ids
        ln -f pci.ids.new docs/pci.ids.nohead
        rm pci.ids.final
        bzip2 -9c <docs/pci.ids >docs/pci.ids.bz2
+       ln -f docs/pci.ids.bz2 docs/v2.2/
        gzip -9c <docs/pci.ids >docs/pci.ids.gz
+       ln -f docs/pci.ids.gz docs/v2.2/
 fi
 
 rm pci.ids.new