cvs: docweb /include lib_revcheck.inc.php
[email protected] ("Nuno Lopes")
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <cvsnlopess1139177993@cvsserver> |
nlopess Sun Feb 5 22:19:53 2006 UTC
Modified files:
/docweb/include lib_revcheck.inc.php
Log:
skip some 'not in EN tree' special files (like translation.xml)
http://cvs.php.net/viewcvs.cgi/docweb/include/lib_revcheck.inc.php?r1=1.13&r2=1.14&diff_format=u
Index: docweb/include/lib_revcheck.inc.php
diff -u docweb/include/lib_revcheck.inc.php:1.13 docweb/include/lib_revcheck.inc.php:1.14
--- docweb/include/lib_revcheck.inc.php:1.13 Sun Feb 5 21:59:27 2006
+++ docweb/include/lib_revcheck.inc.php Sun Feb 5 22:19:53 2006
@@ -280,21 +280,20 @@
old_files
WHERE
- lang="' . $lang . '"
- ';
+ lang="' . $lang . '"';
$result = sqlite_query($idx, $sql);
- $num = sqlite_num_rows($result);
- if ($num == 0) {
- // only 'null' will produce a 0 with sizeof()
- return null;
- } else {
- $tmp = array();
- while ($r = sqlite_fetch_array($result, SQLITE_ASSOC)) {
- $tmp[] = array('dir' => $r['dir'], 'size' => $r['size'], 'file' => $r['file']);
- }
- return $tmp;
+
+ $tmp = array();
+ $special_files = array(
+ 'translation.xml'=>1,
+ );
+
+ while ($r = sqlite_fetch_array($result, SQLITE_ASSOC)) {
+ if (isset($special_files[$r['file']])) continue; // skip some files
+ $tmp[] = array('dir' => $r['dir'], 'size' => $r['size'], 'file' => $r['file']);
}
+ return $tmp;
}
function get_description($idx, $lang)