Proyectos de Subversion LeadersLinked - Services

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 283
Línea 166... Línea 166...
166
        {
166
        {
167
            $hydrator = new ObjectPropertyHydrator();
167
            $hydrator = new ObjectPropertyHydrator();
168
            $values = $hydrator->extract($post);
168
            $values = $hydrator->extract($post);
169
            $values = $this->removeEmpty($values);
169
            $values = $this->removeEmpty($values);
Línea -... Línea 170...
-
 
170
            
-
 
171
            if(empty($values['publish_on'])) {
-
 
172
                $values['publish_on'] = new Expression('CURRENT_DATE()');
-
 
173
            }
170
            
174
            
171
            $insert = $this->sql->insert(self::_TABLE);
175
            $insert = $this->sql->insert(self::_TABLE);
Línea 172... Línea 176...
172
            $insert->values($values);
176
            $insert->values($values);
173
            
177
            
Línea 189... Línea 193...
189
        {
193
        {
190
            $hydrator = new ObjectPropertyHydrator();
194
            $hydrator = new ObjectPropertyHydrator();
191
            $values = $hydrator->extract($post);
195
            $values = $hydrator->extract($post);
192
            $values = $this->removeEmpty($values);
196
            $values = $this->removeEmpty($values);
Línea -... Línea 197...
-
 
197
            
-
 
198
            if(empty($values['publish_on'])) {
-
 
199
                $values['publish_on'] = new Expression('CURRENT_DATE()');
-
 
200
            }
193
            
201
            
194
            $update = $this->sql->update(self::_TABLE);
202
            $update = $this->sql->update(self::_TABLE);
195
            $update->set($values);
203
            $update->set($values);
Línea 196... Línea 204...
196
            $update->where->equalTo('id', $post->id);
204
            $update->where->equalTo('id', $post->id);