New item field "Post-type" and new table "permissionset" (#5408)
* "post-type" replaces "bookmark" and "type" * Removed some more type * Added index to permission set * The permission set is now stored * The permission set is now removed upon expiry * Post update now stores the permission set * New file * Permissions are now sorted * Changed documentation
This commit is contained in:
parent
0b38f1c58b
commit
5af9596dde
29 changed files with 222 additions and 145 deletions
|
@ -21,7 +21,7 @@ function oexchange_init(App $a) {
|
|||
|
||||
function oexchange_content(App $a) {
|
||||
|
||||
if (! local_user()) {
|
||||
if (!local_user()) {
|
||||
$o = Login::form();
|
||||
return $o;
|
||||
}
|
||||
|
@ -31,27 +31,26 @@ function oexchange_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url']))
|
||||
$url = ((x($_REQUEST,'url') && strlen($_REQUEST['url']))
|
||||
? urlencode(notags(trim($_REQUEST['url']))) : '');
|
||||
$title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title']))
|
||||
$title = ((x($_REQUEST,'title') && strlen($_REQUEST['title']))
|
||||
? '&title=' . urlencode(notags(trim($_REQUEST['title']))) : '');
|
||||
$description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description']))
|
||||
$description = ((x($_REQUEST,'description') && strlen($_REQUEST['description']))
|
||||
? '&description=' . urlencode(notags(trim($_REQUEST['description']))) : '');
|
||||
$tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
|
||||
$tags = ((x($_REQUEST,'tags') && strlen($_REQUEST['tags']))
|
||||
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
|
||||
|
||||
$s = Network::fetchUrl(System::baseUrl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
|
||||
|
||||
if (! strlen($s)) {
|
||||
if (!strlen($s)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$post = [];
|
||||
|
||||
$post['profile_uid'] = local_user();
|
||||
$post['return'] = '/oexchange/done' ;
|
||||
$post['return'] = '/oexchange/done';
|
||||
$post['body'] = Friendica\Content\Text\HTML::toBBCode($s);
|
||||
$post['type'] = 'wall';
|
||||
|
||||
$_REQUEST = $post;
|
||||
require_once('mod/item.php');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue