[geeklog-cvs] Geeklog-1.x/system lib-story.php,1.114,1.115

Dirk Haun dhaun at qs1489.pair.com
Sun Dec 9 12:21:33 EST 2007


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

Modified Files:
	lib-story.php 
Log Message:
For the webservices API, use [page_break] to separate introtext and bodytext (instead of misusing atom:summary)


Index: lib-story.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-story.php,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** lib-story.php	25 Nov 2007 06:55:07 -0000	1.114
--- lib-story.php	9 Dec 2007 17:21:31 -0000	1.115
***************
*** 1043,1055 ****
      }
  
!     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']  = '';
      }
  
--- 1043,1060 ----
      }
  
!     if (!empty($args['content'])) {
!         $content = $args['content'];
!     } else {
!         $content = $args['summary'];
!     }   
!     if (!empty($content)) {
!         $parts = explode('[page_break]', $content);
!         if (count($parts) == 1) {
!             $args['introtext'] = $content;
!             $args['bodytext']  = '';
!         } else {
!             $args['introtext'] = array_shift($parts);
!             $args['bodytext']  = implode('[page_break]', $parts);
!         }
      }
  
***************
*** 1517,1524 ****
                  $output['content']  = $output['introtext'];
              } else {
!                 $output['summary']  = $output['introtext'];
!                 $output['content']  = $output['bodytext'];
              }
!             $output['content_type'] = ($output['postmode'] == 'html')?'html':'text';
  
              $owner_data = SESS_getUserDataFromId($output['owner_id']);
--- 1522,1530 ----
                  $output['content']  = $output['introtext'];
              } else {
!                 $output['content']  = $output['introtext'] . LB
!                                     . '[page_break]' . LB . $output['bodytext'];
              }
!             $output['content_type'] = ($output['postmode'] == 'html')
!                                     ? 'html' : 'text';
  
              $owner_data = SESS_getUserDataFromId($output['owner_id']);
***************
*** 1601,1608 ****
                      $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';
  
                  $owner_data = SESS_getUserDataFromId($output_item['owner_id']);
--- 1607,1614 ----
                      $output_item['content']  = $output_item['introtext'];
                  } else {
!                     $output_item['content']  = $output_item['introtext'] . LB
!                             . '[page_break]' . LB . $output_item['bodytext'];
                  }
!                 $output_item['content_type'] = ($output_item['postmode'] == 'html') ? 'html' : 'text';
  
                  $owner_data = SESS_getUserDataFromId($output_item['owner_id']);




More information about the geeklog-cvs mailing list