Esempio n. 1
0
 public function __construct($prefixString = '')
 {
     if (!\GO::modules()->isInstalled('files')) {
         throw new \Exception('The current action requires the files module to be activated for the current user.');
     }
     // Make sure the current user's folder exists.
     $userFolderModel = \GO\Files\Model\Folder::model()->findHomeFolder(\GO::user());
     if (empty($userFolderModel)) {
         $userFolder = new \GO\Base\Fs\Folder(\GO::config()->file_storage_path . 'users/' . \GO::user()->username);
         $userFolder->create();
         $userFolderModel = new \GO\Files\Model\Folder();
         $userFolderModel->findByPath('users/' . \GO::user()->username, true);
     }
     parent::__construct(\GO::config()->file_storage_path . $userFolderModel->path . '/' . $prefixString . \GO\Base\Util\Date::get_timestamp(time(), true) . '.log');
 }