Changeset 124
- Timestamp:
- 2008-01-08 22:39:15 (1 year ago)
- Files:
-
- trunk/classes/misc/Post.php (modified) (4 diffs)
- trunk/classes/pages/Topic.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/misc/Post.php
r116 r124 332 332 // in case everything above was ok, proceed 333 333 if ($ok === 1) { 334 if ($postedbymember === 1) {334 if ($postedbymember >= 1) { 335 335 // don't save e-mail address every time for members 336 336 $email = ''; … … 419 419 $q = NULL; 420 420 // recount member's posts if necessary 421 if ($postedbymember == 1) {421 if ($postedbymember >= 1) { 422 422 $_member = new Member($_SESSION['memberid']); 423 423 $_member->recountPosts(); … … 468 468 include('includes/lang/' . $row2->lang . '.php'); 469 469 } 470 $_title = Topic::getTitle($reply); 470 471 /* write mail to 'todo' database table to be sent out on one of the subsequent pageviews; 471 472 * this avoids bulk sending which might clobber the system */ … … 473 474 $q->bindParam(':rec', $row2->memberemail, PDO::PARAM_STR); 474 475 $q->bindParam(':subj', $LANG['mail_notification_subject'], PDO::PARAM_STR); 475 $q->bindParam(':body', str_replace(Array('%topictitle%', '%topic%', '%page%'), Array(Topic::getTitle($reply), $reply, $page)), $LANG['mail_notification_body']);476 $q->bindParam(':body', str_replace(Array('%topictitle%', '%topic%', '%page%'), $_title, $reply, $page), $LANG['mail_notification_body'])); 476 477 $q->execute(); 477 478 $q = NULL; trunk/classes/pages/Topic.php
r66 r124 234 234 **/ 235 235 public function getTitle($id) { 236 global $C ;236 global $C, $SETTINGS; 237 237 $q = $C->prepare('SELECT topictitle FROM ' . $SETTINGS['dbtableprefix'] . 'topics WHERE topicid=:id'); 238 238 $q->bindParam(':id', $id, PDO::PARAM_INT, 12); … … 242 242 return $_title; 243 243 } else { 244 $q = NULL; 244 245 return FALSE; 245 246 }
