Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/gnuworld/help_mgr/add_cmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$CAN_EDIT = 1;
$CAN_ADD = 2;
$ENABLE_COOKIE_TABLE=0;
$lang_id = $langid;
$lang_id = $lang_id;

include("../../../php_includes/cmaster.inc");
std_init();
Expand Down
4 changes: 2 additions & 2 deletions docs/gnuworld/help_mgr/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<?
if (acl(XHELP_CAN_ADD)) {
echo "<form name=addcmd action=add_cmd.php method=get>\n";
echo "<input type=hidden name=langid value=$lang_id>\n";
echo "<input type=hidden name=lang_id value=$lang_id>\n";
echo "<li>&nbsp;Add COMMAND named <input type=text name=cmdname size=20 maxlength=20>&nbsp;&nbsp;<input type=submit value=Go!>\n";
echo "</form>\n";
}
Expand All @@ -64,7 +64,7 @@
for ($x=0;$x<pg_numrows($ras);$x++) {
$roo = pg_fetch_object($ras,$x);
echo "<tr bgcolor=#" . $cTheme->table_bgcolor . ">\n";
echo "<td valign=top width=20%><a href=\"edit_cmd.php?langid=$lang_id&cmdname=$roo->topic\">" . $roo->topic . "</a></td>\n";
echo "<td valign=top width=20%><a href=\"edit_cmd.php?lang_id=$lang_id&cmdname=$roo->topic\">" . $roo->topic . "</a></td>\n";
if (trim($roo->contents)=="") {
echo "<td valign=top width=80%><font color=#" . $cTheme->main_no . "><i>no help text available</i></font></td>\n";
} else {
Expand Down
4 changes: 2 additions & 2 deletions docs/gnuworld/help_mgr/edit_cmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$CAN_EDIT = 1;
$CAN_ADD = 2;
$ENABLE_COOKIE_TABLE=0;
$lang_id = $langid;
$lang_id = $lang_id;

include("../../../php_includes/cmaster.inc");
std_init();
Expand Down Expand Up @@ -69,7 +69,7 @@
$zecrc = md5($HTTP_USER_AGENT . $zets . $user_id);
echo "<input type=hidden name=ts value=$zets>\n";
echo "<input type=hidden name=crc value=$zecrc>\n";
echo "<input type=hidden name=langid value=$langid>\n";
echo "<input type=hidden name=lang_id value=$lang_id>\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A much smaller fix would be changing $langid to $lang_id on this line; then no changes are necessary for any other files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to change on all 3 files.
Some task are related with these 3 pages, and some actions (like add, edit) will not work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need to change all files because you rename name=langid to name=lang_id in the form. If you don't do that, all you would have to do is change:

echo "<input type=hidden name=langid value=$langid>\n";

to

echo "<input type=hidden name=langid value=$lang_id>\n";

But I think the bigger issue is here that we use $langid as input instead of $_POST['langid']

echo "<input type=hidden name=cmdname value=\"$cmdname\">\n";

?>
Expand Down