mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
fixes #2364 redesign admin comments management
Replaces legacy PHP comment management with a new interface for listing, filtering, selecting, validating, and deleting user comments. Updates templates and CSS for a modern, interactive experience, adds advanced filters, selection mode, and modal comment viewing. Removes obsolete server-side logic from comments.php and introduces new api methods for comment actions.
This commit is contained in:
@@ -1623,6 +1623,85 @@ enabled_high, registration_date, registration_date_string, registration_date_sin
|
||||
$ws_functions_root . 'pwg.users.php',
|
||||
array('admin_only'=>false, 'post_only'=>true)
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.userComments.getList',
|
||||
'ws_userComments_getList',
|
||||
array(
|
||||
'status' => array(
|
||||
'default' => 'all',
|
||||
'info' => 'must be: all, validated or pending'
|
||||
),
|
||||
'search' => array(
|
||||
'default' => null,
|
||||
'info' => 'All other parameters are not used during a search.'
|
||||
),
|
||||
'author_id' => array(
|
||||
'flags' => WS_PARAM_OPTIONAL,
|
||||
'type' => WS_TYPE_ID,
|
||||
),
|
||||
'image_id' => array(
|
||||
'flags' => WS_PARAM_OPTIONAL,
|
||||
'type' => WS_TYPE_ID,
|
||||
),
|
||||
'f_min_date' => array(
|
||||
'default' => null
|
||||
),
|
||||
'f_max_date' => array(
|
||||
'default' => null
|
||||
),
|
||||
'page' => array(
|
||||
'default' => 0,
|
||||
'type' => WS_TYPE_INT | WS_TYPE_POSITIVE
|
||||
),
|
||||
'per_page' => array(
|
||||
'default' => $conf['comments_page_nb_comments'],
|
||||
'type' => WS_TYPE_INT | WS_TYPE_POSITIVE
|
||||
)
|
||||
),
|
||||
'Get comments',
|
||||
$ws_functions_root . 'pwg.comments.php',
|
||||
array(
|
||||
'admin_only' => true,
|
||||
'post_only' => false
|
||||
)
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.userComments.delete',
|
||||
'ws_userComments_delete',
|
||||
array(
|
||||
'comment_id' => array(
|
||||
'flags' => WS_PARAM_FORCE_ARRAY,
|
||||
'type' => WS_TYPE_INT | WS_TYPE_POSITIVE,
|
||||
),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'Delete comments',
|
||||
$ws_functions_root . 'pwg.comments.php',
|
||||
array(
|
||||
'admin_only'=>true,
|
||||
'post_only'=>true
|
||||
)
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.userComments.validate',
|
||||
'ws_userComments_validate',
|
||||
array(
|
||||
'comment_id' => array(
|
||||
'flags' => WS_PARAM_FORCE_ARRAY,
|
||||
'type' => WS_TYPE_INT | WS_TYPE_POSITIVE,
|
||||
),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'Validate comments',
|
||||
$ws_functions_root . 'pwg.comments.php',
|
||||
array(
|
||||
'admin_only'=>true,
|
||||
'post_only'=>true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user