InDefero

Sign in or create your account | Project List | Help

InDefero Git Source Tree

Root/src/IDF/relations.php

1<?php
2/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3/*
4# ***** BEGIN LICENSE BLOCK *****
5# This file is part of InDefero, an open source project management application.
6# Copyright (C) 2008 Céondo Ltd and contributors.
7#
8# InDefero is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# InDefero is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21#
22# ***** END LICENSE BLOCK ***** */
23
24$m = array();
25$m['IDF_Tag'] = array('relate_to' => array('IDF_Project'));
26$m['IDF_Issue'] = array('relate_to' => array('IDF_Project', 'Pluf_User', 'IDF_Tag'),
27                        'relate_to_many' => array('IDF_Tag', 'Pluf_User'));
28$m['IDF_IssueComment'] = array('relate_to' => array('IDF_Issue', 'Pluf_User'));
29$m['IDF_IssueFile'] = array('relate_to' => array('IDF_IssueComment', 'Pluf_User'));
30$m['IDF_Upload'] = array('relate_to' => array('IDF_Project', 'Pluf_User'),
31                         'relate_to_many' => array('IDF_Tag'));
32$m['IDF_Search_Occ'] = array('relate_to' => array('IDF_Project'),);
33$m['IDF_WikiPage'] = array('relate_to' => array('IDF_Project', 'Pluf_User'),
34                           'relate_to_many' => array('IDF_Tag', 'Pluf_User'));
35$m['IDF_WikiRevision'] = array('relate_to' => array('IDF_WikiPage', 'Pluf_User'));
36$m['IDF_Review'] = array('relate_to' => array('IDF_Project', 'Pluf_User', 'IDF_Tag'),
37                        'relate_to_many' => array('IDF_Tag', 'Pluf_User'));
38$m['IDF_Review_Patch'] = array('relate_to' => array('IDF_Review', 'Pluf_User'));
39$m['IDF_Review_Comment'] = array('relate_to' => array('IDF_Review_Patch', 'Pluf_User'));
40$m['IDF_Review_FileComment'] = array('relate_to' => array('IDF_Review_Comment', 'Pluf_User'));
41$m['IDF_Key'] = array('relate_to' => array('Pluf_User'));
42$m['IDF_Conf'] = array('relate_to' => array('IDF_Project'));
43$m['IDF_Commit'] = array('relate_to' => array('IDF_Project', 'Pluf_User'));
44$m['IDF_Scm_Cache_Git'] = array('relate_to' => array('IDF_Project'));
45
46Pluf_Signal::connect('Pluf_Template_Compiler::construct_template_tags_modifiers',
47                     array('IDF_Middleware', 'updateTemplateTagsModifiers'));
48
49# -- Standard plugins, they will run only if configured --
50#
51# Subversion synchronization
52Pluf_Signal::connect('IDF_Project::membershipsUpdated',
53                     array('IDF_Plugin_SyncSvn', 'entry'));
54Pluf_Signal::connect('IDF_Project::created',
55                     array('IDF_Plugin_SyncSvn', 'entry'));
56Pluf_Signal::connect('Pluf_User::passwordUpdated',
57                     array('IDF_Plugin_SyncSvn', 'entry'));
58Pluf_Signal::connect('IDF_Project::preDelete',
59                     array('IDF_Plugin_SyncSvn', 'entry'));
60Pluf_Signal::connect('svnpostcommit.php::run',
61                     array('IDF_Plugin_SyncSvn', 'entry'));
62
63#
64# Mercurial synchronization
65Pluf_Signal::connect('IDF_Project::membershipsUpdated',
66                     array('IDF_Plugin_SyncMercurial', 'entry'));
67Pluf_Signal::connect('IDF_Project::created',
68                     array('IDF_Plugin_SyncMercurial', 'entry'));
69Pluf_Signal::connect('Pluf_User::passwordUpdated',
70                     array('IDF_Plugin_SyncMercurial', 'entry'));
71Pluf_Signal::connect('hgchangegroup.php::run',
72                     array('IDF_Plugin_SyncMercurial', 'entry'));
73
74#
75# Git synchronization
76Pluf_Signal::connect('IDF_Project::membershipsUpdated',
77                     array('IDF_Plugin_SyncGit', 'entry'));
78Pluf_Signal::connect('IDF_Key::postSave',
79                     array('IDF_Plugin_SyncGit', 'entry'));
80Pluf_Signal::connect('IDF_Project::created',
81                     array('IDF_Plugin_SyncGit', 'entry'));
82Pluf_Signal::connect('IDF_Key::preDelete',
83                     array('IDF_Plugin_SyncGit', 'entry'));
84Pluf_Signal::connect('gitpostupdate.php::run',
85                     array('IDF_Plugin_SyncGit', 'entry'));
86
87#
88# monotone synchronization
89Pluf_Signal::connect('IDF_Project::created',
90                     array('IDF_Plugin_SyncMonotone', 'entry'));
91Pluf_Signal::connect('phppostpush.php::run',
92                     array('IDF_Plugin_SyncMonotone', 'entry'));
93
94#
95# -- Processing of the webhook queue --
96Pluf_Signal::connect('queuecron.php::run',
97                     array('IDF_Queue', 'process'));
98
99#
100# Processing of a given webhook, the hook can be configured
101# directly in the configuration file if a different solution
102# is required.
103Pluf_Signal::connect('IDF_Queue::processItem',
104                     Pluf::f('idf_hook_process_item',
105                             array('IDF_Webhook', 'process')));
106return $m;
107

Archive Download this file

Branches:
dev
develop
master
newdiff
svn

Tags:
v1.0