aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-07-04 07:37:06 +0200
committerChristian Weiske <cweiske@cweiske.de>2014-07-04 07:37:06 +0200
commit43ef6e8dfd4345262f7b974506261e0827bfecae (patch)
tree8caa1bbb422c4aef711d02d2dfc0d5a14d187d64 /src
parent227289a8fa6093f468290d4b3b68f6948f1a2b14 (diff)
parent239fca45d3685c2f3290015b49470f945648a8e5 (diff)
downloadphorkie-43ef6e8dfd4345262f7b974506261e0827bfecae.tar.gz
phorkie-43ef6e8dfd4345262f7b974506261e0827bfecae.zip
Merge remote-tracking branch 'origin/master'
Conflicts: src/phorkie/Renderer/Geshi.php src/phorkie/SetupCheck.php
Diffstat (limited to 'src')
-rw-r--r--src/phorkie/Renderer/Geshi.php2
-rw-r--r--src/phorkie/Repository/LinkbackReceiver.php15
2 files changed, 12 insertions, 5 deletions
diff --git a/src/phorkie/Renderer/Geshi.php b/src/phorkie/Renderer/Geshi.php
index c422716..0c545ed 100644
--- a/src/phorkie/Renderer/Geshi.php
+++ b/src/phorkie/Renderer/Geshi.php
@@ -15,7 +15,7 @@ class Renderer_Geshi
{
/**
* 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'];
diff --git a/src/phorkie/Repository/LinkbackReceiver.php b/src/phorkie/Repository/LinkbackReceiver.php
index c9b3d03..c808f45 100644
--- a/src/phorkie/Repository/LinkbackReceiver.php
+++ b/src/phorkie/Repository/LinkbackReceiver.php
@@ -120,13 +120,19 @@ class Repository_LinkbackReceiver
*/
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);
@@ -136,7 +142,8 @@ class Repository_LinkbackReceiver
$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);