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 [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
04 Aug 2002 08:32:06postnuke_official/html/modules/commentspnuser.php,1.10,1.11 pnuserapi.php,1.16,1.17Carl P. Corliss
 There she was just a walking down the street, singin - doo wah diddy diddy doo diddy dum..... :)

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

Modified Files:
	pnuser.php pnuserapi.php 
Log Message:
There she was just a walking down the street, singin - doo wah diddy diddy doo diddy dum..... :)
umm.. yeah.. bugfixes ;)


Index: pnuser.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/pnuser.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pnuser.php	4 Aug 2002 03:40:36 -0000	1.10
--- pnuser.php	4 Aug 2002 08:32:04 -0000	1.11
***************
*** 34,37 ****
--- 34,38 ----
  function comments_user_main($args) {
  
+     pnModAPILoad('comments','user');
      $settings = pnModAPIFunc('comments','user','GetOptions');
  
***************
*** 40,44 ****
      $args['itemid'] = 0;
      $args['returnurl'] = pnModURL('comments','user','main');
!     $args['sortby'] = _COM_SORTBY_LINEAGE;    
      // load the display settings
      pnModAPILoad('comments');
--- 41,47 ----
      $args['itemid'] = 0;
      $args['returnurl'] = pnModURL('comments','user','main');
!     $args['sortby'] = $settings['sortby'];
!     $args['order'] = $settings['order'];
!     $args['depth'] = $settings['depth'];    
      // load the display settings
      pnModAPILoad('comments');

Index: pnuserapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/pnuserapi.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** pnuserapi.php	4 Aug 2002 03:40:36 -0000	1.16
--- pnuserapi.php	4 Aug 2002 08:32:04 -0000	1.17
***************
*** 35,40 ****
  
      if (pnVarCleanFromInput('depth') || pnVarCleanFromInput('rendertype') || pnVarCleanFromInput('order')) {
!         list($depth, $order, $rendertype) = pnVarCleanFromInput('depth','order','rendertype');
!         $settings = compact('depth','order','rendertype');
          return $settings;
  
--- 35,45 ----
  
      if (pnVarCleanFromInput('depth') || pnVarCleanFromInput('rendertype') || pnVarCleanFromInput('order')) {
! 
!         $depth = pnVarCleanFromInput('depth');
!         $order = pnVarCleanFromInput('order');
!         $rendertype = pnVarCleanFromInput('rendertype');
!         $sortby = pnVarCleanFromInput('sortby');
!         $settings = compact('depth','order','rendertype', 'sortby');
! 
          return $settings;
  
***************
*** 44,47 ****
--- 49,53 ----
                       'sortby' => pnSessionGetVar('comments_sortby'),
                       'rendertype' => pnSessionGetVar('comments_rendertype'));
+                      
      } elseif (pnUserLoggedIn()) {  // user logged in -- use user settings
          return array('depth' => pnUserGetVar('comments_depth'),
***************
*** 49,52 ****
--- 55,59 ----
                       'sortby' => pnUserGetVar('comments_sortby'),
                       'rendertype' => pnUserGetVar('comments_rendertype'));
+                      
      } elseif (!pnUserLoggedIn()) {   // user not logged in -- use admin settings
          return array('depth' => pnModGetVar('comments','depth'),
***************
*** 54,62 ****
                       'sortby' => pnModGetVar('comments','sortby'),
                       'rendertype' => pnModGetVar('comments','rendertype'));
      } else {  // couldn't find settings! use basic defaults
!         return array('depth' => -1,
                       'order' => _COM_SORT_ASC,
                       'sortby' => _COM_SORTBY_LINEAGE,
!                      'rendertype' => 'flat');
      }
  }
--- 61,70 ----
                       'sortby' => pnModGetVar('comments','sortby'),
                       'rendertype' => pnModGetVar('comments','rendertype'));
+                      
      } else {  // couldn't find settings! use basic defaults
!         return array('depth' => _COM_FULL_TREE,
                       'order' => _COM_SORT_ASC,
                       'sortby' => _COM_SORTBY_LINEAGE,
!                      'rendertype' => _COM_VIEW_THREADED);
      }
  }
***************
*** 132,136 ****
  
      if (empty($args) || !is_array($args) || (count($args) < 2)) {
!         $msg = pnML('Missing required arguments to function pncomments_add()');
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'SYSTEM',
                         new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
--- 140,144 ----
  
      if (empty($args) || !is_array($args) || (count($args) < 2)) {
!         $msg = pnML('Missing required arguments to function get()');
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'SYSTEM',
                         new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
***************
*** 141,146 ****
  
      if (!isset($modid) || !isset($itemid)) {
!         pnSessionSetVar('errormsg', _MODARGSERROR);
!         return false;
      }
  
--- 149,156 ----
  
      if (!isset($modid) || !isset($itemid)) {
!         $msg = pnML('Missing required arguments to function get()');
!         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'SYSTEM',
!                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
!         return;
      }
  
***************
*** 155,158 ****
--- 165,173 ----
      }
  
+     if (!isset($sortby)) {
+         $sortby = $settings['sortby'];
+     }
+     
+ 
      // if the commentid isn't set, is less then zero or isn't a number
      // then reset the comment id to zero.
***************
*** 166,169 ****
--- 181,185 ----
      $args['depth'] = $depth;
      $args['order'] = $order;
+     $args['sortby'] = $sortby;
      
      $comlist = pnComments_Get($args);


Directory filter : [ all ] / postnuke_official / html / modules / comments [ 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