[Comoblog-commit] comoblog/include .cvsignore, NONE, 1.1 libraries.inc.php, 1.13, 1.14
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:35
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/include Modified Files: libraries.inc.php Added Files: .cvsignore Log Message: work in progress, ditching this server cos its borked ;( Index: libraries.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/libraries.inc.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- libraries.inc.php 16 Aug 2006 16:46:36 -0000 1.13 +++ libraries.inc.php 22 Oct 2006 11:44:01 -0000 1.14 @@ -14,6 +14,12 @@ function in_supported_patch_list ($ver) { if ($ver == "1.0") return true; + else if ($ver == "1.1") + return true; + else if ($ver == "1.2") + return true; + else if ($ver == "1.3") + return true; else return false; } @@ -32,7 +38,7 @@ { $errors = array(); - require (dirname(__FILE__).'/../admin/include/xml2array.inc.php'); + require_once (dirname(__FILE__).'/../admin/include/xml2array.inc.php'); $xmlparse = &new ParseXML; $xml = $xmlparse->GetXMLTree($script_name); @@ -91,14 +97,16 @@ $query = "delete from ".CFG_MYSQL_TABPREFIX."comments where post_id = '".$post_id."'"; $res = mysql_query($query); - + //TODO - clear cache? - - + + } + + function posts_list ($offset, $howmany) { if (CFG_USE_PATH_INFO == 'no') @@ -186,7 +194,7 @@ function hits_howmany () { - $query = "select count(contentextra2_id) from easymoblog_mod_contentextra2"; + $query = "select count(contentextra2_id) from comoblog_mod_contentextra2"; $res = mysql_query($query); if ($res) { $howmany = mysql_result($res,0,0); @@ -198,7 +206,7 @@ function post_first() { - $query = "select FROM_UNIXTIME(min(post_mail_date)) from easymoblog_posts"; + $query = "select FROM_UNIXTIME(min(post_mail_date)) from comoblog_posts"; $res = mysql_query($query); if ($res) { $howmany = mysql_result($res,0,0); @@ -209,7 +217,7 @@ function comments_howmany () { - $query = "select count(comment_id) from easymoblog_comments"; + $query = "select count(comment_id) from comoblog_comments"; $res = mysql_query($query); if ($res) { $howmany = mysql_result($res,0,0); @@ -539,16 +547,15 @@ } function comment_list ($post_id) { - $query = " - select c.* - from ".CFG_MYSQL_TABPREFIX."comments c - where c.post_id = '".$post_id."' - order by c.comment_added ". CFG_COMMENT_SORT_ORDER . " - "; + $query = "select c.* from ".CFG_MYSQL_TABPREFIX."comments c where c.post_id = '".$post_id."' and c.comment_live='Y' order by c.comment_added " ; //TODO:: add param for CFG_COMMENT_SORT_ORDER + + error_log($query); $res = mysql_query($query); - if (!$res || !mysql_num_rows($res)) - return (false); + if (!$res || !mysql_num_rows($res)){ + error_log("RES - " . mysql_errno() . " : " . mysql_error(). " : " .$query . " : " . $res); + return (false); + } $c = 0; while ($row = mysql_fetch_array($res)) { @@ -556,7 +563,7 @@ $comments[$c]['comment_date'] = getdate($row['comment_added']); if ($comments[$c]['comment_date']['hours'] < 10) $comments[$c]['comment_date']['hours'] = '0'.$comments[$c]['comment_date']['hours']; if ($comments[$c]['comment_date']['minutes'] < 10) $comments[$c]['comment_date']['minutes'] = '0'.$comments[$c]['comment_date']['minutes']; - + error_log("Processed comment " . $c); $c++; } @@ -886,7 +893,7 @@ '".addslashes($post_id)."', '".addslashes($cache_content)."', now()+0, - now()+"/$cache_age." + now()+"/$cache_age." ) "; } --- NEW FILE: .cvsignore --- param.inc.comoblog.local.php |