View of /mambo/branches/4.6/administrator/components/com_installer/template/template.class.php
Parent Directory
|
Revision Log
Revision 151 -
(download)
(annotate)
Thu Jan 19 14:24:56 2006 UTC (7 years, 3 months ago) by csouza
File size: 1723 byte(s)
Thu Jan 19 14:24:56 2006 UTC (7 years, 3 months ago) by csouza
File size: 1723 byte(s)
csouza - Merging 4.5.4 changes (revisions 139 to 148) into 4.6.
<?php /** * @version $Id: template.class.php,v 1.1 2005/07/22 01:52:34 eddieajau Exp $ * @package Mambo * @copyright (C) 2000 - 2005 Miro International Pty Ltd * @subpackage Installer * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * Mambo is Free Software */ /** ensure this file is being included by a parent file */ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); // ensure user has access to this function if (!$acl->acl_check( 'administration', 'manage', 'users', $GLOBALS['my']->usertype, 'components', 'com_templates' )) { mosRedirect( 'index2.php', _NOT_AUTH ); } /** * Template installer * @package Mambo * @subpackage Installer */ class mosInstallerTemplate extends mosInstaller { /** * Template uninstall method * @param int The id of the module * @param string The URL option * @param int The client id */ function uninstall( $id, $option, $client=0 ) { $mosConfig_absolute_path = mamboCore::get('mosConfig_absolute_path'); // Delete directories $path = mosPathName($mosConfig_absolute_path . ($client == 'admin' ? '/administrator' : '' ) . '/templates/' . $id); $filesindir = mosReadDirectory($path, '.xml$'); if (count($filesindir) > 0) { foreach ($filesindir as $file) { $parser = new mosUninstallXML ($path.$file); $parser->uninstall(); if ($parser->terminalError) { var_dump ($parser->errors); return false; } } } else { // no XML - just delete the template directory $tdir = new mosDirectory($path); $tdir->deleteAll(); } return true; } /** * return to method */ function returnTo( $option, $element, $client ) { return "index2.php?option=com_templates&client=$client"; } } ?>
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

