Projekt

Allgemein

Profil

GX-Bug #45735 » SlowNewSpecialAdminFix.patch

/admin/specials.php - Till Tepelmann, 15.03.2016 14:35

Unterschiede anzeigen:

src/admin/specials.php (revision )
145 145
	</head>
146 146
	<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"
147 147
	  bgcolor="#FFFFFF" onload="SetFocus();"
148
	  data-gx-extension="visibility_switcher" 
148
	  data-gx-extension="visibility_switcher"
149 149
	  data-visibility_switcher-selections=".tooltip_icon, span.action-list" >
150 150
	<?php
151 151
	include DIR_FS_ADMIN . 'html/content/specials_delete_form.php';
......
210 210
							$product = xtc_db_fetch_array($product_query);
211 211

  
212 212
							$sInfo = new objectInfo($product);
213
						} else {
214
							$sInfo = new objectInfo(array());
213
						} else if ($_GET['action'] == 'new' && $_GET['pID']) {
214
							$product_query = xtc_db_query("select p.products_tax_class_id,
215
                                            p.products_id,
216
                                            pd.products_name,
217
                                            p.products_price
218
                                            from
219
                                            " . TABLE_PRODUCTS . " p,
220
                                            " . TABLE_PRODUCTS_DESCRIPTION . " pd
221
                                            where p.products_id = pd.products_id
222
                                            and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
223
                                            and p.products_id = '" . (int)$_GET['pID'] . "'");
224
							$product = xtc_db_fetch_array($product_query);
215 225

  
226
							$sInfo = new objectInfo($product);
227

  
216 228
							// create an array of products on special, which will be excluded from the pull down menu of products
217 229
							// (when creating a new product on special)
218 230
							$specials_array = array();
......
268 280
											<label for="special-name"><?php echo TEXT_SPECIALS_PRODUCT; ?></label>
269 281
										</td>
270 282
										<td class="dataTableContent_gm">
271
											<?php if ($sInfo->products_name) { ?>
272
												<?php echo $sInfo->products_name . ' (' . trim($xtPrice->xtcFormat($price, true)) . ')'; ?>
273
											<?php } else { ?>
274
												<?php echo xtc_draw_products_pull_down('products_id', 'id="special-name"', $specials_array); ?>
275
											<?php } ?>
276
											<?php echo xtc_draw_hidden_field('products_price', $sInfo->products_price); ?>
283
											<?php
284

  
285
												if ($sInfo->products_name)
286
												{
287
													echo $sInfo->products_name . ' (' . trim($xtPrice->xtcFormat($price, true)) . ')';
288

  
289
													if ($_GET['action'] == 'new')
290
													{
291
														echo xtc_draw_hidden_field('products_id', $sInfo->products_id);
292
													}
293

  
294
												}
295
												else
296
												{
297
													echo xtc_draw_products_pull_down('products_id', 'id="special-name"', $specials_array);
298
												}
299
												echo xtc_draw_hidden_field('products_price', $sInfo->products_price);
300
											?>
277 301
										</td>
278 302
									</tr>
279 303
									<tr class="visibility_switcher">
    (1-1/1)