Why not use:
common_config('site', 'ssl) like all the other places config's are used?
Actually now looking through, common_config and global $config; are both used.
Is there a preference of one over another? (should it be standardized?)
-Eric Helgeson
PS +1 on the ssl patch
On Mon, Mar 9, 2009 at 11:48 AM, Sean Allin <[email protected]> wrote:
> 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
>
> _______________________________________________
> Laconica-dev mailing list
> [email protected]
> http://mail.laconi.ca/mailman/listinfo/laconica-dev
>
>
_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev