| @@ -1,0 +1,42 @@ | ||
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * @package VikBooking | |
| 4 | + * @subpackage com_vikbooking | |
| 5 | + * @author Alessio Gaggii - e4j - Extensionsforjoomla.com | |
| 6 | + * @copyright Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved. | |
| 7 | + * @license GNU General Public License version 2 or later; see LICENSE | |
| 8 | + * @link https://vikwp.com | |
| 9 | + */ | |
| 10 | + | |
| 11 | +defined('ABSPATH') or die('No script kiddies please!'); | |
| 12 | + | |
| 13 | +// import Joomla view library | |
| 14 | +jimport('joomla.application.component.view'); | |
| 15 | + | |
| 16 | +class VikBookingViewEdittmplfile extends JViewVikBooking | |
| 17 | +{ | |
| 18 | + public function display($tpl = null) | |
| 19 | + { | |
| 20 | + // This view is usually called within a modal box, so it does not require the toolbar or page title | |
| 21 | + | |
| 22 | + $fpath = VikRequest::getString('path', '', 'request', VIKREQUEST_ALLOWRAW); | |
| 23 | + $pdebug = VikRequest::getInt('e4j_debug', '', 'request'); | |
| 24 | + $exists = is_file($fpath); | |
| 25 | + if (!$exists) { | |
| 26 | + $fpath = urldecode($fpath); | |
| 27 | + } | |
| 28 | + if (!is_file($fpath) && $pdebug > 0) { | |
| 29 | + //VBO 1.10 | |
| 30 | + touch($fpath); | |
| 31 | + } elseif (strpos(basename($fpath), 'config') !== false) { | |
| 32 | + // security patch for VBO 1.10 | |
| 33 | + $fpath = ''; | |
| 34 | + } | |
| 35 | + $fpath = is_file($fpath) ? $fpath : ''; | |
| 36 | + | |
| 37 | + $this->fpath = $fpath; | |
| 38 | + | |
| 39 | + // Display the template | |
| 40 | + parent::display($tpl); | |
| 41 | + } | |
| 42 | +} | |