Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 /**
  * 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;
 }
Beispiel #3
0
 /**
  * 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;
 }
Beispiel #4
0
 /**
  * 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;
 }