SF.net SVN: postfixadmin:[566] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2009-02-15 15:02:30
|
Revision: 566 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=566&view=rev Author: christian_boltz Date: 2009-02-15 15:02:26 +0000 (Sun, 15 Feb 2009) Log Message: ----------- - added/fixed vim: lines to nearly all *.php files (exception: templates/*) (ts=3 or ts=4 depending on the file content) - several whitespace fixes - (no code changes) Modified Paths: -------------- trunk/create-alias.php trunk/delete.php trunk/edit-admin.php trunk/edit-alias.php trunk/edit-domain.php trunk/index.php trunk/list-admin.php trunk/login.php trunk/logout.php trunk/main.php trunk/password.php trunk/search.php trunk/setup.php trunk/templates/header.php trunk/users/edit-alias.php trunk/users/index.php trunk/users/logout.php trunk/users/main.php trunk/users/password.php trunk/variables.inc.php Modified: trunk/create-alias.php =================================================================== --- trunk/create-alias.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/create-alias.php 2009-02-15 15:02:26 UTC (rev 566) @@ -41,7 +41,7 @@ $list_domains = list_domains (); } else { - $list_domains = list_domains_for_admin ($username); + $list_domains = list_domains_for_admin ($username); } $pCreate_alias_goto_text = $PALANG['pCreate_alias_goto_text']; @@ -57,7 +57,7 @@ { if (isset ($_POST['fAddress']) && isset ($_POST['fDomain'])) { $fAddress = escape_string($_POST['fAddress']) . "@" . escape_string ($_POST['fDomain']); - $fAddress = strtolower ($fAddress); + $fAddress = strtolower ($fAddress); } if (isset ($_POST['fGoto'])) { @@ -156,4 +156,5 @@ include ("templates/menu.php"); include ("templates/create-alias.php"); include ("templates/footer.php"); +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/delete.php =================================================================== --- trunk/delete.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/delete.php 2009-02-15 15:02:26 UTC (rev 566) @@ -171,5 +171,5 @@ include ("templates/message.php"); include ("templates/footer.php"); -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/edit-admin.php =================================================================== --- trunk/edit-admin.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/edit-admin.php 2009-02-15 15:02:26 UTC (rev 566) @@ -101,11 +101,11 @@ $sqlActive = db_get_boolean(False); } - $password_query = ''; - if ($fPassword != '') { # do not change password to empty one - $password_query = ", password='$fPassword'"; - } - $result = db_query ("UPDATE $table_admin SET modified=NOW(),active='$sqlActive' $password_query WHERE username='$username'"); + $password_query = ''; + if ($fPassword != '') { # do not change password to empty one + $password_query = ", password='$fPassword'"; + } + $result = db_query ("UPDATE $table_admin SET modified=NOW(),active='$sqlActive' $password_query WHERE username='$username'"); if ($fSadmin == "on") $fSadmin = 'ALL'; @@ -155,5 +155,5 @@ include ("templates/admin_edit-admin.php"); include ("templates/footer.php"); -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/edit-alias.php =================================================================== --- trunk/edit-alias.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/edit-alias.php 2009-02-15 15:02:26 UTC (rev 566) @@ -99,15 +99,15 @@ $array = array(); } - for ($i = 0; $i < sizeof ($array); $i++) { - if (in_array ("$array[$i]", $CONF['default_aliases'])) continue; - if (empty ($array[$i])) continue; # TODO: should never happen - remove after 2.2 release - if (!check_email ($array[$i])) - { - $error = 1; - $tGoto = $goto; - $tMessage = $PALANG['pEdit_alias_goto_text_error2'] . "$array[$i]</span>"; - } + for ($i = 0; $i < sizeof ($array); $i++) { + if (in_array ("$array[$i]", $CONF['default_aliases'])) continue; + if (empty ($array[$i])) continue; # TODO: should never happen - remove after 2.2 release + if (!check_email ($array[$i])) + { + $error = 1; + $tGoto = $goto; + $tMessage = $PALANG['pEdit_alias_goto_text_error2'] . "$array[$i]</span>"; + } } if ($error != 1) Modified: trunk/edit-domain.php =================================================================== --- trunk/edit-domain.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/edit-domain.php 2009-02-15 15:02:26 UTC (rev 566) @@ -121,5 +121,5 @@ include ("templates/admin_edit-domain.php"); include ("templates/footer.php"); -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/index.php =================================================================== --- trunk/index.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/index.php 2009-02-15 15:02:26 UTC (rev 566) @@ -85,3 +85,6 @@ </p> </body> </html> +<?php +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ +?> Modified: trunk/list-admin.php =================================================================== --- trunk/list-admin.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/list-admin.php 2009-02-15 15:02:26 UTC (rev 566) @@ -27,9 +27,9 @@ $list_admins = list_admins(); if ((is_array ($list_admins) and sizeof ($list_admins) > 0)) { - for ($i = 0; $i < sizeof ($list_admins); $i++) { - $admin_properties[$i] = get_admin_properties ($list_admins[$i]); - } + for ($i = 0; $i < sizeof ($list_admins); $i++) { + $admin_properties[$i] = get_admin_properties ($list_admins[$i]); + } } include ("templates/header.php"); @@ -37,4 +37,5 @@ include ("templates/admin_list-admin.php"); include ("templates/footer.php"); +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/login.php =================================================================== --- trunk/login.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/login.php 2009-02-15 15:02:26 UTC (rev 566) @@ -32,14 +32,14 @@ # force user to delete setup.php (allows creation of superadmins!) if (file_exists (realpath ("./setup.php"))) { - if (is_string($CONF['configured']) && $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') - { - } - else - { + if (is_string($CONF['configured']) && $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') + { + } + else + { print "Please delete setup.php before using Postfix Admin!"; exit; - } + } } if ($_SERVER['REQUEST_METHOD'] == "GET") @@ -55,12 +55,12 @@ $fPassword = ''; if (isset ($_POST['fUsername'])) $fUsername = escape_string ($_POST['fUsername']); if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); - $lang = safepost('lang'); + $lang = safepost('lang'); - if ( $lang != check_language(0) ) { # only set cookie if language selection was changed - setcookie('lang', $lang, time() + 60*60*24*30); # language cookie, lifetime 30 days - # (language preference cookie is processed even if username and/or password are invalid) - } + if ( $lang != check_language(0) ) { # only set cookie if language selection was changed + setcookie('lang', $lang, time() + 60*60*24*30); # language cookie, lifetime 30 days + # (language preference cookie is processed even if username and/or password are invalid) + } $result = db_query ("SELECT password FROM $table_admin WHERE username='$fUsername' AND active='1'"); if ($result['rows'] == 1) @@ -105,4 +105,6 @@ include ("./templates/login.php"); include ("./templates/footer.php"); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/logout.php =================================================================== --- trunk/logout.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/logout.php 2009-02-15 15:02:26 UTC (rev 566) @@ -28,4 +28,6 @@ header ("Location: login.php"); exit; + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/main.php =================================================================== --- trunk/main.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/main.php 2009-02-15 15:02:26 UTC (rev 566) @@ -31,4 +31,6 @@ include ("./templates/menu.php"); include ("./templates/main.php"); include ("./templates/footer.php"); + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/password.php =================================================================== --- trunk/password.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/password.php 2009-02-15 15:02:26 UTC (rev 566) @@ -93,4 +93,6 @@ include ("./templates/password.php"); include ("./templates/footer.php"); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/search.php =================================================================== --- trunk/search.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/search.php 2009-02-15 15:02:26 UTC (rev 566) @@ -90,7 +90,7 @@ { $row['modified']=gmstrftime('%c %Z',$row['modified']); $row['active']=('t'==$row['active']) ? 1 : 0; - } + } $tAlias[] = $row; } } @@ -129,5 +129,5 @@ include ("templates/search.php"); include ("templates/footer.php"); -// vim:ts=4:sw=4:et +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/setup.php 2009-02-15 15:02:26 UTC (rev 566) @@ -209,8 +209,8 @@ } else { print "<li><b>Error: Can't connect to database</b><br />\n"; print "Please edit the \$CONF['database_*'] parameters in config.inc.php.\n"; - print "$error_text</li>\n"; - $error ++; + print "$error_text</li>\n"; + $error ++; } } @@ -369,3 +369,6 @@ </div> </body> </html> +<?php +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +?> Modified: trunk/templates/header.php =================================================================== --- trunk/templates/header.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/templates/header.php 2009-02-15 15:02:26 UTC (rev 566) @@ -14,9 +14,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <?php if (file_exists (realpath ("../".$CONF['theme_css']))) { - print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../".htmlentities($CONF['theme_css'])."\" />\n"; + print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../".htmlentities($CONF['theme_css'])."\" />\n"; } else { - print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".htmlentities($CONF['theme_css'])."\" />\n"; + print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".htmlentities($CONF['theme_css'])."\" />\n"; } ?> <title>Postfix Admin - <?php print $_SERVER['HTTP_HOST']; ?></title> @@ -26,14 +26,14 @@ <?php if (file_exists (realpath ("../".$CONF['theme_logo']))) { - print "<img id=\"login_header_logo\" src=\"../".htmlentities($CONF['theme_logo'])."\" />\n"; + print "<img id=\"login_header_logo\" src=\"../".htmlentities($CONF['theme_logo'])."\" />\n"; } else { - print "<img id=\"login_header_logo\" src=\"".htmlentities($CONF['theme_logo'])."\" />\n"; + print "<img id=\"login_header_logo\" src=\"".htmlentities($CONF['theme_logo'])."\" />\n"; } if (($CONF['show_header_text'] == "YES") and ($CONF['header_text'])) { - print "<h2>" . $CONF['header_text'] . "</h2>\n"; + print "<h2>" . $CONF['header_text'] . "</h2>\n"; } ?> </div> @@ -57,3 +57,6 @@ /* nuke it from orbit. It's the only way to be sure. */ $_SESSION['flash'] = array(); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ +?> Modified: trunk/users/edit-alias.php =================================================================== --- trunk/users/edit-alias.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/users/edit-alias.php 2009-02-15 15:02:26 UTC (rev 566) @@ -135,4 +135,6 @@ include ("../templates/users_edit-alias.php"); include ("../templates/footer.php"); } + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/users/index.php =================================================================== --- trunk/users/index.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/users/index.php 2009-02-15 15:02:26 UTC (rev 566) @@ -26,4 +26,6 @@ */ header ("Location: login.php"); exit; + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/users/logout.php =================================================================== --- trunk/users/logout.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/users/logout.php 2009-02-15 15:02:26 UTC (rev 566) @@ -29,4 +29,6 @@ header ("Location: login.php"); exit; + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> Modified: trunk/users/main.php =================================================================== --- trunk/users/main.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/users/main.php 2009-02-15 15:02:26 UTC (rev 566) @@ -54,4 +54,6 @@ include ("../templates/users_main.php"); include ("../templates/footer.php"); } + +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/users/password.php =================================================================== --- trunk/users/password.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/users/password.php 2009-02-15 15:02:26 UTC (rev 566) @@ -32,7 +32,7 @@ authentication_require_role('user'); $USERID_USERNAME = authentication_get_username(); -$tmp = preg_split ('/@/', $USERID_USERNAME); +$tmp = preg_split ('/@/', $USERID_USERNAME); $USERID_DOMAIN = $tmp[1]; if ($_SERVER['REQUEST_METHOD'] == "POST") @@ -58,7 +58,7 @@ $row = db_array ($result['result']); $checked_password = pacrypt($fPassword_current, $row['password']); - $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$username' AND password='$checked_password'"); + $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$username' AND password='$checked_password'"); if ($result['rows'] != 1) { $error = 1; Modified: trunk/variables.inc.php =================================================================== --- trunk/variables.inc.php 2009-02-11 20:02:15 UTC (rev 565) +++ trunk/variables.inc.php 2009-02-15 15:02:26 UTC (rev 566) @@ -19,8 +19,8 @@ */ if (ereg ("variables.inc.php", $_SERVER['PHP_SELF'])) { - header ("Location: login.php"); - exit; + header ("Location: login.php"); + exit; } $error = ""; @@ -99,4 +99,6 @@ $pPassword_admin_text = " "; $pPassword_password_current_text = " "; $pPassword_password_text = " "; + +/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |