@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | function renderHtml() |
| 18 | 18 | { |
| 19 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/payment'); |
|
| 19 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/payment'); |
|
| 20 | 20 | return $smarty->render($this); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $payment = $this->getModel(); |
| 26 | 26 | if ($id = $payment->update($_POST)) { |
| 27 | 27 | if ($this->getKernel()->user->hasModuleAccess('accounting')) { |
| 28 | - return new k_SeeOther($this->url($id . '/state')); |
|
| 28 | + return new k_SeeOther($this->url($id.'/state')); |
|
| 29 | 29 | } else { |
| 30 | 30 | return new k_SeeOther($this->url('../')); |
| 31 | 31 | } |
@@ -194,12 +194,12 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | if (isset($input['customer_coupon']) && $input['customer_coupon'] != '') { |
| 196 | 196 | if ($value['message'] != '') $value['message'] .= "\n\n"; |
| 197 | - $value['message'] .= "Kundekupon:". $input['customer_coupon']; |
|
| 197 | + $value['message'] .= "Kundekupon:".$input['customer_coupon']; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | if (isset($input['customer_comment']) && $input['customer_comment'] != '') { |
| 201 | 201 | if ($value['message'] != '') $value['message'] .= "\n\n"; |
| 202 | - $value['message'] .= "Kommentar:\n". $input['customer_comment']; |
|
| 202 | + $value['message'] .= "Kommentar:\n".$input['customer_comment']; |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | if (isset($input['payment_method']) && is_array($input['payment_method']) && !empty($input['payment_method'])) { |
@@ -324,15 +324,15 @@ discard block |
||
| 324 | 324 | $email = new Email($this->kernel); |
| 325 | 325 | |
| 326 | 326 | if ($this->shop->getConfirmationSubject()) { |
| 327 | - $subject = $this->shop->getConfirmationSubject() . ' (#' . $this->order->get('number') . ')'; |
|
| 327 | + $subject = $this->shop->getConfirmationSubject().' (#'.$this->order->get('number').')'; |
|
| 328 | 328 | } else { |
| 329 | - $subject = 'Bekræftelse på bestilling (#' . $this->order->get('number') . ')'; |
|
| 329 | + $subject = 'Bekræftelse på bestilling (#'.$this->order->get('number').')'; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | $body = $this->shop->getConfirmationText(); |
| 333 | 333 | |
| 334 | 334 | if ($this->shop->showPaymentUrl()) { |
| 335 | - $body .= "\n\n" . $this->shop->getPaymentUrl() . $this->order->getIdentifier(); |
|
| 335 | + $body .= "\n\n".$this->shop->getPaymentUrl().$this->order->getIdentifier(); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | // @todo improve this table |
@@ -348,19 +348,19 @@ discard block |
||
| 348 | 348 | $currency_iso_code = 'DKK'; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' ' . $amount)); |
|
| 351 | + $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' '.$amount)); |
|
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - $body .= "\n\n" . $table->getTable(); |
|
| 354 | + $body .= "\n\n".$table->getTable(); |
|
| 355 | 355 | |
| 356 | 356 | if ($this->shop->getConfirmationGreeting()) { |
| 357 | - $body .= "\n\n" . $this->shop->getConfirmationGreeting(); |
|
| 357 | + $body .= "\n\n".$this->shop->getConfirmationGreeting(); |
|
| 358 | 358 | } else { |
| 359 | - $body .= "Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
| 359 | + $body .= "Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | if ($this->shop->showLoginUrl()) { |
| 363 | - $body .= "\n\n" . $this->contact->getLoginUrl(); |
|
| 363 | + $body .= "\n\n".$this->contact->getLoginUrl(); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | if (!$email->save(array('contact_id' => $this->contact->get('id'), |
@@ -435,9 +435,9 @@ discard block |
||
| 435 | 435 | $this->kernel->useShared('email'); |
| 436 | 436 | $email = new Email($this->kernel); |
| 437 | 437 | |
| 438 | - $subject = 'Bekræftelse på betaling (#' . $payment_id . ')'; |
|
| 438 | + $subject = 'Bekræftelse på betaling (#'.$payment_id.')'; |
|
| 439 | 439 | $body = 'Vi har modtaget din betaling. Hvis din ordre var afsendt inden kl. 12.00, sender vi den allerede i dag.'; |
| 440 | - $body .= "\n\nVenlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
| 440 | + $body .= "\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
| 441 | 441 | |
| 442 | 442 | if (!$email->save(array('contact_id' => $this->contact->get('id'), |
| 443 | 443 | 'subject' => $subject, |
@@ -226,7 +226,6 @@ discard block |
||
| 226 | 226 | * |
| 227 | 227 | * @param array $input Array with customer data |
| 228 | 228 | * @param array $products Array with products |
| 229 | - * @param object $mailer mailer to send e-mail |
|
| 230 | 229 | * |
| 231 | 230 | * @return integer Order id |
| 232 | 231 | */ |
@@ -392,9 +391,9 @@ discard block |
||
| 392 | 391 | * @param integer $order_id |
| 393 | 392 | * @param integer $transaction_number |
| 394 | 393 | * @param integer $transaction_status |
| 395 | - * @param float $transaction_amount |
|
| 394 | + * @param integer $amount |
|
| 396 | 395 | * |
| 397 | - * @return boolean |
|
| 396 | + * @return integer |
|
| 398 | 397 | */ |
| 399 | 398 | public function addOnlinePayment($order_id, $transaction_number, $transaction_status, $amount) |
| 400 | 399 | { |
@@ -434,6 +433,9 @@ discard block |
||
| 434 | 433 | } |
| 435 | 434 | } |
| 436 | 435 | |
| 436 | + /** |
|
| 437 | + * @param integer $payment_id |
|
| 438 | + */ |
|
| 437 | 439 | private function sendEmailOnOnlinePayment($payment_id) |
| 438 | 440 | { |
| 439 | 441 | $this->kernel->useShared('email'); |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $result = $this->db->query('SELECT id |
| 44 | 44 | FROM shop_featuredproducts |
| 45 | - WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' |
|
| 46 | - AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' |
|
| 45 | + WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' |
|
| 46 | + AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer').' |
|
| 47 | 47 | AND keyword_id = ' . $this->db->quote($keyword->getId(), 'integer')); |
| 48 | 48 | if (PEAR::isError($result)) { |
| 49 | 49 | throw new Exception($result->getUserInfo()); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | function delete($id) |
| 73 | 73 | { |
| 74 | - $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' AND id = ' . $this->db->quote($id, 'integer')); |
|
| 74 | + $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = '.$this->db->quote($this->intranet->getId(), 'integer').' AND shop_id = '.$this->db->quote($this->shop->getId(), 'integer').' AND id = '.$this->db->quote($id, 'integer')); |
|
| 75 | 75 | if (PEAR::isError($result)) { |
| 76 | 76 | throw new Exception($result->getUserInfo()); |
| 77 | 77 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | function getAll() |
| 82 | 82 | { |
| 83 | 83 | $result = $this->db->query('SELECT * FROM shop_featuredproducts |
| 84 | - WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' |
|
| 84 | + WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' |
|
| 85 | 85 | AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer')); |
| 86 | 86 | if (PEAR::isError($result)) { |
| 87 | 87 | throw new Exception($result->getUserInfo()); |
@@ -33,10 +33,10 @@ |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @param string $headline Headline |
|
| 37 | 36 | * @param object $keyword Keyword object |
| 37 | + * @param string $description |
|
| 38 | 38 | * |
| 39 | - * @return integer |
|
| 39 | + * @return boolean |
|
| 40 | 40 | */ |
| 41 | 41 | function add($description, $keyword) |
| 42 | 42 | { |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $shop = $this->getShop(); |
| 27 | 27 | |
| 28 | - $this->document->setTitle('Basket evaluation for' . ' ' . $shop->name); |
|
| 28 | + $this->document->setTitle('Basket evaluation for'.' '.$shop->name); |
|
| 29 | 29 | $this->document->options = array($this->url('../') => 'Close'); |
| 30 | 30 | |
| 31 | 31 | $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $data = array('shop' => $shop, 'evaluations' => $evaluations); |
| 35 | 35 | |
| 36 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/evaluation-index'); |
|
| 36 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/evaluation-index'); |
|
| 37 | 37 | return $tpl->render($this, $data); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $this->document->setTitle($this->getModel()->getName()); |
| 23 | 23 | |
| 24 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/category'); |
|
| 24 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/category'); |
|
| 25 | 25 | return $tpl->render($this); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | 'category_object' => $this->getModel(), |
| 35 | 35 | 'regret_link' => $redirect->getRedirect($this->url('../')) |
| 36 | 36 | ); |
| 37 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit'); |
|
| 37 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit'); |
|
| 38 | 38 | return $tpl->render($this, $data); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | 'category_object' => $this->getModel(), |
| 42 | 42 | 'regret_link' => $redirect->getRedirect($this->url('../')) |
| 43 | 43 | ); |
| 44 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit'); |
|
| 44 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit'); |
|
| 45 | 45 | return $tpl->render($this, $data); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -33,11 +33,11 @@ |
||
| 33 | 33 | $this->document->setTitle($shop->name); |
| 34 | 34 | |
| 35 | 35 | $this->document->options = array($this->url('../') => 'Close', |
| 36 | - $this->url(null, array('edit')) => 'Edit', |
|
| 37 | - $this->url('featuredproducts') => 'Choose featured products', |
|
| 38 | - $this->url('categories') => 'Product categories', |
|
| 39 | - $this->url('basketevaluation') => 'Basket evaluation', |
|
| 40 | - $this->url('paymentmethods') => 'Payment methods'); |
|
| 36 | + $this->url(null, array('edit')) => 'Edit', |
|
| 37 | + $this->url('featuredproducts') => 'Choose featured products', |
|
| 38 | + $this->url('categories') => 'Product categories', |
|
| 39 | + $this->url('basketevaluation') => 'Basket evaluation', |
|
| 40 | + $this->url('paymentmethods') => 'Payment methods'); |
|
| 41 | 41 | |
| 42 | 42 | $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop); |
| 43 | 43 | $evaluations = $basketevaluation->getList(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $data = array('shop' => $shop, 'evaluations' => $evaluations); |
| 46 | 46 | |
| 47 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/show'); |
|
| 47 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/show'); |
|
| 48 | 48 | return $tpl->render($this, $data); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | 'settings' => $settings, |
| 86 | 86 | 'currencies' => $currencies, |
| 87 | 87 | 'languages' => $langs); |
| 88 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
| 89 | - return $this->getError()->view() . $tpl->render($this, $data); |
|
| 88 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
| 89 | + return $this->getError()->view().$tpl->render($this, $data); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | function postForm() |
@@ -77,8 +77,8 @@ |
||
| 77 | 77 | |
| 78 | 78 | function __construct(k_TemplateFactory $template, Doctrine_Connection_Common $doctrine) |
| 79 | 79 | { |
| 80 | - $this->template = $template; |
|
| 81 | - $this->doctrine = $doctrine; |
|
| 80 | + $this->template = $template; |
|
| 81 | + $this->doctrine = $doctrine; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | function map($name) |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | if (!is_null($options)) { |
| 28 | 28 | $config = HTMLPurifier_Config::createDefault(); |
| 29 | 29 | foreach ($options as $option) { |
| 30 | - $config->set($option[0] . '.' . $option[1], $option[2]); |
|
| 30 | + $config->set($option[0].'.'.$option[1], $option[2]); |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | $this->_htmlPurifier = new HTMLPurifier($config); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | $options = array( |
| 47 | 47 | array('Cache', 'SerializerPath', |
| 48 | - PATH_CACHE . '/htmlpurifier' |
|
| 48 | + PATH_CACHE.'/htmlpurifier' |
|
| 49 | 49 | ), |
| 50 | 50 | //array('HTML', 'Doctype', 'XHTML 1.0 Strict'), |
| 51 | 51 | array('HTML', 'Allowed', |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | $shops = Doctrine::getTable('Intraface_modules_shop_Shop')->findByIntranetId($this->getKernel()->intranet->getId()); |
| 150 | 150 | |
| 151 | 151 | if (count($shops) == 0) { |
| 152 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/empty-table'); |
|
| 152 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/empty-table'); |
|
| 153 | 153 | return $tpl->render($this, array('message' => 'No shops has been created yet.')); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | $data = array('shops' => $shops); |
| 157 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/shops'); |
|
| 157 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/shops'); |
|
| 158 | 158 | return $tpl->render($this, $data); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | 'settings' => $settings, |
| 193 | 193 | 'currencies' => $currencies, |
| 194 | 194 | 'languages' => $langs); |
| 195 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
| 195 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
| 196 | 196 | return $tpl->render($this, $data); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | function wrapHtml($content) |
| 244 | 244 | { |
| 245 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content'); |
|
| 245 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/content'); |
|
| 246 | 246 | return $tpl->render($this, array('content' => $content)); |
| 247 | 247 | } |
| 248 | 248 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | 'kernel' => $this->getKernel(), |
| 43 | 43 | 'keywords' => $keywords); |
| 44 | 44 | |
| 45 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/featuredproducts'); |
|
| 45 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/featuredproducts'); |
|
| 46 | 46 | return $tpl->render($this, $data); |
| 47 | 47 | } |
| 48 | 48 | |