]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
remove items from export - too much memory consumed, will have to stream items,photos
[friendica.git] / mod / settings.php
index 85029b3d729fd2d16391b4b62741cece0c881daf..b20f4d11b88a5ed2b3d4dd5c20ca9c5af97240b1 100644 (file)
@@ -5,6 +5,7 @@ function settings_init(&$a) {
        if(local_user()) {
                profile_load($a,$a->user['nickname']);
        }
+
 }
 
 
@@ -70,6 +71,7 @@ function settings_post(&$a) {
        $net_publish      = (((x($_POST,'profile_in_netdirectory')) && (intval($_POST['profile_in_netdirectory']) == 1)) ? 1: 0);
        $old_visibility   = (((x($_POST,'visibility')) && (intval($_POST['visibility']) == 1)) ? 1 : 0);
        $page_flags       = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0);
+       $blockwall        = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted!
 
        $notify = 0;
 
@@ -140,7 +142,7 @@ function settings_post(&$a) {
                        $openidserver = '';
        }
 
-       $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s',  `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s'  WHERE `uid` = %d LIMIT 1",
+       $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s',  `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d  WHERE `uid` = %d LIMIT 1",
                        dbesc($username),
                        dbesc($email),
                        dbesc($openid),
@@ -157,6 +159,7 @@ function settings_post(&$a) {
                        intval($maxreq),
                        intval($expire),
                        dbesc($openidserver),
+                       intval($blockwall),
                        intval(local_user())
        );
        if($r)
@@ -241,6 +244,7 @@ function settings_content(&$a) {
        $openid   = $a->user['openid'];
        $maxreq   = $a->user['maxreq'];
        $expire   = ((intval($a->user['expire'])) ? $a->user['expire'] : '');
+       $blockwall = $a->user['blockwall'];
 
        if(! strlen($a->user['timezone']))
                $timezone = date_default_timezone_get();
@@ -338,9 +342,13 @@ function settings_content(&$a) {
 
        $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
+       $uexport = '<div id="uexport-link"><a href="uexport" >' . t('Export Personal Data') . '</a></div>';
+
+
        $o .= replace_macros($stpl,array(
                '$baseurl' => $a->get_baseurl(),
                '$oidhtml' => $oidhtml,
+               '$uexport' => $uexport,
                '$uid' => local_user(),
                '$username' => $username,
                '$openid' => $openid,
@@ -362,6 +370,7 @@ function settings_content(&$a) {
                '$sel_notify5' => (($notify & NOTIFY_MAIL)    ? ' checked="checked" ' : ''),
                '$maxreq' => $maxreq,
                '$expire' => $expire,
+               '$blockw_checked' => (($blockwall) ? '' : ' checked="checked" ' ),
                '$theme' => $theme_selector,
                '$pagetype' => $pagetype
        ));