mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Split form.css into form-base.css and form-admin.css, drop dead upload-progress code
Also introduces $extraCssAdmin support in head.php for admin-only stylesheets (form-admin.css, filepond CSS, system.css). Admin pages now use $extraCssAdmin for admin-only assets and $extraCss for shared stylesheets like form-base.css.
This commit is contained in:
@@ -163,7 +163,7 @@ class ThesisEditController
|
||||
* the transaction is still open, but this method rolls
|
||||
* back internally before re-throwing).
|
||||
*/
|
||||
public function save(int $thesisId, array $post, array $files, ?string $progressToken = null): void
|
||||
public function save(int $thesisId, array $post, array $files): void
|
||||
{
|
||||
if ($thesisId <= 0) {
|
||||
throw new InvalidArgumentException('ID de TFE invalide.');
|
||||
|
||||
@@ -455,30 +455,4 @@ class PeerTubeService
|
||||
throw new \RuntimeException('Erreur réseau PeerTube : ' . $e->getMessage(), 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Progress reporting (for upload-progress.js polling)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Write upload progress to a temp file polled by the progress endpoint.
|
||||
*/
|
||||
public static function writeProgress(string $token, string $stage, int $pct, string $file = ''): void
|
||||
{
|
||||
$progressFile = sys_get_temp_dir() . '/xamxam_upload_' . $token . '.json';
|
||||
file_put_contents($progressFile, json_encode([
|
||||
'stage' => $stage,
|
||||
'pct' => $pct,
|
||||
'file' => $file,
|
||||
]), LOCK_EX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the progress file for a given token.
|
||||
*/
|
||||
public static function clearProgress(string $token): void
|
||||
{
|
||||
$progressFile = sys_get_temp_dir() . '/xamxam_upload_' . $token . '.json';
|
||||
@unlink($progressFile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user