cvs: docweb /www checkent.php
[email protected] ("Philip Olson")
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <cvsphilip1204438623@cvsserver> |
philip Sun Mar 2 06:17:03 2008 UTC
Modified files:
/docweb/www checkent.php
Log:
Added a little error handling, as some projects don't use this feature
http://cvs.php.net/viewvc.cgi/docweb/www/checkent.php?r1=1.4&r2=1.5&diff_format=u
Index: docweb/www/checkent.php
diff -u docweb/www/checkent.php:1.4 docweb/www/checkent.php:1.5
--- docweb/www/checkent.php:1.4 Tue Jan 25 19:52:55 2005
+++ docweb/www/checkent.php Sun Mar 2 06:17:03 2008
@@ -17,7 +17,7 @@
| Mehdi Achour <[email protected]> |
| Sean Coates <[email protected]> |
+----------------------------------------------------------------------+
-$Id: checkent.php,v 1.4 2005/01/25 19:52:55 sean Exp $
+$Id: checkent.php,v 1.5 2008/03/02 06:17:03 philip Exp $
*/
require_once '../include/init.inc.php';
@@ -38,7 +38,17 @@
FROM
meta_info
";
-list($startTime, $endTime, $schemes) = sqlite_fetch_array(sqlite_query($sqlite, $sql));
+
+$metaQ = sqlite_query($sqlite, $sql);
+if (!$metaQ) {
+ echo site_header('docweb.common.header.checkent');
+ echo '<p>No meta info about this project was found to check.</p>'; // @@@ template this
+ echo site_footer();
+ exit();
+
+}
+
+list($startTime, $endTime, $schemes) = sqlite_fetch_array($metaQ);
$entData = array();
$sql = "
@@ -51,7 +61,16 @@
ORDER BY
check_result, entity
";
+
$urlsQ = sqlite_query($sqlite, $sql);
+if (!$urlsQ) {
+ echo site_header('docweb.common.header.checkent');
+ echo '<p>No URLs for this project were found to check.</p>'; // @@@ template this
+ echo site_footer();
+ exit();
+
+}
+
while ($row = sqlite_fetch_array($urlsQ)) {
$entData[$row['check_result']][] = $row;
}