X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdoc.php;h=d897b4e58c5131d452066c57c52a58a456847bd9;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=d59c63631a4c02049f8b29ae4042c4ee37110b65;hpb=ffcdd14940e0a10a40b292378ccabf51d4a04cff;p=quix0rs-gnu-social.git diff --git a/actions/doc.php b/actions/doc.php index d59c63631a..d897b4e58c 100644 --- a/actions/doc.php +++ b/actions/doc.php @@ -28,9 +28,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Documentation class. @@ -42,16 +40,14 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ -class DocAction extends Action +class DocAction extends ManagedAction { var $output = null; var $filename = null; var $title = null; - function prepare(array $args=array()) + protected function doPreparation() { - parent::prepare($args); - $this->title = $this->trimmed('title'); if (!preg_match('/^[a-zA-Z0-9_-]*$/', $this->title)) { $this->title = 'help'; @@ -59,52 +55,11 @@ class DocAction extends Action $this->output = null; $this->loadDoc(); - return true; - } - - /** - * Handle a request - * - * @param array $args array of arguments - * - * @return nothing - */ - function handle(array $args=array()) - { - parent::handle($args); - $this->showPage(); - } - - /** - * Page title - * - * Gives the page title of the document. Override default for hAtom entry. - * - * @return void - */ - function showPageTitle() - { - $this->element('h1', array('class' => 'entry-title'), $this->title()); } - /** - * Block for content. - * - * Overrides default from Action to wrap everything in an hAtom entry. - * - * @return void. - */ - function showContentBlock() + public function title() { - $this->elementStart('div', array('id' => 'content', 'class' => 'h-entry')); - $this->showPageTitle(); - $this->showPageNoticeBlock(); - $this->elementStart('div', array('id' => 'content_inner', - 'class' => 'e-content')); - // show the actual content (forms, lists, whatever) - $this->showContent(); - $this->elementEnd('div'); - $this->elementEnd('div'); + return ucfirst($this->title); } /** @@ -119,16 +74,9 @@ class DocAction extends Action $this->raw($this->output); } - /** - * Page title. - * - * Uses the title of the document. - * - * @return page title - */ - function title() + function showNoticeForm() { - return ucfirst($this->title); + // no notice form } /**