11

At the moment I'm working on a project where every line of code is actually garbage. However, the client insists on continuing to use ZF1.

Zend_Locale is a mess. I've been sitting on it for five hours and nothing's working.

Comments
  • 1
    Hang in there mate I don't know about zend_locale but I can already imagine you, you're in messy situation.
  • 0
    @aitkotw Take a look at this. Not a single comment, btw.

    if(file_exists($conf->serverroot . "/lang/page/".$newLocale.".mo")) {
    $newLocale=new Zend_Locale($this->_localizationSession->locale);
    App_Helper_Cookies::setcookie('language', $locale, (time()+360000000),"/");
    } else {
    if($languageset!==true) {
    $newLocale=new Zend_Locale("" . $defaultLanguage . "_" . $newLocale->getRegion() . "");
    App_Helper_Cookies::setcookie('language', $locale, (time()-3600),"/");
    App_Helper_Cookies::setcookie('language', $locale, (time()+360000000),"/");
    }
    }
    if (isset($this->_localizationSession->locale)) {
    $this->_localizationSession->locale;
    }
    else {
    $this->_localizationSession->locale=$newLocale->findLocale();
    }
    $newLocale->setLocale($locale);
    $this->_localizationSession->locale=$locale;
  • 0
    I'm ashamed of myself. Worst workaround ever, but the main thing is that it works. I don't have time to deal with shit like this anymore.

    I don't dare to post the code.
  • 1
    @tracktraps take it easy my friends if you don't want to work just wet the project or tell them to sort it out.
  • 0
    Aye. When it comes to Zend, taking the time to learn Zend studio can actually be worth it..

    Btw, isn't ZF1 long gone deprecated?
    What arguments does the client have for such masochistic wishes
  • 1
    @lotd The project is pretty huge. Almost 200,000 lines of code, all ZF1.

    The support for ZF1 has expired years ago. But that's not that bad, the worse is the spaghetti code, which has grown over the years.

    They don't want to pay for a porting to the current ZF3, but instead they are paying Zend an annual support fee for security fixes.

    Well, that's how it is when the business economists decide.
  • 0
  • 2
    Wtf is zend?
Add Comment