[Fusionforge-commits] r12175 - in branches/Branch_5_1/src: common/include www/admin www/forum/admin www/frs/admin www/project/admin www/stats
Roland Mas
lolando at libremir.placard.fr.eu.org
Mon Feb 7 15:01:28 CET 2011
Author: lolando
Date: 2011-02-07 15:01:22 +0100 (Mon, 07 Feb 2011)
New Revision: 12175
Modified:
branches/Branch_5_1/src/common/include/account.php
branches/Branch_5_1/src/www/admin/cronman.php
branches/Branch_5_1/src/www/admin/massmail.php
branches/Branch_5_1/src/www/admin/responses_admin.php
branches/Branch_5_1/src/www/admin/useredit.php
branches/Branch_5_1/src/www/forum/admin/index.php
branches/Branch_5_1/src/www/frs/admin/index.php
branches/Branch_5_1/src/www/project/admin/vhost.php
branches/Branch_5_1/src/www/stats/site_stats_utils.php
Log:
Merged from Evolvis: misc. PHP and HTML fixes
Modified: branches/Branch_5_1/src/common/include/account.php
===================================================================
--- branches/Branch_5_1/src/common/include/account.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/common/include/account.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -205,10 +205,10 @@
$this_shell = chop($shells[$i]);
if ($current == $this_shell) {
- echo "<option selected value=$this_shell>$this_shell</option>\n";
+ echo "<option selected=\"selected\" value=$this_shell>$this_shell</option>\n";
} else {
if (! preg_match("/^#/",$this_shell)){
- echo "<option value=$this_shell>$this_shell</option>\n";
+ echo "<option value=\"$this_shell\">$this_shell</option>\n";
}
}
}
Modified: branches/Branch_5_1/src/www/admin/cronman.php
===================================================================
--- branches/Branch_5_1/src/www/admin/cronman.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/admin/cronman.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -78,7 +78,7 @@
echo '<tr '. $HTML->boxGetAltRowStyle($i+1) .'>
<td>'. date(_('Y-m-d H:i'), db_result($res,$i,'rundate')).'</td>
<td>'. $cron_arr[db_result($res,$i,'job')].'</td>
- <td>'. nl2br(db_result($res,$i,'output')).'</td></tr>';
+ <td>'. nl2br(htmlentities(db_result($res,$i,'output'))).'</td></tr>';
}
Modified: branches/Branch_5_1/src/www/admin/massmail.php
===================================================================
--- branches/Branch_5_1/src/www/admin/massmail.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/admin/massmail.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -142,10 +142,14 @@
print '<a name="active">'._('Active Deliveries').':</a>';
-echo $GLOBALS['HTML']->listTableTop($title);
+$seen = false;
$i = 0;
while ($row = db_fetch_array($res)) {
+ if (!$seen) {
+ echo $GLOBALS['HTML']->listTableTop($title);
+ $seen = true;
+ }
echo '
<tr '.$GLOBALS['HTML']->boxGetAltRowStyle($i++).'>
<td> <a href="massmail-del.php?id='.$row['id'].'"></a></td>
@@ -158,7 +162,11 @@
';
}
-echo $GLOBALS['HTML']->listTableBottom();
+if ($seen) {
+ echo $GLOBALS['HTML']->listTableBottom();
+} else {
+ echo '<p>' . _('No deliveries active.') . "</p>\n";
+}
site_admin_footer(array());
Modified: branches/Branch_5_1/src/www/admin/responses_admin.php
===================================================================
--- branches/Branch_5_1/src/www/admin/responses_admin.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/admin/responses_admin.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -43,10 +43,10 @@
<?php echo _('Existing Responses:'); ?><?php echo get_canned_responses(); ?>
<!-- Reinhard Spisser: commenting localization, since otherwise it will not work -->
<!--
-<input name="action" type="submit" value="<?php echo _('Edit'); ?>"/>
+<input name="action" type="submit" value="<?php echo _('Edit'); ?>" />
<input name="action" type="submit" value="<?php echo _('Delete'); ?>" />
---->
-<input name="action" type="submit" value="Edit"/>
+-->
+<input name="action" type="submit" value="Edit" />
<input name="action" type="submit" value="Delete" />
<input type="checkbox" name="sure" value="<?php echo _('yes'); ?>" />
<?php echo _('Yes, I\'m sure'); ?>
@@ -129,7 +129,7 @@
<?php echo _('Response Text:'); ?><br />
<textarea name="response_text" cols="50" rows="10"></textarea>
<br />
-<input type="hidden" name="action" value="Create">
+<input type="hidden" name="action" value="Create" />
<input type="submit" name="actions" value="<?php echo _('Create'); ?>" />
</form>
Modified: branches/Branch_5_1/src/www/admin/useredit.php
===================================================================
--- branches/Branch_5_1/src/www/admin/useredit.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/admin/useredit.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -139,8 +139,7 @@
_('Active (A)'),
_('Suspended (S)'));
}
-?>
-<?php echo html_build_select_box_from_arrays(
+echo html_build_select_box_from_arrays(
$status_letter, $status_text,'status', $u->getStatus(), false);
?>
</td>
@@ -232,10 +231,12 @@
$title[]=_('Name');
$title[]=_('Unix name');
$title[]=_('Operations');
-echo $GLOBALS['HTML']->listTableTop($title);
$i = 0 ;
foreach ($projects as $p) {
+ if ($i == 0) {
+ echo $GLOBALS['HTML']->listTableTop($title);
+ }
print '
<tr '.$GLOBALS['HTML']->boxGetAltRowStyle($i++).'>
<td>'.util_unconvert_htmlspecialchars(htmlspecialchars($p->getPublicName())).'</td>
@@ -243,10 +244,14 @@
<td width="40%">'.util_make_link ('/project/admin/?group_id='.$p->getID(),_('[Project Admin]')).'</td>
</tr>
';
+ $i++;
+}
+if ($i > 0) {
+ echo $GLOBALS['HTML']->listTableBottom();
+} else {
+ echo '<p>'._('This user is not a member of any project.').'</p>';
}
-
-echo $GLOBALS['HTML']->listTableBottom();
echo '<br />';
site_admin_footer(array());
Modified: branches/Branch_5_1/src/www/forum/admin/index.php
===================================================================
--- branches/Branch_5_1/src/www/forum/admin/index.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/forum/admin/index.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -233,7 +233,7 @@
forum_header(array('title'=>_('Delete a Message')));
echo '<center>
<form action="'.getStringFromServer('PHP_SELF').'" method="post">
- <h3>' . _('WARNING! You are about to permanently delete a message and all of its followups!!') . '</h3><p>
+ <h3>' . _('WARNING! You are about to permanently delete a message and all of its followups!!') . '</h3>
<p>
<input type="submit" name="ok" value="' . _('Yes') . '" />
<input type="submit" name="cancel" value="' . _('No') . '" />
Modified: branches/Branch_5_1/src/www/frs/admin/index.php
===================================================================
--- branches/Branch_5_1/src/www/frs/admin/index.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/frs/admin/index.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -174,7 +174,7 @@
</td>
<td><input type="text" name="package_name" value="'.db_result($res,$i,'package_name') .'" size="20" maxlength="60" /></td>
- <td>'.frs_show_status_popup ('status_id', db_result($res,$i,'status_id')).'</span></td>
+ <td>'.frs_show_status_popup ('status_id', db_result($res,$i,'status_id')).'</td>
<td><input type="submit" name="submit" value="'._('Update').'" />
<a href="deletepackage.php?package_id='.
Modified: branches/Branch_5_1/src/www/project/admin/vhost.php
===================================================================
--- branches/Branch_5_1/src/www/project/admin/vhost.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/project/admin/vhost.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -36,6 +36,8 @@
$group = group_get_object($group_id);
+if (!isset($feedback)) $feedback = "";
+
if (!$group || !is_object($group)) {
exit_error('Error','Error creating group object');
} else if ($group->isError()) {
@@ -115,7 +117,7 @@
?>
-<form name="new_vhost" action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group->getID().'&createvhost=1'; ?>" method="post">
+<form name="new_vhost" action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group->getID().'&createvhost=1'; ?>" method="post">
<table border="0">
<tr>
<td> <?php echo _('New Virtual Host <em>(e.g. vhost.org)</em>') ?> </td>
Modified: branches/Branch_5_1/src/www/stats/site_stats_utils.php
===================================================================
--- branches/Branch_5_1/src/www/stats/site_stats_utils.php 2011-02-07 10:57:56 UTC (rev 12174)
+++ branches/Branch_5_1/src/www/stats/site_stats_utils.php 2011-02-07 14:01:22 UTC (rev 12175)
@@ -60,7 +60,13 @@
function stats_util_sum_array( $sum, $add ) {
+ if (!is_array($sum)) {
+ $sum = array();
+ }
while( list( $key, $val ) = each( $add ) ) {
+ if (!isset($sum[$key])) {
+ $sum[$key] = 0;
+ }
$sum[$key] += $val;
}
return $sum;
More information about the Fusionforge-commits
mailing list