/** * Constructor * * @return void * @since 1.0 */ public function __construct() { parent::__construct(); // Create the image paths and table names $this->prefix = $this->getStateFromRequest('prefix', 'prefix', '', 'cmd'); $this->path = $this->getStateFromRequest('path2joomla', 'path2joomla', '', 'string'); if ($this->path == '-') { $this->path_originals = $this->getStateFromRequest('originals', 'originals', '', 'string'); $this->path_details = $this->getStateFromRequest('details', 'details', '', 'string'); $this->path_thumbnails = $this->getStateFromRequest('thumbnails', 'thumbnails', '', 'string'); } else { $this->path = JPath::clean(rtrim($this->path, '\\/')); $this->path_originals = $this->path . '/' . $this->getStateFromRequest('originals', 'originals', '', 'string'); $this->path_details = $this->path . '/' . $this->getStateFromRequest('details', 'details', '', 'string'); $this->path_thumbnails = $this->path . '/' . $this->getStateFromRequest('thumbnails', 'thumbnails', '', 'string'); } $this->path_originals = JPath::clean(rtrim($this->path_originals, '\\/') . '/'); $this->path_details = JPath::clean(rtrim($this->path_details, '\\/') . '/'); $this->path_thumbnails = JPath::clean(rtrim($this->path_thumbnails, '\\/') . '/'); $this->table_images = str_replace('#__', $this->prefix, _JOOM_TABLE_IMAGES); $this->table_categories = str_replace('#__', $this->prefix, _JOOM_TABLE_CATEGORIES); $this->table_comments = str_replace('#__', $this->prefix, _JOOM_TABLE_COMMENTS); $this->table_config = str_replace('#__', $this->prefix, _JOOM_TABLE_CONFIG); $this->table_nameshields = str_replace('#__', $this->prefix, _JOOM_TABLE_NAMESHIELDS); $this->table_users = str_replace('#__', $this->prefix, _JOOM_TABLE_USERS); $this->table_votes = str_replace('#__', $this->prefix, _JOOM_TABLE_VOTES); }
/** * Constructor * * @return void * @since 1.6 */ public function __construct() { parent::__construct(); // Create the image paths and table names $prefix = $this->getStateFromRequest('prefix', 'prefix', '', 'cmd'); $path = $this->getStateFromRequest('path', 'path', '', 'string'); $this->path_originals = JPath::clean($path . '/data/media/'); $this->path_thumbnails = JPath::clean($path . '/data/thumbnails/'); $this->table_images = $prefix . 'images'; $this->table_categories = $prefix . 'categories'; $this->table_comments = $prefix . 'comments'; $this->table_users = $prefix . 'users'; }