Indefero

Indefero Commit Details


Date:2010-02-27 11:09:02 (14 years 9 months ago)
Author:Loic d'Anterroches
Branch: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:75777daf4ba1654bccd954f22082435fc998daa4
Parents: d3b76975cdc852f5c1d674b95d034f32a29d5f11
Message:Fixed to prevent uploading several times the same key.

Changes:

File differences

src/IDF/Form/UserAccount.php
220220
221221
222222
223
224
225
226
227
228
229
230
231
232
233
223234
224235
225236
throw new Pluf_Form_Invalid(__('Please check the key as it does not appears to be a valid key.'));
}
}
// If $user, then check if not the same key stored
if ($user) {
$ruser = Pluf::factory('Pluf_User', $user);
if ($ruser->id > 0) {
$sql = new Pluf_SQL('content=%s', array($key));
$keys = Pluf::factory('IDF_Key')->getList(array('filter' => $sql->gen()));
if (count($keys) > 0) {
throw new Pluf_Form_Invalid(__('You already have uploaded this SSH key.'));
}
}
}
return $key;
}

Archive Download the corresponding diff file

Page rendered in 0.07175s using 13 queries.