protected function imageThumbUpdate(&$file, &$newFile) { if ($file->relname != $newFile->relname) { $p = path::info($file->relname); $thumb_old = sprintf($this->thumb_tp, $p['dirname'], $p['base'], '%s'); $p = path::info($newFile->relname); $thumb_new = sprintf($this->thumb_tp, $p['dirname'], $p['base'], '%s'); foreach ($this->thumb_sizes as $suffix => $s) { try { parent::moveFile(sprintf($thumb_old, $suffix), sprintf($thumb_new, $suffix)); } catch (Exception $e) { } } } }
protected function imageThumbUpdate($file, $newFile) { if ($file->relname != $newFile->relname) { $p = path::info($file->relname); $alpha = $p['extension'] == 'png' || $p['extension'] == 'PNG'; $thumb_old = sprintf($alpha ? $this->thumb_tp_alpha : $this->thumb_tp, $p['dirname'], $p['base'], '%s'); $p = path::info($newFile->relname); $alpha = $p['extension'] == 'png' || $p['extension'] == 'PNG'; $thumb_new = sprintf($alpha ? $this->thumb_tp_alpha : $this->thumb_tp, $p['dirname'], $p['base'], '%s'); foreach ($this->thumb_sizes as $suffix => $s) { try { parent::moveFile(sprintf($thumb_old, $suffix), sprintf($thumb_new, $suffix)); } catch (Exception $e) { } } } }