Closed (works as designed)
Project:
Daily
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Reporter:
Anonymous (not verified)
Created:
10 Apr 2010 at 02:06 UTC
Updated:
20 Jan 2015 at 06:45 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedIn daily/daily_daily.inc comment out two sections that prevent multiple dates around line 83 and line 107.
# 83 allow dupliacte dates
/*
elseif (db_result(db_query("SELECT * FROM {daily} d INNER JOIN {node} n ON n.vid = d.vid INNER JOIN {term_node} t ON n.vid = t.vid WHERE d.date = '%s' AND t.tid = %d AND n.nid <> %d", _daily_pack_date($node->daily_date), $tids[0], $node->nid))) {
form_set_error('daily_date', _daily_form_error_duplicate_date());
}
*/
# 107 allow multiple dates
/*
// Revision reverts do not go through any *_validate function. We
// need to be careful not to have double dates. So we check here
// for it and fix it. With a warning.
$query = db_query("SELECT n.title,d.nid FROM {daily} d INNER JOIN {node} n ON n.vid = d.vid INNER JOIN {term_node} t ON t.vid = d.vid WHERE t.tid = %d AND n.nid != %d AND d.date = '%s'", $tids[0], $node->nid, _daily_pack_date($node->daily_date));
if ($problem_node = db_fetch_object($query)) {
$olddate = $node->daily_date;
do {
_daily_tomorrow($node->daily_date);
$query = db_query("SELECT n.title,d.nid FROM {daily} d INNER JOIN {node} n ON n.vid = d.vid INNER JOIN {term_node} t ON t.vid = d.vid WHERE t.tid = %d AND n.nid != %d AND d.date = '%s'", $tids[0], $node->nid, _daily_pack_date($node->daily_date));
} while (db_fetch_object($query));
}
if (isset($olddate)) {
drupal_set_message(t('WARNING: by reverting to this node revision, you would have introduced duplicate publication dates. To prevent this, the daily date of this node has been changed from %olddate to %newdate. The node which caused this problem is !probnode', array('!probnode' => l($problem_node->title, 'node/'.$problem_node->nid.'/edit'), '%olddate'=> _daily_format_date($olddate), '%newdate' => _daily_format_date($node->daily_date))), 'error');
}
*/
Comment #2
Frodo Looijaard commentedThe idea of this module is that there can only be one item each day. To properly implement this request the whole structure must be changed. True, with the above patch, you can force it to allow multiple items each day, but a whole can of worms opens up when you do this (ordering of items, proper access, etc.).
This will not be fixed.