beber pushed a commit to branch master.

http://git.enlightenment.org/website/www.git/commit/?id=ccab81e1b29b379da78ce6d04dc47d799956f94c

commit ccab81e1b29b379da78ce6d04dc47d799956f94c
Author: Bertrand Jacquin <bertr...@jacquin.bzh>
Date:   Tue Apr 14 02:29:19 2015 +0100

    MEDIUM: gitbacked: Move back GIT_AUTHOR_* and SSH_AUTH_SOCK to
    lib/plugins/gitbacked/conf/default.php
    
    $GLOBALS['USERINFO'] is not yet available in conf/local.php
---
 public_html/conf/local.php                         | 19 -------------------
 public_html/lib/plugins/gitbacked/conf/default.php | 21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/public_html/conf/local.php b/public_html/conf/local.php
index 423a1fa..ba813d6 100644
--- a/public_html/conf/local.php
+++ b/public_html/conf/local.php
@@ -55,22 +55,3 @@ $conf['plugin']['gitbacked']['repoWorkDir'] = 
'data/www-content/tmp';
 $conf['tpl']['dokui']['hide-entry-title'] = '1';
 $conf['datadir'] = $_SERVER['DOCUMENT_ROOT'] . '/data/www-content/pages';
 $conf['mediadir'] = $_SERVER['DOCUMENT_ROOT'] . '/data/www-content/media';
-
-/* plugin/gitbacked: Define a nice author (until addParams is fixed) */
-$_git_auhor_name = 'www.enlightenment.org';
-$_git_auhor_mail = 'no-re...@enlightenment.org';
-
-if (isset($GLOBALS['USERINFO']['name'])) {
-  $_git_auhor_name = $GLOBALS['USERINFO']['name'];
-}
-
-if (isset($GLOBALS['USERINFO']['mail'])) {
-  $_git_auhor_mail = $GLOBALS['USERINFO']['mail'];
-}
-
-putenv("GIT_AUTHOR_NAME='$_git_auhor_name'");
-putenv("GIT_AUTHOR_EMAIL='$_git_auhor_mail'");
-
-/* plugin/gitbacked: Let access to ssh-agent */
-putenv("HOME=" . dirname($_SERVER['DOCUMENT_ROOT']));
-putenv("SSH_AUTH_SOCK=" . dirname($_SERVER['DOCUMENT_ROOT']) . "/.ssh/agent");
diff --git a/public_html/lib/plugins/gitbacked/conf/default.php 
b/public_html/lib/plugins/gitbacked/conf/default.php
index 9890ef1..319a31e 100644
--- a/public_html/lib/plugins/gitbacked/conf/default.php
+++ b/public_html/lib/plugins/gitbacked/conf/default.php
@@ -15,3 +15,24 @@ $conf['commitMediaMsgDel']   = 'Wiki media %media% deleted 
by %user%';
 $conf['repoPath']      = $GLOBALS['conf']['savedir'];
 $conf['repoWorkDir']   = $GLOBALS['conf']['savedir'];
 $conf['addParams'] = '';
+
+/* plugin/gitbacked: Define a nice author (until addParams is fixed)
+ * MUST NOT be defined in conf/local.php as $GLOBALS['USERINFO'] does not yet 
exist there
+ */
+$_git_auhor_name = 'www.enlightenment.org';
+$_git_auhor_mail = 'no-re...@enlightenment.org';
+
+if (isset($GLOBALS['USERINFO']['name'])) {
+  $_git_auhor_name = $GLOBALS['USERINFO']['name'];
+}
+
+if (isset($GLOBALS['USERINFO']['mail'])) {
+  $_git_auhor_mail = $GLOBALS['USERINFO']['mail'];
+}
+
+putenv("GIT_AUTHOR_NAME='$_git_auhor_name'");
+putenv("GIT_AUTHOR_EMAIL='$_git_auhor_mail'");
+
+/* plugin/gitbacked: Let access to ssh-agent */
+putenv("HOME=" . dirname($_SERVER['DOCUMENT_ROOT']));
+putenv("SSH_AUTH_SOCK=" . dirname($_SERVER['DOCUMENT_ROOT']) . "/.ssh/agent");

-- 


Reply via email to