Revert to stable version 3.5.4

This commit is contained in:
Hypolite Petovan 2018-02-11 19:00:01 -05:00
parent 38db18b624
commit 5360f08f42
355 changed files with 21449 additions and 4957 deletions

View file

@ -4,10 +4,9 @@
* Description: Set a preferred page to load on login from home page
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*
*/
use Friendica\Core\PConfig;
function startpage_install() {
register_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
@ -28,9 +27,12 @@ function startpage_home_init($a, $b) {
if(! local_user())
return;
$page = PConfig::get(local_user(),'startpage','startpage');
$page = get_pconfig(local_user(),'startpage','startpage');
if(strlen($page)) {
goaway($page);
$slash = ((strpos($page,'/') === 0) ? true : false);
if(stristr($page,'://'))
goaway($page);
goaway($a->get_baseurl() . (($slash) ? '' : '/') . $page);
}
return;
}
@ -48,13 +50,13 @@ function startpage_settings_post($a,$post) {
if(! local_user())
return;
if($_POST['startpage-submit'])
PConfig::set(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage'])));
set_pconfig(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage'])));
}
/**
*
* Called from the Plugin Setting form.
* Called from the Plugin Setting form.
* Add our own settings info to the page.
*
*/
@ -72,7 +74,7 @@ function startpage_settings(&$a,&$s) {
/* Get the current state of our config variable */
$page = PConfig::get(local_user(),'startpage','startpage');
$page = get_pconfig(local_user(),'startpage','startpage');
/* Add some HTML to the existing form */