Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3128 | Rev 3141 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3128 Rev 3140
Línea 385... Línea 385...
385
 
385
 
386
     /**
386
     /**
387
     *
387
     *
388
     * @return Feed
388
     * @return Feed
389
     */
389
     */
390
    public function fetchAllByDevelop()
390
    public function fetchAllByDevelop($allowEdit)
391
    {
391
    {
Línea 392... Línea 392...
392
        $prototype = new Feed();
392
        $prototype = new Feed();
393
        
393
        
394
        $select = $this->sql->select(self::_TABLE);
394
        $select = $this->sql->select(self::_TABLE);
-
 
395
        $select->where->equalTo('type', Feed::TYPE_DC);
-
 
396
        $select->where->notEqualTo('status', Feed::STATUS_DELETED);
-
 
397
 
-
 
398
        if(!$allowEdit){
-
 
399
            $select->where->equalTo('status', Feed::STATUS_PUBLISHED);
395
        $select->where->equalTo('type', Feed::TYPE_DC);
400
        }
Línea 396... Línea 401...
396
        $select->where->notEqualTo('status', Feed::STATUS_DELETED);
401
        
397
        $select->order('added_on DESC');
402
        $select->order('added_on DESC');
398
        
403
        
399
        return $this->executeFetchAllObject($select, $prototype);
404
        return $this->executeFetchAllObject($select, $prototype);
400
    }
405
    }
401
    /**
406
    /**
402
     *
407
     *
403
     * @return Feed
408
     * @return Feed
404
     */
409
     */
Línea 405... Línea 410...
405
    public function fetchAllByDevelopAndCategoryId($id)
410
    public function fetchAllByDevelopAndCategoryId($id, $allowEdit)
406
    {
411
    {
407
        $prototype = new Feed();
412
        $prototype = new Feed();
408
 
413
 
-
 
414
        $select = $this->sql->select(self::_TABLE);
-
 
415
        $select->where->equalTo('type', Feed::TYPE_DC);
-
 
416
        $select->where->equalTo('topic_id', $id);
-
 
417
        $select->where->notEqualTo('status', Feed::STATUS_DELETED);
409
        $select = $this->sql->select(self::_TABLE);
418
        if (!$allowEdit) {
Línea 410... Línea 419...
410
        $select->where->equalTo('type', Feed::TYPE_DC);
419
            $select->where->equalTo('status', Feed::STATUS_PUBLISHED);
411
        $select->where->equalTo('topic_id', $id);
420
        }