/** * Creates a thumbnail image from a source image. * * @param string $dummy1 Isn't used. * @param string $dummy2 Isn't used. * @return bool TRUE on success */ public function write($dummy1 = '', $dummy2 = '') { if (!isset($this->m_ext)) { return false; } if (parent::write(IMPATH . $this->m_id . $this->m_ext, IMPATH . $this->m_id . 't' . $this->m_ext)) { safe_update('txp_image', "thumbnail = 1,\n thumb_w = {$this->width},\n thumb_h = {$this->height},\n date = NOW()", "id = " . $this->m_id); chmod(IMPATH . $this->m_id . 't' . $this->m_ext, 0644); return true; } return false; }
/** * create thumbnail image from source image * @return boolean, true indicates success */ function write() { if (!isset($this->m_ext)) { return false; } if (parent::write(IMPATH . $this->m_id . $this->m_ext, IMPATH . $this->m_id . 't' . $this->m_ext)) { safe_update('txp_image', "thumbnail = 1, thumb_w = {$this->width}, thumb_h = {$this->height}", 'id = ' . $this->m_id); chmod(IMPATH . $this->m_id . 't' . $this->m_ext, 0644); return true; } return false; }
/** * create thumbnail image from source image * @return boolean, true indicates success */ function write() { if (!isset($this->m_ext)) { return false; } if (parent::write(IMPATH . $this->m_id . $this->m_ext, IMPATH . $this->m_id . 't' . $this->m_ext)) { safe_update("txp_image", "thumbnail='1'", "id='{$this->m_id}'"); return true; } return false; }
/** * create thumbnail image from source image * @return boolean, true indicates success */ function write() { if (!isset($this->m_ext)) { return false; } if (parent::write(IMPATH . $this->m_id . $this->m_ext, IMPATH . $this->m_id . 't' . $this->m_ext)) { safe_update('txp_image', 'thumbnail = 1', 'id = ' . $this->m_id); chmod(IMPATH . $this->m_id . 't' . $this->m_ext, 0644); return true; } return false; }