|
@@ 165-178 (lines=14) @@
|
| 162 |
|
* |
| 163 |
|
* @return Http\StreamResponse |
| 164 |
|
*/ |
| 165 |
|
public function getLogo() { |
| 166 |
|
$pathToLogo = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/') . '/themedinstancelogo'; |
| 167 |
|
if(!file_exists($pathToLogo)) { |
| 168 |
|
return new DataResponse(); |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
\OC_Response::setExpiresHeader(gmdate('D, d M Y H:i:s', time() + (60*60*24*45)) . ' GMT'); |
| 172 |
|
\OC_Response::enableCaching(); |
| 173 |
|
$response = new Http\StreamResponse($pathToLogo); |
| 174 |
|
$response->cacheFor(3600); |
| 175 |
|
$response->addHeader('Content-Disposition', 'attachment'); |
| 176 |
|
$response->addHeader('Content-Type', $this->config->getAppValue($this->appName, 'logoMime', '')); |
| 177 |
|
return $response; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
/** |
| 181 |
|
* @PublicPage |
|
@@ 186-199 (lines=14) @@
|
| 183 |
|
* |
| 184 |
|
* @return Http\StreamResponse |
| 185 |
|
*/ |
| 186 |
|
public function getLoginBackground() { |
| 187 |
|
$pathToLogo = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/') . '/themedbackgroundlogo'; |
| 188 |
|
if(!file_exists($pathToLogo)) { |
| 189 |
|
return new DataResponse(); |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
\OC_Response::setExpiresHeader(gmdate('D, d M Y H:i:s', time() + (60*60*24*45)) . ' GMT'); |
| 193 |
|
\OC_Response::enableCaching(); |
| 194 |
|
$response = new Http\StreamResponse($pathToLogo); |
| 195 |
|
$response->cacheFor(3600); |
| 196 |
|
$response->addHeader('Content-Disposition', 'attachment'); |
| 197 |
|
$response->addHeader('Content-Type', $this->config->getAppValue($this->appName, 'backgroundMime', '')); |
| 198 |
|
return $response; |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
/** |
| 202 |
|
* @NoCSRFRequired |