]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix login before updating to schema 88
authorAndrew Dolgov <fox@fakecake.org>
Sun, 22 Jan 2012 08:04:57 +0000 (12:04 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Sun, 22 Jan 2012 08:04:57 +0000 (12:04 +0400)
include/functions.php

index 357fff78723fb3e6e0eb6efaa965e08a399f10fb..f0ff2ce2856ccf93cfcfebf3c51cda244093aa86 100644 (file)
                                        }
                                }
 
-                       } else {
+                       } else if (get_schema_version($link) > 87) {
                                $result = db_query($link, "SELECT salt FROM ttrss_users WHERE
                                        login = '$login'");
 
                                                login = '$login' AND pwd_hash = '$pwd_hash'";
 
                                }
+                       } else {
+                               $query = "SELECT id,login,access_level,pwd_hash
+                        FROM ttrss_users WHERE
+                                       login = '$login' AND (pwd_hash = '$pwd_hash1' OR
+                                               pwd_hash = '$pwd_hash2')";
                        }
 
                        $result = db_query($link, $query);