From 33a551c1b12856111ec44740482e738d87d85200 Mon Sep 17 00:00:00 2001 From: Joshua P Panter Date: Fri, 6 Dec 2019 21:31:44 -0500 Subject: [PATCH] fix 500 error on redirect --- README.md | 2 +- authMgrPlus/plugin.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0a7ff1f..68d8555 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Features Requirements ------------ -- YOURLS 1.7.3 +- YOURLS 1.7.3 + - Incompatable Plugins: - nicwaller's [`authmgr`](https://github.com/nicwaller/yourls-authmgr-plugin) - Ian Barber's [`Seperate Users`](https://github.com/ianbarber/Yourls-Separate-Users) diff --git a/authMgrPlus/plugin.php b/authMgrPlus/plugin.php index 58ef7e9..ae507ad 100644 --- a/authMgrPlus/plugin.php +++ b/authMgrPlus/plugin.php @@ -3,7 +3,7 @@ Plugin Name: Auth Manager Plus Plugin URI: https://github.com/joshp23/YOURLS-AuthMgrPlus Description: Role Based Access Controlls with seperated user data for authenticated users -Version: 2.1.0 +Version: 2.1.1 Author: Josh Panter, nicwaller, Ian Barber Author URI: https://unfettered.net */ @@ -352,11 +352,11 @@ function amp_get_db_stats( $return, $where ) { // Fine tune track-me-not yourls_add_action('redirect_shorturl', 'amp_tracking'); -function amp_tracking( $u, $k ) { +function amp_tracking( $u, $k = false ) { if( amp_is_valid_user() && ( amp_keyword_owner($k) || amp_have_capability( ampCap::Traceless ) ) ) { // No logging - yourls_add_filter( 'shunt_update_clicks', function( $u, $k ) { return true; } ); - yourls_add_filter( 'shunt_log_redirect', function( $u, $k ) { return true; } ); + yourls_add_filter( 'shunt_update_clicks', function( ) { return true; } ); + yourls_add_filter( 'shunt_log_redirect', function( ) { return true; } ); } } /********************* HOUSEKEEPING ************************/