From: Tomas K. <to...@us...> - 2005-03-23 15:20:15
|
Update of /cvsroot/squirrelmail/squirrelmail/plugins/administrator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6213 Modified Files: Tag: SM-1_4-STABLE options.php Log Message: fixed admin plugin in order to work latest sqgetglobalvar added local config code to generated configuration file. Index: options.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/administrator/options.php,v retrieving revision 1.32.2.7 retrieving revision 1.32.2.8 diff -u -w -r1.32.2.7 -r1.32.2.8 --- options.php 27 Dec 2004 15:03:48 -0000 1.32.2.7 +++ options.php 23 Mar 2005 15:20:02 -0000 1.32.2.8 @@ -349,8 +349,8 @@ break; case SMOPT_TYPE_INTEGER: /* look for variable $e in POST, fill into $v */ - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { - $v = intval( $v ); + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = intval( $new_v ); $newcfg[$k] = $v; } echo "<tr><td>$name</td><td>". @@ -361,7 +361,8 @@ echo "</td></tr>\n"; break; case SMOPT_TYPE_NUMLIST: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = $new_v; $newcfg[$k] = $v; } echo "<tr><td>$name</td><td>"; @@ -380,8 +381,8 @@ echo "</td></tr>\n"; break; case SMOPT_TYPE_STRLIST: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { - $v = '"' . $v . '"'; + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = '"' . $new_v . '"'; $newcfg[$k] = $v; } echo "<tr><td>$name</td><td>". @@ -401,8 +402,8 @@ break; case SMOPT_TYPE_TEXTAREA: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { - $v = '"' . $v . '"'; + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = '"' . $new_v . '"'; $newcfg[$k] = str_replace( "\n", '', $v ); } echo "<tr><td valign=\"top\">$name</td><td>". @@ -413,8 +414,8 @@ echo "</td></tr>\n"; break; case SMOPT_TYPE_STRING: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { - $v = '"' . $v . '"'; + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = '"' . $new_v . '"'; $newcfg[$k] = $v; } if ( $v == '""' && isset( $defcfg[$k]['default'] ) ) { @@ -429,7 +430,8 @@ echo "</td></tr>\n"; break; case SMOPT_TYPE_BOOLEAN: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = $new_v; $newcfg[$k] = $v; } else { $v = strtoupper( $v ); @@ -450,8 +452,8 @@ echo "</td></tr>\n"; break; case SMOPT_TYPE_PATH: - if ( sqgetGlobalVar($e, $v, SQ_POST) ) { - $v = change_to_sm_path($v); + if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { + $v = change_to_sm_path($new_v); $newcfg[$k] = $v; } if ( $v == "''" && isset( $defcfg[$k]['default'] ) ) { @@ -541,7 +543,7 @@ $plugins = array(); if ( sqgetGlobalVar('plg', $v, SQ_POST) ) { foreach ( $op_plugin as $plg ) { - if ( sqgetGlobalVar("plgs_$plg", $v, SQ_POST) && $v == 'on' ) { + if ( sqgetGlobalVar("plgs_$plg", $v2, SQ_POST) && $v2 == 'on' ) { $plugins[] = $plg; } } @@ -618,6 +620,9 @@ fwrite( $fp, "$k = $v;\n" ); } } + // add local config support + fwrite( $fp, "@include SM_PATH . 'config/config_local.php';\n" ); + // close php fwrite( $fp, '?>' ); fclose( $fp ); } else { |