diff --git a/include/preod.inc.php b/include/preod.inc.php
index 351dcc3c5..9bd582bf1 100644
--- a/include/preod.inc.php
+++ b/include/preod.inc.php
@@ -29,6 +29,15 @@ require_once("class_ihidden.php");
require_once('class_database.php');
require_once('ac_common.php');
require_once('class_pre_operation.php');
+
+/*
+ * Value from $_GET or $_REQUEST
+ */
+$request_jrn=HtmlInput::default_value_request("jrn", -1);
+$request_ac=HtmlInput::default_value_request("ac", "");
+$request_sa=HtmlInput::default_value_request("sa", "");
+$get_jrn=HtmlInput::default_value_get('jrn',-1);
+
echo '
';
echo '';
// if $_REQUEST[sa] == del delete the predefined operation
-if ( $sa == 'del')
+if ( $request_sa == 'del')
{
$op=new Pre_operation($cn);
$op->od_id=$_REQUEST['od_id'];
$op->delete();
- $sa='jrn';
+ $request_sa='jrn';
}
// if $_REQUEST[sa] == jrn show the predefined operation for this
// ledger
-if ( $sa == 'jrn' )
+if ( $request_sa== 'jrn' )
{
$op=new Pre_operation($cn);
- $op->set_jrn($_GET['jrn']);
+ $op->set_jrn($get_jrn);
$is_ods = $cn->get_value("select count(*)
from jrn_def where
jrn_def_id=$1
- and jrn_def_type='ODS'", array($_GET['jrn']));
+ and jrn_def_type='ODS'", array($get_jrn));
$op->od_direct = ($is_ods > 0) ? 't' : 'f';
$array = $op->get_list_ledger();
if (empty($array) == true)
@@ -83,19 +91,19 @@ if ( $sa == 'jrn' )
if ( $count %2 == 0 )
echo '
';
else
- echo '
';
+ echo '
';
$count++;
echo '| '.h($row['od_name']).' | ';
echo ''.h($row['od_description']).' | ';
echo '';
- echo ' |