OSDN Git Service

BugTrack/2557 touchgraph plugin: Show only existing pages
authorumorigu <umorigu@gmail.com>
Mon, 17 Jan 2022 17:29:45 +0000 (02:29 +0900)
committerumorigu <umorigu@gmail.com>
Mon, 17 Jan 2022 17:29:45 +0000 (02:29 +0900)
plugin/touchgraph.inc.php

index ecc386f..f4f6bac 100644 (file)
@@ -45,6 +45,9 @@ function plugin_touchgraph_rel()
                        $data = file($file);
                        foreach(explode("\t", trim($data[0])) as $name) {
                                if (check_non_list($name)) continue;
+                               if (! is_page($name)) {
+                                       continue;
+                               }
                                echo ' ', $name;
                        }
                        echo "\n";
@@ -64,6 +67,9 @@ function plugin_touchgraph_ref()
                        foreach (file($file) as $line) {
                                list($name) = explode("\t", $line);
                                if (check_non_list($name)) continue;
+                               if (! is_page($name)) {
+                                       continue;
+                               }
                                echo ' ', $name;
                        }
                        echo "\n";