1. Список говнокодов пользователя Quetzalcoatl

    Всего: 2

  2. PHP / Говнокод #9743

    +157

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    if ($this->_hasParam('error')) {
                    if (intval(htmlentities($this->getRequest()->getParam('error'))) == -1100) {
                        $this->payment_messages->addMess($this->translate->translate('please.remember.fill'));
                    } elseif (intval(htmlentities($this->getRequest()->getParam('error'))) == -1300) {
                        $this->payment_messages->addMess($this->translate->translate('credit.card.not.accepted'));
                    } elseif (intval(htmlentities($this->getRequest()->getParam('error'))) == -1022) {
                        $this->payment_messages->addMess($this->translate->translate('transaction.declined.card.number'));
                    } elseif (intval(htmlentities($this->getRequest()->getParam('error'))) == -1018) {
                        $this->payment_messages->addMess($this->translate->translate('transaction.declined.card.number'));
                    } else {
                        $this->payment_messages->addMess($this->translate->translate('payment.system.error'));
                    }
                    $this->view->payment_messages = $this->payment_messages->getMess();
                }

    В продолжение #9742
    Это Team leader!!!

    Quetzalcoatl, 23 Марта 2012

    Комментарии (5)
  3. PHP / Говнокод #9742

    +158

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    public function delete_post($id_op){
            $ret = 'false';
            if((!empty($id_op))){
                    try{
                                        $ret1 = $this->getAdapter()->delete($this->users_posts_table,  'op_id = '.intval($id_op));
                                        $ret2 = $this->getAdapter()->delete($this->offer_posts_table,  'id_op = '.intval($id_op));
                                        if($ret1>0 && $ret2>0){
                                            $ret = 'true';
                                        }
                                        }catch(Exception $e){
                            $this->logger->log('module: deleting in  users_posts, offer_posts tables '.$e->getMessage(), Zend_Log::ERR);
                     }
            }
            else{
                            $ret = 'false';
                            $this->logger->log('function: delete_post : id_op is null', Zend_Log::ERR);
            }
            return $ret;
        }

    Код тим лидера.
    форматирование автора

    Quetzalcoatl, 23 Марта 2012

    Комментарии (4)