[vhffs-dev] [389] Admins can now modify mysql db passwords ( Backport of changes between 282 and 383 to 4.0) |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [389] Admins can now modify mysql db passwords ( Backport of changes between 282 and 383 to 4.0)
- From: subversion@xxxxxxxxx
- Date: Sun, 07 Jan 2007 01:49:20 +0100
Revision: 389
Author: gradator
Date: 2007-01-07 00:49:20 +0000 (Sun, 07 Jan 2007)
Log Message:
-----------
Admins can now modify mysql db passwords (Backport of changes between 282 and 383 to 4.0)
Modified Paths:
--------------
trunk/vhffs-panel/admin/mysql/edit.pl
trunk/vhffs-panel/admin/mysql/edit_submit.pl
trunk/vhffs-panel/templates/admin/mysql/edit.tmpl
Modified: trunk/vhffs-panel/admin/mysql/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/edit.pl 2007-01-06 23:10:40 UTC (rev 388)
+++ trunk/vhffs-panel/admin/mysql/edit.pl 2007-01-07 00:49:20 UTC (rev 389)
@@ -94,6 +94,7 @@
$template->param( TEXT_DBNAME => gettext("Servername") );
$template->param( TEXT_DBUSER => gettext("User") );
$template->param( TEXT_DBPASS => gettext("Password") );
+ $template->param( INFO_DBPASS => gettext("Password will not be modified if it is set to 'blanked' or empty") );
$template->param( TEXT_GROUP => gettext("Group") );
$template->param( TEXT_OWNER => gettext("Owner") );
$template->param( TEXT_STATUS => gettext("Status") );
Modified: trunk/vhffs-panel/admin/mysql/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/edit_submit.pl 2007-01-06 23:10:40 UTC (rev 388)
+++ trunk/vhffs-panel/admin/mysql/edit_submit.pl 2007-01-07 00:49:20 UTC (rev 389)
@@ -88,10 +88,15 @@
{
$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ my $pass = $cgi->param( "DBPASS" );
+ if( $pass ne '' && $pass ne 'blanked' ) {
+ $object->set_dbpassword($pass);
+ $object->set_status(Vhffs::Constants::WAITING_FOR_MODIFICATION);
+ } else {
+ $object->set_status( $cgi->param( "STATUS" ) );
+ }
- $object->set_status( $cgi->param( "STATUS" ) );
-
if( $object->commit < 0 )
{
$message = gettext("Unable to modify the object");
Modified: trunk/vhffs-panel/templates/admin/mysql/edit.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mysql/edit.tmpl 2007-01-06 23:10:40 UTC (rev 388)
+++ trunk/vhffs-panel/templates/admin/mysql/edit.tmpl 2007-01-07 00:49:20 UTC (rev 389)
@@ -2,16 +2,16 @@
<form method="post" action="edit_submit.pl">
<p>
- <label for="DBNAME">
+ <label>
<TMPL_VAR NAME="TEXT_DBNAME">
</label>
- <input type="text" name="DBNAME" id="DBNAME" value="<TMPL_VAR NAME="VALUE_DBNAME">" />
+ <TMPL_VAR NAME="VALUE_DBNAME">
</p>
<p>
- <label for="DBUSER">
+ <label>
<TMPL_VAR NAME="TEXT_DBUSER">
</label>
- <input type="text" name="DBUSER" id="DBUSER" value="<TMPL_VAR NAME="VALUE_DBUSER">" />
+ <TMPL_VAR NAME="VALUE_DBUSER">
</p>
<p>
<label for="DBPASS">
@@ -19,17 +19,20 @@
</label>
<input type="text" name="DBPASS" id="DBPASS" value="<TMPL_VAR NAME="VALUE_DBPASS">" />
</p>
+ <p>
+ <em><TMPL_VAR NAME="INFO_DBPASS"></em>
+ </p>
<p>
- <label for="OWNER">
+ <label>
<TMPL_VAR NAME="TEXT_OWNER">
</label>
- <input type="text" name="OWNER" id="OWNER" value="<TMPL_VAR NAME="VALUE_OWNER">" />
+ <TMPL_VAR NAME="VALUE_OWNER">
</p>
<p>
- <label for="GROUP">
+ <label>
<TMPL_VAR NAME="TEXT_GROUP">
</label>
- <input type="text" name="GROUP" id="GROUP" value="<TMPL_VAR NAME="VALUE_GROUP">" />
+ <TMPL_VAR NAME="VALUE_GROUP">
</p>
<p>
<label for="STATUS">