Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:grapher-php [2020/11/01 13:36] – bab | dev:grapher-php [2020/11/01 15:59] (current) – bab | ||
---|---|---|---|
Line 419: | Line 419: | ||
$pages =& $data[' | $pages =& $data[' | ||
$media =& $data[' | $media =& $data[' | ||
- | $root_name = $data[' | + | $root_name = array_values($pages)[0][" |
$output = '{ | $output = '{ | ||
" | " | ||
Line 433: | Line 434: | ||
$output .= '" | $output .= '" | ||
$output .= '" | $output .= '" | ||
- | $output .= '" | + | $output .= '" |
if (!empty( $item[' | if (!empty( $item[' | ||
{ | { | ||
- | $path = explode (":", | + | $path = explode (":", |
$file = count($path ); | $file = count($path ); | ||
$folder=""; | $folder=""; | ||
- | for($i=0 ; $i < $file-1 ; $i++) | + | for($n=0 ; $n < $file-1 ; $n++) |
{ | { | ||
- | $folder = $folder . $path[$i] . "/"; | + | $folder = $folder . $path[$n] . "/"; |
} | } | ||
- | $output .= '" | + | $output .= '," |
} | } | ||
// $output .= '" | // $output .= '" | ||
// $output .= '" | // $output .= '" | ||
$output .= " | $output .= " | ||
- | if ($i < count($pages)) $output .= ','; | + | if ($i <= count($pages)-1) $output .= ','; |
| | ||
} | } | ||
Line 482: | Line 483: | ||
$grapher = new Grapher(); | $grapher = new Grapher(); | ||
$grapher-> | $grapher-> | ||
+ | |||
+ | |||
</ | </ |