Update of /cvsroot/phpslash/phpslash-dev/include/modules/story
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4674/phpslash-dev/include/modules/story
Modified Files:
Story_admin.class Story_base.class
Log Message:
allow template tags in story text and body. Also close bug #[ 797098 ] Eats Backslashes.
Index: Story_admin.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story_admin.class,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Story_admin.class 23 Oct 2004 17:20:02 -0000 1.7
--- Story_admin.class 4 Nov 2004 23:01:57 -0000 1.8
***************
*** 815,820 ****
'ORDER_NO' => stripslashes($this->db->Record['order_no']),
'DEPT' => stripslashes($this->db->Record['dept']),
! 'INTROTEXT' => htmlspecialchars(stripslashes($this->db->Record['intro_text'])),
! 'BODYTEXT' => htmlspecialchars(stripslashes($this->db->Record['body_text'])),
'TITLE' => stripslashes($this->db->Record['title']),
'TIME' => $this->db->Record['time'],
--- 815,820 ----
'ORDER_NO' => stripslashes($this->db->Record['order_no']),
'DEPT' => stripslashes($this->db->Record['dept']),
! 'INTROTEXT' => str_replace('}', '}',$this->db->Record['intro_text']),
! 'BODYTEXT' => str_replace('}', '}',$this->db->Record['body_text']),
'TITLE' => stripslashes($this->db->Record['title']),
'TIME' => $this->db->Record['time'],
Index: Story_base.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story_base.class,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Story_base.class 29 Sep 2004 14:21:49 -0000 1.11
--- Story_base.class 4 Nov 2004 23:01:57 -0000 1.12
***************
*** 101,106 ****
$order_no = stripslashes($this->db->Record["order_no"]);
$dept = stripslashes($this->db->Record["dept"]);
! $intro_text = stripslashes($this->db->Record["intro_text"]);
! $body_text = stripslashes($this->db->Record["body_text"]);
if ($mode == "full") {
--- 101,108 ----
$order_no = stripslashes($this->db->Record["order_no"]);
$dept = stripslashes($this->db->Record["dept"]);
! // $intro_text = stripslashes($this->db->Record["intro_text"]);
! // $body_text = stripslashes($this->db->Record["body_text"]);
! $intro_text = $this->db->Record["intro_text"];
! $body_text = $this->db->Record["body_text"];
if ($mode == "full") {
***************
*** 403,411 ****
case 'story_id':
case 'title':
! case 'intro_text':
! case 'body_text':
case 'order_no':
case 'dept':
$value = stripslashes($value);
default:
$stories_ary[$i][$key] = $value;
--- 405,415 ----
case 'story_id':
case 'title':
! // case 'intro_text':
! // case 'body_text':
case 'order_no':
case 'dept':
$value = stripslashes($value);
+ case 'intro_text':
+ case 'body_text':
default:
$stories_ary[$i][$key] = $value;
***************
*** 524,530 ****
$ary['dept'] = eregi_replace(' ','-',addslashes($ary['dept']));
$ary['order_no'] = eregi_replace(' ','-',addslashes($ary['order_no']));
! $ary['intro_text'] = addslashes(trim($ary['intro_text']));
! $ary['body_text'] = addslashes(trim($ary['body_text']));
!
// body_text_file comes from a file uploaded to us.
// Make sure that your php.ini has the following enabled:
--- 528,537 ----
$ary['dept'] = eregi_replace(' ','-',addslashes($ary['dept']));
$ary['order_no'] = eregi_replace(' ','-',addslashes($ary['order_no']));
! $ary['intro_text'] = trim($ary['intro_text']);
! $ary['body_text'] = trim($ary['body_text']);
! if (!get_magic_quotes_gpc()) {
! $ary['intro_text'] = addslashes($ary['intro_text']);
! $ary['body_text'] = addslashes($ary['body_text']);
! }
// body_text_file comes from a file uploaded to us.
// Make sure that your php.ini has the following enabled:
|