ver. 0.283: Legacy class cleanup — S, Html, Email, Image, Log, Mobile_Detect → Shared namespace
- Migrate class.S → Shared\Helpers\Helpers (140+ files), remove 12 unused methods - Migrate class.Html → Shared\Html\Html - Migrate class.Email → Shared\Email\Email - Migrate class.Image → Shared\Image\ImageManipulator - Delete class.Log (unused), class.Mobile_Detect (outdated UA detection) - Remove grid library loading from admin (index.php, ajax.php) - Replace gridEdit usage in 10 admin templates with grid-edit-replacement.php - Fix grid-edit-replacement.php AJAX to send values as JSON (grid.js compat) - Remove mobile layout conditionals (m_html/m_css/m_js) from Site + LayoutsRepository - Remove \Log::save_log() calls from OrderAdminService, ShopOrder, Order Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ class ShopTransportController
|
||||
);
|
||||
|
||||
$sortDir = $listRequest['sortDir'];
|
||||
if (trim((string)\S::get('sort')) === '') {
|
||||
if (trim((string)\Shared\Helpers\Helpers::get('sort')) === '') {
|
||||
$sortDir = 'ASC';
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class ShopTransportController
|
||||
'lp' => $lp++ . '.',
|
||||
'default' => $default === 1 ? 'tak' : '<span style="color: #FF0000;">nie</span>',
|
||||
'status' => $status === 1 ? 'tak' : '<span style="color: #FF0000;">nie</span>',
|
||||
'cost' => \S::decimal($cost) . ' zł',
|
||||
'cost' => \Shared\Helpers\Helpers::decimal($cost) . ' zł',
|
||||
'max_wp' => $maxWp !== null ? (int)$maxWp : '-',
|
||||
'name' => '<a href="/admin/shop_transport/edit/id=' . $id . '">' . htmlspecialchars($name, ENT_QUOTES, 'UTF-8') . '</a>',
|
||||
'apilo_carrier' => htmlspecialchars((string)$apiloLabel, ENT_QUOTES, 'UTF-8'),
|
||||
@@ -145,9 +145,9 @@ class ShopTransportController
|
||||
|
||||
public function edit(): string
|
||||
{
|
||||
$transport = $this->transportRepository->find((int)\S::get('id'));
|
||||
$transport = $this->transportRepository->find((int)\Shared\Helpers\Helpers::get('id'));
|
||||
if ($transport === null) {
|
||||
\S::alert('Rodzaj transportu nie został znaleziony.');
|
||||
\Shared\Helpers\Helpers::alert('Rodzaj transportu nie został znaleziony.');
|
||||
header('Location: /admin/shop_transport/list/');
|
||||
exit;
|
||||
}
|
||||
@@ -165,13 +165,13 @@ class ShopTransportController
|
||||
$payload = $_POST;
|
||||
$transportId = isset($payload['id']) && $payload['id'] !== ''
|
||||
? (int)$payload['id']
|
||||
: (int)\S::get('id');
|
||||
: (int)\Shared\Helpers\Helpers::get('id');
|
||||
|
||||
$payload['id'] = $transportId;
|
||||
|
||||
$id = $this->transportRepository->save($payload);
|
||||
if ($id !== null) {
|
||||
\S::delete_dir('../temp/');
|
||||
\Shared\Helpers\Helpers::delete_dir('../temp/');
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'id' => (int)$id,
|
||||
|
||||
Reference in New Issue
Block a user