|
|
@@ -765,9 +765,21 @@ $CONNLOCAL->query('set global max_allowed_packet=1000000000');
|
|
|
continue ;
|
|
|
}
|
|
|
|
|
|
- //@2015-05-15 obejscie typespecial PARAM_OUT dla przekazywanych parametrów np. &ZASOB_ID=4095 - trzeba tutaj tez podmienić na właściwy numer zasobu.
|
|
|
+ //@2015-05-15 TODO-test obejscie typespecial PARAM_OUT dla przekazywanych parametrów np. &ZASOB_ID=4095 - trzeba tutaj tez podmienić na właściwy numer zasobu.
|
|
|
if($h->TYPE=='PARAM_OUT') {
|
|
|
- // if(strstr($h->DESC, '&ZASOB_ID='))
|
|
|
+ if(strstr($h->DESC, '&ZASOB_ID=')) {
|
|
|
+
|
|
|
+ $zas_id_param_out_repl=explode('&ZASOB_ID=', $h->DESC);
|
|
|
+ $zas_id_param_out_repl=explode('#', $zas_id_param_out_repl[1]);
|
|
|
+
|
|
|
+ $sql_to_find_parent="select DST_TABLE_ID from CRM_IMPORT_TRANSLATE where REM_TABLE='CRM_LISTA_ZASOBOW' and SRC_TABLE_ID='".$zas_id_param_out_repl[0]."' ;" ;
|
|
|
+ $res_to_find_parent_param=$CONNREMOTE->query($sql_to_find_parent) or DEBUG_S(-3,'Problem ze sql ',$sql_to_find_parent,__FILE__, __FUNCTION__, __LINE__) or die1('');
|
|
|
+ while($h_res_to_find_TS=mysql_fetch_object($res_to_find_parent_param)) {
|
|
|
+ $h->DESC=preg_replace('/&ZASOB_ID='.$zas_id_param_out_repl[0].'#/', '&ZASOB_ID='.$h_res_to_find_TS->DST_TABLE_ID.'#', $h->DESC);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|