This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 4f32db3ec68a714d17409927593d762fe31fd66d (commit)
via 78ca8d8d5aa434dae0b43b4eef587d7446a70e23 (commit)
via eff42bf3b86451240b44a9f31693f6aea90c3256 (commit)
from d1db0ca7ceb0e4486c863155e68c1cda6cfd12e4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4f32db3ec68a714d17409927593d762fe31fd66d
commit 4f32db3ec68a714d17409927593d762fe31fd66d
Author: Franck Villaume <[email protected]>
Date: Sun Aug 9 17:47:36 2015 +0200
use HTML helpers
diff --git a/src/www/developer/diary.php b/src/www/developer/diary.php
index e6264d6..51c3e97 100644
--- a/src/www/developer/diary.php
+++ b/src/www/developer/diary.php
@@ -26,6 +26,8 @@ require_once '../env.inc.php';
require_once $gfcommon.'include/pre.php';
require_once $gfwww.'include/vote_function.php';
+global $HTML;
+
if (!forge_get_config('use_diary')) {
exit_disabled('home');
}
@@ -82,8 +84,7 @@ if ($diary_user) {
</tr>';
for ($i=0; $i<$rows; $i++) {
echo '
- <tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i)
.'><td><a href="'. getStringFromServer('PHP_SELF') .'?diary_id='.
- db_result($result,$i,'id').'&diary_user='.
$diary_user .'">'.db_result($result,$i,'summary').'</a></td>'.
+ <tr '. $HTML->boxGetAltRowStyle($i)
.'><td>'.util_make_link('/developer/diary.php?diary_id='.db_result($result,$i,'id').'&diary_user='.
$diary_user, db_result($result,$i,'summary')).'</td>'.
'<td>'. date(_('Y-m-d H:i'),
db_result($result,$i,'date_posted')).'</td></tr>';
}
echo '
diff --git a/src/www/forum/forum.php b/src/www/forum/forum.php
index a896e3b..467d77b 100644
--- a/src/www/forum/forum.php
+++ b/src/www/forum/forum.php
@@ -36,6 +36,8 @@ require_once $gfcommon.'forum/ForumMessage.class.php';
require_once $gfcommon.'forum/AttachManager.class.php'; //attachment manager
require_once $gfcommon.'include/TextSanitizer.class.php'; // to make the HTML
input by the user safe to store
+global $HTML;
+
$group_id = getIntFromRequest('group_id');
$forum_id = getIntFromRequest('forum_id');
$style = getStringFromRequest('style');
@@ -182,8 +184,9 @@ if ($forum_id) {
$max_row_popup=html_build_select_box_from_arrays
($vals,$texts,'max_rows',$max_rows,false);
//now show the popup boxes in a form
+
+ echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'),
'method' => 'get'));
$ret_val = '
- <form action="'. getStringFromServer('PHP_SELF') .'" method="get">
<table>
<tr><td>
<input type="hidden" name="set" value="custom" />
@@ -193,8 +196,8 @@ if ($forum_id) {
'</td><td><input type="submit" name="submit" value="'.
_('Change View').'" />
</td></tr>
- </table>
- </form>';
+ </table>';
+ echo $HTML->closeForm();
$am = new AttachManager();
$ret_val .= $am->PrintHelperFunctions();
@@ -266,16 +269,14 @@ if ($forum_id) {
If so, highlite it in bold
*/
if ($f->getSavedDate() < $msg->getPostDate()) {
- $bold_begin='<strong>';
- $bold_end='</strong>';
+ $msgSubject = html_e('strong', array(),
$msg->getSubject());
} else {
- $bold_begin='';
- $bold_end='';
+ $msgSubject = $msg->getSubject();
}
/*
show the subject and poster
*/
- $cells[][] =
util_make_link('/forum/message.php?msg_id='.$msg->getID().'&group_id='.$group_id.'&reply=0',
html_image('ic/msg.png').' '.$bold_begin.$msg->getSubject().$bold_end);
+ $cells[][] =
util_make_link('/forum/message.php?msg_id='.$msg->getID().'&group_id='.$group_id.'&reply=0',
html_image('ic/msg.png').' '.$msgSubject);
$cells[][] = util_display_user($msg->getPosterName(),
$msg->getPosterID(), $msg->getPosterRealName());
$cells[][] = relative_date($msg->getPostDate());
$ret_val .= $HTML->multiTableRow(array('class' =>
$HTML->boxGetAltRowStyle($total_rows, true)), $cells);
@@ -333,26 +334,22 @@ if ($forum_id) {
$ret_val .= $HTML->listTableTop ($title_arr);
$i=0;
while (($row=db_fetch_array($result)) && ($i <
$max_rows)) {
- $ret_val .= '
- <tr '. $HTML->boxGetAltRowStyle($i)
.'><td><a href="'.util_make_uri('/forum/forum.php?thread_id='.
-
$row['thread_id'].'&forum_id='.$forum_id.'&group_id='.$group_id).'">'.
- html_image('ic/cfolder15.png') . ' ';
/*
See if this message is new or
not
If so, highlite it in bold
*/
- if ($f->getSavedDate() <
$row['recent']) {
- $bold_begin='<strong>';
- $bold_end='</strong>';
+ if ($f->getSavedDate() < $row['recent']) {
+ $subject = html_e('strong', array(),
$row['subject']);
} else {
- $bold_begin='';
- $bold_end='';
+ $subject = $row['subject'];
}
/*
show the subject and poster
*/
- $ret_val .= $bold_begin.$row['subject']
.$bold_end.'</a></td>'.
- '<td>'.util_display_user($row['user_name'],
$row['user_id'], $row['realname']).'</td>'.
+ $ret_val .= '<tr '.
$HTML->boxGetAltRowStyle($i) .'><td>'
+
.util_make_link('/forum/forum.php?thread_id='.$row['thread_id'].'&forum_id='.$forum_id.'&group_id='.$group_id,
+
html_image('ic/cfolder15.png').' '. $subject).'</td>'
+
.'<td>'.util_display_user($row['user_name'], $row['user_id'],
$row['realname']).'</td>'.
'<td>'. $row['followups'] .'</td>'.
'<td>'.
relative_date($row['recent']).'</td></tr>';
$i++;
@@ -372,7 +369,7 @@ if ($forum_id) {
if ($offset != 0) {
$ret_val .= '<span class="prev">
<a href="javascript:history.back()"><strong>' .
- html_image('t2.png',"15","15") ._('Newer
Messages').'</strong></a></span>';
+ html_image('t2.png', 15, 15) ._('Newer
Messages').'</strong></a></span>';
} else {
$ret_val .= ' ';
}
@@ -380,11 +377,9 @@ if ($forum_id) {
$ret_val .= '</td><td></td><td class="halfwidth align-right">';
if ($avail_rows > $max_rows) {
- $ret_val .= '<span class="next">
- <a
href="'.util_make_uri('/forum/forum.php?max_rows='.$max_rows.'&style='.$style.'&offset='.($offset+$i).
-
'&forum_id='.$forum_id.'&group_id='.$group_id).'">
- <strong> '._('Older Messages') .
- html_image('t.png',"15","15") .
'</strong></a></span>';
+ $ret_val .= '<span class="next">'.
+
util_make_link('/forum/forum.php?max_rows='.$max_rows.'&style='.$style.'&offset='.($offset+$i).'&forum_id='.$forum_id.'&group_id='.$group_id,
+ html_e('strong', array(),
_('Older Messages').html_image('t.png', 15, 15))).'</span>';
} else {
$ret_val .= ' ';
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=78ca8d8d5aa434dae0b43b4eef587d7446a70e23
commit 78ca8d8d5aa434dae0b43b4eef587d7446a70e23
Author: Franck Villaume <[email protected]>
Date: Sat Aug 1 13:01:35 2015 +0200
use HTML helper: openForm, closeForm.
diff --git a/src/www/admin/admin_table.php b/src/www/admin/admin_table.php
index 8c87ca1..eb2632a 100644
--- a/src/www/admin/admin_table.php
+++ b/src/www/admin/admin_table.php
@@ -30,6 +30,7 @@
* @param string $primary_key the primary key of the table
*/
function admin_table_add($table, $unit, $primary_key) {
+ global $HTML;
// This query may return no rows, but the field names are needed.
$result = db_query_params("SELECT * FROM $table WHERE $primary_key=0",
array());
$fields = array();
@@ -39,8 +40,8 @@ function admin_table_add($table, $unit, $primary_key) {
printf(_('Create a new %s below:'), getUnitLabel($unit));
+ echo $HTML->openForm(array('name' => 'add', 'action' =>
getStringFromServer('PHP_SELF').'?function=postad', 'method' => 'post'));
echo '
- <form name="add"
action="'.getStringFromServer('PHP_SELF').'?function=postadd" method="post">
<input type="hidden" name="form_key"
value="'.form_generate_key().'" />
<table>';
@@ -53,11 +54,9 @@ function admin_table_add($table, $unit, $primary_key) {
}
}
echo '</table><input type="submit" value="'._('Add').'" />
- <input type="hidden" name="__fields__"
value="'.implode(',',$fields).'" />
- </form>
- <form name="cancel"
action="'.getStringFromServer('PHP_SELF').'" method="post">
- <input type="submit" value="'._('Cancel').'" />
- </form>';
+ <input type="hidden" name="__fields__"
value="'.implode(',',$fields).'" />';
+ echo html_e('input', array('type' => 'button', 'name' =>
_('Cancel'), 'value' => _('Cancel'), 'onclick' =>
'window.location=\''.util_make_uri(getStringFromServer('PHP_SELF')).'\''));
+ echo $HTML->closeForm();
} else {
echo db_error();
}
@@ -154,13 +153,11 @@ function admin_table_confirmdelete($table, $unit,
$primary_key, $id) {
for ($i = 0; $i < $cols; $i++) {
echo '<li><strong>'.db_fieldname($result,$i).'</strong>
'.db_result($result,0,$i).'</li>';
}
- echo '</ul>
- <form name="delete"
action="'.getStringFromServer('PHP_SELF').'?function=delete&id='.$id.'"
method="post">
- <input type="submit" value="'._('Delete').'" />
- </form>
- <form name="cancel"
action="'.getStringFromServer('PHP_SELF').'" method="post">
- <input type="submit" value="'._('Cancel').'" />
- </form>';
+ echo '</ul>';
+ echo $HTML->openForm(array('name' => 'delete', 'action' =>
getStringFromServer('PHP_SELF').'?function=delete&id='.$id, 'method' =>
'post'));
+ echo '<input type="submit" value="'._('Delete').'" />';
+ echo html_e('input', array('type' => 'button', 'name' =>
_('Cancel'), 'value' => _('Cancel'), 'onclick' =>
'window.location=\''.util_make_uri(getStringFromServer('PHP_SELF')).'\''));
+ echo $HTML->closeForm();
} else {
echo $HTML->error_msg(db_error());
}
@@ -200,9 +197,8 @@ function admin_table_edit($table, $unit, $primary_key, $id)
{
printf(_('Modify the %s below:'), getUnitLabel($unit));
- echo '
- <form name="edit"
action="'.getStringFromServer('PHP_SELF').'?function=postedit&id='.$id.'"
method="post">
- <table>';
+ echo $HTML->openForm(array('name' => 'edit' ,'action' =>
getStringFromServer('PHP_SELF').'?function=postedit&id='.$id, 'method' =>
'post'));
+ echo '<table>';
for ($i = 0; $i < $cols; $i++) {
$fieldname = db_fieldname($result, $i);
@@ -216,10 +212,9 @@ function admin_table_edit($table, $unit, $primary_key,
$id) {
echo '<td><input type="text"
name="'.$fieldname.'" value="'.$value.'" /></td></tr>';
}
}
- echo '</table><input type="submit" value="'._('Submit').'"
/></form>
- <form name="cancel"
action="'.getStringFromServer('PHP_SELF').'" method="post">
- <input type="submit" value="'._('Cancel').'" />
- </form>';
+ echo '</table><input type="submit" value="'._('Submit').'" />';
+ echo html_e('input', array('type' => 'button', 'name' =>
_('Cancel'), 'value' => _('Cancel'), 'onclick' =>
'window.location=\''.util_make_uri(getStringFromServer('PHP_SELF')).'\''));
+ echo $HTML->closeForm();
} else {
echo $HTML->error_msg(db_error());
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=eff42bf3b86451240b44a9f31693f6aea90c3256
commit eff42bf3b86451240b44a9f31693f6aea90c3256
Author: Franck Villaume <[email protected]>
Date: Fri Jul 31 20:24:14 2015 +0200
remove most PHP_SELF in www/admin
diff --git a/src/www/activity/index.php b/src/www/activity/index.php
index 8f412b9..c1c5921 100644
--- a/src/www/activity/index.php
+++ b/src/www/activity/index.php
@@ -5,7 +5,7 @@
* Copyright 1999 dtype
* Copyright 2006 (c) GForge, LLC
* Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
* Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
* Copyright 2014, Benoit Debaenst - TrivialDev
* http://fusionforge.org/
@@ -190,8 +190,10 @@ if (count($ids) < 1) {
<div id="activity">
<div id="activity_left">
-<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
+<?php
+echo $HTML->openForm(array('action' => '/activity/?group_id='.$group_id,
'method' => 'post'));
+echo html_e('input', array('type' => 'hidden', 'name' => 'group_id', 'value'
=> $group_id));
+?>
<div id="activity_select" >
<div id="activity_label"><?php echo _('Activity')._(':'); ?></div>
@@ -212,7 +214,9 @@ if (count($ids) < 1) {
<input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" />
</div>
-</form>
+<?php
+echo $HTML->closeForm();
+?>
</div>
<div id="activity_right">
diff --git a/src/www/admin/cronman.php b/src/www/admin/cronman.php
index 2f1b01a..4f45b8c 100644
--- a/src/www/admin/cronman.php
+++ b/src/www/admin/cronman.php
@@ -4,6 +4,7 @@
*
* Copyright 2002 GForge, LLC
* Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2015, Franck Villaume - TrivialDev
* http://fusionforge.org/
*
* This file is part of FusionForge. FusionForge is free software;
@@ -27,86 +28,90 @@ require_once $gfcommon.'include/pre.php';
require_once $gfwww.'admin/admin_utils.php';
require_once $gfcommon.'include/cron_utils.php';
+global $HTML;
+
site_admin_header(array('title'=>_('Cron Manager')));
$which = getIntFromRequest('which', 100);
-?>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
-<?php echo html_build_select_box_from_arrays(array_keys($cron_arr),
array_values($cron_arr), 'which', $which,true,'Any'); ?>
-<input type="submit" name="submit" value="<?php echo _('Submit');?>" />
-</form>
-<?php
-
-$title_arr = array(
- _('Date'),
- _('Job'),
- _('Message')
-);
+echo $HTML->openForm(array('action' => '/admin/cronman.php', 'method' =>
'get'));
+echo html_build_select_box_from_arrays(array_keys($cron_arr),
array_values($cron_arr), 'which', $which, true, _('Any'));
+echo html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' =>
_('Submit')));
+echo $HTML->closeForm();
-echo $HTML->listTableTop ($title_arr);
-
-if ($which==100) {
+if ($which == 100) {
$res = db_query_params ('SELECT COUNT(*) AS count FROM cron_history',
array ());
} else {
$res = db_query_params ('SELECT COUNT(*) AS count FROM cron_history
WHERE job=$1',
array ($which));
}
-$totalCount = db_result($res, 0, 'count');
+$totalCount = (int)db_result($res, 0, 'count');
$offset = getIntFromRequest('offset');
if($offset > $totalCount) {
$offset = 0;
}
-if ($which==100) {
- $res = db_query_params ('SELECT * FROM cron_history ORDER BY rundate
DESC',
- array (),
- ADMIN_CRONMAN_ROWS,
- $offset);
-} else {
- $res = db_query_params ('SELECT * FROM cron_history WHERE job=$1 ORDER
BY rundate DESC',
- array ($which),
- ADMIN_CRONMAN_ROWS,
- $offset);
-}
+if ($totalCount) {
+ if ($which == 100) {
+ $res = db_query_params ('SELECT * FROM cron_history ORDER BY
rundate DESC',
+ array (),
+ ADMIN_CRONMAN_ROWS,
+ $offset);
+ } else {
+ $res = db_query_params ('SELECT * FROM cron_history WHERE
job=$1 ORDER BY rundate DESC',
+ array ($which),
+ ADMIN_CRONMAN_ROWS,
+ $offset);
+ }
-for ($i=0; $i<db_numrows($res); $i++) {
- $cells = array();
- $cells[][] = date(_('Y-m-d H:i'), db_result($res,$i,'rundate'));
- $cells[][] = $cron_arr[db_result($res,$i,'job')];
- $cells[][] = nl2br(htmlentities(db_result($res,$i,'output')));
- echo $HTML->multiTableRow(array('class' =>
$HTML->boxGetAltRowStyle($i+1, true)), $cells);
-}
+ $title_arr = array(
+ _('Date'),
+ _('Job'),
+ _('Message')
+ );
-echo $HTML->listTableBottom();
+ echo $HTML->listTableTop ($title_arr);
-if($totalCount > ADMIN_CRONMAN_ROWS) {
-?>
-<br />
-<table class="tablegetmore fullwidth" cellpadding="5">
- <tr>
- <td><?php
- if ($offset != 0) {
- echo
util_make_link('/admin/cronman.php?which='.$which.'&offset='.($offset -
ADMIN_CRONMAN_ROWS),
- html_image('t2.png', '15',
'15').' '._('Previous'),
- array('class' => 'prev'));
- } else {
- echo ' ';
- }
- echo '</td><td class="align-right">';
- if ($totalCount > $offset + ADMIN_CRONMAN_ROWS) {
- echo
util_make_link('/admin/cronman.php?which='.$which.'&offset='.($offset +
ADMIN_CRONMAN_ROWS),
- _('Next').'
'.html_image('t.png', '15', '15'),
- array('class' => 'next'));
- } else {
- echo ' ';
- }
- ?></td>
- </tr>
-</table>
-<?php
+ for ($i=0; $i<db_numrows($res); $i++) {
+ $cells = array();
+ $cells[][] = date(_('Y-m-d H:i'), db_result($res,$i,'rundate'));
+ $cells[][] = $cron_arr[db_result($res,$i,'job')];
+ $cells[][] = nl2br(htmlentities(db_result($res,$i,'output')));
+ echo $HTML->multiTableRow(array('class' =>
$HTML->boxGetAltRowStyle($i+1, true)), $cells);
+ }
+
+ echo $HTML->listTableBottom();
+
+ if($totalCount > ADMIN_CRONMAN_ROWS) {
+ ?>
+ <br />
+ <table class="tablegetmore fullwidth" cellpadding="5">
+ <tr>
+ <td><?php
+ if ($offset != 0) {
+ echo
util_make_link('/admin/cronman.php?which='.$which.'&offset='.($offset -
ADMIN_CRONMAN_ROWS),
+ html_image('t2.png',
'15', '15').' '._('Previous'),
+ array('class' =>
'prev'));
+ } else {
+ echo ' ';
+ }
+ echo '</td><td class="align-right">';
+ if ($totalCount > $offset + ADMIN_CRONMAN_ROWS) {
+ echo
util_make_link('/admin/cronman.php?which='.$which.'&offset='.($offset +
ADMIN_CRONMAN_ROWS),
+ _('Next').'
'.html_image('t.png', '15', '15'),
+ array('class' =>
'next'));
+ } else {
+ echo ' ';
+ }
+ ?></td>
+ </tr>
+ </table>
+ <?php
+ }
+} else {
+ echo $HTML->information(_('No message entries found'));
}
site_admin_footer();
diff --git a/src/www/admin/groupedit.php b/src/www/admin/groupedit.php
index 6fc24de..416c4b1 100644
--- a/src/www/admin/groupedit.php
+++ b/src/www/admin/groupedit.php
@@ -29,6 +29,8 @@ require_once $gfcommon.'include/pre.php';
require_once $gfwww.'admin/admin_utils.php';
require_once $gfwww.'project/admin/project_admin_utils.php';
+global $HTML;
+
session_require_global_perm ('forge_admin');
$group_id = getIntFromRequest('group_id');
@@ -92,14 +94,15 @@ if (getStringFromRequest('submit')) {
}
-$title = _('Site Admin: Project Info for ') . $group->getPublicName();
+$title = _('Site Admin')._(': ')._('Project Info for ') .
$group->getPublicName();
site_admin_header(array('title'=>$title));
?>
<h2><?php echo util_make_link("/project/admin/?group_id=$group_id", _('Project
Admin')); ?></h2>
<h2><?php echo util_make_link("/admin/groupdelete.php?group_id=$group_id",
_('Permanently Delete Project')); ?></h2>
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
+<?php
+echo $HTML->openForm(array('action' =>
'/admin/groupedit.php?group_id='.$group_id, 'method' => 'post'));
+?>
<table class="infotable">
<tr>
@@ -222,10 +225,9 @@ if ($group->usesSCM()) {
<br /><input type="submit" name="submit" value="<?php echo _('Update'); ?>" />
<input type="submit" name="resend" value="<?php echo
_('Resend New Project Instruction Email'); ?>" />
-</form>
<?php
-
+echo $HTML->closeForm();
show_grouphistory($group->getID());
site_admin_footer();
diff --git a/src/www/admin/pending-news.php b/src/www/admin/pending-news.php
index 6882748..6325681 100644
--- a/src/www/admin/pending-news.php
+++ b/src/www/admin/pending-news.php
@@ -34,6 +34,8 @@ require_once $gfwww.'news/news_utils.php';
require_once $gfcommon.'forum/Forum.class.php';
require_once $gfcommon.'include/TextSanitizer.class.php'; // to make the HTML
input by the user safe to store
+global $HTML;
+
$post_changes = getStringFromRequest('post_changes');
$approve = getStringFromRequest('approve');
$status = getIntFromRequest('status');
@@ -130,8 +132,8 @@ AND news_bytes.group_id=groups.group_id ", array($id));
$group = group_get_object(db_result($result,0,'group_id'));
$user = user_get_object(db_result($result,0,'submitted_by'));
+ echo $HTML->openForm(array('action' =>
'/admin/pending-news.php&approve=1&id='.$id, 'method' => 'post'));
echo '
- <form action="'.getStringFromServer('PHP_SELF').'"
method="post">
<input type="hidden" name="for_group"
value="'.db_result($result,0,'group_id').'" />
<input type="hidden" name="id"
value="'.db_result($result,0,'id').'" />
<strong>'._('Submitted for project')._(':').'</strong> '.
@@ -157,8 +159,8 @@ AND news_bytes.group_id=groups.group_id ", array($id));
echo $params['content'].'<br/>';
echo '<br />
- <input type="submit" name="submit" value="'._('Submit').'" />
- </form>';
+ <input type="submit" name="submit" value="'._('Submit').'" />';
+ echo $HTML->closeForm();
} else {
diff --git a/src/www/admin/pluginman.php b/src/www/admin/pluginman.php
index 25aa482..553f7d2 100644
--- a/src/www/admin/pluginman.php
+++ b/src/www/admin/pluginman.php
@@ -126,7 +126,7 @@ if (getStringFromRequest('update')) {
}
site_admin_header(array('title'=>_('Plugin Manager')));
-echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'),
'method' => 'get'));
+echo $HTML->openForm(array('action' => '/admin/pluginmap.php', 'method' =>
'get'));
echo html_e('p', array(), _('Here you can activate / deactivate site-wide
plugins which are in the plugins/ folder. Then, you should activate them also
per project, per user or whatever the plugin specifically applies to.'));
echo html_e('p', array('class' => 'important'), _('Be careful because some
projects/users can be using the plugin. Deactivating it will remove the plugin
from all users/projects.'));
diff --git a/src/www/admin/responses_admin.php
b/src/www/admin/responses_admin.php
index 7c1c997..89e9f67 100644
--- a/src/www/admin/responses_admin.php
+++ b/src/www/admin/responses_admin.php
@@ -29,17 +29,18 @@ require_once $gfwww.'include/canned_responses.php';
require_once $gfwww.'admin/admin_utils.php';
require_once $gfwww.'project/admin/project_admin_utils.php';
-site_admin_header(array('title'=>_('Site Admin: Edit Rejection Responses')));
+global $HTML;
+
+site_admin_header(array('title'=>_('Site Admin').(': ')._('Edit Rejection
Responses')));
function check_select_value($value) {
if( $value == "100" ) {
- print('<span class="important">'.sprintf(_('You cannot %s
“None”!'), $GLOBALS['type'])."</span><br />\n");
+ print('<span class="important">'.sprintf(_('You cannot %s
“None”!'), $GLOBALS['action'])."</span><br />\n");
}
}
-?>
-<form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?>">
-<?php echo _('Existing Responses')._(': '); ?><?php echo
get_canned_responses(); ?>
+echo $HTML->openForm(array('method' => 'post', 'action' =>
'/admin/responses_admin.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'); ?>" />
@@ -48,12 +49,10 @@ function check_select_value($value) {
<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 _('I am Sure'); ?>
-</form>
-
-<br />
+<?php echo _('I am Sure');
+echo $HTML->closeForm();
-<?php
+echo html_e('br');
$action = getStringFromRequest('action');
@@ -79,20 +78,17 @@ if( $action == "Edit" ) {
$row = db_fetch_array($res);
$response_title=$row[1];
$response_text=$row[2];
-?>
-
-<?php echo _('Edit Response:'); ?><br />
-<form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?>">
-<?php echo _('Response Title:'); ?><input type="text" name="response_title"
size="30" maxlength="25" value="<?php echo $response_title; ?>" /><br />
-<?php echo _('Response Text:'); ?><br />
+ echo _('Edit Response')._(':').html_e('br');
+ echo $HTML->openForm(array('method' => 'post', 'action' =>
'/admin/responses_admin.php'));
+ echo _('Response Title').(':'); ?><input type="text"
name="response_title" size="30" maxlength="25" value="<?php echo
$response_title; ?>" /><br />
+<?php echo _('Response Text')._(':'); ?><br />
<textarea name="response_text" cols="50" rows="10"><?php echo $response_text;
?></textarea>
<input type="hidden" name="response_id" value="<?php echo $response_id; ?>" />
<input type="hidden" name="action2" value="<?php echo _('Go'); ?>" />
<input type="hidden" name="action" value="Edit">
<input type="submit" name="actionsubmit" value="<?php echo _('Edit'); ?>" />
-</form>
-
<?php
+ echo $HTML->closeForm();
}
} elseif ( $action == "Delete" ) {
@@ -120,19 +116,18 @@ if( $action == "Edit" ) {
print(" <strong>" ._('Added Response')."</strong> ");
} else {
-?>
-<?php echo _('Create New Response:'); ?><br />
-<form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?>">
-<?php echo _('Response Title:'); ?><input type="text" name="response_title"
size="30" maxlength="25" /><br />
-<?php echo _('Response Text:'); ?><br />
+ echo _('Create New Response')._(':').html_e('br');
+ echo $HTML->openForm(array('method' => 'post', 'action' =>
'/admin/responses_admin.php'));
+ echo _('Response Title')._(':'); ?><input type="text"
name="response_title" size="30" maxlength="25" /><br />
+<?php echo _('Response Text')._(':'); ?><br />
<textarea name="response_text" cols="50" rows="10"></textarea>
<br />
<input type="hidden" name="action" value="Create" />
<input type="submit" name="actions" value="<?php echo _('Create'); ?>" />
-</form>
<?php
+echo $HTML->closeForm();
}
site_admin_footer();
diff --git a/src/www/admin/useredit.php b/src/www/admin/useredit.php
index c35ca44..3b3250a 100644
--- a/src/www/admin/useredit.php
+++ b/src/www/admin/useredit.php
@@ -123,7 +123,7 @@ site_admin_header(array('title'=>$title));
<h2><?php echo _('Account Information'); ?></h2>
<?php
-echo $HTML->openForm(array('method' => 'post', 'action' =>
getStringFromServer('PHP_SELF'))); ?>
+echo $HTML->openForm(array('method' => 'post', 'action' =>
'/admin/useredit.php')); ?>
<input type="hidden" name="action" value="update_user" />
<input type="hidden" name="user_id" value="<?php print $user_id; ?>" />
diff --git a/src/www/admin/vhost.php b/src/www/admin/vhost.php
index 9f1c271..f0a4e15 100644
--- a/src/www/admin/vhost.php
+++ b/src/www/admin/vhost.php
@@ -111,7 +111,9 @@ site_admin_header(array('title'=>_('Site Admin')));
<h3><?php echo _('Virtual Host Administration'); ?></h3>
-<form name="madd" method="post" action="<?php echo
getStringFromServer('PHP_SELF'); ?>">
+<?php
+echo $HTML->openForm(array('name' => 'madd', 'method' => 'post', 'action' =>
'/admin/vhost.php'));
+?>
<strong><?php echo _('Add Virtual Host'); ?></strong>
@@ -129,15 +131,17 @@ site_admin_header(array('title'=>_('Site Admin')));
</table>
<input type="submit" name="add" value="<?php echo _('Add Virtual Host'); ?>" />
-</form>
-
-<p> </p>
+<?php
+echo $HTML->closeForm();
+?>
<hr />
<strong><?php echo _('Tweak Directories'); ?></strong>
<br />
-<form name="tweak" method="post" action="<?php echo
getStringFromServer('PHP_SELF'); ?>">
+<?php
+echo $HTML->openForm(array('name' => 'tweak', 'method' => 'post', 'action' =>
'/admin/vhost.php'));
+?>
<table>
<tr>
<td><?php echo _('Virtual Host')._(':'); ?></td><td><input type="text"
name="vhost_name" /></td>
@@ -147,9 +151,9 @@ site_admin_header(array('title'=>_('Site Admin')));
<input type="hidden" name="tweak" value="1" />
-</form>
-
<?php
+echo $HTML->closeForm();
+
if (getStringFromRequest('tweak')) {
$vhost_name = getStringFromRequest('vhost_name');
@@ -165,7 +169,7 @@ if (getStringFromRequest('tweak')) {
$row_vh = db_fetch_array($res_vh);
- echo $HTML->information(_('Update Record:'));
+ echo $HTML->information(_('Update Record')._(':'));
$title=array();
$title[]=_('VHOST ID');
@@ -175,10 +179,9 @@ if (getStringFromRequest('tweak')) {
$title[]=_('CGI Dir');
$title[]=_('Operations');
+ echo $HTML->openForm(array('name' => 'update', 'method' =>
'post', 'action' => '/admin/vhost.php'));
+ echo $HTML->listTableTop($title);
print '
- <form name="update" method="post"
action="'.getStringFromServer('PHP_SELF').'">
-
- '.$HTML->listTableTop($title).'
<tr><td>'.$row_vh['vhostid'].'</td>
<td>'.$row_vh['vhost_name'].'</td>
<td>'.util_make_link_g
($row_vh['unix_group_name'],$row_vh['group_id'],$row_vh['unix_group_name']).'</td>
@@ -187,11 +190,10 @@ if (getStringFromRequest('tweak')) {
'.$HTML->listTableBottom().'
<input type="hidden" name="tweakcommit" value="1" />
- <input type="hidden" name="vhostid"
value="'.$row_vh['vhostid'].'" />
- </form>
- ';
+ <input type="hidden" name="vhostid"
value="'.$row_vh['vhostid'].'" />';
+ echo $HTML->closeForm();
} else {
- echo $HTML->warning_msg(_('No such VHOST: ').$vhost_name);
+ echo $HTML->warning_msg(_('No such VHOST')._(': ').$vhost_name);
}
}
-----------------------------------------------------------------------
Summary of changes:
src/www/activity/index.php | 12 ++--
src/www/admin/admin_table.php | 35 +++++------
src/www/admin/cronman.php | 125 ++++++++++++++++++++------------------
src/www/admin/groupedit.php | 12 ++--
src/www/admin/pending-news.php | 8 ++-
src/www/admin/pluginman.php | 2 +-
src/www/admin/responses_admin.php | 43 ++++++-------
src/www/admin/useredit.php | 2 +-
src/www/admin/vhost.php | 32 +++++-----
src/www/developer/diary.php | 5 +-
src/www/forum/forum.php | 45 ++++++--------
11 files changed, 161 insertions(+), 160 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits