Ce blog a déménagé et parle maintenant uniquement anglais.

This blog has moved and now only speaks English.


See you there!


le blog de florian cargoet : du linux, du web et du logiciel libre

Bugs & Patchs pour GForge

4 July, 2008 (16:46) | Forge Evolix | Florian Cargoet

Ah ! Ce qu’on est fier lorsque ses premiers patchs sont acceptés ! J’utilise la version SVN (/trunk) de GForge et de temps en temps, j’y trouve un bug, que je signale et/ou corrige si j’en suis capable.

Voici quelques bugs corrigés (en anglais) :

Mauvais liens

  • Summary: Bad link to editsshkeys.php
    Category: Account Maintenance
    Initial Comment:
    In file /trunk/gforge/www/account/index.php the link pointing at editsshkeys.php is bad : it points at editsshkeys/php instead of account/editsshkeys.php

  • Summary: Bad links in grouplist.php
    Category: Site Admin
    Initial Comment:
    In www/admin/grouplist.php :
    $headerLinks = array(
    echo $HTML->listTableTop($headers, $headerLinks);

    Something is wrong since generated links are bad :
    instead of

Bug dangereux

  • Summary: Plugin scmcvs : fixes for cronjobs script usergroup.php Written For: None
    Category: CVS
    Initial Comment:
    (working on the trunk)
    I noticed that the /etc/*.new (passwd,group,shadow) files where not correctly created (missing all non gforge users in passwd !)In /opt/gforge/plugins/scmcvs/cronjobs/usergroup.php, files are opened
    with file() which has the filename as a parameter but in this file,
    /etc/passwd & /etc/shadow are opened with a second parameter : “r”.
    The “/etc/group” file is correctly opened.Function file() doesn’t handle this parameter (it’s already read-only) so the script doesn’t work correctly.

    The patch also adds require_once ‘/opt/gforge/plugins/env.inc.php’; so
    that the script knows $gfwww & $gfcommon. (Otherwise it fails
    including the other files).

    It also initialises the $err variable with $err=”;

Warning php

  • Summary: Access to an undefined offset in an array
    Category: News
    Initial Comment:
    In the install cd version (4.7b1 according to the wiki http://wiki.planetforge.org/index.php/En:GForge:Debian_Install_CD ) :

    file : www/news/news_utils.php
    version : news_utils.php 6433 2008-03-11 22:54:02Z cbayle
    line : 120if ( (strlen($arr[0]) < 200) && (strlen($arr[1].$arr[2]) < 300) && (strlen($arr[2]) > 5))  {

    $arr is the result of an explode of the news  with <br /> or \n
    as separator depending on whether the news was written in html
    (fckeditor) or in text.

    If there is only one paragraph in the news, $arr[1] and $arr[2] doesn’t exist and you get :

    Notice: Undefined offset: 1 in /usr/share/gforge/www/news/news_utils.php on line 120

    Not very important but easy to fix I think :

    if ( (strlen($arr[0]) < 200) && (strlen($arr[1].$arr[2]) < 300) && (strlen($arr[2]) > 5) ) {
    BY :
    if (isset($arr[1]) && isset($arr[2])
    && (strlen($arr[0]) < 200)
    && (strlen($arr[1].$arr[2]) < 300)
    && (strlen($arr[2]) > 5)) {

    This problem repeats on line 240.

Article précédent :
Article suivant :