Changeset 3767752 for softminal-cache/trunk/app/Cache/Config.php
- Timestamp:
- 10/27/2026 04:42:52 AM (30 hours ago)
- File:
-
- 1 edited
-
softminal-cache/trunk/app/Cache/Config.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
softminal-cache/trunk/app/Cache/Config.php
r3763679 r3767752 3 3 namespace SoftminalCache\App\Cache; 4 4 5 use SoftminalCache\App\Modules\Cdn; 5 6 use SoftminalCache\App\Core\Compat; 6 7 use SoftminalCache\App\Core\Modules; … … 243 244 $merged['modules'] = Modules::sanitize($input['modules'], $before['modules']); 244 245 } 245 $settings = self:: sanitize($merged);246 $settings = self::keepCdnUrls($before, self::sanitize($merged)); 246 247 update_option(self::OPTION, $settings); 247 248 Snapshots::record($before, $settings, $label); … … 262 263 { 263 264 $before = self::get(); 264 $settings = self:: sanitize($settings);265 $settings = self::keepCdnUrls($before, self::sanitize($settings)); 265 266 update_option(self::OPTION, $settings); 266 267 Assets::sync($before, $settings); 267 268 self::writeRuntime(); 268 269 ServerRules::sync($settings); 270 271 return $settings; 272 } 273 274 /** 275 * The CDN addresses stay as they were when the current user may not change them (see 276 * Cdn::mayChangeUrls()), whichever way the change came: the screen, a profile, an import, Undo. 277 * 278 * @param Settings $before 279 * @param Settings $settings 280 * @return Settings 281 */ 282 private static function keepCdnUrls(array $before, array $settings): array 283 { 284 if (!Cdn::mayChangeUrls()) { 285 $settings['modules']['cdn']['urls'] = $before['modules']['cdn']['urls'] ?? []; 286 } 269 287 270 288 return $settings;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)