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
|
@ -1035,7 +1035,6 @@ function api_statuses_mediap($type)
|
|||
}
|
||||
$user_info = api_get_user($a);
|
||||
|
||||
$_REQUEST['type'] = 'wall';
|
||||
$_REQUEST['profile_uid'] = api_user();
|
||||
$_REQUEST['api_source'] = true;
|
||||
$txt = requestdata('status');
|
||||
|
@ -1124,9 +1123,7 @@ function api_statuses_update($type)
|
|||
}
|
||||
$_REQUEST['profile_uid'] = api_user();
|
||||
|
||||
if ($parent) {
|
||||
$_REQUEST['type'] = 'net-comment';
|
||||
} else {
|
||||
if (!$parent) {
|
||||
// Check for throttling (maximum posts per day, week and month)
|
||||
$throttle_day = Config::get('system', 'throttle_limit_day');
|
||||
if ($throttle_day > 0) {
|
||||
|
@ -1169,8 +1166,6 @@ function api_statuses_update($type)
|
|||
throw new TooManyRequestsException(L10n::t("Monthly posting limit of %d post reached. The post was rejected.", "Monthly posting limit of %d posts reached. The post was rejected.", $throttle_month));
|
||||
}
|
||||
}
|
||||
|
||||
$_REQUEST['type'] = 'wall';
|
||||
}
|
||||
|
||||
if (x($_FILES, 'media')) {
|
||||
|
@ -1992,7 +1987,6 @@ function api_statuses_repeat($type)
|
|||
}
|
||||
$_REQUEST['body'] = $post;
|
||||
$_REQUEST['profile_uid'] = api_user();
|
||||
$_REQUEST['type'] = 'wall';
|
||||
$_REQUEST['api_source'] = true;
|
||||
|
||||
if (!x($_REQUEST, "source")) {
|
||||
|
|
|
@ -1149,7 +1149,8 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
|
|||
'$wait' => L10n::t('Please wait'),
|
||||
'$permset' => L10n::t('Permission settings'),
|
||||
'$shortpermset' => L10n::t('permissions'),
|
||||
'$ptyp' => $notes_cid ? 'note' : 'wall',
|
||||
'$wall' => $notes_cid ? 0 : 1,
|
||||
'$posttype' => $notes_cid ? Item::PT_PERSONAL_NOTE : Item::PT_ARTICLE,
|
||||
'$content' => defaults($x, 'content', ''),
|
||||
'$post_id' => defaults($x, 'post_id', ''),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue