Solving problem with dates after commenting tasks
This commit is contained in:
parent
183372ebe3
commit
dbcdde741c
1 changed files with 3 additions and 14 deletions
|
@ -542,7 +542,7 @@ function stormtask_form(&$node) {
|
|||
while ($project = db_fetch_object($r)) {
|
||||
if (arg(1) != 'add' || user_access('Storm task: add') || (user_access('Storm task: add if project is editable') && stormproject_access('update', $project->nid)) || $project->nid == $node->project_nid) {
|
||||
$projects[$project->nid] = $project->title;
|
||||
if (!isset($node->project_nid)) $node->project_nid = $project->nid;
|
||||
if (!isset($node->project_nid)) $node->project_nid = $project->nid;
|
||||
}
|
||||
}
|
||||
if (!isset($node->project_nid)) $node->project_nid = NULL;
|
||||
|
@ -825,19 +825,8 @@ function _stormtask_beforesave(&$node) {
|
|||
$node->duration = str_replace(',', '.', $node->duration);
|
||||
$node->price = str_replace(',', '.', $node->price);
|
||||
|
||||
if (is_array($node->datebegin)) {
|
||||
$node->datebegin = _storm_date_to_gmtimestamp($node->datebegin);
|
||||
}
|
||||
else {
|
||||
$node->datebegin = strtotime($node->datebegin);
|
||||
}
|
||||
|
||||
if (is_array($node->dateend)) {
|
||||
$node->dateend = _storm_date_to_gmtimestamp($node->dateend);
|
||||
}
|
||||
else {
|
||||
$node->dateend = strtotime($node->dateend);
|
||||
}
|
||||
if (is_array($node->datebegin)) $node->datebegin = _storm_date_to_gmtimestamp($node->datebegin);
|
||||
if (is_array($node->dateend)) $node->dateend = _storm_date_to_gmtimestamp($node->dateend);
|
||||
}
|
||||
|
||||
function stormtask_nodeapi(&$node, $op, $teaser, $page) {
|
||||
|
|
Reference in a new issue