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:
Michael Vogel 2018-07-19 15:52:05 +02:00 committed by Hypolite Petovan
parent 0b38f1c58b
commit 5af9596dde
29 changed files with 222 additions and 145 deletions

View file

@ -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")) {