public static function frontControllerPreDispatch(XenForo_FrontController $fc, XenForo_RouteMatch &$routeMatch)
 {
     if (defined('DEVTOOLS_AUTOLOADER_SETUP') or self::$_checked or $routeMatch->getResponseType() != 'html') {
         return;
     }
     $paths = XenForo_Application::getInstance()->loadRequestPaths();
     $url = $paths['fullBasePath'] . 'filesync.php';
     if (class_exists('XenForo_Dependencies_Admin', false)) {
         $url .= '?admin=1';
     }
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     ob_start();
     curl_exec($ch);
     curl_close($ch);
     self::$_syncOutput = ob_get_contents();
     $logs = explode('<pre>', self::$_syncOutput);
     $errors = array();
     foreach ($logs as $log) {
         $lines = explode("\n", $log);
         foreach ($lines as $line) {
             if (strpos($line, 'E:') === 0) {
                 $origLine = str_replace('E: ', '', $line);
                 $line = '<strong>' . htmlspecialchars($origLine);
                 $pos = strpos($line, ':');
                 $line = substr($line, 0, $pos) . '</strong><i>' . substr($line, $pos);
                 $pos = strpos($line, ' in ' . DIRECTORY_SEPARATOR);
                 // hacked him!
                 $line = substr($line, 0, $pos) . '</i>' . substr($line, $pos);
                 $errors[] = $line;
                 DevTools_ChromePhp::error(trim($origLine));
             } else {
                 DevTools_ChromePhp::log(trim($line));
             }
         }
     }
     ob_end_clean();
     self::$_checked = true;
     self::$_errors = $errors;
 }
 public function printDebugInfo($str)
 {
     static $started = false;
     if ($this->showDebugInfo()) {
         if (PHP_SAPI != 'cli' and !$started) {
             echo '<pre>';
             $started = true;
         }
         $str = str_replace('{datatype}', $this->getDataType(), $str);
         DevTools_ChromePhp::log($str);
         echo $str;
     }
 }