Source of file DisqusCMSActionExtension.php
Size: 0,720 Bytes - Last Modified: 2021-12-23T10:36:37+00:00
/var/www/docs.ssmods.com/process/src/code/DisqusCMSActionExtension.php
12345678910111213141516171819202122232425262728293031 | <?php /** * Adds a function to LeftAndMain to sync disqus comments. * * @package silverstripe-disqus-module * @author Pavol Ondráš <admin_silverstripe.sk> * @notice SilverStripe.sk is not affiliated with the company SilverStripe Ltd. * @date April 2011 */ class DisqusCMSActionExtension extends LeftAndMainExtension { private static $allowed_actions = array( 'syncAllCommentsAction' ); function syncCommentsAction() { $id = (int)$_REQUEST['ID']; $page = Page::get()->byID($id); DisqusSync::sync($page->disqusIdentifier()); $this->owner->response->addHeader('X-Status', sprintf('Synced successfuly')); return; } } // EOF |