29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-27 07:33:41 +00:00

# [!21949] Reverted systematic elimination of DS as directory separator

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@18650 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
Ian MacLennan 2010-08-26 13:28:49 +00:00
parent d1361cba9b
commit d09c653ee0
237 changed files with 621 additions and 609 deletions

View File

@ -80,7 +80,7 @@ class AdminModelHelp extends JModel
$lang = JFactory::getLanguage();
$this->lang_tag = $lang->getTag();
jimport('joomla.filesystem.folder');
if (!JFolder::exists(JPATH_BASE . '/help/' . $this->lang_tag)) {
if (!JFolder::exists(JPATH_BASE . DS . 'help' . DS . $this->lang_tag)) {
$this->lang_tag = 'en-GB'; // use english as fallback
}
@ -100,11 +100,11 @@ class AdminModelHelp extends JModel
$help_search = $this->getHelpSearch();
// Get Help files
$files = JFolder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
$files = JFolder::files(JPATH_BASE . DS . 'help' . DS . $lang_tag, '\.xml$|\.html$');
$this->toc = array();
foreach($files as $file)
{
$buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . DS . $file);
$buffer = file_get_contents(JPATH_BASE . DS . 'help' . DS . $lang_tag . DS . $file);
if (preg_match('#<title>(.*?)</title>#', $buffer, $m))
{
$title = trim($m[1]);

View File

@ -158,43 +158,43 @@ class AdminModelSysInfo extends JModel
jimport('joomla.filesystem.folder');
$cparams = JComponentHelper::getParams('com_media');
$this->directory = array();
$this->directory['administrator/components'] = array('writable' => is_writable(JPATH_SITE.'/administrator/components'), 'message' => '');
$this->directory['administrator/language'] = array('writable' => is_writable(JPATH_SITE.'/administrator/language'), 'message' => '');
$this->directory['administrator'.DS.'components'] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'components'), 'message' => '');
$this->directory['administrator'.DS.'language'] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'language'), 'message' => '');
// List all admin languages
$admin_langs = JFolder::folders(JPATH_ADMINISTRATOR.'/language');
$admin_langs = JFolder::folders(JPATH_ADMINISTRATOR.DS.'language');
foreach($admin_langs as $alang) {
$this->directory['administrator/language/'.$alang] = array('writable' => is_writable(JPATH_SITE.'/administrator/language/'.$alang), 'message' => '');
$this->directory['administrator'.DS.'language'.DS.$alang] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'language'.DS.$alang), 'message' => '');
}
$this->directory['administrator/modules'] = array('writable' => is_writable(JPATH_SITE.'/administrator/modules'), 'message' => '');
$this->directory['administrator/templates'] = array('writable' => is_writable(JPATH_SITE.'/administrator/templates'), 'message' => '');
$this->directory['administrator'.DS.'modules'] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'modules'), 'message' => '');
$this->directory['administrator'.DS.'templates'] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'templates'), 'message' => '');
$this->directory['components'] = array('writable' => is_writable(JPATH_SITE.'/components'), 'message' => '');
$this->directory['images'] = array('writable' => is_writable(JPATH_SITE.'/images'), 'message' => '');
$this->directory['images/banners'] = array('writable' => is_writable(JPATH_SITE.'/images/banners'), 'message' => '');
$this->directory[$cparams->get('image_path') ] = array('writable' => is_writable(JPATH_SITE.'/'.$cparams->get('image_path')), 'message' => '');
$this->directory['language'] = array('writable' => is_writable(JPATH_SITE.'/language'), 'message' => '');
$this->directory['components'] = array('writable' => is_writable(JPATH_SITE.DS.'components'), 'message' => '');
$this->directory['images'] = array('writable' => is_writable(JPATH_SITE.DS.'images'), 'message' => '');
$this->directory['images'.DS.'banners'] = array('writable' => is_writable(JPATH_SITE.DS.'images'.DS.'banners'), 'message' => '');
$this->directory[$cparams->get('image_path') ] = array('writable' => is_writable(JPATH_SITE.DS.$cparams->get('image_path')), 'message' => '');
$this->directory['language'] = array('writable' => is_writable(JPATH_SITE.DS.'language'), 'message' => '');
// List all site languages
$site_langs = JFolder::folders(JPATH_SITE.'/language');
$site_langs = JFolder::folders(JPATH_SITE.DS.'language');
foreach ($site_langs as $slang) {
$this->directory['language/'.$slang] = array('writable' => is_writable(JPATH_SITE.'/language/'.$slang), 'message' => '');
$this->directory['language'.DS.$slang] = array('writable' => is_writable(JPATH_SITE.DS.'language'.DS.$slang), 'message' => '');
}
$this->directory['media'] = array('writable' => is_writable(JPATH_SITE.'/media'), 'message' => '');
$this->directory['modules'] = array('writable' => is_writable(JPATH_SITE.'/modules'), 'message' => '');
$this->directory['plugins'] = array('writable' => is_writable(JPATH_SITE.'/plugins'), 'message' => '');
$this->directory['plugins/content'] = array('writable' => is_writable(JPATH_SITE.'/plugins/content'), 'message' => '');
$this->directory['plugins/editors'] = array('writable' => is_writable(JPATH_SITE.'/plugins/editors'), 'message' => '');
$this->directory['plugins/editors-xtd'] = array('writable' => is_writable(JPATH_SITE.'/plugins/editors-xtd'), 'message' => '');
$this->directory['plugins/search'] = array('writable' => is_writable(JPATH_SITE.'/plugins/search'), 'message' => '');
$this->directory['plugins/system'] = array('writable' => is_writable(JPATH_SITE.'/plugins/system'), 'message' => '');
$this->directory['plugins/user'] = array('writable' => is_writable(JPATH_SITE.'/plugins/user'), 'message' => '');
$this->directory['cache'] = array('writable' => is_writable(JPATH_SITE.'/cache'), 'message' => 'COM_ADMIN_CACHE_DIRECTORY');
$this->directory['administrator/cache'] = array('writable' => is_writable(JPATH_SITE.'/administrator/cache'), 'message' => 'COM_ADMIN_CACHE_DIRECTORY');
$this->directory['media'] = array('writable' => is_writable(JPATH_SITE.DS.'media'), 'message' => '');
$this->directory['modules'] = array('writable' => is_writable(JPATH_SITE.DS.'modules'), 'message' => '');
$this->directory['plugins'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'), 'message' => '');
$this->directory['plugins'.DS.'content'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'content'), 'message' => '');
$this->directory['plugins'.DS.'editors'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'editors'), 'message' => '');
$this->directory['plugins'.DS.'editors-xtd'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'editors-xtd'), 'message' => '');
$this->directory['plugins'.DS.'search'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'search'), 'message' => '');
$this->directory['plugins'.DS.'system'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'system'), 'message' => '');
$this->directory['plugins'.DS.'user'] = array('writable' => is_writable(JPATH_SITE.DS.'plugins'.DS.'user'), 'message' => '');
$this->directory['cache'] = array('writable' => is_writable(JPATH_SITE.DS.'cache'), 'message' => 'COM_ADMIN_CACHE_DIRECTORY');
$this->directory['administrator'.DS.'cache'] = array('writable' => is_writable(JPATH_SITE.DS.'administrator'.DS.'cache'), 'message' => 'COM_ADMIN_CACHE_DIRECTORY');
$this->directory[$registry->get('log_path', JPATH_ROOT.'/log') ] = array('writable' => is_writable($registry->get('log_path', JPATH_ROOT.'/log')), 'message' => 'COM_ADMIN_LOG_DIRECTORY');
$this->directory[$registry->get('tmp_path', JPATH_ROOT.'/log') ] = array('writable' => is_writable($registry->get('tmp_path', JPATH_ROOT.'/tmp')), 'message' => 'COM_ADMIN_TEMP_DIRECTORY');
$this->directory[$registry->get('log_path', JPATH_ROOT.DS.'log') ] = array('writable' => is_writable($registry->get('log_path', JPATH_ROOT.DS.'log')), 'message' => 'COM_ADMIN_LOG_DIRECTORY');
$this->directory[$registry->get('tmp_path', JPATH_ROOT.DS.'log') ] = array('writable' => is_writable($registry->get('tmp_path', JPATH_ROOT.DS.'tmp')), 'message' => 'COM_ADMIN_TEMP_DIRECTORY');
}
return $this->directory;
}

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Add specific helper files for html generation
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load switcher behavior
JHtml::_('behavior.switcher');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -9,7 +9,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
JHtml::_('behavior.modal', 'a.modal');

