diff options
| -rw-r--r-- | README.rst | 9 | ||||
| -rw-r--r-- | data/config.default.php | 1 | ||||
| -rw-r--r-- | src/phorkie/Renderer/Geshi.php | 2 | ||||
| -rw-r--r-- | src/phorkie/Repository/LinkbackReceiver.php | 15 | ||||
| -rw-r--r-- | www/www-header.php | 2 |
5 files changed, 16 insertions, 13 deletions
@@ -98,8 +98,8 @@ on your machine: $ 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 @@ -110,11 +110,6 @@ on your machine: $ 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 diff --git a/data/config.default.php b/data/config.default.php index 22bbc4a..2e588fa 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -20,7 +20,6 @@ $GLOBALS['phorkie']['cfg'] = array( 'topbar' => '', 'setupcheck' => true, 'elasticsearch' => null, - 'geshi' => 'MediaWiki/geshi/geshi/geshi.php', 'index' => 'new',//"new" or "list" 'perPage' => 10, 'defaultListPage' => 'last',//a number or "last" 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); diff --git a/www/www-header.php b/www/www-header.php index 94ee1d7..3fa4e0e 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -1,5 +1,7 @@ <?php namespace phorkie; +error_reporting(error_reporting() & ~E_STRICT); +session_set_cookie_params(14 * 86400);//2 weeks session expiry time session_start(); require_once __DIR__ . '/../src/phorkie/autoload.php'; |
