Revision 600
Added by thorn almost 17 years ago
save_post.php | ||
---|---|---|
45 | 45 |
$title = $admin->add_slashes($admin->get_post('title')); |
46 | 46 |
$short = $admin->add_slashes($admin->get_post('short')); |
47 | 47 |
$long = $admin->add_slashes($admin->get_post('long')); |
48 |
$publishedwhen = strtotime($admin->get_post('publishdate')); |
|
48 |
$publishedwhen = strtotime($admin->get_post('publishdate')); |
|
49 |
$publisheduntil = strtotime($admin->get_post('enddate')); |
|
49 | 50 |
$commenting = $admin->get_post('commenting'); |
50 | 51 |
$active = $admin->get_post('active'); |
51 | 52 |
$old_link = $admin->get_post('link'); |
... | ... | |
102 | 103 |
} |
103 | 104 |
|
104 | 105 |
// Update row |
105 |
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', published_when = '$publishedwhen', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'"); |
|
106 |
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', published_when = '$publishedwhen', published_until = '$publisheduntil', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
|
|
106 | 107 |
|
107 | 108 |
// Check if there is a db error, otherwise say successful |
108 | 109 |
if($database->is_error()) { |
Also available in: Unified diff
module news: added publish_until field to control the visibility of a news-posting by date and time