View File

@ -113,7 +113,7 @@ class CacheModelCache extends JModelList
'defaultgroup' => '',
'storage' => $conf->get('cache_handler', ''),
'caching' => true,
'cachebase' => ($this->getState('clientId') == 1) ? JPATH_ROOT.'/administrator/cache' : $conf->get('cache_path', JPATH_ROOT.'/cache')
'cachebase' => ($this->getState('clientId') == 1) ? JPATH_ROOT.DS.'administrator'.DS.'cache' : $conf->get('cache_path', JPATH_ROOT.DS.'cache')
);
jimport('joomla.cache.cache');

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -152,7 +152,7 @@ class ConfigControllerApplication extends JController
if (($data = file_get_contents('http://help.joomla.org/helpsites-16.xml')) === false) {
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH'), 'error');
} else if (!JFile::write(JPATH_BASE.'/help/helpsites-16.xml', $data)) {
} else if (!JFile::write(JPATH_BASE.DS.'help'.DS.'helpsites-16.xml', $data)) {
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE'), 'error');
} else {
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_HELPREFRESH_SUCCESS'));

View File

@ -159,7 +159,7 @@ class ConfigModelApplication extends JModelForm
jimport('joomla.filesystem.file');
// Set the configuration file path.
$file = JPATH_CONFIGURATION.'/configuration.php';
$file = JPATH_CONFIGURATION.DS.'configuration.php';
// Overwrite the old FTP credentials with the new ones.
$temp = JFactory::getConfig();
@ -227,7 +227,7 @@ class ConfigModelApplication extends JModelForm
jimport('joomla.filesystem.file');
// Set the configuration file path.
$file = JPATH_CONFIGURATION.'/configuration.php';
$file = JPATH_CONFIGURATION.DS.'configuration.php';
// Overwrite the old FTP credentials with the new ones.
$temp = JFactory::getConfig();

View File

@ -34,7 +34,7 @@ class ConfigModelComponent extends JModelForm
// Set an alternative path for the configuration file.
if ($path = JRequest::getString('path')) {
$path = JPath::clean(JPATH_SITE.'/'.$path);
$path = JPath::clean(JPATH_SITE.DS.$path);
JPath::check($path);
$this->setState('component.path', $path);
}

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectContact');

View File

@ -10,7 +10,7 @@ defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
require_once dirname(__FILE__).'/articles.php';
require_once dirname(__FILE__).DS.'articles.php';
/**
* @package Joomla.Administrator

View File

@ -10,7 +10,7 @@ defined('_JEXEC') or die;
jimport('joomla.application.component.modeladmin');
require_once dirname(__FILE__).'/article.php';
require_once dirname(__FILE__).DS.'article.php';
/**
* Feature model.

View File

@ -8,7 +8,7 @@
// no direct access
defined('_JEXEC') or die;
require_once dirname(__FILE__).'/articles.php';
require_once dirname(__FILE__).DS.'articles.php';
/**
* About Page Model

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectArticle');

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -133,7 +133,7 @@ class InstallerModelInstall extends JModel
// Cleanup the install files
if (!is_file($package['packagefile'])) {
$config = JFactory::getConfig();
$package['packagefile'] = $config->get('tmp_path').'/'.$package['packagefile'];
$package['packagefile'] = $config->get('tmp_path').DS.$package['packagefile'];
}
JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
@ -178,7 +178,7 @@ class InstallerModelInstall extends JModel
// Build the appropriate paths
$config = JFactory::getConfig();
$tmp_dest = $config->get('tmp_path').'/'.$userfile['name'];
$tmp_dest = $config->get('tmp_path').DS.$userfile['name'];
$tmp_src = $userfile['tmp_name'];
// Move uploaded file
@ -259,7 +259,7 @@ class InstallerModelInstall extends JModel
$tmp_dest = $config->get('tmp_path');
// Unpack the downloaded package file
$package = JInstallerHelper::unpack($tmp_dest.'/'.$p_file);
$package = JInstallerHelper::unpack($tmp_dest.DS.$p_file);
return $package;
}

View File

@ -147,7 +147,7 @@ class InstallerModelUpdate extends JModelList
$tmp_dest = $config->get('tmp_path');
// Unpack the downloaded package file
$package = JInstallerHelper::unpack($tmp_dest.'/'.$p_file);
$package = JInstallerHelper::unpack($tmp_dest.DS.$p_file);
// Get an installer instance
$installer = JInstaller::getInstance();
@ -179,7 +179,7 @@ class InstallerModelUpdate extends JModelList
// Cleanup the install files
if (!is_file($package['packagefile'])) {
$config = JFactory::getConfig();
$package['packagefile'] = $config->get('tmp_path').'/'.$package['packagefile'];
$package['packagefile'] = $config->get('tmp_path').DS.$package['packagefile'];
}
JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);

View File

@ -28,7 +28,7 @@ class InstallerViewDefault extends JView
{
$app = JFactory::getApplication();
parent::__construct($config);
$this->_addPath('template', $this->_basePath.'/views/default/tmpl');
$this->_addPath('template', $this->_basePath.DS.'views'.DS.'default'.DS.'tmpl');
$this->_addPath('template', JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_installer/default');
}

View File

@ -165,7 +165,7 @@ class LanguagesModelInstalled extends JModelList
// Compute all the languages
$data = array ();
foreach ($folders as $folder) {
$file = $path.'/'.$folder.'/'.$folder.'.xml';
$file = $path.DS.$folder.DS.$folder.'.xml';
$info = JApplicationHelper::parseXMLLangMetaFile($file);
$row = new JObject();
$row->language = $folder;

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();
$userId = $user->get('id');

View File

@ -54,7 +54,7 @@ class MediaControllerFile extends JController
$file['name'] = JFile::makeSafe($file['name']);
if (isset($file['name'])) {
$filepath = JPath::clean(COM_MEDIA_BASE.'/'.$folder.'/'.strtolower($file['name']));
$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.strtolower($file['name']));
if (!MediaHelper::canUpload($file, $err)) {
jimport('joomla.error.log');

View File

@ -45,7 +45,7 @@ class MediaControllerFile extends JController
$file['name'] = JFile::makeSafe($file['name']);
if (isset($file['name'])) {
$filepath = JPath::clean(COM_MEDIA_BASE.'/'.$folder.'/'.strtolower($file['name']));
$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.strtolower($file['name']));
if (!MediaHelper::canUpload($file, $err)) {
@ -118,7 +118,7 @@ class MediaControllerFile extends JController
continue;
}
$fullPath = JPath::clean(COM_MEDIA_BASE.'/'.$folder.'/'.$path);
$fullPath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.$path);
if (is_file($fullPath)) {
$ret |= !JFile::delete($fullPath);
} else if (is_dir($fullPath)) {

View File

@ -52,7 +52,7 @@ class MediaControllerFolder extends JController
continue;
}
$fullPath = JPath::clean(COM_MEDIA_BASE.'/'.$folder.'/'.$path);
$fullPath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.$path);
if (is_file($fullPath)) {
$ret |= !JFile::delete($fullPath);
} else if (is_dir($fullPath)) {
@ -106,12 +106,12 @@ class MediaControllerFolder extends JController
}
if (strlen($folder) > 0) {
$path = JPath::clean(COM_MEDIA_BASE.'/'.$parent.'/'.$folder);
$path = JPath::clean(COM_MEDIA_BASE.DS.$parent.DS.$folder);
if (!is_dir($path) && !is_file($path)) {
jimport('joomla.filesystem.*');
JFolder::create($path);
$data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>";
JFile::write($path."/index.html", $data);
JFile::write($path.DS."index.html", $data);
}
JRequest::setVar('folder', ($parent) ? $parent.'/'.$folder : $folder);
}

View File

@ -168,10 +168,10 @@ abstract class MediaHelper
$d = dir($dir);
while (false !== ($entry = $d->read())) {
if (substr($entry, 0, 1) != '.' && is_file($dir . DS . $entry) && strpos($entry, '.html') === false && strpos($entry, '.php') === false) {
if (substr($entry, 0, 1) != '.' && is_file($dir . DIRECTORY_SEPARATOR . $entry) && strpos($entry, '.html') === false && strpos($entry, '.php') === false) {
$total_file++;
}
if (substr($entry, 0, 1) != '.' && is_dir($dir . DS . $entry)) {
if (substr($entry, 0, 1) != '.' && is_dir($dir . DIRECTORY_SEPARATOR . $entry)) {
$total_dir++;
}
}

View File

@ -18,7 +18,7 @@ if (!JFactory::getUser()->authorise('core.manage', 'com_media')) {
$params = JComponentHelper::getParams('com_media');
// Load the admin HTML view
require_once JPATH_COMPONENT.'/helpers/media.php';
require_once JPATH_COMPONENT.DS.'helpers'.DS.'media.php';
// Set the path definitions
$popup_upload = JRequest::getCmd('pop_up',null);
@ -29,7 +29,7 @@ if (substr(strtolower($view),0,6) == "images" || $popup_upload == 1) {
$path = "image_path";
}
define('COM_MEDIA_BASE', JPATH_ROOT.'/'.$params->get($path, 'images'));
define('COM_MEDIA_BASE', JPATH_ROOT.DS.$params->get($path, 'images'));
define('COM_MEDIA_BASEURL', JURI::root().$params->get($path, 'images'));
// Include dependancies

View File

@ -81,7 +81,7 @@ class MediaModelList extends JModel
// Initialise variables.
if (strlen($current) > 0) {
$basePath = COM_MEDIA_BASE.'/'.$current;
$basePath = COM_MEDIA_BASE.DS.$current;
} else {
$basePath = COM_MEDIA_BASE;
}
@ -99,10 +99,10 @@ class MediaModelList extends JModel
if ($fileList !== false) {
foreach ($fileList as $file)
{
if (is_file($basePath.'/'.$file) && substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html') {
if (is_file($basePath.DS.$file) && substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html') {
$tmp = new JObject();
$tmp->name = $file;
$tmp->path = str_replace(DS, '/', JPath::clean($basePath.'/'.$file));
$tmp->path = str_replace(DS, '/', JPath::clean($basePath.DS.$file));
$tmp->path_relative = str_replace($mediaBase, '', $tmp->path);
$tmp->size = filesize($tmp->path);
@ -146,15 +146,15 @@ class MediaModelList extends JModel
break;
// Non-image document
default:
// $iconfile_32 = JPATH_ADMINISTRATOR."/components/com_media/images/mime-icon-32/".$ext.".png";
$iconfile_32 = "media/images/media/mime-icon-32/".$ext.".png";
// $iconfile_32 = JPATH_ADMINISTRATOR.DS."components".DS."com_media".DS."images".DS."mime-icon-32".DS.$ext.".png";
$iconfile_32 = "media".DS."images".DS."media".DS."mime-icon-32".DS.$ext.".png";
if (file_exists($iconfile_32)) {
$tmp->icon_32 = "media/mime-icon-32/".$ext.".png";
} else {
$tmp->icon_32 = "media/con_info.png";
}
// $iconfile_16 = JPATH_ADMINISTRATOR."/components/com_media/images/mime-icon-16/".$ext.".png";
$iconfile_16 = "media/images/media/mime-icon-16/".$ext.".png";
// $iconfile_16 = JPATH_ADMINISTRATOR.DS."components".DS."com_media".DS."images".DS."mime-icon-16".DS.$ext.".png";
$iconfile_16 = "media".DS."images".DS."media".DS."mime-icon-16".DS.$ext.".png";
if (file_exists($iconfile_16)) {
$tmp->icon_16 = "media/mime-icon-16/".$ext.".png";
} else {
@ -172,7 +172,7 @@ class MediaModelList extends JModel
foreach ($folderList as $folder) {
$tmp = new JObject();
$tmp->name = basename($folder);
$tmp->path = str_replace(DS, '/', JPath::clean($basePath.'/'.$folder));
$tmp->path = str_replace(DS, '/', JPath::clean($basePath.DS.$folder));
$tmp->path_relative = str_replace($mediaBase, '', $tmp->path);
$count = MediaHelper::countFiles($tmp->path);
$tmp->files = $count[0];

View File

@ -414,11 +414,11 @@ class JFormFieldMenuType extends JFormFieldList
// get the template layouts
// TODO: This should only search one template -- the current template for this item (default of specified)
$folders = JFolder::folders(JPATH_SITE.'/templates','',false,true);
$folders = JFolder::folders(JPATH_SITE.DS.'templates','',false,true);
foreach($folders as $folder)
{
if (JFolder::exists($folder.'/html/'.$component.'/'.$view)) {
$templateLayouts = JFolder::files($folder.'/html/'.$component.'/'.$view, '.xml$', false, true);
if (JFolder::exists($folder.DS.'html'.DS.$component.DS.$view)) {
$templateLayouts = JFolder::files($folder.DS.'html'.DS.$component.DS.$view, '.xml$', false, true);
foreach ($templateLayouts as $layout)
{

View File

@ -10,7 +10,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -10,7 +10,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -10,7 +10,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -28,7 +28,7 @@ class ModulesHelperXML
}
else
{
$data = JApplicationHelper::parseXMLInstallFile($row->path.'/'.$row->file);
$data = JApplicationHelper::parseXMLInstallFile($row->path.DS.$row->file);
if ($data['type'] == 'module')
{

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectNewsfeed');

View File

@ -59,7 +59,7 @@ class SearchHelper
$search_ignore = $lang->getIgnoredSearchWords();
// Deprecated in 1.6 use $lang->getIgnoredSearchWords instead
$ignoreFile = $lang->getLanguagePath().'/'.$tag.'/'.$tag.'.ignore.php';
$ignoreFile = $lang->getLanguagePath().DS.$tag.DS.$tag.'.ignore.php';
if (file_exists($ignoreFile)) {
include $ignoreFile;
}

View File

@ -9,7 +9,7 @@
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$field = JRequest::getVar('field');
$function = 'jSelectUser_'.$field;

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -49,7 +49,7 @@ class WeblinksViewWeblinks extends JView
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT.'/helpers/weblinks.php';
require_once JPATH_COMPONENT.DS.'helpers'.DS.'weblinks.php';
$state = $this->get('State');
$canDo = WeblinksHelper::getActions($state->get('filter.category_id'));

View File

@ -257,7 +257,7 @@ class JAdministrator extends JApplication
$template->template = JFilterInput::getInstance()->clean($template->template, 'cmd');
$template->params = new JRegistry($template->params);
if (!file_exists(JPATH_THEMES.'/'.$template->template.'/index.php'))
if (!file_exists(JPATH_THEMES.DS.$template->template.DS.'index.php'))
{
$template->params = new JRegistry();
$template->template = 'bluestork';

View File

@ -19,10 +19,10 @@ array_pop($parts);
define('JPATH_ROOT', implode(DS, $parts));
define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_ADMINISTRATOR', JPATH_ROOT.'/administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.'/libraries');
define('JPATH_PLUGINS', JPATH_ROOT.'/plugins');
define('JPATH_INSTALLATION', JPATH_ROOT.'/installation');
define('JPATH_THEMES', JPATH_BASE.'/templates');
define('JPATH_CACHE', JPATH_BASE.'/cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR.'/manifests');
define('JPATH_ADMINISTRATOR', JPATH_ROOT.DS.'administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.DS.'libraries');
define('JPATH_PLUGINS', JPATH_ROOT.DS.'plugins');
define('JPATH_INSTALLATION', JPATH_ROOT.DS.'installation');
define('JPATH_THEMES', JPATH_BASE.DS.'templates');
define('JPATH_CACHE', JPATH_BASE.DS.'cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR.DS.'manifests');

View File

@ -20,7 +20,7 @@ defined('_JEXEC') or die;
/*
* Installation check, and check on removal of the install directory.
*/
if (!file_exists(JPATH_CONFIGURATION.'/configuration.php') || (filesize(JPATH_CONFIGURATION.'/configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION.'/index.php')*/) {
if (!file_exists(JPATH_CONFIGURATION.DS.'configuration.php') || (filesize(JPATH_CONFIGURATION.DS.'configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION.DS.'index.php')*/) {
header('Location: ../installation/index.php');
exit();
}
@ -30,10 +30,10 @@ if (!file_exists(JPATH_CONFIGURATION.'/configuration.php') || (filesize(JPATH_CO
*/
// System includes.
require_once JPATH_LIBRARIES.'/joomla/import.php';
require_once JPATH_LIBRARIES.DS.'joomla'.DS.'import.php';
// Pre-Load configuration.
require_once JPATH_CONFIGURATION.'/configuration.php';
require_once JPATH_CONFIGURATION.DS.'configuration.php';
// System configuration.
$CONFIG = new JConfig();

View File

@ -11,10 +11,10 @@ define('_JEXEC', 1);
define('JPATH_BASE', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);
require_once JPATH_BASE.'/includes/defines.php';
require_once JPATH_BASE.'/includes/framework.php';
require_once JPATH_BASE.'/includes/helper.php';
require_once JPATH_BASE.'/includes/toolbar.php';
require_once JPATH_BASE.DS.'includes'.DS.'defines.php';
require_once JPATH_BASE.DS.'includes'.DS.'framework.php';
require_once JPATH_BASE.DS.'includes'.DS.'helper.php';
require_once JPATH_BASE.DS.'includes'.DS.'toolbar.php';
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;

View File

@ -14,7 +14,7 @@ defined('_JEXEC') or die;
// Get additional language strings prefixed with TPL_HATHOR
$lang = JFactory::getLanguage();
$lang->load('tpl_hathor', JPATH_ADMINISTRATOR)
|| $lang->load('tpl_hathor', JPATH_ADMINISTRATOR.'/templates/hathor/language');
|| $lang->load('tpl_hathor', JPATH_ADMINISTRATOR.DS.'templates/hathor/language');
?>

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script','system/multiselect.js',false,true);
JHtml::_('behavior.modal', 'a.modal');

View File

@ -12,7 +12,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectContact');

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectArticle');

View File

@ -12,7 +12,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();
$userId = $user->get('id');

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -12,7 +12,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$user = JFactory::getUser();

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -11,7 +11,7 @@
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectNewsfeed');

View File

@ -104,7 +104,7 @@ $saveOrder = $listOrder == 'ordering';
$canChange = $user->authorise('core.edit.state', 'com_plugins') && $canCheckin;
// $lang = JFactory::getLanguage();
// $lang->load($item->name, JPATH_ADMINISTRATOR)
// || $lang->load ($item->name, JPATH_PLUGINS.'/'.$item->folder.'/'.$item->element);
// || $lang->load ($item->name, JPATH_PLUGINS.DS.$item->folder.DS.$item->element);
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">

View File

@ -10,7 +10,7 @@
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = 'jSelectUser_'.JRequest::getVar('field');
?>

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script','system/multiselect.js',false,true);
$user = JFactory::getUser();

View File

@ -1,2 +1,3 @@
<?php
include dirname(__FILE__).'/'.'component.php';?>
include dirname(__FILE__).DIRECTORY_SEPARATOR.'component.php';
?>

View File

@ -164,7 +164,7 @@ class ContactControllerContact extends JController
$SiteName = $app->getCfg('sitename');
$contactId = JRequest::getVar('contact_id', 0, '', 'int');
// Get a Contact table object and load the selected contact details
JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_contact/tables');
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_contact'.DS.'tables');
$contact = JTable::getInstance('contact', 'Table');
$contact->load($contactId);
$user = JFactory::getUser();
@ -211,7 +211,7 @@ class ContactControllerContact extends JController
$middlename = trim($middlename);
// Create a new vcard object and populate the fields
require_once JPATH_ADMINISTRATOR.'/components/com_contact/helpers/vcard.php';
require_once JPATH_ADMINISTRATOR.DS.'components'.DS.'com_contact'.DS.'helpers'.DS.'vcard.php';
$v = new JvCard();
$v->setPhoneNumber($contact->telephone, 'PREF;WORK;VOICE');

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space

View File

@ -10,7 +10,7 @@
// No direct access
defined('_JEXEC') or die;
require_once dirname(__FILE__) . '/articles.php';
require_once dirname(__FILE__) . DS . 'articles.php';
/**
* Content Component Archive Model

View File

@ -10,7 +10,7 @@
// No direct access
defined('_JEXEC') or die;
require_once dirname(__FILE__) . '/articles.php';
require_once dirname(__FILE__) . DS . 'articles.php';
/**
* Frontpage Component Model

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
$pageClass = $this->params->get('pageclass_sfx');
?>
<div class="archive<?php echo $pageClass;?>">

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
$params = &$this->params;
?>

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// Create shortcut to parameters.
$params = $this->item->params;

View File

@ -10,7 +10,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
$pageClass = $this->params->get('pageclass_sfx');
?>

View File

@ -17,7 +17,7 @@ $canEdit = $this->user->authorise('core.edit', 'com_content.category.');
$canCreate = $this->user->authorise('core.create', 'com_content');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::core();

View File

@ -11,7 +11,7 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space

View File

@ -13,7 +13,7 @@ defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
jimport('joomla.application.component.helper');
require_once JPATH_COMPONENT.'/controller.php';
require_once JPATH_COMPONENT.DS.'controller.php';
$controller = JController::getInstance('Mailto');
$controller->registerDefaultTask('mailto');

View File

@ -55,7 +55,7 @@ class MediaController extends JController
// Get/Create the view
$view = $this->getView($vName, $vType);
$view->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.'/views/'.strtolower($vName).'/tmpl');
$view->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'views'.DS.strtolower($vName).DS.'tmpl');
// Get/Create the model
if ($model = $this->getModel($mName)) {

View File

@ -108,10 +108,10 @@ class MediaHelper
$d = dir($dir);
while (false !== ($entry = $d->read())) {
if (substr($entry, 0, 1) != '.' && is_file($dir . DS . $entry) && strpos($entry, '.html') === false && strpos($entry, '.php') === false) {
if (substr($entry, 0, 1) != '.' && is_file($dir . DIRECTORY_SEPARATOR . $entry) && strpos($entry, '.html') === false && strpos($entry, '.php') === false) {
$total_file++;
}
if (substr($entry, 0, 1) != '.' && is_dir($dir . DS . $entry)) {
if (substr($entry, 0, 1) != '.' && is_dir($dir . DIRECTORY_SEPARATOR . $entry)) {
$total_dir++;
}
}

View File

@ -28,14 +28,14 @@ if (!$user->authorise('com_media', 'popup')) {
}
// Set the path definitions
define('COM_MEDIA_BASE', JPATH_ROOT.'/'.$params->get('image_path', 'images'));
define('COM_MEDIA_BASE', JPATH_ROOT.DS.$params->get('image_path', 'images'));
define('COM_MEDIA_BASEURL', JURI::root().'/'.$params->get('image_path', 'images'));
// Load the admin HTML view
require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/media.php';
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'media.php';
// Require the base controller
require_once JPATH_COMPONENT.'/controller.php';
require_once JPATH_COMPONENT.DS.'controller.php';
$cmd = JRequest::getCmd('task', null);
if (strpos($cmd, '.') != false)
@ -45,7 +45,7 @@ if (strpos($cmd, '.') != false)
// Define the controller name and path
$controllerName = strtolower($controllerName);
$controllerPath = JPATH_COMPONENT_ADMINISTRATOR.'/controllers/'.$controllerName.'.php';
$controllerPath = JPATH_COMPONENT_ADMINISTRATOR.DS.'controllers'.DS.$controllerName.'.php';
// If the controller file path exists, include it ... else lets die with a 500 error
if (file_exists($controllerPath)) {
@ -69,8 +69,8 @@ if (class_exists($controllerClass)) {
}
// Set the model and view paths to the administrator folders
$controller->addViewPath(JPATH_COMPONENT_ADMINISTRATOR.'/views');
$controller->addModelPath(JPATH_COMPONENT_ADMINISTRATOR.'/models');
$controller->addViewPath(JPATH_COMPONENT_ADMINISTRATOR.DS.'views');
$controller->addModelPath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models');
// Perform the Request task
$controller->execute($task);

View File

@ -13,7 +13,7 @@ defined('_JEXEC') or die;
// Require the com_content helper library
jimport('joomla.application.component.controller');
require_once JPATH_COMPONENT.'/helpers/route.php';
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/tables');
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
$controller = JController::getInstance('Newsfeeds');
$controller->execute(JRequest::getCmd('task'));

View File

@ -81,7 +81,7 @@ class NewsfeedsViewNewsfeed extends JView
$item->parent_slug = $item->category_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id;
// check if cache directory is writeable
$cacheDir = JPATH_BASE.'/cache/';
$cacheDir = JPATH_BASE.DS.'cache'.DS;
if (!is_writable($cacheDir)) {
echo JText::_('CACHE_DIRECTORY_UNWRITABLE');

View File

@ -24,7 +24,7 @@ class SearchViewSearch extends JView
{
function display($tpl = null)
{
require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/search.php';
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'search.php';
// Initialise some variables
$app = JFactory::getApplication();
@ -108,7 +108,7 @@ class SearchViewSearch extends JView
$total = $this->get('total');
$pagination = $this->get('pagination');
require_once JPATH_SITE.'/components/com_content/helpers/route.php';
require_once JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php';
for ($i=0; $i < count($results); $i++)
{

View File

@ -10,7 +10,7 @@
// No direct access.
defined('_JEXEC') or die;
require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/weblink.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'models' . DS . 'weblink.php';
/**
* Weblinks model.

View File

@ -212,7 +212,7 @@ final class JSite extends JApplication
$this->setUserState('users.login.form.data',array( 'return' => $return ) );
$file = 'offline';
}
if (!is_dir(JPATH_THEMES.'/'.$template->template) && !$this->getCfg('offline')) {
if (!is_dir(JPATH_THEMES.DS.$template->template) && !$this->getCfg('offline')) {
$file = 'component';
}
$params = array(
@ -435,10 +435,10 @@ final class JSite extends JApplication
$template->template = JFilterInput::getInstance()->clean($template->template, 'cmd'); // need to filter the default value as well
// Fallback template
if (!file_exists(JPATH_THEMES.'/'.$template->template.'/index.php')) {
if (!file_exists(JPATH_THEMES.DS.$template->template.DS.'index.php')) {
JError::raiseWarning(0, JText::_('JERROR_ALERTNOTEMPLATE'));
$template->template = 'beez_20';
if (!file_exists(JPATH_THEMES.'/beez_20/index.php')) {
if (!file_exists(JPATH_THEMES.DS.'beez_20'.DS.'index.php')) {
$template->template = '';
}
}
@ -458,7 +458,7 @@ final class JSite extends JApplication
*/
public function setTemplate($template)
{
if (is_dir(JPATH_THEMES.'/'.$template)) {
if (is_dir(JPATH_THEMES.DS.$template)) {
$this->template = new stdClass();
$this->template->params = new JRegistry;
$this->template->template = $template;

View File

@ -23,10 +23,10 @@ define('JPATH_ROOT', implode(DS, $parts));
define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_ADMINISTRATOR', JPATH_ROOT.'/administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.'/libraries');
define('JPATH_PLUGINS', JPATH_ROOT.'/plugins' );
define('JPATH_INSTALLATION', JPATH_ROOT.'/installation');
define('JPATH_THEMES', JPATH_BASE.'/templates');
define('JPATH_CACHE', JPATH_BASE.'/cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR.'/manifests');
define('JPATH_ADMINISTRATOR', JPATH_ROOT.DS.'administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.DS.'libraries');
define('JPATH_PLUGINS', JPATH_ROOT.DS.'plugins' );
define('JPATH_INSTALLATION', JPATH_ROOT.DS.'installation');
define('JPATH_THEMES', JPATH_BASE.DS.'templates');
define('JPATH_CACHE', JPATH_BASE.DS.'cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR.DS.'manifests');

View File

@ -21,9 +21,9 @@ defined('_JEXEC') or die;
// Installation check, and check on removal of the install directory.
//
if (!file_exists(JPATH_CONFIGURATION.'/configuration.php') || (filesize(JPATH_CONFIGURATION.'/configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION.'/index.php')*/) {
if (!file_exists(JPATH_CONFIGURATION.DS.'configuration.php') || (filesize(JPATH_CONFIGURATION.DS.'configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION.DS.'index.php')*/) {
if (file_exists(JPATH_INSTALLATION.'/index.php')) {
if (file_exists(JPATH_INSTALLATION.DS.'index.php')) {
header('Location: '.substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'],'index.php')).'installation/index.php');
exit();
} else {

View File

@ -231,7 +231,7 @@ class JRouterSite extends JRouter
$component = preg_replace('/[^A-Z0-9_\.-]/i', '', $this->_vars['option']);
// Use the component routing handler if it exists
$path = JPATH_SITE.'/components/'.$component.'/router.php';
$path = JPATH_SITE.DS.'components'.DS.$component.DS.'router.php';
if (file_exists($path) && count($segments)) {
if ($component != "com_search") { // Cheap fix on searches
@ -288,7 +288,7 @@ class JRouterSite extends JRouter
$tmp = '';
// Use the component routing handler if it exists
$path = JPATH_SITE.'/components/'.$component.'/router.php';
$path = JPATH_SITE.DS.'components'.DS.$component.DS.'router.php';
// Use the custom routing handler if it exists
if (file_exists($path) && !empty($query)) {

View File

@ -11,8 +11,8 @@ define('_JEXEC', 1);
define('JPATH_BASE', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);
require_once JPATH_BASE.'/includes/defines.php';
require_once JPATH_BASE.'/includes/framework.php';
require_once JPATH_BASE.DS.'includes'.DS.'defines.php';
require_once JPATH_BASE.DS.'includes'.DS.'framework.php';
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;

View File

@ -27,6 +27,9 @@ $ -> Language fix or change
- -> Removed
! -> Note
26-Aug-2010 Ian MacLennan
# [!21949] Reverted systematic elimination of DS as directory separator
26-Aug-2010 Jean-Marie Simonet
# [#22044] Menu level filter wording. Thanks Bill.

View File

@ -222,7 +222,7 @@ class JInstallation extends JApplication
*/
public function getLocalise()
{
$xml = JFactory::getXML(JPATH_SITE.'/installation/localise.xml');
$xml = JFactory::getXML(JPATH_SITE.DS.'installation'.DS.'localise.xml');
if( ! $xml)
{
@ -256,7 +256,7 @@ class JInstallation extends JApplication
jimport('joomla.filesystem.folder');
// Read the files in the admin area
$path = JLanguage::getLanguagePath(JPATH_SITE.'/administrator');
$path = JLanguage::getLanguagePath(JPATH_SITE.DS.'administrator');
$langfiles['admin'] = JFolder::folders($path);
$path = JLanguage::getLanguagePath(JPATH_SITE);

View File

@ -33,12 +33,12 @@ array_pop($parts);
define('JPATH_ROOT', implode(DS, $parts));
define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_ADMINISTRATOR', JPATH_ROOT.'/administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.'/libraries');
define('JPATH_PLUGINS', JPATH_ROOT.'/plugins');
define('JPATH_INSTALLATION', JPATH_ROOT.'/installation');
define('JPATH_ADMINISTRATOR', JPATH_ROOT.DS.'administrator');
define('JPATH_LIBRARIES', JPATH_ROOT.DS.'libraries');
define('JPATH_PLUGINS', JPATH_ROOT.DS.'plugins');
define('JPATH_INSTALLATION', JPATH_ROOT.DS.'installation');
define('JPATH_THEMES', JPATH_BASE);
define('JPATH_CACHE', JPATH_ROOT.'/cache');
define('JPATH_CACHE', JPATH_ROOT.DS.'cache');
/*
* Joomla system checks.
@ -50,7 +50,7 @@ error_reporting(E_ALL);
/*
* Check for existing configuration file.
*/
if (file_exists(JPATH_CONFIGURATION.'/configuration.php') && (filesize(JPATH_CONFIGURATION.'/configuration.php') > 10) && !file_exists(JPATH_INSTALLATION.'/index.php')) {
if (file_exists(JPATH_CONFIGURATION.DS.'configuration.php') && (filesize(JPATH_CONFIGURATION.DS.'configuration.php') > 10) && !file_exists(JPATH_INSTALLATION.DS.'index.php')) {
header('Location: ../index.php');
exit();
}
@ -60,7 +60,7 @@ if (file_exists(JPATH_CONFIGURATION.'/configuration.php') && (filesize(JPATH_CON
*/
// Bootstrap the Joomla Framework.
require_once JPATH_LIBRARIES.'/joomla/import.php';
require_once JPATH_LIBRARIES.DS.'joomla'.DS.'import.php';
// Joomla library imports.
jimport('joomla.database.table');

View File

@ -116,8 +116,8 @@ class JInstallationModelConfiguration extends JModel
/* Feed Settings */
$registry->set('feed_limit', 10);
$registry->set('log_path', JPATH_ROOT.'/logs');
$registry->set('tmp_path', JPATH_ROOT.'/tmp');
$registry->set('log_path', JPATH_ROOT.DS.'logs');
$registry->set('tmp_path', JPATH_ROOT.DS.'tmp');
/* Session Setting */
$registry->set('lifetime', 15);
@ -128,13 +128,13 @@ class JInstallationModelConfiguration extends JModel
// Build the configuration file path.
$path = JPATH_CONFIGURATION.'/configuration.php';
$path = JPATH_CONFIGURATION.DS.'configuration.php';
// Determine if the configuration file path is writable.
if (file_exists($path)) {
$canWrite = is_writable($path);
} else {
$canWrite = is_writable(JPATH_CONFIGURATION.'/');
$canWrite = is_writable(JPATH_CONFIGURATION.DS);
}
/*

View File

@ -89,7 +89,7 @@ class JInstallationModelFilesystem extends JModel
// Check all possible paths for the real Joomla installation by comparing version files.
$rootPath = false;
$checkValue = file_get_contents(JPATH_LIBRARIES.'/joomla/version.php');
$checkValue = file_get_contents(JPATH_LIBRARIES.DS.'joomla'.DS.'version.php');
foreach($paths as $tmp)
{
$filePath = rtrim($tmp, '/').'/libraries/joomla/version.php';
@ -197,7 +197,7 @@ class JInstallationModelFilesystem extends JModel
}
// Verify valid root path, part two
$checkValue = file_get_contents(JPATH_LIBRARIES.'/joomla/version.php');
$checkValue = file_get_contents(JPATH_LIBRARIES.DS.'joomla'.DS.'version.php');
if ($buffer !== $checkValue) {
$ftp->quit();
$this->setError(JText::_('INSTL_FTP_INVALIDROOT'));
@ -349,7 +349,7 @@ class JInstallationModelFilesystem extends JModel
}
// Verify valid root path, part two
$checkValue = file_get_contents(JPATH_LIBRARIES.'/joomla/version.php');
$checkValue = file_get_contents(JPATH_LIBRARIES.DS.'joomla'.DS.'version.php');
if ($buffer !== $checkValue) {
$ftp->quit();
$this->setError(JText::_('INSTL_FTP_INVALIDROOT'));
@ -405,7 +405,7 @@ class JInstallationModelFilesystem extends JModel
$ftpRoot = $options->ftpRoot;
// Determine if the path is "chmodable".
if (!JPath::canChmod(JPath::clean(JPATH_SITE.'/'.$folder))) {
if (!JPath::canChmod(JPath::clean(JPATH_SITE.DS.$folder))) {
$ftpFlag = true;
}
@ -437,7 +437,7 @@ class JInstallationModelFilesystem extends JModel
} else
{
$path = JPath::clean(JPATH_SITE.'/'.$folder);
$path = JPath::clean(JPATH_SITE.DS.$folder);
if (!@ chmod($path, octdec('0755')))
{

View File

@ -104,7 +104,7 @@ class JApplication extends JObject
}
// Create the configuration object.
$this->_createConfiguration(JPATH_CONFIGURATION.'/'.$config['config_file']);
$this->_createConfiguration(JPATH_CONFIGURATION.DS.$config['config_file']);
// Create the session if a session name is passed.
if ($config['session'] !== false) {
@ -139,7 +139,7 @@ class JApplication extends JObject
jimport('joomla.application.helper');
$info = JApplicationHelper::getClientInfo($client, true);
$path = $info->path.'/includes/application.php';
$path = $info->path.DS.'includes'.DS.'application.php';
if (file_exists($path)) {
require_once $path;

Some files were not shown because too many files have changed in this diff Show More