本文整理匯總了PHP中ShopFunctions::tested方法的典型用法代碼示例。如果您正苦於以下問題:PHP ShopFunctions::tested方法的具體用法?PHP ShopFunctions::tested怎麽用?PHP ShopFunctions::tested使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShopFunctions
的用法示例。
在下文中一共展示了ShopFunctions::tested方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: checkSafePath
static function checkSafePath($safePath = 0)
{
if ($safePath == 0) {
$safePath = VmConfig::get('forSale_path', 0);
if (self::$tested) {
return $safePath;
}
}
$warn = FALSE;
$uri = JFactory::getURI();
$configlink = $uri->root() . 'administrator/index.php?option=com_virtuemart&view=config';
VmConfig::loadJLang('com_virtuemart');
if (empty($safePath)) {
$warn = 'COM_VIRTUEMART_WARN_NO_SAFE_PATH_SET';
} else {
$exists = JFolder::exists($safePath);
if (!$exists) {
$warn = 'COM_VIRTUEMART_WARN_SAFE_PATH_WRONG';
} else {
if (!is_writable($safePath)) {
VmConfig::loadJLang('com_virtuemart_config');
VmWarn('COM_VIRTUEMART_WARN_SAFE_PATH_NOT_WRITEABLE', JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $safePath, $configlink);
} else {
if (!is_writable(self::getInvoicePath($safePath))) {
VmConfig::loadJLang('com_virtuemart_config');
VmWarn('COM_VIRTUEMART_WARN_SAFE_PATH_INV_NOT_WRITEABLE', JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $safePath, $configlink);
}
}
}
}
if ($warn) {
self::$tested = true;
$suggestedPath = shopFunctions::getSuggestedSafePath();
VmConfig::loadJLang('com_virtuemart_config');
VmWarn($warn, JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $suggestedPath, $configlink);
return FALSE;
}
return $safePath;
}