Switch all array init calles to no space before bracket
Also bug fix in Form General for load int PK calls with non int types
This commit is contained in:
@@ -94,13 +94,13 @@ if ($form->my_page_name == 'edit_order') {
|
||||
// order name is _always_ order_number for the edit interface
|
||||
|
||||
// follwing arrays do exist here:
|
||||
// $position ... has the positions of the array (0..max), cause in a <select>
|
||||
// $position ... has the positions of the array(0..max), cause in a <select>
|
||||
// I can't put an number into the array field, in this array,
|
||||
// there are the POSITION stored, that should CHANGE there order (up/down)
|
||||
// $row_data_id ... has ALL ids from the sorting part
|
||||
// $row_data_order ... has ALL order positions from the soirting part
|
||||
if (!isset($position)) {
|
||||
$position = array ();
|
||||
$position = array();
|
||||
}
|
||||
$row_data_id = $_POST['row_data_id'];
|
||||
$original_id = $row_data_id;
|
||||
@@ -154,7 +154,7 @@ if ($form->my_page_name == 'edit_order') {
|
||||
$q .= "ORDER BY order_number";
|
||||
|
||||
while ($res = $form->dbReturn($q)) {
|
||||
$row_data[] = array (
|
||||
$row_data[] = array(
|
||||
"id" => $res[$table_name."_id"],
|
||||
"name" => $res["name"],
|
||||
"order" => $res["order_number"]
|
||||
@@ -164,22 +164,22 @@ if ($form->my_page_name == 'edit_order') {
|
||||
// html title
|
||||
$HEADER['HTML_TITLE'] = $form->l->__('Edit Order');
|
||||
|
||||
$messages = array ();
|
||||
$messages = array();
|
||||
// error msg
|
||||
if (isset($error)) {
|
||||
if (!isset($msg)) {
|
||||
$msg = array ();
|
||||
$msg = array();
|
||||
}
|
||||
$messages[] = array ('msg' => $msg, 'class' => 'error', 'width' => '100%');
|
||||
$messages[] = array('msg' => $msg, 'class' => 'error', 'width' => '100%');
|
||||
}
|
||||
$DATA['form_error_msg'] = $messages;
|
||||
|
||||
// all the row data
|
||||
$options_id = array ();
|
||||
$options_name = array ();
|
||||
$options_selected = array ();
|
||||
$options_id = array();
|
||||
$options_name = array();
|
||||
$options_selected = array();
|
||||
if (!isset($row_data) || !is_array($row_data)) {
|
||||
$row_data = array ();
|
||||
$row_data = array();
|
||||
}
|
||||
for ($i = 0; $i < count($row_data); $i ++) {
|
||||
$options_id[] = $i;
|
||||
@@ -197,8 +197,8 @@ if ($form->my_page_name == 'edit_order') {
|
||||
$DATA['options_selected'] = $options_selected;
|
||||
|
||||
// hidden list for the data (id, order number)
|
||||
$row_data_id = array ();
|
||||
$row_data_order = array ();
|
||||
$row_data_id = array();
|
||||
$row_data_order = array();
|
||||
for ($i = 0; $i < count($row_data); $i++) {
|
||||
$row_data_id[] = $row_data[$i]['id'];
|
||||
$row_data_order[] = $row_data[$i]['order'];
|
||||
@@ -247,9 +247,9 @@ if ($form->my_page_name == 'edit_order') {
|
||||
|
||||
// build nav from $PAGES ...
|
||||
if (!isset($PAGES) || !is_array($PAGES)) {
|
||||
$PAGES = array ();
|
||||
$PAGES = array();
|
||||
}
|
||||
$menuarray = array ();
|
||||
$menuarray = array();
|
||||
foreach ($PAGES as $PAGE_CUID => $PAGE_DATA) {
|
||||
if ($PAGE_DATA['menu'] && $PAGE_DATA['online']) {
|
||||
$menuarray[] = $PAGE_DATA;
|
||||
@@ -268,7 +268,7 @@ if ($form->my_page_name == 'edit_order') {
|
||||
}
|
||||
|
||||
$position = 0;
|
||||
$menu_data = array ();
|
||||
$menu_data = array();
|
||||
for ($i = 1; $i <= count($menuarray); $i ++) {
|
||||
// do that for new array
|
||||
$j = $i - 1;
|
||||
@@ -319,7 +319,7 @@ if ($form->my_page_name == 'edit_order') {
|
||||
$DATA['form_my_page_name'] = $form->my_page_name;
|
||||
$DATA['filename_exist'] = 0;
|
||||
$DATA['drop_down_input'] = 0;
|
||||
$elements = array ();
|
||||
$elements = array();
|
||||
// depending on the "getPageName()" I show different stuff
|
||||
switch ($form->my_page_name) {
|
||||
case 'edit_users':
|
||||
|
||||
Reference in New Issue
Block a user