diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/Base.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/Base.php index c1a95d841..4b04af113 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/Base.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/Base.php @@ -2,14 +2,17 @@ namespace Plugin\Custom\PSC\Saxoprint_API_R1\Api; +use PSC\Shop\EntityBundle\Entity\Contact; +use PSC\System\SettingsBundle\Document\LogEntry; +use PSC\System\SettingsBundle\Service\Log; use PSC\System\SettingsBundle\Service\Shop; +use Plugin\Custom\PSC\Saxoprint_API_R1\Form\Group\Saxoprint; use Symfony\Component\Mime\Part\Multipart\FormDataPart; use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; class Base { - protected $baseUrlTest = 'https://sri1.staging.saxoprint.com/api/v3/'; protected $baseUrlLive = 'https://sri.saxoprint.com/api/v3/'; @@ -22,10 +25,16 @@ class Base protected bool $test = false; - protected \PSC\Shop\EntityBundle\Document\Shop $shop; + protected \PSC\Shop\EntityBundle\Entity\Shop $shopEntity; - public function __construct(private readonly HttpClientInterface $client, private readonly CacheInterface $cache) + + public function setShopEntity(\PSC\Shop\EntityBundle\Entity\Shop $shop): void + { + $this->shopEntity = $shop; + } + + public function __construct(private readonly HttpClientInterface $client, private readonly CacheInterface $cache, protected readonly Log $logService) { } @@ -43,6 +52,8 @@ class Base , 'json' => $data, ]); + + $this->logService->createLogEntry($this->shopEntity, new Contact(), LogEntry::INFO, Saxoprint::class, "saxoprint", "SaxoPrint PrintShop Response", ['content' => $response->getContent(), 'status' => $response->getStatusCode()]); $content = $response->toArray(); return $content; @@ -114,6 +125,7 @@ class Base 'body' => $data, ]); + $this->logService->createLogEntry($this->shopEntity, new Contact(), LogEntry::INFO, Saxoprint::class, "saxoprint", "SaxoPrint Upload Response", ['content' => $response->getContent(), 'status' => $response->getStatusCode()]); return $response; } public function postUploadConfirm($url, $data) @@ -126,7 +138,7 @@ class Base 'headers' => $this->buildHeaders(), 'body' => $data, ]); - + $this->logService->createLogEntry($this->shopEntity, new Contact(), LogEntry::INFO, Saxoprint::class, "saxoprint", "SaxoPrint UploadConfirm Response", ['content' => $response->getContent(), 'status' => $response->getStatusCode()]); return $response; } @@ -195,9 +207,9 @@ class Base return $this->cache; } - protected function buildQuery(Array $data): string + protected function buildQuery(array $data): string { return base64_encode(json_encode($data)); } -} \ No newline at end of file +} diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostPrintJob.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostPrintJob.php index 94d6923c3..cee1daa69 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostPrintJob.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostPrintJob.php @@ -2,7 +2,10 @@ namespace Plugin\Custom\PSC\Saxoprint_API_R1\Api; +use PSC\Shop\EntityBundle\Entity\Contact; +use PSC\System\SettingsBundle\Document\LogEntry; use PSC\System\SettingsBundle\Service\Shop; +use Plugin\Custom\PSC\Saxoprint_API_R1\Form\Group\Saxoprint; class PostPrintJob extends Base { @@ -14,6 +17,7 @@ class PostPrintJob extends Base public function call() { + $this->logService->createLogEntry($this->shopEntity, new Contact(), LogEntry::INFO, Saxoprint::class, "saxoprint", "SaxoPrint PostJob Data", $this->buildData()); return $this->post('printjob', $this->buildData()); } @@ -35,11 +39,10 @@ class PostPrintJob extends Base $productGroup = $this->position->getAdditionalInfo('saxoprint')['saxoprintProductId']; $auflage = 0; - foreach($infos as $row) - { - if($row['name'] == "" || $row['name'] == 'property[auflage]' || $row['name'] == 'auflage') { - $auflage = (int)$row['value']; - continue; + foreach($infos as $row) { + if($row['name'] == "" || $row['name'] == 'property[auflage]' || $row['name'] == 'auflage') { + $auflage = (int)$row['value']; + continue; } if($row['name'] == 'property[6]' || $row['name'] == '6') { $productGroup = intval($row['value']); @@ -51,7 +54,7 @@ class PostPrintJob extends Base } /** - * @var \TP_Basket_Item $objPosition + * @var \TP_Basket_Item $objPosition */ $objPosition = unserialize(($this->position->getData())); @@ -60,12 +63,12 @@ class PostPrintJob extends Base 'ResellerAddress' => [ 'Salutation' => 'None', 'CompanyName' => $this->order->getSenderAddress()->getCompany(), - 'FirstName' => $this->order->getSenderAddress()->getFirstname()?: '', - 'LastName' => $this->order->getSenderAddress()->getLastname()?: '', + 'FirstName' => $this->order->getSenderAddress()->getFirstname() ?: '', + 'LastName' => $this->order->getSenderAddress()->getLastname() ?: '', 'Street' => $this->order->getSenderAddress()->getStreet() . ' ' . $this->order->getSenderAddress()->getHouseNumber(), 'Zipcode' => $this->order->getSenderAddress()->getZip(), 'City' => $this->order->getSenderAddress()->getCity(), - 'TelephoneNumber' => (string)$this->order->getSenderAddress()->getPhone()?: '0000000', + 'TelephoneNumber' => (string)$this->order->getSenderAddress()->getPhone() ?: '0000000', 'CountryCodeISO' => 'DE', ], 'DeliveryAddresses' => [[ @@ -79,7 +82,7 @@ class PostPrintJob extends Base 'LastName' => $this->order->getDeliveryAddress()->getLastname(), 'FirstName' => $this->order->getDeliveryAddress()->getFirstname(), 'City' => $this->order->getDeliveryAddress()->getCity(), - 'TelephoneNumber' => $this->order->getDeliveryAddress()->getPhone()?: '0000000', + 'TelephoneNumber' => $this->order->getDeliveryAddress()->getPhone() ?: '0000000', 'CountryCodeISO' => 'DE', ] ]], diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostUpload.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostUpload.php index 00b11ab65..c3f06b142 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostUpload.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Api/PostUpload.php @@ -8,7 +8,6 @@ use Symfony\Component\Mime\Part\DataPart; class PostUpload extends Base { - private \PSC\Shop\OrderBundle\Model\Order\Position $position; private \PSC\Shop\OrderBundle\Model\Base $order; @@ -20,6 +19,7 @@ class PostUpload extends Base public function call() { + $return = false; if(count($this->position->getUploads()) > 0) { $temp = []; @@ -31,6 +31,7 @@ class PostUpload extends Base '/' . $this->position->getExternalOrderNumber() . '/link', $this->buildDataLink($temp) ); + $return = true; } if($this->position->getProduct()->getUploadProvidedFile() && $this->position->getProduct()->getUploadProvidedFile()->getUrl() != "") { @@ -38,6 +39,7 @@ class PostUpload extends Base '/' . $this->position->getExternalOrderNumber() . '/link', $this->buildDataLink(['https://' . $this->domain . $this->position->getProduct()->getUploadProvidedFile()->getUrl()]) ); + $return = true; } $outfile = '/data/www/old/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf'; @@ -47,8 +49,10 @@ class PostUpload extends Base '/' . $this->position->getExternalOrderNumber() . '/link', $this->buildDataLink(['https://' . $this->domain . '/apps/market/steplayouter/basket/' . $this->order->getUid() . '/' . $this->position->getPos() . '/'.$this->order->getAlias() . '_' . $this->position->getPos().'.pdf']) ); + $return = true; } + return $return; } private function buildDataLink(array $links) diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Confirm.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Confirm.php index bb5b514d7..7c30947e6 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Confirm.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Confirm.php @@ -1,4 +1,5 @@ _formFactory = $formFactory; $this->_entityManager = $entityManager; $this->_doctrine_mongodb = $doctrine_mongodb; @@ -123,7 +125,8 @@ class Confirm implements QueueInterface, ConfigurableElementInterface * @return bool * @internal param Queue $doc */ - public function execute(EventInterface $event, Queue $queue) { + public function execute(EventInterface $event, Queue $queue) + { /** @var \Plugin\Custom\PSC\Saxoprint_API_R1\Document\Export $settings */ $settings = $queue->getQueueDocument(); @@ -135,6 +138,7 @@ class Confirm implements QueueInterface, ConfigurableElementInterface $order = $this->_orderService->getCurrentOrder(); + $this->_postConfirm->setShopEntity($this->_shopService->getShopByUid($order->getShop()->getId())); $this->_postConfirm->setShop($this->_shopService->getMongoShopByUid($order->getShop()->getId())); $this->_postConfirm->setPosition($position); $this->_postConfirm->setOrder($order); diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Export.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Export.php index 49b66d77b..29ed31464 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Export.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Export.php @@ -1,4 +1,5 @@ _formFactory = $formFactory; $this->_entityManager = $entityManager; $this->_doctrine_mongodb = $doctrine_mongodb; @@ -140,7 +142,8 @@ class Export implements QueueInterface, ConfigurableElementInterface * @return bool * @internal param Queue $doc */ - public function execute(EventInterface $event, Queue $queue) { + public function execute(EventInterface $event, Queue $queue) + { /** @var \Plugin\Custom\PSC\Saxoprint_API_R1\Document\Export $settings */ $settings = $queue->getQueueDocument(); @@ -153,6 +156,7 @@ class Export implements QueueInterface, ConfigurableElementInterface $order = $this->_orderService->getCurrentOrder(); $this->_postPrintJob->setShop($this->_shopService->getMongoShopByUid($order->getShop()->getId())); + $this->_postPrintJob->setShopEntity($this->_shopService->getShopByUid($order->getShop()->getId())); $this->_postPrintJob->setPosition($position); $this->_postPrintJob->setOrder($order); @@ -160,7 +164,7 @@ class Export implements QueueInterface, ConfigurableElementInterface if($result && isset($result['Ordernumber'])) { $position->setExternalOrderNumber($result['Ordernumber']); $position->setStatus($settings->getStatusSuccess()); - }else{ + } else { $position->setStatus($settings->getStatusError()); } $this->_orderService->storeOrder($order); diff --git a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Upload.php b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Upload.php index d44093354..1717e5461 100755 --- a/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Upload.php +++ b/src/new/var/plugins/Custom/PSC/Saxoprint_API_R1/Queue/Upload.php @@ -1,4 +1,5 @@ _formFactory = $formFactory; $this->_entityManager = $entityManager; $this->_doctrine_mongodb = $doctrine_mongodb; @@ -142,7 +144,8 @@ class Upload implements QueueInterface, ConfigurableElementInterface * @return bool * @internal param Queue $doc */ - public function execute(EventInterface $event, Queue $queue) { + public function execute(EventInterface $event, Queue $queue) + { /** @var \Plugin\Custom\PSC\Saxoprint_API_R1\Document\Export $settings */ $settings = $queue->getQueueDocument(); @@ -161,17 +164,20 @@ class Upload implements QueueInterface, ConfigurableElementInterface $domains = $this->_entityManager ->getRepository(Domain::class)->createQueryBuilder('domain') ->andWhere('domain.shop = :shop_id') - ->setParameter("shop_id",$order->getShop()->getId())->getQuery()->execute(); + ->setParameter("shop_id", $order->getShop()->getId())->getQuery()->execute(); if (count($domains) > 0) { $domain = array_pop($domains)->getHost(); - }else{ + } else { $domain = false; } + $this->_postUpload->setShopEntity($this->_shopService->getShopByUid($order->getShop()->getId())); $this->_postUpload->setDomain($domain); - $this->_postUpload->call(); - + $return = $this->_postUpload->call(); + if(!$return) { + return false; + } $position->setStatus($settings->getStatusSuccess()); $this->_orderService->storeOrder($order); diff --git a/src/old/application/articles/Market/Article.php b/src/old/application/articles/Market/Article.php index 05228342c..0266a559b 100755 --- a/src/old/application/articles/Market/Article.php +++ b/src/old/application/articles/Market/Article.php @@ -2,7 +2,6 @@ class market_article { - public $id = "6"; public $articlegroups; public $private; @@ -151,7 +150,7 @@ class market_article } elseif(count($upload) == 1 && ($view->view->upload_possible[0] == 'provided' || $view->view->upload_possible[0] == 'center' || $view->view->upload_possible[0] == 'mail' || $view->view->upload_possible[0] == 'post')) { $_POST['upload_mode'] = $view->view->upload_possible[0]; $view->getRequest()->setParam('upload_mode', $view->view->upload_possible[0]); - }else { + } else { $_POST['upload_mode'] = 'none'; $view->getRequest()->setParam('upload_mode', 'none'); } @@ -603,7 +602,10 @@ class market_article ->where('c.uuid = ?', array((string)$layouterPreviewId)) ->fetchOne(); $design = json_decode($layoutData->design, true); - return ''; + if(isset($design['previews'][$site - 1])) { + return ''; + } + return ''; } elseif ($articleSess->getLayouterModus() == 101) { $layoutData = Doctrine_Query::create() ->from('LayouterDesignData c') diff --git a/src/old/application/design/vorlagen/bootstrap4_api/config/user/registercontact.ini b/src/old/application/design/vorlagen/bootstrap4_api/config/user/registercontact.ini index e650a3e3f..9159d9c0e 100755 --- a/src/old/application/design/vorlagen/bootstrap4_api/config/user/registercontact.ini +++ b/src/old/application/design/vorlagen/bootstrap4_api/config/user/registercontact.ini @@ -37,6 +37,9 @@ user.login.elements.password_re.options.validators.1.options = "password" ; firstname element user.rech.legend = "Rechnungsadresse" +user.rech.elements.is_company.type = "checkbox" +user.rech.elements.is_company.options.label = "Gewerblich?" + user.rech.elements.self_anrede.type = "select" user.rech.elements.self_anrede.options.label = "Anrede" user.rech.elements.self_anrede.options.required = false @@ -143,4 +146,4 @@ user.submit.elements.submit.options.label = "Jetzt registrieren" user.liefersubmit.elements.submit.type = "submit" user.liefersubmit.elements.submit.options.class = "green" user.liefersubmit.elements.submit.options.name = "st" -user.liefersubmit.elements.submit.options.label = "Use Delivery" \ No newline at end of file +user.liefersubmit.elements.submit.options.label = "Use Delivery" diff --git a/src/old/application/design/vorlagen/bootstrap4_api/templates/basket/review.phtml b/src/old/application/design/vorlagen/bootstrap4_api/templates/basket/review.phtml index 735e45fe9..be045b364 100755 --- a/src/old/application/design/vorlagen/bootstrap4_api/templates/basket/review.phtml +++ b/src/old/application/design/vorlagen/bootstrap4_api/templates/basket/review.phtml @@ -135,18 +135,10 @@ a.editAddress.btn.btn-info.btn-xs { - + - - - - - - - - - +
@@ -303,20 +295,20 @@ a.editAddress.btn.btn-info.btn-xs {
form->removeElement('submit'); - EasyBib_Form_Decorator::setFormDecorator($this->form, \EasyBib_Form_Decorator::BOOTSTRAP, 'submit'); - ?> +EasyBib_Form_Decorator::setFormDecorator($this->form, \EasyBib_Form_Decorator::BOOTSTRAP, 'submit'); +?>
form->getElements() as $element) : ?> + $i = 0; +foreach ($this->form->getElements() as $element) : ?>
render()); ?> + $i++; +endforeach; ?>

@@ -346,22 +338,22 @@ a.editAddress.btn.btn-info.btn-xs {
editform->removeElement('update'); - EasyBib_Form_Decorator::setFormDecorator($this->editform, \EasyBib_Form_Decorator::BOOTSTRAP, 'update'); - ?> +EasyBib_Form_Decorator::setFormDecorator($this->editform, \EasyBib_Form_Decorator::BOOTSTRAP, 'update'); +?>
editform->getElements() as $element) : ?> + $i = 0; +foreach ($this->editform->getElements() as $element) : ?>
render()); ?> + $i++; +endforeach; ?>
diff --git a/src/old/application/modules/default/controllers/BasketController.php b/src/old/application/modules/default/controllers/BasketController.php index 0df909059..fa7ac6cac 100755 --- a/src/old/application/modules/default/controllers/BasketController.php +++ b/src/old/application/modules/default/controllers/BasketController.php @@ -3283,7 +3283,9 @@ class BasketController extends TP_Controller_Action } $basket->setDeliveryIsSame(true); - //$basket->setSender(0); + $basket->setDeliveryUstid($this->view->sender_address->ustid); + $basket->setDeliveryPLZ($this->view->sender_address->zip); +//$basket->setSender(0); $this->redirectSpeak('/basket/finish'); } elseif ($this->getRequest()->getParam('delivery') != '' && $this->getRequest()->getParam('delivery') != 's' && $this->getRequest()->getParam('sender') != '' && $this->getRequest()->getParam('invoice') != '' @@ -3293,10 +3295,14 @@ class BasketController extends TP_Controller_Action $basket->setDelivery($this->getRequest()->getParam('delivery')); $basket->setInvoice($this->getRequest()->getParam('invoice')); $basket->setSender($this->getRequest()->getParam('sender')); + $basket->setDeliveryUstid($this->view->delivery_address->ustid); + $basket->setDeliveryPLZ($this->view->delivery_address->zip); $this->redirectSpeak('/basket/finish'); } elseif ($this->getRequest()->getParam('delivery') != '' && $this->getRequest()->getParam('delivery') != 's') { $basket->setDeliveryIsSame(false); $basket->setDelivery($this->getRequest()->getParam('delivery')); + $basket->setDeliveryUstid($this->view->delivery_address->ustid); + $basket->setDeliveryPLZ($this->view->delivery_address->zip); $this->redirectSpeak('/basket/finish'); } @@ -4549,7 +4555,6 @@ class BasketController extends TP_Controller_Action $this->view->gutschein = $gutscheincode; } - $basket->setWithTax(TP_Country::getTaxForCountry($basket->getDeliveryCountry(), $basket->getDeliveryUstId())); $this->view->withTax = $basket->isWithTax(); diff --git a/src/old/application/modules/default/controllers/UserController.php b/src/old/application/modules/default/controllers/UserController.php index d435cb98d..dc551b056 100755 --- a/src/old/application/modules/default/controllers/UserController.php +++ b/src/old/application/modules/default/controllers/UserController.php @@ -3023,7 +3023,10 @@ class UserController extends TP_Controller_Action } if ($this->_request->isPost()) { - + if($form->getSubForm('rech')->getElement('is_company')->isChecked()) { + $form->get('rech')->get('self_department')->setRequired(true); + $form->get('rech')->get('ustid')->setRequired(true); + } $externalValidation = true; if($this->shop->getPluginSettings(module: 'friendlycaptcha', name: 'secret')) { $externalValidation = false; diff --git a/src/old/library/TP/Country.php b/src/old/library/TP/Country.php index 5cf73b7d2..b80d282ab 100755 --- a/src/old/library/TP/Country.php +++ b/src/old/library/TP/Country.php @@ -1,8 +1,9 @@ Country; @@ -17,9 +18,9 @@ class TP_Country { } - public static function getTaxForCountry($code, $ustid) + public static function getTaxForCountry($code, $ustid): bool { - if($code === NULL || $code == '') { + if($code === null || $code == '') { return true; } $shop = Zend_Registry::get('shop'); @@ -27,16 +28,16 @@ class TP_Country { $country = $statusCollection->findOne(array('shop' => (string)$shop['id'], 'code' => $code)); - if($country === NULL) { + if($country === null) { return true; } - if($ustid == NULL || $ustid == "") { + if($ustid == null || $ustid == "") { return $country['withTaxWithoutUstNr']; - }else{ + } else { return $country['withTaxWithUstNr']; } } -} \ No newline at end of file +} diff --git a/src/old/library/TP/Image.php b/src/old/library/TP/Image.php index e9d9f7be0..13dcac530 100755 --- a/src/old/library/TP/Image.php +++ b/src/old/library/TP/Image.php @@ -166,7 +166,7 @@ class TP_Image { if($resize == "-resize 0x0") { exec("convert -density 140 '".$image->path."[0]' -quality 75 -background white -alpha remove -colorspace sRGB ". PUBLIC_PATH.'/temp/thumb/'.$shop['uid'].'/'.$image->id.'_'.$mode.'.png'); }else{ - var_dump("convert -density 140 '".$image->path."[0]' ".$resize." -quality 75 -background white -alpha remove -colorspace sRGB ". PUBLIC_PATH.'/temp/thumb/'.$shop['uid'].'/'.$image->id.'_'.$mode.'.png'); + exec("convert -density 140 '".$image->path."[0]' ".$resize." -quality 75 -background white -alpha remove -colorspace sRGB ". PUBLIC_PATH.'/temp/thumb/'.$shop['uid'].'/'.$image->id.'_'.$mode.'.png'); } return '/temp/thumb/'.$shop['uid'].'/'.$image->id.'_'.$mode.'.png'; }elseif($finfo == 'image/png') { diff --git a/src/old/library/Zend/Barcode/Renderer/Image.php b/src/old/library/Zend/Barcode/Renderer/Image.php index 058e35235..0ad23a4be 100755 --- a/src/old/library/Zend/Barcode/Renderer/Image.php +++ b/src/old/library/Zend/Barcode/Renderer/Image.php @@ -446,7 +446,7 @@ class Zend_Barcode_Renderer_Image extends Zend_Barcode_Renderer_RendererAbstract require_once 'Zend/Barcode/Renderer/Exception.php'; throw new Zend_Barcode_Renderer_Exception( 'A font was provided, but this instance of PHP does not have TTF (FreeType) support' - ); + ); } $box = imagettfbbox($size, 0, $font, $text); diff --git a/src/old/library/Zend/Form/Element/Captcha.php b/src/old/library/Zend/Form/Element/Captcha.php index 337974252..4649566f7 100755 --- a/src/old/library/Zend/Form/Element/Captcha.php +++ b/src/old/library/Zend/Form/Element/Captcha.php @@ -46,7 +46,7 @@ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml /** * Captcha plugin type constant */ - const CAPTCHA = 'CAPTCHA'; + public const CAPTCHA = 'CAPTCHA'; /** * Captcha adapter @@ -90,7 +90,7 @@ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml $name = $this->getPluginLoader(self::CAPTCHA)->load($name); if (empty($options)) { - $instance = new $name; + $instance = new $name(); } else { $r = new ReflectionClass($name); if ($r->hasMethod('__construct')) { @@ -234,7 +234,7 @@ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml switch ($type) { case null: $loader = $this->getPluginLoader(self::CAPTCHA); - $nsSeparator = (false !== strpos($prefix, '\\'))?'\\':'_'; + $nsSeparator = (false !== strpos($prefix, '\\')) ? '\\' : '_'; $cPrefix = rtrim($prefix, $nsSeparator) . $nsSeparator . 'Captcha'; $cPath = rtrim($path, '/\\') . '/Captcha'; $loader->addPrefixPath($cPrefix, $cPath);