Still learning how to use the gitorious website.
Patch adds a configuration option to allow use of https


---
 config.php.sample |    1 +
 lib/util.php      |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/config.php.sample b/config.php.sample
index efb5aa4..2ad5711 100644
--- a/config.php.sample
+++ b/config.php.sample
@@ -15,6 +15,7 @@ if (!defined('LACONICA')) { exit(1); }

 $config['site']['name'] = 'Just another Laconica microblog';
 $config['site']['server'] = 'localhost';
+$config['site']['ssl'] = false;
 $config['site']['path'] = 'laconica';
 #$config['site']['fancy'] = false;
 #$config['site']['theme'] = 'default';
diff --git a/lib/util.php b/lib/util.php
index 5204693..d0cccb4 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -945,7 +945,11 @@ function common_path($relative)
 {
     global $config;
     $pathpart = ($config['site']['path']) ? $config['site']['path']."/" : '';
-    return "http://".$config['site']['server'].'/'.$pathpart.$relative;
+    if($config['site']['ssl']==true) {
+      return "https://".$config['site']['server'].'/'.$pathpart.$relative;
+    } else {
+      return "http://".$config['site']['server'].'/'.$pathpart.$relative;
+    }
 }

 function common_date_string($dt)
--
1.5.5.6

--
Sean Allin
SPAWAR Network Security, Contractor
SAIC IISBU
SSC San Diego Tel# 619-553-5869

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to