Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

r6721 - /man-cgi/man.cgi

 
   Soft32 Home -> Linux -> Documentations RSS
Next:  r6720 - /man-cgi/man.cgi  
Author Message
jfs

External


Since: May 30, 2009
Posts: 5



(Msg. 1) Posted: Sat Jun 06, 2009 7:20 am
Post subject: r6721 - /man-cgi/man.cgi
Archived from groups: linux>debian>doc (more info?)

Author: jfs
Date: Sat Jun 6 10:06:53 2009
New Revision: 6721

URL: http://svn.debian.org/wsvn/?sc=1&rev=6721
Log:
Control if content is up to date and present a warning if its not

Modified:
man-cgi/man.cgi

Modified: man-cgi/man.cgi
URL: http://svn.debian.org/wsvn/man-cgi/man.cgi?rev=6721&op=diff
==============================================================================
--- man-cgi/man.cgi (original)
+++ man-cgi/man.cgi Sat Jun 6 10:06:53 2009
@@ -40,6 +40,8 @@
# !!! man.cgi is stale perl4 code !!!
############################################################################

+use File::stat;
+use Time::localtime;

$www{'title'} = 'Debian Hypertext Man Pages';
$www{'home'} = 'http://manpages.debian.net';
@@ -201,7 +203,7 @@
'Debian Sid', "$manLocalDir/sid/usr/share/man",
);

-# delete not existing releases
+# delete non-existing releases
while (($key,$val) = each %manPath) {
my $counter = 0;

@@ -925,6 +927,8 @@
&http_header("text/html");
print &html_header("$www{'title'}: Index Page") .
"<H1>$www{'head'}</H1>\n\n" . &intro;
+# If the content is out of date print a warning:
+ &out_of_date if is_out_of_date();
&formquery;

local($m) = ($manpath ? $manpath : $manPathDefault);
@@ -962,6 +966,34 @@
print "</BODY>\n</HTML>\n";
0;
}
+
+sub is_out_of_date {
+ my $ret = 0;
+ my $file = $manLocalDir."/timestamp";
+ my $mtime = ctime(stat($file)->mtime);
+# my $current_time = time();
+# $diff = $current_time - $mtime;
+ print "<p><small>Contents last updated $mtime</small></p>";
+ $ret = 1 if -M $file > 60;
+ return $ret;
+}
+
+
+
+sub out_of_date {
+ print <<ETX;
+<p><STRONG><font color="#FF0000">NOTE:</font></STRONG> (2008-05-01) The content
+ available for this service
+are currently out of date due to some <a
+href="http://lists.debian.org/debian-doc/2009/01/msg00068.html">issues</a> with
+its hosting site. As a consequence newer Debian releases might not be listed yet
+and manpages of previous releases are not fully up to date. We are working on
+restoring the service. Sorry for the inconvenience.
+</p>
+ETX
+
+}
+

sub formquery {
local($astring, $bstring);


--
To UNSUBSCRIBE, email to debian-doc-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Surely suse is not this popular - At time of posting and accorind to torrentspy.com there are over 185437 people downloading Suse! No way! ..

How can i register a link protocol for browsers - I want to add an action to the system so that every time a user clicks in a link with for example ..

acl and linux - hi, i have to work with acl and linux; how is the best file system to do it ? (i have heard reiserfs but i don't know....

Microsoft/LINUX debate. - Why does people brother having this Microsoft/LINUX mud-slinging thing? I am new to LINUX but installed REDHAT 8..

Multiple CD volume backup solution - Hi all I'm looking for a backup package that will allow me to span multiple CDs and also allow for individual CD..

virus scanner - Hi All was wondering if i can get some idea of what people are useing for virus scanners on Redhat 8. Its sendmail tha...
       Soft32 Home -> Linux -> Documentations All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]