Skip to content

Commit

Permalink
Revert userswitcher change that shouldn't have been committed yet. Co…
Browse files Browse the repository at this point in the history
…nditionally load Slack class only when settings complete.
  • Loading branch information
adrianbj committed Oct 18, 2022
1 parent 8fa4369 commit 8f7e4c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TracyDebugger.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getModuleInfo() {
'summary' => __('Tracy debugger from Nette with many PW specific custom tools.', __FILE__),
'author' => 'Adrian Jones',
'href' => 'https://processwire.com/talk/forum/58-tracy-debugger/',
'version' => '4.23.35',
'version' => '4.23.36',
'autoload' => 100000, // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
'singular' => true,
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',
Expand Down Expand Up @@ -1412,7 +1412,9 @@ function bsZIndex() {
$m->send();
};

require_once __DIR__ . '/includes/SlackLogger.php';
if($this->data['slackChannel'] != '' && $this->data['slackAppOauthToken'] != '') {
require_once __DIR__ . '/includes/SlackLogger.php';
}
}
}

Expand Down Expand Up @@ -1673,7 +1675,7 @@ public function ready() {
// process userSwitcher if panel open and switch initiated
if(in_array('userSwitcher', static::$showPanels) && $this->wire('input')->post->userSwitcher) {
// if user is superuser and session length is set, save to config settings
if(static::$allowedSuperuser && ($this->wire('input')->post->userSwitcher || $this->wire('input')->post->logoutUserSwitcher) && $this->wire('session')->CSRF->validate()) {
if(static::$allowedSuperuser && $this->wire('input')->post->submitUserSwitcher && $this->wire('session')->CSRF->validate()) {
// cleanup expired sessions
if(isset($this->data['userSwitchSession'])) {
foreach($this->data['userSwitchSession'] as $id => $expireTime) {
Expand Down

0 comments on commit 8f7e4c7

Please sign in to comment.