[Frugalware-devel] [PATCH] website: packages.php
Krisztian VASAS
iron at ironiq.hu
Wed Oct 27 23:56:22 CEST 2004
Hello all...
I've made some changes again... I've turned off the register_globals to
get work the superglobals (eg: $_POST[]) well in php.ini and the
packages.php haven't worked, because of some badly used variables. I've
corrected it, so now it works (here, on my machine)... I hope, than this
will work on the server, too...
IroNiQ
p.s.: just rename it to .diff, if you want...
--
Web: http://ironiq.hu
Email: iron at ironiq.hu
LinuxCounter: #331532
-------------- next part --------------
diff -Naur frugalware.xx.orig/packages.php frugalware.xx/packages.php
--- frugalware.xx.orig/packages.php 2004-10-05 19:50:00.000000000 +0200
+++ frugalware.xx/packages.php 2004-10-27 23:48:46.048151360 +0200
@@ -3,20 +3,27 @@
include("header.php");
// defaults
-if (!isset($fwversion))
+if (!isset($_POST['fwversion']))
$fwversion="frugalware-current";
-//
-if (!isset($reponame))
+else
+ $fwversion=$_POST['fwversion'];
+
+if (!isset($_POST['reponame']))
$reponame="frugalware";
-//
-if (!isset($catname))
+else
+ $reponame=$_POST['reponame'];
+
+if (!isset($_POST['catname']))
{
if ($reponame == "frugalware")
$catname="base";
if ($reponame == "extra")
$catname="locale";
}
+else
+ $catname=$_POST['catname'];
// repo datas
+
if ($reponame=="frugalware")
{
$repodir="frugalware";
@@ -108,7 +115,7 @@
// packages
// search first package in the selected category if no pkgname
-if (!isset($pkgname))
+if (!isset($_POST['pkgname']))
{
foreach ($pkgsf as $i)
{
@@ -119,6 +126,8 @@
}
}
}
+else
+ $pkgname=$_POST['pkgname'];
// typos
$pkgname = preg_replace("/(.*)<.*/", "$1", $pkgname);
$pkgname = preg_replace("/(.*)=.*/", "$1", $pkgname);
More information about the Frugalware-devel
mailing list