Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_official / html / modules / comments / backend [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
12 Aug 2002 17:31:43postnuke_official/html/modules/comments/backendbackend.php,1.11,1.12Mike
 quick fix (tm) to at least *show* imported article comments - still lots of TODOs :-)

Update of /home/cvsroot/postnuke_official/html/modules/comments/backend
In directory ns7.hostnuke.net:/tmp/cvs-serv28963/backend

Modified Files:
	backend.php 
Log Message:
quick fix (tm) to at least *show* imported article comments - still lots of TODOs :-)


Index: backend.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/backend/backend.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** backend.php	10 Aug 2002 13:57:34 -0000	1.11
--- backend.php	12 Aug 2002 17:31:40 -0000	1.12
***************
*** 35,38 ****
--- 35,40 ----
      // @param comment the new comment
      // @param hostname the hostname (or ip address) of the author
+     // @param cid the id of the comment
+     // @param date the date for the comment
      // @returns bool
      // @return true|false (success|failure)
***************
*** 50,57 ****
          }
          
!         if (!pnModAvailable($modid)) {
              $msg = pnML('The module you specified is not available.');
              pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
                             new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
              return;
          }
--- 52,61 ----
          }
          
! $modinfo = pnModGetInfo($modid);
!         if (empty($modinfo['name']) || !pnModAvailable($modinfo['name'])) {
              $msg = pnML('The module you specified is not available.');
              pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
                             new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
+ die ('module ' . $modid);
              return;
          }
***************
*** 68,72 ****
  
          // acquire a next available id
!         $nextid = $dbconn->GenId($pntable['comments']);
  
          // if there is a parent id then grab it's lineage and depth
--- 72,84 ----
  
          // acquire a next available id
!         if (!empty($cid)) {
!             $nextid = $cid;
!         } else {
!             // this won't work for MySQL - you need to insert, and then retrieve the last id
!             $nextid = $dbconn->GenId($pntable['comments']);
!         }
!         if (empty($date)) {
!             $date = time();
!         }
  
          // if there is a parent id then grab it's lineage and depth
***************
*** 90,111 ****
                      
          // if the depth of the parent lineage is greater than 1
!         if (pn_Comments_GetDepth($lineage) > 1) {
              $lineage = "$lineage:".pnComments_Dec2Hex($nextid);
          } else {
!             $lineage = $nextid;
          }
  
!         $nextid = $dbconn->GenId($pntable[comments]);
!         $sql = "INSERT INTO $pntable[comments] ($column[cid], $column[modid], $column[itemid], $column[author], 
                              $column[title], $column[comment], $column[hostname], $column[lineage]) 
!                 VALUES('{$nextid}','{$modid}','{$itemid}','{$author}','{$title}','{$comment}','{$hostname}')";
  
          $result = $dbconn->Execute($sql);
  
          // if there was a problem with the insert, return false
!         if($dbconn->ErrorNo()<>0 || $dbconn->Affected_Rows()) {
              $msg = pnML('There was a problem adding your comment.');
              pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
                             new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
              return;
          }
--- 102,123 ----
                      
          // if the depth of the parent lineage is greater than 1
!         if ($depth > 0) {
              $lineage = "$lineage:".pnComments_Dec2Hex($nextid);
          } else {
!             $lineage = pnComments_Dec2Hex($nextid);
          }
  
!         $sql = "INSERT INTO $pntable[comments] ($column[cid], $column[comdate], $column[modid], $column[itemid], $column[author], 
                              $column[title], $column[comment], $column[hostname], $column[lineage]) 
!                 VALUES('{$nextid}','{$date}','{$modid}','{$itemid}','{$author}','{$title}','{$comment}','{$hostname}','{$lineage}')";
  
          $result = $dbconn->Execute($sql);
  
          // if there was a problem with the insert, return false
!         if($dbconn->ErrorNo()<>0) {
              $msg = pnML('There was a problem adding your comment.');
              pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE',
                             new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
+ die ($dbconn->ErrorMsg() . ' for ' . $sql);
              return;
          }


Directory filter : [ all ] / postnuke_official / html / modules / comments / backend [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3