migrant-web/scratch/fix_show.php

20 lines
740 B
PHP

<?php
$file = 'd:/Projects/marketplace/resources/js/Pages/Employer/Workers/Show.jsx';
$content = file_get_contents($file);
$lines = explode("\n", str_replace("\r", "", $content));
// We want to replace line 716 (which is index 715) and line 717 (which is index 716)
// Let's verify line 716 has "</div>" and line 717 is whitespace.
if (strpos($lines[715], '</div>') !== false && trim($lines[716]) === '') {
$lines[715] = str_repeat(' ', 48) . ')}';
$lines[716] = str_repeat(' ', 44) . '</div>';
echo "Successfully replaced lines!\n";
} else {
echo "Line content mismatch!\n";
echo "Line 716: [" . $lines[715] . "]\n";
echo "Line 717: [" . $lines[716] . "]\n";
}
file_put_contents($file, implode("\r\n", $lines));