Revision 916b74c6
Added by Scott Ullrich over 16 years ago
usr/local/www/pkg_edit.php | ||
---|---|---|
39 | 39 |
require_once("pkg-utils.inc"); |
40 | 40 |
|
41 | 41 |
/* dummy stubs needed by some code that was MFC'd */ |
42 |
function pfSenseHeader($location) { header("Location: $location"); }
|
|
42 |
function pfSenseHeader($location) { header("Location: " . $location); }
|
|
43 | 43 |
|
44 | 44 |
function gentitle_pkg($pgname) { |
45 | 45 |
global $pfSense_config; |
... | ... | |
75 | 75 |
$id = $_GET['id']; |
76 | 76 |
if (isset($_POST['id'])) |
77 | 77 |
$id = htmlspecialchars($_POST['id']); |
78 |
|
|
78 |
|
|
79 |
// Not posting? Then user is editing a record. There must be a valid id |
|
80 |
// when editing a record. |
|
81 |
if(!$id && !$_POST) |
|
82 |
$id = "0"; |
|
83 |
|
|
79 | 84 |
if($pkg['custom_php_global_functions'] <> "") |
80 | 85 |
eval($pkg['custom_php_global_functions']); |
81 | 86 |
|
Also available in: Unified diff
When editing a record and not posting, there must be a valid id.
This will fix pages coming in from after authing that accidently
drop &id=0