protected function getUploadPath() { static $path = null; if (!is_null($path)) { return $path; } if (PFmigratorHelper::fmProInstalled()) { $cfg_path = PFmigratorHelper::getConfig('upload_path', 'filemanager_pro'); if (empty($cfg_path)) { $cfg_path = PFmigratorHelper::getConfig('upload_path', 'filemanager'); } } else { $cfg_path = PFmigratorHelper::getConfig('upload_path', 'filemanager'); } if (empty($cfg_path)) { $path = false; return $path; } if (substr($cfg_path, 0, 1) != '/' && substr($cfg_path, 0, 1) != '\\') { $cfg_path = '/' . $cfg_path; } if (substr($cfg_path, -1) == '/' || substr($cfg_path, -1) == '\\') { $cfg_path = substr($cfg_path, 0, -1); } $path = JPath::clean(JPATH_SITE . $cfg_path); if (!JFolder::exists($path)) { if (!JFolder::create($path)) { $path = false; } } return $path; }
protected function getLogoPath() { static $path = null; if (!is_null($path)) { return $path; } $cfg_path = PFmigratorHelper::getConfig('logo_save_path', 'projects'); if (empty($cfg_path)) { $path = false; return $path; } if (JFolder::exists(JPATH_SITE . $cfg_path)) { $path = JPATH_SITE . $cfg_path; return $path; } elseif (JFolder::exists(JPATH_SITE . '/' . $cfg_path)) { $path = JPATH_SITE . '/' . $cfg_path; return $path; } else { $path = false; return $path; } }