aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-28 11:09:22 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-28 11:09:22 +0200
commit9f576369a97009bc93f4f724f85024410c3899df (patch)
treeadc2c68e8729ff783eca9cd259bc5b8fe394d2e6 /include
parent911510f9996dc43bd3440884325326b7e99ea12f (diff)
parent7d7f43c2056fd50ff26aed5df553bf4936ead196 (diff)
downloadvolse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.tar.gz
volse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.tar.bz2
volse-hubzilla-9f576369a97009bc93f4f724f85024410c3899df.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include')
-rw-r--r--include/account.php18
-rw-r--r--include/js_strings.php8
-rw-r--r--include/nav.php4
-rw-r--r--include/network.php7
4 files changed, 30 insertions, 7 deletions
diff --git a/include/account.php b/include/account.php
index caf12878e..c02a74928 100644
--- a/include/account.php
+++ b/include/account.php
@@ -499,11 +499,27 @@ function account_approve($hash) {
intval($register[0]['uid'])
);
+ // get a fresh copy after we've modified it.
+
+ $account = q("SELECT * FROM account WHERE account_id = %d LIMIT 1",
+ intval($register[0]['uid'])
+ );
+
+ if(! $account)
+ return $ret;
+
+
+
if(get_config('system','auto_channel_create') || UNO)
auto_channel_create($register[0]['uid']);
+ else {
+ $_SESSION['login_return_url'] = 'new_channel';
+ authenticate_success($account[0],true,true,false,true);
+ }
+
- info( t('Account verified. Please login.') . EOL );
+ // info( t('Account verified. Please login.') . EOL );
return true;
}
diff --git a/include/js_strings.php b/include/js_strings.php
index b1817f373..1b4668061 100644
--- a/include/js_strings.php
+++ b/include/js_strings.php
@@ -4,10 +4,10 @@ function js_strings() {
return replace_macros(get_markup_template('js_strings.tpl'), array(
'$delitem' => t('Delete this item?'),
'$comment' => t('Comment'),
- '$showmore' => t('[+] show all'),
- '$showfewer' => t('[-] show less'),
- '$divgrowmore' => t('[+] expand'),
- '$divgrowless' => t('[-] collapse'),
+ '$showmore' => sprintf( t('%s show all'), '<i class=\'fa fa-chevron-down\'></i>'),
+ '$showfewer' => sprintf( t('%s show less'), '<i class=\'fa fa-chevron-up\'></i>'),
+ '$divgrowmore' => sprintf( t('%s expand'), '<i class=\'fa fa-chevron-down\'></i>'),
+ '$divgrowless' => sprintf( t('%s collapse'),'<i class=\'fa fa-chevron-up\'></i>'),
'$pwshort' => t("Password too short"),
'$pwnomatch' => t("Passwords do not match"),
'$everybody' => t('everybody'),
diff --git a/include/nav.php b/include/nav.php
index 70faec598..21e9d2c3a 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -126,7 +126,7 @@ EOT;
$nav['lock'] = array('logout','','lock',
sprintf( t('%s - click to logout'), $observer['xchan_addr']));
}
- else {
+ elseif(! $_SESSION['authenticated']) {
$nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn');
}
@@ -143,7 +143,7 @@ EOT;
if((App::$module != 'home') && (! (local_channel())))
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
- if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel()))
+ if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! $_SESSION['authenticated']))
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
if(! get_config('system','hide_help')) {
diff --git a/include/network.php b/include/network.php
index 96bf714f6..47863b680 100644
--- a/include/network.php
+++ b/include/network.php
@@ -101,6 +101,9 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
if(x($opts,'cookiefile'))
@curl_setopt($ch, CURLOPT_COOKIEFILE, $opts['cookiefile']);
+ if(x($opts,'cookie'))
+ @curl_setopt($ch, CURLOPT_COOKIE, $opts['cookie']);
+
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,
((x($opts,'novalidate') && intval($opts['novalidate'])) ? false : true));
@@ -258,6 +261,10 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
if(x($opts,'cookiefile'))
@curl_setopt($ch, CURLOPT_COOKIEFILE, $opts['cookiefile']);
+
+ if(x($opts,'cookie'))
+ @curl_setopt($ch, CURLOPT_COOKIE, $opts['cookie']);
+
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,
((x($opts,'novalidate') && intval($opts['novalidate'])) ? false : true));