public function removeThis() { if (file_exists($this->file_path_server)) { unlink($this->file_path_server); } erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/', str_replace('var/', '', $this->file_path)); erLhcoreClassChat::getSession()->delete($this); }
public function removeThis() { if (file_exists($this->file_path_server)) { unlink($this->file_path_server); } if ($this->file_path != '') { erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/', str_replace('var/', '', $this->file_path)); } erLhcoreClassChatEventDispatcher::getInstance()->dispatch('file.remove_file', array('chat_file' => &$this)); erLhcoreClassChat::getSession()->delete($this); }
public function deletePhoto($attr) { if ($this->{$attr} != '') { if (file_exists($this->{$attr . '_path'} . $this->{$attr})) { unlink($this->{$attr . '_path'} . $this->{$attr}); } if ($this->{$attr . '_path'} != '') { erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/storagetheme/', str_replace('var/storagetheme/', '', $this->{$attr . '_path'})); } erLhcoreClassChatEventDispatcher::getInstance()->dispatch('theme.edit.remove_' . $attr, array('theme' => &$this, 'path_attr' => $attr . '_path', 'name' => $this->{$attr})); $this->{$attr} = ''; $this->{$attr . '_path'} = ''; } }
/** * Removes attributes if required * */ public function removeResource($scope, $key) { $content = $this->{$scope . '_array'}; if (isset($content[$key]['file']) && isset($content[$key]['file_dir'])) { if (file_exists($content[$key]['file_dir'] . $content[$key]['file'])) { unlink($content[$key]['file_dir'] . $content[$key]['file']); erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/storageadmintheme/', str_replace('var/storageadmintheme/', '', $content[$key]['file_dir'])); } // Remove removed attribute unset($content[$key]); // Set attr $this->{$scope . '_array'} = $content; $this->{$scope} = json_encode($content, JSON_HEX_APOS); $this->saveThis(); } }
public function removeFile() { if ($this->filename != '' || $this->filename != '') { if (file_exists($this->filepath . $this->filename)) { unlink($this->filepath . $this->filename); } if ($this->filepath != '') { erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/userphoto/', str_replace('var/userphoto/', '', $this->filepath)); } erLhcoreClassChatEventDispatcher::getInstance()->dispatch('user.remove_photo', array('user' => &$this)); $this->filepath = ''; $this->filename = ''; $this->saveThis(); } }
public function removeThis() { foreach ($this->content_array as $key => $content) { if ($content['definition']['type'] == 'file' && file_exists($content['filepath'] . $content['filename'])) { unlink($content['filepath'] . $content['filename']); erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/', str_replace('var/', '', $content['filepath'])); } } erLhcoreClassAbstract::getSession()->delete($this); }
public function removePDF() { if ($this->pdf_file != '' && file_exists($this->pdf_file_path_server)) { unlink($this->pdf_file_path_server); } if ($this->pdf_to_img_converted && $this->pages_pdf_count > 0) { foreach ($this->pages_pdf as $pdfFilePath) { if (file_exists($pdfFilePath)) { unlink($pdfFilePath); } } } erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/', $this->file_path . 'img'); }
public function removeThis() { foreach ($this->content_array as $key => $content) { if ($content['definition']['type'] == 'file') { if ($content['filename'] != '') { erLhcoreClassChatEventDispatcher::getInstance()->dispatch('form.remove_file', array('filepath' => $content['filepath'], 'filename' => $content['filename'])); } if ($content['filepath'] != '' && file_exists($content['filepath'] . $content['filename'])) { unlink($content['filepath'] . $content['filename']); erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/', str_replace('var/', '', $content['filepath'])); } } } erLhcoreClassAbstract::getSession()->delete($this); }
public function deletePhoto($attr) { if ($this->{$attr} != '') { if (file_exists($this->{$attr . '_path'} . $this->{$attr})) { unlink($this->{$attr . '_path'} . $this->{$attr}); } erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/storagetheme/', str_replace('var/storagetheme/', '', $this->{$attr . '_path'})); $this->{$attr} = ''; $this->{$attr . '_path'} = ''; } }
public function removeFile() { if ($this->filepath != '') { if (file_exists($this->filepath . $this->filename)) { unlink($this->filepath . $this->filename); } erLhcoreClassFileUpload::removeRecursiveIfEmpty('var/userphoto/', str_replace('var/userphoto/', '', $this->filepath)); $this->filepath = ''; $this->filename = ''; $this->saveThis(); } }