Nie wiem jak to opisać w tytule wiec napisałem jakoś tak dziwnie.

Do rzeczy

mam takie coś:

  1. <?php
  2. public function getDoc()
  3. {
  4. if (self::countId($this->_where,$this->_lang) == 0)
  5. {
  6. throw new Exception(Ex(1,$this->_where));
  7. }else{
  8.  
  9. self::uploadCounter($this->_where,$this->_lang);
  10.  
  11. $db = parent::Connect();
  12. $db->query("set names 'utf8'");
  13. $db->whereAdd("documents.Lang = '$this->_lang'");
  14. $db->whereAdd("documents.Id = '$this->_where'");
  15. $pis = DB_DataObject::factory('user');
  16. $db->joinAdd($pis);
  17. $db->selectAdd('documents.CreateDate as CreateDate2');
  18. $db->selectAdd('documents.Img as Img');
  19. $db->limit(1);
  20. $db->find();
  21. while($db->fetch()) {
  22. $result['data'][] = $db->toArray();
  23. }
  24. return $result = isset($result) ? $result : null;
  25.  
  26. }
  27. }
  28. ?>


Działa jak należy z tym, że nie wywołuje się to

  1. <?php
  2. self::uploadCounter($this->_where,$this->_lang);
  3. ?>


a powinno

zaznaczę ze nie mogę ruszać tego return $result = isset($result) ? $result : null;

może ktoś ma pomysł jak to obejść jest to mała cześć całej klasy

EDIT

Można wywalić wiem już co nie tak brakowało mi jednej lini w metodzie uploadCounter

przepraszam za zamiesznie