page: replace global variables by $Page object
[minimedit.git] / widget / login / commits.php
index b86b6c5f8d76f2034fe722070916efd047290f47..d892cb591e169945945eb8646904dd10a3bbeddb 100644 (file)
@@ -18,14 +18,15 @@ if ( $log = popen($gitcmd, 'r') ) {
                list ($atime, $author, $message) = explode("\t", $line, 3);
                list ($author) = explode(' ', $author); # first name only
                printf('<li>%s <small class="date">%s • %s</small></li>'."\n",
-                       $message, $author, strftime('%F %H:%M', $atime)
+                       htmlspecialchars($message),
+                       htmlspecialchars($author), strftime('%F %H:%M', $atime)
                );
                $lines++;
        }
        print "</ul>\n\n";
        pclose($log);
 
-       $navbase = $Page == 'login/commits' ? '?' : '/login/commits?';
+       $navbase = $Page->handler == 'login/commits' ? '?' : '/login/commits?';
        $nav = [];
        $nav[] = sprintf('Pagina %d', ceil($offset / $pagesize) + 1);
        if ($lines >= $pagesize) {