diff --git a/doc/api.md b/doc/api.md
index ef8c7d4b4d..48b4f6e63c 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -269,6 +269,7 @@ xml
```
+---
### friendica/photos/list
Returns a list of all photo resources of the logged in user.
diff --git a/mod/help.php b/mod/help.php
index 5646f1ce10..5465d3e900 100644
--- a/mod/help.php
+++ b/mod/help.php
@@ -59,33 +59,36 @@ function help_content(&$a) {
$html = Markdown($text);
- // create TOC
- $lines = explode("\n", $html);
- $toc="
TOC
";
- $lastlevel=1;
- $idnum = array(0,0,0,0,0,0,0);
- foreach($lines as &$line){
- if (substr($line,0,2)=="";
- for($k=$level+1;$kaside ul {padding-left: 1em;}TOC
";
+ $lastlevel=1;
+ $idnum = array(0,0,0,0,0,0,0);
+ foreach($lines as &$line){
+ if (substr($line,0,2)=="";
+ for($k=$level+1;$k$lastlevel) $toc.="";
+ $idnum[$level]++;
+ $id = implode("_", array_slice($idnum,1,$level));
+ $href = $a->get_baseurl()."/help/{$filename}#{$id}";
+ $toc .= "- ".strip_tags($line)."
";
+ $line = "".$line;
+ $lastlevel = $level;
}
- if ($level>$lastlevel) $toc.="";
- $idnum[$level]++;
- $id = implode("_", array_slice($idnum,1,$level));
- $toc .= "- ".strip_tags($line)."
";
- $line = "".$line;
- $lastlevel = $level;
}
}
- }
- for($k=1;$k<$lastlevel; $k++) $toc.="
";
- $html = implode("\n",$lines);
+ for($k=1;$k<$lastlevel; $k++) $toc.="
";
+ $html = implode("\n",$lines);
- $a->page['aside'] = $toc.$a->page['aside'];
+ $a->page['aside'] = $toc.$a->page['aside'];
+ }
$html = "