[geeklog-cvs] Geeklog-1.x/system/classes story.class.php, 1.23, 1.24

Dirk Haun dhaun at qs1489.pair.com
Sat Apr 12 15:28:44 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system/classes
In directory qs1489.pair.com:/tmp/cvs-serv48786/system/classes

Modified Files:
	story.class.php 
Log Message:
Fixed handling of expire time when editing a story submission


Index: story.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/story.class.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** story.class.php	20 Feb 2008 17:47:25 -0000	1.23
--- story.class.php	12 Apr 2008 19:28:41 -0000	1.24
***************
*** 370,374 ****
          // Overwrite the date with the timestamp.
          $this->_date = $story['unixdate'];
!         $this->_expire = $story['expireunix'];
          // Store the original SID
          $this->_originalSid = $this->_sid;
--- 370,379 ----
          // Overwrite the date with the timestamp.
          $this->_date = $story['unixdate'];
!         if (!empty($story['expireunix'])) {
!             $this->_expire = $story['expireunix'];
!         } else {
!             $this->_expire = '';
!         }
! 
          // Store the original SID
          $this->_originalSid = $this->_sid;
***************
*** 389,392 ****
--- 394,398 ----
      {
          global $_TABLES, $_CONF, $_USER;
+ 
          $sid = addslashes(COM_applyFilter($sid));
  
***************
*** 477,483 ****
                  }
                  $this->loadFromArray($story);
!                 $access
!                 = SEC_hasAccess($story['owner_id'], $story['group_id'], $story['perm_owner'], $story['perm_group'],
!                                     $story['perm_members'], $story['perm_anon']);
                  $this->_access = min($access, SEC_hasTopicAccess($this->_tid));
  
--- 483,493 ----
                  }
                  $this->loadFromArray($story);
!                 if (!isset($story['owner_id'])) {
!                     $story['owner_id'] = 1;
!                 }
!                 $access = SEC_hasAccess($story['owner_id'], $story['group_id'],
!                             $story['perm_owner'], $story['perm_group'],
!                             $story['perm_members'], $story['perm_anon']);
! 
                  $this->_access = min($access, SEC_hasTopicAccess($this->_tid));
  
***************
*** 508,512 ****
              $this->_trackbackcode = $_CONF['trackback_code'];
              $this->_featured = 0;
!             $this->_expire = '0000-00-00 00:00:00';
              $this->_expiredate = 0;
  
--- 518,522 ----
              $this->_trackbackcode = $_CONF['trackback_code'];
              $this->_featured = 0;
!             $this->_expire = time();
              $this->_expiredate = 0;
  




More information about the geeklog-cvs mailing list