define ( 'FRIENDIKA_VERSION', '2.1.924' );
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
-define ( 'DB_UPDATE_VERSION', 1043 );
+define ( 'DB_UPDATE_VERSION', 1044 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
`sprvkey` text NOT NULL,
`verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
`blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
`notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
`page-flags` int(11) unsigned NOT NULL DEFAULT '0',
`pwdreset` char(255) NOT NULL,
else {
$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` LEFT JOIN `user` on `user`.`uid` = `contact`.`uid`
WHERE `contact`.`uid` = %d AND `contact`.`id` = %d AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- AND `readonly` = 0 AND ( `contact`.`rel` IN ( %d , %d ) OR `user`.`page-flags` = %d ) LIMIT 1",
+ AND `user`.`blockwall` = 0 AND `readonly` = 0 AND ( `contact`.`rel` IN ( %d , %d ) OR `user`.`page-flags` = %d ) LIMIT 1",
intval($owner),
intval(remote_user()),
intval(REL_VIP),
$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;
$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),
intval($maxreq),
intval($expire),
dbesc($openidserver),
+ intval($blockwall),
intval(local_user())
);
if($r)
$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();
'$sel_notify5' => (($notify & NOTIFY_MAIL) ? ' checked="checked" ' : ''),
'$maxreq' => $maxreq,
'$expire' => $expire,
+ '$blockw_checked' => (($blockwall) ? '' : ' checked="checked" ' ),
'$theme' => $theme_selector,
'$pagetype' => $pagetype
));
}
+function update_1043() {
+ q("ALTER TABLE `user` ADD `blockwall` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `blocked` ");
+}
</div>
<div id="settings-default-perms-end"></div>
+<div id="settings-blockw-wrapper" >
+<label id="settings-blockw-label" for="settings-blockw" >Allow friends to post to your profile: </label>
+<input type="checkbox" name="blockwall" id="settings-blockw" value="1" $blockw_checked />
+</div>
+<div id="settings-blockw-end" ></div>
+
+
+
<div id="settings-expire-desc">Automatically expire (delete) posts older than <input type="text" size="3" name="expire" value="$expire" /> days</div>
<div id="settings-expire-end"></div>
</div>
<div id="settings-default-perms-end"></div>
+<div id="settings-blockw-wrapper" >
+<label id="settings-blockw-label" for="settings-blockw" >Allow friends to post to your profile: </label>
+<input type="checkbox" name="blockwall" id="settings-blockw" value="1" $blockw_checked />
+</div>
+<div id="settings-blockw-end" ></div>
+
+
+
<div id="settings-expire-desc">Automatically expire (delete) posts older than <input type="text" size="3" name="expire" value="$expire" /> days</div>
<div id="settings-expire-end"></div>
</div>
<div id="settings-default-perms-end"></div>
+<div id="settings-blockw-wrapper" >
+<label id="settings-blockw-label" for="settings-blockw" >Allow friends to post to your profile: </label>
+<input type="checkbox" name="blockwall" id="settings-blockw" value="1" $blockw_checked />
+</div>
+<div id="settings-blockw-end" ></div>
+
+
<div id="settings-expire-desc">Automatically expire (delete) posts older than <input type="text" size="3" name="expire" value="$expire" /> days</div>
<div id="settings-expire-end"></div>
</div>
<div id="settings-default-perms-end"></div>
+<div id="settings-blockw-wrapper" >
+<label id="settings-blockw-label" for="settings-blockw" >Allow friends to post to your profile: </label>
+<input type="checkbox" name="blockwall" id="settings-blockw" value="1" $blockw_checked />
+</div>
+<div id="settings-blockw-end" ></div>
+
+
<div id="settings-expire-desc">Automatically expire (delete) posts older than <input type="text" size="3" name="expire" value="$expire" /> days</div>
<div id="settings-expire-end"></div>
</div>
<div id="settings-default-perms-end"></div>
+<div id="settings-blockw-wrapper" >
+<label id="settings-blockw-label" for="settings-blockw" >Allow friends to post to your profile: </label>
+<input type="checkbox" name="blockwall" id="settings-blockw" value="1" $blockw_checked />
+</div>
+<div id="settings-blockw-end" ></div>
+
+
+
<div id="settings-expire-desc">Automatically expire (delete) posts older than <input type="text" size="3" name="expire" value="$expire" /> days</div>
<div id="settings-expire-end"></div>
#settings-nick-end,
#settings-defloc-end,
#settings-allowloc-end,
+#settings-blockw-end,
#settings-timezone-end,
#settings-theme-end,
#settings-password-end,
#settings-nick-label,
#settings-defloc-label,
#settings-allowloc-label,
+#settings-blockw-label,
#settings-timezone-label,
#settings-theme-label,
#settings-password-label,
#settings-nick,
#settings-defloc,
#settings-allowloc,
+#settings-blockw,
#timezone-select,
#theme-select,
#settings-password,
#settings-nick-end,
#settings-defloc-end,
#settings-allowloc-end,
+#settings-blockw-end,
#settings-timezone-end,
#settings-theme-end,
#settings-password-end,
#settings-nick-label,
#settings-defloc-label,
#settings-allowloc-label,
+#settings-blockw-label,
#settings-timezone-label,
#settings-theme-label,
#settings-password-label,
#settings-nick,
#settings-defloc,
#settings-allowloc,
+#settings-blockw,
#timezone-select,
#theme-select,
#settings-password,