[geeklog-hg] geeklog: Fixed story submission email notifications are not sent...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Sep 10 12:09:18 EDT 2013
changeset 9289:847ef1a07b91
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/847ef1a07b91
user: dengen <taharaxp at gmail.com>
date: Wed Sep 11 01:08:49 2013 +0900
description:
Fixed story submission email notifications are not sent out correctly.
diffstat:
public_html/submit.php | 8 +++++---
system/classes/story.class.php | 28 +++++++++++++++++-----------
2 files changed, 22 insertions(+), 14 deletions(-)
diffs (81 lines):
diff -r b66d7e3ff622 -r 847ef1a07b91 public_html/submit.php
--- a/public_html/submit.php Wed Sep 11 00:25:52 2013 +0900
+++ b/public_html/submit.php Wed Sep 11 01:08:49 2013 +0900
@@ -226,10 +226,12 @@
global $_CONF, $_TABLES, $LANG01, $LANG08, $LANG24, $LANG29, $LANG_ADMIN;
$title = COM_undoSpecialChars( $story->displayElements('title') );
- if ($A['postmode'] == 'html') {
- $A['introtext'] = strip_tags ($A['introtext']);
+ $introtext = COM_undoSpecialChars( $story->displayElements('introtext') . "\n" . $story->displayElements('bodytext') );
+ if ($story->_postmode == 'html') {
+ $introtext = strip_tags($introtext);
+ } else {
+ $introtext = str_replace('<br' . XHTML . '>', "\n", $introtext);
}
- $introtext = COM_undoSpecialChars( $story->displayElements('introtext') . "\n" . $story->displayElements('bodytext') );
$storyauthor = COM_getDisplayName( $story->displayelements('uid') );
$topic = stripslashes(DB_getItem ($_TABLES['topics'], 'topic',
'tid = \''.$story->displayElements('tid').'\''));
diff -r b66d7e3ff622 -r 847ef1a07b91 system/classes/story.class.php
--- a/system/classes/story.class.php Wed Sep 11 00:25:52 2013 +0900
+++ b/system/classes/story.class.php Wed Sep 11 01:08:49 2013 +0900
@@ -971,6 +971,9 @@
$this->_uid = $_USER['uid'];
}
+ // initialize the GLText version to the latest version
+ $this->_text_version = GLTEXT_LATEST_VERSION;
+
$this->_postmode = $_CONF['postmode'];
// If a topic has been specified, use it, if permitted
@@ -1021,6 +1024,9 @@
$array[$key] = COM_stripslashes($value);
}
+ // initialize the GLText version to the latest version
+ $this->_text_version = GLTEXT_LATEST_VERSION;
+
$this->_postmode = COM_applyFilter($array['postmode']);
$this->_sid = COM_applyFilter($array['sid']);
$this->_uid = COM_applyFilter($array['uid'], true);
@@ -1099,8 +1105,8 @@
// Remove any autotags the user doesn't have permission to use
- $this->_introtext = PLG_replaceTags($this->_introtext, '', true);
- $this->_bodytext = PLG_replaceTags($this->_bodytext, '', true);
+ $introtext = PLG_replaceTags($this->_introtext, '', true);
+ $bodytext = PLG_replaceTags($this->_bodytext, '', true);
if (!TOPIC_hasMultiTopicAccess('topic')) {
// user doesn't have access to one or more topics - bail
@@ -1109,18 +1115,18 @@
if (($_CONF['storysubmission'] == 1) && !SEC_hasRights('story.submit')) {
- $this->_sid = DB_escapeString($this->_sid);
- $this->_title = DB_escapeString($this->_title);
+ $sid = DB_escapeString($this->_sid);
+ $title = DB_escapeString($this->_title);
- $this->_introtext = DB_escapeString($this->_introtext);
- $this->_bodytext = DB_escapeString($this->_bodytext);
- $this->_postmode = DB_escapeString($this->_postmode);
- DB_save($_TABLES['storysubmission'], 'sid,uid,title,introtext,bodytext,date,postmode',
- "{$this->_sid},{$this->_uid},'{$this->_title}'," .
- "'{$this->_introtext}','{$this->_bodytext}',NOW(),'{$this->_postmode}'");
+ $introtext = DB_escapeString($introtext);
+ $bodytext = DB_escapeString($bodytext);
+ $postmode = DB_escapeString($this->_postmode);
+ DB_save($_TABLES['storysubmission'], 'sid,uid,title,introtext,bodytext,date,postmode,text_version',
+ "$sid,{$this->_uid},'$title'," .
+ "'$introtext','$bodytext',NOW(),'$postmode','{$this->_text_version}'");
// Save Topics selected
- TOPIC_saveTopicSelectionControl('article', $this->_sid);
+ TOPIC_saveTopicSelectionControl('article', $sid);
return STORY_SAVED_SUBMISSION;
} else {
More information about the geeklog-cvs
mailing list