Exemple #1
0
 function postSave($create = false)
 {
     IDF_Search::index($this);
     if ($create) {
         IDF_Timeline::insert($this, $this->get_project(), $this->get_author(), $this->creation_dtime);
     }
 }
Exemple #2
0
 function postSave($create = false)
 {
     if ($create) {
         IDF_Timeline::insert($this, $this->get_review()->get_project(), $this->get_review()->get_submitter());
         IDF_Search::index($this->get_review());
     }
 }
Exemple #3
0
 function postSave($create = false)
 {
     if ($create) {
         // Check if more than one revision for this page. We do
         // not want to insert the first revision in the timeline
         // as the page itself is inserted.  We do not insert on
         // update as update is performed to change the is_head
         // flag.
         $sql = new Pluf_SQL('wikipage=%s', array($this->wikipage));
         $rev = Pluf::factory('IDF_WikiRevision')->getList(array('filter' => $sql->gen()));
         if ($rev->count() > 1) {
             IDF_Timeline::insert($this, $this->get_wikipage()->get_project(), $this->get_submitter());
             foreach ($rev as $r) {
                 if ($r->id != $this->id and $r->is_head) {
                     $r->is_head = false;
                     $r->update();
                 }
             }
         }
         $page = $this->get_wikipage();
         $page->update();
         // Will update the modification timestamp.
         IDF_Search::index($page);
     }
 }
Exemple #4
0
/**
 * Add the download of files.
 */
function IDF_Migrations_2Search_up($params = null)
{
    $models = array('IDF_Search_Occ');
    $db = Pluf::db();
    $schema = new Pluf_DB_Schema($db);
    foreach ($models as $model) {
        $schema->model = new $model();
        $schema->createTables();
    }
    foreach (Pluf::factory('IDF_Issue')->getList() as $i) {
        IDF_Search::index($i);
    }
}
Exemple #5
0
 function postSave($create = false)
 {
     if ($create) {
         // Check if more than one comment for this issue. We do
         // not want to insert the first comment in the timeline as
         // the issue itself is inserted.
         $sql = new Pluf_SQL('issue=%s', array($this->issue));
         $co = Pluf::factory('IDF_IssueComment')->getList(array('filter' => $sql->gen()));
         if ($co->count() > 1) {
             IDF_Timeline::insert($this, $this->get_issue()->get_project(), $this->get_submitter());
         }
     }
     IDF_Search::index($this->get_issue());
 }
Exemple #6
0
 function postSave($create = false)
 {
     // At creation, we index after saving the associated patch.
     if (!$create) {
         IDF_Search::index($this);
     }
 }