示例#1
0
 public function __construct()
 {
     $checkpermissions = new SPDOWNLOAD_CLASS_Permissions();
     $checkpermissions->getInstance()->checkpageurl('create_category');
     $arrayCheck = $checkpermissions->getInstance()->checkpageclick('create_category');
     $this->assign('addNew_promoted', $arrayCheck['promoted']);
     $this->assign('addNew_isAuthorized', $arrayCheck['isAuthorized']);
 }
示例#2
0
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
示例#3
0
 public function getlatestfile($params)
 {
     $checkpermissions = new SPDOWNLOAD_CLASS_Permissions();
     $checkpermissions->getInstance()->checkpageurl('download');
     $arrayCheck = $checkpermissions->getInstance()->checkpageclick('download');
     $this->assign('addNew_promoted', $arrayCheck['promoted']);
     $this->assign('addNew_isAuthorized', $arrayCheck['isAuthorized']);
     $params['fileId'] = substr($params['fileId'], 0, stripos($params['fileId'], "-"));
     $filevernew = SPDOWNLOAD_BOL_VersionService::getInstance()->getFileVerNew($params['fileId']);
     $params['versionId'] = $filevernew[0]->id;
     $params['vFileName'] = $filevernew[0]->filename;
     $this->getfile($params);
 }