git.cweiske.de
/
surrogator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use sourceforge homepage
[surrogator.git]
/
surrogator.php
diff --git
a/surrogator.php
b/surrogator.php
index 393b0a2bd4e1bfb43f737ecc0f48f4848340ba5d..6519f5b7a67c694a4a7f6bacd49cc5dd8303af56 100755
(executable)
--- a/
surrogator.php
+++ b/
surrogator.php
@@
-11,7
+11,7
@@
* @package Surrogator
* @author Christian Weiske <cweiske@cweiske.de>
* @license http://www.gnu.org/licenses/agpl.html AGPLv3 or later
* @package Surrogator
* @author Christian Weiske <cweiske@cweiske.de>
* @license http://www.gnu.org/licenses/agpl.html AGPLv3 or later
- * @link http
://git.cweiske.de/?p=surrogator.git
+ * @link http
s://sourceforge.net/p/surrogator/
*/
namespace surrogator;
$cfgFile = __DIR__ . '/data/surrogator.config.php';
*/
namespace surrogator;
$cfgFile = __DIR__ . '/data/surrogator.config.php';
@@
-115,6
+115,12
@@
foreach ($sizes as $size) {
mkdir($varDir . '/' . $size, 0755);
}
}
mkdir($varDir . '/' . $size, 0755);
}
}
+foreach (array('mm.png', 'default.png') as $resFile) {
+ if (!file_exists($rawDir . '/' . $resFile)) {
+ log($resFile . ' missing, copying it from res/', 2);
+ copy(__DIR__ . '/res/' . $resFile, $rawDir . '/' . $resFile);
+ }
+}
if (count($files)) {
$fileInfos = array();
if (count($files)) {
$fileInfos = array();
@@
-146,6
+152,8
@@
foreach ($fileInfos as $fileInfo) {
if ($fileName == 'default.png') {
$md5 = $sha256 = 'default';
if ($fileName == 'default.png') {
$md5 = $sha256 = 'default';
+ } else if ($fileName == 'mm.png') {
+ $md5 = $sha256 = 'mm';
} else {
list($md5, $sha256) = getHashes($fileName);
}
} else {
list($md5, $sha256) = getHashes($fileName);
}