Indefero

Indefero Commit Details


Date:2009-04-16 06:27:41 (16 years 7 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:1656c99a48f894f1b1c3bdc2ce7f68fe1a20e9e9
Parents: b9773b555c1fbd4e7afa6189ea8962636bac0d5a
Message:Fixed issue 183, project can not be deleted because of foreign key integrity constraints.

Changes:

File differences

src/IDF/IssueFile.php
123123
124124
125125
126
127
128
129
130
126131
        }
        $this->modif_dtime = gmdate('Y-m-d H:i:s');
    }
    function preDelete()
    {
        @unlink(Pluf::f('upload_issue_path').'/'.$this->attachment);
    }
}
src/IDF/Project.php
541541
542542
543543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
544560
        Pluf_Signal::send('IDF_Project::created',
                          'IDF_Project', $params);
    }
    /**
     * The delete() call do not like circular references and the
     * IDF_Tag is creating some. We predelete to solve these issues.
     */
    public function preDelete()
    {
        $what = array('IDF_Upload', 'IDF_Review', 'IDF_Issue',
                      'IDF_WikiPage', 'IDF_Commit',
                      );
        foreach ($what as $m) {
            foreach (Pluf::factory($m)->getList(array('filter' => 'project='.(int)$this->id)) as $item) {
                $item->delete();
            }
        }
    }
}
src/IDF/Upload.php
160160
161161
162162
163
163164
164165
165166
    function preDelete()
    {
        IDF_Timeline::remove($this);
        @unlink(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->file);
    }
    /**

Archive Download the corresponding diff file

Page rendered in 0.16887s using 14 queries.