summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-06-15 12:09:20 (GMT)
committerNathaniel Catchpole2017-06-15 12:09:20 (GMT)
commit950362eb48f9e820ad31956e1b8e2dd5e754f9cc (patch)
treec862c49b04acdf00ab4a4bc712533f4cade686ea
parentc53b32284783d9f3c188116b0985caa680cabc55 (diff)
Issue #2550581 by harsha012, Jeremy, gaurav.kapoor, Jo Fitzgerald, xjm, Mile23, catch: Deprecate unused functions _tracker_myrecent_access and _tracker_user_access
-rw-r--r--core/modules/tracker/tracker.module18
-rw-r--r--core/modules/tracker/tracker.pages.inc2
2 files changed, 14 insertions, 6 deletions
diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module
index dbde704..bf40dc1 100644
--- a/core/modules/tracker/tracker.module
+++ b/core/modules/tracker/tracker.module
@@ -135,16 +135,21 @@ function tracker_cron() {
/**
* Access callback: Determines access permission for a user's own account.
*
+ * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. As
+ * internal API, _tracker_user_access() may also be removed in a minor
+ * release.
+ *
+ * @internal
+ *
* @param \Drupal\Core\Session\AccountInterface $account
* The user account to track.
*
* @return bool
* TRUE if a user is accessing tracking info for their own account and
* has permission to access the content.
- *
- * @see tracker_menu()
*/
function _tracker_myrecent_access(AccountInterface $account) {
+ @trigger_error('_tracker_myrecent_access() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.', E_USER_DEPRECATED);
// This path is only allowed for authenticated users looking at their own content.
return $account->id() && (\Drupal::currentUser()->id() == $account->id()) && $account->hasPermission('access content');
}
@@ -152,16 +157,21 @@ function _tracker_myrecent_access(AccountInterface $account) {
/**
* Access callback: Determines access permission for an account.
*
+ * @deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. As
+ * internal API, _tracker_user_access() may also be removed in a minor
+ * release.
+ *
+ * @internal
+ *
* @param int $account
* The user account ID to track.
*
* @return bool
* TRUE if a user has permission to access the account for $account and
* has permission to access the content.
- *
- * @see tracker_menu()
*/
function _tracker_user_access($account) {
+ @trigger_error('_tracker_user_access() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.', E_USER_DEPRECATED);
return $account->access('view') && $account->hasPermission('access content');
}
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index 76a775f..de08c63 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -19,8 +19,6 @@ use Drupal\node\Entity\Node;
*
* @return array
* A renderable array.
- *
- * @see tracker_menu()
*/
function tracker_page($account = NULL) {
if ($account) {