From: pdontthink Date: Tue, 21 Jan 2014 20:19:48 +0000 (+0000) Subject: Make configuration tool show the SquirrelMail version X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=34aa9765802fd89aa20442283bd1bdcec71dca3f;p=squirrelmail.git Make configuration tool show the SquirrelMail version git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14435 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/config/conf.pl b/config/conf.pl index a4a3f6e0..33ebb038 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -43,7 +43,23 @@ $dir = cwd(); ############################################################ -# First, lets read in the data already in there... +# Try to determine what the version of SquirrelMail is +############################################################ +$sm_version = 'unknown'; +if ( -e "../include/constants.php" && -r "../include/constants.php") { + open( FILE, "../include/constants.php" ); + while ( $line = ) { + if ($line =~ m/^define\('SM_VERSION', ?'(\d+\.\d+\.\d+( ?\[\w+]|))'/) { + $sm_version = $1; + last; + } + } + close(FILE); +} + + +############################################################ +# First, let's read in the data already in there... ############################################################ if ( -e "config.php" ) { # Make sure that file is readable @@ -583,7 +599,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) && ( $command ne ":q" ) ) { print $WHT. "SquirrelMail Configuration : " . $NRM; if ( $config == 1 ) { print "Read: config.php"; } elsif ( $config == 2 ) { print "Read: config_default.php"; } - print " ($print_config_version)\n"; + print "\nConfig version $print_config_version; SquirrelMail version $sm_version\n"; print "---------------------------------------------------------\n"; if ( $menu == 0 ) { diff --git a/doc/ChangeLog b/doc/ChangeLog index 5cfd4468..131881ff 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -392,6 +392,7 @@ Version 1.5.2 - SVN Williams). See $display_imap_login_error in the configuration file or "4. General Options ==> 21. Display login error from IMAP" in the configuration tool. + - Configuration tool now shows the SquirrelMail version Version 1.5.1 (branched on 2006-02-12) --------------------------------------