From: Holger Lindemann Date: Tue, 19 Jun 2012 12:12:32 +0000 (+0200) Subject: Parameter frü Cli-Aufruf angepasst X-Git-Tag: release-3.0.0beta1~317^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=36ae8db43f28059bd59f5470f67109b611db70f8;p=kivitendo-erp.git Parameter frü Cli-Aufruf angepasst --- diff --git a/peppershop/ArtikelErpToShop.php b/peppershop/ArtikelErpToShop.php index ff8a56acc..087e207cb 100644 --- a/peppershop/ArtikelErpToShop.php +++ b/peppershop/ArtikelErpToShop.php @@ -11,14 +11,23 @@ if ( $api != "cli" ) { $shopnr = $_GET["Shop"]; $nofiles = ( $_GET["nofiles"] == '1' )?true:false; } else { + $p = array('shopnr','nofiles'); if ( $argc > 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; + for( $i=1; $idb->connected_database_name == $ERPdbname) { exit(); } //Shop-Instanz -$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err); +$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err,$debug); + if ($shopdb->db->connected_database_name == $SHOPdbname) { $shop = new pepper($shopdb,$err,$SHOPdbname,$divStd,$divVerm,$minder,$nachn,$versandS,$versandV,$paypal,$treuhand,$mwstLX,$mwstS,$variantnr,$pict,$nopic,$nopicerr,$nofiles); } else { diff --git a/peppershop/ArtikelShopToErp.php b/peppershop/ArtikelShopToErp.php index d7b4d1ef2..173e2fa31 100644 --- a/peppershop/ArtikelShopToErp.php +++ b/peppershop/ArtikelShopToErp.php @@ -11,14 +11,23 @@ if ( $api != "cli" ) { $shopnr = $_GET["Shop"]; $nofiles = ( $_GET["nofiles"] == '1' )?true:false; } else { + $p = array('shopnr','nofiles'); if ( $argc > 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; - } + for( $i=1; $i 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; + for( $i=1; $idb->connected_database_name == $ERPdbname) { } //Shop-Instanz -$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err); +$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err,$debug); if ($shopdb->db->connected_database_name == $SHOPdbname) { $shop = new pepper($shopdb,$err,$SHOPdbname,$divStd,$divVerm,$minder,$nachn,$versandS,$versandV,$paypal,$treuhand,$mwstLX,$mwstS,$variantnr); //echo "
"; print_r($shopdb->db); print_r($shopnr); echo "
";