refactor: Rename project order file and clean up file structure

- Rename project_order.json to order_project.json for consistency with order_ads.json naming convention
- Update all references in ProjectService and ProjectsController
This commit is contained in:
Johannes
2025-09-14 11:26:09 +02:00
parent 233a952c04
commit 713a1156c4
5 changed files with 12 additions and 11 deletions

View File

@@ -300,7 +300,7 @@ class ProjectsController {
}
// Ignore special files
if (in_array($project, ['project_order.json', 'logins.json'])) {
if (in_array($project, ['order_project.json', 'logins.json'])) {
continue;
}

View File

@@ -44,7 +44,7 @@ class ProjectService {
}
/**
* Save project order to project_order.json
* Save project order to order_project.json
*/
public static function saveProjectOrder($clientDir, $orderData) {
$base = realpath(__DIR__ . FileSystemService::getAreaPath() . '/' . $clientDir);
@@ -75,7 +75,7 @@ class ProjectService {
}
// Save new order
$projectOrderFile = $base . '/project_order.json';
$projectOrderFile = $base . '/order_project.json';
$result = file_put_contents($projectOrderFile, json_encode($orderData['order'], JSON_PRETTY_PRINT));
if ($result === false) {
@@ -83,7 +83,7 @@ class ProjectService {
'success' => false,
'error' => [
'code' => 'WRITE_ERROR',
'message' => 'Fehler beim Speichern der project_order.json.'
'message' => 'Fehler beim Speichern der order_project.json.'
]
];
}
@@ -149,7 +149,7 @@ class ProjectService {
}
private static function loadProjectOrder($basePath) {
$projectOrderFile = $basePath . '/project_order.json';
$projectOrderFile = $basePath . '/order_project.json';
$projectOrder = [];
if (file_exists($projectOrderFile)) {