29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-08-26 13:09:46 +00:00

All installation routines use tmp/ instead of media/ -- remove media/

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@3175 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
Louis Landry 2006-04-20 16:54:46 +00:00
parent 9e0f04b1c8
commit 2568f81884
9 changed files with 24 additions and 17 deletions

View File

@ -37,6 +37,11 @@ Legend:
- -> Removed
! -> Note
20-Apr-2006 Louis Landry
+ setVar method to JRequest
# Fix error in JCache::remove method causing problems with auto state storage
^ Installation and temporary files are handled in the tmp/ folder -- not media/
20-Apr-2006 David Gal
+ Moved loading of sample data in installation to MainConfig step. Implemented with xajax
+ Added possibility of uploading and executing sql scripts during installation

View File

@ -410,7 +410,7 @@ class HTML_admin_misc
mosHTML::writableCell( 'plugins/system' );
mosHTML::writableCell( 'plugins/user' );
mosHTML::writableCell( 'plugins/xmlrpc' );
mosHTML::writableCell( 'media' );
mosHTML::writableCell( 'tmp' );
mosHTML::writableCell( 'modules' );
mosHTML::writableCell( 'templates' );
mosHTML::writableCell( $mosConfig_cachepath, 0, '<strong>'. JText::_( 'Cache Directory' ) .'</strong> ' );

View File

@ -234,7 +234,7 @@ class JConfigController {
$lists['hits'] = mosHTML::RadioList($show_hide_r, 'hits', 'class="inputbox"', $row->hits, 'value', 'text');
if (is_writable(JPATH_SITE.DS.'media'.DS)) {
if (is_writable(JPATH_SITE.DS.'tmp'.DS)) {
$lists['hidePdf'] = mosHTML::RadioList($show_hide, 'hidePdf', 'class="inputbox"', $row->hidePdf, 'value', 'text');
} else {
$lists['hidePdf'] = '<input type="hidden" name="hidePdf" value="1" /><strong>Hide</strong>';

View File

@ -88,12 +88,12 @@ class JInstallerController
* Move uploaded file
*/
jimport('joomla.filesystem.file');
$uploaded = JFile::upload($userfile['tmp_name'], JPATH_SITE.DS.'media'.DS.$userfile['name']);
$uploaded = JFile::upload($userfile['tmp_name'], JPATH_SITE.DS.'tmp'.DS.$userfile['name']);
/*
* Unpack the downloaded package file
*/
$package = JInstallerHelper::unpack(JPATH_SITE.DS.'media'.DS.$userfile['name']);
$package = JInstallerHelper::unpack(JPATH_SITE.DS.'tmp'.DS.$userfile['name']);
/*
* Was the package unpacked?
@ -118,7 +118,7 @@ class JInstallerController
$msg = sprintf(JText::_('INSTALLEXT'), $package['type'], JText::_('Error'));
JInstallerScreens::showInstallMessage($msg, $installer->description, $installer->message);
// Cleanup the install files
JInstallerHelper::cleanupInstall(JPATH_SITE.DS.'media'.DS.$userfile['name'], $package['extractdir']);
JInstallerHelper::cleanupInstall(JPATH_SITE.DS.'tmp'.DS.$userfile['name'], $package['extractdir']);
} else {
/*
* Package installed sucessfully
@ -126,7 +126,7 @@ class JInstallerController
$msg = sprintf(JText::_('INSTALLEXT'), $package['type'], JText::_('Success'));
JInstallerScreens::showInstallMessage($msg, $installer->description, $installer->message);
// Cleanup the install files
JInstallerHelper::cleanupInstall(JPATH_SITE.DS.'media'.DS.$userfile['name'], $package['extractdir']);
JInstallerHelper::cleanupInstall(JPATH_SITE.DS.'tmp'.DS.$userfile['name'], $package['extractdir']);
}
}

View File

@ -471,7 +471,7 @@ class JInstallationController
'plugins/editors',
'plugins/search',
'plugins/system',
'media',
'tmp',
'modules',
'templates',
);
@ -504,7 +504,7 @@ class JInstallationController
*/
$vars['siteUrl'] = $mainframe->getSiteURL();
$vars['secret'] = JAuthenticateHelper::genRandomPassword(16);
$vars['hidePdf'] = intval(!is_writable(JPATH_SITE.DS.'media'.DS));
$vars['hidePdf'] = intval(!is_writable(JPATH_SITE.DS.'tmp'.DS));
$vars['cachePath'] = JPATH_SITE.DS.'cache';
/*
@ -1034,12 +1034,12 @@ class JInstallationHelper
* Move uploaded file
*/
jimport('joomla.filesystem.file');
$uploaded = JFile::upload($sqlFile['tmp_name'], JPATH_SITE.DS.'media'.DS.$sqlFile['name']);
$uploaded = JFile::upload($sqlFile['tmp_name'], JPATH_SITE.DS.'tmp'.DS.$sqlFile['name']);
if( !eregi('.sql$', $sqlFile['name']) ){
$archive = JPATH_SITE.DS.'media'.DS.$sqlFile['name'];
$archive = JPATH_SITE.DS.'tmp'.DS.$sqlFile['name'];
$script = JFile::stripExt($archive).'.sql';
} else {
$script = JPATH_SITE.DS.'media'.DS.$sqlFile['name'];
$script = JPATH_SITE.DS.'tmp'.DS.$sqlFile['name'];
}
// unpack archived sql files

View File

@ -1141,10 +1141,10 @@ class JInstallerHelper
*/
if (!$target)
{
$target = JPATH_SITE.DS.'media'.DS.JInstallerHelper::getFilenameFromURL($url);
$target = JPATH_SITE.DS.'tmp'.DS.JInstallerHelper::getFilenameFromURL($url);
} else
{
$target = JPATH_SITE.DS.'media'.DS.basename($target);
$target = JPATH_SITE.DS.'tmp'.DS.basename($target);
}
/*
@ -1423,12 +1423,12 @@ class JInstallerHelper
{
JFile::delete($p_file);
}
elseif (is_file(JPath::clean(JPATH_SITE.DS.'media'.DS.$p_file, false)))
elseif (is_file(JPath::clean(JPATH_SITE.DS.'tmp'.DS.$p_file, false)))
{
/*
* It might also be just a base filename
*/
JFile::delete(JPath::clean(JPATH_SITE.DS.'media'.DS.$p_file, false));
JFile::delete(JPath::clean(JPATH_SITE.DS.'tmp'.DS.$p_file, false));
}
}

View File

@ -43,7 +43,7 @@ define ("K_PATH_MAIN", JPATH_LIBRARIES.DS."tcpdf".DS);
/**
* url path
*/
define ("K_PATH_URL", $mainframe->getCfg( 'live_site' ));
define ("K_PATH_URL", $mainframe->getBaseURL());
/**
* path for PDF fonts

View File

@ -2289,7 +2289,9 @@ if(!class_exists('TCPDF')) {
//Allow for additional formats
$mtd='_parse'.$type;
if(!method_exists($this,$mtd)) {
$this->Error('Unsupported image type: '.$type);
// Graceful error handling
return false;
//$this->Error('Unsupported image type: '.$type);
}
$info=$this->$mtd($file);
}