*
* @license http://nucleuscms.org/license.txt GNU General Public License
* @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: ITEM.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
- * $NucleusJP: ITEM.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
+ * @version $Id: ITEM.php,v 1.7.2.1 2007-09-05 06:21:17 kimitake Exp $
+ * $NucleusJP: ITEM.php,v 1.7 2007/02/04 06:28:46 kimitake Exp $
*/
class ITEM {
$posttime = $i_draft ? 0 : $blog->getCorrectTime();
}
- $itemid = $blog->additem($i_catid, $i_title,$i_body,$i_more,$i_blogid,$i_author,$posttime,$i_closed,$i_draft);
+ if ($posttime > $blog->getCorrectTime()) {
+ $posted = 0;
+ $blog->setFuturePost();
+ }
+ else {
+ $posted = 1;
+ }
+
+ $itemid = $blog->additem($i_catid, $i_title,$i_body,$i_more,$i_blogid,$i_author,$posttime,$i_closed,$i_draft,$posted);
//Setting the itemOptions
$aOptions = requestArray('plugoption');
if ( (!$blog->allowPastPosting()) && ($timestamp < $blog->getCorrectTime()))
$timestamp = 0;
- if ($wasdraft && $publish) {
- $query .= ', idraft=0';
+ if ($timestamp > $blog->getCorrectTime(time())) {
+ $isFuture = 1;
+ $query .= ', iposted=0';
+ }
+ else {
+ $isFuture = 0;
+ $query .= ', iposted=1';
+ }
+ if ($wasdraft && $publish) {
// set timestamp to current date only if it's not a future item
// draft items have timestamp == 0
// don't allow timestamps in the past (unless otherwise defined in blogsettings)
- if ($timestamp > $blog->getCorrectTime())
- $isFuture = 1;
+ $query .= ', idraft=0';
if ($timestamp == 0)
$timestamp = $blog->getCorrectTime();