Merge remote-tracking branch 'origin/master'
authorChristian Weiske <cweiske@cweiske.de>
Fri, 4 Jul 2014 05:37:06 +0000 (07:37 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 4 Jul 2014 05:37:06 +0000 (07:37 +0200)
Conflicts:
src/phorkie/Renderer/Geshi.php
src/phorkie/SetupCheck.php

README.rst
data/config.default.php
src/phorkie/Renderer/Geshi.php
src/phorkie/Repository/LinkbackReceiver.php
www/www-header.php

index 1270c30b5cc520ac7473a6b2da2f2a2d15936d98..043c438e52804fbc269ee172ae377db575f536f4 100644 (file)
@@ -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
index 22bbc4a7eba573d52b94a794ac6011210a9c2fca..2e588fadc39fb8a93a68bfade175f5285d899e6d 100644 (file)
@@ -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"
index c4227161a91d72448891be6cd2714ee26139ccdf..0c545ed5dff3e9d674959eb9e2f07566a991a99c 100644 (file)
@@ -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'];
index c9b3d0369422b9193e09073f2488f8c56bed3878..c808f4587352c9a8c8d7e1f444d14a9842c687af 100644 (file)
@@ -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);
index 94ee1d7e658424d160f58aa803b4289988bb5b2c..3fa4e0e7ba6e05b38d10cf9ffb4d41ff5ffdb525 100644 (file)
@@ -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';