Pastoid

Get all Habari Plugin and Theme revisions by trunk and tag

The page you are looking at now is at this URL: http://pastoid.com/bxh

This paste was last updated on September 23, 2009 at 10:50 pm.

Pasted Coderaw

<?php
 
function listrevs($section)
{
	$output = array();
	$list = shell_exec('svn ls http://svn.habariproject.org/habari-extras/' . $section);
 
	$list = explode("\n", $list);
 
	foreach($list as $plugin) {
		$ls = shell_exec('svn ls --verbose http://svn.habariproject.org/habari-extras/' . $section . '/' . $plugin . 'trunk');
 
		preg_match('%^\s*(\d+)%', $ls, $matches);
		$rev = intval($matches[1]);
 
		if($rev != 0) {
			$output[$section][trim($plugin, '/')]['trunk'] = $rev;
		}
 
		$list2 = shell_exec('svn ls http://svn.habariproject.org/habari-extras/' . $section . '/' . $plugin . 'tags');
		$list2 = explode("\n", $list2);
 
		foreach($list2 as $tag) {
			if($tag == '') continue;
			$ls = shell_exec('svn ls --verbose http://svn.habariproject.org/habari-extras/' . $section . '/' . $plugin . 'tags/' . $tag);
 
			preg_match('%^\s*(\d+)%', $ls, $matches);
			$rev = intval($matches[1]);
 
			$output[$section][trim($plugin, '/')][trim($tag, '/')] = $rev;
		}
	}
 
	return $output;
}
 
$plugins = listrevs('plugins');
$themes = listrevs('themes'); 
 
$addons = array_merge($plugins, $themes);
 
print_r($addons);
 
?>
 
 

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
pastoid.com 6
Is this paste spam?
<Hide