mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Simplify logo URL code
This commit is contained in:
parent
38ed834019
commit
79d745a26b
@ -748,15 +748,13 @@ class Account extends Eloquent
|
|||||||
|
|
||||||
if($adapter instanceof \League\Flysystem\Adapter\Local) {
|
if($adapter instanceof \League\Flysystem\Adapter\Local) {
|
||||||
// Stored locally
|
// Stored locally
|
||||||
$logo_url = str_replace(public_path(), url('/'), $adapter->applyPathPrefix($this->logo), $count);
|
$logoUrl = url('/logo/' . $this->logo);
|
||||||
|
|
||||||
if ($cachebuster) {
|
if ($cachebuster) {
|
||||||
$logo_url .= '?no_cache='.time();
|
$logoUrl .= '?no_cache='.time();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($count == 1){
|
return $logoUrl;
|
||||||
return str_replace(DIRECTORY_SEPARATOR, '/', $logo_url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Document::getDirectFileUrl($this->logo, $this->getLogoDisk());
|
return Document::getDirectFileUrl($this->logo, $this->getLogoDisk());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user