Indefero

Indefero Commit Details


Date:2009-01-12 07:57:09 (15 years 11 months 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:c8e523d8c70661aa476fd8228b3fc33249bb9a4c
Parents: da524146e910ae16307147877c9eb5538fbcd223
Message:Added some extra signals useful to customize the project creation.

Changes:

File differences

src/IDF/Form/Admin/ProjectCreate.php
109109
110110
111111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
112134
113135
114136
115137
138
116139
117140
118141
......
151174
152175
153176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
154199
155200
156201
......
170215
171216
172217
218
219
173220
174221
175222
'cols' => 40),
'widget' => 'Pluf_Form_Widget_TextareaInput',
));
/**
* [signal]
*
* IDF_Form_Admin_ProjectCreate::initFields
*
* [sender]
*
* IDF_Form_Admin_ProjectCreate
*
* [description]
*
* This signal allows an application to modify the form
* for the creation of a project.
*
* [parameters]
*
* array('form' => $form)
*
*/
$params = array('form' => $this);
Pluf_Signal::send('IDF_Form_Admin_ProjectCreate::initFields',
'IDF_Form_Admin_ProjectCreate', $params);
}
public function clean_svn_remote_url()
{
$this->cleaned_data['svn_remote_url'] = (!empty($this->cleaned_data['svn_remote_url'])) ? $this->cleaned_data['svn_remote_url'] : '';
$url = trim($this->cleaned_data['svn_remote_url']);
if (strlen($url) == 0) return $url;
// we accept only starting with http(s):// to avoid people
$this->cleaned_data[$key] = '';
}
}
/**
* [signal]
*
* IDF_Form_Admin_ProjectCreate::clean
*
* [sender]
*
* IDF_Form_Admin_ProjectCreate
*
* [description]
*
* This signal allows an application to clean the form
* for the creation of a project.
*
* [parameters]
*
* array('cleaned_data' => $cleaned_data)
*
*/
$params = array('cleaned_data' => $this->cleaned_data);
Pluf_Signal::send('IDF_Form_Admin_ProjectCreate::clean',
'IDF_Form_Admin_ProjectCreate', $params);
return $this->cleaned_data;
}
$keys = array('scm', 'svn_remote_url',
'svn_username', 'svn_password');
foreach ($keys as $key) {
$this->cleaned_data[$key] = (!empty($this->cleaned_data[$key])) ?
$this->cleaned_data[$key] : '';
$conf->setVal($key, $this->cleaned_data[$key]);
}
$project->created();

Archive Download the corresponding diff file

Page rendered in 0.07295s using 13 queries.