InDefero

Sign in or create your account | Project List | Help

InDefero Commit Details

Date:2009-06-19 16:20:33 (9 months 2 days ago)
Author:Loïc d'Anterroches
Commit:8915b45948596ef9d595aa5832c56579ba548b69
Message:Fixed issue 209, erroneous details with private repository

Files: src/IDF/Project.php (1 diff)
src/IDF/templates/idf/source/git/help.html (1 diff)
src/IDF/templates/idf/source/git/tree.html (1 diff)

Change Details

src/IDF/Project.php
350350    }
351351
352352    /**
353     * Get the access url to the repository.
354     *
355     * This will return the right url based on the user.
356     *
357     * @param Pluf_User The user (null)
358     */
359    public function getSourceAccessUrl($user=null)
360    {
361        $right = $this->getConf()->getVal('source_access_rights', 'all');
362        if (($user == null or $user->isAnonymous())
363            and $right == 'all' and !$this->private) {
364            return $this->getRemoteAccessUrl();
365        }
366        return $this->getWriteRemoteAccessUrl($user);
367    }
368
369
370    /**
353371     * Get the remote access url to the repository.
354372     *
373     * This will always return the anonymous access url.
355374     */
356375    public function getRemoteAccessUrl()
357376    {
src/IDF/templates/idf/source/git/help.html
88
99<h3>{trans 'Command-Line Access'}</h3>
1010
11<p><kbd>git clone {if $project.private}{$project.getWriteRemoteAccessUrl($user)}{else}{$project.getRemoteAccessUrl()}{/if}</kbd></p>
11<p><kbd>git clone {$project.getSourceAccessUrl($user)}</kbd></p>
1212
1313{aurl 'url', 'IDF_Views_User::myAccount'}
1414<p>{blocktrans}You may need to <a href="{$url}">provide your SSH key</a>. The synchronization of your SSH key can take a couple of minutes. You can learn more about <a href="http://www.google.com/search?q=public+ssh+key+authentication">SSH key authentification</a>.{/blocktrans}</p>
src/IDF/templates/idf/source/git/tree.html
4747</tbody>
4848</table>
4949{aurl 'url', 'IDF_Views_Source::download', array($project.shortname, $commit)}
50<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this version'}</a> {trans 'or'} <kbd>git clone {if $project.private}{$project.getWriteRemoteAccessUrl($user)}{else}{$project.getRemoteAccessUrl()}{/if}</kbd> <a href="{url 'IDF_Views_Source::help', array($project.shortname)}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/help.png'}" alt="{trans 'Help'}" /></a></p>
50<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this version'}</a> {trans 'or'} <kbd>git clone {$project.getSourceAccessUrl($user)}</kbd> <a href="{url 'IDF_Views_Source::help', array($project.shortname)}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/help.png'}" alt="{trans 'Help'}" /></a></p>
5151
5252
5353{/block}

Archive Download the corresponding diff file

Branches:
dev
master
newdiff
svn