load('files_joomla.sys', JPATH_SITE, null, false, false) // Fallback to the files_joomla file in the default language || $lang->load('files_joomla.sys', JPATH_SITE, null, true); /** * A command line cron job to attempt to remove files that should have been deleted at update. * * @package Joomla.CLI * @since 3.0 */ class DeletefilesCli extends JApplicationCli { /** * Entry point for CLI script * * @return void * * @since 3.0 */ public function doExecute() { // Import the dependencies jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); // We need the update script JLoader::register('JoomlaInstallerScript', JPATH_ADMINISTRATOR . '/components/com_admin/script.php'); // Instantiate the class $class = new JoomlaInstallerScript; // Run the delete method $class->deleteUnexistingFiles(); } } // Instantiate the application object, passing the class name to JCli::getInstance // and use chaining to execute the application. JApplicationCli::getInstance('DeletefilesCli')->execute();