[geeklog-cvs] Geeklog-1.x/system lib-story.php,1.105,1.106

Dirk Haun dhaun at qs1489.pair.com
Mon Sep 17 15:29:09 EDT 2007


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

Modified Files:
	lib-story.php 
Log Message:
Temp. solution: Only use atom:summary when we have both an intro and a body text. Tempting as it may be, atom:summary is not the same as our introtext.


Index: lib-story.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-story.php,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** lib-story.php	17 Sep 2007 18:13:48 -0000	1.105
--- lib-story.php	17 Sep 2007 19:29:07 -0000	1.106
***************
*** 1035,1046 ****
      }
  
!     /* Store the summary as introtext */
!     if (!empty($args['summary'])) {
          $args['introtext'] = $args['summary'];
!     }
! 
!     /* Store the content as bodytext */
!     if (!empty($args['content'])) {
!         $args['bodytext'] = $args['content'];
      }
  
--- 1035,1047 ----
      }
  
!     if (!empty($args['summary']) && !empty($args['content'])) {
          $args['introtext'] = $args['summary'];
!         $args['bodytext']  = $args['content'];
!     } else if (!empty($args['content'])) {
!         $args['introtext'] = $args['content'];
!         $args['bodytext']  = '';
!     } else if (!empty($args['summary'])) {
!         $args['introtext'] = $args['summary'];
!         $args['bodytext']  = '';
      }
  
***************
*** 1069,1077 ****
  
      if (empty($args['group_id'])) {
!         $args['group_id'] = SEC_getFeatureGroup('story.edit', $_USER['uid']);;
      }
  
      if (empty($args['postmode'])) {
          $args['postmode'] = $_CONF['postmode'];
      }
  
--- 1070,1087 ----
  
      if (empty($args['group_id'])) {
!         $args['group_id'] = SEC_getFeatureGroup('story.edit', $_USER['uid']);
      }
  
      if (empty($args['postmode'])) {
          $args['postmode'] = $_CONF['postmode'];
+ 
+         if (!empty($args['content_type'])) {
+             if ($args['content_type'] == 'text') {
+                 $args['postmode'] = 'text';
+             } else if (($args['content_type'] == 'html')
+                     || ($args['content_type'] == 'xhtml')) {
+                 $args['postmode'] = 'html';
+             }
+         }
      }
  
***************
*** 1497,1502 ****
              $output['category']     = array($output['tid']);
              $output['updated']      = date('c', $output['date']);
!             $output['summary']      = $output['introtext'];
!             $output['content']      = $output['bodytext'];
              $output['content_type'] = ($output['postmode'] == 'html')?'html':'text';
  
--- 1507,1516 ----
              $output['category']     = array($output['tid']);
              $output['updated']      = date('c', $output['date']);
!             if (empty($output['bodytext'])) {
!                 $output['content']  = $output['introtext'];
!             } else {
!                 $output['summary']  = $output['introtext'];
!                 $output['content']  = $output['bodytext'];
!             }
              $output['content_type'] = ($output['postmode'] == 'html')?'html':'text';
  
***************
*** 1573,1578 ****
                  $output_item['category']     = array($output_item['tid']);
                  $output_item['updated']      = date('c', $output_item['date']);
!                 $output_item['summary']      = $output_item['introtext'];
!                 $output_item['content']      = $output_item['bodytext'];
                  $output_item['content_type'] = ($output_item['postmode'] == 'html')?'html':'text';
  
--- 1587,1596 ----
                  $output_item['category']     = array($output_item['tid']);
                  $output_item['updated']      = date('c', $output_item['date']);
!                 if (empty($output_item['bodytext'])) {
!                     $output_item['content']  = $output_item['introtext'];
!                 } else {
!                     $output_item['summary']  = $output_item['introtext'];
!                     $output_item['content']  = $output_item['bodytext'];
!                 }
                  $output_item['content_type'] = ($output_item['postmode'] == 'html')?'html':'text';
  




More information about the geeklog-cvs mailing list