コード例 #1
0
 function synchronizeMedia()
 {
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (!Permissions::getInstance()->check('admin')) {
         $msg = 'Forget IT';
         $this->setRedirect('index.php?option=com_virtuemart', $msg);
     }
     if (!class_exists('Migrator')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'migrator.php';
     }
     $migrator = new Migrator();
     $result = $migrator->portMedia();
     $this->setRedirect(null, $result);
 }
コード例 #2
0
 function portMedia()
 {
     $this->checkPermissionForTools();
     $this->storeMigrationOptionsInSession();
     if (!class_exists('Migrator')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'migrator.php';
     }
     $migrator = new Migrator();
     $result = $migrator->portMedia();
     $this->setRedirect($this->redirectPath, $result);
 }
コード例 #3
0
ファイル: media.php プロジェクト: thumbs-up-sign/TuVanDuAn
 function synchronizeMedia()
 {
     if (vmAccess::manager('media')) {
         $configPaths = array('assets_general_path', 'media_category_path', 'media_product_path', 'media_manufacturer_path', 'media_vendor_path');
         foreach ($configPaths as $path) {
             $this->renameFileExtension(VMPATH_ROOT . DS . VmConfig::get($path));
         }
         if (!class_exists('Migrator')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'migrator.php';
         }
         $migrator = new Migrator();
         $result = $migrator->portMedia();
         $this->setRedirect($this->redirectPath, $result);
     } else {
         $msg = 'Forget IT';
         $this->setRedirect('index.php?option=com_virtuemart', $msg);
     }
 }
コード例 #4
0
 function portMedia()
 {
     $data = JRequest::get('get');
     JRequest::setVar($data['token'], '1', 'post');
     JRequest::checkToken() or jexit('Invalid Token, in ' . JRequest::getWord('task'));
     $this->checkPermissionForTools();
     $this->storeMigrationOptionsInSession();
     if (!class_exists('Migrator')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'migrator.php';
     }
     $migrator = new Migrator();
     $result = $migrator->portMedia();
     $this->setRedirect($this->redirectPath, $result);
 }
コード例 #5
0
ファイル: media.php プロジェクト: lenard112/cms
 function synchronizeMedia()
 {
     $user = JFactory::getUser();
     if ($user->authorise('core.admin', 'com_virtuemart') or $user->authorise('core.manage', 'com_virtuemart')) {
         $configPaths = array('assets_general_path', 'media_category_path', 'media_product_path', 'media_manufacturer_path', 'media_vendor_path');
         foreach ($configPaths as $path) {
             $this->renameFileExtension(JPATH_ROOT . DS . VmConfig::get($path));
         }
         if (!class_exists('Migrator')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'migrator.php';
         }
         $migrator = new Migrator();
         $result = $migrator->portMedia();
         $this->setRedirect($this->redirectPath, $result);
     } else {
         $msg = 'Forget IT';
         $this->setRedirect('index.php?option=com_virtuemart', $msg);
     }
 }