Esempio n. 1
0
 /**
  * @return bool
  */
 public function isCanShow()
 {
     $currentDepartmentAgent = Mage::helper('aw_hdu3/ticket')->getCurrentDepartmentAgent();
     if (AW_Helpdesk3_Helper_Config::isCanShowCustomerOrdersForAllAgents()) {
         return true;
     } else {
         if (AW_Helpdesk3_Helper_Config::isCanShowCustomerOrdersForPrimaryAgentOnly() && $currentDepartmentAgent->getId() === $this->getTicket()->getDepartment()->getPrimaryAgentId()) {
             return true;
         }
     }
     return false;
 }
Esempio n. 2
0
 /**
  * @param string $filename
  * @param null|string|bool|int|Mage_Core_Model_Store $store
  *
  * @return bool
  */
 public function isAllowFileExtension($filename, $store = null)
 {
     $allowedFileExtension = AW_Helpdesk3_Helper_Config::getAllowFileExtension($store);
     if (!$allowedFileExtension) {
         return true;
     }
     $allowedFileExtension = explode(',', $allowedFileExtension);
     $allowedFileExtension = array_map('strtolower', $allowedFileExtension);
     $fileExt = pathinfo($filename, PATHINFO_EXTENSION);
     if (in_array(strtolower($fileExt), $allowedFileExtension)) {
         return true;
     }
     return false;
 }
Esempio n. 3
0
 /**
  * @return array
  */
 public function getAvailableFileExtensionList()
 {
     return explode(',', AW_Helpdesk3_Helper_Config::getAllowFileExtension());
 }