Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: post.php 2180 2006-09-02 07:36:22Z chris $
| * $Id: post.php 2394 2006-11-10 04:55:06Z Tikitiki $
|
*/
/*
| */
/*
|
Zeile 125 | Zeile 125 |
---|
// Sanitize the username $post['username'] = htmlspecialchars_uni($post['username']);
|
// Sanitize the username $post['username'] = htmlspecialchars_uni($post['username']);
|
|
|
return true; }
| return true; }
|
Zeile 522 | Zeile 523 |
---|
// Automatic subscription to the thread if($post['options']['emailnotify'] != "no" && $post['uid'] > 0) {
|
// Automatic subscription to the thread if($post['options']['emailnotify'] != "no" && $post['uid'] > 0) {
|
$query = $db->simple_select(TABLE_PREFIX."favorites", "fid", "tid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."' AND type='s'", array("limit" => 1));
| $query = $db->simple_select(TABLE_PREFIX."favorites", "fid", "uid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."' AND type='s'", array("limit" => 1));
|
$already_subscribed = $db->fetch_field($query, "fid"); if(!$already_subscribed) {
| $already_subscribed = $db->fetch_field($query, "fid"); if(!$already_subscribed) {
|
Zeile 536 | Zeile 537 |
---|
}
// Perform any selected moderation tools.
|
}
// Perform any selected moderation tools.
|
if(is_moderator($post['fid'], "", $post['uid']) == "yes" && $post['modoptions'])
| if(is_moderator($post['fid'], "", $post['uid']) == "yes")
|
{ // Fetch the thread $thread = get_thread($post['tid']);
| { // Fetch the thread $thread = get_thread($post['tid']);
|
Zeile 582 | Zeile 583 |
---|
{ $db->query(" UPDATE ".TABLE_PREFIX."threads
|
{ $db->query(" UPDATE ".TABLE_PREFIX."threads
|
SET $newclosed$sep$newstick
| SET {$newclosed}{$sep}{$newstick}
|
WHERE tid='{$thread['tid']}' "); }
| WHERE tid='{$thread['tid']}' "); }
|
Zeile 756 | Zeile 757 |
---|
update_forum_count($post['fid']); }
|
update_forum_count($post['fid']); }
|
if($visible != 2)
| if($visible != -2)
|
{ $now = time(); if($forum['usepostcounts'] != "no")
| { $now = time(); if($forum['usepostcounts'] != "no")
|
Zeile 873 | Zeile 874 |
---|
// Thread is being made now and we have a bit to do. else {
|
// Thread is being made now and we have a bit to do. else {
|
// Fetch the permissions for this user $user_permisions = user_permissions($thread['uid']);
| |
// Decide on the visibility of this post.
|
// Decide on the visibility of this post.
|
if($forum['modposts'] == "yes" && is_moderator($thread['fid'], "", $thread['uid']) != "yes") {
| if(($forum['modthreads'] == "yes" || $forum['modposts'] == "yes") && is_moderator($thread['fid'], "", $thread['uid']) != "yes") {
|
$visible = 0;
|
$visible = 0;
|
}
| }
|
else { $visible = 1; }
|
else { $visible = 1; }
|
}
| }
|
// Have a post ID but not a thread ID - fetch thread ID if($thread['pid'] && !$thread['tid']) {
|
// Have a post ID but not a thread ID - fetch thread ID if($thread['pid'] && !$thread['tid']) {
|
$db->simple_select(TABLE_PREFIX."posts", "tid", "pid='{$thread['pid']}");
| $query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='{$thread['pid']}");
|
$thread['tid'] = $db->fetch_field($query, "tid"); }
| $thread['tid'] = $db->fetch_field($query, "tid"); }
|
Zeile 900 | Zeile 898 |
---|
// Are we updating a post which is already a draft? Perhaps changing it into a visible post? if($draft_check)
|
// Are we updating a post which is already a draft? Perhaps changing it into a visible post? if($draft_check)
|
{ $this->thread_insert_data = array( "subject" => $db->escape_string($thread['subject']), "icon" => intval($thread['icon']), "username" => $db->escape_string($thread['username']), "dateline" => intval($thread['dateline']),
| { $this->thread_insert_data = array( "subject" => $db->escape_string($thread['subject']), "icon" => intval($thread['icon']), "username" => $db->escape_string($thread['username']), "dateline" => intval($thread['dateline']),
|
"lastpost" => intval($thread['dateline']), "lastposter" => $db->escape_string($thread['username']), "visible" => $visible
| "lastpost" => intval($thread['dateline']), "lastposter" => $db->escape_string($thread['username']), "visible" => $visible
|
Zeile 948 | Zeile 946 |
---|
"lastposter" => $db->escape_string($thread['username']), "views" => 0, "replies" => 0,
|
"lastposter" => $db->escape_string($thread['username']), "views" => 0, "replies" => 0,
|
"visible" => $visible
| "visible" => $visible, "notes" => ''
|
);
$plugins->run_hooks_by_ref("datahandler_post_insert_thread", $this);
| );
$plugins->run_hooks_by_ref("datahandler_post_insert_thread", $this);
|