Exemplo n.º 1
0
// see if we can find the root repos for this project
if (isset($_SESSION['repos_id'])) {
    $repos_id = $_SESSION['repos_id'];
    $sql = "select repospath,url_tail,description as repos_description,isroot,id from repositories \n" . "\t where prjm_id={$prjm_id} and id={$repos_id} and isroot=true order by id limit 1";
} else {
    $sql = "select repospath,url_tail,description as repos_description,isroot,id from repositories \n" . "\t where prjm_id={$prjm_id}  and isroot=true order by id limit 1";
}
//$dbConn->log($sql);
$resultSet = $dbConn->Execute($sql);
if (!$resultSet->EOF) {
    extract($resultSet->fields);
    $authzfile = $url_tail . '/conf/authz';
    $authzfilepath = '/home' . $authzfile;
    if (is_file($authzfilepath)) {
        $_SESSION['mustCommit'] = 1;
        $pp['executionResult'] = ConfFileEditor::save();
        $_SESSION['conf_editor_basedir'] = '/home';
        $_SESSION['fileToEdit'] = $authzfile;
        $pp['repos_id'] = $id;
        $pp['fileeditor'] = new ConfFileEditor($PHP_SELF, 'templates/authzeditor.html');
    }
}
$pp['page'] = $page;
$sql = "select repospath,grp_num,description as repos_description," . "url_tail,isroot,id,last_commit from repositories \n" . "\t where prjm_id={$prjm_id} order by repospath";
$resultSet = $dbConn->Execute($sql);
$repolist = '';
$repobase = '';
$reposTable = '';
if (!$resultSet->EOF) {
    $reposTable .= "<fieldset><legend>Available repositories</legend>" . "<table>\n" . "<tr><th>Id</th><td>grp</td><th>Path</th><th>description</th><th>revisions</th><th>last commit</th><th>Edit authorizations</th></tr>\n";
    while (!$resultSet->EOF) {
Exemplo n.º 2
0
<?php

include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
//require_once('rubberstuff.php');
include_once 'navigation2.inc';
require_once './peerlib/conffileeditor2.php';
requireCap(CAP_SYSTEM);
// anticipate a save initiated by user.
$saveResult = ConfFileEditor::save();
$page_opening = "Rubber editor file ";
$page = new PageContainer();
$page->setTitle($page_opening);
$nav = new Navigation($navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
if ($saveResult != '') {
    $page->addBodyComponent(new Component($saveResult));
}
if (isset($_REQUEST['formEditFile'])) {
    $_SESSION['formFileToEdit'] = $_REQUEST['formEditFile'];
}
$_SESSION['formFileToEdit'] = './templates/editform/html';
$pp = array();
$fileEditor = new ConfFileEditor($PHP_SELF, 'templates/formedit.html');
$fileEditor->setDescription("Edit query, template or tex file");
$fileEditor->getWidgetForPage($page);
$page->show();
Exemplo n.º 3
0
                passthru($cmdstring);
                $sql = "delete from personal_repos where id = {$deleteId}";
                $resultSet = $dbConn->Execute($sql);
            }
        }
    }
}
$reposauthzroot = $reposroot . '/' . $snummer . '/svnroot';
$authzfile = 'conf/authz';
$authzfilepath = $reposauthzroot . '/' . $authzfile;
if (is_file($authzfilepath)) {
    $_SESSION['mustCommit'] = 1;
    $pp['executionResult'] = ConfFileEditor::save();
    $_SESSION['conf_editor_basedir'] = $reposauthzroot;
    $_SESSION['fileToEdit'] = $authzfile;
    $fileeditor = new ConfFileEditor($PHP_SELF, 'templates/authzeditor.html');
}
//$fileeditor->setMustCommit( true );
//$fileeditor->save();
$isRoot = 'false';
if (isset($_REQUEST['bcreate']) && isset($repos_name) && '' != $repos_name) {
    if ($repos_name == 'svnroot') {
        $isRoot = 'true';
        $cmdstring = $subversionscriptdir . "/mksvnrootrepos.sh {$reposroot} {$snummer}";
        unset($_SESSION['repos_name']);
    } else {
        $cmdstring = $subversionscriptdir . "/mksimplerepos.sh {$reposroot} {$snummer} {$repos_name}";
    }
    $url_tail = 'svnp/' . $snummer . '/' . $repos_name;
    $repospath = '/home/' . $url_tail;
    $repoURL = $server_url . '/' . $url_tail;