Commit 18660c09 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(get_last_text): Require the user to be logged in.

(find_next_text_no): Ditto.
(find_previous_text_no): Ditto.
parent f9916ec6
/*
* $Id: text.c,v 0.103 2003/01/17 10:00:41 ceder Exp $
* $Id: text.c,v 0.104 2003/05/09 18:44:17 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -2571,6 +2571,7 @@ get_last_text(struct tm *wanted_time,
*/
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
while (lower < higher)
{
middle = (lower + higher)/2 + 1; /* Binary search */
......@@ -2614,6 +2615,7 @@ find_next_text_no(Text_no start,
Text_stat *text_s;
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
err_stat = start;
while (++start < highest)
{
......@@ -2644,6 +2646,7 @@ find_previous_text_no(Text_no start,
const Text_no saved_start = start;
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
if (start >(next_tno = query_next_text_num()))
start = next_tno;
......
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