Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4808 Rev 6056
Línea 81... Línea 81...
81
        return $record['total'];
81
        return $record['total'];
82
    }
82
    }
Línea 83... Línea 83...
83
    
83
    
84
    /**
84
    /**
-
 
85
     *
-
 
86
     * @param int $knowledge_area_id
-
 
87
     * @return int
-
 
88
     */
-
 
89
    public function fetchCountCommentByKnowledgeAreaId($knowledge_area_id)
-
 
90
    {
-
 
91
        $select = $this->sql->select(self::_TABLE);
-
 
92
        $select->columns(['total' => new Expression('COUNT(*)') ]);
-
 
93
        $select->where->equalTo('knowledge_area_id', $knowledge_area_id);
-
 
94
        $select->where->equalTo('relational', Comment::RELATIONAL_KNOWLEDGE_AREA);
-
 
95
        
-
 
96
        $select->where->equalTo('status', Feed::STATUS_PUBLISHED);
-
 
97
        
-
 
98
        $record = $this->executeFetchOneArray($select);
-
 
99
        return $record['total'];
-
 
100
    }
-
 
101
    
-
 
102
    
-
 
103
    /**
85
     *
104
     *
86
     * @param int $post_id
105
     * @param int $post_id
87
     * @return int
106
     * @return int
88
     */
107
     */
89
    public function fetchCountCommentByPostId($post_id)
108
    public function fetchCountCommentByPostId($post_id)
Línea 148... Línea 167...
148
        $select->where->IsNull('parent_id');
167
        $select->where->IsNull('parent_id');
149
        return $this->executeFetchAllObject($select, $prototype);
168
        return $this->executeFetchAllObject($select, $prototype);
150
    }
169
    }
Línea -... Línea 170...
-
 
170
    
-
 
171
    
-
 
172
    /**
-
 
173
     *
-
 
174
     * @param int $post_id
-
 
175
     * @return Comment[]
-
 
176
     */
-
 
177
    public function fetchAllPublishedByKnowledgeAreaId($knowledge_area_id)
-
 
178
    {
-
 
179
        $prototype = new Comment();
-
 
180
        
-
 
181
        $select = $this->sql->select(self::_TABLE);
-
 
182
        $select->where->equalTo('knowledge_area_id', $knowledge_area_id);
-
 
183
        $select->where->equalTo('status', Feed::STATUS_PUBLISHED);
-
 
184
        $select->where->equalTo('relational', Comment::RELATIONAL_KNOWLEDGE_AREA);
-
 
185
        $select->where->IsNull('parent_id');
-
 
186
        return $this->executeFetchAllObject($select, $prototype);
-
 
187
    }
151
    
188
    
152
    
189
    
153
    /**
190
    /**
154
     *
191
     *
155
     * @param int $post_id
192
     * @param int $post_id