Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Removes debugging

AuthorDave Jarvis <email>
Date2026-02-09 17:56:31 GMT-0800
Commit475180005f6a0ca98d496136beb900fc29793a4b
Parentdd6ef3d
FilePage.php
$mediaType = MediaTypeSniffer::isMediaType( $buffer, $filename );
- // --- DIAGNOSTIC BLOCK ---
- echo "<pre style='background:#111;color:#0f0;padding:15px;border:3px solid #f00;margin:10px 0;'>";
- echo "DEBUG FOR: " . htmlspecialchars($filename) . "\n";
- echo "EXPECTED SIZE: " . $size . " bytes\n";
- echo "BUFFER HEX (12B): " . bin2hex($buffer) . "\n";
- echo "CATEGORY: " . var_export($category, true) . "\n";
- echo "MEDIA TYPE: " . var_export($mediaType, true) . "\n";
-
- // Check if content-type detection logic is forcing a binary state
- $isBinary = MediaTypeSniffer::isBinary($buffer, $filename);
- echo "IS_BINARY EVAL: " . ($isBinary ? 'TRUE' : 'FALSE') . "\n";
-
- // Test if the full stream actually produces data
- $fullContent = '';
- $this->git->stream($targetHash, function($d) use (&$fullContent) { $fullContent .= $d; });
- echo "FULL STREAM LENGTH: " . strlen($fullContent) . " bytes\n";
- echo "FULL CONTENT (HEX): " . bin2hex(substr($fullContent, 0, 32)) . "...\n";
- echo "</pre>";
- // --- END DIAGNOSTIC ---
-
$this->renderBreadcrumbs( $targetHash, 'File' );
Delta0 lines added, 20 lines removed, 20-line decrease