]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/doc.php
Fixing a bunch of undefined variable warnings in OpenID signup process
[quix0rs-gnu-social.git] / actions / doc.php
index fd48ac110fc38377238ac063cfea5b892acb3d83..ebffb7c1542fc64843d635b7a19c310c689f20f5 100644 (file)
@@ -42,9 +42,7 @@ if (!defined('LACONICA')) {
  * @author   Robin Millette <millette@controlyourself.ca>
  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
  * @link     http://laconi.ca/
-
-
-*/
+ */
 class DocAction extends Action
 {
     var $filename;
@@ -52,16 +50,16 @@ class DocAction extends Action
 
     /**
      * Class handler.
-     * 
+     *
      * @param array $args array of arguments
      *
      * @return nothing
-    */
+     */
     function handle($args)
     {
         parent::handle($args);
         $this->title    = $this->trimmed('title');
-        $this->filename = INSTALLDIR.'/doc/'.$this->title;
+        $this->filename = INSTALLDIR.'/doc-src/'.$this->title;
         if (!file_exists($this->filename)) {
             $this->clientError(_('No such document.'));
             return;
@@ -69,11 +67,30 @@ class DocAction extends Action
         $this->showPage();
     }
 
+    // overrrided to add entry-title class
+    function showPageTitle() {
+        $this->element('h1', array('class' => 'entry-title'), $this->title());
+    }
+
+    // overrided to add hentry, and content-inner classes
+    function showContentBlock()
+     {
+         $this->elementStart('div', array('id' => 'content', 'class' => 'hentry'));
+         $this->showPageTitle();
+         $this->showPageNoticeBlock();
+         $this->elementStart('div', array('id' => 'content_inner',
+             'class' => 'entry-content'));
+         // show the actual content (forms, lists, whatever)
+         $this->showContent();
+         $this->elementEnd('div');
+         $this->elementEnd('div');
+     }
+
     /**
      * Display content.
-     * 
+     *
      * @return nothing
-    */
+     */
     function showContent()
     {
         $c      = file_get_contents($this->filename);
@@ -83,12 +100,16 @@ class DocAction extends Action
 
     /**
      * Page title.
-     * 
+     *
      * @return page title
-    */
+     */
     function title()
     {
         return ucfirst($this->title);
     }
-}
 
+    function isReadOnly()
+    {
+        return true;
+    }
+}