From: Andrea S. <ste...@us...> - 2001-05-27 21:28:18
|
Update of /cvsroot/twiki/twiki/lib/TWiki/Plugins In directory usw-pr-cvs1:/tmp/cvs-serv28747/lib/TWiki/Plugins Modified Files: DefaultPlugin.pm EmptyPlugin.pm Log Message: - added ChangePassword ResetPassword InstallPassword - fixed small bug in tables - now aPlugin::initPlugin should return 1 if all is OK - added doSuperAdminGroup Index: DefaultPlugin.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki/Plugins/DefaultPlugin.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** DefaultPlugin.pm 2001/03/04 13:18:44 1.2 --- DefaultPlugin.pm 2001/05/27 21:28:15 1.3 *************** *** 37,42 **** # ========================= ! use vars qw( $web $topic $user $installWeb $doOldInclude $renderingWeb ); ! # ========================= sub initPlugin --- 37,43 ---- # ========================= ! use vars qw( $web $topic $user $installWeb $VERSION ! $doOldInclude $renderingWeb ); ! $VERSION = '1.000'; # ========================= sub initPlugin *************** *** 48,51 **** --- 49,55 ---- # Get preferences $doOldInclude = &TWiki::Prefs::getPreferencesFlag( "DEFAULTPLUGIN_OLDINCLUDE" ) || ""; + + # Initialized + return 1; } Index: EmptyPlugin.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki/Plugins/EmptyPlugin.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** EmptyPlugin.pm 2001/03/04 13:18:11 1.2 --- EmptyPlugin.pm 2001/05/27 21:28:15 1.3 *************** *** 37,42 **** # ========================= ! use vars qw( $web $topic $user $installWeb $myConfigVar ); ! # ========================= sub initPlugin --- 37,43 ---- # ========================= ! use vars qw( $web $topic $user $installWeb $VERSION ! $myConfigVar ); ! $VERSION = '1.000'; # ========================= sub initPlugin *************** *** 46,49 **** --- 47,59 ---- # Get plugin preferences $myConfigVar = &TWiki::Prefs::getPreferencesFlag( "EMPTYPLUGIN_VAR1" ) || ""; + + # check for TWiki.pm and Plugins.pm versions + if ( $TWiki::VERSION < 1 || + $TWiki::Plugins::VERSION < 1 ) { + return 0; + }; + + # Plugin correctly initialized + return 1; } |