Commit 1aa51ab2 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prepare_aux_item_list): Removed the "now" argument. Use current_time

	instead.  Call callers updated.
(prepare_aux_item): Likewise.
parent 3bf0ac46
/* /*
* $Id: aux-items.c,v 1.10 1999/05/13 11:44:47 ceder Exp $ * $Id: aux-items.c,v 1.11 1999/05/16 21:45:15 ceder Exp $
* Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include "services.h" #include "services.h"
#include "admin.h" #include "admin.h"
#include "param.h" #include "param.h"
#include "server-time.h"
#define AUX_ADJUST_FLAG(flg) item->flags.flg = (def->clear_flags.flg)?0:((def->set_flags.flg)?1:item->flags.flg) #define AUX_ADJUST_FLAG(flg) item->flags.flg = (def->clear_flags.flg)?0:((def->set_flags.flg)?1:item->flags.flg)
...@@ -492,8 +493,7 @@ aux_item_call_undelete_triggers(Aux_item_definition *def, ...@@ -492,8 +493,7 @@ aux_item_call_undelete_triggers(Aux_item_definition *def,
void void
prepare_aux_item_list(Aux_item_list *list, prepare_aux_item_list(Aux_item_list *list,
Pers_no creator, Pers_no creator)
time_t now)
{ {
unsigned long i; unsigned long i;
...@@ -502,14 +502,13 @@ prepare_aux_item_list(Aux_item_list *list, ...@@ -502,14 +502,13 @@ prepare_aux_item_list(Aux_item_list *list,
for (i = 0; i < list->length; i++) for (i = 0; i < list->length; i++)
{ {
prepare_aux_item(&list->items[i], creator, NULL, now); prepare_aux_item(&list->items[i], creator, NULL);
} }
} }
void prepare_aux_item(Aux_item *item, void prepare_aux_item(Aux_item *item,
Pers_no creator, Pers_no creator,
Aux_item_definition *def, Aux_item_definition *def)
time_t now)
{ {
if (item == NULL) if (item == NULL)
return; return;
...@@ -533,7 +532,7 @@ void prepare_aux_item(Aux_item *item, ...@@ -533,7 +532,7 @@ void prepare_aux_item(Aux_item *item,
item->inherit_limit = def->inherit_limit; item->inherit_limit = def->inherit_limit;
item->creator = creator; item->creator = creator;
item->sent_at = now; item->sent_at = current_time;
init_aux_item_link(&item->linked_item); init_aux_item_link(&item->linked_item);
} }
...@@ -857,8 +856,7 @@ aux_inherit_items(Aux_item_list *target, ...@@ -857,8 +856,7 @@ aux_inherit_items(Aux_item_list *target,
continue; continue;
copy_aux_item(&item, &parent->items[i]); copy_aux_item(&item, &parent->items[i]);
prepare_aux_item(&item, parent->items[i].creator, prepare_aux_item(&item, parent->items[i].creator, def);
def, time(NULL));
if (item.inherit_limit != 0) if (item.inherit_limit != 0)
item.inherit_limit -= 1; item.inherit_limit -= 1;
...@@ -1724,7 +1722,7 @@ void aux_item_trigger_mirror_faq(Aux_item_trigger_data *data) ...@@ -1724,7 +1722,7 @@ void aux_item_trigger_mirror_faq(Aux_item_trigger_data *data)
items.length = 1; items.length = 1;
items.items = &item_data; items.items = &item_data;
prepare_aux_item_list(&items, 0, time(NULL)); prepare_aux_item_list(&items, 0);
text_stat_add_aux_item_list(text_stat, text_no, &items, 0); text_stat_add_aux_item_list(text_stat, text_no, &items, 0);
mark_text_as_changed(text_no); mark_text_as_changed(text_no);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment