$ pear channel-discover pear.twig-project.org
$ pear install twig/Twig
- $ pear channel-discover mediawiki.googlecode.com/svn
- $ pear install mediawiki/geshi
+ $ pear channel-discover pear.geshi.org
+ $ pear install geshi/geshi
$ pear channel-discover zustellzentrum.cweiske.de
$ pear install zz/mime_type_plaindetect-alpha
$ pear channel-discover pear2.php.net
$ pear install pear2/pear2_services_linkback-alpha
-Note that this version of GeSHi is a bit outdated, but it's the fastest
-way to install it.
-If you install it manually be sure to update the
-path from ``data/config.default.php``.
-
======
Search
{
/**
* Yes, geshi needs to be in your include path
- * We use the mediawiki geshi extension package.
+ * We use the geshi pear package.
*/
if (!class_exists('\\geshi', true)) {
require_once $GLOBALS['phorkie']['cfg']['geshi'];
*/
protected function localizeGitUrls($arGitUrls)
{
- $pub = $GLOBALS['phorkie']['cfg']['git']['public'];
- $pri = $GLOBALS['phorkie']['cfg']['git']['private'];
+ $pub = $pri = null;
+ if (isset($GLOBALS['phorkie']['cfg']['git']['public'])) {
+ $pub = $GLOBALS['phorkie']['cfg']['git']['public'];
+ }
+ if (isset($GLOBALS['phorkie']['cfg']['git']['private'])) {
+ $pri = $GLOBALS['phorkie']['cfg']['git']['private'];
+ }
$arRemoteCloneUrls = array();
foreach ($arGitUrls as $remoteTitle => $arUrls) {
foreach ($arUrls as $remoteCloneUrl) {
- if (substr($remoteCloneUrl, 0, strlen($pub)) == $pub
+ if ($pub !== null
+ && substr($remoteCloneUrl, 0, strlen($pub)) == $pub
&& substr($remoteCloneUrl, -4) == '.git'
) {
$id = substr($remoteCloneUrl, strlen($pub), -4);
$arRemoteCloneUrls[$repo->gitDir] = $remoteTitle;
} catch (Exception $e) {
}
- } else if (substr($remoteCloneUrl, 0, strlen($pri)) == $pri
+ } else if ($pri !== null
+ && substr($remoteCloneUrl, 0, strlen($pri)) == $pri
&& substr($remoteCloneUrl, -4) == '.git'
) {
$id = substr($remoteCloneUrl, strlen($pri), -4);