コード例 #1
0
ファイル: rss.php プロジェクト: laiello/suitex
$rss .= '<generator>WebSVN ' . $vars['version'] . '</generator>';
// URL for matching WebSVN log page
$rss .= '<link>' . getFullURL($baseurl . $config->getURL($rep, $path, 'log') . (@$_REQUEST['isdir'] == 1 ? 'isdir=1&amp;' : '') . 'max=' . $max . '&amp;' . createRevAndPegString($passrev, $peg)) . '</link>';
// URL where this original RSS feed can be found
$rss .= '<atom:link href="' . htmlspecialchars(getFullURL($_SERVER['REQUEST_URI'])) . '" rel="self" type="application/rss+xml" />' . "\n";
if ($history && is_array($history->entries)) {
    foreach ($history->entries as $r) {
        $wordLimit = 10;
        // Display only up to the first 10 words of the log message
        $title = trim($r->msg);
        $words = explode(' ', $title, $wordLimit + 1);
        if (count($words) > $wordLimit) {
            $title = implode(' ', array_slice($words, 0, $wordLimit)) . ' ...';
        }
        $title = $lang['REV'] . ' ' . $r->rev . ' -- ' . $title;
        $description = '<div><strong>' . $r->author . ' -- ' . count($r->mods) . ' ' . $lang['FILESMODIFIED'] . '</strong><br/>' . nl2br(create_anchors(str_replace('<', '&lt;', $r->msg))) . '</div>';
        if (!$quiet) {
            usort($r->mods, 'SVNLogEntry_compare');
            foreach ($r->mods as $modifiedResource) {
                switch ($modifiedResource->action) {
                    case 'A':
                        $description .= '+ ';
                        break;
                    case 'M':
                        $description .= '~ ';
                        break;
                    case 'D':
                        $description .= 'x ';
                        break;
                }
                $description .= $modifiedResource->path . '<br />';
コード例 #2
0
ファイル: revision.php プロジェクト: laiello/suitex
     $prevRev = $history->entries[1]->rev;
     $prevPath = $history->entries[1]->path;
     $vars['prevrev'] = $prevRev;
     $vars['prevrevurl'] = $revurl . 'rev=' . $prevRev;
     //echo 'PREV='.$vars['prevrevurl'].'<br/>';
 }
 // Save the entry from which we pull information for the current revision.
 $logEntry = isset($history->entries[0]) ? $history->entries[0] : null;
 $bugtraq = new Bugtraq($rep, $svnrep, $ppath);
 $vars['action'] = '';
 $vars['rev'] = $rev;
 $vars['peg'] = $peg;
 $vars['path'] = htmlentities($ppath, ENT_QUOTES, 'UTF-8');
 $vars['date'] = $logEntry ? $logEntry->date : '';
 $vars['author'] = $logEntry ? $logEntry->author : '';
 $vars['log'] = $logEntry ? nl2br($bugtraq->replaceIDs(create_anchors(xml_entities($logEntry->msg)))) : '';
 $isDir = @$_REQUEST['isdir'] == 1 || $path == '' || $path == '/';
 $vars['logurl'] = $config->getURL($rep, $path, 'log') . $passRevString . ($isDir ? '&amp;isdir=1' : '');
 $vars['loglink'] = '<a href="' . $vars['logurl'] . '">' . $lang['VIEWLOG'] . '</a>';
 $dirPath = $isDir ? $path : dirname($path) . '/';
 $vars['directoryurl'] = $config->getURL($rep, $dirPath, 'dir') . $passRevString . '#' . anchorForPath($dirPath);
 $vars['directorylink'] = '<a href="' . $vars['directoryurl'] . '">' . $lang['LISTING'] . '</a>';
 if ($path != $dirPath) {
     $vars['filedetailurl'] = $config->getURL($rep, $path, 'file') . $passRevString;
     $vars['filedetaillink'] = '<a href="' . $vars['filedetailurl'] . '">' . $lang['FILEDETAIL'] . '</a>';
     $vars['blameurl'] = $config->getURL($rep, $path, 'blame') . $passRevString;
     $vars['blamelink'] = '<a href="' . $vars['blameurl'] . '">' . $lang['BLAME'] . '</a>';
 }
 if ($rep->isRssEnabled()) {
     $vars['rssurl'] = $config->getURL($rep, $path, 'rss') . ($peg ? 'peg=' . $peg : '');
     $vars['rsslink'] = '<a href="' . $vars['rssurl'] . '">' . $lang['RSSFEED'] . '</a>';
コード例 #3
0
ファイル: log.php プロジェクト: laiello/suitex
     }
 }
 // Find the parent path (or the whole path if it's already a directory)
 $pos = strrpos($rpath, '/');
 $parent = substr($rpath, 0, $pos + 1);
 $compareValue = ($isDir ? $parent : $rpath) . '@' . $thisrev;
 $listing[$index]['compare_box'] = '<input type="checkbox" name="compare[]" value="' . $compareValue . '" onclick="checkCB(this)" />';
 $url = $config->getURL($rep, $rpath, 'revision') . $thisRevString;
 $listing[$index]['revlink'] = '<a href="' . $url . '">' . $thisrev . '</a>';
 $url = $config->getURL($rep, $rpath, $isDir ? 'dir' : 'file') . $thisRevString;
 $listing[$index]['revpathlink'] = '<a href="' . $url . '">' . $rpath . '</a>';
 $listing[$index]['revpath'] = $rpath;
 $listing[$index]['revauthor'] = $revision->author;
 $listing[$index]['revdate'] = $revision->date;
 $listing[$index]['revage'] = $revision->age;
 $listing[$index]['revlog'] = nl2br($bugtraq->replaceIDs(create_anchors(xml_entities($revision->msg))));
 $listing[$index]['rowparity'] = $row;
 if ($showchanges) {
     // Aggregate added/deleted/modified paths for display in table
     $modpaths = array();
     foreach ($revision->mods as $mod) {
         $modpaths[$mod->action][] = $mod->path;
     }
     ksort($modpaths);
     foreach ($modpaths as $action => $paths) {
         sort($paths);
         $modpaths[$action] = $paths;
     }
     $listing[$index]['revadded'] = isset($modpaths['A']) ? implode('<br/>', $modpaths['A']) : '';
     $listing[$index]['revdeleted'] = isset($modpaths['D']) ? implode('<br/>', $modpaths['D']) : '';
     $listing[$index]['revmodified'] = isset($modpaths['M']) ? implode('<br/>', $modpaths['M']) : '';