apps/theming/lib/Controller/ThemingController.php
/**
	 * Revert setting to default value
	 *
	 * @param string $setting setting which should be reverted
	 * @return DataResponse
	 */
Revert setting to default value
@param string $setting setting which should be reverted
@return DataResponse
Revert setting to default value @param string $setting setting which should be reverted @return DataResponse
public function undo($setting) {
		$value = $this->themingDefaults->undo($setting);
		$cssCached = $this->scssCacher->process(\OC::$SERVERROOT, '/core/css/server.scss', 'core');
		if($setting === 'logoMime') {
			try {
				$file = $this->appData->getFolder('images')->getFile('logo');
				$file->delete();
			} catch (NotFoundException $e) {
			} catch (NotPermittedException $e) {
			}
		}
		if($setting === 'backgroundMime') {
			try {
				$file = $this->appData->getFolder('images')->getFile('background');
				$file->delete();
			} catch (NotFoundException $e) {
			} catch (NotPermittedException $e) {
			}
		}
		return new DataResponse(
			[
				'data' =>
					[
						'value' => $value,
						'message' => $this->l10n->t('Saved')
					],
				'status' => 'success'
			]
		);
	}
public function undo ( $ setting ) { $ value = $ this -> themingDefaults -> undo ( $ setting ) ; $ cssCached = $ this -> scssCacher -> process ( \ OC :: $ SERVERROOT , '/core/css/server.scss' , 'core' ) ; if ( $ setting === 'logoMime' ) { try { $ file = $ this -> appData -> getFolder ( 'images' ) -> getFile ( 'logo' ) ; $ file -> delete ( ) ; } catch ( NotFoundException $ e ) { } catch ( NotPermittedException $ e ) { } } if ( $ setting === 'backgroundMime' ) { try { $ file = $ this -> appData -> getFolder ( 'images' ) -> getFile ( 'background' ) ; $ file -> delete ( ) ; } catch ( NotFoundException $ e ) { } catch ( NotPermittedException $ e ) { } } return new DataResponse ( [ 'data' => [ 'value' => $ value , 'message' => $ this -> l10n -> t ( 'Saved' ) ] , 'status' => 'success' ] ) ; }
Revert setting to default value
 @param string $setting setting which should be reverted
 @return DataResponse
Revert setting to default value @param string $setting setting which should be reverted @return DataResponse
// reprocess server scss for preview