View of /trunk/install.ionfiles.php
Parent Directory
|
Revision Log
Revision 2 -
(download)
(annotate)
Sat Mar 7 02:50:39 2009 UTC (4 years, 3 months ago) by andphe
File size: 2193 byte(s)
Sat Mar 7 02:50:39 2009 UTC (4 years, 3 months ago) by andphe
File size: 2193 byte(s)
+ first fixed files for version control
<?php
//////////////////////////////////////////////
// FileName: ionFile.php
// Date: 03/04/2008
// License: GNU General Public License
// Script Version #: 1.3
// MOS Version #: 4.5 and 4.5.1+
//
//////////////////////////////////////////////
if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
function com_install()
{
if(defined( '_JEXEC' )) {
define( '_IMAGEPATH_', JPATH_ROOT .'administrator/components/com_ionfiles/images/');
} else {
define( '_IMAGEPATH_', '../administrator/components/com_ionfiles/images/');
}
if (defined( '_JEXEC' )) { // 1.5
// This gets the database object using the JFactory class
$database = &JFactory::getDBO();
}
else {
// Use the Joomla 1.0 database
global $database;
}
// Do not set the menu images for Joom 1.5
if(!defined( '_JEXEC' )) {
// Change the menu Images
$database->setQuery("SELECT id FROM #__components WHERE name= 'ionFiles'");
$id =$database->loadResult();
// Change the default image
$database->setQuery("UPDATE #__components SET admin_menu_img = '"._IMAGEPATH_."transfolder.png' WHERE id = $id");
$database->query();
}
// Make sure the user has the new 4.3 table columns
// This if for upgrading users only
$database->setQuery("ALTER TABLE #__ionfile ADD archived int(11) NOT NULL default '0'");
$database->query();
$database->setQuery("ALTER TABLE #__ionfile_conf ADD show_archive int(11) NOT NULL default '0'");
$database->query();
$database->setQuery("ALTER TABLE #__ionfile_conf ADD allow_category int(11) NOT NULL default '0'");
$database->query();
$database->setQuery("ALTER TABLE #__ionfile_conf ADD show_search int(11) NOT NULL default '0'");
$database->query();
// 4.4 DB Addons....
$database->setQuery("ALTER TABLE #__ionfile_conf ADD search_pos int(11) NOT NULL default '0'");
$database->query();
$database->setQuery("ALTER TABLE #__ionfile_conf ADD disable_search int(11) NOT NULL default '0'");
$database->query();
}
?>
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

