| @@ -12,21 +12,27 @@ | ||
| 12 | 12 | |
| 13 | 13 | // import Joomla view library |
| 14 | 14 | jimport('joomla.application.component.view'); |
| 15 | 15 | |
| 16 | -class VikBookingViewConfig extends JViewVikBooking { | |
| 17 | - | |
| 18 | - function display($tpl = null) { | |
| 16 | +class VikBookingViewConfig extends JViewVikBooking | |
| 17 | +{ | |
| 18 | + public function display($tpl = null) | |
| 19 | + { | |
| 19 | 20 | // Set the toolbar |
| 20 | 21 | $this->addToolBar(); |
| 21 | 22 | |
| 22 | - /** | |
| 23 | - * @wponly - trigger back up of extendable files | |
| 24 | - */ | |
| 25 | - VikBookingLoader::import('update.manager'); | |
| 26 | - VikBookingUpdateManager::triggerExtendableClassesBackup('smsapi'); | |
| 27 | - // | |
| 23 | + if (!JFactory::getUser()->authorise('core.vbo.global', 'com_vikbooking')) { | |
| 24 | + VBOHttpDocument::getInstance()->close(403, JText::translate('JERROR_ALERTNOAUTHOR')); | |
| 25 | + } | |
| 28 | 26 | |
| 27 | + if (VBOPlatformDetection::isWordPress()) { | |
| 28 | + /** | |
| 29 | + * @wponly - trigger back up of extendable files | |
| 30 | + */ | |
| 31 | + VikBookingLoader::import('update.manager'); | |
| 32 | + VikBookingUpdateManager::triggerExtendableClassesBackup('smsapi'); | |
| 33 | + } | |
| 34 | + | |
| 29 | 35 | $dbo = JFactory::getDbo(); |
| 30 | 36 | $preset_tags = VikRequest::getInt('reset_tags', '', 'request'); |
| 31 | 37 | if ($preset_tags > 0) { |
| 32 | 38 | $q = "UPDATE `#__vikbooking_orders` SET `colortag`=NULL;"; |
| @@ -69,9 +75,10 @@ | ||
| 69 | 75 | |
| 70 | 76 | /** |
| 71 | 77 | * Sets the toolbar |
| 72 | 78 | */ |
| 73 | - protected function addToolBar() { | |
| 79 | + protected function addToolBar() | |
| 80 | + { | |
| 74 | 81 | JToolBarHelper::title(JText::translate('VBMAINCONFIGTITLE'), 'vikbookingconfig'); |
| 75 | 82 | if (JFactory::getUser()->authorise('core.edit', 'com_vikbooking')) { |
| 76 | 83 | JToolBarHelper::apply( 'saveconfig', JText::translate('VBSAVE')); |
| 77 | 84 | JToolBarHelper::spacer(); |