diff options
author | git-marijus <mario@mariovavti.com> | 2016-11-28 13:44:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 13:44:41 +0100 |
commit | 683a09781ad9c9be00ce67e35f560e6fca051f3b (patch) | |
tree | bb4477d49f872b91913d77f8967ffea61f6bcead /Zotlabs | |
parent | d8774cda8ed0bec9dbbe8638fd7af5307d569805 (diff) | |
parent | 5bcb373c00a500cd8120df41bc0788172fe7e347 (diff) | |
download | volse-hubzilla-683a09781ad9c9be00ce67e35f560e6fca051f3b.tar.gz volse-hubzilla-683a09781ad9c9be00ce67e35f560e6fca051f3b.tar.bz2 volse-hubzilla-683a09781ad9c9be00ce67e35f560e6fca051f3b.zip |
Merge pull request #602 from anaqreon/doco
Update context help content and context page element focus feature.
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Help.php | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index 570e8e0cf..27d94e405 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -44,8 +44,39 @@ class Help extends \Zotlabs\Web\Controller { return $o; } + + + if(argc() > 2 && argv(argc()-2) === 'assets') { + $path = ''; + for($x = 1; $x < argc(); $x ++) { + if(strlen($path)) + $path .= '/'; + $path .= argv($x); + } + $realpath = 'doc/' . $path; + //Set the content-type header as appropriate + $imageInfo = getimagesize($realpath); + switch ($imageInfo[2]) { + case IMAGETYPE_JPEG: + header("Content-Type: image/jpeg"); + break; + case IMAGETYPE_GIF: + header("Content-Type: image/gif"); + break; + case IMAGETYPE_PNG: + header("Content-Type: image/png"); + break; + default: + break; + } + header("Content-Length: " . filesize($realpath)); - $content = get_help_content(); + // dump the picture and stop the script + readfile($realpath); + killme(); + } + + $content = get_help_content(); return replace_macros(get_markup_template('help.tpl'), array( '$title' => t('$Projectname Documentation'), |