Skip to content

Commit

Permalink
Fake the DiscussionsController & comment out problematic code for later
Browse files Browse the repository at this point in the history
  • Loading branch information
linc committed Apr 11, 2012
1 parent cfa33be commit 4615a59
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Glue/class.glue.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function DiscussionController_BeforeCommentDisplay_Handler($Sender, $Args
* Get Guest user data for discussions view.
*/
public function DiscussionsController_BeforeDiscussionName_Handler($Sender, $Args) {
$this->LastGuestUser($Args);
//$this->LastGuestUser($Args);
}

/**
Expand Down
13 changes: 13 additions & 0 deletions wp-content/plugins/glue/vanilla.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
// Include the bootstrap to configure the framework.
require_once(PATH_ROOT.'/bootstrap.php');

$Dispatcher = Gdn::Dispatcher();

$EnabledApplications = Gdn::ApplicationManager()->EnabledApplicationFolders();
$Dispatcher->EnabledApplicationFolders($EnabledApplications);
$Dispatcher->PassProperty('EnabledApplications', $EnabledApplications);

// 4. Fake the DiscussionsController
$Dispatcher->Start();
$Controller = new DiscussionsController();
Gdn::Controller($Controller);
//$Dispatcher->Dispatch();
//$Dispatcher->Cleanup();

// Define Vanilla's database prefix for easy access
$Prefix = Gdn::Config('Database.DatabasePrefix');
define('VANILLA_PREFIX', $Prefix);
Expand Down

0 comments on commit 4615a59

Please sign in to comment.