From b15874cb2bdb3d7fdaf005f3272cc7aa31ae98cb Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Thu, 6 Jan 2005 16:34:44 +0000 Subject: [PATCH] Use @AdminPages. --- modules/page-type.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/page-type.pl b/modules/page-type.pl index 6d529c90..779dae90 100644 --- a/modules/page-type.pl +++ b/modules/page-type.pl @@ -1,4 +1,4 @@ -# Copyright (C) 2004 Alex Schroeder +# Copyright (C) 2004, 2005 Alex Schroeder # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,6 +22,14 @@ use vars qw($PageTypesName); $PageTypesName = 'PageTypes'; +# do this later so that the user can customize $SidebarName +push(@MyInitVariables, \&PageTypeInit); + +sub PageTypeInit { + $PageTypesName = FreeToNormal($PageTypesName); # spaces to underscores + push(@AdminPages, $PageTypesName); +} + # A page type has to appear as a bullet list item on the page. # # Example list defining three types: @@ -34,7 +42,7 @@ $PageTypesName = 'PageTypes'; # have page clustering enabled (see the manual), then the page type # will automatically act as a cluster. -$ModulesDescription .= '

$Id: page-type.pl,v 1.2 2004/01/30 21:35:44 as Exp $

'; +$ModulesDescription .= '

$Id: page-type.pl,v 1.3 2005/01/06 16:34:44 as Exp $

'; *OldPageTypeDoPost = *DoPost; *DoPost = *NewPageTypeDoPost;