fix 500 error on redirect

This commit is contained in:
Joshua P Panter 2019-12-06 21:31:44 -05:00
parent 05d806fc00
commit 33a551c1b1
No known key found for this signature in database
GPG Key ID: 59903022E9AC64FC
2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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 <ian.barber@gmail.com>
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 ************************/