[Joomla-commits] r22957 - in development/trunk: administrator/components administrator/components/com_admin/sql/updates/mysql administrator/components/com_admin/sql/updates/sqlazure administrator/components/com_admin/sql/updates/sqlsrv administrator/components/com_installer/models administrator/components/com_joomlaupdate administrator/components/com_joomlaupdate/controllers administrator/components/com_joomlaupdate/helpers administrator/components/com_joomlaupdate/models administrator/components/com_joomlaupdate/views administrator/components/com_joomlaupdate/views/default administrator/components/com_joomlaupdate/views/default/tmpl administrator/components/com_joomlaupdate/views/update administrator/components/com_joomlaupdate/views/update/tmpl installation installation/sql/mysql media media/com_joomlaupdate plugins/quickicon/joomlaupdate

297 views
Skip to first unread message

githu...@jcode001.directrouter.com

unread,
Mar 28, 2012, 2:36:44 PM3/28/12
to joomla-...@joomlacode.org
Author: github_bot
Date: 2012-03-28 13:36:44 -0500 (Wed, 28 Mar 2012)
New Revision: 22957

Added:
development/trunk/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql
development/trunk/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql
development/trunk/administrator/components/com_admin/sql/updates/sqlsrv/2.5.4-2012-03-18.sql
development/trunk/administrator/components/com_joomlaupdate/
development/trunk/administrator/components/com_joomlaupdate/config.xml
development/trunk/administrator/components/com_joomlaupdate/controller.php
development/trunk/administrator/components/com_joomlaupdate/controllers/
development/trunk/administrator/components/com_joomlaupdate/controllers/index.html
development/trunk/administrator/components/com_joomlaupdate/controllers/update.php
development/trunk/administrator/components/com_joomlaupdate/helpers/
development/trunk/administrator/components/com_joomlaupdate/helpers/download.php
development/trunk/administrator/components/com_joomlaupdate/helpers/index.html
development/trunk/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php
development/trunk/administrator/components/com_joomlaupdate/helpers/select.php
development/trunk/administrator/components/com_joomlaupdate/index.html
development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.php
development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.xml
development/trunk/administrator/components/com_joomlaupdate/models/
development/trunk/administrator/components/com_joomlaupdate/models/default.php
development/trunk/administrator/components/com_joomlaupdate/models/index.html
development/trunk/administrator/components/com_joomlaupdate/restore.php
development/trunk/administrator/components/com_joomlaupdate/views/
development/trunk/administrator/components/com_joomlaupdate/views/default/
development/trunk/administrator/components/com_joomlaupdate/views/default/index.html
development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/
development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/default.php
development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/index.html
development/trunk/administrator/components/com_joomlaupdate/views/default/view.html.php
development/trunk/administrator/components/com_joomlaupdate/views/index.html
development/trunk/administrator/components/com_joomlaupdate/views/update/
development/trunk/administrator/components/com_joomlaupdate/views/update/index.html
development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/
development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/default.php
development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/index.html
development/trunk/administrator/components/com_joomlaupdate/views/update/view.html.php
development/trunk/media/com_joomlaupdate/
development/trunk/media/com_joomlaupdate/default.js
development/trunk/media/com_joomlaupdate/encryption.js
development/trunk/media/com_joomlaupdate/json2.js
development/trunk/media/com_joomlaupdate/update.js
Modified:
development/trunk/administrator/components/com_installer/models/update.php
development/trunk/installation/CHANGELOG
development/trunk/installation/sql/mysql/joomla.sql
development/trunk/installation/sql/mysql/sample_blog.sql
development/trunk/installation/sql/mysql/sample_brochure.sql
development/trunk/installation/sql/mysql/sample_data.sql
development/trunk/plugins/quickicon/joomlaupdate/joomlaupdate.php
Log:
Merge branch 'master' of github.com:joomla/joomla-cms

Added: development/trunk/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql
===================================================================
--- development/trunk/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql (rev 0)
+++ development/trunk/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,5 @@
+INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
+(28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
+
+INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
+(22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1);

Added: development/trunk/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql
===================================================================
--- development/trunk/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql (rev 0)
+++ development/trunk/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,13 @@
+SET IDENTITY_INSERT #__extensions ON;
+
+INSERT INTO #__extensions (extension_id, name, type, element, folder, client_id, enabled, access, protected, manifest_cache, params, custom_data, system_data, checked_out, checked_out_time, ordering, state)
+SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0;
+
+SET IDENTITY_INSERT #__extensions OFF;
+
+SET IDENTITY_INSERT #__menu ON;
+
+INSERT INTO #__menu (id, menutype, title, alias, note, path, link, type, published, parent_id, level, component_id, ordering, checked_out, checked_out_time, browserNav, access, img, template_style_id, params, lft, rgt, home, language, client_id)
+SELECT 22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1;
+
+SET IDENTITY_INSERT #__menu OFF;

Added: development/trunk/administrator/components/com_admin/sql/updates/sqlsrv/2.5.4-2012-03-18.sql
===================================================================
--- development/trunk/administrator/components/com_admin/sql/updates/sqlsrv/2.5.4-2012-03-18.sql (rev 0)
+++ development/trunk/administrator/components/com_admin/sql/updates/sqlsrv/2.5.4-2012-03-18.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,13 @@
+SET IDENTITY_INSERT #__extensions ON;
+
+INSERT INTO #__extensions (extension_id, name, type, element, folder, client_id, enabled, access, protected, manifest_cache, params, custom_data, system_data, checked_out, checked_out_time, ordering, state)
+SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0;
+
+SET IDENTITY_INSERT #__extensions OFF;
+
+SET IDENTITY_INSERT #__menu ON;
+
+INSERT INTO #__menu (id, menutype, title, alias, note, path, link, type, published, parent_id, level, component_id, ordering, checked_out, checked_out_time, browserNav, access, img, template_style_id, params, lft, rgt, home, language, client_id)
+SELECT 22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1;
+
+SET IDENTITY_INSERT #__menu OFF;

Modified: development/trunk/administrator/components/com_installer/models/update.php
===================================================================
--- development/trunk/administrator/components/com_installer/models/update.php 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/administrator/components/com_installer/models/update.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -78,6 +78,9 @@
// Filter by extension_id
if ($eid = $this->getState('filter.extension_id')) {
$query->where($db->nq('extension_id') . ' = ' . $db->q((int) $eid));
+ } else {
+ $query->where($db->nq('extension_id').' != '.$db->q(0));
+ $query->where($db->nq('extension_id').' != '.$db->q(700));
}

return $query;

Added: development/trunk/administrator/components/com_joomlaupdate/config.xml
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/config.xml (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/config.xml 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<config>
+ <fieldset
+ name="sources"
+ label="COM_JOOMLAUPDATE_CONFIG_SOURCES_LABEL"
+ description="COM_JOOMLAUPDATE_CONFIG_SOURCES_DESC"
+ >
+
+ <field
+ name="updatesource"
+ type="list"
+ default="lts"
+ label="COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_LABEL"
+ description="COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DESC"
+ >
+ <option value="lts">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_LTS</option>
+ <option value="sts">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_STS</option>
+ <option value="testing">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_TESTING</option>
+ <option value="custom">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_CUSTOM</option>
+ <option value="nochange">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NOCHANGE</option>
+ </field>
+
+ <field
+ name="customurl"
+ type="text"
+ default=""
+ length="50"
+ label="COM_JOOMLAUPDATE_CONFIG_CUSTOMURL_LABEL"
+ description="COM_JOOMLAUPDATE_CONFIG_CUSTOMURL_DESC"
+ />
+ </fieldset>
+
+ <fieldset
+ name="permissions"
+ label="JCONFIG_PERMISSIONS_LABEL"
+ description="JCONFIG_PERMISSIONS_DESC"
+ >
+
+ <field
+ name="rules"
+ type="rules"
+ label="JCONFIG_PERMISSIONS_LABEL"
+ filter="rules"
+ validate="rules"
+ component="com_joomlaupdate"
+ section="component">
+ <!-- Using simplified actions definition -->
+ <action
+ name="core.admin"
+ title="JACTION_ADMIN"
+ description="JACTION_ADMIN_COMPONENT_DESC" />
+ <action
+ name="core.manage"
+ title="JACTION_MANAGE"
+ description="JACTION_MANAGE_COMPONENT_DESC" />
+ <action
+ name="core.delete"
+ title="JACTION_DELETE"
+ description="JACTION_DELETE_COMPONENT_DESC" />
+ <action
+ name="core.edit.state"
+ title="JACTION_EDITSTATE"
+ description="JACTION_EDITSTATE_COMPONENT_DESC" />
+ </field>
+ </fieldset>
+</config>
\ No newline at end of file

Added: development/trunk/administrator/components/com_joomlaupdate/controller.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/controller.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/controller.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License, see LICENSE.php
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+jimport('joomla.application.component.controller');
+
+/**
+ * Joomla! Update Controller
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @since 2.5.2
+ */
+class JoomlaupdateController extends JController
+{
+ /**
+ * Method to display a view.
+ *
+ * @param boolean If true, the view output will be cached
+ * @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
+ *
+ * @return JController This object to support chaining.
+ * @since 2.5.2
+ */
+ public function display($cachable = false, $urlparams = false)
+ {
+ // Get the document object.
+ $document = JFactory::getDocument();
+
+ // Set the default view name and format from the Request.
+ $vName = JRequest::getCmd('view', 'default');
+ $vFormat = $document->getType();
+ $lName = JRequest::getCmd('layout', 'default');
+
+ // Get and render the view.
+ if ($view = $this->getView($vName, $vFormat)) {
+ $ftp = JClientHelper::setCredentialsFromRequest('ftp');
+ $view->assignRef('ftp', $ftp);
+
+ // Get the model for the view.
+ $model = $this->getModel($vName);
+
+ // Perform update source preference check and refresh update information
+ $model->applyUpdateSite();
+ $model->refreshUpdates();
+
+ // Push the model into the view (as default).
+ $view->setModel($model, true);
+ $view->setLayout($lName);
+
+ // Push document object into the view.
+ $view->assignRef('document', $document);
+ $view->display();
+ }
+
+ return $this;
+ }
+}

Added: development/trunk/administrator/components/com_joomlaupdate/controllers/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/controllers/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/controllers/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/controllers/update.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/controllers/update.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/controllers/update.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,170 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 2.5.2
+ */
+
+defined('_JEXEC') or die;
+
+jimport('joomla.application.component.controller');
+
+/**
+ * The Joomla! update controller for the Update view
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @since 2.5.2
+ */
+class JoomlaupdateControllerUpdate extends JController
+{
+ /**
+ * Performs the download of the update package
+ *
+ * @return void
+ *
+ * @since 2.5.2
+ */
+ public function download()
+ {
+ $this->_applyCredentials();
+
+ $model = $this->getModel('Default');
+ $file = $model->download();
+
+ $message = null;
+ $messageType = null;
+
+ if ($file)
+ {
+ JFactory::getApplication()->setUserState('com_joomlaupdate.file', $file);
+ $url = 'index.php?option=com_joomlaupdate&task=update.install';
+ }
+ else
+ {
+ JFactory::getApplication()->setUserState('com_joomlaupdate.file', null);
+ $url = 'index.php?option=com_joomlaupdate';
+ $message = JText::_('COM_JOOMLAUPDATE_VIEW_UPDATE_DOWNLOADFAILED');
+ }
+
+ $this->setRedirect($url, $message, $messageType);
+ }
+
+ /**
+ * Start the installation of the new Joomla! version
+ *
+ * @return void
+ */
+ public function install()
+ {
+ $this->_applyCredentials();
+
+ $model = $this->getModel('Default');
+
+ $file = JFactory::getApplication()->getUserState('com_joomlaupdate.file', null);
+ $model->createRestorationFile($file);
+
+ $this->display();
+ }
+
+ /**
+ * Finalise the upgrade by running the necessary scripts
+ *
+ * @return void
+ */
+ public function finalise()
+ {
+ $this->_applyCredentials();
+
+ $model = $this->getModel('Default');
+
+ $model->finaliseUpgrade();
+
+ $url = 'index.php?option=com_joomlaupdate&task=update.cleanup';
+ $this->setRedirect($url);
+ }
+
+ /**
+ * Clean up after ourselves
+ *
+ * @return void
+ */
+ public function cleanup()
+ {
+ $this->_applyCredentials();
+
+ $model = $this->getModel('Default');
+
+ $model->cleanUp();
+
+ $url = 'index.php?option=com_joomlaupdate';
+ $this->setRedirect($url);
+ }
+
+ /**
+ * Method to display a view.
+ *
+ * @param boolean If true, the view output will be cached
+ * @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
+ *
+ * @return JController This object to support chaining.
+ * @since 2.5.2
+ */
+ public function display($cachable = false, $urlparams = false)
+ {
+ // Get the document object.
+ $document = JFactory::getDocument();
+
+ // Set the default view name and format from the Request.
+ $vName = JRequest::getCmd('view', 'update');
+ $vFormat = $document->getType();
+ $lName = JRequest::getCmd('layout', 'default');
+
+ // Get and render the view.
+ if ($view = $this->getView($vName, $vFormat)) {
+ // Get the model for the view.
+ $model = $this->getModel('Default');
+
+ // Push the model into the view (as default).
+ $view->setModel($model, true);
+ $view->setLayout($lName);
+
+ // Push document object into the view.
+ $view->assignRef('document', $document);
+ $view->display();
+ }
+
+ return $this;
+ }
+
+ /**
+ * Applies FTP credentials to Joomla! itself, when required
+ *
+ * @return void
+ */
+ protected function _applyCredentials()
+ {
+ jimport('joomla.client.helper');
+
+ if (!JClientHelper::hasCredentials('ftp'))
+ {
+ $user = JFactory::getApplication()->getUserStateFromRequest('com_joomlaupdate.ftp_user', 'ftp_user', null, 'raw');
+ $pass = JFactory::getApplication()->getUserStateFromRequest('com_joomlaupdate.ftp_pass', 'ftp_pass', null, 'raw');
+
+ if ($user != '' && $pass != '')
+ {
+ // Add credentials to the session
+ if (JClientHelper::setCredentials('ftp', $user, $pass))
+ {
+ $return = false;
+ }
+ else
+ {
+ $return = JError::raiseWarning('SOME_ERROR_CODE', JText::_('JLIB_CLIENT_ERROR_HELPER_SETCREDENTIALSFROMREQUEST_FAILED'));
+ }
+ }
+ }
+ }
+}
\ No newline at end of file

Added: development/trunk/administrator/components/com_joomlaupdate/helpers/download.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/helpers/download.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/helpers/download.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,430 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+/**
+ * Smart download helper. Automatically uses cURL or URL fopen() wrappers to
+ * fetch the package.
+ *
+ * @package Joomla.Administrator
+ * @since 2.5.2
+ */
+class AdmintoolsHelperDownload
+{
+ /**
+ * Downloads from a URL and saves the result as a local file
+ *
+ * @param string $url The URL to download from
+ * @param string $target The file path to download to
+ *
+ * @return bool True on success
+ */
+ public static function download($url, $target)
+ {
+ // Import Joomla! libraries
+ jimport('joomla.filesystem.file');
+
+ $hackPermissions = false;
+
+ // Make sure the target does not exist
+ if (JFile::exists($target))
+ {
+ if (!@unlink($target))
+ {
+ JFile::delete($target);
+ }
+ }
+
+ // Try to open the output file for writing
+ $fp = @fopen($target, 'wb');
+ if ($fp === false)
+ {
+ // The file can not be opened for writing. Let's try a hack.
+ $empty = '';
+ if ( JFile::write($target, $empty) )
+ {
+ if ( self::chmod($target, 511) )
+ {
+ $fp = @fopen($target, 'wb');
+ $hackPermissions = true;
+ }
+ }
+ }
+
+ $result = false;
+ if ($fp !== false)
+ {
+ // First try to download directly to file if $fp !== false
+ $adapters = self::getAdapters();
+ $result = false;
+ while (!empty($adapters) && ($result === false))
+ {
+ // Run the current download method
+ $method = 'get' . strtoupper(array_shift($adapters));
+ $result = self::$method($url, $fp);
+
+ // Check if we have a download
+ if ($result === true)
+ {
+
+ // The download is complete, close the file pointer
+ @fclose($fp);
+
+ // If the filesize is not at least 1 byte, we consider it failed.
+ clearstatcache();
+ $filesize = @filesize($target);
+ if ($filesize <= 0)
+ {
+ $result = false;
+ $fp = @fopen($target, 'wb');
+ }
+ }
+ }
+
+ // If we have no download, close the file pointer
+ if ($result === false)
+ {
+ @fclose($fp);
+ }
+ }
+
+ if ($result === false)
+ {
+
+ // Delete the target file if it exists
+ if (file_exists($target))
+ {
+ if ( !@unlink($target) )
+ {
+ JFile::delete($target);
+ }
+ }
+
+ // Download and write using JFile::write();
+ $result = JFile::write($target, self::downloadAndReturn($url));
+ }
+
+ return $result;
+ }
+
+ /**
+ * Downloads from a URL and returns the result as a string
+ *
+ * @param string $url The URL to download from
+ *
+ * @return mixed Result string on success, false on failure
+ */
+ public static function downloadAndReturn($url)
+ {
+ $adapters = self::getAdapters();
+ $result = false;
+
+ while (!empty($adapters) && ($result === false))
+ {
+
+ // Run the current download method
+ $method = 'get' . strtoupper(array_shift($adapters));
+ $result = self::$method($url, null);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Does the server support PHP's cURL extension?
+ *
+ * @return bool True if it is supported
+ */
+ private static function hasCURL()
+ {
+ static $result = null;
+
+ if (is_null($result))
+ {
+ $result = function_exists('curl_init');
+ }
+
+ return $result;
+ }
+
+ /**
+ * Downloads the contents of a URL and writes them to disk (if $fp is not null)
+ * or returns them as a string (if $fp is null)
+ *
+ * @param string $url The URL to download from
+ * @param resource $fp The file pointer to download to. Omit to return the contents.
+ * @param boolean $nofollow Should we follow 301/302/307 redirection HTTP headers?
+ *
+ * @return bool|string False on failure, true on success ($fp not null) or the URL contents (if $fp is null)
+ */
+ private static function &getCURL($url, $fp = null, $nofollow = false)
+ {
+ $result = false;
+
+ $ch = curl_init($url);
+
+ if ( !@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1) && !$nofollow )
+ {
+
+ // Safe Mode is enabled. We have to fetch the headers and
+ // parse any redirections present in there.
+ curl_setopt($ch, CURLOPT_AUTOREFERER, true);
+ curl_setopt($ch, CURLOPT_FAILONERROR, true);
+ curl_setopt($ch, CURLOPT_HEADER, true);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+
+ // Get the headers
+ $data = curl_exec($ch);
+ curl_close($ch);
+
+ // Init
+ $newURL = $url;
+
+ // Parse the headers
+ $lines = explode("\n", $data);
+ foreach ($lines as $line)
+ {
+ if (substr($line, 0, 9) == "Location:")
+ {
+ $newURL = trim(substr($line, 9));
+ }
+ }
+
+ if ($url != $newURL)
+ {
+ return self::getCURL($newURL, $fp);
+ }
+ else
+ {
+ return self::getCURL($newURL, $fp, true);
+ }
+ }
+ else
+ {
+ @curl_setopt($ch, CURLOPT_MAXREDIRS, 20);
+ if (function_exists('set_time_limit'))
+ {
+ set_time_limit(0);
+ }
+ }
+
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_setopt($ch, CURLOPT_USERAGENT, 'Joomla/' . JVERSION);
+
+ if (is_resource($fp))
+ {
+ curl_setopt($ch, CURLOPT_FILE, $fp);
+ }
+ else
+ {
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ }
+
+ $result = curl_exec($ch);
+ curl_close($ch);
+
+ return $result;
+ }
+
+ /**
+ * Does the server support URL fopen() wrappers?
+ *
+ * @return bool
+ */
+ private static function hasFOPEN()
+ {
+ static $result = null;
+
+ if (is_null($result))
+ {
+
+ // If we are not allowed to use ini_get, we assume that URL fopen is
+ // disabled.
+ if (!function_exists('ini_get'))
+ {
+ $result = false;
+ }
+ else
+ {
+ $result = ini_get('allow_url_fopen');
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Download from a URL using URL fopen() wrappers
+ *
+ * @param string $url The URL to download from
+ * @param resource $fp The file pointer to download to; leave null to return the d/l file as a string
+ *
+ * @return bool|string False on failure, true on success ($fp not null) or the URL contents (if $fp is null)
+ */
+ private static function &getFOPEN($url, $fp = null)
+ {
+ $result = false;
+
+ // Track errors
+ if ( function_exists('ini_set') )
+ {
+ $track_errors = ini_set('track_errors', true);
+ }
+
+ // Open the URL for reading
+ if (function_exists('stream_context_create'))
+ {
+ $httpopts = array('user_agent' => 'Joomla/' . JVERSION);
+ $context = stream_context_create(array( 'http' => $httpopts ));
+ $ih = @fopen($url, 'r', false, $context);
+ }
+ else
+ {
+
+ // PHP 4 way (actually, it's just a fallback)
+ if ( function_exists('ini_set') )
+ {
+ ini_set('user_agent', 'Joomla/' . JVERSION);
+ }
+ $ih = @fopen($url, 'r');
+ }
+
+ // If fopen() fails, abort
+ if ( !is_resource($ih) )
+ {
+ return $result;
+ }
+
+ // Try to download
+ $bytes = 0;
+ $result = true;
+ $return = '';
+ while (!feof($ih) && $result)
+ {
+ $contents = fread($ih, 4096);
+ if ($contents === false)
+ {
+ @fclose($ih);
+ $result = false;
+ return $result;
+ }
+ else
+ {
+ $bytes += strlen($contents);
+ if (is_resource($fp))
+ {
+ $result = @fwrite($fp, $contents);
+ }
+ else
+ {
+ $return .= $contents;
+ unset($contents);
+ }
+ }
+ }
+
+ @fclose($ih);
+
+ if (is_resource($fp))
+ {
+ return $result;
+ }
+ elseif ( $result === true )
+ {
+ return $return;
+ }
+ else
+ {
+ return $result;
+ }
+ }
+
+ /**
+ * Detect and return available download "adapters" (not really adapters, as
+ * we don't follow the Adapter pattern, yet)
+ *
+ * @return array
+ */
+ private static function getAdapters()
+ {
+ // Detect available adapters
+ $adapters = array();
+ if (self::hasCURL())
+ {
+ $adapters[] = 'curl';
+ }
+ if (self::hasFOPEN())
+ {
+ $adapters[] = 'fopen';
+ }
+ return $adapters;
+ }
+
+ /**
+ * Change the permissions of a file, optionally using FTP
+ *
+ * @param string $path Absolute path to file
+ * @param int $mode Permissions, e.g. 0755
+ *
+ * @return boolean True on success
+ */
+ private static function chmod($path, $mode)
+ {
+ if (is_string($mode))
+ {
+ $mode = octdec($mode);
+ if ( ($mode < 0600) || ($mode > 0777) )
+ {
+ $mode = 0755;
+ }
+ }
+
+ // Initialize variables
+ jimport('joomla.client.helper');
+ $ftpOptions = JClientHelper::getCredentials('ftp');
+
+ // Check to make sure the path valid and clean
+ $path = JPath::clean($path);
+
+ if ($ftpOptions['enabled'] == 1)
+ {
+
+ // Connect the FTP client
+ jimport('joomla.client.ftp');
+ $ftp = &JFTP::getInstance(
+ $ftpOptions['host'], $ftpOptions['port'], null,
+ $ftpOptions['user'], $ftpOptions['pass']
+ );
+ }
+
+ if (@chmod($path, $mode))
+ {
+ $ret = true;
+ }
+ elseif ($ftpOptions['enabled'] == 1)
+ {
+
+ // Translate path and delete
+ jimport('joomla.client.ftp');
+ $path = JPath::clean(str_replace(JPATH_ROOT, $ftpOptions['root'], $path), '/');
+
+ // FTP connector throws an error
+ $ret = $ftp->chmod($path, $mode);
+ } else
+ {
+ return false;
+ }
+ }
+
+}

Added: development/trunk/administrator/components/com_joomlaupdate/helpers/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/helpers/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/helpers/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+/**
+ * Joomla! update helper.
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @since 2.5.2
+ */
+class JoomlaupdateHelper
+{
+ /**
+ * Gets a list of the actions that can be performed.
+ *
+ * @return JObject
+ *
+ * @since 2.5.2
+ */
+ public static function getActions()
+ {
+ $user = JFactory::getUser();
+ $result = new JObject;
+
+ $assetName = 'com_joomlaupdate';
+
+ $actions = array(
+ 'core.admin', 'core.manage', 'core.edit.state', 'core.delete'
+ );
+
+ foreach ($actions as $action)
+ {
+ $result->set($action, $user->authorise($action, $assetName));
+ }
+
+ return $result;
+ }
+}

Added: development/trunk/administrator/components/com_joomlaupdate/helpers/select.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/helpers/select.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/helpers/select.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+/**
+ * Joomla! update selection list helper.
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @since 2.5.2
+ */
+class JoomlaupdateHelperSelect
+{
+ /**
+ * Returns an HTML select element with the different extraction modes
+ *
+ * @param string $default The default value of the select element
+ *
+ * @return string
+ */
+ public static function getMethods($default = 'direct')
+ {
+ $options = array();
+ $options[] = JHtml::_('select.option', 'direct', JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_DIRECT'));
+ $options[] = JHtml::_('select.option', 'ftp', JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_FTP'));
+
+ return JHtml::_('select.genericlist', $options, 'method', '', 'value', 'text', $default, 'extraction_method');
+ }
+}

Added: development/trunk/administrator/components/com_joomlaupdate/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 1.0
+ */
+
+// no direct access
+defined('_JEXEC') or die;
+
+// Access check.
+if (!JFactory::getUser()->authorise('core.manage', 'com_joomlaupdate')) {
+ return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
+}
+
+// Include dependancies
+jimport('joomla.application.component.controller');
+
+$controller = JController::getInstance('Joomlaupdate');
+$controller->execute(JRequest::getCmd('task'));
+$controller->redirect();

Added: development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.xml
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.xml (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/joomlaupdate.xml 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<extension type="component" version="2.5" method="upgrade">
+ <name>com_joomlaupdate</name>
+ <author>Joomla! Project</author>
+ <creationDate>February 2012</creationDate>
+ <copyright>(C) 2005 - 2012 Open Source Matters. All rights reserved. </copyright>
+ <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
+ <authorEmail>ad...@joomla.org</authorEmail>
+ <authorUrl>www.joomla.org</authorUrl>
+ <version>2.5.0</version>
+ <description>COM_JOOMLAUPDATE_XML_DESCRIPTION</description>
+ <administration>
+ <files folder="admin">
+ <filename>config.xml</filename>
+ <filename>controller.php</filename>
+ <filename>index.html</filename>
+ <filename>joomlaupdate.php</filename>
+ <filename>restore.php</filename>
+ <folder>controllers</folder>
+ <folder>helpers</folder>
+ <folder>models</folder>
+ <folder>views</folder>
+ </files>
+ <languages folder="admin">
+ <language tag="en-GB">language/en-GB.com_joomlaupdate.ini
+ </language>
+ </languages>
+ </administration>
+</extension>
+

Added: development/trunk/administrator/components/com_joomlaupdate/models/default.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/models/default.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/models/default.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,666 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_installer
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+jimport('joomla.application.component.model');
+
+/**
+ * Joomla! update overview Model
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @author nikosdion <nich...@dionysopoulos.me>
+ * @since 2.5.2
+ */
+class JoomlaupdateModelDefault extends JModel
+{
+ /**
+ * Detects if the Joomla! update site currently in use matches the one
+ * configured in this component. If they don't match, it changes it.
+ *
+ * @return void
+ *
+ * @since 2.5.2
+ */
+ public function applyUpdateSite()
+ {
+ // Determine the intended update URL
+ $params = JComponentHelper::getParams('com_joomlaupdate');
+ switch ($params->get('updatesource', 'nochange'))
+ {
+ // "Long Term Support (LTS) branch - Recommended"
+ case 'lts':
+ $updateURL = 'http://update.joomla.org/core/list.xml';
+ break;
+
+ // "Short term support (STS) branch"
+ case 'sts':
+ $updateURL = 'http://update.joomla.org/core/sts/list_sts.xml';
+ break;
+
+ // "Testing"
+ case 'testing':
+ $updateURL = 'http://update.joomla.org/core/test/list_test.xml';
+ break;
+
+ // "Custom"
+ case 'custom':
+ $updateURL = $params->get('customurl', '');
+ break;
+
+ // "Do not change"
+ case 'nochange':
+ default:
+ return;
+ break;
+ }
+
+ $db = $this->getDbo();
+ $query = $db->getQuery(true)
+ ->select($db->nq('us') . '.*')
+ ->from(
+ $db->nq('#__update_sites_extensions') . ' AS ' . $db->nq('map')
+ )
+ ->innerJoin(
+ $db->nq('#__update_sites') . ' AS ' . $db->nq('us') . ' ON (' .
+ $db->nq('us') . '.' . $db->nq('update_site_id') . ' = ' .
+ $db->nq('map') . '.' . $db->nq('update_site_id') . ')'
+ )
+ ->where(
+ $db->nq('map') . '.' . $db->nq('extension_id') . ' = ' . $db->q(700)
+ );
+ $db->setQuery($query);
+ $update_site = $db->loadObject();
+
+ if ($update_site->location != $updateURL)
+ {
+ // Modify the database record
+ $update_site->last_check_timestamp = 0;
+ $update_site->location = $updateURL;
+ $db->updateObject('#__update_sites', $update_site, 'update_site_id');
+ }
+ }
+
+ /**
+ * Makes sure that the Joomla! update cache is up-to-date
+ *
+ * @param bool $force Force reload, ignoring the cache timeout
+ *
+ * @return void
+ *
+ * @since 2.5.2
+ */
+ public function refreshUpdates($force = false)
+ {
+ if ($force)
+ {
+ $cache_timeout = 0;
+ }
+ else
+ {
+ $update_params = JComponentHelper::getParams('com_installer');
+ $cache_timeout = $update_params->get('cachetimeout', 6, 'int');
+ $cache_timeout = 3600 * $cache_timeout;
+ }
+ $updater = JUpdater::getInstance();
+ $results = $updater->findUpdates(700, $cache_timeout);
+ }
+
+ /**
+ * Returns an array with the Joomla! update information
+ *
+ * @since 2.5.2
+ * @return array
+ */
+ public function getUpdateInformation()
+ {
+ // Initialise the return array
+ $ret = array(
+ 'installed' => JVERSION,
+ 'latest' => null,
+ 'object' => null
+ );
+
+ // Fetch the update information from the database
+ $db = $this->getDbo();
+ $query = $db->getQuery(true)
+ ->select('*')
+ ->from($db->nq('#__updates'))
+ ->where($db->nq('extension_id') . ' = ' . $db->q(700));
+ $db->setQuery($query);
+ $updateObject = $db->loadObject();
+
+ if (is_null($updateObject))
+ {
+ $ret['latest'] = JVERSION;
+ return $ret;
+ }
+ else
+ {
+ $ret['latest'] = $updateObject->version;
+ }
+
+ // Fetch the full udpate details from the update details URL
+ jimport('joomla.updater.update');
+ $update = new JUpdate;
+ $update->loadFromXML($updateObject->detailsurl);
+
+ // Pass the update object
+ if($ret['latest'] == JVERSION) {
+ $ret['object'] = null;
+ } else {
+ $ret['object'] = $update;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Returns an array with the configured FTP options
+ *
+ * @since 2.5.2
+ * @return array
+ */
+ public function getFTPOptions()
+ {
+ $config = JFactory::getConfig();
+ return array(
+ 'host' => $config->get('ftp_host'),
+ 'port' => $config->get('ftp_port'),
+ 'username' => $config->get('ftp_user'),
+ 'password' => $config->get('ftp_pass'),
+ 'directory' => $config->get('ftp_root'),
+ 'enabled' => $config->get('ftp_enable'),
+ );
+ }
+
+ /**
+ * Downloads the update package to the site
+ *
+ * @return bool|string False on failure, basename of the file in any other case
+ *
+ * @since 2.5.2
+ */
+ public function download()
+ {
+ $updateInfo = $this->getUpdateInformation();
+ $packageURL = $updateInfo['object']->downloadurl->_data;
+ $basename = basename($packageURL);
+
+ // Find the path to the temp directory and the local package
+ $jreg = JFactory::getConfig();
+ $tempdir = $jreg->getValue('config.tmp_path');
+ $target = $tempdir . '/' . $basename;
+
+ // Do we have a cached file?
+ jimport('joomla.filesystem.file');
+ $exists = JFile::exists($target);
+
+ if (!$exists)
+ {
+
+ // Not there, let's fetch it
+ return $this->downloadPackage($packageURL, $target);
+ }
+ else
+ {
+ // Is it a 0-byte file? If so, re-download please.
+ $filesize = @filesize($target);
+ if(empty($filesize)) return $this->downloadPackage($packageURL, $target);
+
+ // Yes, it's there, skip downloading
+ return $basename;
+ }
+ }
+
+ /**
+ * Downloads a package file to a specific directory
+ *
+ * @param string $url The URL to download from
+ * @param string $target The directory to store the file
+ *
+ * @return boolean True on success
+ * @since 2.5.2
+ */
+ protected function downloadPackage($url, $target)
+ {
+ JLoader::import('helpers.download', JPATH_COMPONENT_ADMINISTRATOR);
+ $result = AdmintoolsHelperDownload::download($url, $target);
+ if(!$result)
+ {
+ return false;
+ }
+ else
+ {
+ return basename($target);
+ }
+ }
+
+ public function createRestorationFile($basename = null)
+ {
+ // Get a password
+ jimport('joomla.user.helper');
+ $password = JUserHelper::genRandomPassword(32);
+ JFactory::getApplication()->setUserState('com_joomlaupdate.password', $password);
+
+ // Do we have to use FTP?
+ $method = JRequest::getCmd('method', 'direct');
+
+ // Get the absolute path to site's root
+ $siteroot = JPATH_SITE;
+
+ // If the package name is not specified, get it from the update info
+ if (empty($basename))
+ {
+ $updateInfo = $this->getUpdateInformation();
+ $packageURL = $updateInfo['object']->downloadurl->_data;
+ $basename = basename($packageURL);
+ }
+
+ // Get the package name
+ $tempdir = JFactory::getConfig()->getValue('config.tmp_path');
+ $file = $tempdir . '/' . $basename;
+
+ $filesize = @filesize($file);
+ JFactory::getApplication()->setUserState('com_joomlaupdate.password', $password);
+ JFactory::getApplication()->setUserState('com_joomlaupdate.filesize', $filesize);
+
+ $data = "<?php\ndefined('_AKEEBA_RESTORATION') or die('Restricted access');\n";
+ $data .= '$restoration_setup = array('."\n";
+ $data .= <<<ENDDATA
+ 'kickstart.security.password' => '$password',
+ 'kickstart.tuning.max_exec_time' => '5',
+ 'kickstart.tuning.run_time_bias' => '75',
+ 'kickstart.tuning.min_exec_time' => '0',
+ 'kickstart.procengine' => '$method',
+ 'kickstart.setup.sourcefile' => '$file',
+ 'kickstart.setup.destdir' => '$siteroot',
+ 'kickstart.setup.restoreperms' => '0',
+ 'kickstart.setup.filetype' => 'zip',
+ 'kickstart.setup.dryrun' => '0'
+ENDDATA;
+
+ if ($method == 'ftp')
+ {
+ // Fetch the FTP parameters from the request. Note: The password should be
+ // allowed as raw mode, otherwise something like !@<sdf34>43H% would be
+ // sanitised to !@43H% which is just plain wrong.
+ $ftp_host = JRequest::getVar('ftp_host','');
+ $ftp_port = JRequest::getVar('ftp_port', '21');
+ $ftp_user = JRequest::getVar('ftp_user', '');
+ $ftp_pass = JRequest::getVar('ftp_pass', '', 'default', 'none', 2);
+ $ftp_root = JRequest::getVar('ftp_root', '');
+
+ // Is the tempdir really writable?
+ $writable = @is_writeable($tempdir);
+ if($writable) {
+ // Let's be REALLY sure
+ $fp = @fopen($tempdir.'/test.txt','w');
+ if($fp === false) {
+ $writable = false;
+ } else {
+ fclose($fp);
+ unlink($tempdir.'/test.txt');
+ }
+ }
+
+ // If the tempdir is not writable, create a new writable subdirectory
+ if(!$writable) {
+ jimport('joomla.client.ftp');
+ jimport('joomla.client.helper');
+ jimport('joomla.filesystem.folder');
+
+ $FTPOptions = JClientHelper::getCredentials('ftp');
+ $ftp = & JFTP::getInstance($FTPOptions['host'], $FTPOptions['port'], null, $FTPOptions['user'], $FTPOptions['pass']);
+ $dest = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $tempdir.'/admintools'), '/');
+ if(!@mkdir($tempdir.'/admintools')) $ftp->mkdir($dest);
+ if(!@chmod($tempdir.'/admintools', 511)) $ftp->chmod($dest, 511);
+
+ $tempdir .= '/admintools';
+ }
+
+ // Just in case the temp-directory was off-root, try using the default tmp directory
+ $writable = @is_writeable($tempdir);
+ if(!$writable) {
+ $tempdir = JPATH_ROOT.'/tmp';
+
+ // Does the JPATH_ROOT/tmp directory exist?
+ if(!is_dir($tempdir)) {
+ jimport('joomla.filesystem.folder');
+ jimport('joomla.filesystem.file');
+ JFolder::create($tempdir, 511);
+ JFile::write($tempdir.'/.htaccess',"order deny, allow\ndeny from all\nallow from none\n");
+ }
+
+ // If it exists and it is unwritable, try creating a writable admintools subdirectory
+ if(!is_writable($tempdir)) {
+ jimport('joomla.client.ftp');
+ jimport('joomla.client.helper');
+ jimport('joomla.filesystem.folder');
+
+ $FTPOptions = JClientHelper::getCredentials('ftp');
+ $ftp = & JFTP::getInstance($FTPOptions['host'], $FTPOptions['port'], null, $FTPOptions['user'], $FTPOptions['pass']);
+ $dest = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $tempdir.'/admintools'), '/');
+ if(!@mkdir($tempdir.'/admintools')) $ftp->mkdir($dest);
+ if(!@chmod($tempdir.'/admintools', 511)) $ftp->chmod($dest, 511);
+
+ $tempdir .= '/admintools';
+ }
+ }
+
+ // If we still have no writable directory, we'll try /tmp and the system's temp-directory
+ $writable = @is_writeable($tempdir);
+ if(!$writable) {
+ if(@is_dir('/tmp') && @is_writable('/tmp')) {
+ $tempdir = '/tmp';
+ } else {
+ // Try to find the system temp path
+ $tmpfile = @tempnam("dummy","");
+ $systemp = @dirname($tmpfile);
+ @unlink($tmpfile);
+ if(!empty($systemp)) {
+ if(@is_dir($systemp) && @is_writable($systemp)) {
+ $tempdir = $systemp;
+ }
+ }
+ }
+ }
+
+ $data.=<<<ENDDATA
+ ,
+ 'kickstart.ftp.ssl' => '0',
+ 'kickstart.ftp.passive' => '1',
+ 'kickstart.ftp.host' => '$ftp_host',
+ 'kickstart.ftp.port' => '$ftp_port',
+ 'kickstart.ftp.user' => '$ftp_user',
+ 'kickstart.ftp.pass' => '$ftp_pass',
+ 'kickstart.ftp.dir' => '$ftp_root',
+ 'kickstart.ftp.tempdir' => '$tempdir'
+ENDDATA;
+ }
+
+ $data .= ');';
+
+ // Remove the old file, if it's there...
+ jimport('joomla.filesystem.file');
+ $configpath = JPATH_COMPONENT_ADMINISTRATOR . '/restoration.php';
+ if( JFile::exists($configpath) )
+ {
+ JFile::delete($configpath);
+ }
+
+ // Write new file. First try with JFile.
+ $result = JFile::write( $configpath, $data );
+ // In case JFile used FTP but direct access could help
+ if(!$result) {
+ if(function_exists('file_put_contents')) {
+ $result = @file_put_contents($configpath, $data);
+ if($result !== false) $result = true;
+ } else {
+ $fp = @fopen($configpath, 'wt');
+ if($fp !== false) {
+ $result = @fwrite($fp, $data);
+ if($result !== false) $result = true;
+ @fclose($fp);
+ }
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * Runs the schema update SQL files, the PHP update script and updates the
+ * manifest cache and #__extensions entry. Essentially, it is identical to
+ * JInstallerFile::install() without the file copy.
+ *
+ * @return boolean True on success
+ */
+ public function finaliseUpgrade()
+ {
+ jimport('joomla.installer.install');
+ $installer = JInstaller::getInstance();
+
+ $installer->setPath('source', JPATH_ROOT);
+ $installer->setPath('extension_root', JPATH_ROOT);
+
+ if (!$installer->setupInstall())
+ {
+ $installer->abort(JText::_('JLIB_INSTALLER_ABORT_DETECTMANIFEST'));
+
+ return false;
+ }
+
+ $installer->extension = JTable::getInstance('extension');
+ $installer->extension->load(700);
+ $installer->setAdapter($installer->extension->type);
+
+ $manifest = $installer->getManifest();
+
+ $manifestPath = JPath::clean($installer->getPath('manifest'));
+ $element = preg_replace('/\.xml/', '', basename($manifestPath));
+
+ // Run the script file
+ $scriptElement = $manifest->scriptfile;
+ $manifestScript = (string) $manifest->scriptfile;
+
+ if ($manifestScript)
+ {
+ $manifestScriptFile = JPATH_ROOT . '/' . $manifestScript;
+
+ if (is_file($manifestScriptFile))
+ {
+ // load the file
+ include_once $manifestScriptFile;
+ }
+
+ $classname = 'JoomlaInstallerScript';
+
+ if (class_exists($classname))
+ {
+ $manifestClass = new $classname($this);
+ }
+ }
+
+ ob_start();
+ ob_implicit_flush(false);
+ if ($manifestClass && method_exists($manifestClass, 'preflight'))
+ {
+ if ($manifestClass->preflight('update', $this) === false)
+ {
+ $installer->abort(JText::_('JLIB_INSTALLER_ABORT_FILE_INSTALL_CUSTOM_INSTALL_FAILURE'));
+
+ return false;
+ }
+ }
+
+ $msg = ob_get_contents(); // create msg object; first use here
+ ob_end_clean();
+
+ // Get a database connector object
+ $db = JFactory::getDbo();
+
+ // Check to see if a file extension by the same name is already installed
+ // If it is, then update the table because if the files aren't there
+ // we can assume that it was (badly) uninstalled
+ // If it isn't, add an entry to extensions
+ $query = $db->getQuery(true);
+ $query->select($query->qn('extension_id'))
+ ->from($query->qn('#__extensions'));
+ $query->where($query->qn('type') . ' = ' . $query->q('file'))
+ ->where($query->qn('element') . ' = ' . $query->q('joomla'));
+ $db->setQuery($query);
+ try
+ {
+ $db->Query();
+ }
+ catch (JException $e)
+ {
+ // Install failed, roll back changes
+ $installer->abort(
+ JText::sprintf('JLIB_INSTALLER_ABORT_FILE_ROLLBACK', JText::_('JLIB_INSTALLER_UPDATE'), $db->stderr(true))
+ );
+ return false;
+ }
+ $id = $db->loadResult();
+ $row = JTable::getInstance('extension');
+
+ if ($id)
+ {
+ // Load the entry and update the manifest_cache
+ $row->load($id);
+ // Update name
+ $row->set('name', 'files_joomla');
+ // Update manifest
+ $row->manifest_cache = $installer->generateManifestCache();
+ if (!$row->store())
+ {
+ // Install failed, roll back changes
+ $installer->abort(
+ JText::sprintf('JLIB_INSTALLER_ABORT_FILE_ROLLBACK', JText::_('JLIB_INSTALLER_UPDATE'), $db->stderr(true))
+ );
+ return false;
+ }
+ }
+ else
+ {
+ // Add an entry to the extension table with a whole heap of defaults
+ $row->set('name', 'files_joomla');
+ $row->set('type', 'file');
+ $row->set('element', 'joomla');
+ // There is no folder for files so leave it blank
+ $row->set('folder', '');
+ $row->set('enabled', 1);
+ $row->set('protected', 0);
+ $row->set('access', 0);
+ $row->set('client_id', 0);
+ $row->set('params', '');
+ $row->set('system_data', '');
+ $row->set('manifest_cache', $installer->generateManifestCache());
+
+ if (!$row->store())
+ {
+ // Install failed, roll back changes
+ $installer->abort(JText::sprintf('JLIB_INSTALLER_ABORT_FILE_INSTALL_ROLLBACK', $db->stderr(true)));
+ return false;
+ }
+
+ // Set the insert id
+ $row->set('extension_id', $db->insertid());
+
+ // Since we have created a module item, we add it to the installation step stack
+ // so that if we have to rollback the changes we can undo it.
+ $installer->pushStep(array('type' => 'extension', 'extension_id' => $row->extension_id));
+ }
+
+ /*
+ * Let's run the queries for the file
+ */
+ if ($manifest->update)
+ {
+ $result = $installer->parseSchemaUpdates($manifest->update->schemas, $row->extension_id);
+ if ($result === false)
+ {
+ // Install failed, rollback changes
+ $installer->abort(JText::sprintf('JLIB_INSTALLER_ABORT_FILE_UPDATE_SQL_ERROR', $db->stderr(true)));
+ return false;
+ }
+ }
+
+ // Start Joomla! 1.6
+ ob_start();
+ ob_implicit_flush(false);
+
+ if ($manifestClass && method_exists($manifestClass, 'update'))
+ {
+ if ($manifestClass->update($installer) === false)
+ {
+ // Install failed, rollback changes
+ $installer->abort(JText::_('JLIB_INSTALLER_ABORT_FILE_INSTALL_CUSTOM_INSTALL_FAILURE'));
+
+ return false;
+ }
+ }
+
+ $msg .= ob_get_contents(); // append messages
+ ob_end_clean();
+
+ // Lastly, we will copy the manifest file to its appropriate place.
+ $manifest = array();
+ $manifest['src'] = $installer->getPath('manifest');
+ $manifest['dest'] = JPATH_MANIFESTS . '/files/' . basename($installer->getPath('manifest'));
+ if (!$installer->copyFiles(array($manifest), true))
+ {
+ // Install failed, rollback changes
+ $installer->abort(JText::_('JLIB_INSTALLER_ABORT_FILE_INSTALL_COPY_SETUP'));
+ return false;
+ }
+
+ // Clobber any possible pending updates
+ $update = JTable::getInstance('update');
+ $uid = $update->find(
+ array('element' => $element, 'type' => 'file', 'client_id' => '', 'folder' => '')
+ );
+
+ if ($uid)
+ {
+ $update->delete($uid);
+ }
+
+ // And now we run the postflight
+ ob_start();
+ ob_implicit_flush(false);
+
+ if ($manifestClass && method_exists($manifestClass, 'postflight'))
+ {
+ $manifestClass->postflight('update', $this);
+ }
+
+ $msg .= ob_get_contents(); // append messages
+ ob_end_clean();
+
+ if ($msg != '')
+ {
+ $installer->set('extension_message', $msg);
+ }
+
+
+ return true;
+ }
+
+ /**
+ * Removes the extracted package file
+ *
+ * @return void
+ */
+ public function cleanUp()
+ {
+ jimport('joomla.filesystem.file');
+
+ // Remove the update package
+ $jreg = JFactory::getConfig();
+ $tempdir = $jreg->getValue('config.tmp_path');
+ $file = JFactory::getApplication()->getUserState('com_joomlaupdate.file', null);
+ $target = $tempdir.'/'.$file;
+ if (!unlink($target))
+ {
+ jimport('joomla.filesystem.file');
+ JFile::delete($target);
+ }
+
+ // Remove the restoration.php file
+ $target = JPATH_COMPONENT_ADMINISTRATOR . '/restoration.php';
+ if (!unlink($target))
+ {
+ JFile::delete($target);
+ }
+
+ JFactory::getApplication()->setUserState('com_joomlaupdate.file', null);
+ }
+}

Added: development/trunk/administrator/components/com_joomlaupdate/models/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/models/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/models/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/restore.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/restore.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/restore.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,5742 @@
+<?php
+/**
+ * Akeeba Restore
+ * A JSON-powered JPA, JPS and ZIP archive extraction library
+ *
+ * @copyright 2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com
+ * @license GNU GPL v2 or - at your option - any later version
+ * @package akeebabackup
+ * @subpackage kickstart
+ */
+
+define('_AKEEBA_RESTORATION', 1);
+defined('DS') or define('DS', DIRECTORY_SEPARATOR);
+
+// Unarchiver run states
+define('AK_STATE_NOFILE', 0); // File header not read yet
+define('AK_STATE_HEADER', 1); // File header read; ready to process data
+define('AK_STATE_DATA', 2); // Processing file data
+define('AK_STATE_DATAREAD', 3); // Finished processing file data; ready to post-process
+define('AK_STATE_POSTPROC', 4); // Post-processing
+define('AK_STATE_DONE', 5); // Done with post-processing
+
+/* Windows system detection */
+if(!defined('_AKEEBA_IS_WINDOWS'))
+{
+ if (function_exists('php_uname'))
+ define('_AKEEBA_IS_WINDOWS', stristr(php_uname(), 'windows'));
+ else
+ define('_AKEEBA_IS_WINDOWS', DIRECTORY_SEPARATOR == '\\');
+}
+
+// Make sure the locale is correct for basename() to work
+if(function_exists('setlocale'))
+{
+ @setlocale(LC_ALL, 'en_US.UTF8');
+}
+
+// fnmatch not available on non-POSIX systems
+// Thanks to soy...@php.net for this usefull alternative function [http://gr2.php.net/fnmatch]
+if (!function_exists('fnmatch')) {
+ function fnmatch($pattern, $string) {
+ return @preg_match(
+ '/^' . strtr(addcslashes($pattern, '/\\.+^$(){}=!<>|'),
+ array('*' => '.*', '?' => '.?')) . '$/i', $string
+ );
+ }
+}
+
+// Unicode-safe binary data length function
+if(function_exists('mb_strlen')) {
+ function akstringlen($string) { return mb_strlen($string,'8bit'); }
+} else {
+ function akstringlen($string) { return strlen($string); }
+}
+
+/**
+ * Gets a query parameter from GET or POST data
+ * @param $key
+ * @param $default
+ */
+function getQueryParam( $key, $default = null )
+{
+ $value = null;
+
+ if(array_key_exists($key, $_REQUEST)) {
+ $value = $_REQUEST[$key];
+ } elseif(array_key_exists($key, $_POST)) {
+ $value = $_POST[$key];
+ } elseif(array_key_exists($key, $_GET)) {
+ $value = $_GET[$key];
+ } else {
+ return $default;
+ }
+
+ if(get_magic_quotes_gpc() && !is_null($value)) $value=stripslashes($value);
+
+ return $value;
+}
+
+/**
+ * Akeeba Backup's JSON compatibility layer
+ *
+ * On systems where json_encode and json_decode are not available, Akeeba
+ * Backup will attempt to use PEAR's Services_JSON library to emulate them.
+ * A copy of this library is included in this file and will be used if and
+ * only if it isn't already loaded, e.g. due to PEAR's auto-loading, or a
+ * 3PD extension loading it for its own purposes.
+ */
+
+/**
+ * Converts to and from JSON format.
+ *
+ * JSON (JavaScript Object Notation) is a lightweight data-interchange
+ * format. It is easy for humans to read and write. It is easy for machines
+ * to parse and generate. It is based on a subset of the JavaScript
+ * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
+ * This feature can also be found in Python. JSON is a text format that is
+ * completely language independent but uses conventions that are familiar
+ * to programmers of the C-family of languages, including C, C++, C#, Java,
+ * JavaScript, Perl, TCL, and many others. These properties make JSON an
+ * ideal data-interchange language.
+ *
+ * This package provides a simple encoder and decoder for JSON notation. It
+ * is intended for use with client-side Javascript applications that make
+ * use of HTTPRequest to perform server communication functions - data can
+ * be encoded into JSON notation for use in a client-side javascript, or
+ * decoded from incoming Javascript requests. JSON format is native to
+ * Javascript, and can be directly eval()'ed with no further parsing
+ * overhead
+ *
+ * All strings should be in ASCII or UTF-8 format!
+ *
+ * LICENSE: Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met: Redistributions of source code must retain the
+ * above copyright notice, this list of conditions and the following
+ * disclaimer. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @category
+ * @package Services_JSON
+ * @author Michal Migurski <mike...@teczno.com>
+ * @author Matt Knapp <mdknapp[at]gmail[dot]com>
+ * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
+ * @copyright 2005 Michal Migurski
+ * @version CVS: $Id: restore.php 612 2011-05-19 08:26:26Z nikosdion $
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
+ */
+
+if(!defined('JSON_FORCE_OBJECT'))
+{
+ define('JSON_FORCE_OBJECT', 1);
+}
+
+if(!defined('SERVICES_JSON_SLICE'))
+{
+ /**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+ define('SERVICES_JSON_SLICE', 1);
+
+ /**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+ define('SERVICES_JSON_IN_STR', 2);
+
+ /**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+ define('SERVICES_JSON_IN_ARR', 3);
+
+ /**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+ define('SERVICES_JSON_IN_OBJ', 4);
+
+ /**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+ define('SERVICES_JSON_IN_CMT', 5);
+
+ /**
+ * Behavior switch for Services_JSON::decode()
+ */
+ define('SERVICES_JSON_LOOSE_TYPE', 16);
+
+ /**
+ * Behavior switch for Services_JSON::decode()
+ */
+ define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
+}
+
+/**
+ * Converts to and from JSON format.
+ *
+ * Brief example of use:
+ *
+ * <code>
+ * // create a new instance of Services_JSON
+ * $json = new Services_JSON();
+ *
+ * // convert a complexe value to JSON notation, and send it to the browser
+ * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
+ * $output = $json->encode($value);
+ *
+ * print($output);
+ * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
+ *
+ * // accept incoming POST data, assumed to be in JSON notation
+ * $input = file_get_contents('php://input', 1000000);
+ * $value = $json->decode($input);
+ * </code>
+ */
+if(!class_exists('Akeeba_Services_JSON'))
+{
+ class Akeeba_Services_JSON
+ {
+ /**
+ * constructs a new JSON instance
+ *
+ * @param int $use object behavior flags; combine with boolean-OR
+ *
+ * possible values:
+ * - SERVICES_JSON_LOOSE_TYPE: loose typing.
+ * "{...}" syntax creates associative arrays
+ * instead of objects in decode().
+ * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
+ * Values which can't be encoded (e.g. resources)
+ * appear as NULL instead of throwing errors.
+ * By default, a deeply-nested resource will
+ * bubble up with an error, so all return values
+ * from encode() should be checked with isError()
+ */
+ function Akeeba_Services_JSON($use = 0)
+ {
+ $this->use = $use;
+ }
+
+ /**
+ * convert a string from one UTF-16 char to one UTF-8 char
+ *
+ * Normally should be handled by mb_convert_encoding, but
+ * provides a slower PHP-only method for installations
+ * that lack the multibye string extension.
+ *
+ * @param string $utf16 UTF-16 character
+ * @return string UTF-8 character
+ * @access private
+ */
+ function utf162utf8($utf16)
+ {
+ // oh please oh please oh please oh please oh please
+ if(function_exists('mb_convert_encoding')) {
+ return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
+ }
+
+ $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
+
+ switch(true) {
+ case ((0x7F & $bytes) == $bytes):
+ // this case should never be reached, because we are in ASCII range
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return chr(0x7F & $bytes);
+
+ case (0x07FF & $bytes) == $bytes:
+ // return a 2-byte UTF-8 character
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return chr(0xC0 | (($bytes >> 6) & 0x1F))
+ . chr(0x80 | ($bytes & 0x3F));
+
+ case (0xFFFF & $bytes) == $bytes:
+ // return a 3-byte UTF-8 character
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return chr(0xE0 | (($bytes >> 12) & 0x0F))
+ . chr(0x80 | (($bytes >> 6) & 0x3F))
+ . chr(0x80 | ($bytes & 0x3F));
+ }
+
+ // ignoring UTF-32 for now, sorry
+ return '';
+ }
+
+ /**
+ * convert a string from one UTF-8 char to one UTF-16 char
+ *
+ * Normally should be handled by mb_convert_encoding, but
+ * provides a slower PHP-only method for installations
+ * that lack the multibye string extension.
+ *
+ * @param string $utf8 UTF-8 character
+ * @return string UTF-16 character
+ * @access private
+ */
+ function utf82utf16($utf8)
+ {
+ // oh please oh please oh please oh please oh please
+ if(function_exists('mb_convert_encoding')) {
+ return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
+ }
+
+ switch(strlen($utf8)) {
+ case 1:
+ // this case should never be reached, because we are in ASCII range
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return $utf8;
+
+ case 2:
+ // return a UTF-16 character from a 2-byte UTF-8 char
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return chr(0x07 & (ord($utf8{0}) >> 2))
+ . chr((0xC0 & (ord($utf8{0}) << 6))
+ | (0x3F & ord($utf8{1})));
+
+ case 3:
+ // return a UTF-16 character from a 3-byte UTF-8 char
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ return chr((0xF0 & (ord($utf8{0}) << 4))
+ | (0x0F & (ord($utf8{1}) >> 2)))
+ . chr((0xC0 & (ord($utf8{1}) << 6))
+ | (0x7F & ord($utf8{2})));
+ }
+
+ // ignoring UTF-32 for now, sorry
+ return '';
+ }
+
+ /**
+ * encodes an arbitrary variable into JSON format
+ *
+ * @param mixed $var any number, boolean, string, array, or object to be encoded.
+ * see argument 1 to Services_JSON() above for array-parsing behavior.
+ * if var is a strng, note that encode() always expects it
+ * to be in ASCII or UTF-8 format!
+ *
+ * @return mixed JSON string representation of input var or an error if a problem occurs
+ * @access public
+ */
+ function encode($var)
+ {
+ switch (gettype($var)) {
+ case 'boolean':
+ return $var ? 'true' : 'false';
+
+ case 'NULL':
+ return 'null';
+
+ case 'integer':
+ return (int) $var;
+
+ case 'double':
+ case 'float':
+ return (float) $var;
+
+ case 'string':
+ // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
+ $ascii = '';
+ $strlen_var = strlen($var);
+
+ /*
+ * Iterate over every character in the string,
+ * escaping with a slash or encoding to UTF-8 where necessary
+ */
+ for ($c = 0; $c < $strlen_var; ++$c) {
+
+ $ord_var_c = ord($var{$c});
+
+ switch (true) {
+ case $ord_var_c == 0x08:
+ $ascii .= '\b';
+ break;
+ case $ord_var_c == 0x09:
+ $ascii .= '\t';
+ break;
+ case $ord_var_c == 0x0A:
+ $ascii .= '\n';
+ break;
+ case $ord_var_c == 0x0C:
+ $ascii .= '\f';
+ break;
+ case $ord_var_c == 0x0D:
+ $ascii .= '\r';
+ break;
+
+ case $ord_var_c == 0x22:
+ case $ord_var_c == 0x2F:
+ case $ord_var_c == 0x5C:
+ // double quote, slash, slosh
+ $ascii .= '\\'.$var{$c};
+ break;
+
+ case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
+ // characters U-00000000 - U-0000007F (same as ASCII)
+ $ascii .= $var{$c};
+ break;
+
+ case (($ord_var_c & 0xE0) == 0xC0):
+ // characters U-00000080 - U-000007FF, mask 110XXXXX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
+ $c += 1;
+ $utf16 = $this->utf82utf16($char);
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
+ break;
+
+ case (($ord_var_c & 0xF0) == 0xE0):
+ // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c,
+ ord($var{$c + 1}),
+ ord($var{$c + 2}));
+ $c += 2;
+ $utf16 = $this->utf82utf16($char);
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
+ break;
+
+ case (($ord_var_c & 0xF8) == 0xF0):
+ // characters U-00010000 - U-001FFFFF, mask 11110XXX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c,
+ ord($var{$c + 1}),
+ ord($var{$c + 2}),
+ ord($var{$c + 3}));
+ $c += 3;
+ $utf16 = $this->utf82utf16($char);
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
+ break;
+
+ case (($ord_var_c & 0xFC) == 0xF8):
+ // characters U-00200000 - U-03FFFFFF, mask 111110XX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c,
+ ord($var{$c + 1}),
+ ord($var{$c + 2}),
+ ord($var{$c + 3}),
+ ord($var{$c + 4}));
+ $c += 4;
+ $utf16 = $this->utf82utf16($char);
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
+ break;
+
+ case (($ord_var_c & 0xFE) == 0xFC):
+ // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c,
+ ord($var{$c + 1}),
+ ord($var{$c + 2}),
+ ord($var{$c + 3}),
+ ord($var{$c + 4}),
+ ord($var{$c + 5}));
+ $c += 5;
+ $utf16 = $this->utf82utf16($char);
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
+ break;
+ }
+ }
+
+ return '"'.$ascii.'"';
+
+ case 'array':
+ /*
+ * As per JSON spec if any array key is not an integer
+ * we must treat the the whole array as an object. We
+ * also try to catch a sparsely populated associative
+ * array with numeric keys here because some JS engines
+ * will create an array with empty indexes up to
+ * max_index which can cause memory issues and because
+ * the keys, which may be relevant, will be remapped
+ * otherwise.
+ *
+ * As per the ECMA and JSON specification an object may
+ * have any string as a property. Unfortunately due to
+ * a hole in the ECMA specification if the key is a
+ * ECMA reserved word or starts with a digit the
+ * parameter is only accessible using ECMAScript's
+ * bracket notation.
+ */
+
+ // treat as a JSON object
+ if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
+ $properties = array_map(array($this, 'name_value'),
+ array_keys($var),
+ array_values($var));
+
+ foreach($properties as $property) {
+ if(Akeeba_Services_JSON::isError($property)) {
+ return $property;
+ }
+ }
+
+ return '{' . join(',', $properties) . '}';
+ }
+
+ // treat it like a regular array
+ $elements = array_map(array($this, 'encode'), $var);
+
+ foreach($elements as $element) {
+ if(Akeeba_Services_JSON::isError($element)) {
+ return $element;
+ }
+ }
+
+ return '[' . join(',', $elements) . ']';
+
+ case 'object':
+ $vars = get_object_vars($var);
+
+ $properties = array_map(array($this, 'name_value'),
+ array_keys($vars),
+ array_values($vars));
+
+ foreach($properties as $property) {
+ if(Akeeba_Services_JSON::isError($property)) {
+ return $property;
+ }
+ }
+
+ return '{' . join(',', $properties) . '}';
+
+ default:
+ return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
+ ? 'null'
+ : new Akeeba_Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
+ }
+ }
+
+ /**
+ * array-walking function for use in generating JSON-formatted name-value pairs
+ *
+ * @param string $name name of key to use
+ * @param mixed $value reference to an array element to be encoded
+ *
+ * @return string JSON-formatted name-value pair, like '"name":value'
+ * @access private
+ */
+ function name_value($name, $value)
+ {
+ $encoded_value = $this->encode($value);
+
+ if(Akeeba_Services_JSON::isError($encoded_value)) {
+ return $encoded_value;
+ }
+
+ return $this->encode(strval($name)) . ':' . $encoded_value;
+ }
+
+ /**
+ * reduce a string by removing leading and trailing comments and whitespace
+ *
+ * @param $str string string value to strip of comments and whitespace
+ *
+ * @return string string value stripped of comments and whitespace
+ * @access private
+ */
+ function reduce_string($str)
+ {
+ $str = preg_replace(array(
+
+ // eliminate single line comments in '// ...' form
+ '#^\s*//(.+)$#m',
+
+ // eliminate multi-line comments in '/* ... */' form, at start of string
+ '#^\s*/\*(.+)\*/#Us',
+
+ // eliminate multi-line comments in '/* ... */' form, at end of string
+ '#/\*(.+)\*/\s*$#Us'
+
+ ), '', $str);
+
+ // eliminate extraneous space
+ return trim($str);
+ }
+
+ /**
+ * decodes a JSON string into appropriate variable
+ *
+ * @param string $str JSON-formatted string
+ *
+ * @return mixed number, boolean, string, array, or object
+ * corresponding to given JSON input string.
+ * See argument 1 to Akeeba_Services_JSON() above for object-output behavior.
+ * Note that decode() always returns strings
+ * in ASCII or UTF-8 format!
+ * @access public
+ */
+ function decode($str)
+ {
+ $str = $this->reduce_string($str);
+
+ switch (strtolower($str)) {
+ case 'true':
+ return true;
+
+ case 'false':
+ return false;
+
+ case 'null':
+ return null;
+
+ default:
+ $m = array();
+
+ if (is_numeric($str)) {
+ // Lookie-loo, it's a number
+
+ // This would work on its own, but I'm trying to be
+ // good about returning integers where appropriate:
+ // return (float)$str;
+
+ // Return float or int, as appropriate
+ return ((float)$str == (integer)$str)
+ ? (integer)$str
+ : (float)$str;
+
+ } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
+ // STRINGS RETURNED IN UTF-8 FORMAT
+ $delim = substr($str, 0, 1);
+ $chrs = substr($str, 1, -1);
+ $utf8 = '';
+ $strlen_chrs = strlen($chrs);
+
+ for ($c = 0; $c < $strlen_chrs; ++$c) {
+
+ $substr_chrs_c_2 = substr($chrs, $c, 2);
+ $ord_chrs_c = ord($chrs{$c});
+
+ switch (true) {
+ case $substr_chrs_c_2 == '\b':
+ $utf8 .= chr(0x08);
+ ++$c;
+ break;
+ case $substr_chrs_c_2 == '\t':
+ $utf8 .= chr(0x09);
+ ++$c;
+ break;
+ case $substr_chrs_c_2 == '\n':
+ $utf8 .= chr(0x0A);
+ ++$c;
+ break;
+ case $substr_chrs_c_2 == '\f':
+ $utf8 .= chr(0x0C);
+ ++$c;
+ break;
+ case $substr_chrs_c_2 == '\r':
+ $utf8 .= chr(0x0D);
+ ++$c;
+ break;
+
+ case $substr_chrs_c_2 == '\\"':
+ case $substr_chrs_c_2 == '\\\'':
+ case $substr_chrs_c_2 == '\\\\':
+ case $substr_chrs_c_2 == '\\/':
+ if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
+ ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
+ $utf8 .= $chrs{++$c};
+ }
+ break;
+
+ case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
+ // single, escaped unicode character
+ $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
+ . chr(hexdec(substr($chrs, ($c + 4), 2)));
+ $utf8 .= $this->utf162utf8($utf16);
+ $c += 5;
+ break;
+
+ case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
+ $utf8 .= $chrs{$c};
+ break;
+
+ case ($ord_chrs_c & 0xE0) == 0xC0:
+ // characters U-00000080 - U-000007FF, mask 110XXXXX
+ //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $utf8 .= substr($chrs, $c, 2);
+ ++$c;
+ break;
+
+ case ($ord_chrs_c & 0xF0) == 0xE0:
+ // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $utf8 .= substr($chrs, $c, 3);
+ $c += 2;
+ break;
+
+ case ($ord_chrs_c & 0xF8) == 0xF0:
+ // characters U-00010000 - U-001FFFFF, mask 11110XXX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $utf8 .= substr($chrs, $c, 4);
+ $c += 3;
+ break;
+
+ case ($ord_chrs_c & 0xFC) == 0xF8:
+ // characters U-00200000 - U-03FFFFFF, mask 111110XX
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $utf8 .= substr($chrs, $c, 5);
+ $c += 4;
+ break;
+
+ case ($ord_chrs_c & 0xFE) == 0xFC:
+ // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $utf8 .= substr($chrs, $c, 6);
+ $c += 5;
+ break;
+
+ }
+
+ }
+
+ return $utf8;
+
+ } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
+ // array, or object notation
+
+ if ($str{0} == '[') {
+ $stk = array(SERVICES_JSON_IN_ARR);
+ $arr = array();
+ } else {
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+ $stk = array(SERVICES_JSON_IN_OBJ);
+ $obj = array();
+ } else {
+ $stk = array(SERVICES_JSON_IN_OBJ);
+ $obj = new stdClass();
+ }
+ }
+
+ array_push($stk, array('what' => SERVICES_JSON_SLICE,
+ 'where' => 0,
+ 'delim' => false));
+
+ $chrs = substr($str, 1, -1);
+ $chrs = $this->reduce_string($chrs);
+
+ if ($chrs == '') {
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
+ return $arr;
+
+ } else {
+ return $obj;
+
+ }
+ }
+
+ //print("\nparsing {$chrs}\n");
+
+ $strlen_chrs = strlen($chrs);
+
+ for ($c = 0; $c <= $strlen_chrs; ++$c) {
+
+ $top = end($stk);
+ $substr_chrs_c_2 = substr($chrs, $c, 2);
+
+ if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
+ // found a comma that is not inside a string, array, etc.,
+ // OR we've reached the end of the character list
+ $slice = substr($chrs, $top['where'], ($c - $top['where']));
+ array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
+ //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
+ // we are in an array, so just push an element onto the stack
+ array_push($arr, $this->decode($slice));
+
+ } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
+ // we are in an object, so figure
+ // out the property name and set an
+ // element in an associative array,
+ // for now
+ $parts = array();
+
+ if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
+ // "name":value pair
+ $key = $this->decode($parts[1]);
+ $val = $this->decode($parts[2]);
+
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+ $obj[$key] = $val;
+ } else {
+ $obj->$key = $val;
+ }
+ } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
+ // name:value pair, where name is unquoted
+ $key = $parts[1];
+ $val = $this->decode($parts[2]);
+
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+ $obj[$key] = $val;
+ } else {
+ $obj->$key = $val;
+ }
+ }
+
+ }
+
+ } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
+ // found a quote, and we are not inside a string
+ array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
+ //print("Found start of string at {$c}\n");
+
+ } elseif (($chrs{$c} == $top['delim']) &&
+ ($top['what'] == SERVICES_JSON_IN_STR) &&
+ ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
+ // found a quote, we're in a string, and it's not escaped
+ // we know that it's not escaped becase there is _not_ an
+ // odd number of backslashes at the end of the string so far
+ array_pop($stk);
+ //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
+
+ } elseif (($chrs{$c} == '[') &&
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+ // found a left-bracket, and we are in an array, object, or slice
+ array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
+ //print("Found start of array at {$c}\n");
+
+ } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
+ // found a right-bracket, and we're in an array
+ array_pop($stk);
+ //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+ } elseif (($chrs{$c} == '{') &&
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+ // found a left-brace, and we are in an array, object, or slice
+ array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
+ //print("Found start of object at {$c}\n");
+
+ } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
+ // found a right-brace, and we're in an object
+ array_pop($stk);
+ //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+ } elseif (($substr_chrs_c_2 == '/*') &&
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+ // found a comment start, and we are in an array, object, or slice
+ array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
+ $c++;
+ //print("Found start of comment at {$c}\n");
+
+ } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
+ // found a comment end, and we're in one now
+ array_pop($stk);
+ $c++;
+
+ for ($i = $top['where']; $i <= $c; ++$i)
+ $chrs = substr_replace($chrs, ' ', $i, 1);
+
+ //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+ }
+
+ }
+
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
+ return $arr;
+
+ } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
+ return $obj;
+
+ }
+
+ }
+ }
+ }
+
+ function isError($data, $code = null)
+ {
+ if (class_exists('pear')) {
+ return PEAR::isError($data, $code);
+ } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
+ is_subclass_of($data, 'services_json_error'))) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+ class Akeeba_Services_JSON_Error
+ {
+ function Akeeba_Services_JSON_Error($message = 'unknown error', $code = null,
+ $mode = null, $options = null, $userinfo = null)
+ {
+
+ }
+ }
+}
+
+if(!function_exists('json_encode'))
+{
+ function json_encode($value, $options = 0) {
+ $flags = SERVICES_JSON_LOOSE_TYPE;
+ if( $options & JSON_FORCE_OBJECT ) $flags = 0;
+ $encoder = new Akeeba_Services_JSON($flags);
+ return $encoder->encode($value);
+ }
+}
+
+if(!function_exists('json_decode'))
+{
+ function json_decode($value, $assoc = false)
+ {
+ $flags = 0;
+ if($assoc) $flags = SERVICES_JSON_LOOSE_TYPE;
+ $decoder = new Akeeba_Services_JSON($flags);
+ return $decoder->decode($value);
+ }
+}
+
+/**
+ * The base class of Akeeba Engine objects. Allows for error and warnings logging
+ * and propagation. Largely based on the Joomla! 1.5 JObject class.
+ */
+abstract class AKAbstractObject
+{
+ /** @var array An array of errors */
+ private $_errors = array();
+
+ /** @var array The queue size of the $_errors array. Set to 0 for infinite size. */
+ protected $_errors_queue_size = 0;
+
+ /** @var array An array of warnings */
+ private $_warnings = array();
+
+ /** @var array The queue size of the $_warnings array. Set to 0 for infinite size. */
+ protected $_warnings_queue_size = 0;
+
+ /**
+ * Public constructor, makes sure we are instanciated only by the factory class
+ */
+ public function __construct()
+ {
+ /*
+ // Assisted Singleton pattern
+ if(function_exists('debug_backtrace'))
+ {
+ $caller=debug_backtrace();
+ if(
+ ($caller[1]['class'] != 'AKFactory') &&
+ ($caller[2]['class'] != 'AKFactory') &&
+ ($caller[3]['class'] != 'AKFactory') &&
+ ($caller[4]['class'] != 'AKFactory')
+ ) {
+ var_dump(debug_backtrace());
+ trigger_error("You can't create direct descendants of ".__CLASS__, E_USER_ERROR);
+ }
+ }
+ */
+ }
+
+ /**
+ * Get the most recent error message
+ * @param integer $i Optional error index
+ * @return string Error message
+ */
+ public function getError($i = null)
+ {
+ return $this->getItemFromArray($this->_errors, $i);
+ }
+
+ /**
+ * Return all errors, if any
+ * @return array Array of error messages
+ */
+ public function getErrors()
+ {
+ return $this->_errors;
+ }
+
+ /**
+ * Add an error message
+ * @param string $error Error message
+ */
+ public function setError($error)
+ {
+ if($this->_errors_queue_size > 0)
+ {
+ if(count($this->_errors) >= $this->_errors_queue_size)
+ {
+ array_shift($this->_errors);
+ }
+ }
+ array_push($this->_errors, $error);
+ }
+
+ /**
+ * Resets all error messages
+ */
+ public function resetErrors()
+ {
+ $this->_errors = array();
+ }
+
+ /**
+ * Get the most recent warning message
+ * @param integer $i Optional warning index
+ * @return string Error message
+ */
+ public function getWarning($i = null)
+ {
+ return $this->getItemFromArray($this->_warnings, $i);
+ }
+
+ /**
+ * Return all warnings, if any
+ * @return array Array of error messages
+ */
+ public function getWarnings()
+ {
+ return $this->_warnings;
+ }
+
+ /**
+ * Add an error message
+ * @param string $error Error message
+ */
+ public function setWarning($warning)
+ {
+ if($this->_warnings_queue_size > 0)
+ {
+ if(count($this->_warnings) >= $this->_warnings_queue_size)
+ {
+ array_shift($this->_warnings);
+ }
+ }
+
+ array_push($this->_warnings, $warning);
+ }
+
+ /**
+ * Resets all warning messages
+ */
+ public function resetWarnings()
+ {
+ $this->_warnings = array();
+ }
+
+ /**
+ * Propagates errors and warnings to a foreign object. The foreign object SHOULD
+ * implement the setError() and/or setWarning() methods but DOESN'T HAVE TO be of
+ * AKAbstractObject type. For example, this can even be used to propagate to a
+ * JObject instance in Joomla!. Propagated items will be removed from ourself.
+ * @param object $object The object to propagate errors and warnings to.
+ */
+ public function propagateToObject(&$object)
+ {
+ // Skip non-objects
+ if(!is_object($object)) return;
+
+ if( method_exists($object,'setError') )
+ {
+ if(!empty($this->_errors))
+ {
+ foreach($this->_errors as $error)
+ {
+ $object->setError($error);
+ }
+ $this->_errors = array();
+ }
+ }
+
+ if( method_exists($object,'setWarning') )
+ {
+ if(!empty($this->_warnings))
+ {
+ foreach($this->_warnings as $warning)
+ {
+ $object->setWarning($warning);
+ }
+ $this->_warnings = array();
+ }
+ }
+ }
+
+ /**
+ * Propagates errors and warnings from a foreign object. Each propagated list is
+ * then cleared on the foreign object, as long as it implements resetErrors() and/or
+ * resetWarnings() methods.
+ * @param object $object The object to propagate errors and warnings from
+ */
+ public function propagateFromObject(&$object)
+ {
+ if( method_exists($object,'getErrors') )
+ {
+ $errors = $object->getErrors();
+ if(!empty($errors))
+ {
+ foreach($errors as $error)
+ {
+ $this->setError($error);
+ }
+ }
+ if(method_exists($object,'resetErrors'))
+ {
+ $object->resetErrors();
+ }
+ }
+
+ if( method_exists($object,'getWarnings') )
+ {
+ $warnings = $object->getWarnings();
+ if(!empty($warnings))
+ {
+ foreach($warnings as $warning)
+ {
+ $this->setWarning($warning);
+ }
+ }
+ if(method_exists($object,'resetWarnings'))
+ {
+ $object->resetWarnings();
+ }
+ }
+ }
+
+ /**
+ * Sets the size of the error queue (acts like a LIFO buffer)
+ * @param int $newSize The new queue size. Set to 0 for infinite length.
+ */
+ protected function setErrorsQueueSize($newSize = 0)
+ {
+ $this->_errors_queue_size = (int)$newSize;
+ }
+
+ /**
+ * Sets the size of the warnings queue (acts like a LIFO buffer)
+ * @param int $newSize The new queue size. Set to 0 for infinite length.
+ */
+ protected function setWarningsQueueSize($newSize = 0)
+ {
+ $this->_warnings_queue_size = (int)$newSize;
+ }
+
+ /**
+ * Returns the last item of a LIFO string message queue, or a specific item
+ * if so specified.
+ * @param array $array An array of strings, holding messages
+ * @param int $i Optional message index
+ * @return mixed The message string, or false if the key doesn't exist
+ */
+ private function getItemFromArray($array, $i = null)
+ {
+ // Find the item
+ if ( $i === null) {
+ // Default, return the last item
+ $item = end($array);
+ }
+ else
+ if ( ! array_key_exists($i, $array) ) {
+ // If $i has been specified but does not exist, return false
+ return false;
+ }
+ else
+ {
+ $item = $array[$i];
+ }
+
+ return $item;
+ }
+
+}
+
+/**
+ * File post processor engines base class
+ */
+abstract class AKAbstractPostproc extends AKAbstractObject
+{
+ /** @var string The current (real) file path we'll have to process */
+ protected $filename = null;
+
+ /** @var int The requested permissions */
+ protected $perms = 0755;
+
+ /** @var string The temporary file path we gave to the unarchiver engine */
+ protected $tempFilename = null;
+
+ /** @var int The UNIX timestamp of the file's desired modification date */
+ public $timestamp = 0;
+
+ /**
+ * Processes the current file, e.g. moves it from temp to final location by FTP
+ */
+ abstract public function process();
+
+ /**
+ * The unarchiver tells us the path to the filename it wants to extract and we give it
+ * a different path instead.
+ * @param string $filename The path to the real file
+ * @param int $perms The permissions we need the file to have
+ * @return string The path to the temporary file
+ */
+ abstract public function processFilename($filename, $perms = 0755);
+
+ /**
+ * Recursively creates a directory if it doesn't exist
+ * @param string $dirName The directory to create
+ * @param int $perms The permissions to give to that directory
+ */
+ abstract public function createDirRecursive( $dirName, $perms );
+
+ abstract public function chmod( $file, $perms );
+
+ abstract public function unlink( $file );
+
+ abstract public function rmdir( $directory );
+
+ abstract public function rename( $from, $to );
+}
+
+/**
+ * The base class of unarchiver classes
+ */
+abstract class AKAbstractUnarchiver extends AKAbstractPart
+{
+ /** @var string Archive filename */
+ protected $filename = null;
+
+ /** @var array List of the names of all archive parts */
+ public $archiveList = array();
+
+ /** @var int The total size of all archive parts */
+ public $totalSize = array();
+
+ /** @var integer Current archive part number */
+ protected $currentPartNumber = -1;
+
+ /** @var integer The offset inside the current part */
+ protected $currentPartOffset = 0;
+
+ /** @var bool Should I restore permissions? */
+ protected $flagRestorePermissions = false;
+
+ /** @var AKAbstractPostproc Post processing class */
+ protected $postProcEngine = null;
+
+ /** @var string Absolute path to prepend to extracted files */
+ protected $addPath = '';
+
+ /** @var array Which files to rename */
+ public $renameFiles = array();
+
+ /** @var array Which directories to rename */
+ public $renameDirs = array();
+
+ /** @var array Which files to skip */
+ public $skipFiles = array();
+
+ /** @var integer Chunk size for processing */
+ protected $chunkSize = 524288;
+
+ /** @var resource File pointer to the current archive part file */
+ protected $fp = null;
+
+ /** @var int Run state when processing the current archive file */
+ protected $runState = null;
+
+ /** @var stdClass File header data, as read by the readFileHeader() method */
+ protected $fileHeader = null;
+
+ /** @var int How much of the uncompressed data we've read so far */
+ protected $dataReadLength = 0;
+
+ /**
+ * Public constructor
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ /**
+ * Wakeup function, called whenever the class is unserialized
+ */
+ public function __wakeup()
+ {
+ if($this->currentPartNumber >= 0)
+ {
+ $this->fp = @fopen($this->archiveList[$this->currentPartNumber], 'rb');
+ if( (is_resource($this->fp)) && ($this->currentPartOffset > 0) )
+ {
+ @fseek($this->fp, $this->currentPartOffset);
+ }
+ }
+ }
+
+ /**
+ * Sleep function, called whenever the class is serialized
+ */
+ public function shutdown()
+ {
+ if(is_resource($this->fp))
+ {
+ $this->currentPartOffset = @ftell($this->fp);
+ @fclose($this->fp);
+ }
+ }
+
+ /**
+ * Implements the abstract _prepare() method
+ */
+ final protected function _prepare()
+ {
+ parent::__construct();
+
+ if( count($this->_parametersArray) > 0 )
+ {
+ foreach($this->_parametersArray as $key => $value)
+ {
+ switch($key)
+ {
+ case 'filename': // Archive's absolute filename
+ $this->filename = $value;
+ break;
+
+ case 'restore_permissions': // Should I restore permissions?
+ $this->flagRestorePermissions = $value;
+ break;
+
+ case 'post_proc': // Should I use FTP?
+ $this->postProcEngine = AKFactory::getpostProc($value);
+ break;
+
+ case 'add_path': // Path to prepend
+ $this->addPath = $value;
+ $this->addPath = str_replace('\\','/',$this->addPath);
+ $this->addPath = rtrim($this->addPath,'/');
+ if(!empty($this->addPath)) $this->addPath .= '/';
+ break;
+
+ case 'rename_files': // Which files to rename (hash array)
+ $this->renameFiles = $value;
+ break;
+
+ case 'rename_dirs': // Which files to rename (hash array)
+ $this->renameDirs = $value;
+ break;
+
+ case 'skip_files': // Which files to skip (indexed array)
+ $this->skipFiles = $value;
+ break;
+ }
+ }
+ }
+
+ $this->scanArchives();
+
+ $this->readArchiveHeader();
+ $errMessage = $this->getError();
+ if(!empty($errMessage))
+ {
+ $this->setState('error', $errMessage);
+ }
+ else
+ {
+ $this->runState = AK_STATE_NOFILE;
+ $this->setState('prepared');
+ }
+ }
+
+ protected function _run()
+ {
+ if($this->getState() == 'postrun') return;
+
+ $this->setState('running');
+
+ $timer = AKFactory::getTimer();
+
+ $status = true;
+ while( $status && ($timer->getTimeLeft() > 0) )
+ {
+ switch( $this->runState )
+ {
+ case AK_STATE_NOFILE:
+ $status = $this->readFileHeader();
+ if($status)
+ {
+ // Send start of file notification
+ $message = new stdClass;
+ $message->type = 'startfile';
+ $message->content = new stdClass;
+ if( array_key_exists('realfile', get_object_vars($this->fileHeader)) ) {
+ $message->content->realfile = $this->fileHeader->realFile;
+ } else {
+ $message->content->realfile = $this->fileHeader->file;
+ }
+ $message->content->file = $this->fileHeader->file;
+ if( array_key_exists('compressed', get_object_vars($this->fileHeader)) ) {
+ $message->content->compressed = $this->fileHeader->compressed;
+ } else {
+ $message->content->compressed = 0;
+ }
+ $message->content->uncompressed = $this->fileHeader->uncompressed;
+ $this->notify($message);
+ }
+ break;
+
+ case AK_STATE_HEADER:
+ case AK_STATE_DATA:
+ $status = $this->processFileData();
+ break;
+
+ case AK_STATE_DATAREAD:
+ case AK_STATE_POSTPROC:
+ $this->postProcEngine->timestamp = $this->fileHeader->timestamp;
+ $status = $this->postProcEngine->process();
+ $this->propagateFromObject( $this->postProcEngine );
+ $this->runState = AK_STATE_DONE;
+ break;
+
+ case AK_STATE_DONE:
+ default:
+ if($status)
+ {
+ // Send end of file notification
+ $message = new stdClass;
+ $message->type = 'endfile';
+ $message->content = new stdClass;
+ if( array_key_exists('realfile', get_object_vars($this->fileHeader)) ) {
+ $message->content->realfile = $this->fileHeader->realFile;
+ } else {
+ $message->content->realfile = $this->fileHeader->file;
+ }
+ $message->content->file = $this->fileHeader->file;
+ if( array_key_exists('compressed', get_object_vars($this->fileHeader)) ) {
+ $message->content->compressed = $this->fileHeader->compressed;
+ } else {
+ $message->content->compressed = 0;
+ }
+ $message->content->uncompressed = $this->fileHeader->uncompressed;
+ $this->notify($message);
+ }
+ $this->runState = AK_STATE_NOFILE;
+ continue;
+ }
+ }
+
+ $error = $this->getError();
+ if( !$status && ($this->runState == AK_STATE_NOFILE) && empty( $error ) )
+ {
+ // We just finished
+ $this->setState('postrun');
+ }
+ elseif( !empty($error) )
+ {
+ $this->setState( 'error', $error );
+ }
+ }
+
+ protected function _finalize()
+ {
+ // Nothing to do
+ $this->setState('finished');
+ }
+
+ /**
+ * Returns the base extension of the file, e.g. '.jpa'
+ * @return string
+ */
+ private function getBaseExtension()
+ {
+ static $baseextension;
+
+ if(empty($baseextension))
+ {
+ $basename = basename($this->filename);
+ $lastdot = strrpos($basename,'.');
+ $baseextension = substr($basename, $lastdot);
+ }
+
+ return $baseextension;
+ }
+
+ /**
+ * Scans for archive parts
+ */
+ private function scanArchives()
+ {
+ $privateArchiveList = array();
+
+ // Get the components of the archive filename
+ $dirname = dirname($this->filename);
+ $base_extension = $this->getBaseExtension();
+ $basename = basename($this->filename, $base_extension);
+ $this->totalSize = 0;
+
+ // Scan for multiple parts until we don't find any more of them
+ $count = 0;
+ $found = true;
+ $this->archiveList = array();
+ while($found)
+ {
+ ++$count;
+ $extension = substr($base_extension, 0, 2).sprintf('%02d', $count);
+ $filename = $dirname.DIRECTORY_SEPARATOR.$basename.$extension;
+ $found = file_exists($filename);
+ if($found)
+ {
+ // Add yet another part, with a numeric-appended filename
+ $this->archiveList[] = $filename;
+
+ $filesize = @filesize($filename);
+ $this->totalSize += $filesize;
+
+ $privateArchiveList[] = array($filename, $filesize);
+ }
+ else
+ {
+ // Add the last part, with the regular extension
+ $this->archiveList[] = $this->filename;
+
+ $filename = $this->filename;
+ $filesize = @filesize($filename);
+ $this->totalSize += $filesize;
+
+ $privateArchiveList[] = array($filename, $filesize);
+ }
+ }
+
+ $this->currentPartNumber = -1;
+ $this->currentPartOffset = 0;
+ $this->runState = AK_STATE_NOFILE;
+
+ // Send start of file notification
+ $message = new stdClass;
+ $message->type = 'totalsize';
+ $message->content = new stdClass;
+ $message->content->totalsize = $this->totalSize;
+ $message->content->filelist = $privateArchiveList;
+ $this->notify($message);
+ }
+
+ /**
+ * Opens the next part file for reading
+ */
+ protected function nextFile()
+ {
+ ++$this->currentPartNumber;
+
+ if( $this->currentPartNumber > (count($this->archiveList) - 1) )
+ {
+ $this->setState('postrun');
+ return false;
+ }
+ else
+ {
+ if( is_resource($this->fp) ) @fclose($this->fp);
+ $this->fp = @fopen( $this->archiveList[$this->currentPartNumber], 'rb' );
+ fseek($this->fp, 0);
+ $this->currentPartOffset = 0;
+ return true;
+ }
+ }
+
+ /**
+ * Returns true if we have reached the end of file
+ * @param $local bool True to return EOF of the local file, false (default) to return if we have reached the end of the archive set
+ * @return bool True if we have reached End Of File
+ */
+ protected function isEOF($local = false)
+ {
+ $eof = @feof($this->fp);
+
+ if(!$eof)
+ {
+ // Border case: right at the part's end (eeeek!!!). For the life of me, I don't understand why
+ // feof() doesn't report true. It expects the fp to be positioned *beyond* the EOF to report
+ // true. Incredible! :(
+ $position = @ftell($this->fp);
+ $filesize = @filesize( $this->archiveList[$this->currentPartNumber] );
+ if( $position >= $filesize ) $eof = true;
+ }
+
+ if($local)
+ {
+ return $eof;
+ }
+ else
+ {
+ return $eof && ($this->currentPartNumber >= (count($this->archiveList)-1) );
+ }
+ }
+
+ /**
+ * Tries to make a directory user-writable so that we can write a file to it
+ * @param $path string A path to a file
+ */
+ protected function setCorrectPermissions($path)
+ {
+ static $rootDir = null;
+
+ if(is_null($rootDir)) {
+ $rootDir = rtrim(AKFactory::get('kickstart.setup.destdir',''),'/\\');
+ }
+
+ $directory = rtrim(dirname($path),'/\\');
+ if($directory != $rootDir) {
+ // Is this an unwritable directory?
+ if(!is_writeable($directory)) {
+ $this->postProcEngine->chmod( $directory, 0755 );
+ }
+ }
+ $this->postProcEngine->chmod( $path, 0644 );
+ }
+
+ /**
+ * Concrete classes are supposed to use this method in order to read the archive's header and
+ * prepare themselves to the point of being ready to extract the first file.
+ */
+ protected abstract function readArchiveHeader();
+
+ /**
+ * Concrete classes must use this method to read the file header
+ * @return bool True if reading the file was successful, false if an error occured or we reached end of archive
+ */
+ protected abstract function readFileHeader();
+
+ /**
+ * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when
+ * it's finished processing the file data.
+ * @return bool True if processing the file data was successful, false if an error occured
+ */
+ protected abstract function processFileData();
+
+ /**
+ * Reads data from the archive and notifies the observer with the 'reading' message
+ * @param $fp
+ * @param $length
+ */
+ protected function fread($fp, $length = null)
+ {
+ if(is_numeric($length))
+ {
+ if($length > 0) {
+ $data = fread($fp, $length);
+ } else {
+ $data = fread($fp);
+ }
+ }
+ else
+ {
+ $data = fread($fp);
+ }
+ if($data === false) $data = '';
+
+ // Send start of file notification
+ $message = new stdClass;
+ $message->type = 'reading';
+ $message->content = new stdClass;
+ $message->content->length = strlen($data);
+ $this->notify($message);
+
+ return $data;
+ }
+}
+
+/**
+ * The superclass of all Akeeba Kickstart parts. The "parts" are intelligent stateful
+ * classes which perform a single procedure and have preparation, running and
+ * finalization phases. The transition between phases is handled automatically by
+ * this superclass' tick() final public method, which should be the ONLY public API
+ * exposed to the rest of the Akeeba Engine.
+ */
+abstract class AKAbstractPart extends AKAbstractObject
+{
+ /**
+ * Indicates whether this part has finished its initialisation cycle
+ * @var boolean
+ */
+ protected $isPrepared = false;
+
+ /**
+ * Indicates whether this part has more work to do (it's in running state)
+ * @var boolean
+ */
+ protected $isRunning = false;
+
+ /**
+ * Indicates whether this part has finished its finalization cycle
+ * @var boolean
+ */
+ protected $isFinished = false;
+
+ /**
+ * Indicates whether this part has finished its run cycle
+ * @var boolean
+ */
+ protected $hasRan = false;
+
+ /**
+ * The name of the engine part (a.k.a. Domain), used in return table
+ * generation.
+ * @var string
+ */
+ protected $active_domain = "";
+
+ /**
+ * The step this engine part is in. Used verbatim in return table and
+ * should be set by the code in the _run() method.
+ * @var string
+ */
+ protected $active_step = "";
+
+ /**
+ * A more detailed description of the step this engine part is in. Used
+ * verbatim in return table and should be set by the code in the _run()
+ * method.
+ * @var string
+ */
+ protected $active_substep = "";
+
+ /**
+ * Any configuration variables, in the form of an array.
+ * @var array
+ */
+ protected $_parametersArray = array();
+
+ /** @var string The database root key */
+ protected $databaseRoot = array();
+
+ /** @var int Last reported warnings's position in array */
+ private $warnings_pointer = -1;
+
+ /** @var array An array of observers */
+ protected $observers = array();
+
+ /**
+ * Runs the preparation for this part. Should set _isPrepared
+ * to true
+ */
+ abstract protected function _prepare();
+
+ /**
+ * Runs the finalisation process for this part. Should set
+ * _isFinished to true.
+ */
+ abstract protected function _finalize();
+
+ /**
+ * Runs the main functionality loop for this part. Upon calling,
+ * should set the _isRunning to true. When it finished, should set
+ * the _hasRan to true. If an error is encountered, setError should
+ * be used.
+ */
+ abstract protected function _run();
+
+ /**
+ * Sets the BREAKFLAG, which instructs this engine part that the current step must break immediately,
+ * in fear of timing out.
+ */
+ protected function setBreakFlag()
+ {
+ AKFactory::set('volatile.breakflag', true);
+ }
+
+ /**
+ * Sets the engine part's internal state, in an easy to use manner
+ *
+ * @param string $state One of init, prepared, running, postrun, finished, error
+ * @param string $errorMessage The reported error message, should the state be set to error
+ */
+ protected function setState($state = 'init', $errorMessage='Invalid setState argument')
+ {
+ switch($state)
+ {
+ case 'init':
+ $this->isPrepared = false;
+ $this->isRunning = false;
+ $this->isFinished = false;
+ $this->hasRun = false;
+ break;
+
+ case 'prepared':
+ $this->isPrepared = true;
+ $this->isRunning = false;
+ $this->isFinished = false;
+ $this->hasRun = false;
+ break;
+
+ case 'running':
+ $this->isPrepared = true;
+ $this->isRunning = true;
+ $this->isFinished = false;
+ $this->hasRun = false;
+ break;
+
+ case 'postrun':
+ $this->isPrepared = true;
+ $this->isRunning = false;
+ $this->isFinished = false;
+ $this->hasRun = true;
+ break;
+
+ case 'finished':
+ $this->isPrepared = true;
+ $this->isRunning = false;
+ $this->isFinished = true;
+ $this->hasRun = false;
+ break;
+
+ case 'error':
+ default:
+ $this->setError($errorMessage);
+ break;
+ }
+ }
+
+ /**
+ * The public interface to an engine part. This method takes care for
+ * calling the correct method in order to perform the initialisation -
+ * run - finalisation cycle of operation and return a proper reponse array.
+ * @return array A Reponse Array
+ */
+ final public function tick()
+ {
+ // Call the right action method, depending on engine part state
+ switch( $this->getState() )
+ {
+ case "init":
+ $this->_prepare();
+ break;
+ case "prepared":
+ $this->_run();
+ break;
+ case "running":
+ $this->_run();
+ break;
+ case "postrun":
+ $this->_finalize();
+ break;
+ }
+
+ // Send a Return Table back to the caller
+ $out = $this->_makeReturnTable();
+ return $out;
+ }
+
+ /**
+ * Returns a copy of the class's status array
+ * @return array
+ */
+ public function getStatusArray()
+ {
+ return $this->_makeReturnTable();
+ }
+
+ /**
+ * Sends any kind of setup information to the engine part. Using this,
+ * we avoid passing parameters to the constructor of the class. These
+ * parameters should be passed as an indexed array and should be taken
+ * into account during the preparation process only. This function will
+ * set the error flag if it's called after the engine part is prepared.
+ *
+ * @param array $parametersArray The parameters to be passed to the
+ * engine part.
+ */
+ final public function setup( $parametersArray )
+ {
+ if( $this->isPrepared )
+ {
+ $this->setState('error', "Can't modify configuration after the preparation of " . $this->active_domain);
+ }
+ else
+ {
+ $this->_parametersArray = $parametersArray;
+ if(array_key_exists('root', $parametersArray))
+ {
+ $this->databaseRoot = $parametersArray['root'];
+ }
+ }
+ }
+
+ /**
+ * Returns the state of this engine part.
+ *
+ * @return string The state of this engine part. It can be one of
+ * error, init, prepared, running, postrun, finished.
+ */
+ final public function getState()
+ {
+ if( $this->getError() )
+ {
+ return "error";
+ }
+
+ if( !($this->isPrepared) )
+ {
+ return "init";
+ }
+
+ if( !($this->isFinished) && !($this->isRunning) && !( $this->hasRun ) && ($this->isPrepared) )
+ {
+ return "prepared";
+ }
+
+ if ( !($this->isFinished) && $this->isRunning && !( $this->hasRun ) )
+ {
+ return "running";
+ }
+
+ if ( !($this->isFinished) && !($this->isRunning) && $this->hasRun )
+ {
+ return "postrun";
+ }
+
+ if ( $this->isFinished )
+ {
+ return "finished";
+ }
+ }
+
+ /**
+ * Constructs a Response Array based on the engine part's state.
+ * @return array The Response Array for the current state
+ */
+ final protected function _makeReturnTable()
+ {
+ // Get a list of warnings
+ $warnings = $this->getWarnings();
+ // Report only new warnings if there is no warnings queue size
+ if( $this->_warnings_queue_size == 0 )
+ {
+ if( ($this->warnings_pointer > 0) && ($this->warnings_pointer < (count($warnings)) ) )
+ {
+ $warnings = array_slice($warnings, $this->warnings_pointer + 1);
+ $this->warnings_pointer += count($warnings);
+ }
+ else
+ {
+ $this->warnings_pointer = count($warnings);
+ }
+ }
+
+ $out = array(
+ 'HasRun' => (!($this->isFinished)),
+ 'Domain' => $this->active_domain,
+ 'Step' => $this->active_step,
+ 'Substep' => $this->active_substep,
+ 'Error' => $this->getError(),
+ 'Warnings' => $warnings
+ );
+
+ return $out;
+ }
+
+ final protected function setDomain($new_domain)
+ {
+ $this->active_domain = $new_domain;
+ }
+
+ final public function getDomain()
+ {
+ return $this->active_domain;
+ }
+
+ final protected function setStep($new_step)
+ {
+ $this->active_step = $new_step;
+ }
+
+ final public function getStep()
+ {
+ return $this->active_step;
+ }
+
+ final protected function setSubstep($new_substep)
+ {
+ $this->active_substep = $new_substep;
+ }
+
+ final public function getSubstep()
+ {
+ return $this->active_substep;
+ }
+
+ /**
+ * Attaches an observer object
+ * @param AKAbstractPartObserver $obs
+ */
+ function attach(AKAbstractPartObserver $obs) {
+ $this->observers["$obs"] = $obs;
+ }
+
+ /**
+ * Dettaches an observer object
+ * @param AKAbstractPartObserver $obs
+ */
+ function detach(AKAbstractPartObserver $obs) {
+ delete($this->observers["$obs"]);
+ }
+
+ /**
+ * Notifies observers each time something interesting happened to the part
+ * @param mixed $message The event object
+ */
+ protected function notify($message) {
+ foreach ($this->observers as $obs) {
+ $obs->update($this, $message);
+ }
+ }
+}
+
+/**
+ * Descendants of this class can be used in the unarchiver's observer methods (attach, detach and notify)
+ * @author Nicholas
+ *
+ */
+abstract class AKAbstractPartObserver
+{
+ abstract public function update($object, $message);
+}
+
+/**
+ * Direct file writer
+ */
+class AKPostprocDirect extends AKAbstractPostproc
+{
+ public function process()
+ {
+ $restorePerms = AKFactory::get('kickstart.setup.restoreperms', false);
+ if($restorePerms)
+ {
+ @chmod($this->filename, $this->perms);
+ }
+ else
+ {
+ if(@is_file($this->filename))
+ {
+ @chmod($this->filename, 0644);
+ }
+ else
+ {
+ @chmod($this->filename, 0755);
+ }
+ }
+ if($this->timestamp > 0)
+ {
+ @touch($this->filename, $this->timestamp);
+ }
+ return true;
+ }
+
+ public function processFilename($filename, $perms = 0755)
+ {
+ $this->perms = $perms;
+ $this->filename = $filename;
+ return $filename;
+ }
+
+ public function createDirRecursive( $dirName, $perms )
+ {
+ if( AKFactory::get('kickstart.setup.dryrun','0') ) return true;
+ if (@mkdir($dirName, 0755, true)) {
+ @chmod($dirName, 0755);
+ return true;
+ }
+
+ $root = AKFactory::get('kickstart.setup.destdir');
+ $root = rtrim(str_replace('\\','/',$root),'/');
+ $dir = rtrim(str_replace('\\','/',$dirName),'/');
+ if(strpos($dir, $root) === 0) {
+ $dir = ltrim(substr($dir, strlen($root)), '/');
+ $root .= '/';
+ } else {
+ $root = '';
+ }
+
+ if(empty($dir)) return true;
+
+ $dirArray = explode('/', $dir);
+ $path = '';
+ foreach( $dirArray as $dir )
+ {
+ $path .= $dir . '/';
+ $ret = is_dir($root.$path) ? true : @mkdir($root.$path);
+ if( !$ret ) {
+ // Is this a file instead of a directory?
+ if(is_file($root.$path) )
+ {
+ @unlink($root.$path);
+ $ret = @mkdir($root.$path);
+ }
+ if( !$ret ) {
+ $this->setError( AKText::sprintf('COULDNT_CREATE_DIR',$path) );
+ return false;
+ }
+ }
+ // Try to set new directory permissions to 0755
+ @chmod($root.$path, $perms);
+ }
+ return true;
+ }
+
+ public function chmod( $file, $perms )
+ {
+ if( AKFactory::get('kickstart.setup.dryrun','0') ) return true;
+
+ return @chmod( $file, $perms );
+ }
+
+ public function unlink( $file )
+ {
+ return @unlink( $file );
+ }
+
+ public function rmdir( $directory )
+ {
+ return @rmdir( $directory );
+ }
+
+ public function rename( $from, $to )
+ {
+ return @rename($from, $to);
+ }
+
+}
+
+/**
+ * FTP file writer
+ */
+class AKPostprocFTP extends AKAbstractPostproc
+{
+ /** @var bool Should I use FTP over implicit SSL? */
+ public $useSSL = false;
+ /** @var bool use Passive mode? */
+ public $passive = true;
+ /** @var string FTP host name */
+ public $host = '';
+ /** @var int FTP port */
+ public $port = 21;
+ /** @var string FTP user name */
+ public $user = '';
+ /** @var string FTP password */
+ public $pass = '';
+ /** @var string FTP initial directory */
+ public $dir = '';
+ /** @var resource The FTP handle */
+ private $handle = null;
+ /** @var string The temporary directory where the data will be stored */
+ private $tempDir = '';
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->useSSL = AKFactory::get('kickstart.ftp.ssl', false);
+ $this->passive = AKFactory::get('kickstart.ftp.passive', true);
+ $this->host = AKFactory::get('kickstart.ftp.host', '');
+ $this->port = AKFactory::get('kickstart.ftp.port', 21);
+ if(trim($this->port) == '') $this->port = 21;
+ $this->user = AKFactory::get('kickstart.ftp.user', '');
+ $this->pass = AKFactory::get('kickstart.ftp.pass', '');
+ $this->dir = AKFactory::get('kickstart.ftp.dir', '');
+ $this->tempDir = AKFactory::get('kickstart.ftp.tempdir', '');
+
+ $connected = $this->connect();
+
+ if($connected)
+ {
+ if(!empty($this->tempDir))
+ {
+ $tempDir = rtrim($this->tempDir, '/\\').'/';
+ $writable = $this->isDirWritable($tempDir);
+ }
+ else
+ {
+ $tempDir = '';
+ $writable = false;
+ }
+
+ if(!$writable) {
+ // Default temporary directory is the current root
+ $tempDir = function_exists('getcwd') ? getcwd() : dirname(__FILE__);
+ if(empty($tempDir))
+ {
+ // Oh, we have no directory reported!
+ $tempDir = '.';
+ }
+ $absoluteDirToHere = $tempDir;
+ $tempDir = rtrim(str_replace('\\','/',$tempDir),'/');
+ if(!empty($tempDir)) $tempDir .= '/';
+ $this->tempDir = $tempDir;
+ // Is this directory writable?
+ $writable = $this->isDirWritable($tempDir);
+ }
+
+ if(!$writable)
+ {
+ // Nope. Let's try creating a temporary directory in the site's root.
+ $tempDir = $absoluteDirToHere.'/kicktemp';
+ $this->createDirRecursive($tempDir, 0777);
+ // Try making it writable...
+ $this->fixPermissions($tempDir);
+ $writable = $this->isDirWritable($tempDir);
+ }
+
+ // Was the new directory writable?
+ if(!$writable)
+ {
+ // Let's see if the user has specified one
+ $userdir = AKFactory::get('kickstart.ftp.tempdir', '');
+ if(!empty($userdir))
+ {
+ // Is it an absolute or a relative directory?
+ $absolute = false;
+ $absolute = $absolute || ( substr($userdir,0,1) == '/' );
+ $absolute = $absolute || ( substr($userdir,1,1) == ':' );
+ $absolute = $absolute || ( substr($userdir,2,1) == ':' );
+ if(!$absolute)
+ {
+ // Make absolute
+ $tempDir = $absoluteDirToHere.$userdir;
+ }
+ else
+ {
+ // it's already absolute
+ $tempDir = $userdir;
+ }
+ // Does the directory exist?
+ if( is_dir($tempDir) )
+ {
+ // Yeah. Is it writable?
+ $writable = $this->isDirWritable($tempDir);
+ }
+ }
+ }
+ $this->tempDir = $tempDir;
+
+ if(!$writable)
+ {
+ // No writable directory found!!!
+ $this->setError(AKText::_('FTP_TEMPDIR_NOT_WRITABLE'));
+ }
+ else
+ {
+ AKFactory::set('kickstart.ftp.tempdir', $tempDir);
+ $this->tempDir = $tempDir;
+ }
+ }
+ }
+
+ function __wakeup()
+ {
+ $this->connect();
+ }
+
+ public function connect()
+ {
+ // Connect to server, using SSL if so required
+ if($this->useSSL) {
+ $this->handle = @ftp_ssl_connect($this->host, $this->port);
+ } else {
+ $this->handle = @ftp_connect($this->host, $this->port);
+ }
+ if($this->handle === false)
+ {
+ $this->setError(AKText::_('WRONG_FTP_HOST'));
+ return false;
+ }
+
+ // Login
+ if(! @ftp_login($this->handle, $this->user, $this->pass))
+ {
+ $this->setError(AKText::_('WRONG_FTP_USER'));
+ @ftp_close($this->handle);
+ return false;
+ }
+
+ // Change to initial directory
+ if(! @ftp_chdir($this->handle, $this->dir))
+ {
+ $this->setError(AKText::_('WRONG_FTP_PATH1'));
+ @ftp_close($this->handle);
+ return false;
+ }
+
+ // Enable passive mode if the user requested it
+ if( $this->passive )
+ {
+ @ftp_pasv($this->handle, true);
+ }
+ else
+ {
+ @ftp_pasv($this->handle, false);
+ }
+
+ return true;
+ }
+
+ public function process()
+ {
+ if( is_null($this->tempFilename) )
+ {
+ // If an empty filename is passed, it means that we shouldn't do any post processing, i.e.
+ // the entity was a directory or symlink
+ return true;
+ }
+
+ $remotePath = dirname($this->filename);
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ $removePath = ltrim($removePath, "/");
+ $remotePath = ltrim($remotePath, "/");
+ $left = substr($remotePath, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $remotePath = substr($remotePath, strlen($removePath));
+ }
+ }
+
+ $absoluteFSPath = dirname($this->filename);
+ $relativeFTPPath = trim($remotePath, '/');
+ $absoluteFTPPath = '/'.trim( $this->dir, '/' ).'/'.trim($remotePath, '/');
+ $onlyFilename = basename($this->filename);
+
+ $remoteName = $absoluteFTPPath.'/'.$onlyFilename;
+
+ $ret = @ftp_chdir($this->handle, $absoluteFTPPath);
+ if($ret === false)
+ {
+ $ret = $this->createDirRecursive( $absoluteFSPath, 0755);
+ if($ret === false) {
+ $this->setError(AKText::sprintf('FTP_COULDNT_UPLOAD', $this->filename));
+ return false;
+ }
+ $ret = @ftp_chdir($this->handle, $absoluteFTPPath);
+ if($ret === false) {
+ $this->setError(AKText::sprintf('FTP_COULDNT_UPLOAD', $this->filename));
+ return false;
+ }
+ }
+
+ $ret = @ftp_put($this->handle, $remoteName, $this->tempFilename, FTP_BINARY);
+ if($ret === false)
+ {
+ // If we couldn't create the file, attempt to fix the permissions in the PHP level and retry!
+ $this->fixPermissions($this->filename);
+ $this->unlink($this->filename);
+
+ $fp = @fopen($this->tempFilename);
+ if($fp !== false)
+ {
+ $ret = @ftp_fput($this->handle, $remoteName, $fp, FTP_BINARY);
+ @fclose($fp);
+ }
+ else
+ {
+ $ret = false;
+ }
+ }
+ @unlink($this->tempFilename);
+
+ if($ret === false)
+ {
+ $this->setError(AKText::sprintf('FTP_COULDNT_UPLOAD', $this->filename));
+ return false;
+ }
+ $restorePerms = AKFactory::get('kickstart.setup.restoreperms', false);
+ if($restorePerms)
+ {
+ @ftp_chmod($this->_handle, $perms, $remoteName);
+ }
+ else
+ {
+ @ftp_chmod($this->_handle, 0644, $remoteName);
+ }
+ return true;
+ }
+
+ public function processFilename($filename, $perms = 0755)
+ {
+ // Catch some error conditions...
+ if($this->getError())
+ {
+ return false;
+ }
+
+ // If a null filename is passed, it means that we shouldn't do any post processing, i.e.
+ // the entity was a directory or symlink
+ if(is_null($filename))
+ {
+ $this->filename = null;
+ $this->tempFilename = null;
+ return null;
+ }
+
+ // Strip absolute filesystem path to website's root
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ $left = substr($filename, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $filename = substr($filename, strlen($removePath));
+ }
+ }
+
+ // Trim slash on the left
+ $filename = ltrim($filename, '/');
+
+ $this->filename = $filename;
+ $this->tempFilename = tempnam($this->tempDir, 'kickstart-');
+ $this->perms = $perms;
+
+ if( empty($this->tempFilename) )
+ {
+ // Oops! Let's try something different
+ $this->tempFilename = $this->tempDir.'/kickstart-'.time().'.dat';
+ }
+
+ return $this->tempFilename;
+ }
+
+ private function isDirWritable($dir)
+ {
+ $fp = @fopen($dir.'/kickstart.dat', 'wb');
+ if($fp === false)
+ {
+ return false;
+ }
+ else
+ {
+ @fclose($fp);
+ unlink($dir.'/kickstart.dat');
+ return true;
+ }
+ }
+
+ public function createDirRecursive( $dirName, $perms )
+ {
+ // Strip absolute filesystem path to website's root
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ // UNIXize the paths
+ $removePath = str_replace('\\','/',$removePath);
+ $dirName = str_replace('\\','/',$dirName);
+ // Make sure they both end in a slash
+ $removePath = rtrim($removePath,'/\\').'/';
+ $dirName = rtrim($dirName,'/\\').'/';
+ // Process the path removal
+ $left = substr($dirName, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $dirName = substr($dirName, strlen($removePath));
+ }
+ }
+ if(empty($dirName)) $dirName = ''; // 'cause the substr() above may return FALSE.
+
+ $check = '/'.trim($this->dir,'/').'/'.trim($dirName, '/');
+ if($this->is_dir($check)) return true;
+
+ $alldirs = explode('/', $dirName);
+ $previousDir = '/'.trim($this->dir);
+ foreach($alldirs as $curdir)
+ {
+ $check = $previousDir.'/'.$curdir;
+ if(!$this->is_dir($check))
+ {
+ // Proactively try to delete a file by the same name
+ @ftp_delete($this->handle, $check);
+
+ if(@ftp_mkdir($this->handle, $check) === false)
+ {
+ // If we couldn't create the directory, attempt to fix the permissions in the PHP level and retry!
+ $this->fixPermissions($removePath.$check);
+ if(@ftp_mkdir($this->handle, $check) === false)
+ {
+ // Can we fall back to pure PHP mode, sire?
+ if(!@mkdir($check))
+ {
+ $this->setError(AKText::sprintf('FTP_CANT_CREATE_DIR',$dir));
+ return false;
+ }
+ else
+ {
+ // Since the directory was built by PHP, change its permissions
+ @chmod($check, "0777");
+ return true;
+ }
+ }
+ }
+ @ftp_chmod($this->handle, $perms, $check);
+ }
+ $previousDir = $check;
+ }
+
+ return true;
+ }
+
+ public function close()
+ {
+ @ftp_close($this->handle);
+ }
+
+ /*
+ * Tries to fix directory/file permissions in the PHP level, so that
+ * the FTP operation doesn't fail.
+ * @param $path string The full path to a directory or file
+ */
+ private function fixPermissions( $path )
+ {
+ // Turn off error reporting
+ if(!defined('KSDEBUG')) {
+ $oldErrorReporting = @error_reporting(E_NONE);
+ }
+
+ // Get UNIX style paths
+ $relPath = str_replace('\\','/',$path);
+ $basePath = rtrim(str_replace('\\','/',dirname(__FILE__)),'/');
+ $basePath = rtrim($basePath,'/');
+ if(!empty($basePath)) $basePath .= '/';
+ // Remove the leading relative root
+ if( substr($relPath,0,strlen($basePath)) == $basePath )
+ $relPath = substr($relPath,strlen($basePath));
+ $dirArray = explode('/', $relPath);
+ $pathBuilt = rtrim($basePath,'/');
+ foreach( $dirArray as $dir )
+ {
+ if(empty($dir)) continue;
+ $oldPath = $pathBuilt;
+ $pathBuilt .= '/'.$dir;
+ if(is_dir($oldPath.$dir))
+ {
+ @chmod($oldPath.$dir, 0777);
+ }
+ else
+ {
+ if(@chmod($oldPath.$dir, 0777) === false)
+ {
+ @unlink($oldPath.$dir);
+ }
+ }
+ }
+
+ // Restore error reporting
+ if(!defined('KSDEBUG')) {
+ @error_reporting($oldErrorReporting);
+ }
+ }
+
+ public function chmod( $file, $perms )
+ {
+ return @ftp_chmod($this->handle, $perms, $path);
+ }
+
+ private function is_dir( $dir )
+ {
+ return @ftp_chdir( $this->handle, $dir );
+ }
+
+ public function unlink( $file )
+ {
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ $left = substr($file, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $file = substr($file, strlen($removePath));
+ }
+ }
+
+ $check = '/'.trim($this->dir,'/').'/'.trim($file, '/');
+
+ return @ftp_delete( $this->handle, $check );
+ }
+
+ public function rmdir( $directory )
+ {
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ $left = substr($directory, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $directory = substr($directory, strlen($removePath));
+ }
+ }
+
+ $check = '/'.trim($this->dir,'/').'/'.trim($directory, '/');
+
+ return @ftp_rmdir( $this->handle, $check );
+ }
+
+ public function rename( $from, $to )
+ {
+ $originalFrom = $from;
+ $originalTo = $to;
+
+ $removePath = AKFactory::get('kickstart.setup.destdir','');
+ if(!empty($removePath))
+ {
+ $left = substr($from, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $from = substr($from, strlen($removePath));
+ }
+ }
+ $from = '/'.trim($this->dir,'/').'/'.trim($from, '/');
+
+ if(!empty($removePath))
+ {
+ $left = substr($to, 0, strlen($removePath));
+ if($left == $removePath)
+ {
+ $to = substr($to, strlen($removePath));
+ }
+ }
+ $to = '/'.trim($this->dir,'/').'/'.trim($to, '/');
+
+ $result = @ftp_rename( $this->handle, $from, $to );
+ if($result !== true)
+ {
+ return @rename($from, $to);
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+}
+
+/**
+ * JPA archive extraction class
+ */
+class AKUnarchiverJPA extends AKAbstractUnarchiver
+{
+ private $archiveHeaderData = array();
+
+ protected function readArchiveHeader()
+ {
+ // Initialize header data array
+ $this->archiveHeaderData = new stdClass();
+
+ // Open the first part
+ $this->nextFile();
+
+ // Fail for unreadable files
+ if( $this->fp === false ) return false;
+
+ // Read the signature
+ $sig = fread( $this->fp, 3 );
+
+ if ($sig != 'JPA')
+ {
+ // Not a JPA file
+ $this->setError( AKText::_('ERR_NOT_A_JPA_FILE') );
+ return false;
+ }
+
+ // Read and parse header length
+ $header_length_array = unpack( 'v', fread( $this->fp, 2 ) );
+ $header_length = $header_length_array[1];
+
+ // Read and parse the known portion of header data (14 bytes)
+ $bin_data = fread($this->fp, 14);
+ $header_data = unpack('Cmajor/Cminor/Vcount/Vuncsize/Vcsize', $bin_data);
+
+ // Load any remaining header data (forward compatibility)
+ $rest_length = $header_length - 19;
+ if( $rest_length > 0 )
+ $junk = fread($this->fp, $rest_length);
+ else
+ $junk = '';
+
+ // Temporary array with all the data we read
+ $temp = array(
+ 'signature' => $sig,
+ 'length' => $header_length,
+ 'major' => $header_data['major'],
+ 'minor' => $header_data['minor'],
+ 'filecount' => $header_data['count'],
+ 'uncompressedsize' => $header_data['uncsize'],
+ 'compressedsize' => $header_data['csize'],
+ 'unknowndata' => $junk
+ );
+ // Array-to-object conversion
+ foreach($temp as $key => $value)
+ {
+ $this->archiveHeaderData->{$key} = $value;
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+
+ $this->dataReadLength = 0;
+
+ return true;
+ }
+
+ /**
+ * Concrete classes must use this method to read the file header
+ * @return bool True if reading the file was successful, false if an error occured or we reached end of archive
+ */
+ protected function readFileHeader()
+ {
+ // If the current part is over, proceed to the next part please
+ if( $this->isEOF(true) ) {
+ $this->nextFile();
+ }
+
+ // Get and decode Entity Description Block
+ $signature = fread($this->fp, 3);
+
+ $this->fileHeader = new stdClass();
+ $this->fileHeader->timestamp = 0;
+
+ // Check signature
+ if( $signature != 'JPF' )
+ {
+ if($this->isEOF(true))
+ {
+ // This file is finished; make sure it's the last one
+ $this->nextFile();
+ if(!$this->isEOF(false))
+ {
+ $this->setError(AKText::sprintf('INVALID_FILE_HEADER', $this->currentPartNumber, $this->currentPartOffset));
+ return false;
+ }
+ // We're just finished
+ return false;
+ }
+ else
+ {
+ // This is not a file block! The archive is corrupt.
+ $this->setError(AKText::sprintf('INVALID_FILE_HEADER', $this->currentPartNumber, $this->currentPartOffset));
+ return false;
+ }
+ }
+ // This a JPA Entity Block. Process the header.
+
+ $isBannedFile = false;
+
+ // Read length of EDB and of the Entity Path Data
+ $length_array = unpack('vblocksize/vpathsize', fread($this->fp, 4));
+ // Read the path data
+ if($length_array['pathsize'] > 0) {
+ $file = fread( $this->fp, $length_array['pathsize'] );
+ } else {
+ $file = '';
+ }
+
+ // Handle file renaming
+ $isRenamed = false;
+ if(is_array($this->renameFiles) && (count($this->renameFiles) > 0) )
+ {
+ if(array_key_exists($file, $this->renameFiles))
+ {
+ $file = $this->renameFiles[$file];
+ $isRenamed = true;
+ }
+ }
+
+ // Handle directory renaming
+ $isDirRenamed = false;
+ if(is_array($this->renameDirs) && (count($this->renameDirs) > 0)) {
+ if(array_key_exists(dirname($file), $this->renameDirs)) {
+ $file = rtrim($this->renameDirs[dirname($file)],'/').'/'.basename($file);
+ $isRenamed = true;
+ $isDirRenamed = true;
+ }
+ }
+
+ // Read and parse the known data portion
+ $bin_data = fread( $this->fp, 14 );
+ $header_data = unpack('Ctype/Ccompression/Vcompsize/Vuncompsize/Vperms', $bin_data);
+ // Read any unknown data
+ $restBytes = $length_array['blocksize'] - (21 + $length_array['pathsize']);
+ if( $restBytes > 0 )
+ {
+ // Start reading the extra fields
+ while($restBytes >= 4)
+ {
+ $extra_header_data = fread($this->fp, 4);
+ $extra_header = unpack('vsignature/vlength', $extra_header_data);
+ $restBytes -= 4;
+ $extra_header['length'] -= 4;
+ switch($extra_header['signature'])
+ {
+ case 256:
+ // File modified timestamp
+ if($extra_header['length'] > 0)
+ {
+ $bindata = fread($this->fp, $extra_header['length']);
+ $restBytes -= $extra_header['length'];
+ $timestamps = unpack('Vmodified', substr($bindata,0,4));
+ $filectime = $timestamps['modified'];
+ $this->fileHeader->timestamp = $filectime;
+ }
+ break;
+
+ default:
+ // Unknown field
+ if($extra_header['length']>0) {
+ $junk = fread($this->fp, $extra_header['length']);
+ $restBytes -= $extra_header['length'];
+ }
+ break;
+ }
+ }
+ if($restBytes > 0) $junk = fread($this->fp, $restBytes);
+ }
+
+ $compressionType = $header_data['compression'];
+
+ // Populate the return array
+ $this->fileHeader->file = $file;
+ $this->fileHeader->compressed = $header_data['compsize'];
+ $this->fileHeader->uncompressed = $header_data['uncompsize'];
+ switch($header_data['type'])
+ {
+ case 0:
+ $this->fileHeader->type = 'dir';
+ break;
+
+ case 1:
+ $this->fileHeader->type = 'file';
+ break;
+
+ case 2:
+ $this->fileHeader->type = 'link';
+ break;
+ }
+ switch( $compressionType )
+ {
+ case 0:
+ $this->fileHeader->compression = 'none';
+ break;
+ case 1:
+ $this->fileHeader->compression = 'gzip';
+ break;
+ case 2:
+ $this->fileHeader->compression = 'bzip2';
+ break;
+ }
+ $this->fileHeader->permissions = $header_data['perms'];
+
+ // Find hard-coded banned files
+ if( (basename($this->fileHeader->file) == ".") || (basename($this->fileHeader->file) == "..") )
+ {
+ $isBannedFile = true;
+ }
+
+ // Also try to find banned files passed in class configuration
+ if((count($this->skipFiles) > 0) && (!$isRenamed) )
+ {
+ if(in_array($this->fileHeader->file, $this->skipFiles))
+ {
+ $isBannedFile = true;
+ }
+ }
+
+ // If we have a banned file, let's skip it
+ if($isBannedFile)
+ {
+ // Advance the file pointer, skipping exactly the size of the compressed data
+ $seekleft = $this->fileHeader->compressed;
+ while($seekleft > 0)
+ {
+ // Ensure that we can seek past archive part boundaries
+ $curSize = @filesize($this->archiveList[$this->currentPartNumber]);
+ $curPos = @ftell($this->fp);
+ $canSeek = $curSize - $curPos;
+ if($canSeek > $seekleft) $canSeek = $seekleft;
+ @fseek( $this->fp, $canSeek, SEEK_CUR );
+ $seekleft -= $canSeek;
+ if($seekleft) $this->nextFile();
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+ $this->runState = AK_STATE_DONE;
+ return true;
+ }
+
+ // Last chance to prepend a path to the filename
+ if(!empty($this->addPath) && !$isDirRenamed)
+ {
+ $this->fileHeader->file = $this->addPath.$this->fileHeader->file;
+ }
+
+ // Get the translated path name
+ $restorePerms = AKFactory::get('kickstart.setup.restoreperms', false);
+ if($this->fileHeader->type == 'file')
+ {
+ // Regular file; ask the postproc engine to process its filename
+ if($restorePerms)
+ {
+ $this->fileHeader->realFile = $this->postProcEngine->processFilename( $this->fileHeader->file, $this->fileHeader->permissions );
+ }
+ else
+ {
+ $this->fileHeader->realFile = $this->postProcEngine->processFilename( $this->fileHeader->file );
+ }
+ }
+ elseif($this->fileHeader->type == 'dir')
+ {
+ $dir = $this->fileHeader->file;
+
+ // Directory; just create it
+ if($restorePerms)
+ {
+ $this->postProcEngine->createDirRecursive( $this->fileHeader->file, $this->fileHeader->permissions );
+ }
+ else
+ {
+ $this->postProcEngine->createDirRecursive( $this->fileHeader->file, 0755 );
+ }
+ $this->postProcEngine->processFilename(null);
+ }
+ else
+ {
+ // Symlink; do not post-process
+ $this->postProcEngine->processFilename(null);
+ }
+
+ $this->createDirectory();
+
+ // Header is read
+ $this->runState = AK_STATE_HEADER;
+
+ $this->dataReadLength = 0;
+
+ return true;
+ }
+
+ /**
+ * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when
+ * it's finished processing the file data.
+ * @return bool True if processing the file data was successful, false if an error occured
+ */
+ protected function processFileData()
+ {
+ switch( $this->fileHeader->type )
+ {
+ case 'dir':
+ return $this->processTypeDir();
+ break;
+
+ case 'link':
+ return $this->processTypeLink();
+ break;
+
+ case 'file':
+ switch($this->fileHeader->compression)
+ {
+ case 'none':
+ return $this->processTypeFileUncompressed();
+ break;
+
+ case 'gzip':
+ case 'bzip2':
+ return $this->processTypeFileCompressedSimple();
+ break;
+
+ }
+ break;
+ }
+ }
+
+ private function processTypeFileUncompressed()
+ {
+ // Uncompressed files are being processed in small chunks, to avoid timeouts
+ if( ($this->dataReadLength == 0) && !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ // Before processing file data, ensure permissions are adequate
+ $this->setCorrectPermissions( $this->fileHeader->file );
+ }
+
+ // Open the output file
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if ($this->dataReadLength == 0) {
+ $outfp = @fopen( $this->fileHeader->realFile, 'wb' );
+ } else {
+ $outfp = @fopen( $this->fileHeader->realFile, 'ab' );
+ }
+
+ // Can we write to the file?
+ if( ($outfp === false) && (!$ignore) ) {
+ // An error occured
+ $this->setError( AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile) );
+ return false;
+ }
+ }
+
+ // Does the file have any data, at all?
+ if( $this->fileHeader->compressed == 0 )
+ {
+ // No file data!
+ if( !AKFactory::get('kickstart.setup.dryrun','0') && is_resource($outfp) ) @fclose($outfp);
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ // Reference to the global timer
+ $timer = AKFactory::getTimer();
+
+ $toReadBytes = 0;
+ $leftBytes = $this->fileHeader->compressed - $this->dataReadLength;
+
+ // Loop while there's data to read and enough time to do it
+ while( ($leftBytes > 0) && ($timer->getTimeLeft() > 0) )
+ {
+ $toReadBytes = ($leftBytes > $this->chunkSize) ? $this->chunkSize : $leftBytes;
+ $data = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($data);
+ $leftBytes -= $reallyReadBytes;
+ $this->dataReadLength += $reallyReadBytes;
+ if($reallyReadBytes < $toReadBytes)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fwrite( $outfp, $data );
+ }
+
+ // Close the file pointer
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fclose($outfp);
+
+ // Was this a pre-timeout bail out?
+ if( $leftBytes > 0 )
+ {
+ $this->runState = AK_STATE_DATA;
+ }
+ else
+ {
+ // Oh! We just finished!
+ $this->runState = AK_STATE_DATAREAD;
+ $this->dataReadLength = 0;
+ }
+
+ return true;
+ }
+
+ private function processTypeFileCompressedSimple()
+ {
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ // Before processing file data, ensure permissions are adequate
+ $this->setCorrectPermissions( $this->fileHeader->file );
+
+ // Open the output file
+ $outfp = @fopen( $this->fileHeader->realFile, 'wb' );
+
+ // Can we write to the file?
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if( ($outfp === false) && (!$ignore) ) {
+ // An error occured
+ $this->setError( AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile) );
+ return false;
+ }
+ }
+
+ // Does the file have any data, at all?
+ if( $this->fileHeader->compressed == 0 )
+ {
+ // No file data!
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fclose($outfp);
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ // Simple compressed files are processed as a whole; we can't do chunk processing
+ $zipData = $this->fread( $this->fp, $this->fileHeader->compressed );
+ while( akstringlen($zipData) < $this->fileHeader->compressed )
+ {
+ // End of local file before reading all data, but have more archive parts?
+ if($this->isEOF(true) && !$this->isEOF(false))
+ {
+ // Yeap. Read from the next file
+ $this->nextFile();
+ $bytes_left = $this->fileHeader->compressed - akstringlen($zipData);
+ $zipData .= $this->fread( $this->fp, $bytes_left );
+ }
+ else
+ {
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+
+ if($this->fileHeader->compression == 'gzip')
+ {
+ $unzipData = gzinflate( $zipData );
+ }
+ elseif($this->fileHeader->compression == 'bzip2')
+ {
+ $unzipData = bzdecompress( $zipData );
+ }
+ unset($zipData);
+
+ // Write to the file.
+ if( !AKFactory::get('kickstart.setup.dryrun','0') && is_resource($outfp) )
+ {
+ @fwrite( $outfp, $unzipData, $this->fileHeader->uncompressed );
+ @fclose( $outfp );
+ }
+ unset($unzipData);
+
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ /**
+ * Process the file data of a link entry
+ * @return bool
+ */
+ private function processTypeLink()
+ {
+ $readBytes = 0;
+ $toReadBytes = 0;
+ $leftBytes = $this->fileHeader->compressed;
+ $data = '';
+
+ while( $leftBytes > 0)
+ {
+ $toReadBytes = ($leftBytes > $this->chunkSize) ? $this->chunkSize : $leftBytes;
+ $mydata = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($mydata);
+ $data .= $mydata;
+ $leftBytes -= $reallyReadBytes;
+ if($reallyReadBytes < $toReadBytes)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+ }
+
+ // Try to remove an existing file or directory by the same name
+ if(file_exists($this->fileHeader->realFile)) { @unlink($this->fileHeader->realFile); @rmdir($this->fileHeader->realFile); }
+ // Remove any trailing slash
+ if(substr($this->fileHeader->realFile, -1) == '/') $this->fileHeader->realFile = substr($this->fileHeader->realFile, 0, -1);
+ // Create the symlink - only possible within PHP context. There's no support built in the FTP protocol, so no postproc use is possible here :(
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ @symlink($data, $this->fileHeader->realFile);
+
+ $this->runState = AK_STATE_DATAREAD;
+
+ return true; // No matter if the link was created!
+ }
+
+ /**
+ * Process the file data of a directory entry
+ * @return bool
+ */
+ private function processTypeDir()
+ {
+ // Directory entries in the JPA do not have file data, therefore we're done processing the entry
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ /**
+ * Creates the directory this file points to
+ */
+ protected function createDirectory()
+ {
+ if( AKFactory::get('kickstart.setup.dryrun','0') ) return true;
+
+ // Do we need to create a directory?
+ if(empty($this->fileHeader->realFile)) $this->fileHeader->realFile = $this->fileHeader->file;
+ $lastSlash = strrpos($this->fileHeader->realFile, '/');
+ $dirName = substr( $this->fileHeader->realFile, 0, $lastSlash);
+ $perms = $this->flagRestorePermissions ? $retArray['permissions'] : 0755;
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if( ($this->postProcEngine->createDirRecursive($dirName, $perms) == false) && (!$ignore) ) {
+ $this->setError( AKText::sprintf('COULDNT_CREATE_DIR', $dirName) );
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+}
+
+/**
+ * ZIP archive extraction class
+ *
+ * Since the file data portion of ZIP and JPA are similarly structured (it's empty for dirs,
+ * linked node name for symlinks, dumped binary data for no compressions and dumped gzipped
+ * binary data for gzip compression) we just have to subclass AKUnarchiverJPA and change the
+ * header reading bits. Reusable code ;)
+ */
+class AKUnarchiverZIP extends AKUnarchiverJPA
+{
+ var $expectDataDescriptor = false;
+
+ protected function readArchiveHeader()
+ {
+ // Initialize header data array
+ $this->archiveHeaderData = new stdClass();
+
+ // Open the first part
+ $this->nextFile();
+
+ // Fail for unreadable files
+ if( $this->fp === false ) return false;
+
+ // Read a possible multipart signature
+ $sigBinary = fread( $this->fp, 4 );
+ $headerData = unpack('Vsig', $sigBinary);
+
+ // Roll back if it's not a multipart archive
+ if( $headerData['sig'] == 0x04034b50 ) fseek($this->fp, -4, SEEK_CUR);
+
+ $multiPartSigs = array(
+ 0x08074b50, // Multi-part ZIP
+ 0x30304b50, // Multi-part ZIP (alternate)
+ 0x04034b50 // Single file
+ );
+ if( !in_array($headerData['sig'], $multiPartSigs) )
+ {
+ $this->setError(AKText::_('ERR_CORRUPT_ARCHIVE'));
+ return false;
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+
+ $this->dataReadLength = 0;
+
+ return true;
+ }
+
+ /**
+ * Concrete classes must use this method to read the file header
+ * @return bool True if reading the file was successful, false if an error occured or we reached end of archive
+ */
+ protected function readFileHeader()
+ {
+ // If the current part is over, proceed to the next part please
+ if( $this->isEOF(true) ) {
+ $this->nextFile();
+ }
+
+ if($this->expectDataDescriptor)
+ {
+ // The last file had bit 3 of the general purpose bit flag set. This means that we have a
+ // 12 byte data descriptor we need to skip. To make things worse, there might also be a 4
+ // byte optional data descriptor header (0x08074b50).
+ $junk = @fread($this->fp, 4);
+ $junk = unpack('Vsig', $junk);
+ if($junk['sig'] == 0x08074b50) {
+ // Yes, there was a signature
+ $junk = @fread($this->fp, 12);
+ if(defined('KSDEBUG')) {
+ debugMsg('Data descriptor (w/ header) skipped at '.(ftell($this->fp)-12));
+ }
+ } else {
+ // No, there was no signature, just read another 8 bytes
+ $junk = @fread($this->fp, 8);
+ if(defined('KSDEBUG')) {
+ debugMsg('Data descriptor (w/out header) skipped at '.(ftell($this->fp)-8));
+ }
+ }
+
+ // And check for EOF, too
+ if( $this->isEOF(true) ) {
+ if(defined('KSDEBUG')) {
+ debugMsg('EOF before reading header');
+ }
+
+ $this->nextFile();
+ }
+ }
+
+ // Get and decode Local File Header
+ $headerBinary = fread($this->fp, 30);
+ $headerData = unpack('Vsig/C2ver/vbitflag/vcompmethod/vlastmodtime/vlastmoddate/Vcrc/Vcompsize/Vuncomp/vfnamelen/veflen', $headerBinary);
+
+ // Check signature
+ if(!( $headerData['sig'] == 0x04034b50 ))
+ {
+ if(defined('KSDEBUG')) {
+ debugMsg('Not a file signature at '.(ftell($this->fp)-4));
+ }
+
+ // The signature is not the one used for files. Is this a central directory record (i.e. we're done)?
+ if($headerData['sig'] == 0x02014b50)
+ {
+ if(defined('KSDEBUG')) {
+ debugMsg('EOCD signature at '.(ftell($this->fp)-4));
+ }
+ // End of ZIP file detected. We'll just skip to the end of file...
+ while( $this->nextFile() ) {};
+ @fseek($this->fp, 0, SEEK_END); // Go to EOF
+ return false;
+ }
+ else
+ {
+ if(defined('KSDEBUG')) {
+ debugMsg( 'Invalid signature ' . dechex($headerData['sig']) . ' at '.ftell($this->fp) );
+ }
+ $this->setError(AKText::_('ERR_CORRUPT_ARCHIVE'));
+ return false;
+ }
+ }
+
+ // If bit 3 of the bitflag is set, expectDataDescriptor is true
+ $this->expectDataDescriptor = ($headerData['bitflag'] & 4) == 4;
+
+ $this->fileHeader = new stdClass();
+ $this->fileHeader->timestamp = 0;
+
+ // Read the last modified data and time
+ $lastmodtime = $headerData['lastmodtime'];
+ $lastmoddate = $headerData['lastmoddate'];
+
+ if($lastmoddate && $lastmodtime)
+ {
+ // ----- Extract time
+ $v_hour = ($lastmodtime & 0xF800) >> 11;
+ $v_minute = ($lastmodtime & 0x07E0) >> 5;
+ $v_seconde = ($lastmodtime & 0x001F)*2;
+
+ // ----- Extract date
+ $v_year = (($lastmoddate & 0xFE00) >> 9) + 1980;
+ $v_month = ($lastmoddate & 0x01E0) >> 5;
+ $v_day = $lastmoddate & 0x001F;
+
+ // ----- Get UNIX date format
+ $this->fileHeader->timestamp = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+ }
+
+ $isBannedFile = false;
+
+ $this->fileHeader->compressed = $headerData['compsize'];
+ $this->fileHeader->uncompressed = $headerData['uncomp'];
+ $nameFieldLength = $headerData['fnamelen'];
+ $extraFieldLength = $headerData['eflen'];
+
+ // Read filename field
+ $this->fileHeader->file = fread( $this->fp, $nameFieldLength );
+
+ // Handle file renaming
+ $isRenamed = false;
+ if(is_array($this->renameFiles) && (count($this->renameFiles) > 0) )
+ {
+ if(array_key_exists($this->fileHeader->file, $this->renameFiles))
+ {
+ $this->fileHeader->file = $this->renameFiles[$this->fileHeader->file];
+ $isRenamed = true;
+ }
+ }
+
+ // Handle directory renaming
+ $isDirRenamed = false;
+ if(is_array($this->renameDirs) && (count($this->renameDirs) > 0)) {
+ if(array_key_exists(dirname($file), $this->renameDirs)) {
+ $file = rtrim($this->renameDirs[dirname($file)],'/').'/'.basename($file);
+ $isRenamed = true;
+ $isDirRenamed = true;
+ }
+ }
+
+ // Read extra field if present
+ if($extraFieldLength > 0) {
+ $extrafield = fread( $this->fp, $extraFieldLength );
+ }
+
+ if(defined('KSDEBUG')) {
+ debugMsg( '*'.ftell($this->fp).' IS START OF '.$this->fileHeader->file. ' ('.$this->fileHeader->compressed.' bytes)' );
+ }
+
+
+ // Decide filetype -- Check for directories
+ $this->fileHeader->type = 'file';
+ if( strrpos($this->fileHeader->file, '/') == strlen($this->fileHeader->file) - 1 ) $this->fileHeader->type = 'dir';
+ // Decide filetype -- Check for symbolic links
+ if( ($headerData['ver1'] == 10) && ($headerData['ver2'] == 3) )$this->fileHeader->type = 'link';
+
+ switch( $headerData['compmethod'] )
+ {
+ case 0:
+ $this->fileHeader->compression = 'none';
+ break;
+ case 8:
+ $this->fileHeader->compression = 'gzip';
+ break;
+ }
+
+ // Find hard-coded banned files
+ if( (basename($this->fileHeader->file) == ".") || (basename($this->fileHeader->file) == "..") )
+ {
+ $isBannedFile = true;
+ }
+
+ // Also try to find banned files passed in class configuration
+ if((count($this->skipFiles) > 0) && (!$isRenamed))
+ {
+ if(in_array($this->fileHeader->file, $this->skipFiles))
+ {
+ $isBannedFile = true;
+ }
+ }
+
+ // If we have a banned file, let's skip it
+ if($isBannedFile)
+ {
+ // Advance the file pointer, skipping exactly the size of the compressed data
+ $seekleft = $this->fileHeader->compressed;
+ while($seekleft > 0)
+ {
+ // Ensure that we can seek past archive part boundaries
+ $curSize = @filesize($this->archiveList[$this->currentPartNumber]);
+ $curPos = @ftell($this->fp);
+ $canSeek = $curSize - $curPos;
+ if($canSeek > $seekleft) $canSeek = $seekleft;
+ @fseek( $this->fp, $canSeek, SEEK_CUR );
+ $seekleft -= $canSeek;
+ if($seekleft) $this->nextFile();
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+ $this->runState = AK_STATE_DONE;
+ return true;
+ }
+
+ // Last chance to prepend a path to the filename
+ if(!empty($this->addPath) && !$isDirRenamed)
+ {
+ $this->fileHeader->file = $this->addPath.$this->fileHeader->file;
+ }
+
+ // Get the translated path name
+ if($this->fileHeader->type == 'file')
+ {
+ $this->fileHeader->realFile = $this->postProcEngine->processFilename( $this->fileHeader->file );
+ }
+ elseif($this->fileHeader->type == 'dir')
+ {
+ $this->fileHeader->timestamp = 0;
+
+ $dir = $this->fileHeader->file;
+
+ $this->postProcEngine->createDirRecursive( $this->fileHeader->file, 0755 );
+ $this->postProcEngine->processFilename(null);
+ }
+ else
+ {
+ // Symlink; do not post-process
+ $this->fileHeader->timestamp = 0;
+ $this->postProcEngine->processFilename(null);
+ }
+
+ $this->createDirectory();
+
+ // Header is read
+ $this->runState = AK_STATE_HEADER;
+
+ return true;
+ }
+
+}
+
+/**
+ * Timer class
+ */
+class AKCoreTimer extends AKAbstractObject
+{
+ /** @var int Maximum execution time allowance per step */
+ private $max_exec_time = null;
+
+ /** @var int Timestamp of execution start */
+ private $start_time = null;
+
+ /**
+ * Public constructor, creates the timer object and calculates the execution time limits
+ * @return AECoreTimer
+ */
+ public function __construct()
+ {
+ parent::__construct();
+
+ // Initialize start time
+ $this->start_time = $this->microtime_float();
+
+ // Get configured max time per step and bias
+ $config_max_exec_time = AKFactory::get('kickstart.tuning.max_exec_time', 14);
+ $bias = AKFactory::get('kickstart.tuning.run_time_bias', 75)/100;
+
+ // Get PHP's maximum execution time (our upper limit)
+ if(@function_exists('ini_get'))
+ {
+ $php_max_exec_time = @ini_get("maximum_execution_time");
+ if ( (!is_numeric($php_max_exec_time)) || ($php_max_exec_time == 0) ) {
+ // If we have no time limit, set a hard limit of about 10 seconds
+ // (safe for Apache and IIS timeouts, verbose enough for users)
+ $php_max_exec_time = 14;
+ }
+ }
+ else
+ {
+ // If ini_get is not available, use a rough default
+ $php_max_exec_time = 14;
+ }
+
+ // Apply an arbitrary correction to counter CMS load time
+ $php_max_exec_time--;
+
+ // Apply bias
+ $php_max_exec_time = $php_max_exec_time * $bias;
+ $config_max_exec_time = $config_max_exec_time * $bias;
+
+ // Use the most appropriate time limit value
+ if( $config_max_exec_time > $php_max_exec_time )
+ {
+ $this->max_exec_time = $php_max_exec_time;
+ }
+ else
+ {
+ $this->max_exec_time = $config_max_exec_time;
+ }
+ }
+
+ /**
+ * Wake-up function to reset internal timer when we get unserialized
+ */
+ public function __wakeup()
+ {
+ // Re-initialize start time on wake-up
+ $this->start_time = $this->microtime_float();
+ }
+
+ /**
+ * Gets the number of seconds left, before we hit the "must break" threshold
+ * @return float
+ */
+ public function getTimeLeft()
+ {
+ return $this->max_exec_time - $this->getRunningTime();
+ }
+
+ /**
+ * Gets the time elapsed since object creation/unserialization, effectively how
+ * long Akeeba Engine has been processing data
+ * @return float
+ */
+ public function getRunningTime()
+ {
+ return $this->microtime_float() - $this->start_time;
+ }
+
+ /**
+ * Returns the current timestampt in decimal seconds
+ */
+ private function microtime_float()
+ {
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+ }
+
+ /**
+ * Enforce the minimum execution time
+ */
+ public function enforce_min_exec_time()
+ {
+ // Try to get a sane value for PHP's maximum_execution_time INI parameter
+ if(@function_exists('ini_get'))
+ {
+ $php_max_exec = @ini_get("maximum_execution_time");
+ }
+ else
+ {
+ $php_max_exec = 10;
+ }
+ if ( ($php_max_exec == "") || ($php_max_exec == 0) ) {
+ $php_max_exec = 10;
+ }
+ // Decrease $php_max_exec time by 500 msec we need (approx.) to tear down
+ // the application, as well as another 500msec added for rounding
+ // error purposes. Also make sure this is never gonna be less than 0.
+ $php_max_exec = max($php_max_exec * 1000 - 1000, 0);
+
+ // Get the "minimum execution time per step" Akeeba Backup configuration variable
+ $minexectime = AKFactory::get('kickstart.tuning.min_exec_time',0);
+ if(!is_numeric($minexectime)) $minexectime = 0;
+
+ // Make sure we are not over PHP's time limit!
+ if($minexectime > $php_max_exec) $minexectime = $php_max_exec;
+
+ // Get current running time
+ $elapsed_time = $this->getRunningTime() * 1000;
+
+ // Only run a sleep delay if we haven't reached the minexectime execution time
+ if( ($minexectime > $elapsed_time) && ($elapsed_time > 0) )
+ {
+ $sleep_msec = $minexectime - $elapsed_time;
+ if(function_exists('usleep'))
+ {
+ usleep(1000 * $sleep_msec);
+ }
+ elseif(function_exists('time_nanosleep'))
+ {
+ $sleep_sec = floor($sleep_msec / 1000);
+ $sleep_nsec = 1000000 * ($sleep_msec - ($sleep_sec * 1000));
+ time_nanosleep($sleep_sec, $sleep_nsec);
+ }
+ elseif(function_exists('time_sleep_until'))
+ {
+ $until_timestamp = time() + $sleep_msec / 1000;
+ time_sleep_until($until_timestamp);
+ }
+ elseif(function_exists('sleep'))
+ {
+ $sleep_sec = ceil($sleep_msec/1000);
+ sleep( $sleep_sec );
+ }
+ }
+ elseif( $elapsed_time > 0 )
+ {
+ // No sleep required, even if user configured us to be able to do so.
+ }
+ }
+
+ /**
+ * Reset the timer. It should only be used in CLI mode!
+ */
+ public function resetTime()
+ {
+ $this->start_time = $this->microtime_float();
+ }
+}
+
+/**
+ * JPS archive extraction class
+ */
+class AKUnarchiverJPS extends AKUnarchiverJPA
+{
+ private $archiveHeaderData = array();
+
+ private $password = '';
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->password = AKFactory::get('kickstart.jps.password','');
+ }
+
+ protected function readArchiveHeader()
+ {
+ // Initialize header data array
+ $this->archiveHeaderData = new stdClass();
+
+ // Open the first part
+ $this->nextFile();
+
+ // Fail for unreadable files
+ if( $this->fp === false ) return false;
+
+ // Read the signature
+ $sig = fread( $this->fp, 3 );
+
+ if ($sig != 'JPS')
+ {
+ // Not a JPA file
+ $this->setError( AKText::_('ERR_NOT_A_JPS_FILE') );
+ return false;
+ }
+
+ // Read and parse the known portion of header data (5 bytes)
+ $bin_data = fread($this->fp, 5);
+ $header_data = unpack('Cmajor/Cminor/cspanned/vextra', $bin_data);
+
+ // Load any remaining header data (forward compatibility)
+ $rest_length = $header_data['extra'];
+ if( $rest_length > 0 )
+ $junk = fread($this->fp, $rest_length);
+ else
+ $junk = '';
+
+ // Temporary array with all the data we read
+ $temp = array(
+ 'signature' => $sig,
+ 'major' => $header_data['major'],
+ 'minor' => $header_data['minor'],
+ 'spanned' => $header_data['spanned']
+ );
+ // Array-to-object conversion
+ foreach($temp as $key => $value)
+ {
+ $this->archiveHeaderData->{$key} = $value;
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+
+ $this->dataReadLength = 0;
+
+ return true;
+ }
+
+ /**
+ * Concrete classes must use this method to read the file header
+ * @return bool True if reading the file was successful, false if an error occured or we reached end of archive
+ */
+ protected function readFileHeader()
+ {
+ // If the current part is over, proceed to the next part please
+ if( $this->isEOF(true) ) {
+ $this->nextFile();
+ }
+
+ // Get and decode Entity Description Block
+ $signature = fread($this->fp, 3);
+
+ // Check for end-of-archive siganture
+ if($signature == 'JPE')
+ {
+ $this->setState('postrun');
+ return true;
+ }
+
+ $this->fileHeader = new stdClass();
+ $this->fileHeader->timestamp = 0;
+
+ // Check signature
+ if( $signature != 'JPF' )
+ {
+ if($this->isEOF(true))
+ {
+ // This file is finished; make sure it's the last one
+ $this->nextFile();
+ if(!$this->isEOF(false))
+ {
+ $this->setError(AKText::sprintf('INVALID_FILE_HEADER', $this->currentPartNumber, $this->currentPartOffset));
+ return false;
+ }
+ // We're just finished
+ return false;
+ }
+ else
+ {
+ fseek($this->fp, -6, SEEK_CUR);
+ $signature = fread($this->fp, 3);
+ if($signature == 'JPE')
+ {
+ return false;
+ }
+
+ $this->setError(AKText::sprintf('INVALID_FILE_HEADER', $this->currentPartNumber, $this->currentPartOffset));
+ return false;
+ }
+ }
+ // This a JPA Entity Block. Process the header.
+
+ $isBannedFile = false;
+
+ // Read and decrypt the header
+ $edbhData = fread($this->fp, 4);
+ $edbh = unpack('vencsize/vdecsize', $edbhData);
+ $bin_data = fread($this->fp, $edbh['encsize']);
+
+ // Decrypt and truncate
+ $bin_data = AKEncryptionAES::AESDecryptCBC($bin_data, $this->password, 128);
+ $bin_data = substr($bin_data,0,$edbh['decsize']);
+
+ // Read length of EDB and of the Entity Path Data
+ $length_array = unpack('vpathsize', substr($bin_data,0,2) );
+ // Read the path data
+ $file = substr($bin_data,2,$length_array['pathsize']);
+
+ // Handle file renaming
+ $isRenamed = false;
+ if(is_array($this->renameFiles) && (count($this->renameFiles) > 0) )
+ {
+ if(array_key_exists($file, $this->renameFiles))
+ {
+ $file = $this->renameFiles[$file];
+ $isRenamed = true;
+ }
+ }
+
+ // Handle directory renaming
+ $isDirRenamed = false;
+ if(is_array($this->renameDirs) && (count($this->renameDirs) > 0)) {
+ if(array_key_exists(dirname($file), $this->renameDirs)) {
+ $file = rtrim($this->renameDirs[dirname($file)],'/').'/'.basename($file);
+ $isRenamed = true;
+ $isDirRenamed = true;
+ }
+ }
+
+ // Read and parse the known data portion
+ $bin_data = substr($bin_data, 2 + $length_array['pathsize']);
+ $header_data = unpack('Ctype/Ccompression/Vuncompsize/Vperms/Vfilectime', $bin_data);
+
+ $this->fileHeader->timestamp = $header_data['filectime'];
+ $compressionType = $header_data['compression'];
+
+ // Populate the return array
+ $this->fileHeader->file = $file;
+ $this->fileHeader->uncompressed = $header_data['uncompsize'];
+ switch($header_data['type'])
+ {
+ case 0:
+ $this->fileHeader->type = 'dir';
+ break;
+
+ case 1:
+ $this->fileHeader->type = 'file';
+ break;
+
+ case 2:
+ $this->fileHeader->type = 'link';
+ break;
+ }
+ switch( $compressionType )
+ {
+ case 0:
+ $this->fileHeader->compression = 'none';
+ break;
+ case 1:
+ $this->fileHeader->compression = 'gzip';
+ break;
+ case 2:
+ $this->fileHeader->compression = 'bzip2';
+ break;
+ }
+ $this->fileHeader->permissions = $header_data['perms'];
+
+ // Find hard-coded banned files
+ if( (basename($this->fileHeader->file) == ".") || (basename($this->fileHeader->file) == "..") )
+ {
+ $isBannedFile = true;
+ }
+
+ // Also try to find banned files passed in class configuration
+ if((count($this->skipFiles) > 0) && (!$isRenamed) )
+ {
+ if(in_array($this->fileHeader->file, $this->skipFiles))
+ {
+ $isBannedFile = true;
+ }
+ }
+
+ // If we have a banned file, let's skip it
+ if($isBannedFile)
+ {
+ $done = false;
+ while(!$done)
+ {
+ // Read the Data Chunk Block header
+ $binMiniHead = fread($this->fp, 8);
+ if( in_array( substr($binMiniHead,0,3), array('JPF','JPE') ) )
+ {
+ // Not a Data Chunk Block header, I am done skipping the file
+ @fseek($this->fp,-8,SEEK_CUR); // Roll back the file pointer
+ $done = true; // Mark as done
+ continue; // Exit loop
+ }
+ else
+ {
+ // Skip forward by the amount of compressed data
+ $miniHead = unpack('Vencsize/Vdecsize');
+ @fseek($this->fp, $miniHead['encsize'], SEEK_CUR);
+ }
+ }
+
+ $this->currentPartOffset = @ftell($this->fp);
+ $this->runState = AK_STATE_DONE;
+ return true;
+ }
+
+ // Last chance to prepend a path to the filename
+ if(!empty($this->addPath) && !$isDirRenamed)
+ {
+ $this->fileHeader->file = $this->addPath.$this->fileHeader->file;
+ }
+
+ // Get the translated path name
+ $restorePerms = AKFactory::get('kickstart.setup.restoreperms', false);
+ if($this->fileHeader->type == 'file')
+ {
+ // Regular file; ask the postproc engine to process its filename
+ if($restorePerms)
+ {
+ $this->fileHeader->realFile = $this->postProcEngine->processFilename( $this->fileHeader->file, $this->fileHeader->permissions );
+ }
+ else
+ {
+ $this->fileHeader->realFile = $this->postProcEngine->processFilename( $this->fileHeader->file );
+ }
+ }
+ elseif($this->fileHeader->type == 'dir')
+ {
+ $dir = $this->fileHeader->file;
+ $this->fileHeader->realFile = $dir;
+
+ // Directory; just create it
+ if($restorePerms)
+ {
+ $this->postProcEngine->createDirRecursive( $this->fileHeader->file, $this->fileHeader->permissions );
+ }
+ else
+ {
+ $this->postProcEngine->createDirRecursive( $this->fileHeader->file, 0755 );
+ }
+ $this->postProcEngine->processFilename(null);
+ }
+ else
+ {
+ // Symlink; do not post-process
+ $this->postProcEngine->processFilename(null);
+ }
+
+ $this->createDirectory();
+
+ // Header is read
+ $this->runState = AK_STATE_HEADER;
+
+ $this->dataReadLength = 0;
+
+ return true;
+ }
+
+ /**
+ * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when
+ * it's finished processing the file data.
+ * @return bool True if processing the file data was successful, false if an error occured
+ */
+ protected function processFileData()
+ {
+ switch( $this->fileHeader->type )
+ {
+ case 'dir':
+ return $this->processTypeDir();
+ break;
+
+ case 'link':
+ return $this->processTypeLink();
+ break;
+
+ case 'file':
+ switch($this->fileHeader->compression)
+ {
+ case 'none':
+ return $this->processTypeFileUncompressed();
+ break;
+
+ case 'gzip':
+ case 'bzip2':
+ return $this->processTypeFileCompressedSimple();
+ break;
+
+ }
+ break;
+ }
+ }
+
+ private function processTypeFileUncompressed()
+ {
+ // Uncompressed files are being processed in small chunks, to avoid timeouts
+ if( ($this->dataReadLength == 0) && !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ // Before processing file data, ensure permissions are adequate
+ $this->setCorrectPermissions( $this->fileHeader->file );
+ }
+
+ // Open the output file
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if ($this->dataReadLength == 0) {
+ $outfp = @fopen( $this->fileHeader->realFile, 'wb' );
+ } else {
+ $outfp = @fopen( $this->fileHeader->realFile, 'ab' );
+ }
+
+ // Can we write to the file?
+ if( ($outfp === false) && (!$ignore) ) {
+ // An error occured
+ $this->setError( AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile) );
+ return false;
+ }
+ }
+
+ // Does the file have any data, at all?
+ if( $this->fileHeader->uncompressed == 0 )
+ {
+ // No file data!
+ if( !AKFactory::get('kickstart.setup.dryrun','0') && is_resource($outfp) ) @fclose($outfp);
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+ else
+ {
+ $this->setError('An uncompressed file was detected; this is not supported by this archive extraction utility');
+ return false;
+ }
+
+ return true;
+ }
+
+ private function processTypeFileCompressedSimple()
+ {
+ $timer = AKFactory::getTimer();
+
+ // Files are being processed in small chunks, to avoid timeouts
+ if( ($this->dataReadLength == 0) && !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ // Before processing file data, ensure permissions are adequate
+ $this->setCorrectPermissions( $this->fileHeader->file );
+ }
+
+ // Open the output file
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ {
+ // Open the output file
+ $outfp = @fopen( $this->fileHeader->realFile, 'wb' );
+
+ // Can we write to the file?
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if( ($outfp === false) && (!$ignore) ) {
+ // An error occured
+ $this->setError( AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile) );
+ return false;
+ }
+ }
+
+ // Does the file have any data, at all?
+ if( $this->fileHeader->uncompressed == 0 )
+ {
+ // No file data!
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fclose($outfp);
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ $leftBytes = $this->fileHeader->uncompressed - $this->dataReadLength;
+
+ // Loop while there's data to write and enough time to do it
+ while( ($leftBytes > 0) && ($timer->getTimeLeft() > 0) )
+ {
+ // Read the mini header
+ $binMiniHeader = fread($this->fp, 8);
+ $reallyReadBytes = akstringlen($binMiniHeader);
+ if($reallyReadBytes < 8)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ // Retry reading the header
+ $binMiniHeader = fread($this->fp, 8);
+ $reallyReadBytes = akstringlen($binMiniHeader);
+ // Still not enough data? If so, the archive is corrupt or missing parts.
+ if($reallyReadBytes < 8) {
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+
+ // Read the encrypted data
+ $miniHeader = unpack('Vencsize/Vdecsize', $binMiniHeader);
+ $toReadBytes = $miniHeader['encsize'];
+ $data = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($data);
+ if($reallyReadBytes < $toReadBytes)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ // Read the rest of the data
+ $toReadBytes -= $reallyReadBytes;
+ $restData = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($restData);
+ if($reallyReadBytes < $toReadBytes) {
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ if(akstringlen($data) == 0) {
+ $data = $restData;
+ } else {
+ $data .= $restData;
+ }
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+
+ // Decrypt the data
+ $data = AKEncryptionAES::AESDecryptCBC($data, $this->password, 128);
+
+ // Is the length of the decrypted data less than expected?
+ $data_length = akstringlen($data);
+ if($data_length < $miniHeader['decsize']) {
+ $this->setError(AKText::_('ERR_INVALID_JPS_PASSWORD'));
+ return false;
+ }
+
+ // Trim the data
+ $data = substr($data,0,$miniHeader['decsize']);
+
+ // Decompress
+ $data = gzinflate($data);
+ $unc_len = akstringlen($data);
+
+ // Write the decrypted data
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fwrite( $outfp, $data, akstringlen($data) );
+
+ // Update the read length
+ $this->dataReadLength += $unc_len;
+ $leftBytes = $this->fileHeader->uncompressed - $this->dataReadLength;
+ }
+
+ // Close the file pointer
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ if(is_resource($outfp)) @fclose($outfp);
+
+ // Was this a pre-timeout bail out?
+ if( $leftBytes > 0 )
+ {
+ $this->runState = AK_STATE_DATA;
+ }
+ else
+ {
+ // Oh! We just finished!
+ $this->runState = AK_STATE_DATAREAD;
+ $this->dataReadLength = 0;
+ }
+ }
+
+ /**
+ * Process the file data of a link entry
+ * @return bool
+ */
+ private function processTypeLink()
+ {
+
+ // Does the file have any data, at all?
+ if( $this->fileHeader->uncompressed == 0 )
+ {
+ // No file data!
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ // Read the mini header
+ $binMiniHeader = fread($this->fp, 8);
+ $reallyReadBytes = akstringlen($binMiniHeader);
+ if($reallyReadBytes < 8)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ // Retry reading the header
+ $binMiniHeader = fread($this->fp, 8);
+ $reallyReadBytes = akstringlen($binMiniHeader);
+ // Still not enough data? If so, the archive is corrupt or missing parts.
+ if($reallyReadBytes < 8) {
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+
+ // Read the encrypted data
+ $miniHeader = unpack('Vencsize/Vdecsize', $binMiniHeader);
+ $toReadBytes = $miniHeader['encsize'];
+ $data = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($data);
+ if($reallyReadBytes < $toReadBytes)
+ {
+ // We read less than requested! Why? Did we hit local EOF?
+ if( $this->isEOF(true) && !$this->isEOF(false) )
+ {
+ // Yeap. Let's go to the next file
+ $this->nextFile();
+ // Read the rest of the data
+ $toReadBytes -= $reallyReadBytes;
+ $restData = $this->fread( $this->fp, $toReadBytes );
+ $reallyReadBytes = akstringlen($data);
+ if($reallyReadBytes < $toReadBytes) {
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ $data .= $restData;
+ }
+ else
+ {
+ // Nope. The archive is corrupt
+ $this->setError( AKText::_('ERR_CORRUPT_ARCHIVE') );
+ return false;
+ }
+ }
+
+ // Decrypt the data
+ $data = AKEncryptionAES::AESDecryptCBC($data, $this->password, 128);
+
+ // Is the length of the decrypted data less than expected?
+ $data_length = akstringlen($data);
+ if($data_length < $miniHeader['decsize']) {
+ $this->setError(AKText::_('ERR_INVALID_JPS_PASSWORD'));
+ return false;
+ }
+
+ // Trim the data
+ $data = substr($data,0,$miniHeader['decsize']);
+
+ // Try to remove an existing file or directory by the same name
+ if(file_exists($this->fileHeader->realFile)) { @unlink($this->fileHeader->realFile); @rmdir($this->fileHeader->realFile); }
+ // Remove any trailing slash
+ if(substr($this->fileHeader->realFile, -1) == '/') $this->fileHeader->realFile = substr($this->fileHeader->realFile, 0, -1);
+ // Create the symlink - only possible within PHP context. There's no support built in the FTP protocol, so no postproc use is possible here :(
+ if( !AKFactory::get('kickstart.setup.dryrun','0') )
+ @symlink($data, $this->fileHeader->realFile);
+
+ $this->runState = AK_STATE_DATAREAD;
+
+ return true; // No matter if the link was created!
+ }
+
+ /**
+ * Process the file data of a directory entry
+ * @return bool
+ */
+ private function processTypeDir()
+ {
+ // Directory entries in the JPA do not have file data, therefore we're done processing the entry
+ $this->runState = AK_STATE_DATAREAD;
+ return true;
+ }
+
+ /**
+ * Creates the directory this file points to
+ */
+ protected function createDirectory()
+ {
+ if( AKFactory::get('kickstart.setup.dryrun','0') ) return true;
+
+ // Do we need to create a directory?
+ $lastSlash = strrpos($this->fileHeader->realFile, '/');
+ $dirName = substr( $this->fileHeader->realFile, 0, $lastSlash);
+ $perms = $this->flagRestorePermissions ? $retArray['permissions'] : 0755;
+ $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false);
+ if( ($this->postProcEngine->createDirRecursive($dirName, $perms) == false) && (!$ignore) ) {
+ $this->setError( AKText::sprintf('COULDNT_CREATE_DIR', $dirName) );
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+}
+
+/**
+ * A filesystem scanner which uses opendir()
+ */
+class AKUtilsLister extends AKAbstractObject
+{
+ public function &getFiles($folder, $pattern = '*')
+ {
+ // Initialize variables
+ $arr = array();
+ $false = false;
+
+ if(!is_dir($folder)) return $false;
+
+ $handle = @opendir($folder);
+ // If directory is not accessible, just return FALSE
+ if ($handle === FALSE) {
+ $this->setWarning( 'Unreadable directory '.$folder);
+ return $false;
+ }
+
+ while (($file = @readdir($handle)) !== false)
+ {
+ if( !fnmatch($pattern, $file) ) continue;
+
+ if (($file != '.') && ($file != '..'))
+ {
+ $ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;
+ $dir = $folder . $ds . $file;
+ $isDir = is_dir($dir);
+ if (!$isDir) {
+ $arr[] = $dir;
+ }
+ }
+ }
+ @closedir($handle);
+
+ return $arr;
+ }
+
+ public function &getFolders($folder, $pattern = '*')
+ {
+ // Initialize variables
+ $arr = array();
+ $false = false;
+
+ if(!is_dir($folder)) return $false;
+
+ $handle = @opendir($folder);
+ // If directory is not accessible, just return FALSE
+ if ($handle === FALSE) {
+ $this->setWarning( 'Unreadable directory '.$folder);
+ return $false;
+ }
+
+ while (($file = @readdir($handle)) !== false)
+ {
+ if( !fnmatch($pattern, $file) ) continue;
+
+ if (($file != '.') && ($file != '..'))
+ {
+ $ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;
+ $dir = $folder . $ds . $file;
+ $isDir = is_dir($dir);
+ if ($isDir) {
+ $arr[] = $dir;
+ }
+ }
+ }
+ @closedir($handle);
+
+ return $arr;
+ }
+}
+
+/**
+ * A simple INI-based i18n engine
+ */
+
+class AKText extends AKAbstractObject
+{
+ /**
+ * The default (en_GB) translation used when no other translation is available
+ * @var array
+ */
+ private $default_translation = array(
+ 'AUTOMODEON' => 'Auto-mode enabled',
+ 'ERR_NOT_A_JPA_FILE' => 'The file is not a JPA archive',
+ 'ERR_CORRUPT_ARCHIVE' => 'The archive file is corrupt, truncated or archive parts are missing',
+ 'ERR_INVALID_LOGIN' => 'Invalid login',
+ 'COULDNT_CREATE_DIR' => 'Could not create %s folder',
+ 'COULDNT_WRITE_FILE' => 'Could not open %s for writing.',
+ 'WRONG_FTP_HOST' => 'Wrong FTP host or port',
+ 'WRONG_FTP_USER' => 'Wrong FTP username or password',
+ 'WRONG_FTP_PATH1' => 'Wrong FTP initial directory - the directory doesn\'t exist',
+ 'FTP_CANT_CREATE_DIR' => 'Could not create directory %s',
+ 'FTP_TEMPDIR_NOT_WRITABLE' => 'Could not find or create a writable temporary directory',
+ 'FTP_COULDNT_UPLOAD' => 'Could not upload %s',
+ 'THINGS_HEADER' => 'Things you should know about Akeeba Kickstart',
+ 'THINGS_01' => 'Kickstart is not an installer. It is an archive extraction tool. The actual installer was put inside the archive file at backup time.',
+ 'THINGS_02' => 'Kickstart is not the only way to extract the backup archive. You can use Akeeba eXtract Wizard and upload the extracted files using FTP instead.',
+ 'THINGS_03' => 'Kickstart is bound by your server\'s configuration. As such, it may not work at all.',
+ 'THINGS_04' => 'You should download and upload your archive files using FTP in Binary transfer mode. Any other method could lead to a corrupt backup archive and restoration failure.',
+ 'THINGS_05' => 'Post-restoration site load errors are usually caused by .htaccess or php.ini directives. You should understand that blank pages, 404 and 500 errors can usually be worked around by editing the aforementioned files. It is not our job to mess with your configuration files, because this could be dangerous for your site.',
+ 'THINGS_06' => 'Kickstart overwrites files without a warning. If you are not sure that you are OK with that do not continue.',
+ 'THINGS_07' => 'Trying to restore to the temporary URL of a cPanel host (e.g. http://1.2.3.4/~username) will lead to restoration failure and your site will appear to be not working. This is normal and it\'s just how your server and CMS software work.',
+ 'THINGS_08' => 'You are supposed to read the documentation before using this software. Most issues can be avoided, or easily worked around, by understanding how this software works.',
+ 'THINGS_09' => 'This text does not imply that there is a problem detected. It is standard text displayed every time you launch Kickstart.',
+ 'CLOSE_LIGHTBOX' => 'Click here or press ESC to close this message',
+ 'SELECT_ARCHIVE' => 'Select a backup archive',
+ 'ARCHIVE_FILE' => 'Archive file:',
+ 'SELECT_EXTRACTION' => 'Select an extraction method',
+ 'WRITE_TO_FILES' => 'Write to files:',
+ 'WRITE_DIRECTLY' => 'Directly',
+ 'WRITE_FTP' => 'Use FTP',
+ 'FTP_HOST' => 'FTP host name:',
+ 'FTP_PORT' => 'FTP port:',
+ 'FTP_FTPS' => 'Use FTP over SSL (FTPS)',
+ 'FTP_PASSIVE' => 'Use FTP Passive Mode',
+ 'FTP_USER' => 'FTP user name:',
+ 'FTP_PASS' => 'FTP password:',
+ 'FTP_DIR' => 'FTP directory:',
+ 'FTP_TEMPDIR' => 'Temporary directory:',
+ 'FTP_CONNECTION_OK' => 'FTP Connection Established',
+ 'FTP_CONNECTION_FAILURE' => 'The FTP Connection Failed',
+ 'FTP_TEMPDIR_WRITABLE' => 'The temporary directory is writable.',
+ 'FTP_TEMPDIR_UNWRITABLE' => 'The temporary directory is not writable. Please check the permissions.',
+ 'BTN_CHECK' => 'Check',
+ 'BTN_RESET' => 'Reset',
+ 'BTN_TESTFTPCON' => 'Test FTP connection',
+ 'BTN_GOTOSTART' => 'Start over',
+ 'FINE_TUNE' => 'Fine tune',
+ 'MIN_EXEC_TIME' => 'Minimum execution time:',
+ 'MAX_EXEC_TIME' => 'Maximum execution time:',
+ 'SECONDS_PER_STEP' => 'seconds per step',
+ 'EXTRACT_FILES' => 'Extract files',
+ 'BTN_START' => 'Start',
+ 'EXTRACTING' => 'Extracting',
+ 'DO_NOT_CLOSE_EXTRACT' => 'Do not close this window while the extraction is in progress',
+ 'RESTACLEANUP' => 'Restoration and Clean Up',
+ 'BTN_RUNINSTALLER' => 'Run the Installer',
+ 'BTN_CLEANUP' => 'Clean Up',
+ 'BTN_SITEFE' => 'Visit your site\'s front-end',
+ 'BTN_SITEBE' => 'Visit your site\'s back-end',
+ 'WARNINGS' => 'Extraction Warnings',
+ 'ERROR_OCCURED' => 'An error occured',
+ 'STEALTH_MODE' => 'Stealth mode',
+ 'STEALTH_URL' => 'HTML file to show to web visitors',
+ 'ERR_NOT_A_JPS_FILE' => 'The file is not a JPA archive',
+ 'ERR_INVALID_JPS_PASSWORD' => 'The password you gave is wrong or the archive is corrupt',
+ 'JPS_PASSWORD' => 'Archive Password (for JPS files)',
+ 'INVALID_FILE_HEADER' => 'Invalid header in archive file, part %s, offset %s',
+ 'NEEDSOMEHELPKS' => 'Want some help to use this tool? Read this first:',
+ 'QUICKSTART' => 'Quick Start Guide',
+ 'CANTGETITTOWORK' => 'Can\'t get it to work? Click me!',
+ 'NOARCHIVESCLICKHERE' => 'No archives detected. Click here for troubleshooting instructions.',
+ 'POSTRESTORATIONTROUBLESHOOTING' => 'Something not working after the restoration? Click here for troubleshooting instructions.',
+ 'UPDATE_HEADER' => 'An updated version of Akeeba Kickstart (<span id="update-version">unknown</span>) is available!',
+ 'UPDATE_NOTICE' => 'You are advised to always use the latest version of Akeeba Kickstart available. Older versions may be subject to bugs and will not be supported.',
+ 'UPDATE_DLNOW' => 'Download now',
+ 'UPDATE_MOREINFO' => 'More information'
+ );
+
+ /**
+ * The array holding the translation keys
+ * @var array
+ */
+ private $strings;
+
+ /**
+ * The currently detected language (ISO code)
+ * @var string
+ */
+ private $language;
+
+ /*
+ * Initializes the translation engine
+ * @return AKText
+ */
+ public function __construct()
+ {
+ // Start with the default translation
+ $this->strings = $this->default_translation;
+ // Try loading the translation file in English, if it exists
+ $this->loadTranslation('en-GB');
+ // Try loading the translation file in the browser's preferred language, if it exists
+ $this->getBrowserLanguage();
+ if(!is_null($this->language))
+ {
+ $this->loadTranslation();
+ }
+ }
+
+ /**
+ * Singleton pattern for Language
+ * @return Language The global Language instance
+ */
+ public static function &getInstance()
+ {
+ static $instance;
+
+ if(!is_object($instance))
+ {
+ $instance = new AKText();
+ }
+
+ return $instance;
+ }
+
+ public static function _($string)
+ {
+ $text = self::getInstance();
+
+ $key = strtoupper($string);
+ $key = substr($key, 0, 1) == '_' ? substr($key, 1) : $key;
+
+ if (isset ($text->strings[$key]))
+ {
+ $string = $text->strings[$key];
+ }
+ else
+ {
+ if (defined($string))
+ {
+ $string = constant($string);
+ }
+ }
+
+ return $string;
+ }
+
+ public static function sprintf($key)
+ {
+ $text = self::getInstance();
+ $args = func_get_args();
+ if (count($args) > 0) {
+ $args[0] = $text->_($args[0]);
+ return @call_user_func_array('sprintf', $args);
+ }
+ return '';
+ }
+
+ public function dumpLanguage()
+ {
+ $out = '';
+ foreach($this->strings as $key => $value)
+ {
+ $out .= "$key=$value\n";
+ }
+ return $out;
+ }
+
+ public function asJavascript()
+ {
+ $out = '';
+ foreach($this->strings as $key => $value)
+ {
+ $key = addcslashes($key, '\\\'"');
+ $value = addcslashes($value, '\\\'"');
+ if(!empty($out)) $out .= ",\n";
+ $out .= "'$key':\t'$value'";
+ }
+ return $out;
+ }
+
+ public function resetTranslation()
+ {
+ $this->strings = $this->default_translation;
+ }
+
+ public function getBrowserLanguage()
+ {
+ // Detection code from Full Operating system language detection, by Harald Hope
+ // Retrieved from http://techpatterns.com/downloads/php_language_detection.php
+ $user_languages = array();
+ //check to see if language is set
+ if ( isset( $_SERVER["HTTP_ACCEPT_LANGUAGE"] ) )
+ {
+ $languages = strtolower( $_SERVER["HTTP_ACCEPT_LANGUAGE"] );
+ // $languages = ' fr-ch;q=0.3, da, en-us;q=0.8, en;q=0.5, fr;q=0.3';
+ // need to remove spaces from strings to avoid error
+ $languages = str_replace( ' ', '', $languages );
+ $languages = explode( ",", $languages );
+
+ foreach ( $languages as $language_list )
+ {
+ // pull out the language, place languages into array of full and primary
+ // string structure:
+ $temp_array = array();
+ // slice out the part before ; on first step, the part before - on second, place into array
+ $temp_array[0] = substr( $language_list, 0, strcspn( $language_list, ';' ) );//full language
+ $temp_array[1] = substr( $language_list, 0, 2 );// cut out primary language
+ if( (strlen($temp_array[0]) == 5) && ( (substr($temp_array[0],2,1) == '-') || (substr($temp_array[0],2,1) == '_') ) )
+ {
+ $langLocation = strtoupper(substr($temp_array[0],3,2));
+ $temp_array[0] = $temp_array[1].'-'.$langLocation;
+ }
+ //place this array into main $user_languages language array
+ $user_languages[] = $temp_array;
+ }
+ }
+ else// if no languages found
+ {
+ $user_languages[0] = array( '','' ); //return blank array.
+ }
+
+ $this->language = null;
+ $basename=basename(__FILE__, '.php') . '.ini';
+
+ // Try to match main language part of the filename, irrespective of the location, e.g. de_DE will do if de_CH doesn't exist.
+ $fs = new AKUtilsLister();
+ $iniFiles = $fs->getFiles( dirname(__FILE__), '*.'.$basename );
+ if(empty($iniFiles) && ($basename != 'kickstart.ini')) {
+ $basename = 'kickstart.ini';
+ $iniFiles = $fs->getFiles( dirname(__FILE__), '*.'.$basename );
+ }
+ if (is_array($iniFiles)) {
+ foreach($user_languages as $languageStruct)
+ {
+ if(is_null($this->language))
+ {
+ // Get files matching the main lang part
+ $iniFiles = $fs->getFiles( dirname(__FILE__), $languageStruct[1].'-??.'.$basename );
+ if (count($iniFiles) > 0) {
+ $filename = $iniFiles[0];
+ $filename = substr($filename, strlen(dirname(__FILE__))+1);
+ $this->language = substr($filename, 0, 5);
+ } else {
+ $this->language = null;
+ }
+ }
+ }
+ }
+
+ if(is_null($this->language)) {
+ // Try to find a full language match
+ foreach($user_languages as $languageStruct)
+ {
+ if (@file_exists($languageStruct[0].'.'.$basename) && is_null($this->language)) {
+ $this->language = $languageStruct[0];
+ } else {
+
+ }
+ }
+ } else {
+ // Do we have an exact match?
+ foreach($user_languages as $languageStruct)
+ {
+ if(substr($this->language,0,strlen($languageStruct[1])) == $languageStruct[1]) {
+ if(file_exists($languageStruct[0].'.'.$basename)) {
+ $this->language = $languageStruct[0];
+ }
+ }
+ }
+ }
+
+ // Now, scan for full language based on the partial match
+
+ }
+
+ private function loadTranslation( $lang = null )
+ {
+ $dirname = function_exists('getcwd') ? getcwd() : dirname(__FILE__);
+ $basename=basename(__FILE__, '.php') . '.ini';
+ if( empty($lang) ) $lang = $this->language;
+
+ $translationFilename = $dirname.DIRECTORY_SEPARATOR.$lang.'.'.$basename;
+ if(!@file_exists($translationFilename) && ($basename != 'kickstart.ini')) {
+ $basename = 'kickstart.ini';
+ $translationFilename = $dirname.DIRECTORY_SEPARATOR.$lang.'.'.$basename;
+ }
+ if(!@file_exists($translationFilename)) return;
+ $temp = self::parse_ini_file($translationFilename, false);
+
+ if(!is_array($this->strings)) $this->strings = array();
+ if(empty($temp)) {
+ $this->strings = array_merge($this->default_translation, $this->strings);
+ } else {
+ $this->strings = array_merge($this->strings, $temp);
+ }
+ }
+
+ /**
+ * A PHP based INI file parser.
+ *
+ * Thanks to asohn ~at~ aircanopy ~dot~ net for posting this handy function on
+ * the parse_ini_file page on http://gr.php.net/parse_ini_file
+ *
+ * @param string $file Filename to process
+ * @param bool $process_sections True to also process INI sections
+ * @return array An associative array of sections, keys and values
+ * @access private
+ */
+ public static function parse_ini_file($file, $process_sections = false, $raw_data = false)
+ {
+ $process_sections = ($process_sections !== true) ? false : true;
+
+ if(!$raw_data)
+ {
+ $ini = @file($file);
+ }
+ else
+ {
+ $ini = $file;
+ }
+ if (count($ini) == 0) {return array();}
+
+ $sections = array();
+ $values = array();
+ $result = array();
+ $globals = array();
+ $i = 0;
+ if(!empty($ini)) foreach ($ini as $line) {
+ $line = trim($line);
+ $line = str_replace("\t", " ", $line);
+
+ // Comments
+ if (!preg_match('/^[a-zA-Z0-9[]/', $line)) {continue;}
+
+ // Sections
+ if ($line{0} == '[') {
+ $tmp = explode(']', $line);
+ $sections[] = trim(substr($tmp[0], 1));
+ $i++;
+ continue;
+ }
+
+ // Key-value pair
+ list($key, $value) = explode('=', $line, 2);
+ $key = trim($key);
+ $value = trim($value);
+ if (strstr($value, ";")) {
+ $tmp = explode(';', $value);
+ if (count($tmp) == 2) {
+ if ((($value{0} != '"') && ($value{0} != "'")) ||
+ preg_match('/^".*"\s*;/', $value) || preg_match('/^".*;[^"]*$/', $value) ||
+ preg_match("/^'.*'\s*;/", $value) || preg_match("/^'.*;[^']*$/", $value) ){
+ $value = $tmp[0];
+ }
+ } else {
+ if ($value{0} == '"') {
+ $value = preg_replace('/^"(.*)".*/', '$1', $value);
+ } elseif ($value{0} == "'") {
+ $value = preg_replace("/^'(.*)'.*/", '$1', $value);
+ } else {
+ $value = $tmp[0];
+ }
+ }
+ }
+ $value = trim($value);
+ $value = trim($value, "'\"");
+
+ if ($i == 0) {
+ if (substr($line, -1, 2) == '[]') {
+ $globals[$key][] = $value;
+ } else {
+ $globals[$key] = $value;
+ }
+ } else {
+ if (substr($line, -1, 2) == '[]') {
+ $values[$i-1][$key][] = $value;
+ } else {
+ $values[$i-1][$key] = $value;
+ }
+ }
+ }
+
+ for($j = 0; $j < $i; $j++) {
+ if ($process_sections === true) {
+ $result[$sections[$j]] = $values[$j];
+ } else {
+ $result[] = $values[$j];
+ }
+ }
+
+ return $result + $globals;
+ }
+}
+
+/**
+ * The Akeeba Kickstart Factory class
+ * This class is reponssible for instanciating all Akeeba Kicsktart classes
+ */
+class AKFactory {
+ /** @var array A list of instanciated objects */
+ private $objectlist = array();
+
+ /** @var array Simple hash data storage */
+ private $varlist = array();
+
+ /** Private constructor makes sure we can't directly instanciate the class */
+ private function __construct() {}
+
+ /**
+ * Gets a single, internally used instance of the Factory
+ * @param string $serialized_data [optional] Serialized data to spawn the instance from
+ * @return AKFactory A reference to the unique Factory object instance
+ */
+ protected static function &getInstance( $serialized_data = null ) {
+ static $myInstance;
+ if(!is_object($myInstance) || !is_null($serialized_data))
+ if(!is_null($serialized_data))
+ {
+ $myInstance = unserialize($serialized_data);
+ }
+ else
+ {
+ $myInstance = new self();
+ }
+ return $myInstance;
+ }
+
+ /**
+ * Internal function which instanciates a class named $class_name.
+ * The autoloader
+ * @param object $class_name
+ * @return
+ */
+ protected static function &getClassInstance($class_name) {
+ $self = self::getInstance();
+ if(!isset($self->objectlist[$class_name]))
+ {
+ $self->objectlist[$class_name] = new $class_name;
+ }
+ return $self->objectlist[$class_name];
+ }
+
+ // ========================================================================
+ // Public factory interface
+ // ========================================================================
+
+ /**
+ * Gets a serialized snapshot of the Factory for safekeeping (hibernate)
+ * @return string The serialized snapshot of the Factory
+ */
+ public static function serialize() {
+ $engine = self::getUnarchiver();
+ $engine->shutdown();
+ $serialized = serialize(self::getInstance());
+
+ if(function_exists('base64_encode') && function_exists('base64_decode'))
+ {
+ $serialized = base64_encode($serialized);
+ }
+ return $serialized;
+ }
+
+ /**
+ * Regenerates the full Factory state from a serialized snapshot (resume)
+ * @param string $serialized_data The serialized snapshot to resume from
+ */
+ public static function unserialize($serialized_data) {
+ if(function_exists('base64_encode') && function_exists('base64_decode'))
+ {
+ $serialized_data = base64_decode($serialized_data);
+ }
+ self::getInstance($serialized_data);
+ }
+
+ /**
+ * Reset the internal factory state, freeing all previously created objects
+ */
+ public static function nuke()
+ {
+ $self = self::getInstance();
+ foreach($self->objectlist as $key => $object)
+ {
+ $self->objectlist[$key] = null;
+ }
+ $self->objectlist = array();
+ }
+
+ // ========================================================================
+ // Public hash data storage interface
+ // ========================================================================
+
+ public static function set($key, $value)
+ {
+ $self = self::getInstance();
+ $self->varlist[$key] = $value;
+ }
+
+ public static function get($key, $default = null)
+ {
+ $self = self::getInstance();
+ if( array_key_exists($key, $self->varlist) )
+ {
+ return $self->varlist[$key];
+ }
+ else
+ {
+ return $default;
+ }
+ }
+
+ // ========================================================================
+ // Akeeba Kickstart classes
+ // ========================================================================
+
+ /**
+ * Gets the post processing engine
+ * @param string $proc_engine
+ */
+ public static function &getPostProc($proc_engine = null)
+ {
+ static $class_name;
+ if( empty($class_name) )
+ {
+ if(empty($proc_engine))
+ {
+ $proc_engine = self::get('kickstart.procengine','direct');
+ }
+ $class_name = 'AKPostproc'.ucfirst($proc_engine);
+ }
+ return self::getClassInstance($class_name);
+ }
+
+ /**
+ * Gets the unarchiver engine
+ */
+ public static function &getUnarchiver( $configOverride = null )
+ {
+ static $class_name;
+
+ if(!empty($configOverride))
+ {
+ if($configOverride['reset']) {
+ $class_name = null;
+ }
+ }
+
+ if( empty($class_name) )
+ {
+ $filetype = self::get('kickstart.setup.filetype', null);
+
+ if(empty($filetype))
+ {
+ $filename = self::get('kickstart.setup.sourcefile', null);
+ $basename = basename($filename);
+ $baseextension = strtoupper(substr($basename,-3));
+ switch($baseextension)
+ {
+ case 'JPA':
+ $filetype = 'JPA';
+ break;
+
+ case 'JPS':
+ $filetype = 'JPS';
+ break;
+
+ case 'ZIP':
+ $filetype = 'ZIP';
+ break;
+
+ default:
+ die('Invalid archive type or extension in file '.$filename);
+ break;
+ }
+ }
+
+ $class_name = 'AKUnarchiver'.ucfirst($filetype);
+ }
+
+ $destdir = self::get('kickstart.setup.destdir', null);
+ if(empty($destdir))
+ {
+ $destdir = function_exists('getcwd') ? getcwd() : dirname(__FILE__);
+ }
+
+ $object = self::getClassInstance($class_name);
+ if( $object->getState() == 'init')
+ {
+ // Initialize the object
+ $config = array(
+ 'filename' => self::get('kickstart.setup.sourcefile', ''),
+ 'restore_permissions' => self::get('kickstart.setup.restoreperms', 0),
+ 'post_proc' => self::get('kickstart.procengine', 'direct'),
+ 'add_path' => $destdir,
+ 'rename_files' => array( '.htaccess' => 'htaccess.bak', 'php.ini' => 'php.ini.bak' ),
+ 'skip_files' => array( basename(__FILE__), 'kickstart.php', 'abiautomation.ini', 'htaccess.bak', 'php.ini.bak' )
+ );
+
+ if(!defined('KICKSTART'))
+ {
+ // In restore.php mode we have to exclude some more files
+ $config['skip_files'][] = 'administrator/components/com_akeeba/restore.php';
+ $config['skip_files'][] = 'administrator/components/com_akeeba/restoration.php';
+ }
+
+ if(!empty($configOverride))
+ {
+ foreach($configOverride as $key => $value)
+ {
+ $config[$key] = $value;
+ }
+ }
+
+ $object->setup($config);
+ }
+
+ return $object;
+ }
+
+ /**
+ * Get the a reference to the Akeeba Engine's timer
+ * @return AKCoreTimer
+ */
+ public static function &getTimer()
+ {
+ return self::getClassInstance('AKCoreTimer');
+ }
+
+}
+
+/**
+ * AES implementation in PHP (c) Chris Veness 2005-2011.
+ * Right to use and adapt is granted for under a simple creative commons attribution
+ * licence. No warranty of any form is offered.
+ *
+ * Modified for Akeeba Backup by Nicholas K. Dionysopoulos
+ */
+class AKEncryptionAES
+{
+ // Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [�5.1.1]
+ protected static $Sbox =
+ array(0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
+ 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
+ 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
+ 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
+ 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
+ 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
+ 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
+ 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
+ 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
+ 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
+ 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
+ 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
+ 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
+ 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
+ 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
+ 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16);
+
+ // Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [�5.2]
+ protected static $Rcon = array(
+ array(0x00, 0x00, 0x00, 0x00),
+ array(0x01, 0x00, 0x00, 0x00),
+ array(0x02, 0x00, 0x00, 0x00),
+ array(0x04, 0x00, 0x00, 0x00),
+ array(0x08, 0x00, 0x00, 0x00),
+ array(0x10, 0x00, 0x00, 0x00),
+ array(0x20, 0x00, 0x00, 0x00),
+ array(0x40, 0x00, 0x00, 0x00),
+ array(0x80, 0x00, 0x00, 0x00),
+ array(0x1b, 0x00, 0x00, 0x00),
+ array(0x36, 0x00, 0x00, 0x00) );
+
+ protected static $passwords = array();
+
+ /**
+ * AES Cipher function: encrypt 'input' with Rijndael algorithm
+ *
+ * @param input message as byte-array (16 bytes)
+ * @param w key schedule as 2D byte-array (Nr+1 x Nb bytes) -
+ * generated from the cipher key by KeyExpansion()
+ * @return ciphertext as byte-array (16 bytes)
+ */
+ protected static function Cipher($input, $w) { // main Cipher function [�5.1]
+ $Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ $Nr = count($w)/$Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ $state = array(); // initialise 4xNb byte-array 'state' with input [�3.4]
+ for ($i=0; $i<4*$Nb; $i++) $state[$i%4][floor($i/4)] = $input[$i];
+
+ $state = self::AddRoundKey($state, $w, 0, $Nb);
+
+ for ($round=1; $round<$Nr; $round++) { // apply Nr rounds
+ $state = self::SubBytes($state, $Nb);
+ $state = self::ShiftRows($state, $Nb);
+ $state = self::MixColumns($state, $Nb);
+ $state = self::AddRoundKey($state, $w, $round, $Nb);
+ }
+
+ $state = self::SubBytes($state, $Nb);
+ $state = self::ShiftRows($state, $Nb);
+ $state = self::AddRoundKey($state, $w, $Nr, $Nb);
+
+ $output = array(4*$Nb); // convert state to 1-d array before returning [�3.4]
+ for ($i=0; $i<4*$Nb; $i++) $output[$i] = $state[$i%4][floor($i/4)];
+ return $output;
+ }
+
+ protected static function AddRoundKey($state, $w, $rnd, $Nb) { // xor Round Key into state S [�5.1.4]
+ for ($r=0; $r<4; $r++) {
+ for ($c=0; $c<$Nb; $c++) $state[$r][$c] ^= $w[$rnd*4+$c][$r];
+ }
+ return $state;
+ }
+
+ protected static function SubBytes($s, $Nb) { // apply SBox to state S [�5.1.1]
+ for ($r=0; $r<4; $r++) {
+ for ($c=0; $c<$Nb; $c++) $s[$r][$c] = self::$Sbox[$s[$r][$c]];
+ }
+ return $s;
+ }
+
+ protected static function ShiftRows($s, $Nb) { // shift row r of state S left by r bytes [�5.1.2]
+ $t = array(4);
+ for ($r=1; $r<4; $r++) {
+ for ($c=0; $c<4; $c++) $t[$c] = $s[$r][($c+$r)%$Nb]; // shift into temp copy
+ for ($c=0; $c<4; $c++) $s[$r][$c] = $t[$c]; // and copy back
+ } // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):
+ return $s; // see fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf
+ }
+
+ protected static function MixColumns($s, $Nb) { // combine bytes of each col of state S [�5.1.3]
+ for ($c=0; $c<4; $c++) {
+ $a = array(4); // 'a' is a copy of the current column from 's'
+ $b = array(4); // 'b' is a�{02} in GF(2^8)
+ for ($i=0; $i<4; $i++) {
+ $a[$i] = $s[$i][$c];
+ $b[$i] = $s[$i][$c]&0x80 ? $s[$i][$c]<<1 ^ 0x011b : $s[$i][$c]<<1;
+ }
+ // a[n] ^ b[n] is a�{03} in GF(2^8)
+ $s[0][$c] = $b[0] ^ $a[1] ^ $b[1] ^ $a[2] ^ $a[3]; // 2*a0 + 3*a1 + a2 + a3
+ $s[1][$c] = $a[0] ^ $b[1] ^ $a[2] ^ $b[2] ^ $a[3]; // a0 * 2*a1 + 3*a2 + a3
+ $s[2][$c] = $a[0] ^ $a[1] ^ $b[2] ^ $a[3] ^ $b[3]; // a0 + a1 + 2*a2 + 3*a3
+ $s[3][$c] = $a[0] ^ $b[0] ^ $a[1] ^ $a[2] ^ $b[3]; // 3*a0 + a1 + a2 + 2*a3
+ }
+ return $s;
+ }
+
+ /**
+ * Key expansion for Rijndael Cipher(): performs key expansion on cipher key
+ * to generate a key schedule
+ *
+ * @param key cipher key byte-array (16 bytes)
+ * @return key schedule as 2D byte-array (Nr+1 x Nb bytes)
+ */
+ protected static function KeyExpansion($key) { // generate Key Schedule from Cipher Key [�5.2]
+ $Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ $Nk = count($key)/4; // key length (in words): 4/6/8 for 128/192/256-bit keys
+ $Nr = $Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ $w = array();
+ $temp = array();
+
+ for ($i=0; $i<$Nk; $i++) {
+ $r = array($key[4*$i], $key[4*$i+1], $key[4*$i+2], $key[4*$i+3]);
+ $w[$i] = $r;
+ }
+
+ for ($i=$Nk; $i<($Nb*($Nr+1)); $i++) {
+ $w[$i] = array();
+ for ($t=0; $t<4; $t++) $temp[$t] = $w[$i-1][$t];
+ if ($i % $Nk == 0) {
+ $temp = self::SubWord(self::RotWord($temp));
+ for ($t=0; $t<4; $t++) $temp[$t] ^= self::$Rcon[$i/$Nk][$t];
+ } else if ($Nk > 6 && $i%$Nk == 4) {
+ $temp = self::SubWord($temp);
+ }
+ for ($t=0; $t<4; $t++) $w[$i][$t] = $w[$i-$Nk][$t] ^ $temp[$t];
+ }
+ return $w;
+ }
+
+ protected static function SubWord($w) { // apply SBox to 4-byte word w
+ for ($i=0; $i<4; $i++) $w[$i] = self::$Sbox[$w[$i]];
+ return $w;
+ }
+
+ protected static function RotWord($w) { // rotate 4-byte word w left by one byte
+ $tmp = $w[0];
+ for ($i=0; $i<3; $i++) $w[$i] = $w[$i+1];
+ $w[3] = $tmp;
+ return $w;
+ }
+
+ /*
+ * Unsigned right shift function, since PHP has neither >>> operator nor unsigned ints
+ *
+ * @param a number to be shifted (32-bit integer)
+ * @param b number of bits to shift a to the right (0..31)
+ * @return a right-shifted and zero-filled by b bits
+ */
+ protected static function urs($a, $b) {
+ $a &= 0xffffffff; $b &= 0x1f; // (bounds check)
+ if ($a&0x80000000 && $b>0) { // if left-most bit set
+ $a = ($a>>1) & 0x7fffffff; // right-shift one bit & clear left-most bit
+ $a = $a >> ($b-1); // remaining right-shifts
+ } else { // otherwise
+ $a = ($a>>$b); // use normal right-shift
+ }
+ return $a;
+ }
+
+ /**
+ * Encrypt a text using AES encryption in Counter mode of operation
+ * - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ *
+ * Unicode multi-byte character safe
+ *
+ * @param plaintext source text to be encrypted
+ * @param password the password to use to generate a key
+ * @param nBits number of bits to be used in the key (128, 192, or 256)
+ * @return encrypted text
+ */
+ public static function AESEncryptCtr($plaintext, $password, $nBits) {
+ $blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ if (!($nBits==128 || $nBits==192 || $nBits==256)) return ''; // standard allows 128/192/256 bit keys
+ // note PHP (5) gives us plaintext and password in UTF8 encoding!
+
+ // use AES itself to encrypt password to get cipher key (using plain password as source for
+ // key expansion) - gives us well encrypted key
+ $nBytes = $nBits/8; // no bytes in key
+ $pwBytes = array();
+ for ($i=0; $i<$nBytes; $i++) $pwBytes[$i] = ord(substr($password,$i,1)) & 0xff;
+ $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
+ $key = array_merge($key, array_slice($key, 0, $nBytes-16)); // expand key to 16/24/32 bytes long
+
+ // initialise counter block (NIST SP800-38A �B.2): millisecond time-stamp for nonce in
+ // 1st 8 bytes, block counter in 2nd 8 bytes
+ $counterBlock = array();
+ $nonce = floor(microtime(true)*1000); // timestamp: milliseconds since 1-Jan-1970
+ $nonceSec = floor($nonce/1000);
+ $nonceMs = $nonce%1000;
+ // encode nonce with seconds in 1st 4 bytes, and (repeated) ms part filling 2nd 4 bytes
+ for ($i=0; $i<4; $i++) $counterBlock[$i] = self::urs($nonceSec, $i*8) & 0xff;
+ for ($i=0; $i<4; $i++) $counterBlock[$i+4] = $nonceMs & 0xff;
+ // and convert it to a string to go on the front of the ciphertext
+ $ctrTxt = '';
+ for ($i=0; $i<8; $i++) $ctrTxt .= chr($counterBlock[$i]);
+
+ // generate key schedule - an expansion of the key into distinct Key Rounds for each round
+ $keySchedule = self::KeyExpansion($key);
+
+ $blockCount = ceil(strlen($plaintext)/$blockSize);
+ $ciphertxt = array(); // ciphertext as array of strings
+
+ for ($b=0; $b<$blockCount; $b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ // done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB)
+ for ($c=0; $c<4; $c++) $counterBlock[15-$c] = self::urs($b, $c*8) & 0xff;
+ for ($c=0; $c<4; $c++) $counterBlock[15-$c-4] = self::urs($b/0x100000000, $c*8);
+
+ $cipherCntr = self::Cipher($counterBlock, $keySchedule); // -- encrypt counter block --
+
+ // block size is reduced on final block
+ $blockLength = $b<$blockCount-1 ? $blockSize : (strlen($plaintext)-1)%$blockSize+1;
+ $cipherByte = array();
+
+ for ($i=0; $i<$blockLength; $i++) { // -- xor plaintext with ciphered counter byte-by-byte --
+ $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($plaintext, $b*$blockSize+$i, 1));
+ $cipherByte[$i] = chr($cipherByte[$i]);
+ }
+ $ciphertxt[$b] = implode('', $cipherByte); // escape troublesome characters in ciphertext
+ }
+
+ // implode is more efficient than repeated string concatenation
+ $ciphertext = $ctrTxt . implode('', $ciphertxt);
+ $ciphertext = base64_encode($ciphertext);
+ return $ciphertext;
+ }
+
+ /**
+ * Decrypt a text encrypted by AES in counter mode of operation
+ *
+ * @param ciphertext source text to be decrypted
+ * @param password the password to use to generate a key
+ * @param nBits number of bits to be used in the key (128, 192, or 256)
+ * @return decrypted text
+ */
+ public static function AESDecryptCtr($ciphertext, $password, $nBits) {
+ $blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ if (!($nBits==128 || $nBits==192 || $nBits==256)) return ''; // standard allows 128/192/256 bit keys
+ $ciphertext = base64_decode($ciphertext);
+
+ // use AES to encrypt password (mirroring encrypt routine)
+ $nBytes = $nBits/8; // no bytes in key
+ $pwBytes = array();
+ for ($i=0; $i<$nBytes; $i++) $pwBytes[$i] = ord(substr($password,$i,1)) & 0xff;
+ $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
+ $key = array_merge($key, array_slice($key, 0, $nBytes-16)); // expand key to 16/24/32 bytes long
+
+ // recover nonce from 1st element of ciphertext
+ $counterBlock = array();
+ $ctrTxt = substr($ciphertext, 0, 8);
+ for ($i=0; $i<8; $i++) $counterBlock[$i] = ord(substr($ctrTxt,$i,1));
+
+ // generate key schedule
+ $keySchedule = self::KeyExpansion($key);
+
+ // separate ciphertext into blocks (skipping past initial 8 bytes)
+ $nBlocks = ceil((strlen($ciphertext)-8) / $blockSize);
+ $ct = array();
+ for ($b=0; $b<$nBlocks; $b++) $ct[$b] = substr($ciphertext, 8+$b*$blockSize, 16);
+ $ciphertext = $ct; // ciphertext is now array of block-length strings
+
+ // plaintext will get generated block-by-block into array of block-length strings
+ $plaintxt = array();
+
+ for ($b=0; $b<$nBlocks; $b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ for ($c=0; $c<4; $c++) $counterBlock[15-$c] = self::urs($b, $c*8) & 0xff;
+ for ($c=0; $c<4; $c++) $counterBlock[15-$c-4] = self::urs(($b+1)/0x100000000-1, $c*8) & 0xff;
+
+ $cipherCntr = self::Cipher($counterBlock, $keySchedule); // encrypt counter block
+
+ $plaintxtByte = array();
+ for ($i=0; $i<strlen($ciphertext[$b]); $i++) {
+ // -- xor plaintext with ciphered counter byte-by-byte --
+ $plaintxtByte[$i] = $cipherCntr[$i] ^ ord(substr($ciphertext[$b],$i,1));
+ $plaintxtByte[$i] = chr($plaintxtByte[$i]);
+
+ }
+ $plaintxt[$b] = implode('', $plaintxtByte);
+ }
+
+ // join array of blocks into single plaintext string
+ $plaintext = implode('',$plaintxt);
+
+ return $plaintext;
+ }
+
+ /**
+ * AES decryption in CBC mode. This is the standard mode (the CTR methods
+ * actually use Rijndael-128 in CTR mode, which - technically - isn't AES).
+ *
+ * Supports AES-128, AES-192 and AES-256. It supposes that the last 4 bytes
+ * contained a little-endian unsigned long integer representing the unpadded
+ * data length.
+ *
+ * @since 3.0.1
+ * @author Nicholas K. Dionysopoulos
+ *
+ * @param string $ciphertext The data to encrypt
+ * @param string $password Encryption password
+ * @param int $nBits Encryption key size. Can be 128, 192 or 256
+ * @return string The plaintext
+ */
+ public static function AESDecryptCBC($ciphertext, $password, $nBits = 128)
+ {
+ if (!($nBits==128 || $nBits==192 || $nBits==256)) return false; // standard allows 128/192/256 bit keys
+ if(!function_exists('mcrypt_module_open')) return false;
+
+ // Try to fetch cached key/iv or create them if they do not exist
+ $lookupKey = $password.'-'.$nBits;
+ if(array_key_exists($lookupKey, self::$passwords))
+ {
+ $key = self::$passwords[$lookupKey]['key'];
+ $iv = self::$passwords[$lookupKey]['iv'];
+ }
+ else
+ {
+ // use AES itself to encrypt password to get cipher key (using plain password as source for
+ // key expansion) - gives us well encrypted key
+ $nBytes = $nBits/8; // no bytes in key
+ $pwBytes = array();
+ for ($i=0; $i<$nBytes; $i++) $pwBytes[$i] = ord(substr($password,$i,1)) & 0xff;
+ $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
+ $key = array_merge($key, array_slice($key, 0, $nBytes-16)); // expand key to 16/24/32 bytes long
+ $newKey = '';
+ foreach($key as $int) { $newKey .= chr($int); }
+ $key = $newKey;
+
+ // Create an Initialization Vector (IV) based on the password, using the same technique as for the key
+ $nBytes = 16; // AES uses a 128 -bit (16 byte) block size, hence the IV size is always 16 bytes
+ $pwBytes = array();
+ for ($i=0; $i<$nBytes; $i++) $pwBytes[$i] = ord(substr($password,$i,1)) & 0xff;
+ $iv = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
+ $newIV = '';
+ foreach($iv as $int) { $newIV .= chr($int); }
+ $iv = $newIV;
+
+ self::$passwords[$lookupKey]['key'] = $key;
+ self::$passwords[$lookupKey]['iv'] = $iv;
+ }
+
+ // Read the data size
+ $data_size = unpack('V', substr($ciphertext,-4) );
+
+ // Decrypt
+ $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
+ mcrypt_generic_init($td, $key, $iv);
+ $plaintext = mdecrypt_generic($td, substr($ciphertext,0,-4));
+ mcrypt_generic_deinit($td);
+
+ // Trim padding, if necessary
+ if(strlen($plaintext) > $data_size)
+ {
+ $plaintext = substr($plaintext, 0, $data_size);
+ }
+
+ return $plaintext;
+ }
+}
+
+/**
+ * The Master Setup will read the configuration parameters from restoration.php, abiautomation.ini, or
+ * the JSON-encoded "configuration" input variable and return the status.
+ * @return bool True if the master configuration was applied to the Factory object
+ */
+function masterSetup()
+{
+ // ------------------------------------------------------------
+ // 1. Import basic setup parameters
+ // ------------------------------------------------------------
+
+ $ini_data = null;
+
+ // In restore.php mode, require restoration.php or fail
+ if(!defined('KICKSTART'))
+ {
+ // This is the standalone mode, used by Akeeba Backup Professional. It looks for a restoration.php
+ // file to perform its magic. If the file is not there, we will abort.
+ $setupFile = 'restoration.php';
+
+ if( !file_exists($setupFile) )
+ {
+ // Uh oh... Somebody tried to pooh on our back yard. Lock the gates! Don't let the traitor inside!
+ AKFactory::set('kickstart.enabled', false);
+ return false;
+ }
+
+ // Load restoration.php. It creates a global variable named $restoration_setup
+ require_once $setupFile;
+ $ini_data = $restoration_setup;
+ if(empty($ini_data))
+ {
+ // No parameters fetched. Darn, how am I supposed to work like that?!
+ AKFactory::set('kickstart.enabled', false);
+ return false;
+ }
+
+ AKFactory::set('kickstart.enabled', true);
+ }
+ else
+ {
+ // Maybe we have $restoration_setup defined in the head of kickstart.php
+ global $restoration_setup;
+ if(!empty($restoration_setup) && !is_array($restoration_setup)) {
+ $ini_data = AKText::parse_ini_file($restoration_setup, false, true);
+ } elseif(is_array($restoration_setup)) {
+ $ini_data = $restoration_setup;
+ }
+ }
+
+ // Import any data from $restoration_setup
+ if(!empty($ini_data))
+ {
+ foreach($ini_data as $key => $value)
+ {
+ AKFactory::set($key, $value);
+ }
+ AKFactory::set('kickstart.enabled', true);
+ }
+
+ // Reinitialize $ini_data
+ $ini_data = null;
+
+ // ------------------------------------------------------------
+ // 2. Explode JSON parameters into $_REQUEST scope
+ // ------------------------------------------------------------
+
+ // Detect a JSON string in the request variable and store it.
+ $json = getQueryParam('json', null);
+
+ // Remove everything from the request array
+ if(!empty($_REQUEST))
+ {
+ foreach($_REQUEST as $key => $value)
+ {
+ unset($_REQUEST[$key]);
+ }
+ }
+ // Decrypt a possibly encrypted JSON string
+ if(!empty($json))
+ {
+ $password = AKFactory::get('kickstart.security.password', null);
+ if(!empty($password))
+ {
+ $json = AKEncryptionAES::AESDecryptCtr($json, $password, 128);
+ }
+
+ // Get the raw data
+ $raw = json_decode( $json, true );
+ // Pass all JSON data to the request array
+ if(!empty($raw))
+ {
+ foreach($raw as $key => $value)
+ {
+ $_REQUEST[$key] = $value;
+ }
+ }
+ }
+
+ // ------------------------------------------------------------
+ // 3. Try the "factory" variable
+ // ------------------------------------------------------------
+ // A "factory" variable will override all other settings.
+ $serialized = getQueryParam('factory', null);
+ if( !is_null($serialized) )
+ {
+ // Get the serialized factory
+ AKFactory::unserialize($serialized);
+ AKFactory::set('kickstart.enabled', true);
+ return true;
+ }
+
+ // ------------------------------------------------------------
+ // 4. Try abiautomation.ini and the configuration variable for Kickstart
+ // ------------------------------------------------------------
+ if(defined('KICKSTART'))
+ {
+ // We are in Kickstart mode. abiautomation.ini has precedence.
+ $setupFile = 'abiautomation.ini';
+ if( file_exists($setupFile) )
+ {
+ // abiautomation.ini was found
+ $ini_data = AKText::parse_ini_file('restoration.ini', false);
+ }
+ else
+ {
+ // abiautomation.ini was not found. Let's try input parameters.
+ $configuration = getQueryParam('configuration');
+ if( !is_null($configuration) )
+ {
+ // Let's decode the configuration from JSON to array
+ $ini_data = json_decode($configuration, true);
+ }
+ else
+ {
+ // Neither exists. Enable Kickstart's interface anyway.
+ $ini_data = array('kickstart.enabled'=>true);
+ }
+ }
+
+ // Import any INI data we might have from other sources
+ if(!empty($ini_data))
+ {
+ foreach($ini_data as $key => $value)
+ {
+ AKFactory::set($key, $value);
+ }
+ AKFactory::set('kickstart.enabled', true);
+ return true;
+ }
+ }
+}
+
+// Mini-controller for restore.php
+if(!defined('KICKSTART'))
+{
+ // The observer class, used to report number of files and bytes processed
+ class RestorationObserver extends AKAbstractPartObserver
+ {
+ public $compressedTotal = 0;
+ public $uncompressedTotal = 0;
+ public $filesProcessed = 0;
+
+ public function update($object, $message)
+ {
+ if(!is_object($message)) return;
+
+ if( !array_key_exists('type', get_object_vars($message)) ) return;
+
+ if( $message->type == 'startfile' )
+ {
+ $this->filesProcessed++;
+ $this->compressedTotal += $message->content->compressed;
+ $this->uncompressedTotal += $message->content->uncompressed;
+ }
+ }
+
+ public function __toString()
+ {
+ return __CLASS__;
+ }
+
+ }
+
+ // Import configuration
+ masterSetup();
+
+ $retArray = array(
+ 'status' => true,
+ 'message' => null
+ );
+
+ $enabled = AKFactory::get('kickstart.enabled', false);
+
+ if($enabled)
+ {
+ $task = getQueryParam('task');
+
+ switch($task)
+ {
+ case 'ping':
+ // ping task - realy does nothing!
+ $timer = AKFactory::getTimer();
+ $timer->enforce_min_exec_time();
+ break;
+
+ case 'startRestore':
+ AKFactory::nuke(); // Reset the factory
+
+ // Let the control flow to the next step (the rest of the code is common!!)
+
+ case 'stepRestore':
+ $engine = AKFactory::getUnarchiver(); // Get the engine
+ $observer = new RestorationObserver(); // Create a new observer
+ $engine->attach($observer); // Attach the observer
+ $engine->tick();
+ $ret = $engine->getStatusArray();
+
+ if( $ret['Error'] != '' )
+ {
+ $retArray['status'] = false;
+ $retArray['done'] = true;
+ $retArray['message'] = $ret['Error'];
+ }
+ elseif( !$ret['HasRun'] )
+ {
+ $retArray['files'] = $observer->filesProcessed;
+ $retArray['bytesIn'] = $observer->compressedTotal;
+ $retArray['bytesOut'] = $observer->uncompressedTotal;
+ $retArray['status'] = true;
+ $retArray['done'] = true;
+ }
+ else
+ {
+ $retArray['files'] = $observer->filesProcessed;
+ $retArray['bytesIn'] = $observer->compressedTotal;
+ $retArray['bytesOut'] = $observer->uncompressedTotal;
+ $retArray['status'] = true;
+ $retArray['done'] = false;
+ $retArray['factory'] = AKFactory::serialize();
+ }
+ break;
+
+ case 'finalizeRestore':
+ $root = AKFactory::get('kickstart.setup.destdir');
+ // Remove the installation directory
+ recursive_remove_directory( $root.'/installation' );
+
+ $postproc = AKFactory::getPostProc();
+
+ // Rename htaccess.bak to .htaccess
+ if(file_exists($root.'/htaccess.bak'))
+ {
+ if( file_exists($root.'/.htaccess') )
+ {
+ $postproc->unlink($root.'/.htaccess');
+ }
+ $postproc->rename( $root.'/htaccess.bak', $root.'/.htaccess' );
+ }
+
+ // Remove restoration.php
+ $basepath = dirname(__FILE__);
+ $basepath = rtrim( str_replace('\\','/',$basepath), '/' );
+ if(!empty($basepath)) $basepath .= '/';
+ $postproc->unlink( $basepath.'restoration.php' );
+ break;
+
+ default:
+ // Invalid task!
+ $enabled = false;
+ break;
+ }
+ }
+
+ // Maybe we weren't authorized or the task was invalid?
+ if(!$enabled)
+ {
+ // Maybe the user failed to enter any information
+ $retArray['status'] = false;
+ $retArray['message'] = AKText::_('ERR_INVALID_LOGIN');
+ }
+
+ // JSON encode the message
+ $json = json_encode($retArray);
+ // Do I have to encrypt?
+ $password = AKFactory::get('kickstart.security.password', null);
+ if(!empty($password))
+ {
+ $json = AKEncryptionAES::AESEncryptCtr($json, $password, 128);
+ }
+
+ // Return the message
+ echo "###$json###";
+
+}
+
+// ------------ lixlpixel recursive PHP functions -------------
+// recursive_remove_directory( directory to delete, empty )
+// expects path to directory and optional TRUE / FALSE to empty
+// of course PHP has to have the rights to delete the directory
+// you specify and all files and folders inside the directory
+// ------------------------------------------------------------
+function recursive_remove_directory($directory)
+{
+ // if the path has a slash at the end we remove it here
+ if(substr($directory,-1) == '/')
+ {
+ $directory = substr($directory,0,-1);
+ }
+ // if the path is not valid or is not a directory ...
+ if(!file_exists($directory) || !is_dir($directory))
+ {
+ // ... we return false and exit the function
+ return FALSE;
+ // ... if the path is not readable
+ }elseif(!is_readable($directory))
+ {
+ // ... we return false and exit the function
+ return FALSE;
+ // ... else if the path is readable
+ }else{
+ // we open the directory
+ $handle = opendir($directory);
+ $postproc = AKFactory::getPostProc();
+ // and scan through the items inside
+ while (FALSE !== ($item = readdir($handle)))
+ {
+ // if the filepointer is not the current directory
+ // or the parent directory
+ if($item != '.' && $item != '..')
+ {
+ // we build the new path to delete
+ $path = $directory.'/'.$item;
+ // if the new path is a directory
+ if(is_dir($path))
+ {
+ // we call this function with the new path
+ recursive_remove_directory($path);
+ // if the new path is a file
+ }else{
+ // we remove the file
+ $postproc->unlink($path);
+ }
+ }
+ }
+ // close the directory
+ closedir($handle);
+ // try to delete the now empty directory
+ if(!$postproc->rmdir($directory))
+ {
+ // return false if not possible
+ return FALSE;
+ }
+ // return success
+ return TRUE;
+ }
+}
+?>
\ No newline at end of file

Added: development/trunk/administrator/components/com_joomlaupdate/views/default/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/default/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/default/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/default.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/default.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/default.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,130 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 2.5.2
+ */
+
+defined('_JEXEC') or die;
+
+$ftpFieldsDisplay = $this->ftp['enabled'] ? '' : 'style = "display: none"';
+?>
+
+<?php if (is_null($this->updateInfo['object'])): ?>
+
+<fieldset>
+ <legend>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATES') ?>
+ </legend>
+ <p>
+ <?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATESNOTICE', JVERSION); ?>
+ </p>
+</fieldset>
+
+<?php else: ?>
+
+<form action="index.php" method="post" id="adminForm">
+<input type="hidden" name="option" value="com_joomlaupdate" />
+<input type="hidden" name="task" value="update.download" />
+
+<fieldset>
+ <legend>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATEFOUND') ?>
+ </legend>
+
+ <table class="adminlist">
+ <tbody>
+ <tr class="row0">
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLED') ?>
+ </td>
+ <td>
+ <?php echo $this->updateInfo['installed'] ?>
+ </td>
+ </tr>
+ <tr class="row1">
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_LATEST') ?>
+ </td>
+ <td>
+ <?php echo $this->updateInfo['latest'] ?>
+ </td>
+ </tr>
+ <tr class="row0">
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_PACKAGE') ?>
+ </td>
+ <td>
+ <a href="<?php echo $this->updateInfo['object']->downloadurl->_data ?>">
+ <?php echo $this->updateInfo['object']->downloadurl->_data ?>
+ </a>
+ </td>
+ </tr>
+ <tr class="row1">
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD') ?>
+ </td>
+ <td>
+ <?php echo $this->methodSelect ?>
+ </td>
+ </tr>
+ <tr class="row0" id="row_ftp_hostname" <?php echo $ftpFieldsDisplay ?>>
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_HOSTNAME') ?>
+ </td>
+ <td>
+ <input type="text" name="ftp_host" value="<?php echo $this->ftp['host'] ?>" />
+ </td>
+ </tr>
+ <tr class="row1" id="row_ftp_port" <?php echo $ftpFieldsDisplay ?>>
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PORT') ?>
+ </td>
+ <td>
+ <input type="text" name="ftp_port" value="<?php echo $this->ftp['port'] ?>" />
+ </td>
+ </tr>
+ <tr class="row0" id="row_ftp_username" <?php echo $ftpFieldsDisplay ?>>
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_USERNAME') ?>
+ </td>
+ <td>
+ <input type="text" name="ftp_user" value="<?php echo $this->ftp['username'] ?>" />
+ </td>
+ </tr>
+ <tr class="row1" id="row_ftp_password" <?php echo $ftpFieldsDisplay ?>>
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PASSWORD') ?>
+ </td>
+ <td>
+ <input type="text" name="ftp_pass" value="<?php echo $this->ftp['password'] ?>" />
+ </td>
+ </tr>
+ <tr class="row0" id="row_ftp_directory" <?php echo $ftpFieldsDisplay ?>>
+ <td>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY') ?>
+ </td>
+ <td>
+ <input type="text" name="ftp_root" value="<?php echo $this->ftp['directory'] ?>" />
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+ <button type="submit">
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLUPDATE') ?>
+ </button>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+</fieldset>
+
+</form>
+<?php endif; ?>

Added: development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/default/tmpl/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/views/default/view.html.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/default/view.html.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/default/view.html.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,61 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 2.5.2
+ */
+
+defined('_JEXEC') or die;
+
+jimport('joomla.application.component.view');
+
+/**
+ * Joomla! Update's Default View
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_installer
+ * @since 2.5.2
+ */
+class JoomlaupdateViewDefault extends JView
+{
+ /**
+ * Renders the view
+ *
+ * @param string $tpl Template name
+ *
+ * @return void
+ */
+ public function display($tpl=null)
+ {
+ // Get data from the model
+ $this->state = $this->get('State');
+
+ // Load useful classes
+ $model = $this->getModel();
+ $this->loadHelper('select');
+
+ // Assign view variables
+ $ftp = $model->getFTPOptions();
+ $this->assign('updateInfo', $model->getUpdateInformation());
+ $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled']));
+
+ // Set the toolbar information
+ JToolBarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
+
+ // Add toolbar buttons
+ JToolBarHelper::preferences('com_joomlaupdate');
+
+ // Load mooTools
+ JHtml::_('behavior.framework');
+
+ // Load our Javascript
+ $document = JFactory::getDocument();
+ $document->addScript('../media/com_joomlaupdate/default.js');
+
+ // Render the view
+ parent::display($tpl);
+ }
+
+}

Added: development/trunk/administrator/components/com_joomlaupdate/views/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/views/update/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/update/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/update/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/default.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/default.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/default.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 2.5.2
+ */
+
+defined('_JEXEC') or die;
+
+?>
+<div id="update-progress">
+ <h1>
+ <?php echo JText::_('COM_JOOMLAUPDATE_VIEW_UPDATE_INPROGRESS') ?>
+ </h1>
+ <div id="extprogress">
+ <div class="extprogrow">
+ <span class="extlabel"><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_UPDATE_BYTESREAD'); ?></span>
+ <span class="extvalue" id="extbytesin"></span>
+ </div>
+ <div class="extprogrow">
+ <span class="extlabel"><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_UPDATE_BYTESEXTRACTED'); ?></span>
+ <span class="extvalue" id="extbytesout"></span>
+ </div>
+ <div class="extprogrow">
+ <span class="extlabel"><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_UPDATE_FILESEXTRACTED'); ?></span>
+ <span class="extvalue" id="extfiles"></span>
+ </div>
+ </div>
+</div>

Added: development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/index.html
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/index.html (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/update/tmpl/index.html 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>

Added: development/trunk/administrator/components/com_joomlaupdate/views/update/view.html.php
===================================================================
--- development/trunk/administrator/components/com_joomlaupdate/views/update/view.html.php (rev 0)
+++ development/trunk/administrator/components/com_joomlaupdate/views/update/view.html.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * @package Joomla.Administrator
+ * @subpackage com_joomlaupdate
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @since 2.5.2
+ */
+
+defined('_JEXEC') or die;
+
+jimport('joomla.application.component.view');
+
+/**
+ * Joomla! Update's Update View
+ *
+ * @package Joomla.Administrator
+ * @subpackage com_installer
+ * @since 2.5.2
+ */
+class JoomlaupdateViewUpdate extends JView
+{
+ /**
+ * Renders the view
+ *
+ * @param string $tpl Template name
+ *
+ * @return void
+ */
+ public function display($tpl=null)
+ {
+ $password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
+ $filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
+ $ajaxUrl = JURI::base().'components/com_joomlaupdate/restore.php';
+ $returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
+
+ // Set the toolbar information
+ JToolBarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
+
+ // Add toolbar buttons
+ JToolBarHelper::preferences('com_joomlaupdate');
+
+ // Load mooTools
+ JHtml::_('behavior.framework');
+
+ $updateScript = <<<ENDSCRIPT
+var joomlaupdate_password = '$password';
+var joomlaupdate_totalsize = '$filesize';
+var joomlaupdate_ajax_url = '$ajaxUrl';
+var joomlaupdate_return_url = '$returnUrl';
+
+ENDSCRIPT;
+
+ // Load our Javascript
+ $document = JFactory::getDocument();
+ $document->addScript('../media/com_joomlaupdate/json2.js');
+ $document->addScript('../media/com_joomlaupdate/encryption.js');
+ $document->addScript('../media/com_joomlaupdate/update.js');
+ $document->addScriptDeclaration($updateScript);
+
+ // Render the view
+ parent::display($tpl);
+ }
+
+}

Modified: development/trunk/installation/CHANGELOG
===================================================================
--- development/trunk/installation/CHANGELOG 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/installation/CHANGELOG 2012-03-28 18:36:44 UTC (rev 22957)
@@ -31,6 +31,9 @@
# [#27961] Template is not displayed in the Styles (backend)
# [#28120] XHTML 1.0 Transitional

+27-March-2012 Mark Dexter
+ + [#27984] Make the auto-update process more reliable across different hosts
+
27-Mar-2012 Jean-Marie Simonet
$ Updating installation ini file cs-CZ

Modified: development/trunk/installation/sql/mysql/joomla.sql
===================================================================
--- development/trunk/installation/sql/mysql/joomla.sql 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/installation/sql/mysql/joomla.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -25,39 +25,40 @@

INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`)
VALUES
- (1, 0, 1, 65, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
- (2,1,1,2,1,'com_admin','com_admin','{}'),
- (3,1,3,6,1,'com_banners','com_banners','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (4,1,7,8,1,'com_cache','com_cache','{"core.admin":{"7":1},"core.manage":{"7":1}}'),
- (5,1,9,10,1,'com_checkin','com_checkin','{"core.admin":{"7":1},"core.manage":{"7":1}}'),
- (6,1,11,12,1,'com_config','com_config','{}'),
- (7,1,13,16,1,'com_contact','com_contact','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (8,1,17,20,1,'com_content','com_content','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
- (9,1,21,22,1,'com_cpanel','com_cpanel','{}'),
- (10,1,23,24,1,'com_installer','com_installer','{"core.admin":[],"core.manage":{"7":0},"core.delete":{"7":0},"core.edit.state":{"7":0}}'),
- (11,1,25,26,1,'com_languages','com_languages','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (12,1,27,28,1,'com_login','com_login','{}'),
- (13,1,29,30,1,'com_mailto','com_mailto','{}'),
- (14,1,31,32,1,'com_massmail','com_massmail','{}'),
- (15,1,33,34,1,'com_media','com_media','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":{"5":1}}'),
- (16,1,35,36,1,'com_menus','com_menus','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (17,1,37,38,1,'com_messages','com_messages','{"core.admin":{"7":1},"core.manage":{"7":1}}'),
- (18,1,39,40,1,'com_modules','com_modules','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (19,1,41,44,1,'com_newsfeeds','com_newsfeeds','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (20,1,45,46,1,'com_plugins','com_plugins','{"core.admin":{"7":1},"core.manage":[],"core.edit":[],"core.edit.state":[]}'),
- (21,1,47,48,1,'com_redirect','com_redirect','{"core.admin":{"7":1},"core.manage":[]}'),
- (22,1,49,50,1,'com_search','com_search','{"core.admin":{"7":1},"core.manage":{"6":1}}'),
- (23,1,51,52,1,'com_templates','com_templates','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (24,1,53,56,1,'com_users','com_users','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (25,1,57,60,1,'com_weblinks','com_weblinks','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
- (26,1,61,62,1,'com_wrapper','com_wrapper','{}'),
- (27,8,18,19,2,'com_content.category.2','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (28,3,4,5,2,'com_banners.category.3','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (29,7,14,15,2,'com_contact.category.4','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (30,19,42,43,2,'com_newsfeeds.category.5','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (31,25,58,59,2,'com_weblinks.category.6','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
- (32,24,54,55,1,'com_users.notes.category.7','Uncategorised','{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
- (33,1,63,64,1,'com_finder','com_finder','{"core.admin":{"7":1},"core.manage":{"6":1}}');
+(1, 0, 1, 67, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
+(2, 1, 1, 2, 1, 'com_admin', 'com_admin', '{}'),
+(3, 1, 3, 6, 1, 'com_banners', 'com_banners', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(4, 1, 7, 8, 1, 'com_cache', 'com_cache', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
+(5, 1, 9, 10, 1, 'com_checkin', 'com_checkin', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
+(6, 1, 11, 12, 1, 'com_config', 'com_config', '{}'),
+(7, 1, 13, 16, 1, 'com_contact', 'com_contact', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(8, 1, 17, 20, 1, 'com_content', 'com_content', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
+(9, 1, 21, 22, 1, 'com_cpanel', 'com_cpanel', '{}'),
+(10, 1, 23, 24, 1, 'com_installer', 'com_installer', '{"core.admin":[],"core.manage":{"7":0},"core.delete":{"7":0},"core.edit.state":{"7":0}}'),
+(11, 1, 25, 26, 1, 'com_languages', 'com_languages', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(12, 1, 27, 28, 1, 'com_login', 'com_login', '{}'),
+(13, 1, 29, 30, 1, 'com_mailto', 'com_mailto', '{}'),
+(14, 1, 31, 32, 1, 'com_massmail', 'com_massmail', '{}'),
+(15, 1, 33, 34, 1, 'com_media', 'com_media', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":{"5":1}}'),
+(16, 1, 35, 36, 1, 'com_menus', 'com_menus', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(17, 1, 37, 38, 1, 'com_messages', 'com_messages', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
+(18, 1, 39, 40, 1, 'com_modules', 'com_modules', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(19, 1, 41, 44, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(20, 1, 45, 46, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1},"core.manage":[],"core.edit":[],"core.edit.state":[]}'),
+(21, 1, 47, 48, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1},"core.manage":[]}'),
+(22, 1, 49, 50, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
+(23, 1, 51, 52, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(24, 1, 53, 56, 1, 'com_users', 'com_users', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(25, 1, 57, 60, 1, 'com_weblinks', 'com_weblinks', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
+(26, 1, 61, 62, 1, 'com_wrapper', 'com_wrapper', '{}'),
+(27, 8, 18, 19, 2, 'com_content.category.2', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(28, 3, 4, 5, 2, 'com_banners.category.3', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(29, 7, 14, 15, 2, 'com_contact.category.4', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(30, 19, 42, 43, 2, 'com_newsfeeds.category.5', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(31, 25, 58, 59, 2, 'com_weblinks.category.6', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(32, 24, 54, 55, 1, 'com_users.notes.category.7', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(33, 1, 63, 64, 1, 'com_finder', 'com_finder', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
+(34, 1, 65, 66, 1, 'com_joomlaupdate', 'com_joomlaupdate', '{"core.admin":[],"core.manage":[],"core.delete":[],"core.edit.state":[]}');

# -------------------------------------------------------

@@ -417,7 +418,8 @@
(23, 'com_config', 'component', 'com_config', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_config","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONFIG_XML_DESCRIPTION","group":""}', '{"filters":{"1":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"6":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"7":{"filter_type":"NONE","filter_tags":"","filter_attributes":""},"2":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"3":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"4":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"5":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"10":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"12":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"8":{"filter_type":"NONE","filter_tags":"","filter_attributes":""}}}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(24, 'com_redirect', 'component', 'com_redirect', '', 1, 1, 0, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(25, 'com_users', 'component', 'com_users', '', 1, 1, 0, 1, '', '{"allowUserRegistration":"1","new_usertype":"2","useractivation":"1","frontend_userparams":"1","mailSubjectPrefix":"","mailBodySuffix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"snowball"}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
+(27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"snowball"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
+(28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2012 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

# Libraries
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
@@ -1177,6 +1179,7 @@
(19, 'menu', 'com_weblinks_links', 'Links', '', 'Weblinks/Links', 'index.php?option=com_weblinks', 'component', 0, 18, 2, 21, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks', 0, '', 36, 37, 0, '*', 1),
(20, 'menu', 'com_weblinks_categories', 'Categories', '', 'Weblinks/Categories', 'index.php?option=com_categories&extension=com_weblinks', 'component', 0, 18, 2, 6, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks-cat', 0, '', 38, 39, 0, '*', 1),
(21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 31, 32, 0, '*', 1),
+(22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1),
(101, 'mainmenu', 'Home', 'home', '', 'home', 'index.php?option=com_content&view=featured', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"featured_categories":[""],"num_leading_articles":"1","num_intro_articles":"3","num_columns":"3","num_links":"0","orderby_pri":"","orderby_sec":"front","order_date":"","multi_column_order":"1","show_pagination":"2","show_pagination_results":"1","show_noauth":"","article-allow_ratings":"","article-allow_comments":"","show_feed_link":"1","feed_summary":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":1,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 29, 30, 1, '*', 0);

# -------------------------------------------------------

Modified: development/trunk/installation/sql/mysql/sample_blog.sql
===================================================================
--- development/trunk/installation/sql/mysql/sample_blog.sql 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/installation/sql/mysql/sample_blog.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -1,41 +1,16 @@
#
# IMPORTANT - THIS FILE MUST BE SAVED WITH UTF-8 ENCODING ONLY. BEWARE IF EDITING!
#
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-
--
-- Database: `sample_blog`
--
-
+TRUNCATE `#__assets`;
--
--- Table structure for table `#__assets`
---
-
-CREATE TABLE IF NOT EXISTS `#__assets` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `level` int(10) unsigned NOT NULL COMMENT 'The cached level in the nested tree.',
- `name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n',
- `title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.',
- `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_asset_name` (`name`),
- KEY `idx_lft_rgt` (`lft`,`rgt`),
- KEY `idx_parent_id` (`parent_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;
-
---
-- Dumping data for table `#__assets`
--

-REPLACE INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
-(1, 0, 1, 81, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
+INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
+(1, 0, 1, 83, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
(2, 1, 1, 2, 1, 'com_admin', 'com_admin', '{}'),
(3, 1, 3, 6, 1, 'com_banners', 'com_banners', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(4, 1, 7, 8, 1, 'com_cache', 'com_cache', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
@@ -75,152 +50,9 @@
(38, 35, 25, 26, 3, 'com_content.article.3', 'Welcome to your blog', ''),
(39, 35, 27, 28, 3, 'com_content.article.4', 'About your home page', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(40, 35, 29, 30, 3, 'com_content.article.5', 'Your Modules', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(41, 1, 79, 80, 1, 'com_users.notes.category.10', 'Uncategorised', '');
+(41, 1, 79, 80, 1, 'com_users.notes.category.10', 'Uncategorised', ''),
+(42, 1, 81, 82, 1, 'com_joomlaupdate', 'com_joomlaupdate', '{"core.admin":[],"core.manage":[],"core.delete":[],"core.edit.state":[]}');

--- --------------------------------------------------------
-
---
--- Table structure for table `#__associations`
---
-
-CREATE TABLE IF NOT EXISTS `#__associations` (
- `id` varchar(50) NOT NULL COMMENT 'A reference to the associated item.',
- `context` varchar(50) NOT NULL COMMENT 'The context of the associated item.',
- `key` char(32) NOT NULL COMMENT 'The key for the association computed from an md5 on associated ids.',
- PRIMARY KEY (`context`,`id`),
- KEY `idx_key` (`key`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banners`
---
-
-CREATE TABLE IF NOT EXISTS `#__banners` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `cid` int(11) NOT NULL DEFAULT '0',
- `type` int(11) NOT NULL DEFAULT '0',
- `name` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `imptotal` int(11) NOT NULL DEFAULT '0',
- `impmade` int(11) NOT NULL DEFAULT '0',
- `clicks` int(11) NOT NULL DEFAULT '0',
- `clickurl` varchar(200) NOT NULL DEFAULT '',
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `description` text NOT NULL,
- `custombannercode` varchar(2048) NOT NULL,
- `sticky` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `params` text NOT NULL,
- `own_prefix` tinyint(1) NOT NULL DEFAULT '0',
- `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
- `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
- `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
- `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `reset` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `language` char(7) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- KEY `idx_state` (`state`),
- KEY `idx_own_prefix` (`own_prefix`),
- KEY `idx_metakey_prefix` (`metakey_prefix`),
- KEY `idx_banner_catid` (`catid`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banner_clients`
---
-
-CREATE TABLE IF NOT EXISTS `#__banner_clients` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `contact` varchar(255) NOT NULL DEFAULT '',
- `email` varchar(255) NOT NULL DEFAULT '',
- `extrainfo` text NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `metakey` text NOT NULL,
- `own_prefix` tinyint(4) NOT NULL DEFAULT '0',
- `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
- `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
- `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
- `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
- PRIMARY KEY (`id`),
- KEY `idx_own_prefix` (`own_prefix`),
- KEY `idx_metakey_prefix` (`metakey_prefix`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banner_tracks`
---
-
-CREATE TABLE IF NOT EXISTS `#__banner_tracks` (
- `track_date` datetime NOT NULL,
- `track_type` int(10) unsigned NOT NULL,
- `banner_id` int(10) unsigned NOT NULL,
- `count` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`track_date`,`track_type`,`banner_id`),
- KEY `idx_track_date` (`track_date`),
- KEY `idx_track_type` (`track_type`),
- KEY `idx_banner_id` (`banner_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__categories`
---
-
-CREATE TABLE IF NOT EXISTS `#__categories` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #___assets table.',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
- `lft` int(11) NOT NULL DEFAULT '0',
- `rgt` int(11) NOT NULL DEFAULT '0',
- `level` int(10) unsigned NOT NULL DEFAULT '0',
- `path` varchar(255) NOT NULL DEFAULT '',
- `extension` varchar(50) NOT NULL DEFAULT '',
- `title` varchar(255) NOT NULL,
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `note` varchar(255) NOT NULL DEFAULT '',
- `description` mediumtext NOT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(11) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `params` text NOT NULL,
- `metadesc` varchar(1024) NOT NULL COMMENT 'The meta description for the page.',
- `metakey` varchar(1024) NOT NULL COMMENT 'The meta keywords for the page.',
- `metadata` varchar(2048) NOT NULL COMMENT 'JSON encoded metadata properties.',
- `created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `hits` int(10) unsigned NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `cat_idx` (`extension`,`published`,`access`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_path` (`path`),
- KEY `idx_left_right` (`lft`,`rgt`),
- KEY `idx_alias` (`alias`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
-
TRUNCATE `#__categories`;
--
-- Dumping data for table `#__categories`
@@ -237,1069 +69,23 @@
(8, 34, 1, 13, 14, 1, 'blog-roll', 'com_weblinks', 'Blog Roll', 'blog-roll', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2012-01-04 15:02:08', 0, '0000-00-00 00:00:00', 0, '*'),
(9, 35, 1, 15, 16, 1, 'blog', 'com_content', 'Blog', 'blog', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2012-01-04 15:43:10', 0, '0000-00-00 00:00:00', 0, '*');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__contact_details`
---
-
-CREATE TABLE IF NOT EXISTS `#__contact_details` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `con_position` varchar(255) DEFAULT NULL,
- `address` text,
- `suburb` varchar(100) DEFAULT NULL,
- `state` varchar(100) DEFAULT NULL,
- `country` varchar(100) DEFAULT NULL,
- `postcode` varchar(100) DEFAULT NULL,
- `telephone` varchar(255) DEFAULT NULL,
- `fax` varchar(255) DEFAULT NULL,
- `misc` mediumtext,
- `image` varchar(255) DEFAULT NULL,
- `imagepos` varchar(20) DEFAULT NULL,
- `email_to` varchar(255) DEFAULT NULL,
- `default_con` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `params` text NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT '0',
- `catid` int(11) NOT NULL DEFAULT '0',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `mobile` varchar(255) NOT NULL DEFAULT '',
- `webpage` varchar(255) NOT NULL DEFAULT '',
- `sortname1` varchar(255) NOT NULL,
- `sortname2` varchar(255) NOT NULL,
- `sortname3` varchar(255) NOT NULL,
- `language` char(7) NOT NULL,
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`published`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__content`
---
-
-CREATE TABLE IF NOT EXISTS `#__content` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #___assets table.',
- `title` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `title_alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Deprecated in Joomla! 3.0',
- `introtext` mediumtext NOT NULL,
- `fulltext` mediumtext NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `sectionid` int(10) unsigned NOT NULL DEFAULT '0',
- `mask` int(10) unsigned NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `images` text NOT NULL,
- `urls` text NOT NULL,
- `attribs` varchar(5120) NOT NULL,
- `version` int(10) unsigned NOT NULL DEFAULT '1',
- `parentid` int(10) unsigned NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `hits` int(10) unsigned NOT NULL DEFAULT '0',
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.',
- `language` char(7) NOT NULL COMMENT 'The language code for the article.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`state`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
-
---
-- Dumping data for table `#__content`
--

-REPLACE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`, `featured`, `language`, `xreference`) VALUES
+INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`, `featured`, `language`, `xreference`) VALUES
(1, 36, 'About', 'about', '', '<p>This tells you a bit about this blog and the person who writes it. </p>\r\n<p>When you are logged in you will be able to edit this page by clicking on the edit icon.</p>', '', 1, 0, 0, 2, '2012-01-04 16:10:42', 42, '', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2012-01-04 16:10:42', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 0, 1, '', '', 1, 3, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(2, 37, 'Working on Your Site', 'working-on-your-site', '', '<p>Here are some basic tips for working on your site.</p>\r\n<ul>\r\n<li>Joomla! has a "front end" that you are looking at now and an "administrator" which is where you do the more advanced work of creating your site such as setting up the menus and deciding what modules to show. You need to login to the administrator separately using the same user name and password that you used to login to this part of the site.</li>\r\n<li>One of the first things you will probably want to do is change the site title and tag line. To do this login to the site administrator and on the Extensions menu click Template. This site installs with the Beez2 template with the "Beez2 - Default Style." Click on that and you will see a form were you can change these to what ever you want. You will also see other options that you can experiment with. </li>\r\n<li>To totally change the look of you site you will probably want to install a new template. In the Extensions menu click on Extensions Manager and then go to the Install tab. There are many free and commercial templates available for Joomla.</li>\r\n<li>As you have already seen, you can control who can see different parts of you site. When you work with modules, articles or weblinks setting the Access level to Registered will mean that only logged in users can see them</li>\r\n<li>When you create a new article or other kind of content you also can save it as Published or Unpublished. If it is Unpublished site visitors will not be able to see it but you will.</li>\r\n<li>You can learn much more about working with Joomla from the <a href="http://docs.joomla.org">Joomla documentation site</a> and get help from other users at the <a href="http://forum.joomla.org">Joomla forums</a>. In the administrator there are help buttons on every page that provide detailed information about the functions on that page.</li>\r\n</ul>', '', 1, 0, 0, 2, '2012-01-04 16:48:38', 42, '', '2012-01-17 16:02:30', 42, 0, '0000-00-00 00:00:00!
', '2012
-01-04 16:48:38', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 6, 0, 0, '', '', 3, 7, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(3, 38, 'Welcome to your blog', 'welcome-to-your-blog', '', '<p>This is a sample blog posting. </p>\r\n<p>If you log in to the site (the Author Login link is on the bottom of this page) you will be able to edit it and all of the other existing articles. You will also be able to create a new article.</p>\r\n<p>As you add and modify articles you will see how your site changes and also how you can customise it in various ways.</p>\r\n<p>Go ahead, you can''t break it. </p>', '', 1, 0, 0, 9, '2012-01-04 16:55:36', 42, '', '2012-01-17 16:03:05', 42, 0, '0000-00-00 00:00:00', '2012-01-04 16:55:36', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 0, 2, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(4, 39, 'About your home page', 'about-your-home-page', '', '<p>Your home page is set to display the four most recent articles from the blog category in a column. Then there are links to the 4 articles before those.  You can change those numbers by editing the content options settings in the blog tab in your site administrator.  There is a link to your site administrator in the top menu.</p>\r\n<p>If you want to have your blog post broken into two parts, an introduction and then a full length separate page, use the Read More button to insert a break.</p>\r\n', '\r\n<p>On the full page you will see both the introductory content and the rest of the article. You can change the settings to hide the introduction if you want. </p>\r\n<p> </p>\r\n<p> </p>\r\n<p> </p>', 1, 0, 0, 9, '2012-01-04 17:47:03', 42, '', '2012-01-04 18:16:23', 42, 0, '0000-00-00 00:00:00', '2012-01-04 17:47:03', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 2, 0, 1, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(5, 40, 'Your Modules', 'your-modules', '', '<p>Your site has some commonly used modules already preconfigured. These include:</p>\r\n<ul>\r\n<li>Blog roll. which lets you link to other blogs. We''ve put in two examples, but you''ll want to change them. When you are logged in, click on edit blog roll to update this.</li>\r\n<li>Most Read Posts which lists articles based on the number of times they have been read.</li>\r\n<li>Older Articles which lists out articles by month. </li>\r\n<li>Syndicate which allows your readers to read your posts in a news reader.</li>\r\n</ul>\r\n<p>Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Joomla! also includes many other modules you can incorporate in your site. As you develop your site you may want to add more module that you can find at the <a href="http://extensions.joomla.org">Joomla Extensions Directory.</a></p>', '', 1, 0, 0, 9, '2012-01-05 09:30:17', 42, '', '2012-01-17 12:23:56', 42, 0, '0000-00-00 00:00:00', '2012-01-05 09:30:17', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 0, 0, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__content_frontpage`
---
-
-CREATE TABLE IF NOT EXISTS `#__content_frontpage` (
- `content_id` int(11) NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`content_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__content_rating`
---
-
-CREATE TABLE IF NOT EXISTS `#__content_rating` (
- `content_id` int(11) NOT NULL DEFAULT '0',
- `rating_sum` int(10) unsigned NOT NULL DEFAULT '0',
- `rating_count` int(10) unsigned NOT NULL DEFAULT '0',
- `lastip` varchar(50) NOT NULL DEFAULT '',
- PRIMARY KEY (`content_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__core_log_searches`
---
-
-CREATE TABLE IF NOT EXISTS `#__core_log_searches` (
- `search_term` varchar(128) NOT NULL DEFAULT '',
- `hits` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__extensions`
---
-
-CREATE TABLE IF NOT EXISTS `#__extensions` (
- `extension_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- `type` varchar(20) NOT NULL,
- `element` varchar(100) NOT NULL,
- `folder` varchar(100) NOT NULL,
- `client_id` tinyint(3) NOT NULL,
- `enabled` tinyint(3) NOT NULL DEFAULT '1',
- `access` int(10) unsigned NOT NULL DEFAULT '1',
- `protected` tinyint(3) NOT NULL DEFAULT '0',
- `manifest_cache` text NOT NULL,
- `params` text NOT NULL,
- `custom_data` text NOT NULL,
- `system_data` text NOT NULL,
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) DEFAULT '0',
- `state` int(11) DEFAULT '0',
- PRIMARY KEY (`extension_id`),
- KEY `element_clientid` (`element`,`client_id`),
- KEY `element_folder_clientid` (`element`,`folder`,`client_id`),
- KEY `extension` (`type`,`element`,`folder`,`client_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10000 ;
-
---
--- Dumping data for table `#__extensions`
---
-
-REPLACE INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
-(1, 'com_mailto', 'component', 'com_mailto', '', 0, 1, 1, 1, '{"legacy":false,"name":"com_mailto","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MAILTO_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(2, 'com_wrapper', 'component', 'com_wrapper', '', 0, 1, 1, 1, '{"legacy":false,"name":"com_wrapper","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_WRAPPER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(3, 'com_admin', 'component', 'com_admin', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_admin","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_ADMIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(4, 'com_banners', 'component', 'com_banners', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_banners","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_BANNERS_XML_DESCRIPTION","group":""}', '{"purchase_type":"3","track_impressions":"0","track_clicks":"0","metakey_prefix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(5, 'com_cache', 'component', 'com_cache', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_cache","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CACHE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(6, 'com_categories', 'component', 'com_categories', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_categories","type":"component","creationDate":"December 2007","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CATEGORIES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(7, 'com_checkin', 'component', 'com_checkin', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_checkin","type":"component","creationDate":"Unknown","author":"Joomla! Project","copyright":"(C) 2005 - 2008 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CHECKIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(8, 'com_contact', 'component', 'com_contact', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_contact","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONTACT_XML_DESCRIPTION","group":""}', '{"show_contact_category":"hide","show_contact_list":"0","presentation_style":"sliders","show_name":"1","show_position":"1","show_email":"0","show_street_address":"1","show_suburb":"1","show_state":"1","show_postcode":"1","show_country":"1","show_telephone":"1","show_mobile":"1","show_fax":"1","show_webpage":"1","show_misc":"1","show_image":"1","image":"","allow_vcard":"0","show_articles":"0","show_profile":"0","show_links":"0","linka_name":"","linkb_name":"","linkc_name":"","linkd_name":"","linke_name":"","contact_icons":"0","icon_address":"","icon_email":"","icon_telephone":"","icon_mobile":"","icon_fax":"","icon_misc":"","show_headings":"1","show_position_headings":"1","show_email_headings":"0","show_telephone_headings":"1","show_mobile_headings":"0","show_fax_headings":"0","allow_vcard_headings":"0","show_suburb_headings":"1","show_state_headings":"1","show_country_headings":"1","show_email_form":"1","show_email_copy":"1","banned_email":"","banned_subject":"","banned_text":"","validate_session":"1","custom_reply":"0","redirect":"","show_category_crumb":"0","metakey":"","metadesc":"","robots":"","author":"","rights":"","xreference":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(9, 'com_cpanel', 'component', 'com_cpanel', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_cpanel","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CPANEL_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(10, 'com_installer', 'component', 'com_installer', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_installer","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_INSTALLER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(11, 'com_languages', 'component', 'com_languages', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_languages","type":"component","creationDate":"2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_LANGUAGES_XML_DESCRIPTION","group":""}', '{"administrator":"en-GB","site":"en-GB"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(12, 'com_login', 'component', 'com_login', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_login","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(13, 'com_media', 'component', 'com_media', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_media","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MEDIA_XML_DESCRIPTION","group":""}', '{"upload_extensions":"bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,swf,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,SWF,TXT,XCF,XLS","upload_maxsize":"10","file_path":"images","image_path":"images","restrict_uploads":"1","allowed_media_usergroup":"3","check_mime":"1","image_extensions":"bmp,gif,jpg,png","ignore_extensions":"","upload_mime":"image\\/jpeg,image\\/gif,image\\/png,image\\/bmp,application\\/x-shockwave-flash,application\\/msword,application\\/excel,application\\/pdf,application\\/powerpoint,text\\/plain,application\\/x-zip","upload_mime_illegal":"text\\/html","enable_flash":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(14, 'com_menus', 'component', 'com_menus', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_menus","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MENUS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(15, 'com_messages', 'component', 'com_messages', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_messages","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MESSAGES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(16, 'com_modules', 'component', 'com_modules', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_modules","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MODULES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(17, 'com_newsfeeds', 'component', 'com_newsfeeds', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_newsfeeds","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{"show_feed_image":"1","show_feed_description":"1","show_item_description":"1","feed_word_count":"0","show_headings":"1","show_name":"1","show_articles":"0","show_link":"1","show_description":"1","show_description_image":"1","display_num":"","show_pagination_limit":"1","show_pagination":"1","show_pagination_results":"1","show_cat_items":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(18, 'com_plugins', 'component', 'com_plugins', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_plugins","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_PLUGINS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(19, 'com_search', 'component', 'com_search', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_search","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_SEARCH_XML_DESCRIPTION","group":""}', '{"enabled":"0","show_date":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(20, 'com_templates', 'component', 'com_templates', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_templates","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_TEMPLATES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(21, 'com_weblinks', 'component', 'com_weblinks', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_weblinks","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_WEBLINKS_XML_DESCRIPTION","group":""}', '{"show_comp_description":"1","comp_description":"","show_link_hits":"1","show_link_description":"1","show_other_cats":"0","show_headings":"0","show_numbers":"0","show_report":"1","count_clicks":"1","target":"0","link_icons":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(22, 'com_content', 'component', 'com_content', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_content","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONTENT_XML_DESCRIPTION","group":""}', '{"article_layout":"_:default","show_title":"1","link_titles":"1","show_intro":"1","show_category":"0","link_category":"0","show_parent_category":"0","link_parent_category":"0","show_author":"1","link_author":"0","show_create_date":"0","show_modify_date":"0","show_publish_date":"1","show_item_navigation":"1","show_vote":"0","show_readmore":"1","show_readmore_title":"1","readmore_limit":"100","show_icons":"1","show_print_icon":"1","show_email_icon":"1","show_hits":"0","show_noauth":"0","show_publishing_options":"1","show_article_options":"1","show_urls_images_frontend":"1","show_urls_images_backend":"1","targeta":0,"targetb":0,"targetc":0,"float_intro":"left","float_fulltext":"left","category_layout":"_:blog","show_category_title":"0","show_description":"0","show_description_image":"0","maxLevel":"1","show_empty_categories":"0","show_no_articles":"1","show_subcat_desc":"1","show_cat_num_articles":"0","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_num_articles_cat":"1","num_leading_articles":"4","num_intro_articles":"0","num_columns":"1","num_links":"4","multi_column_order":"0","show_subcategory_content":"-1","show_pagination_limit":"1","filter_field":"hide","show_headings":"1","list_show_date":"0","date_format":"","list_show_hits":"1","list_show_author":"1","orderby_pri":"order","orderby_sec":"rdate","order_date":"published","show_pagination":"2","show_pagination_results":"1","show_feed_link":"1","feed_summary":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(23, 'com_config', 'component', 'com_config', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_config","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONFIG_XML_DESCRIPTION","group":""}', '{"filters":{"1":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"6":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"7":{"filter_type":"NONE","filter_tags":"","filter_attributes":""},"2":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"3":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"4":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"5":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"10":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"12":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"8":{"filter_type":"NONE","filter_tags":"","filter_attributes":""}}}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(24, 'com_redirect', 'component', 'com_redirect', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_redirect","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_REDIRECT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(25, 'com_users', 'component', 'com_users', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_users","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_USERS_XML_DESCRIPTION","group":""}', '{"allowUserRegistration":"1","new_usertype":"2","useractivation":"1","frontend_userparams":"1","mailSubjectPrefix":"","mailBodySuffix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '{"legacy":false,"name":"com_finder","type":"component","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"COM_FINDER_XML_DESCRIPTION","group":""}', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"snowball"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(100, 'PHPMailer', 'library', 'phpmailer', '', 0, 1, 1, 1, '{"legacy":false,"name":"PHPMailer","type":"library","creationDate":"2008","author":"PHPMailer","copyright":"Copyright (C) PHPMailer.","authorEmail":"","authorUrl":"http:\\/\\/phpmailer.codeworxtech.com\\/","version":"1.7.0","description":"LIB_PHPMAILER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(101, 'SimplePie', 'library', 'simplepie', '', 0, 1, 1, 1, '{"legacy":false,"name":"SimplePie","type":"library","creationDate":"2008","author":"SimplePie","copyright":"Copyright (C) 2008 SimplePie","authorEmail":"","authorUrl":"http:\\/\\/simplepie.org\\/","version":"1.0.1","description":"LIB_SIMPLEPIE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(102, 'phputf8', 'library', 'phputf8', '', 0, 1, 1, 1, '{"legacy":false,"name":"phputf8","type":"library","creationDate":"2008","author":"Harry Fuecks","copyright":"Copyright various authors","authorEmail":"","authorUrl":"http:\\/\\/sourceforge.net\\/projects\\/phputf8","version":"1.7.0","description":"LIB_PHPUTF8_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(103, 'Joomla! Web Application Framework', 'library', 'joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"Joomla! Web Application Framework","type":"library","creationDate":"2008","author":"Joomla","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"http:\\/\\/www.joomla.org","version":"1.7.0","description":"LIB_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(200, 'mod_articles_archive', 'module', 'mod_articles_archive', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_archive","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters.\\n\\t\\tAll rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_ARCHIVE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(201, 'mod_articles_latest', 'module', 'mod_articles_latest', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_latest","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LATEST_NEWS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(202, 'mod_articles_popular', 'module', 'mod_articles_popular', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_articles_popular","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_POPULAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(203, 'mod_banners', 'module', 'mod_banners', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_banners","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_BANNERS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(204, 'mod_breadcrumbs', 'module', 'mod_breadcrumbs', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_breadcrumbs","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_BREADCRUMBS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(205, 'mod_custom', 'module', 'mod_custom', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_custom","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_CUSTOM_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(206, 'mod_feed', 'module', 'mod_feed', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_feed","type":"module","creationDate":"July 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FEED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(207, 'mod_footer', 'module', 'mod_footer', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_footer","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FOOTER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(208, 'mod_login', 'module', 'mod_login', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_login","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(209, 'mod_menu', 'module', 'mod_menu', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_menu","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_MENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(210, 'mod_articles_news', 'module', 'mod_articles_news', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_articles_news","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_NEWS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(211, 'mod_random_image', 'module', 'mod_random_image', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_random_image","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_RANDOM_IMAGE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(212, 'mod_related_items', 'module', 'mod_related_items', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_related_items","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_RELATED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(213, 'mod_search', 'module', 'mod_search', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_search","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SEARCH_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(214, 'mod_stats', 'module', 'mod_stats', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_stats","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(215, 'mod_syndicate', 'module', 'mod_syndicate', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_syndicate","type":"module","creationDate":"May 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SYNDICATE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(216, 'mod_users_latest', 'module', 'mod_users_latest', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_users_latest","type":"module","creationDate":"December 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_USERS_LATEST_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(217, 'mod_weblinks', 'module', 'mod_weblinks', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_weblinks","type":"module","creationDate":"July 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WEBLINKS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(218, 'mod_whosonline', 'module', 'mod_whosonline', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_whosonline","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WHOSONLINE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(219, 'mod_wrapper', 'module', 'mod_wrapper', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_wrapper","type":"module","creationDate":"October 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WRAPPER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(220, 'mod_articles_category', 'module', 'mod_articles_category', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_category","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_CATEGORY_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(221, 'mod_articles_categories', 'module', 'mod_articles_categories', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_categories","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_CATEGORIES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(222, 'mod_languages', 'module', 'mod_languages', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_languages","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LANGUAGES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(223, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, '{"legacy":false,"name":"mod_finder","type":"module","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_FINDER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(300, 'mod_custom', 'module', 'mod_custom', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_custom","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_CUSTOM_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(301, 'mod_feed', 'module', 'mod_feed', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_feed","type":"module","creationDate":"July 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FEED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(302, 'mod_latest', 'module', 'mod_latest', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_latest","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LATEST_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(303, 'mod_logged', 'module', 'mod_logged', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_logged","type":"module","creationDate":"January 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGGED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(304, 'mod_login', 'module', 'mod_login', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_login","type":"module","creationDate":"March 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(305, 'mod_menu', 'module', 'mod_menu', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_menu","type":"module","creationDate":"March 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_MENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(307, 'mod_popular', 'module', 'mod_popular', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_popular","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_POPULAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(308, 'mod_quickicon', 'module', 'mod_quickicon', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_quickicon","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_QUICKICON_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(309, 'mod_status', 'module', 'mod_status', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_status","type":"module","creationDate":"Feb 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_STATUS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(310, 'mod_submenu', 'module', 'mod_submenu', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_submenu","type":"module","creationDate":"Feb 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SUBMENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(311, 'mod_title', 'module', 'mod_title', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_title","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_TITLE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(312, 'mod_toolbar', 'module', 'mod_toolbar', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_toolbar","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_TOOLBAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(313, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_multilangstatus","type":"module","creationDate":"September 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"MOD_MULTILANGSTATUS_XML_DESCRIPTION","group":""}', '{"cache":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(400, 'plg_authentication_gmail', 'plugin', 'gmail', 'authentication', 0, 0, 1, 0, '{"legacy":false,"name":"plg_authentication_gmail","type":"plugin","creationDate":"February 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_GMAIL_XML_DESCRIPTION","group":""}', '{"applysuffix":"0","suffix":"","verifypeer":"1","user_blacklist":""}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(401, 'plg_authentication_joomla', 'plugin', 'joomla', 'authentication', 0, 1, 1, 1, '{"legacy":false,"name":"plg_authentication_joomla","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_AUTH_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(402, 'plg_authentication_ldap', 'plugin', 'ldap', 'authentication', 0, 0, 1, 0, '{"legacy":false,"name":"plg_authentication_ldap","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LDAP_XML_DESCRIPTION","group":""}', '{"host":"","port":"389","use_ldapV3":"0","negotiate_tls":"0","no_referrals":"0","auth_method":"bind","base_dn":"","search_string":"","users_dn":"","username":"admin","password":"bobby7","ldap_fullname":"fullName","ldap_email":"mail","ldap_uid":"uid"}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(404, 'plg_content_emailcloak', 'plugin', 'emailcloak', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_emailcloak","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_EMAILCLOAK_XML_DESCRIPTION","group":""}', '{"mode":"1"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(405, 'plg_content_geshi', 'plugin', 'geshi', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_geshi","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"","authorUrl":"qbnz.com\\/highlighter","version":"1.7.0","description":"PLG_CONTENT_GESHI_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(406, 'plg_content_loadmodule', 'plugin', 'loadmodule', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_loadmodule","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LOADMODULE_XML_DESCRIPTION","group":""}', '{"style":"xhtml"}', '', '', 0, '2011-09-18 15:22:50', 0, 0),
-(407, 'plg_content_pagebreak', 'plugin', 'pagebreak', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_pagebreak","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_PAGEBREAK_XML_DESCRIPTION","group":""}', '{"title":"1","multipage_toc":"1","showall":"1"}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(408, 'plg_content_pagenavigation', 'plugin', 'pagenavigation', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_pagenavigation","type":"plugin","creationDate":"January 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_PAGENAVIGATION_XML_DESCRIPTION","group":""}', '{"position":"1"}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(409, 'plg_content_vote', 'plugin', 'vote', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_vote","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_VOTE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 6, 0),
-(410, 'plg_editors_codemirror', 'plugin', 'codemirror', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_codemirror","type":"plugin","creationDate":"28 March 2011","author":"Marijn Haverbeke","copyright":"","authorEmail":"N\\/A","authorUrl":"","version":"1.0","description":"PLG_CODEMIRROR_XML_DESCRIPTION","group":""}', '{"linenumbers":"0","tabmode":"indent"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(411, 'plg_editors_none', 'plugin', 'none', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_none","type":"plugin","creationDate":"August 2004","author":"Unknown","copyright":"","authorEmail":"N\\/A","authorUrl":"","version":"1.7.0","description":"PLG_NONE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(412, 'plg_editors_tinymce', 'plugin', 'tinymce', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_tinymce","type":"plugin","creationDate":"2005-2011","author":"Moxiecode Systems AB","copyright":"Moxiecode Systems AB","authorEmail":"N\\/A","authorUrl":"tinymce.moxiecode.com\\/","version":"3.4.7","description":"PLG_TINY_XML_DESCRIPTION","group":""}', '{"mode":"1","skin":"0","compressed":"0","cleanup_startup":"0","cleanup_save":"2","entity_encoding":"raw","lang_mode":"0","lang_code":"en","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","invalid_elements":"script,applet,iframe","extended_elements":"","toolbar":"top","toolbar_align":"left","html_height":"550","html_width":"750","element_path":"1","fonts":"1","paste":"1","searchreplace":"1","insertdate":"1","format_date":"%Y-%m-%d","inserttime":"1","format_time":"%H:%M:%S","colors":"1","table":"1","smilies":"1","media":"1","hr":"1","directionality":"1","fullscreen":"1","style":"1","layer":"1","xhtmlxtras":"1","visualchars":"1","nonbreaking":"1","template":"1","blockquote":"1","wordcount":"1","advimage":"1","advlink":"1","autosave":"1","contextmenu":"1","inlinepopups":"1","safari":"0","custom_plugin":"","custom_button":""}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(413, 'plg_editors-xtd_article', 'plugin', 'article', 'editors-xtd', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors-xtd_article","type":"plugin","creationDate":"October 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_ARTICLE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(414, 'plg_editors-xtd_image', 'plugin', 'image', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_image","type":"plugin","creationDate":"August 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_IMAGE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(415, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_pagebreak","type":"plugin","creationDate":"August 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_EDITORSXTD_PAGEBREAK_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(416, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_readmore","type":"plugin","creationDate":"March 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_READMORE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(417, 'plg_search_categories', 'plugin', 'categories', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_categories","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CATEGORIES_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(418, 'plg_search_contacts', 'plugin', 'contacts', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_contacts","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CONTACTS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(419, 'plg_search_content', 'plugin', 'content', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_content","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CONTENT_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(420, 'plg_search_newsfeeds', 'plugin', 'newsfeeds', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_newsfeeds","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(421, 'plg_search_weblinks', 'plugin', 'weblinks', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_weblinks","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_WEBLINKS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(422, 'plg_system_languagefilter', 'plugin', 'languagefilter', 'system', 0, 0, 1, 1, '{"legacy":false,"name":"plg_system_languagefilter","type":"plugin","creationDate":"July 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LANGUAGEFILTER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(423, 'plg_system_p3p', 'plugin', 'p3p', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_p3p","type":"plugin","creationDate":"September 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_P3P_XML_DESCRIPTION","group":""}', '{"headers":"NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(424, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 1, '{"legacy":false,"name":"plg_system_cache","type":"plugin","creationDate":"February 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CACHE_XML_DESCRIPTION","group":""}', '{"browsercache":"0","cachetime":"15"}', '', '', 0, '0000-00-00 00:00:00', 9, 0),
-(425, 'plg_system_debug', 'plugin', 'debug', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_debug","type":"plugin","creationDate":"December 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_DEBUG_XML_DESCRIPTION","group":""}', '{"profile":"1","queries":"1","memory":"1","language_files":"1","language_strings":"1","strip-first":"1","strip-prefix":"","strip-suffix":""}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(426, 'plg_system_log', 'plugin', 'log', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_log","type":"plugin","creationDate":"April 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LOG_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(427, 'plg_system_redirect', 'plugin', 'redirect', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_redirect","type":"plugin","creationDate":"April 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_REDIRECT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 6, 0),
-(428, 'plg_system_remember', 'plugin', 'remember', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_remember","type":"plugin","creationDate":"April 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_REMEMBER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
-(429, 'plg_system_sef', 'plugin', 'sef', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_sef","type":"plugin","creationDate":"December 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEF_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 8, 0),
-(430, 'plg_system_logout', 'plugin', 'logout', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_logout","type":"plugin","creationDate":"April 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LOGOUT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(431, 'plg_user_contactcreator', 'plugin', 'contactcreator', 'user', 0, 0, 1, 1, '{"legacy":false,"name":"plg_user_contactcreator","type":"plugin","creationDate":"August 2009","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTACTCREATOR_XML_DESCRIPTION","group":""}', '{"autowebpage":"","category":"34","autopublish":"0"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(432, 'plg_user_joomla', 'plugin', 'joomla', 'user', 0, 1, 1, 0, '{"legacy":false,"name":"plg_user_joomla","type":"plugin","creationDate":"December 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2009 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_USER_JOOMLA_XML_DESCRIPTION","group":""}', '{"autoregister":"1"}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(433, 'plg_user_profile', 'plugin', 'profile', 'user', 0, 0, 1, 1, '{"legacy":false,"name":"plg_user_profile","type":"plugin","creationDate":"January 2008","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_USER_PROFILE_XML_DESCRIPTION","group":""}', '{"register-require_address1":"1","register-require_address2":"1","register-require_city":"1","register-require_region":"1","register-require_country":"1","register-require_postal_code":"1","register-require_phone":"1","register-require_website":"1","register-require_favoritebook":"1","register-require_aboutme":"1","register-require_tos":"1","register-require_dob":"1","profile-require_address1":"1","profile-require_address2":"1","profile-require_city":"1","profile-require_region":"1","profile-require_country":"1","profile-require_postal_code":"1","profile-require_phone":"1","profile-require_website":"1","profile-require_favoritebook":"1","profile-require_aboutme":"1","profile-require_tos":"1","profile-require_dob":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(434, 'plg_extension_joomla', 'plugin', 'joomla', 'extension', 0, 1, 1, 1, '{"legacy":false,"name":"plg_extension_joomla","type":"plugin","creationDate":"May 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_EXTENSION_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(435, 'plg_content_joomla', 'plugin', 'joomla', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_joomla","type":"plugin","creationDate":"November 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(436, 'plg_system_languagecode', 'plugin', 'languagecode', 'system', 0, 0, 1, 0, '{"legacy":false,"name":"plg_system_languagecode","type":"plugin","creationDate":"November 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LANGUAGECODE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 10, 0),
-(437, 'plg_quickicon_joomlaupdate', 'plugin', 'joomlaupdate', 'quickicon', 0, 1, 1, 1, '{"legacy":false,"name":"plg_quickicon_joomlaupdate","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"PLG_QUICKICON_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(438, 'plg_quickicon_extensionupdate', 'plugin', 'extensionupdate', 'quickicon', 0, 1, 1, 1, '{"legacy":false,"name":"plg_quickicon_extensionupdate","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"PLG_QUICKICON_EXTENSIONUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(439, 'plg_captcha_recaptcha', 'plugin', 'recaptcha', 'captcha', 0, 1, 1, 0, '{"legacy":false,"name":"plg_captcha_recaptcha","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION","group":""}', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(440, 'plg_system_highlight', 'plugin', 'highlight', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_highlight","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_SYSTEM_HIGHLIGHT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
-(441, 'plg_content_finder', 'plugin', 'finder', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_finder","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(442, 'plg_finder_categories', 'plugin', 'categories', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_categories","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CATEGORIES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(443, 'plg_finder_contacts', 'plugin', 'contacts', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_contacts","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CONTACTS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(444, 'plg_finder_content', 'plugin', 'content', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_content","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CONTENT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(445, 'plg_finder_newsfeeds', 'plugin', 'newsfeeds', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_newsfeeds","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(446, 'plg_finder_weblinks', 'plugin', 'weblinks', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_weblinks","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_WEBLINKS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(447, 'plg_system_finder', 'plugin', 'finder', 'system', 0, 0, 1, 0, '{"legacy":false,"name":"plg_system_finder","type":"plugin","creationDate":"September 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_SYSTEM_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 11, 0),
-(500, 'atomic', 'template', 'atomic', '', 0, 1, 1, 0, '{"legacy":false,"name":"atomic","type":"template","creationDate":"10\\/10\\/09","author":"Ron Severdia","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"con...@kontentdesign.com","authorUrl":"http:\\/\\/www.kontentdesign.com","version":"1.7.0","description":"TPL_ATOMIC_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(502, 'bluestork', 'template', 'bluestork', '', 1, 1, 1, 0, '{"legacy":false,"name":"bluestork","type":"template","creationDate":"07\\/02\\/09","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"TPL_BLUESTORK_XML_DESCRIPTION","group":""}', '{"useRoundedCorners":"1","showSiteName":"0","textBig":"0","highContrast":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(503, 'beez_20', 'template', 'beez_20', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez_20","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.ra...@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.7.0","description":"TPL_BEEZ2_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(504, 'hathor', 'template', 'hathor', '', 1, 1, 1, 0, '{"legacy":false,"name":"hathor","type":"template","creationDate":"May 2010","author":"Andrea Tarr","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"hat...@tarrconsulting.com","authorUrl":"http:\\/\\/www.tarrconsulting.com","version":"1.7.0","description":"TPL_HATHOR_XML_DESCRIPTION","group":""}', '{"showSiteName":"0","colourChoice":"0","boldText":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(505, 'beez5', 'template', 'beez5', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez5","type":"template","creationDate":"21 May 2010","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.ra...@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.7.0","description":"TPL_BEEZ5_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","html5":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(600, 'English (United Kingdom)', 'language', 'en-GB', '', 0, 1, 1, 1, '{"legacy":false,"name":"English (United Kingdom)","type":"language","creationDate":"2008-03-15","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"en-GB site language","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(601, 'English (United Kingdom)', 'language', 'en-GB', '', 1, 1, 1, 1, '{"legacy":false,"name":"English (United Kingdom)","type":"language","creationDate":"2008-03-15","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"en-GB administrator language","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(700, 'files_joomla', 'file', 'joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"files_joomla","type":"file","creationDate":"December 2011","author":"Joomla!","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"FILES_JOOMLA_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(800, 'PKG_JOOMLA', 'package', 'pkg_joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"PKG_JOOMLA","type":"package","creationDate":"2006","author":"Joomla!","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"http:\\/\\/www.joomla.org","version":"1.7.0","description":"PKG_JOOMLA_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_filters`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_filters` (
- `filter_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) NOT NULL,
- `alias` varchar(255) NOT NULL,
- `state` tinyint(1) NOT NULL DEFAULT '1',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL,
- `created_by_alias` varchar(255) NOT NULL,
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `map_count` int(10) unsigned NOT NULL DEFAULT '0',
- `data` text NOT NULL,
- `params` mediumtext,
- PRIMARY KEY (`filter_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links` (
- `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `url` varchar(255) NOT NULL,
- `route` varchar(255) NOT NULL,
- `title` varchar(255) DEFAULT NULL,
- `description` varchar(255) DEFAULT NULL,
- `indexdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `md5sum` varchar(32) DEFAULT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '1',
- `state` int(5) DEFAULT '1',
- `access` int(5) DEFAULT '0',
- `language` varchar(8) NOT NULL,
- `publish_start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `list_price` double unsigned NOT NULL DEFAULT '0',
- `sale_price` double unsigned NOT NULL DEFAULT '0',
- `type_id` int(11) NOT NULL,
- `object` mediumblob NOT NULL,
- PRIMARY KEY (`link_id`),
- KEY `idx_type` (`type_id`),
- KEY `idx_title` (`title`),
- KEY `idx_md5` (`md5sum`),
- KEY `idx_url` (`url`(75)),
- KEY `idx_published_list` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`list_price`),
- KEY `idx_published_sale` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`sale_price`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms0`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms0` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms1`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms1` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms2`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms2` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms3`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms3` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms4`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms4` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms5`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms5` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms6`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms6` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms7`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms7` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms8`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms8` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms9`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms9` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsa`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsa` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsb`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsb` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsc`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsc` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsd`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsd` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termse`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termse` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsf`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsf` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_taxonomy`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_taxonomy` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
- `title` varchar(255) NOT NULL,
- `state` tinyint(1) unsigned NOT NULL DEFAULT '1',
- `access` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `ordering` tinyint(1) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `parent_id` (`parent_id`),
- KEY `state` (`state`),
- KEY `ordering` (`ordering`),
- KEY `access` (`access`),
- KEY `idx_parent_published` (`parent_id`,`state`,`access`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `#__finder_taxonomy`
---
-
-REPLACE INTO `#__finder_taxonomy` (`id`, `parent_id`, `title`, `state`, `access`, `ordering`) VALUES
-(1, 0, 'ROOT', 0, 0, 0);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_taxonomy_map`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_taxonomy_map` (
- `link_id` int(10) unsigned NOT NULL,
- `node_id` int(10) unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`node_id`),
- KEY `link_id` (`link_id`),
- KEY `node_id` (`node_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_terms`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_terms` (
- `term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `weight` float unsigned NOT NULL DEFAULT '0',
- `soundex` varchar(75) NOT NULL,
- `links` int(10) NOT NULL DEFAULT '0',
- PRIMARY KEY (`term_id`),
- UNIQUE KEY `idx_term` (`term`),
- KEY `idx_term_phrase` (`term`,`phrase`),
- KEY `idx_stem_phrase` (`stem`,`phrase`),
- KEY `idx_soundex_phrase` (`soundex`,`phrase`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_terms_common`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_terms_common` (
- `term` varchar(75) NOT NULL,
- `language` varchar(3) NOT NULL,
- KEY `idx_word_lang` (`term`,`language`),
- KEY `idx_lang` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__finder_terms_common`
---
-
-REPLACE INTO `#__finder_terms_common` (`term`, `language`) VALUES
-('a', 'en'),
-('a', 'en'),
-('about', 'en'),
-('about', 'en'),
-('after', 'en'),
-('after', 'en'),
-('ago', 'en'),
-('ago', 'en'),
-('all', 'en'),
-('all', 'en'),
-('am', 'en'),
-('am', 'en'),
-('an', 'en'),
-('an', 'en'),
-('and', 'en'),
-('and', 'en'),
-('ani', 'en'),
-('ani', 'en'),
-('any', 'en'),
-('any', 'en'),
-('are', 'en'),
-('are', 'en'),
-('aren''t', 'en'),
-('aren''t', 'en'),
-('as', 'en'),
-('as', 'en'),
-('at', 'en'),
-('at', 'en'),
-('be', 'en'),
-('be', 'en'),
-('but', 'en'),
-('but', 'en'),
-('by', 'en'),
-('by', 'en'),
-('for', 'en'),
-('for', 'en'),
-('from', 'en'),
-('from', 'en'),
-('get', 'en'),
-('get', 'en'),
-('go', 'en'),
-('go', 'en'),
-('how', 'en'),
-('how', 'en'),
-('if', 'en'),
-('if', 'en'),
-('in', 'en'),
-('in', 'en'),
-('into', 'en'),
-('into', 'en'),
-('is', 'en'),
-('is', 'en'),
-('isn''t', 'en'),
-('isn''t', 'en'),
-('it', 'en'),
-('it', 'en'),
-('its', 'en'),
-('its', 'en'),
-('me', 'en'),
-('me', 'en'),
-('more', 'en'),
-('more', 'en'),
-('most', 'en'),
-('most', 'en'),
-('must', 'en'),
-('must', 'en'),
-('my', 'en'),
-('my', 'en'),
-('new', 'en'),
-('new', 'en'),
-('no', 'en'),
-('no', 'en'),
-('none', 'en'),
-('none', 'en'),
-('not', 'en'),
-('not', 'en'),
-('noth', 'en'),
-('noth', 'en'),
-('nothing', 'en'),
-('nothing', 'en'),
-('of', 'en'),
-('of', 'en'),
-('off', 'en'),
-('off', 'en'),
-('often', 'en'),
-('often', 'en'),
-('old', 'en'),
-('old', 'en'),
-('on', 'en'),
-('on', 'en'),
-('onc', 'en'),
-('onc', 'en'),
-('once', 'en'),
-('once', 'en'),
-('onli', 'en'),
-('onli', 'en'),
-('only', 'en'),
-('only', 'en'),
-('or', 'en'),
-('or', 'en'),
-('other', 'en'),
-('other', 'en'),
-('our', 'en'),
-('our', 'en'),
-('ours', 'en'),
-('ours', 'en'),
-('out', 'en'),
-('out', 'en'),
-('over', 'en'),
-('over', 'en'),
-('page', 'en'),
-('page', 'en'),
-('she', 'en'),
-('she', 'en'),
-('should', 'en'),
-('should', 'en'),
-('small', 'en'),
-('small', 'en'),
-('so', 'en'),
-('so', 'en'),
-('some', 'en'),
-('some', 'en'),
-('than', 'en'),
-('than', 'en'),
-('thank', 'en'),
-('thank', 'en'),
-('that', 'en'),
-('that', 'en'),
-('the', 'en'),
-('the', 'en'),
-('their', 'en'),
-('their', 'en'),
-('theirs', 'en'),
-('theirs', 'en'),
-('them', 'en'),
-('them', 'en'),
-('then', 'en'),
-('then', 'en'),
-('there', 'en'),
-('there', 'en'),
-('these', 'en'),
-('these', 'en'),
-('they', 'en'),
-('they', 'en'),
-('this', 'en'),
-('this', 'en'),
-('those', 'en'),
-('those', 'en'),
-('thus', 'en'),
-('thus', 'en'),
-('time', 'en'),
-('time', 'en'),
-('times', 'en'),
-('times', 'en'),
-('to', 'en'),
-('to', 'en'),
-('too', 'en'),
-('too', 'en'),
-('true', 'en'),
-('true', 'en'),
-('under', 'en'),
-('under', 'en'),
-('until', 'en'),
-('until', 'en'),
-('up', 'en'),
-('up', 'en'),
-('upon', 'en'),
-('upon', 'en'),
-('use', 'en'),
-('use', 'en'),
-('user', 'en'),
-('user', 'en'),
-('users', 'en'),
-('users', 'en'),
-('veri', 'en'),
-('veri', 'en'),
-('version', 'en'),
-('version', 'en'),
-('very', 'en'),
-('very', 'en'),
-('via', 'en'),
-('via', 'en'),
-('want', 'en'),
-('want', 'en'),
-('was', 'en'),
-('was', 'en'),
-('way', 'en'),
-('way', 'en'),
-('were', 'en'),
-('were', 'en'),
-('what', 'en'),
-('what', 'en'),
-('when', 'en'),
-('when', 'en'),
-('where', 'en'),
-('where', 'en'),
-('whi', 'en'),
-('whi', 'en'),
-('which', 'en'),
-('which', 'en'),
-('who', 'en'),
-('who', 'en'),
-('whom', 'en'),
-('whom', 'en'),
-('whose', 'en'),
-('whose', 'en'),
-('why', 'en'),
-('why', 'en'),
-('wide', 'en'),
-('wide', 'en'),
-('will', 'en'),
-('will', 'en'),
-('with', 'en'),
-('with', 'en'),
-('within', 'en'),
-('within', 'en'),
-('without', 'en'),
-('without', 'en'),
-('would', 'en'),
-('would', 'en'),
-('yes', 'en'),
-('yes', 'en'),
-('yet', 'en'),
-('yet', 'en'),
-('you', 'en'),
-('you', 'en'),
-('your', 'en'),
-('your', 'en'),
-('yours', 'en'),
-('yours', 'en');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_tokens`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_tokens` (
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `weight` float unsigned NOT NULL DEFAULT '1',
- `context` tinyint(1) unsigned NOT NULL DEFAULT '2',
- KEY `idx_word` (`term`),
- KEY `idx_context` (`context`)
-) ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_tokens_aggregate`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_tokens_aggregate` (
- `term_id` int(10) unsigned NOT NULL,
- `map_suffix` char(1) NOT NULL,
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `term_weight` float unsigned NOT NULL,
- `context` tinyint(1) unsigned NOT NULL DEFAULT '2',
- `context_weight` float unsigned NOT NULL,
- `total_weight` float unsigned NOT NULL,
- KEY `token` (`term`),
- KEY `keyword_id` (`term_id`)
-) ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_types`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_types` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(100) NOT NULL,
- `mime` varchar(100) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `title` (`title`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__languages`
---
-
-CREATE TABLE IF NOT EXISTS `#__languages` (
- `lang_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `lang_code` char(7) NOT NULL,
- `title` varchar(50) NOT NULL,
- `title_native` varchar(50) NOT NULL,
- `sef` varchar(50) NOT NULL,
- `image` varchar(50) NOT NULL,
- `description` varchar(512) NOT NULL,
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `sitename` varchar(1024) NOT NULL DEFAULT '',
- `published` int(11) NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`lang_id`),
- UNIQUE KEY `idx_sef` (`sef`),
- UNIQUE KEY `idx_image` (`image`),
- UNIQUE KEY `idx_langcode` (`lang_code`),
- KEY `idx_ordering` (`ordering`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `#__languages`
---
-
-REPLACE INTO `#__languages` (`lang_id`, `lang_code`, `title`, `title_native`, `sef`, `image`, `description`, `metakey`, `metadesc`, `sitename`, `published`, `ordering`) VALUES
-(1, 'en-GB', 'English (UK)', 'English (UK)', 'en', 'en', '', '', '', '', 1, 1);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__menu`
---
-
-CREATE TABLE IF NOT EXISTS `#__menu` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `menutype` varchar(24) NOT NULL COMMENT 'The type of menu this item belongs to. FK to #___menu_types.menutype',
- `title` varchar(255) NOT NULL COMMENT 'The display title of the menu item.',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The SEF alias of the menu item.',
- `note` varchar(255) NOT NULL DEFAULT '',
- `path` varchar(1024) NOT NULL COMMENT 'The computed path of the menu item based on the alias field.',
- `link` varchar(1024) NOT NULL COMMENT 'The actually link the menu item refers to.',
- `type` varchar(16) NOT NULL COMMENT 'The type of link: Component, URL, Alias, Separator',
- `published` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The published state of the menu link.',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'The parent menu item in the menu tree.',
- `level` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The relative level in the tree.',
- `component_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #___extensions.id',
- `ordering` int(11) NOT NULL DEFAULT '0' COMMENT 'The relative ordering of the menu item in the tree.',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #___users.id',
- `checked_out_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The time the menu item was checked out.',
- `browserNav` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The click behaviour of the link.',
- `access` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The access level required to view the menu item.',
- `img` varchar(255) NOT NULL COMMENT 'The image of the menu item.',
- `template_style_id` int(10) unsigned NOT NULL DEFAULT '0',
- `params` text NOT NULL COMMENT 'JSON encoded data for the menu item.',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `home` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Indicates if this menu item is the home or default page.',
- `language` char(7) NOT NULL DEFAULT '',
- `client_id` tinyint(4) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`,`language`),
- KEY `idx_componentid` (`component_id`,`menutype`,`published`,`access`),
- KEY `idx_menutype` (`menutype`),
- KEY `idx_left_right` (`lft`,`rgt`),
- KEY `idx_alias` (`alias`),
- KEY `idx_path` (`path`(255)),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=111 ;
-
---
-- Dumping data for table `#__menu`
--
+TRUNCATE `#__menu`;

-REPLACE INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
+INSERT IGNORE INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
(1, '', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, 0, 0, '0000-00-00 00:00:00', 0, 0, '', 0, '', 0, 61, 0, '*', 0),
(2, 'menu', 'com_banners', 'Banners', '', 'Banners', 'index.php?option=com_banners', 'component', 0, 1, 1, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 15, 24, 0, '*', 1),
(3, 'menu', 'com_banners', 'Banners', '', 'Banners/Banners', 'index.php?option=com_banners', 'component', 0, 2, 2, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 16, 17, 0, '*', 1),
@@ -1321,6 +107,7 @@
(19, 'menu', 'com_weblinks_links', 'Links', '', 'Weblinks/Links', 'index.php?option=com_weblinks', 'component', 0, 18, 2, 21, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks', 0, '', 48, 49, 0, '*', 1),
(20, 'menu', 'com_weblinks_categories', 'Categories', '', 'Weblinks/Categories', 'index.php?option=com_categories&extension=com_weblinks', 'component', 0, 18, 2, 6, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks-cat', 0, '', 50, 51, 0, '*', 1),
(21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 43, 44, 0, '*', 1),
+(22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1),
(101, 'mainmenu', 'Home', 'home', '', 'home', 'index.php?option=com_content&view=category&layout=blog&id=9', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"layout_type":"blog","show_category_title":"","show_description":"","show_description_image":"","maxLevel":"","show_empty_categories":"","show_no_articles":"","show_subcat_desc":"","show_cat_num_articles":"","page_subheading":"","num_leading_articles":"4","num_intro_articles":"0","num_columns":"0","num_links":"4","multi_column_order":"1","show_subcategory_content":"","orderby_pri":"","orderby_sec":"front","order_date":"","show_pagination":"2","show_pagination_results":"1","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_readmore":"","show_readmore_title":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","show_feed_link":"1","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":1,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 55, 56, 1, '*', 0),
(102, 'bottommenu', 'Author Login', 'login', '', 'login', 'index.php?option=com_users&view=login', 'component', 1, 1, 1, 25, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"login_redirect_url":"index.php?Itemid=101","logindescription_show":"1","login_description":"","login_image":"","logout_redirect_url":"","logoutdescription_show":"1","logout_description":"","logout_image":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 59, 60, 0, '*', 0),
(103, 'authormenu', 'Change Password', 'change-password', '', 'change-password', 'index.php?option=com_users&view=profile&layout=edit', 'component', 1, 1, 1, 25, 0, 0, '0000-00-00 00:00:00', 0, 2, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 1, 2, 0, '*', 0),
@@ -1332,22 +119,7 @@
(109, 'authormenu', 'Working on Your Site', 'working-on-your-site', '', 'working-on-your-site', 'index.php?option=com_content&view=article&id=2', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 9, 10, 0, '*', 0),
(110, 'authormenu', 'Edit Blog Roll', 'edit-blog-roll', '', 'edit-blog-roll', 'index.php?option=com_weblinks&view=category&id=8', 'component', 1, 1, 1, 21, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_category_title":"","show_description":"","show_description_image":"","maxLevel":"","show_empty_categories":"","show_subcat_desc":"","show_cat_num_links":"","show_pagination_limit":"","show_headings":"","show_link_description":"","show_link_hits":"","show_pagination":"","show_pagination_results":"","show_feed_link":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 7, 8, 0, '*', 0);

--- --------------------------------------------------------
-
--
--- Table structure for table `#__menu_types`
---
-
-CREATE TABLE IF NOT EXISTS `#__menu_types` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `menutype` varchar(24) NOT NULL,
- `title` varchar(48) NOT NULL,
- `description` varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_menutype` (`menutype`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-
---
-- Dumping data for table `#__menu_types`
--

@@ -1356,70 +128,7 @@
(2, 'authormenu', 'Author Menu', ''),
(3, 'bottommenu', 'Bottom Menu', '');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__messages`
---
-
-CREATE TABLE IF NOT EXISTS `#__messages` (
- `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id_from` int(10) unsigned NOT NULL DEFAULT '0',
- `user_id_to` int(10) unsigned NOT NULL DEFAULT '0',
- `folder_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `date_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `state` tinyint(1) NOT NULL DEFAULT '0',
- `priority` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `subject` varchar(255) NOT NULL DEFAULT '',
- `message` text NOT NULL,
- PRIMARY KEY (`message_id`),
- KEY `useridto_state` (`user_id_to`,`state`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__messages_cfg`
---
-
-CREATE TABLE IF NOT EXISTS `#__messages_cfg` (
- `user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `cfg_name` varchar(100) NOT NULL DEFAULT '',
- `cfg_value` varchar(255) NOT NULL DEFAULT '',
- UNIQUE KEY `idx_user_var_name` (`user_id`,`cfg_name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__modules`
---
-
-CREATE TABLE IF NOT EXISTS `#__modules` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `title` varchar(100) NOT NULL DEFAULT '',
- `note` varchar(255) NOT NULL DEFAULT '',
- `content` text NOT NULL,
- `ordering` int(11) NOT NULL DEFAULT '0',
- `position` varchar(50) NOT NULL DEFAULT '',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `module` varchar(50) DEFAULT NULL,
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `showtitle` tinyint(3) unsigned NOT NULL DEFAULT '1',
- `params` text NOT NULL,
- `client_id` tinyint(4) NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `published` (`published`,`access`),
- KEY `newsfeeds` (`module`,`published`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=89 ;
-
---
-- Dumping data for table `#__modules`
--

@@ -1448,19 +157,7 @@
(87, 'Search', '', '', 1, 'position-0', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_search', 1, 1, '{"label":"","width":"20","text":"","button":"","button_pos":"right","imagebutton":"","button_text":"","opensearch":"1","opensearch_title":"","set_itemid":"","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"itemid"}', 0, '*'),
(88, 'Header', '', '', 1, 'position-1', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_custom', 1, 0, '{"prepare_content":"1","backgroundimage":"","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"static"}', 0, '*');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__modules_menu`
---
-
-CREATE TABLE IF NOT EXISTS `#__modules_menu` (
- `moduleid` int(11) NOT NULL DEFAULT '0',
- `menuid` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`moduleid`,`menuid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
-- Dumping data for table `#__modules_menu`
--

@@ -1491,461 +188,19 @@
(87, 0),
(88, 0);

--- --------------------------------------------------------
-
--
--- Table structure for table `#__newsfeeds`
---
-
-CREATE TABLE IF NOT EXISTS `#__newsfeeds` (
- `catid` int(11) NOT NULL DEFAULT '0',
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `link` varchar(200) NOT NULL DEFAULT '',
- `filename` varchar(200) DEFAULT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `numarticles` int(10) unsigned NOT NULL DEFAULT '1',
- `cache_time` int(10) unsigned NOT NULL DEFAULT '3600',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `rtl` tinyint(4) NOT NULL DEFAULT '0',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`published`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__overrider`
---
-
-CREATE TABLE IF NOT EXISTS `#__overrider` (
- `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `constant` varchar(255) NOT NULL,
- `string` text NOT NULL,
- `file` varchar(255) NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__redirect_links`
---
-
-CREATE TABLE IF NOT EXISTS `#__redirect_links` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `old_url` varchar(255) NOT NULL,
- `new_url` varchar(255) NOT NULL,
- `referer` varchar(150) NOT NULL,
- `comment` varchar(255) NOT NULL,
- `published` tinyint(4) NOT NULL,
- `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_link_old` (`old_url`),
- KEY `idx_link_modifed` (`modified_date`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-
---
-- Dumping data for table `#__redirect_links`
--

-REPLACE INTO `#__redirect_links` (`id`, `old_url`, `new_url`, `referer`, `comment`, `published`, `created_date`, `modified_date`) VALUES
+INSERT IGNORE INTO `#__redirect_links` (`id`, `old_url`, `new_url`, `referer`, `comment`, `published`, `created_date`, `modified_date`) VALUES
(1, 'http://localhost/trunk123111/index.php/create-a-post/login', '', 'http://localhost/trunk123111/index.php/login', '', 0, '2012-01-04 15:48:49', '0000-00-00 00:00:00'),
(2, 'http://localhost/trunk123111/index.php/create-an-article', '', 'http://localhost/trunk123111/index.php/creating-your-site', '', 0, '2012-01-05 02:01:07', '0000-00-00 00:00:00'),
(3, 'http://localhost/joomla-cms/index.php/using-joomla', '', 'http://localhost/joomla-cms/', '', 0, '2012-01-17 06:21:35', '0000-00-00 00:00:00');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__schemas`
---
-
-CREATE TABLE IF NOT EXISTS `#__schemas` (
- `extension_id` int(11) NOT NULL,
- `version_id` varchar(20) NOT NULL,
- PRIMARY KEY (`extension_id`,`version_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__schemas`
---
-
-REPLACE INTO `#__schemas` (`extension_id`, `version_id`) VALUES
-(700, '2.5.0-2011-12-27'),
-(700, '2.5.0-2012-01-14');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__session`
---
-
-CREATE TABLE IF NOT EXISTS `#__session` (
- `session_id` varchar(200) NOT NULL DEFAULT '',
- `client_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `guest` tinyint(4) unsigned DEFAULT '1',
- `time` varchar(14) DEFAULT '',
- `data` mediumtext,
- `userid` int(11) DEFAULT '0',
- `username` varchar(150) DEFAULT '',
- `usertype` varchar(50) DEFAULT '',
- PRIMARY KEY (`session_id`),
- KEY `whosonline` (`guest`,`usertype`),
- KEY `userid` (`userid`),
- KEY `time` (`time`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__session`
---
-
-REPLACE INTO `#__session` (`session_id`, `client_id`, `guest`, `time`, `data`, `userid`, `username`, `usertype`) VALUES
-('t8ptu9b35thpkrft5crb8ssea2', 0, 0, '1326805166', '__default|a:9:{s:15:"session.counter";i:8;s:19:"session.timer.start";i:1326804893;s:18:"session.timer.last";i:1326805095;s:17:"session.timer.now";i:1326805165;s:22:"session.client.browser";s:101:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";s:8:"registry";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":1:{s:5:"users";O:8:"stdClass":1:{s:5:"login";O:8:"stdClass":1:{s:4:"form";O:8:"stdClass":2:{s:4:"data";a:0:{}s:6:"return";s:20:"index.php?Itemid=101";}}}}}s:4:"user";O:5:"JUser":23:{s:9:"\0*\0isRoot";b:1;s:2:"id";s:2:"42";s:4:"name";s:10:"Super User";s:8:"username";s:5:"admin";s:5:"email";s:14:"ad...@fake.com";s:8:"password";s:65:"dda41476e1c43ddd832e1b9afc3d85ea:UXOJIAMTh3meI7iICS6DoCWCe9QOj3zL";s:14:"password_clear";s:0:"";s:8:"usertype";s:10:"deprecated";s:5:"block";s:1:"0";s:9:"sendEmail";s:1:"1";s:12:"registerDate";s:19:"2012-01-17 06:21:22";s:13:"lastvisitDate";s:19:"2012-01-17 12:06:14";s:10:"activation";s:1:"0";s:6:"params";s:0:"";s:6:"groups";a:1:{i:8;s:1:"8";}s:5:"guest";i:0;s:10:"\0*\0_params";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":0:{}}s:14:"\0*\0_authGroups";a:2:{i:0;i:1;i:1;i:8;}s:14:"\0*\0_authLevels";a:4:{i:0;i:1;i:1;i:1;i:2;i:2;i:3;i:3;}s:15:"\0*\0_authActions";N;s:12:"\0*\0_errorMsg";N;s:10:"\0*\0_errors";a:0:{}s:3:"aid";i:0;}s:13:"session.token";s:32:"2bb9ce8553ba94e056ddebe737a07442";s:16:"com_mailto.links";a:4:{s:40:"053719df8b8aa0d3baddf6fdf1ec7250b4a13d9e";O:8:"stdClass":2:{s:4:"link";s:60:"http://localhost/joomla-cms/index.php/3-welcome-to-your-blog";s:6:"expiry";i:1326804911;}s:40:"79c1ab4c4d9435d020344c88ad774d2c06191439";O:8:"stdClass":2:{s:4:"link";s:60:"http://localhost/joomla-cms/index.php/4-about-your-home-page";s:6:"expiry";i:1326804911;}s:40:"b7678125768750623235602ae216cbe44e62ad01";O:8:"stdClass":2:{s:4:"link";s:52:"http://localhost/joomla-cms/index.php/5-your-modules";s:6:"expiry";i:1326804911;}s:40:"faff260ed0a5713401d6b4cfba18037aee9cdfbf";O:8:"st!
dClass":
2:{s:4:"link";s:58:"http://localhost/joomla-cms/index.php/working-on-your-site";s:6:"expiry";i:1326805165;}}}', 42, 'admin', ''),
-('ufq2f2u61nbm1782uufa0t3o31', 1, 0, '1326805336', '__default|a:8:{s:15:"session.counter";i:280;s:19:"session.timer.start";i:1326781285;s:18:"session.timer.last";i:1326805161;s:17:"session.timer.now";i:1326805334;s:22:"session.client.browser";s:101:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";s:8:"registry";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":8:{s:11:"application";O:8:"stdClass":1:{s:4:"lang";s:0:"";}s:13:"com_installer";O:8:"stdClass":2:{s:7:"message";s:0:"";s:17:"extension_message";s:0:"";}s:13:"com_languages";O:8:"stdClass":1:{s:9:"installed";O:8:"stdClass":1:{s:8:"ordercol";s:6:"a.name";}}s:13:"com_templates";O:8:"stdClass":2:{s:6:"styles";O:8:"stdClass":1:{s:10:"limitstart";i:0;}s:4:"edit";O:8:"stdClass":1:{s:5:"style";O:8:"stdClass":2:{s:2:"id";a:0:{}s:4:"data";N;}}}s:11:"com_modules";O:8:"stdClass":4:{s:7:"modules";O:8:"stdClass":4:{s:6:"filter";O:8:"stdClass":8:{s:18:"client_id_previous";i:0;s:6:"search";s:0:"";s:6:"access";i:0;s:5:"state";s:0:"";s:8:"position";s:0:"";s:6:"module";s:0:"";s:9:"client_id";i:0;s:8:"language";s:0:"";}s:10:"limitstart";s:1:"0";s:8:"ordercol";s:8:"ordering";s:9:"orderdirn";s:3:"asc";}s:4:"edit";O:8:"stdClass":1:{s:6:"module";O:8:"stdClass":2:{s:2:"id";a:0:{}s:4:"data";N;}}s:3:"add";O:8:"stdClass":1:{s:6:"module";O:8:"stdClass":2:{s:12:"extension_id";N;s:6:"params";N;}}s:9:"positions";O:8:"stdClass":4:{s:6:"filter";O:8:"stdClass":4:{s:6:"search";s:0:"";s:5:"state";s:0:"";s:8:"template";s:0:"";s:4:"type";s:0:"";}s:10:"limitstart";s:2:"20";s:8:"ordercol";s:5:"value";s:9:"orderdirn";s:3:"asc";}}s:6:"global";O:8:"stdClass":1:{s:4:"list";O:8:"stdClass":1:{s:5:"limit";s:2:"20";}}s:9:"com_menus";O:8:"stdClass":2:{s:5:"items";O:8:"stdClass":6:{s:6:"filter";O:8:"stdClass":4:{s:8:"menutype";s:8:"mainmenu";s:6:"access";i:0;s:5:"level";i:0;s:8:"language";s:0:"";}s:10:"limitstart";i:0;s:6:"search";s:0:"";s:9:"published";s:0:"";s:8:"ordercol";s:5:"a.lft";s:9:"orderdirn";s:3:"asc";}s:4:"edit";O:8:"stdClass":1:{s!
:4:"item
";O:8:"stdClass":4:{s:2:"id";a:0:{}s:4:"data";N;s:4:"type";N;s:4:"link";N;}}}s:11:"com_content";O:8:"stdClass":1:{s:4:"edit";O:8:"stdClass":1:{s:7:"article";O:8:"stdClass":2:{s:2:"id";a:1:{i:0;i:2;}s:4:"data";N;}}}}}s:4:"user";O:5:"JUser":23:{s:9:"\0*\0isRoot";b:1;s:2:"id";s:2:"42";s:4:"name";s:10:"Super User";s:8:"username";s:5:"admin";s:5:"email";s:14:"ad...@fake.com";s:8:"password";s:65:"dda41476e1c43ddd832e1b9afc3d85ea:UXOJIAMTh3meI7iICS6DoCWCe9QOj3zL";s:14:"password_clear";s:0:"";s:8:"usertype";s:10:"deprecated";s:5:"block";s:1:"0";s:9:"sendEmail";s:1:"1";s:12:"registerDate";s:19:"2012-01-17 06:21:22";s:13:"lastvisitDate";s:19:"0000-00-00 00:00:00";s:10:"activation";s:1:"0";s:6:"params";s:0:"";s:6:"groups";a:1:{i:8;s:1:"8";}s:5:"guest";i:0;s:10:"\0*\0_params";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":0:{}}s:14:"\0*\0_authGroups";a:2:{i:0;i:1;i:1;i:8;}s:14:"\0*\0_authLevels";a:4:{i:0;i:1;i:1;i:1;i:2;i:2;i:3;i:3;}s:15:"\0*\0_authActions";N;s:12:"\0*\0_errorMsg";N;s:10:"\0*\0_errors";a:0:{}s:3:"aid";i:0;}s:13:"session.token";s:32:"f0e71b2dff6e77342ec7b405d418282b";}', 42, 'admin', '');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__template_styles`
---
-
-CREATE TABLE IF NOT EXISTS `#__template_styles` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `template` varchar(50) NOT NULL DEFAULT '',
- `client_id` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `home` char(7) NOT NULL DEFAULT '0',
- `title` varchar(255) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- PRIMARY KEY (`id`),
- KEY `idx_template` (`template`),
- KEY `idx_home` (`home`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
-
---
--- Dumping data for table `#__template_styles`
---
-
-REPLACE INTO `#__template_styles` (`id`, `template`, `client_id`, `home`, `title`, `params`) VALUES
-(2, 'bluestork', 1, '1', 'Bluestork - Default', '{"useRoundedCorners":"1","showSiteName":"0"}'),
-(3, 'atomic', 0, '0', 'Atomic - Default', '{"navcolor":"#362620"}'),
-(4, 'beez_20', 0, '1', 'Beez2 - Default', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"","sitetitle":"Your Site Title","sitedescription":"A tag line or description","navposition":"center","templatecolor":"nature"}'),
-(5, 'hathor', 1, '0', 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'),
-(6, 'beez5', 0, '0', 'Beez5 - Default', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"images\\/sampledata\\/fruitshop\\/fruits.gif","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","html5":0}');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__updates`
---
-
-CREATE TABLE IF NOT EXISTS `#__updates` (
- `update_id` int(11) NOT NULL AUTO_INCREMENT,
- `update_site_id` int(11) DEFAULT '0',
- `extension_id` int(11) DEFAULT '0',
- `categoryid` int(11) DEFAULT '0',
- `name` varchar(100) DEFAULT '',
- `description` text NOT NULL,
- `element` varchar(100) DEFAULT '',
- `type` varchar(20) DEFAULT '',
- `folder` varchar(20) DEFAULT '',
- `client_id` tinyint(3) DEFAULT '0',
- `version` varchar(10) DEFAULT '',
- `data` text NOT NULL,
- `detailsurl` text NOT NULL,
- `infourl` text NOT NULL,
- PRIMARY KEY (`update_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates' AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_categories`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_categories` (
- `categoryid` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(20) DEFAULT '',
- `description` text NOT NULL,
- `parent` int(11) DEFAULT '0',
- `updatesite` int(11) DEFAULT '0',
- PRIMARY KEY (`categoryid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Update Categories' AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_sites`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_sites` (
- `update_site_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) DEFAULT '',
- `type` varchar(20) DEFAULT '',
- `location` text NOT NULL,
- `enabled` int(11) DEFAULT '0',
- `last_check_timestamp` bigint(20) DEFAULT '0',
- PRIMARY KEY (`update_site_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Update Sites' AUTO_INCREMENT=3 ;
-
---
--- Dumping data for table `#__update_sites`
---
-
-REPLACE INTO `#__update_sites` (`update_site_id`, `name`, `type`, `location`, `enabled`, `last_check_timestamp`) VALUES
-(1, 'Joomla Core', 'collection', 'http://update.joomla.org/core/list.xml', 1, 1326803144),
-(2, 'Joomla Extension Directory', 'collection', 'http://update.joomla.org/jed/list.xml', 1, 1326803144);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_sites_extensions`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_sites_extensions` (
- `update_site_id` int(11) NOT NULL DEFAULT '0',
- `extension_id` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`update_site_id`,`extension_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Links extensions to update sites';
-
---
--- Dumping data for table `#__update_sites_extensions`
---
-
-REPLACE INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
-(1, 700),
-(2, 700);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__usergroups`
---
-
-CREATE TABLE IF NOT EXISTS `#__usergroups` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Adjacency List Reference Id',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `title` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_usergroup_parent_title_lookup` (`parent_id`,`title`),
- KEY `idx_usergroup_title_lookup` (`title`),
- KEY `idx_usergroup_adjacency_lookup` (`parent_id`),
- KEY `idx_usergroup_nested_set_lookup` (`lft`,`rgt`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
-
---
--- Dumping data for table `#__usergroups`
---
-
-REPLACE INTO `#__usergroups` (`id`, `parent_id`, `lft`, `rgt`, `title`) VALUES
-(1, 0, 1, 20, 'Public'),
-(2, 1, 6, 17, 'Registered'),
-(3, 2, 7, 14, 'Author'),
-(4, 3, 8, 11, 'Editor'),
-(5, 4, 9, 10, 'Publisher'),
-(6, 1, 2, 5, 'Manager'),
-(7, 6, 3, 4, 'Administrator'),
-(8, 1, 18, 19, 'Super Users');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__users`
---
-
-CREATE TABLE IF NOT EXISTS `#__users` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `username` varchar(150) NOT NULL DEFAULT '',
- `email` varchar(100) NOT NULL DEFAULT '',
- `password` varchar(100) NOT NULL DEFAULT '',
- `usertype` varchar(25) NOT NULL DEFAULT '',
- `block` tinyint(4) NOT NULL DEFAULT '0',
- `sendEmail` tinyint(4) DEFAULT '0',
- `registerDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `lastvisitDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `activation` varchar(100) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- PRIMARY KEY (`id`),
- KEY `usertype` (`usertype`),
- KEY `idx_name` (`name`),
- KEY `idx_block` (`block`),
- KEY `username` (`username`),
- KEY `email` (`email`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ;
-
---
--- Dumping data for table `#__users`
---
-
-REPLACE INTO `#__users` (`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`, `registerDate`, `lastvisitDate`, `activation`, `params`) VALUES
-(42, 'Super User', 'admin', 'ad...@fake.com', 'dda41476e1c43ddd832e1b9afc3d85ea:UXOJIAMTh3meI7iICS6DoCWCe9QOj3zL', 'deprecated', 0, 1, '2012-01-17 06:21:22', '2012-01-17 12:55:10', '0', '');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_notes`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_notes` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `subject` varchar(100) NOT NULL DEFAULT '',
- `body` text NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_user_id` int(10) unsigned NOT NULL,
- `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `review_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_user_id` (`user_id`),
- KEY `idx_category_id` (`catid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_profiles`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_profiles` (
- `user_id` int(11) NOT NULL,
- `profile_key` varchar(100) NOT NULL,
- `profile_value` varchar(255) NOT NULL,
- `ordering` int(11) NOT NULL DEFAULT '0',
- UNIQUE KEY `idx_user_id_profile_key` (`user_id`,`profile_key`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Simple user profile storage table';
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_usergroup_map`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_usergroup_map` (
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #___users.id',
- `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #___usergroups.id',
- PRIMARY KEY (`user_id`,`group_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__user_usergroup_map`
---
-
-REPLACE INTO `#__user_usergroup_map` (`user_id`, `group_id`) VALUES
-(42, 8);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__viewlevels`
---
-
-CREATE TABLE IF NOT EXISTS `#__viewlevels` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `title` varchar(100) NOT NULL DEFAULT '',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_assetgroup_title_lookup` (`title`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-
---
--- Dumping data for table `#__viewlevels`
---
-
-REPLACE INTO `#__viewlevels` (`id`, `title`, `ordering`, `rules`) VALUES
-(1, 'Public', 0, '[1]'),
-(2, 'Registered', 1, '[6,2,8]'),
-(3, 'Special', 2, '[6,3,8]');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__weblinks`
---
-
-CREATE TABLE IF NOT EXISTS `#__weblinks` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `catid` int(11) NOT NULL DEFAULT '0',
- `sid` int(11) NOT NULL DEFAULT '0',
- `title` varchar(250) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `url` varchar(250) NOT NULL DEFAULT '',
- `description` text NOT NULL,
- `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `hits` int(11) NOT NULL DEFAULT '0',
- `state` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(11) NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `archived` tinyint(1) NOT NULL DEFAULT '0',
- `approved` tinyint(1) NOT NULL DEFAULT '1',
- `access` int(11) NOT NULL DEFAULT '1',
- `params` text NOT NULL,
- `language` char(7) NOT NULL DEFAULT '',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if link is featured.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`state`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
-
---
-- Dumping data for table `#__weblinks`
--

-REPLACE INTO `#__weblinks` (`id`, `catid`, `sid`, `title`, `alias`, `url`, `description`, `date`, `hits`, `state`, `checked_out`, `checked_out_time`, `ordering`, `archived`, `approved`, `access`, `params`, `language`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `metakey`, `metadesc`, `metadata`, `featured`, `xreference`, `publish_up`, `publish_down`) VALUES
+INSERT IGNORE INTO `#__weblinks` (`id`, `catid`, `sid`, `title`, `alias`, `url`, `description`, `date`, `hits`, `state`, `checked_out`, `checked_out_time`, `ordering`, `archived`, `approved`, `access`, `params`, `language`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `metakey`, `metadesc`, `metadata`, `featured`, `xreference`, `publish_up`, `publish_down`) VALUES
(1, 8, 0, 'Joomla! Community', 'joomla-community', 'http://community.joomla.org/blogs/community.html', '', '0000-00-00 00:00:00', 0, 1, 0, '0000-00-00 00:00:00', 1, 0, 1, 1, '{"target":"","width":"","height":"","count_clicks":""}', '*', '2012-01-04 15:04:03', 42, '', '2012-01-04 16:17:27', 42, '', '', '', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, 8, 0, 'Joomla! Leadership Blog', 'joomla-leadership-blog', 'http://community.joomla.org/blogs/leadership.html', '', '0000-00-00 00:00:00', 0, 1, 0, '0000-00-00 00:00:00', 2, 0, 1, 1, '{"target":"","width":"","height":"","count_clicks":""}', '*', '2012-01-04 15:04:48', 42, '', '2012-01-04 16:17:27', 42, '', '', '', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Modified: development/trunk/installation/sql/mysql/sample_brochure.sql
===================================================================
--- development/trunk/installation/sql/mysql/sample_brochure.sql 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/installation/sql/mysql/sample_brochure.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -1,43 +1,17 @@
#
# IMPORTANT - THIS FILE MUST BE SAVED WITH UTF-8 ENCODING ONLY. BEWARE IF EDITING!
#
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-
--
-- Database: `sample_brochure`
--

--- --------------------------------------------------------
-
+TRUNCATE `#__assets`;
--
--- Table structure for table `#__assets`
---
-
-CREATE TABLE IF NOT EXISTS `#__assets` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `level` int(10) unsigned NOT NULL COMMENT 'The cached level in the nested tree.',
- `name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n',
- `title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.',
- `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_asset_name` (`name`),
- KEY `idx_lft_rgt` (`lft`,`rgt`),
- KEY `idx_parent_id` (`parent_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;
-
---
-- Dumping data for table `#__assets`
--

-REPLACE INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
-(1, 0, 1, 79, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
+INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
+(1, 0, 1, 81, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.login.offline":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
(2, 1, 1, 2, 1, 'com_admin', 'com_admin', '{}'),
(3, 1, 3, 6, 1, 'com_banners', 'com_banners', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(4, 1, 7, 8, 1, 'com_cache', 'com_cache', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
@@ -76,158 +50,16 @@
(37, 36, 27, 28, 3, 'com_content.article.3', 'Article 1 Title', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(38, 36, 29, 30, 3, 'com_content.article.4', 'Article 2 Title', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(39, 36, 31, 32, 3, 'com_content.article.5', 'Article 3 Title ', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(40, 27, 23, 24, 3, 'com_content.article.6', 'Creating Your Site', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}');
+(40, 27, 23, 24, 3, 'com_content.article.6', 'Creating Your Site', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(41, 1, 79, 80, 1, 'com_joomlaupdate', 'com_joomlaupdate', '{"core.admin":[],"core.manage":[],"core.delete":[],"core.edit.state":[]}');

--- --------------------------------------------------------

---
--- Table structure for table `#__associations`
---
-
-CREATE TABLE IF NOT EXISTS `#__associations` (
- `id` varchar(50) NOT NULL COMMENT 'A reference to the associated item.',
- `context` varchar(50) NOT NULL COMMENT 'The context of the associated item.',
- `key` char(32) NOT NULL COMMENT 'The key for the association computed from an md5 on associated ids.',
- PRIMARY KEY (`context`,`id`),
- KEY `idx_key` (`key`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banners`
---
-
-CREATE TABLE IF NOT EXISTS `#__banners` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `cid` int(11) NOT NULL DEFAULT '0',
- `type` int(11) NOT NULL DEFAULT '0',
- `name` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `imptotal` int(11) NOT NULL DEFAULT '0',
- `impmade` int(11) NOT NULL DEFAULT '0',
- `clicks` int(11) NOT NULL DEFAULT '0',
- `clickurl` varchar(200) NOT NULL DEFAULT '',
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `description` text NOT NULL,
- `custombannercode` varchar(2048) NOT NULL,
- `sticky` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `params` text NOT NULL,
- `own_prefix` tinyint(1) NOT NULL DEFAULT '0',
- `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
- `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
- `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
- `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `reset` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `language` char(7) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- KEY `idx_state` (`state`),
- KEY `idx_own_prefix` (`own_prefix`),
- KEY `idx_metakey_prefix` (`metakey_prefix`),
- KEY `idx_banner_catid` (`catid`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banner_clients`
---
-
-CREATE TABLE IF NOT EXISTS `#__banner_clients` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `contact` varchar(255) NOT NULL DEFAULT '',
- `email` varchar(255) NOT NULL DEFAULT '',
- `extrainfo` text NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `metakey` text NOT NULL,
- `own_prefix` tinyint(4) NOT NULL DEFAULT '0',
- `metakey_prefix` varchar(255) NOT NULL DEFAULT '',
- `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
- `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
- `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
- PRIMARY KEY (`id`),
- KEY `idx_own_prefix` (`own_prefix`),
- KEY `idx_metakey_prefix` (`metakey_prefix`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__banner_tracks`
---
-
-CREATE TABLE IF NOT EXISTS `#__banner_tracks` (
- `track_date` datetime NOT NULL,
- `track_type` int(10) unsigned NOT NULL,
- `banner_id` int(10) unsigned NOT NULL,
- `count` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`track_date`,`track_type`,`banner_id`),
- KEY `idx_track_date` (`track_date`),
- KEY `idx_track_type` (`track_type`),
- KEY `idx_banner_id` (`banner_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__categories`
---
-
-CREATE TABLE IF NOT EXISTS `#__categories` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
- `lft` int(11) NOT NULL DEFAULT '0',
- `rgt` int(11) NOT NULL DEFAULT '0',
- `level` int(10) unsigned NOT NULL DEFAULT '0',
- `path` varchar(255) NOT NULL DEFAULT '',
- `extension` varchar(50) NOT NULL DEFAULT '',
- `title` varchar(255) NOT NULL,
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `note` varchar(255) NOT NULL DEFAULT '',
- `description` mediumtext NOT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(11) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `params` text NOT NULL,
- `metadesc` varchar(1024) NOT NULL COMMENT 'The meta description for the page.',
- `metakey` varchar(1024) NOT NULL COMMENT 'The meta keywords for the page.',
- `metadata` varchar(2048) NOT NULL COMMENT 'JSON encoded metadata properties.',
- `created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `hits` int(10) unsigned NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `cat_idx` (`extension`,`published`,`access`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_path` (`path`),
- KEY `idx_left_right` (`lft`,`rgt`),
- KEY `idx_alias` (`alias`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
-
TRUNCATE `#__categories`;
--
-- Dumping data for table `#__categories`
--

-REPLACE INTO `#__categories` (`id`, `asset_id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `extension`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`, `modified_user_id`, `modified_time`, `hits`, `language`) VALUES
+INSERT IGNORE INTO `#__categories` (`id`, `asset_id`, `parent_id`, `lft`, `rgt`, `level`, `path`, `extension`, `title`, `alias`, `note`, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `metadesc`, `metakey`, `metadata`, `created_user_id`, `created_time`, `modified_user_id`, `modified_time`, `hits`, `language`) VALUES
(1, 0, 0, 0, 15, 0, '', 'system', 'ROOT', 'root', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{}', '', '', '', 0, '2009-10-18 16:07:09', 0, '0000-00-00 00:00:00', 0, '*'),
(2, 27, 1, 1, 2, 1, 'uncategorised', 'com_content', 'Uncategorised', 'uncategorised', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2010-06-28 13:26:37', 0, '0000-00-00 00:00:00', 0, '*'),
(3, 28, 1, 3, 4, 1, 'uncategorised', 'com_banners', 'Uncategorised', 'uncategorised', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":"","foobar":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2010-06-28 13:27:35', 0, '0000-00-00 00:00:00', 0, '*'),
@@ -237,130 +69,18 @@
(7, 32, 1, 11, 12, 1, 'uncategorised', 'com_users.notes', 'Uncategorised', 'uncategorised', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2010-06-28 13:28:33', 0, '0000-00-00 00:00:00', 0, '*'),
(8, 36, 1, 13, 14, 1, 'news', 'com_content', 'News', 'news', '', '<p>This is the latest new from us.</p>\r\n<p>You can edit this description in the Content Category Manager.</p>\r\n<p>This will show the most recent article. You can easily change it to show more if you wish.</p>\r\n<p>The module on the left shows a list of older articles.</p>', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2012-01-04 03:09:08', 42, '2012-01-04 04:32:05', 0, '*');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__contact_details`
---
-
-CREATE TABLE IF NOT EXISTS `#__contact_details` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `con_position` varchar(255) DEFAULT NULL,
- `address` text,
- `suburb` varchar(100) DEFAULT NULL,
- `state` varchar(100) DEFAULT NULL,
- `country` varchar(100) DEFAULT NULL,
- `postcode` varchar(100) DEFAULT NULL,
- `telephone` varchar(255) DEFAULT NULL,
- `fax` varchar(255) DEFAULT NULL,
- `misc` mediumtext,
- `image` varchar(255) DEFAULT NULL,
- `imagepos` varchar(20) DEFAULT NULL,
- `email_to` varchar(255) DEFAULT NULL,
- `default_con` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `params` text NOT NULL,
- `user_id` int(11) NOT NULL DEFAULT '0',
- `catid` int(11) NOT NULL DEFAULT '0',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `mobile` varchar(255) NOT NULL DEFAULT '',
- `webpage` varchar(255) NOT NULL DEFAULT '',
- `sortname1` varchar(255) NOT NULL,
- `sortname2` varchar(255) NOT NULL,
- `sortname3` varchar(255) NOT NULL,
- `language` char(7) NOT NULL,
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`published`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
-- Dumping data for table `#__contact_details`
--

-REPLACE INTO `#__contact_details` (`id`, `name`, `alias`, `con_position`, `address`, `suburb`, `state`, `country`, `postcode`, `telephone`, `fax`, `misc`, `image`, `imagepos`, `email_to`, `default_con`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `user_id`, `catid`, `access`, `mobile`, `webpage`, `sortname1`, `sortname2`, `sortname3`, `language`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `metakey`, `metadesc`, `metadata`, `featured`, `xreference`, `publish_up`, `publish_down`) VALUES
+INSERT IGNORE INTO `#__contact_details` (`id`, `name`, `alias`, `con_position`, `address`, `suburb`, `state`, `country`, `postcode`, `telephone`, `fax`, `misc`, `image`, `imagepos`, `email_to`, `default_con`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `user_id`, `catid`, `access`, `mobile`, `webpage`, `sortname1`, `sortname2`, `sortname3`, `language`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `metakey`, `metadesc`, `metadata`, `featured`, `xreference`, `publish_up`, `publish_down`) VALUES
(1, 'Your Name', 'your-name', '', 'This is a contact form which you can edit in the contact manager.\r\n\r\nPut your address or other information here. \r\n\r\nThis can be a good place to put things like business hours too.\r\n\r\nDon''t forget to put a real email address.\r\n\r\nYou also may want to enable Captcha in the global configuration\r\nto prevent spam submissions of contact forms. ', '', '', '', '', '', '', '', '', NULL, 'em...@email.com', 0, 1, 0, '0000-00-00 00:00:00', 1, '{"show_contact_category":"","show_contact_list":"","presentation_style":"","show_name":"","show_position":"","show_email":"","show_street_address":"","show_suburb":"","show_state":"","show_postcode":"","show_country":"","show_telephone":"","show_mobile":"","show_fax":"","show_webpage":"","show_misc":"","show_image":"","allow_vcard":"","show_articles":"","show_profile":"","show_links":"","linka_name":"","linka":"","linkb_name":"","linkb":"","linkc_name":"","linkc":"","linkd_name":"","linkd":"","linke_name":"","linke":"","contact_layout":"","show_email_form":"","show_email_copy":"","banned_email":"","banned_subject":"","banned_text":"","validate_session":"","custom_reply":"","redirect":""}', 0, 4, 1, '', '', '', '', '', '*', '2012-01-04 03:46:36', 42, '', '2012-01-17 15:03:45', 42, '', '', '{"robots":"","rights":""}', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__content`
---
-
-CREATE TABLE IF NOT EXISTS `#__content` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.',
- `title` varchar(255) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `title_alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Deprecated in Joomla! 3.0',
- `introtext` mediumtext NOT NULL,
- `fulltext` mediumtext NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `sectionid` int(10) unsigned NOT NULL DEFAULT '0',
- `mask` int(10) unsigned NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `images` text NOT NULL,
- `urls` text NOT NULL,
- `attribs` varchar(5120) NOT NULL,
- `version` int(10) unsigned NOT NULL DEFAULT '1',
- `parentid` int(10) unsigned NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `hits` int(10) unsigned NOT NULL DEFAULT '0',
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.',
- `language` char(7) NOT NULL COMMENT 'The language code for the article.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`state`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
-
---
-- Dumping data for table `#__content`
--

-REPLACE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`, `featured`, `language`, `xreference`) VALUES
+INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`, `featured`, `language`, `xreference`) VALUES
(1, 34, 'Home Page Title', 'home', '', '<p>This will be the home page. </p>\r\n<p>Click on the login link at the top of the page and enter your username and password. Then you can edit the article to say what you want by clicking on the edit icon.</p>\r\n<p>Once you are logged in you will also see a link to your site administrator and a page that tells you some more about working with Joomla! to make the site you want.</p>', '', 1, 0, 0, 2, '2012-01-04 02:38:10', 42, '', '2012-01-04 04:13:18', 42, 0, '0000-00-00 00:00:00', '2012-01-04 02:38:10', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 0, 2, '', '', 1, 48, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(2, 35, 'About Us', 'about-us', '', '<p>Put more information on this page.</p>', '', 1, 0, 0, 2, '2012-01-04 03:06:07', 42, '', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2012-01-04 03:06:07', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 0, 1, '', '', 1, 8, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(3, 37, 'Article 1 Title', 'article-1-title', '', '<p>Here is a news article.</p>', '', 1, 0, 0, 8, '2012-01-04 03:10:06', 42, '', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2012-01-04 03:10:06', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 0, 0, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
@@ -368,946 +88,12 @@
(5, 39, 'Article 3 Title ', 'article-3-title', '', '<p>Here is another news article.</p>', '', 1, 0, 0, 8, '2012-01-04 03:10:06', 42, '', '2012-01-04 03:11:50', 42, 0, '0000-00-00 00:00:00', '2012-01-04 03:10:06', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 4, 0, 0, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''),
(6, 40, 'Creating Your Site', 'creating-your-site', '', '<p>Joomla! is all about allowing you to create a site that matches your vision. The possibilities are limitless; this sample site will just get you started.</p>\r\n<p>There are a few things you should know to get you started.</p>\r\n<p>First, every Joomla! site has two parts the Site (which is what your site visitors see) and the Administrator (which is where you will want to do a lot of the site management). You need to log in to the Administrator separately. There is a link to the administrator on the top menu. </p>\r\n<p>You can edit articles in the Site by clicking on the edit icon. You can create a new article by clicking on the Create Article link in the top menu.  </p>\r\n<p>To do other things, like edit the contact form, edit the modules or change the site name you need to log in to the administrator. </p>\r\n<p>Some quick tips for working in the Administrator:</p>\r\n<ul>\r\n<li>Change site name and tag line: Go to the Extensions, Template Manager and on the Styles tab click on Your Basic Template.</li>\r\n<li>To edit the Header Module: Go to Extensions, Module Manager and click on Header Module.</li>\r\n<li>To edit the Side Module: Go to Extensions, Module Manager and click on Side Module.</li>\r\n<li>To edit the Contact Form: Go to Components, Contacts. Click on Your Name. </li>\r\n</ul>\r\n<p> </p>\r\n<p>Once you have your basic site you may want to install your own template (that controls the overall design of your site) and then, perhaps additional extensions. </p>\r\n<p>There is a lot of help available for Joomla!. You can visit the <a href="http://forum.joomla.org">Joomla! forums</a> and the<a href="http://docs.joomla.org" target="_blank"> Joomla! documentation site</a> to get started. </p>', '', 1, 0, 0, 2, '2012-01-04 04:27:11', 42, '', '2012-01-04 04:40:05', 42, 0, '0000-00-00 00:00:00', '2012-01-04 04:27:11', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_!
fulltext
":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 0, 0, '', '', 1, 6, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__content_frontpage`
---
-
-CREATE TABLE IF NOT EXISTS `#__content_frontpage` (
- `content_id` int(11) NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`content_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__content_rating`
---
-
-CREATE TABLE IF NOT EXISTS `#__content_rating` (
- `content_id` int(11) NOT NULL DEFAULT '0',
- `rating_sum` int(10) unsigned NOT NULL DEFAULT '0',
- `rating_count` int(10) unsigned NOT NULL DEFAULT '0',
- `lastip` varchar(50) NOT NULL DEFAULT '',
- PRIMARY KEY (`content_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__core_log_searches`
---
-
-CREATE TABLE IF NOT EXISTS `#__core_log_searches` (
- `search_term` varchar(128) NOT NULL DEFAULT '',
- `hits` int(10) unsigned NOT NULL DEFAULT '0'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__extensions`
---
-
-CREATE TABLE IF NOT EXISTS `#__extensions` (
- `extension_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- `type` varchar(20) NOT NULL,
- `element` varchar(100) NOT NULL,
- `folder` varchar(100) NOT NULL,
- `client_id` tinyint(3) NOT NULL,
- `enabled` tinyint(3) NOT NULL DEFAULT '1',
- `access` int(10) unsigned NOT NULL DEFAULT '1',
- `protected` tinyint(3) NOT NULL DEFAULT '0',
- `manifest_cache` text NOT NULL,
- `params` text NOT NULL,
- `custom_data` text NOT NULL,
- `system_data` text NOT NULL,
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) DEFAULT '0',
- `state` int(11) DEFAULT '0',
- PRIMARY KEY (`extension_id`),
- KEY `element_clientid` (`element`,`client_id`),
- KEY `element_folder_clientid` (`element`,`folder`,`client_id`),
- KEY `extension` (`type`,`element`,`folder`,`client_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10000 ;
-
---
--- Dumping data for table `#__extensions`
---
-
-REPLACE INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
-(1, 'com_mailto', 'component', 'com_mailto', '', 0, 1, 1, 1, '{"legacy":false,"name":"com_mailto","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MAILTO_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(2, 'com_wrapper', 'component', 'com_wrapper', '', 0, 1, 1, 1, '{"legacy":false,"name":"com_wrapper","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_WRAPPER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(3, 'com_admin', 'component', 'com_admin', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_admin","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_ADMIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(4, 'com_banners', 'component', 'com_banners', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_banners","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_BANNERS_XML_DESCRIPTION","group":""}', '{"purchase_type":"3","track_impressions":"0","track_clicks":"0","metakey_prefix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(5, 'com_cache', 'component', 'com_cache', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_cache","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CACHE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(6, 'com_categories', 'component', 'com_categories', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_categories","type":"component","creationDate":"December 2007","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CATEGORIES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(7, 'com_checkin', 'component', 'com_checkin', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_checkin","type":"component","creationDate":"Unknown","author":"Joomla! Project","copyright":"(C) 2005 - 2008 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CHECKIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(8, 'com_contact', 'component', 'com_contact', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_contact","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONTACT_XML_DESCRIPTION","group":""}', '{"show_contact_category":"hide","show_contact_list":"0","presentation_style":"sliders","show_name":"1","show_position":"1","show_email":"0","show_street_address":"1","show_suburb":"1","show_state":"1","show_postcode":"1","show_country":"1","show_telephone":"1","show_mobile":"1","show_fax":"1","show_webpage":"1","show_misc":"1","show_image":"1","image":"","allow_vcard":"0","show_articles":"0","show_profile":"0","show_links":"0","linka_name":"","linkb_name":"","linkc_name":"","linkd_name":"","linke_name":"","contact_icons":"0","icon_address":"","icon_email":"","icon_telephone":"","icon_mobile":"","icon_fax":"","icon_misc":"","show_headings":"1","show_position_headings":"1","show_email_headings":"0","show_telephone_headings":"1","show_mobile_headings":"0","show_fax_headings":"0","allow_vcard_headings":"0","show_suburb_headings":"1","show_state_headings":"1","show_country_headings":"1","show_email_form":"1","show_email_copy":"1","banned_email":"","banned_subject":"","banned_text":"","validate_session":"1","custom_reply":"0","redirect":"","show_category_crumb":"0","metakey":"","metadesc":"","robots":"","author":"","rights":"","xreference":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(9, 'com_cpanel', 'component', 'com_cpanel', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_cpanel","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CPANEL_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(10, 'com_installer', 'component', 'com_installer', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_installer","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_INSTALLER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(11, 'com_languages', 'component', 'com_languages', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_languages","type":"component","creationDate":"2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_LANGUAGES_XML_DESCRIPTION","group":""}', '{"administrator":"en-GB","site":"en-GB"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(12, 'com_login', 'component', 'com_login', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_login","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(13, 'com_media', 'component', 'com_media', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_media","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MEDIA_XML_DESCRIPTION","group":""}', '{"upload_extensions":"bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,swf,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,SWF,TXT,XCF,XLS","upload_maxsize":"10","file_path":"images","image_path":"images","restrict_uploads":"1","allowed_media_usergroup":"3","check_mime":"1","image_extensions":"bmp,gif,jpg,png","ignore_extensions":"","upload_mime":"image\\/jpeg,image\\/gif,image\\/png,image\\/bmp,application\\/x-shockwave-flash,application\\/msword,application\\/excel,application\\/pdf,application\\/powerpoint,text\\/plain,application\\/x-zip","upload_mime_illegal":"text\\/html","enable_flash":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(14, 'com_menus', 'component', 'com_menus', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_menus","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MENUS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(15, 'com_messages', 'component', 'com_messages', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_messages","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MESSAGES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(16, 'com_modules', 'component', 'com_modules', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_modules","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_MODULES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(17, 'com_newsfeeds', 'component', 'com_newsfeeds', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_newsfeeds","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{"show_feed_image":"1","show_feed_description":"1","show_item_description":"1","feed_word_count":"0","show_headings":"1","show_name":"1","show_articles":"0","show_link":"1","show_description":"1","show_description_image":"1","display_num":"","show_pagination_limit":"1","show_pagination":"1","show_pagination_results":"1","show_cat_items":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(18, 'com_plugins', 'component', 'com_plugins', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_plugins","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_PLUGINS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(19, 'com_search', 'component', 'com_search', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_search","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_SEARCH_XML_DESCRIPTION","group":""}', '{"enabled":"0","show_date":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(20, 'com_templates', 'component', 'com_templates', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_templates","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_TEMPLATES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(21, 'com_weblinks', 'component', 'com_weblinks', '', 1, 1, 1, 0, '{"legacy":false,"name":"com_weblinks","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_WEBLINKS_XML_DESCRIPTION","group":""}', '{"show_comp_description":"1","comp_description":"","show_link_hits":"1","show_link_description":"1","show_other_cats":"0","show_headings":"0","show_numbers":"0","show_report":"1","count_clicks":"1","target":"0","link_icons":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(22, 'com_content', 'component', 'com_content', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_content","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONTENT_XML_DESCRIPTION","group":""}', '{"article_layout":"_:default","show_title":"1","link_titles":"1","show_intro":"1","show_category":"0","link_category":"1","show_parent_category":"0","link_parent_category":"0","show_author":"0","link_author":"0","show_create_date":"0","show_modify_date":"0","show_publish_date":"0","show_item_navigation":"0","show_vote":"0","show_readmore":"1","show_readmore_title":"1","readmore_limit":"100","show_icons":"0","show_print_icon":"0","show_email_icon":"0","show_hits":"0","show_noauth":"0","show_publishing_options":"1","show_article_options":"1","show_urls_images_frontend":"0","show_urls_images_backend":"1","targeta":0,"targetb":0,"targetc":0,"float_intro":"left","float_fulltext":"left","category_layout":"_:blog","show_category_title":"0","show_description":"0","show_description_image":"0","maxLevel":"1","show_empty_categories":"0","show_no_articles":"1","show_subcat_desc":"1","show_cat_num_articles":"0","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_num_articles_cat":"1","num_leading_articles":"1","num_intro_articles":"4","num_columns":"2","num_links":"4","multi_column_order":"0","show_subcategory_content":"0","show_pagination_limit":"1","filter_field":"hide","show_headings":"1","list_show_date":"0","date_format":"","list_show_hits":"1","list_show_author":"1","orderby_pri":"order","orderby_sec":"rdate","order_date":"published","show_pagination":"2","show_pagination_results":"1","show_feed_link":"1","feed_summary":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(23, 'com_config', 'component', 'com_config', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_config","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_CONFIG_XML_DESCRIPTION","group":""}', '{"filters":{"1":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"6":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"7":{"filter_type":"NONE","filter_tags":"","filter_attributes":""},"2":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"3":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"4":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"5":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"10":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"12":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"8":{"filter_type":"NONE","filter_tags":"","filter_attributes":""}}}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(24, 'com_redirect', 'component', 'com_redirect', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_redirect","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_REDIRECT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(25, 'com_users', 'component', 'com_users', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_users","type":"component","creationDate":"April 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.\\t","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"COM_USERS_XML_DESCRIPTION","group":""}', '{"allowUserRegistration":"1","new_usertype":"2","guest_usergroup":"9","useractivation":"1","mail_to_admin":"0","captcha":"0","frontend_userparams":"1","site_language":"0","mailSubjectPrefix":"","mailBodySuffix":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '{"legacy":false,"name":"com_finder","type":"component","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"COM_FINDER_XML_DESCRIPTION","group":""}', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"snowball"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(100, 'PHPMailer', 'library', 'phpmailer', '', 0, 1, 1, 1, '{"legacy":false,"name":"PHPMailer","type":"library","creationDate":"2008","author":"PHPMailer","copyright":"Copyright (C) PHPMailer.","authorEmail":"","authorUrl":"http:\\/\\/phpmailer.codeworxtech.com\\/","version":"1.7.0","description":"LIB_PHPMAILER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(101, 'SimplePie', 'library', 'simplepie', '', 0, 1, 1, 1, '{"legacy":false,"name":"SimplePie","type":"library","creationDate":"2008","author":"SimplePie","copyright":"Copyright (C) 2008 SimplePie","authorEmail":"","authorUrl":"http:\\/\\/simplepie.org\\/","version":"1.0.1","description":"LIB_SIMPLEPIE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(102, 'phputf8', 'library', 'phputf8', '', 0, 1, 1, 1, '{"legacy":false,"name":"phputf8","type":"library","creationDate":"2008","author":"Harry Fuecks","copyright":"Copyright various authors","authorEmail":"","authorUrl":"http:\\/\\/sourceforge.net\\/projects\\/phputf8","version":"1.7.0","description":"LIB_PHPUTF8_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(103, 'Joomla! Web Application Framework', 'library', 'joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"Joomla! Web Application Framework","type":"library","creationDate":"2008","author":"Joomla","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"http:\\/\\/www.joomla.org","version":"1.7.0","description":"LIB_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(200, 'mod_articles_archive', 'module', 'mod_articles_archive', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_archive","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters.\\n\\t\\tAll rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_ARCHIVE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(201, 'mod_articles_latest', 'module', 'mod_articles_latest', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_latest","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LATEST_NEWS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(202, 'mod_articles_popular', 'module', 'mod_articles_popular', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_articles_popular","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_POPULAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(203, 'mod_banners', 'module', 'mod_banners', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_banners","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_BANNERS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(204, 'mod_breadcrumbs', 'module', 'mod_breadcrumbs', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_breadcrumbs","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_BREADCRUMBS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(205, 'mod_custom', 'module', 'mod_custom', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_custom","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_CUSTOM_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(206, 'mod_feed', 'module', 'mod_feed', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_feed","type":"module","creationDate":"July 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FEED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(207, 'mod_footer', 'module', 'mod_footer', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_footer","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FOOTER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(208, 'mod_login', 'module', 'mod_login', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_login","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(209, 'mod_menu', 'module', 'mod_menu', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_menu","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_MENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(210, 'mod_articles_news', 'module', 'mod_articles_news', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_articles_news","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_NEWS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(211, 'mod_random_image', 'module', 'mod_random_image', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_random_image","type":"module","creationDate":"July 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_RANDOM_IMAGE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(212, 'mod_related_items', 'module', 'mod_related_items', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_related_items","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_RELATED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(213, 'mod_search', 'module', 'mod_search', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_search","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SEARCH_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(214, 'mod_stats', 'module', 'mod_stats', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_stats","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(215, 'mod_syndicate', 'module', 'mod_syndicate', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_syndicate","type":"module","creationDate":"May 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SYNDICATE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(216, 'mod_users_latest', 'module', 'mod_users_latest', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_users_latest","type":"module","creationDate":"December 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_USERS_LATEST_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(217, 'mod_weblinks', 'module', 'mod_weblinks', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_weblinks","type":"module","creationDate":"July 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WEBLINKS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(218, 'mod_whosonline', 'module', 'mod_whosonline', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_whosonline","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WHOSONLINE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(219, 'mod_wrapper', 'module', 'mod_wrapper', '', 0, 1, 1, 0, '{"legacy":false,"name":"mod_wrapper","type":"module","creationDate":"October 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_WRAPPER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(220, 'mod_articles_category', 'module', 'mod_articles_category', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_category","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_CATEGORY_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(221, 'mod_articles_categories', 'module', 'mod_articles_categories', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_articles_categories","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_ARTICLES_CATEGORIES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(222, 'mod_languages', 'module', 'mod_languages', '', 0, 1, 1, 1, '{"legacy":false,"name":"mod_languages","type":"module","creationDate":"February 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LANGUAGES_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(223, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, '{"legacy":false,"name":"mod_finder","type":"module","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_FINDER_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(300, 'mod_custom', 'module', 'mod_custom', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_custom","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_CUSTOM_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(301, 'mod_feed', 'module', 'mod_feed', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_feed","type":"module","creationDate":"July 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_FEED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(302, 'mod_latest', 'module', 'mod_latest', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_latest","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LATEST_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(303, 'mod_logged', 'module', 'mod_logged', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_logged","type":"module","creationDate":"January 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGGED_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(304, 'mod_login', 'module', 'mod_login', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_login","type":"module","creationDate":"March 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_LOGIN_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(305, 'mod_menu', 'module', 'mod_menu', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_menu","type":"module","creationDate":"March 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_MENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(307, 'mod_popular', 'module', 'mod_popular', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_popular","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_POPULAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(308, 'mod_quickicon', 'module', 'mod_quickicon', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_quickicon","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_QUICKICON_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(309, 'mod_status', 'module', 'mod_status', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_status","type":"module","creationDate":"Feb 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_STATUS_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(310, 'mod_submenu', 'module', 'mod_submenu', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_submenu","type":"module","creationDate":"Feb 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_SUBMENU_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(311, 'mod_title', 'module', 'mod_title', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_title","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_TITLE_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(312, 'mod_toolbar', 'module', 'mod_toolbar', '', 1, 1, 1, 1, '{"legacy":false,"name":"mod_toolbar","type":"module","creationDate":"Nov 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"MOD_TOOLBAR_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(313, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_multilangstatus","type":"module","creationDate":"September 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"MOD_MULTILANGSTATUS_XML_DESCRIPTION","group":""}', '{"cache":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(400, 'plg_authentication_gmail', 'plugin', 'gmail', 'authentication', 0, 0, 1, 0, '{"legacy":false,"name":"plg_authentication_gmail","type":"plugin","creationDate":"February 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_GMAIL_XML_DESCRIPTION","group":""}', '{"applysuffix":"0","suffix":"","verifypeer":"1","user_blacklist":""}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(401, 'plg_authentication_joomla', 'plugin', 'joomla', 'authentication', 0, 1, 1, 1, '{"legacy":false,"name":"plg_authentication_joomla","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_AUTH_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(402, 'plg_authentication_ldap', 'plugin', 'ldap', 'authentication', 0, 0, 1, 0, '{"legacy":false,"name":"plg_authentication_ldap","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LDAP_XML_DESCRIPTION","group":""}', '{"host":"","port":"389","use_ldapV3":"0","negotiate_tls":"0","no_referrals":"0","auth_method":"bind","base_dn":"","search_string":"","users_dn":"","username":"admin","password":"bobby7","ldap_fullname":"fullName","ldap_email":"mail","ldap_uid":"uid"}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(404, 'plg_content_emailcloak', 'plugin', 'emailcloak', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_emailcloak","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_EMAILCLOAK_XML_DESCRIPTION","group":""}', '{"mode":"1"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(405, 'plg_content_geshi', 'plugin', 'geshi', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_geshi","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"","authorUrl":"qbnz.com\\/highlighter","version":"1.7.0","description":"PLG_CONTENT_GESHI_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(406, 'plg_content_loadmodule', 'plugin', 'loadmodule', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_loadmodule","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LOADMODULE_XML_DESCRIPTION","group":""}', '{"style":"xhtml"}', '', '', 0, '2011-09-18 15:22:50', 0, 0),
-(407, 'plg_content_pagebreak', 'plugin', 'pagebreak', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_pagebreak","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_PAGEBREAK_XML_DESCRIPTION","group":""}', '{"title":"1","multipage_toc":"1","showall":"1"}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(408, 'plg_content_pagenavigation', 'plugin', 'pagenavigation', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_pagenavigation","type":"plugin","creationDate":"January 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_PAGENAVIGATION_XML_DESCRIPTION","group":""}', '{"position":"1"}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(409, 'plg_content_vote', 'plugin', 'vote', 'content', 0, 1, 1, 1, '{"legacy":false,"name":"plg_content_vote","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_VOTE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 6, 0),
-(410, 'plg_editors_codemirror', 'plugin', 'codemirror', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_codemirror","type":"plugin","creationDate":"28 March 2011","author":"Marijn Haverbeke","copyright":"","authorEmail":"N\\/A","authorUrl":"","version":"1.0","description":"PLG_CODEMIRROR_XML_DESCRIPTION","group":""}', '{"linenumbers":"0","tabmode":"indent"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(411, 'plg_editors_none', 'plugin', 'none', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_none","type":"plugin","creationDate":"August 2004","author":"Unknown","copyright":"","authorEmail":"N\\/A","authorUrl":"","version":"1.7.0","description":"PLG_NONE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(412, 'plg_editors_tinymce', 'plugin', 'tinymce', 'editors', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors_tinymce","type":"plugin","creationDate":"2005-2011","author":"Moxiecode Systems AB","copyright":"Moxiecode Systems AB","authorEmail":"N\\/A","authorUrl":"tinymce.moxiecode.com\\/","version":"3.4.7","description":"PLG_TINY_XML_DESCRIPTION","group":""}', '{"mode":"1","skin":"0","compressed":"0","cleanup_startup":"0","cleanup_save":"2","entity_encoding":"raw","lang_mode":"0","lang_code":"en","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","invalid_elements":"script,applet,iframe","extended_elements":"","toolbar":"top","toolbar_align":"left","html_height":"550","html_width":"750","element_path":"1","fonts":"1","paste":"1","searchreplace":"1","REPLACEdate":"1","format_date":"%Y-%m-%d","REPLACEtime":"1","format_time":"%H:%M:%S","colors":"1","table":"1","smilies":"1","media":"1","hr":"1","directionality":"1","fullscreen":"1","style":"1","layer":"1","xhtmlxtras":"1","visualchars":"1","nonbreaking":"1","template":"1","blockquote":"1","wordcount":"1","advimage":"1","advlink":"1","autosave":"1","contextmenu":"1","inlinepopups":"1","safari":"0","custom_plugin":"","custom_button":""}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(413, 'plg_editors-xtd_article', 'plugin', 'article', 'editors-xtd', 0, 1, 1, 1, '{"legacy":false,"name":"plg_editors-xtd_article","type":"plugin","creationDate":"October 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_ARTICLE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(414, 'plg_editors-xtd_image', 'plugin', 'image', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_image","type":"plugin","creationDate":"August 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_IMAGE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(415, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_pagebreak","type":"plugin","creationDate":"August 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_EDITORSXTD_PAGEBREAK_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(416, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, '{"legacy":false,"name":"plg_editors-xtd_readmore","type":"plugin","creationDate":"March 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_READMORE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(417, 'plg_search_categories', 'plugin', 'categories', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_categories","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CATEGORIES_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(418, 'plg_search_contacts', 'plugin', 'contacts', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_contacts","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CONTACTS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(419, 'plg_search_content', 'plugin', 'content', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_content","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_CONTENT_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(420, 'plg_search_newsfeeds', 'plugin', 'newsfeeds', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_newsfeeds","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(421, 'plg_search_weblinks', 'plugin', 'weblinks', 'search', 0, 1, 1, 0, '{"legacy":false,"name":"plg_search_weblinks","type":"plugin","creationDate":"November 2005","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEARCH_WEBLINKS_XML_DESCRIPTION","group":""}', '{"search_limit":"50","search_content":"1","search_archived":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(422, 'plg_system_languagefilter', 'plugin', 'languagefilter', 'system', 0, 0, 1, 1, '{"legacy":false,"name":"plg_system_languagefilter","type":"plugin","creationDate":"July 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LANGUAGEFILTER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(423, 'plg_system_p3p', 'plugin', 'p3p', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_p3p","type":"plugin","creationDate":"September 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_P3P_XML_DESCRIPTION","group":""}', '{"headers":"NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(424, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 1, '{"legacy":false,"name":"plg_system_cache","type":"plugin","creationDate":"February 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CACHE_XML_DESCRIPTION","group":""}', '{"browsercache":"0","cachetime":"15"}', '', '', 0, '0000-00-00 00:00:00', 9, 0),
-(425, 'plg_system_debug', 'plugin', 'debug', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_debug","type":"plugin","creationDate":"December 2006","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_DEBUG_XML_DESCRIPTION","group":""}', '{"profile":"1","queries":"1","memory":"1","language_files":"1","language_strings":"1","strip-first":"1","strip-prefix":"","strip-suffix":""}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(426, 'plg_system_log', 'plugin', 'log', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_log","type":"plugin","creationDate":"April 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_LOG_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(427, 'plg_system_redirect', 'plugin', 'redirect', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_redirect","type":"plugin","creationDate":"April 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_REDIRECT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 6, 0),
-(428, 'plg_system_remember', 'plugin', 'remember', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_remember","type":"plugin","creationDate":"April 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_REMEMBER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
-(429, 'plg_system_sef', 'plugin', 'sef', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_sef","type":"plugin","creationDate":"December 2007","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SEF_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 8, 0),
-(430, 'plg_system_logout', 'plugin', 'logout', 'system', 0, 1, 1, 1, '{"legacy":false,"name":"plg_system_logout","type":"plugin","creationDate":"April 2009","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LOGOUT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(431, 'plg_user_contactcreator', 'plugin', 'contactcreator', 'user', 0, 0, 1, 1, '{"legacy":false,"name":"plg_user_contactcreator","type":"plugin","creationDate":"August 2009","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTACTCREATOR_XML_DESCRIPTION","group":""}', '{"autowebpage":"","category":"34","autopublish":"0"}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(432, 'plg_user_joomla', 'plugin', 'joomla', 'user', 0, 1, 1, 0, '{"legacy":false,"name":"plg_user_joomla","type":"plugin","creationDate":"December 2006","author":"Joomla! Project","copyright":"(C) 2005 - 2009 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_USER_JOOMLA_XML_DESCRIPTION","group":""}', '{"autoregister":"1"}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(433, 'plg_user_profile', 'plugin', 'profile', 'user', 0, 0, 1, 1, '{"legacy":false,"name":"plg_user_profile","type":"plugin","creationDate":"January 2008","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_USER_PROFILE_XML_DESCRIPTION","group":""}', '{"register-require_address1":"1","register-require_address2":"1","register-require_city":"1","register-require_region":"1","register-require_country":"1","register-require_postal_code":"1","register-require_phone":"1","register-require_website":"1","register-require_favoritebook":"1","register-require_aboutme":"1","register-require_tos":"1","register-require_dob":"1","profile-require_address1":"1","profile-require_address2":"1","profile-require_city":"1","profile-require_region":"1","profile-require_country":"1","profile-require_postal_code":"1","profile-require_phone":"1","profile-require_website":"1","profile-require_favoritebook":"1","profile-require_aboutme":"1","profile-require_tos":"1","profile-require_dob":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(434, 'plg_extension_joomla', 'plugin', 'joomla', 'extension', 0, 1, 1, 1, '{"legacy":false,"name":"plg_extension_joomla","type":"plugin","creationDate":"May 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_EXTENSION_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(435, 'plg_content_joomla', 'plugin', 'joomla', 'content', 0, 1, 1, 0, '{"legacy":false,"name":"plg_content_joomla","type":"plugin","creationDate":"November 2010","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_JOOMLA_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(436, 'plg_system_languagecode', 'plugin', 'languagecode', 'system', 0, 0, 1, 0, '{"legacy":false,"name":"plg_system_languagecode","type":"plugin","creationDate":"November 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_SYSTEM_LANGUAGECODE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 10, 0),
-(437, 'plg_quickicon_joomlaupdate', 'plugin', 'joomlaupdate', 'quickicon', 0, 1, 1, 1, '{"legacy":false,"name":"plg_quickicon_joomlaupdate","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"PLG_QUICKICON_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(438, 'plg_quickicon_extensionupdate', 'plugin', 'extensionupdate', 'quickicon', 0, 1, 1, 1, '{"legacy":false,"name":"plg_quickicon_extensionupdate","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"PLG_QUICKICON_EXTENSIONUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(439, 'plg_captcha_recaptcha', 'plugin', 'recaptcha', 'captcha', 0, 1, 1, 0, '{"legacy":false,"name":"plg_captcha_recaptcha","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION","group":""}', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(440, 'plg_system_highlight', 'plugin', 'highlight', 'system', 0, 1, 1, 0, '{"legacy":false,"name":"plg_system_highlight","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_SYSTEM_HIGHLIGHT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
-(441, 'plg_content_finder', 'plugin', 'finder', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_finder","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(442, 'plg_finder_categories', 'plugin', 'categories', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_categories","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CATEGORIES_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
-(443, 'plg_finder_contacts', 'plugin', 'contacts', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_contacts","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CONTACTS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
-(444, 'plg_finder_content', 'plugin', 'content', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_content","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_CONTENT_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
-(445, 'plg_finder_newsfeeds', 'plugin', 'newsfeeds', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_newsfeeds","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_NEWSFEEDS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
-(446, 'plg_finder_weblinks', 'plugin', 'weblinks', 'finder', 0, 1, 1, 0, '{"legacy":false,"name":"plg_finder_weblinks","type":"plugin","creationDate":"August 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_FINDER_WEBLINKS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
-(447, 'plg_system_finder', 'plugin', 'finder', 'system', 0, 0, 1, 0, '{"legacy":false,"name":"plg_system_finder","type":"plugin","creationDate":"September 2011","author":"Joomla! Project","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"PLG_SYSTEM_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 11, 0),
-(500, 'atomic', 'template', 'atomic', '', 0, 1, 1, 0, '{"legacy":false,"name":"atomic","type":"template","creationDate":"10\\/10\\/09","author":"Ron Severdia","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"con...@kontentdesign.com","authorUrl":"http:\\/\\/www.kontentdesign.com","version":"1.7.0","description":"TPL_ATOMIC_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(502, 'bluestork', 'template', 'bluestork', '', 1, 1, 1, 0, '{"legacy":false,"name":"bluestork","type":"template","creationDate":"07\\/02\\/09","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"TPL_BLUESTORK_XML_DESCRIPTION","group":""}', '{"useRoundedCorners":"1","showSiteName":"0","textBig":"0","highContrast":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(503, 'beez_20', 'template', 'beez_20', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez_20","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.ra...@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.7.0","description":"TPL_BEEZ2_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(504, 'hathor', 'template', 'hathor', '', 1, 1, 1, 0, '{"legacy":false,"name":"hathor","type":"template","creationDate":"May 2010","author":"Andrea Tarr","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"hat...@tarrconsulting.com","authorUrl":"http:\\/\\/www.tarrconsulting.com","version":"1.7.0","description":"TPL_HATHOR_XML_DESCRIPTION","group":""}', '{"showSiteName":"0","colourChoice":"0","boldText":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(505, 'beez5', 'template', 'beez5', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez5","type":"template","creationDate":"21 May 2010","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.ra...@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.7.0","description":"TPL_BEEZ5_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","html5":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(600, 'English (United Kingdom)', 'language', 'en-GB', '', 0, 1, 1, 1, '{"legacy":false,"name":"English (United Kingdom)","type":"language","creationDate":"2008-03-15","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"en-GB site language","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(601, 'English (United Kingdom)', 'language', 'en-GB', '', 1, 1, 1, 1, '{"legacy":false,"name":"English (United Kingdom)","type":"language","creationDate":"2008-03-15","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"1.7.1","description":"en-GB administrator language","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(700, 'files_joomla', 'file', 'joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"files_joomla","type":"file","creationDate":"December 2011","author":"Joomla!","copyright":"(C) 2005 - 2011 Open Source Matters. All rights reserved","authorEmail":"ad...@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"FILES_JOOMLA_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
-(800, 'PKG_JOOMLA', 'package', 'pkg_joomla', '', 0, 1, 1, 1, '{"legacy":false,"name":"PKG_JOOMLA","type":"package","creationDate":"2006","author":"Joomla!","copyright":"Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.","authorEmail":"ad...@joomla.org","authorUrl":"http:\\/\\/www.joomla.org","version":"1.7.0","description":"PKG_JOOMLA_XML_DESCRIPTION","group":""}', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_filters`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_filters` (
- `filter_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(255) NOT NULL,
- `alias` varchar(255) NOT NULL,
- `state` tinyint(1) NOT NULL DEFAULT '1',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL,
- `created_by_alias` varchar(255) NOT NULL,
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `map_count` int(10) unsigned NOT NULL DEFAULT '0',
- `data` text NOT NULL,
- `params` mediumtext,
- PRIMARY KEY (`filter_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links` (
- `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `url` varchar(255) NOT NULL,
- `route` varchar(255) NOT NULL,
- `title` varchar(255) DEFAULT NULL,
- `description` varchar(255) DEFAULT NULL,
- `indexdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `md5sum` varchar(32) DEFAULT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '1',
- `state` int(5) DEFAULT '1',
- `access` int(5) DEFAULT '0',
- `language` varchar(8) NOT NULL,
- `publish_start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `list_price` double unsigned NOT NULL DEFAULT '0',
- `sale_price` double unsigned NOT NULL DEFAULT '0',
- `type_id` int(11) NOT NULL,
- `object` mediumblob NOT NULL,
- PRIMARY KEY (`link_id`),
- KEY `idx_type` (`type_id`),
- KEY `idx_title` (`title`),
- KEY `idx_md5` (`md5sum`),
- KEY `idx_url` (`url`(75)),
- KEY `idx_published_list` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`list_price`),
- KEY `idx_published_sale` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`sale_price`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms0`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms0` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms1`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms1` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms2`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms2` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms3`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms3` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms4`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms4` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms5`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms5` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms6`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms6` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms7`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms7` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms8`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms8` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_terms9`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_terms9` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsa`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsa` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsb`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsb` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsc`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsc` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsd`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsd` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termse`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termse` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_links_termsf`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_links_termsf` (
- `link_id` int(10) unsigned NOT NULL,
- `term_id` int(10) unsigned NOT NULL,
- `weight` float unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`term_id`),
- KEY `idx_term_weight` (`term_id`,`weight`),
- KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_taxonomy`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_taxonomy` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
- `title` varchar(255) NOT NULL,
- `state` tinyint(1) unsigned NOT NULL DEFAULT '1',
- `access` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `ordering` tinyint(1) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `parent_id` (`parent_id`),
- KEY `state` (`state`),
- KEY `ordering` (`ordering`),
- KEY `access` (`access`),
- KEY `idx_parent_published` (`parent_id`,`state`,`access`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `#__finder_taxonomy`
---
-
-REPLACE INTO `#__finder_taxonomy` (`id`, `parent_id`, `title`, `state`, `access`, `ordering`) VALUES
-(1, 0, 'ROOT', 0, 0, 0);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_taxonomy_map`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_taxonomy_map` (
- `link_id` int(10) unsigned NOT NULL,
- `node_id` int(10) unsigned NOT NULL,
- PRIMARY KEY (`link_id`,`node_id`),
- KEY `link_id` (`link_id`),
- KEY `node_id` (`node_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_terms`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_terms` (
- `term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `weight` float unsigned NOT NULL DEFAULT '0',
- `soundex` varchar(75) NOT NULL,
- `links` int(10) NOT NULL DEFAULT '0',
- PRIMARY KEY (`term_id`),
- UNIQUE KEY `idx_term` (`term`),
- KEY `idx_term_phrase` (`term`,`phrase`),
- KEY `idx_stem_phrase` (`stem`,`phrase`),
- KEY `idx_soundex_phrase` (`soundex`,`phrase`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_terms_common`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_terms_common` (
- `term` varchar(75) NOT NULL,
- `language` varchar(3) NOT NULL,
- KEY `idx_word_lang` (`term`,`language`),
- KEY `idx_lang` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__finder_terms_common`
---
-
-REPLACE INTO `#__finder_terms_common` (`term`, `language`) VALUES
-('a', 'en'),
-('a', 'en'),
-('about', 'en'),
-('about', 'en'),
-('after', 'en'),
-('after', 'en'),
-('ago', 'en'),
-('ago', 'en'),
-('all', 'en'),
-('all', 'en'),
-('am', 'en'),
-('am', 'en'),
-('an', 'en'),
-('an', 'en'),
-('and', 'en'),
-('and', 'en'),
-('ani', 'en'),
-('ani', 'en'),
-('any', 'en'),
-('any', 'en'),
-('are', 'en'),
-('are', 'en'),
-('aren''t', 'en'),
-('aren''t', 'en'),
-('as', 'en'),
-('as', 'en'),
-('at', 'en'),
-('at', 'en'),
-('be', 'en'),
-('be', 'en'),
-('but', 'en'),
-('but', 'en'),
-('by', 'en'),
-('by', 'en'),
-('for', 'en'),
-('for', 'en'),
-('from', 'en'),
-('from', 'en'),
-('get', 'en'),
-('get', 'en'),
-('go', 'en'),
-('go', 'en'),
-('how', 'en'),
-('how', 'en'),
-('if', 'en'),
-('if', 'en'),
-('in', 'en'),
-('in', 'en'),
-('into', 'en'),
-('into', 'en'),
-('is', 'en'),
-('is', 'en'),
-('isn''t', 'en'),
-('isn''t', 'en'),
-('it', 'en'),
-('it', 'en'),
-('its', 'en'),
-('its', 'en'),
-('me', 'en'),
-('me', 'en'),
-('more', 'en'),
-('more', 'en'),
-('most', 'en'),
-('most', 'en'),
-('must', 'en'),
-('must', 'en'),
-('my', 'en'),
-('my', 'en'),
-('new', 'en'),
-('new', 'en'),
-('no', 'en'),
-('no', 'en'),
-('none', 'en'),
-('none', 'en'),
-('not', 'en'),
-('not', 'en'),
-('noth', 'en'),
-('noth', 'en'),
-('nothing', 'en'),
-('nothing', 'en'),
-('of', 'en'),
-('of', 'en'),
-('off', 'en'),
-('off', 'en'),
-('often', 'en'),
-('often', 'en'),
-('old', 'en'),
-('old', 'en'),
-('on', 'en'),
-('on', 'en'),
-('onc', 'en'),
-('onc', 'en'),
-('once', 'en'),
-('once', 'en'),
-('onli', 'en'),
-('onli', 'en'),
-('only', 'en'),
-('only', 'en'),
-('or', 'en'),
-('or', 'en'),
-('other', 'en'),
-('other', 'en'),
-('our', 'en'),
-('our', 'en'),
-('ours', 'en'),
-('ours', 'en'),
-('out', 'en'),
-('out', 'en'),
-('over', 'en'),
-('over', 'en'),
-('page', 'en'),
-('page', 'en'),
-('she', 'en'),
-('she', 'en'),
-('should', 'en'),
-('should', 'en'),
-('small', 'en'),
-('small', 'en'),
-('so', 'en'),
-('so', 'en'),
-('some', 'en'),
-('some', 'en'),
-('than', 'en'),
-('than', 'en'),
-('thank', 'en'),
-('thank', 'en'),
-('that', 'en'),
-('that', 'en'),
-('the', 'en'),
-('the', 'en'),
-('their', 'en'),
-('their', 'en'),
-('theirs', 'en'),
-('theirs', 'en'),
-('them', 'en'),
-('them', 'en'),
-('then', 'en'),
-('then', 'en'),
-('there', 'en'),
-('there', 'en'),
-('these', 'en'),
-('these', 'en'),
-('they', 'en'),
-('they', 'en'),
-('this', 'en'),
-('this', 'en'),
-('those', 'en'),
-('those', 'en'),
-('thus', 'en'),
-('thus', 'en'),
-('time', 'en'),
-('time', 'en'),
-('times', 'en'),
-('times', 'en'),
-('to', 'en'),
-('to', 'en'),
-('too', 'en'),
-('too', 'en'),
-('true', 'en'),
-('true', 'en'),
-('under', 'en'),
-('under', 'en'),
-('until', 'en'),
-('until', 'en'),
-('up', 'en'),
-('up', 'en'),
-('upon', 'en'),
-('upon', 'en'),
-('use', 'en'),
-('use', 'en'),
-('user', 'en'),
-('user', 'en'),
-('users', 'en'),
-('users', 'en'),
-('veri', 'en'),
-('veri', 'en'),
-('version', 'en'),
-('version', 'en'),
-('very', 'en'),
-('very', 'en'),
-('via', 'en'),
-('via', 'en'),
-('want', 'en'),
-('want', 'en'),
-('was', 'en'),
-('was', 'en'),
-('way', 'en'),
-('way', 'en'),
-('were', 'en'),
-('were', 'en'),
-('what', 'en'),
-('what', 'en'),
-('when', 'en'),
-('when', 'en'),
-('where', 'en'),
-('where', 'en'),
-('whi', 'en'),
-('whi', 'en'),
-('which', 'en'),
-('which', 'en'),
-('who', 'en'),
-('who', 'en'),
-('whom', 'en'),
-('whom', 'en'),
-('whose', 'en'),
-('whose', 'en'),
-('why', 'en'),
-('why', 'en'),
-('wide', 'en'),
-('wide', 'en'),
-('will', 'en'),
-('will', 'en'),
-('with', 'en'),
-('with', 'en'),
-('within', 'en'),
-('within', 'en'),
-('without', 'en'),
-('without', 'en'),
-('would', 'en'),
-('would', 'en'),
-('yes', 'en'),
-('yes', 'en'),
-('yet', 'en'),
-('yet', 'en'),
-('you', 'en'),
-('you', 'en'),
-('your', 'en'),
-('your', 'en'),
-('yours', 'en'),
-('yours', 'en');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_tokens`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_tokens` (
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `weight` float unsigned NOT NULL DEFAULT '1',
- `context` tinyint(1) unsigned NOT NULL DEFAULT '2',
- KEY `idx_word` (`term`),
- KEY `idx_context` (`context`)
-) ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_tokens_aggregate`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_tokens_aggregate` (
- `term_id` int(10) unsigned NOT NULL,
- `map_suffix` char(1) NOT NULL,
- `term` varchar(75) NOT NULL,
- `stem` varchar(75) NOT NULL,
- `common` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `term_weight` float unsigned NOT NULL,
- `context` tinyint(1) unsigned NOT NULL DEFAULT '2',
- `context_weight` float unsigned NOT NULL,
- `total_weight` float unsigned NOT NULL,
- KEY `token` (`term`),
- KEY `keyword_id` (`term_id`)
-) ENGINE=MEMORY DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__finder_types`
---
-
-CREATE TABLE IF NOT EXISTS `#__finder_types` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(100) NOT NULL,
- `mime` varchar(100) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `title` (`title`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__languages`
---
-
-CREATE TABLE IF NOT EXISTS `#__languages` (
- `lang_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `lang_code` char(7) NOT NULL,
- `title` varchar(50) NOT NULL,
- `title_native` varchar(50) NOT NULL,
- `sef` varchar(50) NOT NULL,
- `image` varchar(50) NOT NULL,
- `description` varchar(512) NOT NULL,
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `sitename` varchar(1024) NOT NULL DEFAULT '',
- `published` int(11) NOT NULL DEFAULT '0',
- `ordering` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`lang_id`),
- UNIQUE KEY `idx_sef` (`sef`),
- UNIQUE KEY `idx_image` (`image`),
- UNIQUE KEY `idx_langcode` (`lang_code`),
- KEY `idx_ordering` (`ordering`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
--- Dumping data for table `#__languages`
---
-
-REPLACE INTO `#__languages` (`lang_id`, `lang_code`, `title`, `title_native`, `sef`, `image`, `description`, `metakey`, `metadesc`, `sitename`, `published`, `ordering`) VALUES
-(1, 'en-GB', 'English (UK)', 'English (UK)', 'en', 'en', '', '', '', '', 1, 1);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__menu`
---
-
-CREATE TABLE IF NOT EXISTS `#__menu` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `menutype` varchar(24) NOT NULL COMMENT 'The type of menu this item belongs to. FK to #__menu_types.menutype',
- `title` varchar(255) NOT NULL COMMENT 'The display title of the menu item.',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The SEF alias of the menu item.',
- `note` varchar(255) NOT NULL DEFAULT '',
- `path` varchar(1024) NOT NULL COMMENT 'The computed path of the menu item based on the alias field.',
- `link` varchar(1024) NOT NULL COMMENT 'The actually link the menu item refers to.',
- `type` varchar(16) NOT NULL COMMENT 'The type of link: Component, URL, Alias, Separator',
- `published` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The published state of the menu link.',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'The parent menu item in the menu tree.',
- `level` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The relative level in the tree.',
- `component_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #__extensions.id',
- `ordering` int(11) NOT NULL DEFAULT '0' COMMENT 'The relative ordering of the menu item in the tree.',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #__users.id',
- `checked_out_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The time the menu item was checked out.',
- `browserNav` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The click behaviour of the link.',
- `access` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The access level required to view the menu item.',
- `img` varchar(255) NOT NULL COMMENT 'The image of the menu item.',
- `template_style_id` int(10) unsigned NOT NULL DEFAULT '0',
- `params` text NOT NULL COMMENT 'JSON encoded data for the menu item.',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `home` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Indicates if this menu item is the home or default page.',
- `language` char(7) NOT NULL DEFAULT '',
- `client_id` tinyint(4) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`,`language`),
- KEY `idx_componentid` (`component_id`,`menutype`,`published`,`access`),
- KEY `idx_menutype` (`menutype`),
- KEY `idx_left_right` (`lft`,`rgt`),
- KEY `idx_alias` (`alias`),
- KEY `idx_path` (`path`(255)),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=110 ;
-
---
-- Dumping data for table `#__menu`
--
+TRUNCATE `#__menu`;

-REPLACE INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
+INSERT IGNORE INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
(1, '', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, 0, 0, '0000-00-00 00:00:00', 0, 0, '', 0, '', 0, 59, 0, '*', 0),
(2, 'menu', 'com_banners', 'Banners', '', 'Banners', 'index.php?option=com_banners', 'component', 0, 1, 1, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 15, 24, 0, '*', 1),
(3, 'menu', 'com_banners', 'Banners', '', 'Banners/Banners', 'index.php?option=com_banners', 'component', 0, 2, 2, 4, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:banners', 0, '', 16, 17, 0, '*', 1),
@@ -1329,6 +115,7 @@
(19, 'menu', 'com_weblinks_links', 'Links', '', 'Weblinks/Links', 'index.php?option=com_weblinks', 'component', 0, 18, 2, 21, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks', 0, '', 48, 49, 0, '*', 1),
(20, 'menu', 'com_weblinks_categories', 'Categories', '', 'Weblinks/Categories', 'index.php?option=com_categories&extension=com_weblinks', 'component', 0, 18, 2, 6, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks-cat', 0, '', 50, 51, 0, '*', 1),
(21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 43, 44, 0, '*', 1),
+(22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1),
(101, 'mainmenu', 'Home', 'home', '', 'home', 'index.php?option=com_content&view=article&id=1', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 1, 2, 1, '*', 0),
(102, 'mainmenu', 'About Us', 'about-us', '', 'about-us', 'index.php?option=com_content&view=article&id=2', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 3, 4, 0, '*', 0),
(103, 'mainmenu', 'News', 'news', '', 'news', 'index.php?option=com_content&view=category&layout=blog&id=8', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"layout_type":"blog","show_category_title":"","show_description":"1","show_description_image":"","maxLevel":"","show_empty_categories":"","show_no_articles":"","show_subcat_desc":"","show_cat_num_articles":"","page_subheading":"","num_leading_articles":"1","num_intro_articles":"0","num_columns":"1","num_links":"0","multi_column_order":"","show_subcategory_content":"","orderby_pri":"","orderby_sec":"","order_date":"published","show_pagination":"0","show_pagination_results":"0","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_readmore":"","show_readmore_title":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","show_feed_link":"","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 5, 6, 0, '*', 0),
@@ -1339,96 +126,18 @@
(108, 'mainmenu', 'Creating Your Site', 'creating-your-site', '', 'creating-your-site', 'index.php?option=com_content&view=article&id=6', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 3, '', 0, '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_vote":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_noauth":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 57, 58, 0, '*', 0),
(109, 'mainmenu', 'Create an Article', 'create-an-article', '', 'create-an-article', 'index.php?option=com_content&view=form&layout=edit', 'component', 1, 1, 1, 22, 0, 0, '0000-00-00 00:00:00', 0, 3, '', 0, '{"enable_category":"0","catid":"2","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 13, 14, 0, '*', 0);

--- --------------------------------------------------------
-
--
--- Table structure for table `#__menu_types`
---
-
-CREATE TABLE IF NOT EXISTS `#__menu_types` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `menutype` varchar(24) NOT NULL,
- `title` varchar(48) NOT NULL,
- `description` varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_menutype` (`menutype`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-
---
-- Dumping data for table `#__menu_types`
--

REPLACE INTO `#__menu_types` (`id`, `menutype`, `title`, `description`) VALUES
(1, 'mainmenu', 'Main Menu', 'The main menu for the site');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__messages`
---
-
-CREATE TABLE IF NOT EXISTS `#__messages` (
- `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id_from` int(10) unsigned NOT NULL DEFAULT '0',
- `user_id_to` int(10) unsigned NOT NULL DEFAULT '0',
- `folder_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `date_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `state` tinyint(1) NOT NULL DEFAULT '0',
- `priority` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `subject` varchar(255) NOT NULL DEFAULT '',
- `message` text NOT NULL,
- PRIMARY KEY (`message_id`),
- KEY `useridto_state` (`user_id_to`,`state`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__messages_cfg`
---
-
-CREATE TABLE IF NOT EXISTS `#__messages_cfg` (
- `user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `cfg_name` varchar(100) NOT NULL DEFAULT '',
- `cfg_value` varchar(255) NOT NULL DEFAULT '',
- UNIQUE KEY `idx_user_var_name` (`user_id`,`cfg_name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__modules`
---
-
-CREATE TABLE IF NOT EXISTS `#__modules` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `title` varchar(100) NOT NULL DEFAULT '',
- `note` varchar(255) NOT NULL DEFAULT '',
- `content` text NOT NULL,
- `ordering` int(11) NOT NULL DEFAULT '0',
- `position` varchar(50) NOT NULL DEFAULT '',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `module` varchar(50) DEFAULT NULL,
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `showtitle` tinyint(3) unsigned NOT NULL DEFAULT '1',
- `params` text NOT NULL,
- `client_id` tinyint(4) NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `published` (`published`,`access`),
- KEY `newsfeeds` (`module`,`published`),
- KEY `idx_language` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=84 ;
-
---
-- Dumping data for table `#__modules`
--

-REPLACE INTO `#__modules` (`id`, `title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
+INSERT IGNORE INTO `#__modules` (`id`, `title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
(1, 'Main Menu', '', '', 1, 'position-1', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_menu', 1, 1, '{"menutype":"mainmenu","startLevel":"1","endLevel":"0","showAllChildren":"0","tag_id":"","class_sfx":"","window_open":"","layout":"_:default","moduleclass_sfx":"_menu","cache":"1","cache_time":"900","cachemode":"itemid"}', 0, '*'),
(2, 'Login', '', '', 1, 'login', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_login', 1, 1, '', 1, '*'),
(3, 'Popular Articles', '', '', 3, 'cpanel', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_popular', 3, 1, '{"count":"5","catid":"","user_id":"0","layout":"_:default","moduleclass_sfx":"","cache":"0","automatic_title":"1"}', 1, '*'),
@@ -1448,19 +157,7 @@
(82, 'Other News', '', '', 0, 'position-7', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_articles_news', 1, 1, '{"catid":["8"],"image":"0","item_title":"1","link_titles":"1","item_heading":"h4","showLastSeparator":"0","readmore":"0","count":"5","ordering":"a.publish_up","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"itemid"}', 0, '*'),
(83, 'Side Module', '', '<p>This is a module where you might want to add some more information or an image,  a link to your social media presence, or whatever makes sense for your site.  </p>\r\n<p>You can edit this module in the module manager. Look for the Side Module.</p>', 1, 'position-7', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_custom', 1, 1, '{"prepare_content":"1","backgroundimage":"","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"static"}', 0, '*');

--- --------------------------------------------------------
-
--
--- Table structure for table `#__modules_menu`
---
-
-CREATE TABLE IF NOT EXISTS `#__modules_menu` (
- `moduleid` int(11) NOT NULL DEFAULT '0',
- `menuid` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`moduleid`,`menuid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
-- Dumping data for table `#__modules_menu`
--

@@ -1487,152 +184,7 @@
(83, 0),
(85, 0);

--- --------------------------------------------------------
-
--
--- Table structure for table `#__newsfeeds`
---
-
-CREATE TABLE IF NOT EXISTS `#__newsfeeds` (
- `catid` int(11) NOT NULL DEFAULT '0',
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `link` varchar(200) NOT NULL DEFAULT '',
- `filename` varchar(200) DEFAULT NULL,
- `published` tinyint(1) NOT NULL DEFAULT '0',
- `numarticles` int(10) unsigned NOT NULL DEFAULT '1',
- `cache_time` int(10) unsigned NOT NULL DEFAULT '3600',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `rtl` tinyint(4) NOT NULL DEFAULT '0',
- `access` int(10) unsigned NOT NULL DEFAULT '0',
- `language` char(7) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`published`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__overrider`
---
-
-CREATE TABLE IF NOT EXISTS `#__overrider` (
- `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `constant` varchar(255) NOT NULL,
- `string` text NOT NULL,
- `file` varchar(255) NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__redirect_links`
---
-
-CREATE TABLE IF NOT EXISTS `#__redirect_links` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `old_url` varchar(255) NOT NULL,
- `new_url` varchar(255) NOT NULL,
- `referer` varchar(150) NOT NULL,
- `comment` varchar(255) NOT NULL,
- `published` tinyint(4) NOT NULL,
- `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_link_old` (`old_url`),
- KEY `idx_link_modifed` (`modified_date`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__schemas`
---
-
-CREATE TABLE IF NOT EXISTS `#__schemas` (
- `extension_id` int(11) NOT NULL,
- `version_id` varchar(20) NOT NULL,
- PRIMARY KEY (`extension_id`,`version_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__schemas`
---
-
-REPLACE INTO `#__schemas` (`extension_id`, `version_id`) VALUES
-(700, '2.5.0-2011-12-27'),
-(700, '2.5.0-2012-01-14');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__session`
---
-
-CREATE TABLE IF NOT EXISTS `#__session` (
- `session_id` varchar(200) NOT NULL DEFAULT '',
- `client_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `guest` tinyint(4) unsigned DEFAULT '1',
- `time` varchar(14) DEFAULT '',
- `data` mediumtext,
- `userid` int(11) DEFAULT '0',
- `username` varchar(150) DEFAULT '',
- `usertype` varchar(50) DEFAULT '',
- PRIMARY KEY (`session_id`),
- KEY `whosonline` (`guest`,`usertype`),
- KEY `userid` (`userid`),
- KEY `time` (`time`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__session`
---
-
-REPLACE INTO `#__session` (`session_id`, `client_id`, `guest`, `time`, `data`, `userid`, `username`, `usertype`) VALUES
-('b25v3o8ap6k4h0v4jbp01ua6t1', 0, 0, '1326813023', '__default|a:8:{s:15:"session.counter";i:32;s:19:"session.timer.start";i:1326811305;s:18:"session.timer.last";i:1326813002;s:17:"session.timer.now";i:1326813023;s:22:"session.client.browser";s:101:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";s:8:"registry";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":1:{s:5:"users";O:8:"stdClass":1:{s:5:"login";O:8:"stdClass":1:{s:4:"form";O:8:"stdClass":2:{s:4:"data";a:0:{}s:6:"return";s:39:"index.php?option=com_users&view=profile";}}}}}s:4:"user";O:5:"JUser":23:{s:9:"\0*\0isRoot";b:1;s:2:"id";s:2:"42";s:4:"name";s:10:"Super User";s:8:"username";s:5:"admin";s:5:"email";s:14:"ad...@fake.com";s:8:"password";s:65:"1464a44a47c12cd4bba35ec6e616dbcd:2WI3SPkGxbttLeEEbhkS1qWVL8Qbhwig";s:14:"password_clear";s:0:"";s:8:"usertype";s:10:"deprecated";s:5:"block";s:1:"0";s:9:"sendEmail";s:1:"1";s:12:"registerDate";s:19:"2012-01-17 14:41:43";s:13:"lastvisitDate";s:19:"0000-00-00 00:00:00";s:10:"activation";s:1:"0";s:6:"params";s:0:"";s:6:"groups";a:1:{i:8;s:1:"8";}s:5:"guest";i:0;s:10:"\0*\0_params";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":0:{}}s:14:"\0*\0_authGroups";a:2:{i:0;i:1;i:1;i:8;}s:14:"\0*\0_authLevels";a:4:{i:0;i:1;i:1;i:1;i:2;i:2;i:3;i:3;}s:15:"\0*\0_authActions";N;s:12:"\0*\0_errorMsg";N;s:10:"\0*\0_errors";a:0:{}s:3:"aid";i:0;}s:13:"session.token";s:32:"4651edbadffcae7feccc0937178d1cf3";}', 42, 'admin', ''),
-('lmvavvdp6rqes7saq1ivpda3v0', 1, 0, '1326813091', '__default|a:8:{s:15:"session.counter";i:42;s:19:"session.timer.start";i:1326812184;s:18:"session.timer.last";i:1326813018;s:17:"session.timer.now";i:1326813090;s:22:"session.client.browser";s:101:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";s:8:"registry";O:9:"JRegistry":1:{s:7:"\0*\0data";O:8:"stdClass":7:{s:11:"application";O:8:"stdClass":1:{s:4:"lang";s:0:"";}s:13:"com_templates";O:8:"stdClass":1:{s:6:"styles";O:8:"stdClass":1:{s:10:"limitstart";i:0;}}s:9:"com_menus";O:8:"stdClass":2:{s:5:"items";O:8:"stdClass":2:{s:6:"filter";O:8:"stdClass":1:{s:8:"menutype";s:8:"mainmenu";}s:10:"limitstart";i:0;}s:4:"edit";O:8:"stdClass":1:{s:4:"item";O:8:"stdClass":4:{s:4:"data";N;s:4:"type";N;s:4:"link";N;s:2:"id";a:0:{}}}}s:4:"item";O:8:"stdClass":1:{s:6:"filter";O:8:"stdClass":1:{s:8:"menutype";s:8:"mainmenu";}}s:11:"com_contact";O:8:"stdClass":1:{s:4:"edit";O:8:"stdClass":1:{s:7:"contact";O:8:"stdClass":2:{s:2:"id";a:0:{}s:4:"data";N;}}}s:13:"com_installer";O:8:"stdClass":2:{s:7:"message";s:0:"";s:17:"extension_message";s:0:"";}s:11:"com_modules";O:8:"stdClass":3:{s:7:"modules";O:8:"stdClass":1:{s:6:"filter";O:8:"stdClass":1:{s:18:"client_id_previous";i:0;}}s:4:"edit";O:8:"stdClass":1:{s:6:"module";O:8:"stdClass":2:{s:2:"id";a:1:{i:0;i:81;}s:4:"data";N;}}s:3:"add";O:8:"stdClass":1:{s:6:"module";O:8:"stdClass":2:{s:12:"extension_id";N;s:6:"params";N;}}}}}s:4:"user";O:5:"JUser":23:{s:9:"\0*\0isRoot";b:1;s:2:"id";s:2:"42";s:4:"name";s:10:"Super User";s:8:"username";s:5:"admin";s:5:"email";s:14:"ad...@fake.com";s:8:"password";s:65:"1464a44a47c12cd4bba35ec6e616dbcd:2WI3SPkGxbttLeEEbhkS1qWVL8Qbhwig";s:14:"password_clear";s:0:"";s:8:"usertype";s:10:"deprecated";s:5:"block";s:1:"0";s:9:"sendEmail";s:1:"1";s:12:"registerDate";s:19:"2012-01-17 14:41:43";s:13:"lastvisitDate";s:19:"2012-01-17 14:43:37";s:10:"activation";s:1:"0";s:6:"params";s:0:"";s:6:"groups";a:1:{i:8;s:1:"8";}s:5:"guest";i:0;s:10:"\0*\0_params"!
;O:9:"JR
egistry":1:{s:7:"\0*\0data";O:8:"stdClass":0:{}}s:14:"\0*\0_authGroups";a:2:{i:0;i:1;i:1;i:8;}s:14:"\0*\0_authLevels";a:4:{i:0;i:1;i:1;i:1;i:2;i:2;i:3;i:3;}s:15:"\0*\0_authActions";N;s:12:"\0*\0_errorMsg";N;s:10:"\0*\0_errors";a:0:{}s:3:"aid";i:0;}s:13:"session.token";s:32:"f7d5f70c251d5e26a90883384728e112";}', 42, 'admin', '');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__template_styles`
---
-
-CREATE TABLE IF NOT EXISTS `#__template_styles` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `template` varchar(50) NOT NULL DEFAULT '',
- `client_id` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `home` char(7) NOT NULL DEFAULT '0',
- `title` varchar(255) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- PRIMARY KEY (`id`),
- KEY `idx_template` (`template`),
- KEY `idx_home` (`home`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
-
---
-- Dumping data for table `#__template_styles`
--

@@ -1642,291 +194,3 @@
(4, 'beez_20', 0, '0', 'Beez2 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images\\/joomla_black.gif","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'),
(5, 'hathor', 1, '0', 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'),
(6, 'beez5', 0, '1', 'Your Basic Template', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"","sitetitle":"Your site name or image","sitedescription":"Your tag line for the top of every page","navposition":"left","html5":1}');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__updates`
---
-
-CREATE TABLE IF NOT EXISTS `#__updates` (
- `update_id` int(11) NOT NULL AUTO_INCREMENT,
- `update_site_id` int(11) DEFAULT '0',
- `extension_id` int(11) DEFAULT '0',
- `categoryid` int(11) DEFAULT '0',
- `name` varchar(100) DEFAULT '',
- `description` text NOT NULL,
- `element` varchar(100) DEFAULT '',
- `type` varchar(20) DEFAULT '',
- `folder` varchar(20) DEFAULT '',
- `client_id` tinyint(3) DEFAULT '0',
- `version` varchar(10) DEFAULT '',
- `data` text NOT NULL,
- `detailsurl` text NOT NULL,
- `infourl` text NOT NULL,
- PRIMARY KEY (`update_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates' AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_categories`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_categories` (
- `categoryid` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(20) DEFAULT '',
- `description` text NOT NULL,
- `parent` int(11) DEFAULT '0',
- `updatesite` int(11) DEFAULT '0',
- PRIMARY KEY (`categoryid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Update Categories' AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_sites`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_sites` (
- `update_site_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) DEFAULT '',
- `type` varchar(20) DEFAULT '',
- `location` text NOT NULL,
- `enabled` int(11) DEFAULT '0',
- `last_check_timestamp` bigint(20) DEFAULT '0',
- PRIMARY KEY (`update_site_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Update Sites' AUTO_INCREMENT=3 ;
-
---
--- Dumping data for table `#__update_sites`
---
-
-REPLACE INTO `#__update_sites` (`update_site_id`, `name`, `type`, `location`, `enabled`, `last_check_timestamp`) VALUES
-(1, 'Joomla Core', 'collection', 'http://update.joomla.org/core/list.xml', 1, 1326812642),
-(2, 'Joomla Extension Directory', 'collection', 'http://update.joomla.org/jed/list.xml', 1, 1326812642);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__update_sites_extensions`
---
-
-CREATE TABLE IF NOT EXISTS `#__update_sites_extensions` (
- `update_site_id` int(11) NOT NULL DEFAULT '0',
- `extension_id` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`update_site_id`,`extension_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Links extensions to update sites';
-
---
--- Dumping data for table `#__update_sites_extensions`
---
-
-REPLACE INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
-(1, 700),
-(2, 700);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__usergroups`
---
-
-CREATE TABLE IF NOT EXISTS `#__usergroups` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Adjacency List Reference Id',
- `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
- `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
- `title` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_usergroup_parent_title_lookup` (`parent_id`,`title`),
- KEY `idx_usergroup_title_lookup` (`title`),
- KEY `idx_usergroup_adjacency_lookup` (`parent_id`),
- KEY `idx_usergroup_nested_set_lookup` (`lft`,`rgt`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
-
---
--- Dumping data for table `#__usergroups`
---
-
-REPLACE INTO `#__usergroups` (`id`, `parent_id`, `lft`, `rgt`, `title`) VALUES
-(1, 0, 1, 18, 'Public'),
-(2, 1, 8, 15, 'Registered'),
-(3, 2, 9, 14, 'Author'),
-(4, 3, 10, 13, 'Editor'),
-(5, 4, 11, 12, 'Publisher'),
-(6, 1, 4, 7, 'Manager'),
-(7, 6, 5, 6, 'Administrator'),
-(8, 1, 16, 17, 'Super Users'),
-(9, 1, 2, 3, 'Guest');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__users`
---
-
-CREATE TABLE IF NOT EXISTS `#__users` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `username` varchar(150) NOT NULL DEFAULT '',
- `email` varchar(100) NOT NULL DEFAULT '',
- `password` varchar(100) NOT NULL DEFAULT '',
- `usertype` varchar(25) NOT NULL DEFAULT '',
- `block` tinyint(4) NOT NULL DEFAULT '0',
- `sendEmail` tinyint(4) DEFAULT '0',
- `registerDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `lastvisitDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `activation` varchar(100) NOT NULL DEFAULT '',
- `params` text NOT NULL,
- PRIMARY KEY (`id`),
- KEY `usertype` (`usertype`),
- KEY `idx_name` (`name`),
- KEY `idx_block` (`block`),
- KEY `username` (`username`),
- KEY `email` (`email`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ;
-
---
--- Dumping data for table `#__users`
---
-
-REPLACE INTO `#__users` (`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`, `registerDate`, `lastvisitDate`, `activation`, `params`) VALUES
-(42, 'Super User', 'admin', 'ad...@fake.com', '1464a44a47c12cd4bba35ec6e616dbcd:2WI3SPkGxbttLeEEbhkS1qWVL8Qbhwig', 'deprecated', 0, 1, '2012-01-17 14:41:43', '2012-01-17 14:56:26', '0', '');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_notes`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_notes` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `catid` int(10) unsigned NOT NULL DEFAULT '0',
- `subject` varchar(100) NOT NULL DEFAULT '',
- `body` text NOT NULL,
- `state` tinyint(3) NOT NULL DEFAULT '0',
- `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_user_id` int(10) unsigned NOT NULL,
- `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `review_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_user_id` (`user_id`),
- KEY `idx_category_id` (`catid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_profiles`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_profiles` (
- `user_id` int(11) NOT NULL,
- `profile_key` varchar(100) NOT NULL,
- `profile_value` varchar(255) NOT NULL,
- `ordering` int(11) NOT NULL DEFAULT '0',
- UNIQUE KEY `idx_user_id_profile_key` (`user_id`,`profile_key`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Simple user profile storage table';
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__user_usergroup_map`
---
-
-CREATE TABLE IF NOT EXISTS `#__user_usergroup_map` (
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__users.id',
- `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__usergroups.id',
- PRIMARY KEY (`user_id`,`group_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `#__user_usergroup_map`
---
-
-REPLACE INTO `#__user_usergroup_map` (`user_id`, `group_id`) VALUES
-(42, 8);
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__viewlevels`
---
-
-CREATE TABLE IF NOT EXISTS `#__viewlevels` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
- `title` varchar(100) NOT NULL DEFAULT '',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.',
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_assetgroup_title_lookup` (`title`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-
---
--- Dumping data for table `#__viewlevels`
---
-
-REPLACE INTO `#__viewlevels` (`id`, `title`, `ordering`, `rules`) VALUES
-(1, 'Public', 0, '[1]'),
-(2, 'Registered', 1, '[6,2,8]'),
-(3, 'Special', 2, '[6,3,8]'),
-(4, 'Guest', 0, '[9]');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `#__weblinks`
---
-
-CREATE TABLE IF NOT EXISTS `#__weblinks` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `catid` int(11) NOT NULL DEFAULT '0',
- `sid` int(11) NOT NULL DEFAULT '0',
- `title` varchar(250) NOT NULL DEFAULT '',
- `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `url` varchar(250) NOT NULL DEFAULT '',
- `description` text NOT NULL,
- `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `hits` int(11) NOT NULL DEFAULT '0',
- `state` tinyint(1) NOT NULL DEFAULT '0',
- `checked_out` int(11) NOT NULL DEFAULT '0',
- `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ordering` int(11) NOT NULL DEFAULT '0',
- `archived` tinyint(1) NOT NULL DEFAULT '0',
- `approved` tinyint(1) NOT NULL DEFAULT '1',
- `access` int(11) NOT NULL DEFAULT '1',
- `params` text NOT NULL,
- `language` char(7) NOT NULL DEFAULT '',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `created_by` int(10) unsigned NOT NULL DEFAULT '0',
- `created_by_alias` varchar(255) NOT NULL DEFAULT '',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
- `metakey` text NOT NULL,
- `metadesc` text NOT NULL,
- `metadata` text NOT NULL,
- `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if link is featured.',
- `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
- `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`id`),
- KEY `idx_access` (`access`),
- KEY `idx_checkout` (`checked_out`),
- KEY `idx_state` (`state`),
- KEY `idx_catid` (`catid`),
- KEY `idx_createdby` (`created_by`),
- KEY `idx_featured_catid` (`featured`,`catid`),
- KEY `idx_language` (`language`),
- KEY `idx_xreference` (`xreference`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Modified: development/trunk/installation/sql/mysql/sample_data.sql
===================================================================
--- development/trunk/installation/sql/mysql/sample_data.sql 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/installation/sql/mysql/sample_data.sql 2012-03-28 18:36:44 UTC (rev 22957)
@@ -6,58 +6,58 @@
-- Dumping data for table `#__assets`
--
INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `title`, `rules`) VALUES
-(1, 0, 1, 416, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
+(1, 0, 1, 424, 0, 'root.1', 'Root Asset', '{"core.login.site":{"6":1,"2":1},"core.login.admin":{"6":1},"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1},"core.edit.own":{"6":1,"3":1}}'),
(2, 1, 2, 3, 1, 'com_admin', 'com_admin', '{}'),
(3, 1, 4, 11, 1, 'com_banners', 'com_banners', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(4, 1, 12, 13, 1, 'com_cache', 'com_cache', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
(5, 1, 14, 15, 1, 'com_checkin', 'com_checkin', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
(6, 1, 16, 17, 1, 'com_config', 'com_config', '{}'),
(7, 1, 18, 87, 1, 'com_contact', 'com_contact', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(8, 1, 88, 293, 1, 'com_content', 'com_content', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
-(9, 1, 294, 295, 1, 'com_cpanel', 'com_cpanel', '{}'),
-(10, 1, 296, 297, 1, 'com_installer', 'com_installer', '{"core.admin":[],"core.manage":{"7":0},"core.delete":{"7":0},"core.edit.state":{"7":0}}'),
-(11, 1, 298, 299, 1, 'com_languages', 'com_languages', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(12, 1, 300, 301, 1, 'com_login', 'com_login', '{}'),
-(13, 1, 302, 303, 1, 'com_mailto', 'com_mailto', '{}'),
-(14, 1, 304, 305, 1, 'com_massmail', 'com_massmail', '{}'),
-(15, 1, 306, 307, 1, 'com_media', 'com_media', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":{"5":1},"core.edit":[],"core.edit.state":[]}'),
-(16, 1, 308, 309, 1, 'com_menus', 'com_menus', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(8, 1, 88, 299, 1, 'com_content', 'com_content', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1},"core.edit.own":[]}'),
+(9, 1, 300, 301, 1, 'com_cpanel', 'com_cpanel', '{}'),
+(10, 1, 302, 303, 1, 'com_installer', 'com_installer', '{"core.admin":[],"core.manage":{"7":0},"core.delete":{"7":0},"core.edit.state":{"7":0}}'),
+(11, 1, 304, 305, 1, 'com_languages', 'com_languages', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(12, 1, 306, 307, 1, 'com_login', 'com_login', '{}'),
+(13, 1, 308, 309, 1, 'com_mailto', 'com_mailto', '{}'),
+(14, 1, 310, 311, 1, 'com_massmail', 'com_massmail', '{}'),
+(15, 1, 312, 313, 1, 'com_media', 'com_media', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1},"core.delete":{"5":1},"core.edit":[],"core.edit.state":[]}'),
+(16, 1, 314, 315, 1, 'com_menus', 'com_menus', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(17, 1, 37, 38, 1, 'com_messages', 'com_messages', '{"core.admin":{"7":1},"core.manage":{"7":1}}'),
-(18, 1, 312, 313, 1, 'com_modules', 'com_modules', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(19, 1, 314, 321, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(20, 1, 322, 323, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(21, 1, 324, 325, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1},"core.manage":[]}'),
-(22, 1, 326, 327, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
-(23, 1, 328, 329, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(24, 1, 330, 333, 1, 'com_users', 'com_users', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(25, 1, 334, 351, 1, 'com_weblinks', 'com_weblinks', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1,"10":0,"12":0},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1}}'),
-(26, 1, 352, 353, 1, 'com_wrapper', 'com_wrapper', '{}'),
-(33, 1, 414, 415, 1, 'com_finder', 'com_finder', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
+(18, 1, 318, 319, 1, 'com_modules', 'com_modules', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(19, 1, 320, 327, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(20, 1, 328, 329, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(21, 1, 330, 331, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1},"core.manage":[]}'),
+(22, 1, 332, 333, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
+(23, 1, 334, 335, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(24, 1, 336, 339, 1, 'com_users', 'com_users', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(25, 1, 340, 357, 1, 'com_weblinks', 'com_weblinks', '{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1,"10":0,"12":0},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1}}'),
+(26, 1, 358, 359, 1, 'com_wrapper', 'com_wrapper', '{}'),
+(33, 1, 420, 421, 1, 'com_finder', 'com_finder', '{"core.admin":{"7":1},"core.manage":{"6":1}}'),
(34, 8, 105, 108, 2, 'com_content.category.9', 'Uncategorised', '{"core.create":{"10":0,"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(35, 3, 7, 8, 2, 'com_banners.category.10', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(36, 7, 23, 24, 2, 'com_contact.category.11', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(37, 19, 317, 318, 2, 'com_newsfeeds.category.12', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(38, 25, 341, 342, 2, 'com_weblinks.category.13', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(39, 8, 109, 292, 2, 'com_content.category.14', 'Sample Data-Articles', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(37, 19, 323, 324, 2, 'com_newsfeeds.category.12', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(38, 25, 347, 348, 2, 'com_weblinks.category.13', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(39, 8, 109, 298, 2, 'com_content.category.14', 'Sample Data-Articles', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(40, 3, 9, 10, 2, 'com_banners.category.15', 'Sample Data-Banners', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(41, 7, 25, 86, 2, 'com_contact.category.16', 'Sample Data-Contact', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(42, 19, 319, 320, 2, 'com_newsfeeds.category.17', 'Sample Data-Newsfeeds', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(43, 25, 343, 350, 2, 'com_weblinks.category.18', 'Sample Data-Weblinks', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(44, 39, 110, 241, 3, 'com_content.category.19', 'Joomla!', '{"core.create":{"10":0,"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(45, 44, 111, 218, 4, 'com_content.category.20', 'Extensions', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(42, 19, 325, 326, 2, 'com_newsfeeds.category.17', 'Sample Data-Newsfeeds', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(43, 25, 349, 356, 2, 'com_weblinks.category.18', 'Sample Data-Weblinks', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(44, 39, 110, 247, 3, 'com_content.category.19', 'Joomla!', '{"core.create":{"10":0,"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(45, 44, 111, 224, 4, 'com_content.category.20', 'Extensions', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(46, 45, 112, 127, 5, 'com_content.category.21', 'Components', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(47, 45, 128, 187, 5, 'com_content.category.22', 'Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(48, 45, 188, 199, 5, 'com_content.category.23', 'Templates', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(49, 45, 200, 201, 5, 'com_content.category.24', 'Languages', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(50, 45, 202, 217, 5, 'com_content.category.25', 'Plugins', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(51, 39, 242, 273, 3, 'com_content.category.26', 'Park Site', '{"core.create":{"10":0,"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(52, 51, 243, 248, 4, 'com_content.category.27', 'Park Blog', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(53, 51, 249, 270, 4, 'com_content.category.28', 'Photo Gallery', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(54, 39, 274, 287, 3, 'com_content.category.29', 'Fruit Shop Site', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(55, 54, 275, 280, 4, 'com_content.category.30', 'Growers', '{"core.create":{"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":{"10":1}}'),
-(56, 43, 344, 345, 3, 'com_weblinks.category.31', 'Park Links', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(57, 43, 346, 349, 3, 'com_weblinks.category.32', 'Joomla! Specific Links', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(58, 57, 347, 348, 4, 'com_weblinks.category.33', 'Other Resources', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(47, 45, 128, 189, 5, 'com_content.category.22', 'Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(48, 45, 190, 201, 5, 'com_content.category.23', 'Templates', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(49, 45, 202, 203, 5, 'com_content.category.24', 'Languages', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(50, 45, 204, 223, 5, 'com_content.category.25', 'Plugins', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(51, 39, 248, 279, 3, 'com_content.category.26', 'Park Site', '{"core.create":{"10":0,"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(52, 51, 249, 254, 4, 'com_content.category.27', 'Park Blog', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(53, 51, 255, 276, 4, 'com_content.category.28', 'Photo Gallery', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(54, 39, 280, 293, 3, 'com_content.category.29', 'Fruit Shop Site', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(55, 54, 281, 286, 4, 'com_content.category.30', 'Growers', '{"core.create":{"12":0},"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":{"10":1}}'),
+(56, 43, 350, 351, 3, 'com_weblinks.category.31', 'Park Links', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(57, 43, 352, 355, 3, 'com_weblinks.category.32', 'Joomla! Specific Links', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(58, 57, 353, 354, 4, 'com_weblinks.category.33', 'Other Resources', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(59, 41, 26, 27, 3, 'com_contact.category.34', 'Park Site', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(60, 41, 28, 85, 3, 'com_contact.category.35', 'Shop Site', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(61, 60, 29, 30, 4, 'com_contact.category.36', 'Staff', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
@@ -95,78 +95,83 @@
(93, 47, 129, 144, 6, 'com_content.category.64', 'Content Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(94, 47, 145, 152, 6, 'com_content.category.65', 'User Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(95, 47, 153, 166, 6, 'com_content.category.66', 'Display Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(96, 47, 167, 178, 6, 'com_content.category.67', 'Utility Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(97, 48, 189, 190, 6, 'com_content.category.68', 'Atomic', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(98, 48, 191, 192, 6, 'com_content.category.69', 'Beez 20', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(99, 48, 193, 194, 6, 'com_content.category.70', 'Beez5', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(100, 48, 195, 196, 6, 'com_content.category.71', 'Milky Way', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(101, 50, 203, 204, 6, 'com_content.article.5', 'Authentication', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(102, 51, 271, 272, 4, 'com_content.article.6', 'Australian Parks ', '{"core.delete":[],"core.edit":{"2":1},"core.edit.state":[]}'),
+(96, 47, 167, 180, 6, 'com_content.category.67', 'Utility Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(97, 48, 191, 192, 6, 'com_content.category.68', 'Atomic', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(98, 48, 193, 194, 6, 'com_content.category.69', 'Beez 20', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(99, 48, 195, 196, 6, 'com_content.category.70', 'Beez5', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(100, 48, 197, 198, 6, 'com_content.category.71', 'Milky Way', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(101, 50, 205, 206, 6, 'com_content.article.5', 'Authentication', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(102, 51, 277, 278, 4, 'com_content.article.6', 'Australian Parks ', '{"core.delete":[],"core.edit":{"2":1},"core.edit.state":[]}'),
(103, 95, 154, 155, 7, 'com_content.article.7', 'Banner Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(104, 44, 219, 220, 4, 'com_content.article.8', 'Beginners', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(104, 44, 225, 226, 4, 'com_content.article.8', 'Beginners', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(105, 46, 115, 116, 6, 'com_content.article.9', 'Contact', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(106, 46, 117, 118, 6, 'com_content.article.10', 'Content', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(107, 109, 261, 262, 6, 'com_content.article.11', 'Cradle Mountain', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(108, 53, 250, 259, 5, 'com_content.category.72', 'Animals', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(109, 53, 260, 269, 5, 'com_content.category.73', 'Scenery', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(107, 109, 267, 268, 6, 'com_content.article.11', 'Cradle Mountain', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(108, 53, 256, 265, 5, 'com_content.category.72', 'Animals', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(109, 53, 266, 275, 5, 'com_content.category.73', 'Scenery', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(110, 95, 156, 157, 7, 'com_content.article.12', 'Custom HTML Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(111, 54, 281, 282, 4, 'com_content.article.13', 'Directions', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(112, 50, 205, 206, 6, 'com_content.article.14', 'Editors', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(113, 50, 207, 208, 6, 'com_content.article.15', 'Editors-xtd', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(111, 54, 287, 288, 4, 'com_content.article.13', 'Directions', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(112, 50, 207, 208, 6, 'com_content.article.14', 'Editors', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(113, 50, 209, 210, 6, 'com_content.article.15', 'Editors-xtd', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(114, 95, 158, 159, 7, 'com_content.article.16', 'Feed Display', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(115, 52, 244, 245, 5, 'com_content.article.17', 'First Blog Post', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(116, 52, 246, 247, 5, 'com_content.article.18', 'Second Blog Post', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(115, 52, 250, 251, 5, 'com_content.article.17', 'First Blog Post', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(116, 52, 252, 253, 5, 'com_content.article.18', 'Second Blog Post', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(117, 95, 160, 161, 7, 'com_content.article.19', 'Footer Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(118, 54, 283, 284, 4, 'com_content.article.20', 'Fruit Shop', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(119, 44, 221, 222, 4, 'com_content.article.21', 'Getting Help', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(120, 44, 223, 224, 4, 'com_content.article.22', 'Getting Started', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(121, 55, 276, 277, 5, 'com_content.article.23', 'Happy Orange Orchard', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(122, 44, 225, 226, 4, 'com_content.article.24', 'Joomla!', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(123, 108, 251, 252, 6, 'com_content.article.25', 'Koala', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(118, 54, 289, 290, 4, 'com_content.article.20', 'Fruit Shop', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(119, 44, 227, 228, 4, 'com_content.article.21', 'Getting Help', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(120, 44, 229, 230, 4, 'com_content.article.22', 'Getting Started', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(121, 55, 282, 283, 5, 'com_content.article.23', 'Happy Orange Orchard', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(122, 44, 231, 232, 4, 'com_content.article.24', 'Joomla!', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(123, 108, 257, 258, 6, 'com_content.article.25', 'Koala', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(124, 96, 168, 169, 7, 'com_content.article.26', 'Language Switcher', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(125, 93, 136, 137, 7, 'com_content.article.27', 'Latest Articles Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(126, 94, 146, 147, 7, 'com_content.article.28', 'Login Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(127, 166, 182, 183, 7, 'com_content.article.29', 'Menu Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(127, 166, 184, 185, 7, 'com_content.article.29', 'Menu Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(128, 93, 138, 139, 7, 'com_content.article.30', 'Most Read Content', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(129, 93, 140, 141, 7, 'com_content.article.31', 'News Flash', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(130, 44, 227, 228, 4, 'com_content.article.32', 'Parameters', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(131, 108, 253, 254, 6, 'com_content.article.33', 'Phyllopteryx', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(132, 109, 263, 264, 6, 'com_content.article.34', 'Pinnacles', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(133, 44, 229, 230, 4, 'com_content.article.35', 'Professionals', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(130, 44, 233, 234, 4, 'com_content.article.32', 'Parameters', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(131, 108, 259, 260, 6, 'com_content.article.33', 'Phyllopteryx', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(132, 109, 269, 270, 6, 'com_content.article.34', 'Pinnacles', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(133, 44, 235, 236, 4, 'com_content.article.35', 'Professionals', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(134, 95, 162, 163, 7, 'com_content.article.36', 'Random Image Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(135, 93, 142, 143, 7, 'com_content.article.37', 'Related Items Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(136, 44, 231, 232, 4, 'com_content.article.38', 'Sample Sites', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(136, 44, 237, 238, 4, 'com_content.article.38', 'Sample Sites', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(137, 46, 119, 120, 6, 'com_content.article.39', 'Search', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(138, 96, 170, 171, 7, 'com_content.article.40', 'Search Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(139, 50, 209, 210, 6, 'com_content.article.41', 'Search ', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(140, 39, 288, 289, 3, 'com_content.article.42', 'Site Map', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(141, 108, 255, 256, 6, 'com_content.article.43', 'Spotted Quoll', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(139, 50, 211, 212, 6, 'com_content.article.41', 'Search ', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(140, 39, 294, 295, 3, 'com_content.article.42', 'Site Map', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(141, 108, 261, 262, 6, 'com_content.article.43', 'Spotted Quoll', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(142, 96, 172, 173, 7, 'com_content.article.44', 'Statistics Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(143, 96, 174, 175, 7, 'com_content.article.45', 'Syndicate Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(144, 50, 211, 212, 6, 'com_content.article.46', 'System', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(145, 44, 233, 234, 4, 'com_content.article.47', 'The Joomla! Community', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(146, 44, 235, 236, 4, 'com_content.article.48', 'The Joomla! Project', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(147, 48, 197, 198, 6, 'com_content.article.49', 'Typography', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(148, 44, 237, 238, 4, 'com_content.article.50', 'Upgraders', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(149, 50, 213, 214, 6, 'com_content.article.51', 'User', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(144, 50, 213, 214, 6, 'com_content.article.46', 'System', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(145, 44, 239, 240, 4, 'com_content.article.47', 'The Joomla! Community', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(146, 44, 241, 242, 4, 'com_content.article.48', 'The Joomla! Project', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(147, 48, 199, 200, 6, 'com_content.article.49', 'Typography', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(148, 44, 243, 244, 4, 'com_content.article.50', 'Upgraders', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(149, 50, 215, 216, 6, 'com_content.article.51', 'User', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(150, 46, 121, 122, 6, 'com_content.article.52', 'Users', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(151, 44, 239, 240, 4, 'com_content.article.53', 'Using Joomla!', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(151, 44, 245, 246, 4, 'com_content.article.53', 'Using Joomla!', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(152, 46, 123, 124, 6, 'com_content.article.54', 'Weblinks', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(153, 95, 164, 165, 7, 'com_content.article.55', 'Weblinks Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(154, 94, 148, 149, 7, 'com_content.article.56', 'Who''s Online', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(155, 108, 257, 258, 6, 'com_content.article.57', 'Wobbegone', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(156, 55, 278, 279, 5, 'com_content.article.58', 'Wonderful Watermelon', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(155, 108, 263, 264, 6, 'com_content.article.57', 'Wobbegone', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(156, 55, 284, 285, 5, 'com_content.article.58', 'Wonderful Watermelon', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(157, 96, 176, 177, 7, 'com_content.article.59', 'Wrapper Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(158, 46, 125, 126, 6, 'com_content.article.60', 'News Feeds', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(159, 166, 184, 185, 7, 'com_content.article.61', 'Breadcrumbs Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(160, 50, 215, 216, 6, 'com_content.article.62', 'Content', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(162, 109, 265, 266, 6, 'com_content.article.64', 'Blue Mountain Rain Forest', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(163, 109, 267, 268, 6, 'com_content.article.65', 'Ormiston Pound', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(159, 166, 186, 187, 7, 'com_content.article.61', 'Breadcrumbs Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(160, 50, 217, 218, 6, 'com_content.article.62', 'Content', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(162, 109, 271, 272, 6, 'com_content.article.64', 'Blue Mountain Rain Forest', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(163, 109, 273, 274, 6, 'com_content.article.65', 'Ormiston Pound', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
(165, 94, 150, 151, 7, 'com_content.article.66', 'Latest Users Module', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(166, 47, 181, 186, 6, 'com_content.category.75', 'Navigation Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
-(167, 54, 285, 286, 4, 'com_content.category.76', 'Recipes', '{"core.create":{"12":1,"10":1},"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":{"12":1,"10":1}}'),
+(166, 47, 183, 188, 6, 'com_content.category.75', 'Navigation Modules', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'),
+(167, 54, 291, 292, 4, 'com_content.category.76', 'Recipes', '{"core.create":{"12":1,"10":1},"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":{"12":1,"10":1}}'),
(168, 34, 106, 107, 3, 'com_content.article.67', 'What''s New in 1.5?', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
-(169, 24, 331, 332, 2, 'com_users.notes.category.77', 'Uncategorised', '');
+(169, 24, 337, 338, 2, 'com_users.notes.category.77', 'Uncategorised', ''),
+(170, 50, 219, 220, 6, 'com_content.article.68', 'Captcha', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(171, 50, 221, 222, 6, 'com_content.article.69', 'Quick Icons', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(172, 96, 178, 179, 7, 'com_content.article.70', 'Smart Search', '{"core.delete":[],"core.edit":[],"core.edit.state":[]}'),
+(173, 1, 422, 423, 1, 'com_joomlaupdate', 'com_joomlaupdate', '{"core.admin":[],"core.manage":[],"core.delete":[],"core.edit.state":[]}');
+
--
-- Dumping data for table `#__banners`
--
@@ -392,6 +397,7 @@
(19, 'menu', 'com_weblinks_links', 'Links', '', 'Weblinks/Links', 'index.php?option=com_weblinks', 'component', 0, 18, 2, 21, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks', 0, '', 48, 49, 0, '*', 1),
(20, 'menu', 'com_weblinks_categories', 'Categories', '', 'Weblinks/Categories', 'index.php?option=com_categories&extension=com_weblinks', 'component', 0, 18, 2, 6, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:weblinks-cat', 0, '', 50, 51, 0, '*', 1),
(21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 41, 42, 0, '*', 1),
+(22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1),
(201, 'usermenu', 'Your Profile', 'your-profile', '', 'your-profile', 'index.php?option=com_users&view=profile', 'component', 1, 1, 1, 25, 0, 0, '0000-00-00 00:00:00', 0, 2, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 237, 238, 0, '*', 0),
(207, 'top', 'Joomla.org', 'joomlaorg', '', 'joomlaorg', 'http://joomla.org', 'url', 1, 1, 1, 0, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":""}', 235, 236, 0, '*', 0),
(227, 'aboutjoomla', 'Weblinks Categories', 'weblinks-categories', '', 'using-joomla/extensions/components/weblinks-component/weblinks-categories', 'index.php?option=com_weblinks&view=categories&id=18', 'component', 1, 265, 5, 21, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_base_description":"","categories_description":"","maxLevelcat":"-1","show_empty_categories_cat":"","show_subcat_desc_cat":"","show_cat_num_links_cat":"","show_category_title":"","show_description":"","show_description_image":"","maxLevel":"-1","show_empty_categories":"","show_subcat_desc":"","show_cat_num_links":"","show_pagination_limit":"","show_headings":"","show_link_description":"","show_link_hits":"","show_pagination":"","show_pagination_results":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 89, 90, 0, '*', 0),

Added: development/trunk/media/com_joomlaupdate/default.js
===================================================================
--- development/trunk/media/com_joomlaupdate/default.js (rev 0)
+++ development/trunk/media/com_joomlaupdate/default.js 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,21 @@
+window.addEvent('domready', function () {
+ em = document.id('extraction_method');
+ if (em) {
+ em.addEvent('change', function () {
+ if(em.value == 'direct') {
+ document.id('row_ftp_hostname').style.display = 'none';
+ document.id('row_ftp_port').style.display = 'none';
+ document.id('row_ftp_username').style.display = 'none';
+ document.id('row_ftp_password').style.display = 'none';
+ document.id('row_ftp_directory').style.display = 'none';
+ } else {
+ document.id('row_ftp_hostname').style.display = 'table-row';
+ document.id('row_ftp_port').style.display = 'table-row';
+ document.id('row_ftp_username').style.display = 'table-row';
+ document.id('row_ftp_password').style.display = 'table-row';
+ document.id('row_ftp_directory').style.display = 'table-row';
+ }
+ });
+ }
+
+});
\ No newline at end of file

Added: development/trunk/media/com_joomlaupdate/encryption.js
===================================================================
--- development/trunk/media/com_joomlaupdate/encryption.js (rev 0)
+++ development/trunk/media/com_joomlaupdate/encryption.js 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,457 @@
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+/* AES implementation in JavaScript (c) Chris Veness 2005-2010 */
+/* - see http://csrc.nist.gov/publications/PubsFIPS.html#197 */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+var Aes = {}; // Aes namespace
+
+/**
+ * AES Cipher function: encrypt 'input' state with Rijndael algorithm
+ * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage
+ *
+ * @param {Number[]} input 16-byte (128-bit) input state array
+ * @param {Number[][]} w Key schedule as 2D byte-array (Nr+1 x Nb bytes)
+ * @returns {Number[]} Encrypted output state array
+ */
+Aes.Cipher = function(input, w) { // main Cipher function [§5.1]
+ var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4]
+ for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i];
+
+ state = Aes.AddRoundKey(state, w, 0, Nb);
+
+ for (var round=1; round<Nr; round++) {
+ state = Aes.SubBytes(state, Nb);
+ state = Aes.ShiftRows(state, Nb);
+ state = Aes.MixColumns(state, Nb);
+ state = Aes.AddRoundKey(state, w, round, Nb);
+ }
+
+ state = Aes.SubBytes(state, Nb);
+ state = Aes.ShiftRows(state, Nb);
+ state = Aes.AddRoundKey(state, w, Nr, Nb);
+
+ var output = new Array(4*Nb); // convert state to 1-d array before returning [§3.4]
+ for (var i=0; i<4*Nb; i++) output[i] = state[i%4][Math.floor(i/4)];
+ return output;
+}
+
+/**
+ * Perform Key Expansion to generate a Key Schedule
+ *
+ * @param {Number[]} key Key as 16/24/32-byte array
+ * @returns {Number[][]} Expanded key schedule as 2D byte-array (Nr+1 x Nb bytes)
+ */
+Aes.KeyExpansion = function(key) { // generate Key Schedule (byte-array Nr+1 x Nb) from Key [§5.2]
+ var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
+ var Nk = key.length/4 // key length (in words): 4/6/8 for 128/192/256-bit keys
+ var Nr = Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys
+
+ var w = new Array(Nb*(Nr+1));
+ var temp = new Array(4);
+
+ for (var i=0; i<Nk; i++) {
+ var r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]];
+ w[i] = r;
+ }
+
+ for (var i=Nk; i<(Nb*(Nr+1)); i++) {
+ w[i] = new Array(4);
+ for (var t=0; t<4; t++) temp[t] = w[i-1][t];
+ if (i % Nk == 0) {
+ temp = Aes.SubWord(Aes.RotWord(temp));
+ for (var t=0; t<4; t++) temp[t] ^= Aes.Rcon[i/Nk][t];
+ } else if (Nk > 6 && i%Nk == 4) {
+ temp = Aes.SubWord(temp);
+ }
+ for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t];
+ }
+
+ return w;
+}
+
+/*
+ * ---- remaining routines are private, not called externally ----
+ */
+
+Aes.SubBytes = function(s, Nb) { // apply SBox to state S [§5.1.1]
+ for (var r=0; r<4; r++) {
+ for (var c=0; c<Nb; c++) s[r][c] = Aes.Sbox[s[r][c]];
+ }
+ return s;
+}
+
+Aes.ShiftRows = function(s, Nb) { // shift row r of state S left by r bytes [§5.1.2]
+ var t = new Array(4);
+ for (var r=1; r<4; r++) {
+ for (var c=0; c<4; c++) t[c] = s[r][(c+r)%Nb]; // shift into temp copy
+ for (var c=0; c<4; c++) s[r][c] = t[c]; // and copy back
+ } // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):
+ return s; // see asmaes.sourceforge.net/rijndael/rijndaelImplementation.pdf
+}
+
+Aes.MixColumns = function(s, Nb) { // combine bytes of each col of state S [§5.1.3]
+ for (var c=0; c<4; c++) {
+ var a = new Array(4); // 'a' is a copy of the current column from 's'
+ var b = new Array(4); // 'b' is a•{02} in GF(2^8)
+ for (var i=0; i<4; i++) {
+ a[i] = s[i][c];
+ b[i] = s[i][c]&0x80 ? s[i][c]<<1 ^ 0x011b : s[i][c]<<1;
+ }
+ // a[n] ^ b[n] is a•{03} in GF(2^8)
+ s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; // 2*a0 + 3*a1 + a2 + a3
+ s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; // a0 * 2*a1 + 3*a2 + a3
+ s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; // a0 + a1 + 2*a2 + 3*a3
+ s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]; // 3*a0 + a1 + a2 + 2*a3
+ }
+ return s;
+}
+
+Aes.AddRoundKey = function(state, w, rnd, Nb) { // xor Round Key into state S [§5.1.4]
+ for (var r=0; r<4; r++) {
+ for (var c=0; c<Nb; c++) state[r][c] ^= w[rnd*4+c][r];
+ }
+ return state;
+}
+
+Aes.SubWord = function(w) { // apply SBox to 4-byte word w
+ for (var i=0; i<4; i++) w[i] = Aes.Sbox[w[i]];
+ return w;
+}
+
+Aes.RotWord = function(w) { // rotate 4-byte word w left by one byte
+ var tmp = w[0];
+ for (var i=0; i<3; i++) w[i] = w[i+1];
+ w[3] = tmp;
+ return w;
+}
+
+// Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [§5.1.1]
+Aes.Sbox = [0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
+ 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
+ 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
+ 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
+ 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
+ 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
+ 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
+ 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
+ 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
+ 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
+ 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
+ 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
+ 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
+ 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
+ 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
+ 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16];
+
+// Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2]
+Aes.Rcon = [ [0x00, 0x00, 0x00, 0x00],
+ [0x01, 0x00, 0x00, 0x00],
+ [0x02, 0x00, 0x00, 0x00],
+ [0x04, 0x00, 0x00, 0x00],
+ [0x08, 0x00, 0x00, 0x00],
+ [0x10, 0x00, 0x00, 0x00],
+ [0x20, 0x00, 0x00, 0x00],
+ [0x40, 0x00, 0x00, 0x00],
+ [0x80, 0x00, 0x00, 0x00],
+ [0x1b, 0x00, 0x00, 0x00],
+ [0x36, 0x00, 0x00, 0x00] ];
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+/* AES Counter-mode implementation in JavaScript (c) Chris Veness 2005-2010 */
+/* - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+var AesCtr = {}; // AesCtr namespace
+
+/**
+ * Encrypt a text using AES encryption in Counter mode of operation
+ *
+ * Unicode multi-byte character safe
+ *
+ * @param {String} plaintext Source text to be encrypted
+ * @param {String} password The password to use to generate a key
+ * @param {Number} nBits Number of bits to be used in the key (128, 192, or 256)
+ * @returns {string} Encrypted text
+ */
+AesCtr.encrypt = function(plaintext, password, nBits) {
+ var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
+ plaintext = Utf8.encode(plaintext);
+ password = Utf8.encode(password);
+ //var t = new Date(); // timer
+
+ // use AES itself to encrypt password to get cipher key (using plain password as source for key
+ // expansion) - gives us well encrypted key
+ var nBytes = nBits/8; // no bytes in key
+ var pwBytes = new Array(nBytes);
+ for (var i=0; i<nBytes; i++) {
+ pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 : password.charCodeAt(i);
+ }
+ var key = Aes.Cipher(pwBytes, Aes.KeyExpansion(pwBytes)); // gives us 16-byte key
+ key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32 bytes long
+
+ // initialise counter block (NIST SP800-38A §B.2): millisecond time-stamp for nonce in 1st 8 bytes,
+ // block counter in 2nd 8 bytes
+ var counterBlock = new Array(blockSize);
+ var nonce = (new Date()).getTime(); // timestamp: milliseconds since 1-Jan-1970
+ var nonceSec = Math.floor(nonce/1000);
+ var nonceMs = nonce%1000;
+ // encode nonce with seconds in 1st 4 bytes, and (repeated) ms part filling 2nd 4 bytes
+ for (var i=0; i<4; i++) counterBlock[i] = (nonceSec >>> i*8) & 0xff;
+ for (var i=0; i<4; i++) counterBlock[i+4] = nonceMs & 0xff;
+ // and convert it to a string to go on the front of the ciphertext
+ var ctrTxt = '';
+ for (var i=0; i<8; i++) ctrTxt += String.fromCharCode(counterBlock[i]);
+
+ // generate key schedule - an expansion of the key into distinct Key Rounds for each round
+ var keySchedule = Aes.KeyExpansion(key);
+
+ var blockCount = Math.ceil(plaintext.length/blockSize);
+ var ciphertxt = new Array(blockCount); // ciphertext as array of strings
+
+ for (var b=0; b<blockCount; b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ // done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB)
+ for (var c=0; c<4; c++) counterBlock[15-c] = (b >>> c*8) & 0xff;
+ for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000 >>> c*8)
+
+ var cipherCntr = Aes.Cipher(counterBlock, keySchedule); // -- encrypt counter block --
+
+ // block size is reduced on final block
+ var blockLength = b<blockCount-1 ? blockSize : (plaintext.length-1)%blockSize+1;
+ var cipherChar = new Array(blockLength);
+
+ for (var i=0; i<blockLength; i++) { // -- xor plaintext with ciphered counter char-by-char --
+ cipherChar[i] = cipherCntr[i] ^ plaintext.charCodeAt(b*blockSize+i);
+ cipherChar[i] = String.fromCharCode(cipherChar[i]);
+ }
+ ciphertxt[b] = cipherChar.join('');
+ }
+
+ // Array.join is more efficient than repeated string concatenation in IE
+ var ciphertext = ctrTxt + ciphertxt.join('');
+ ciphertext = Base64.encode(ciphertext); // encode in base64
+
+ //alert((new Date()) - t);
+ return ciphertext;
+}
+
+/**
+ * Decrypt a text encrypted by AES in counter mode of operation
+ *
+ * @param {String} ciphertext Source text to be encrypted
+ * @param {String} password The password to use to generate a key
+ * @param {Number} nBits Number of bits to be used in the key (128, 192, or 256)
+ * @returns {String} Decrypted text
+ */
+AesCtr.decrypt = function(ciphertext, password, nBits) {
+ var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
+ if (!(nBits==128 || nBits==192 || nBits==256)) return ''; // standard allows 128/192/256 bit keys
+ ciphertext = Base64.decode(ciphertext);
+ password = Utf8.encode(password);
+ //var t = new Date(); // timer
+
+ // use AES to encrypt password (mirroring encrypt routine)
+ var nBytes = nBits/8; // no bytes in key
+ var pwBytes = new Array(nBytes);
+ for (var i=0; i<nBytes; i++) {
+ pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 : password.charCodeAt(i);
+ }
+ var key = Aes.Cipher(pwBytes, Aes.KeyExpansion(pwBytes));
+ key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32 bytes long
+
+ // recover nonce from 1st 8 bytes of ciphertext
+ var counterBlock = new Array(8);
+ ctrTxt = ciphertext.slice(0, 8);
+ for (var i=0; i<8; i++) counterBlock[i] = ctrTxt.charCodeAt(i);
+
+ // generate key schedule
+ var keySchedule = Aes.KeyExpansion(key);
+
+ // separate ciphertext into blocks (skipping past initial 8 bytes)
+ var nBlocks = Math.ceil((ciphertext.length-8) / blockSize);
+ var ct = new Array(nBlocks);
+ for (var b=0; b<nBlocks; b++) ct[b] = ciphertext.slice(8+b*blockSize, 8+b*blockSize+blockSize);
+ ciphertext = ct; // ciphertext is now array of block-length strings
+
+ // plaintext will get generated block-by-block into array of block-length strings
+ var plaintxt = new Array(ciphertext.length);
+
+ for (var b=0; b<nBlocks; b++) {
+ // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
+ for (var c=0; c<4; c++) counterBlock[15-c] = ((b) >>> c*8) & 0xff;
+ for (var c=0; c<4; c++) counterBlock[15-c-4] = (((b+1)/0x100000000-1) >>> c*8) & 0xff;
+
+ var cipherCntr = Aes.Cipher(counterBlock, keySchedule); // encrypt counter block
+
+ var plaintxtByte = new Array(ciphertext[b].length);
+ for (var i=0; i<ciphertext[b].length; i++) {
+ // -- xor plaintxt with ciphered counter byte-by-byte --
+ plaintxtByte[i] = cipherCntr[i] ^ ciphertext[b].charCodeAt(i);
+ plaintxtByte[i] = String.fromCharCode(plaintxtByte[i]);
+ }
+ plaintxt[b] = plaintxtByte.join('');
+ }
+
+ // join array of blocks into single plaintext string
+ var plaintext = plaintxt.join('');
+ plaintext = Utf8.decode(plaintext); // decode from UTF8 back to Unicode multi-byte chars
+
+ //alert((new Date()) - t);
+ return plaintext;
+}
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+/* Base64 class: Base 64 encoding / decoding (c) Chris Veness 2002-2010 */
+/* note: depends on Utf8 class */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+var Base64 = {}; // Base64 namespace
+
+Base64.code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+/**
+ * Encode string into Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
+ * (instance method extending String object). As per RFC 4648, no newlines are added.
+ *
+ * @param {String} str The string to be encoded as base-64
+ * @param {Boolean} [utf8encode=false] Flag to indicate whether str is Unicode string to be encoded
+ * to UTF8 before conversion to base64; otherwise string is assumed to be 8-bit characters
+ * @returns {String} Base64-encoded string
+ */
+Base64.encode = function(str, utf8encode) { // http://tools.ietf.org/html/rfc4648
+ utf8encode = (typeof utf8encode == 'undefined') ? false : utf8encode;
+ var o1, o2, o3, bits, h1, h2, h3, h4, e=[], pad = '', c, plain, coded;
+ var b64 = Base64.code;
+
+ plain = utf8encode ? str.encodeUTF8() : str;
+
+ c = plain.length % 3; // pad string to length of multiple of 3
+ if (c > 0) { while (c++ < 3) { pad += '='; plain += '\0'; } }
+ // note: doing padding here saves us doing special-case packing for trailing 1 or 2 chars
+
+ for (c=0; c<plain.length; c+=3) { // pack three octets into four hexets
+ o1 = plain.charCodeAt(c);
+ o2 = plain.charCodeAt(c+1);
+ o3 = plain.charCodeAt(c+2);
+
+ bits = o1<<16 | o2<<8 | o3;
+
+ h1 = bits>>18 & 0x3f;
+ h2 = bits>>12 & 0x3f;
+ h3 = bits>>6 & 0x3f;
+ h4 = bits & 0x3f;
+
+ // use hextets to index into code string
+ e[c/3] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
+ }
+ coded = e.join(''); // join() is far faster than repeated string concatenation in IE
+
+ // replace 'A's from padded nulls with '='s
+ coded = coded.slice(0, coded.length-pad.length) + pad;
+
+ return coded;
+}
+
+/**
+ * Decode string from Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
+ * (instance method extending String object). As per RFC 4648, newlines are not catered for.
+ *
+ * @param {String} str The string to be decoded from base-64
+ * @param {Boolean} [utf8decode=false] Flag to indicate whether str is Unicode string to be decoded
+ * from UTF8 after conversion from base64
+ * @returns {String} decoded string
+ */
+Base64.decode = function(str, utf8decode) {
+ utf8decode = (typeof utf8decode == 'undefined') ? false : utf8decode;
+ var o1, o2, o3, h1, h2, h3, h4, bits, d=[], plain, coded;
+ var b64 = Base64.code;
+
+ coded = utf8decode ? str.decodeUTF8() : str;
+
+
+ for (var c=0; c<coded.length; c+=4) { // unpack four hexets into three octets
+ h1 = b64.indexOf(coded.charAt(c));
+ h2 = b64.indexOf(coded.charAt(c+1));
+ h3 = b64.indexOf(coded.charAt(c+2));
+ h4 = b64.indexOf(coded.charAt(c+3));
+
+ bits = h1<<18 | h2<<12 | h3<<6 | h4;
+
+ o1 = bits>>>16 & 0xff;
+ o2 = bits>>>8 & 0xff;
+ o3 = bits & 0xff;
+
+ d[c/4] = String.fromCharCode(o1, o2, o3);
+ // check for padding
+ if (h4 == 0x40) d[c/4] = String.fromCharCode(o1, o2);
+ if (h3 == 0x40) d[c/4] = String.fromCharCode(o1);
+ }
+ plain = d.join(''); // join() is far faster than repeated string concatenation in IE
+
+ return utf8decode ? plain.decodeUTF8() : plain;
+}
+
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+/* Utf8 class: encode / decode between multi-byte Unicode characters and UTF-8 multiple */
+/* single-byte character encoding (c) Chris Veness 2002-2010 */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+var Utf8 = {}; // Utf8 namespace
+
+/**
+ * Encode multi-byte Unicode string into utf-8 multiple single-byte characters
+ * (BMP / basic multilingual plane only)
+ *
+ * Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars
+ *
+ * @param {String} strUni Unicode string to be encoded as UTF-8
+ * @returns {String} encoded string
+ */
+Utf8.encode = function(strUni) {
+ // use regular expressions & String.replace callback function for better efficiency
+ // than procedural approaches
+ var strUtf = strUni.replace(
+ /[\u0080-\u07ff]/g, // U+0080 - U+07FF => 2 bytes 110yyyyy, 10zzzzzz
+ function(c) {
+ var cc = c.charCodeAt(0);
+ return String.fromCharCode(0xc0 | cc>>6, 0x80 | cc&0x3f); }
+ );
+ strUtf = strUtf.replace(
+ /[\u0800-\uffff]/g, // U+0800 - U+FFFF => 3 bytes 1110xxxx, 10yyyyyy, 10zzzzzz
+ function(c) {
+ var cc = c.charCodeAt(0);
+ return String.fromCharCode(0xe0 | cc>>12, 0x80 | cc>>6&0x3F, 0x80 | cc&0x3f); }
+ );
+ return strUtf;
+}
+
+/**
+ * Decode utf-8 encoded string back into multi-byte Unicode characters
+ *
+ * @param {String} strUtf UTF-8 string to be decoded back to Unicode
+ * @returns {String} decoded string
+ */
+Utf8.decode = function(strUtf) {
+ var strUni = strUtf.replace(
+ /[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars
+ function(c) { // (note parentheses for precence)
+ var cc = (c.charCodeAt(0)&0x1f)<<6 | c.charCodeAt(1)&0x3f;
+ return String.fromCharCode(cc); }
+ );
+ strUni = strUni.replace(
+ /[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars
+ function(c) { // (note parentheses for precence)
+ var cc = ((c.charCodeAt(0)&0x0f)<<12) | ((c.charCodeAt(1)&0x3f)<<6) | ( c.charCodeAt(2)&0x3f);
+ return String.fromCharCode(cc); }
+ );
+ return strUni;
+}
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
\ No newline at end of file

Added: development/trunk/media/com_joomlaupdate/json2.js
===================================================================
--- development/trunk/media/com_joomlaupdate/json2.js (rev 0)
+++ development/trunk/media/com_joomlaupdate/json2.js 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,35 @@
+/*
+ * http://www.JSON.org/json2.js
+ * 2009-09-29
+ * Public Domain.
+ * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+ * See http://www.JSON.org/js.html
+ */
+if(!this.JSON){this.JSON={};}
+(function(){function f(n){return n<10?'0'+n:n;}
+if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
+f(this.getUTCMonth()+1)+'-'+
+f(this.getUTCDate())+'T'+
+f(this.getUTCHours())+':'+
+f(this.getUTCMinutes())+':'+
+f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
+var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
+function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
+if(typeof rep==='function'){value=rep.call(holder,key,value);}
+switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
+gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
+v=partial.length===0?'[]':gap?'[\n'+gap+
+partial.join(',\n'+gap)+'\n'+
+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
+if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
+v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
+if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
+rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
+return str('',{'':value});};}
+if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
+return reviver.call(holder,key,value);}
+cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
+if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
+throw new SyntaxError('JSON.parse');};}}());
\ No newline at end of file

Added: development/trunk/media/com_joomlaupdate/update.js
===================================================================
--- development/trunk/media/com_joomlaupdate/update.js (rev 0)
+++ development/trunk/media/com_joomlaupdate/update.js 2012-03-28 18:36:44 UTC (rev 22957)
@@ -0,0 +1,187 @@
+var joomlaupdate_error_callback = dummy_error_handler;
+var joomlaupdate_stat_inbytes = 0;
+var joomlaupdate_stat_outbytes = 0;
+var joomlaupdate_stat_files = 0;
+var joomlaupdate_factory = null;
+
+/**
+ * An extremely simple error handler, dumping error messages to screen
+ *
+ * @param error The error message string
+ */
+function dummy_error_handler(error)
+{
+ alert("ERROR:\n"+error);
+}
+
+/**
+ * Performs an AJAX request and returns the parsed JSON output.
+ *
+ * @param data An object with the query data, e.g. a serialized form
+ * @param successCallback A function accepting a single object parameter, called on success
+ * @param errorCallback A function accepting a single string parameter, called on failure
+ */
+function doAjax(data, successCallback, errorCallback)
+{
+ var json = JSON.stringify(data);
+ if( joomlaupdate_password.length > 0 )
+ {
+ json = AesCtr.encrypt( json, joomlaupdate_password, 128 );
+ }
+ var post_data = 'json='+encodeURIComponent(json);
+
+
+ var structure =
+ {
+ onSuccess: function(msg, responseXML)
+ {
+ // Initialize
+ var junk = null;
+ var message = "";
+
+ // Get rid of junk before the data
+ var valid_pos = msg.indexOf('###');
+ if( valid_pos == -1 ) {
+ // Valid data not found in the response
+ msg = 'Invalid AJAX data:\n' + msg;
+ if(joomlaupdate_error_callback != null)
+ {
+ joomlaupdate_error_callback(msg);
+ }
+ return;
+ } else if( valid_pos != 0 ) {
+ // Data is prefixed with junk
+ junk = msg.substr(0, valid_pos);
+ message = msg.substr(valid_pos);
+ }
+ else
+ {
+ message = msg;
+ }
+ message = message.substr(3); // Remove triple hash in the beginning
+
+ // Get of rid of junk after the data
+ var valid_pos = message.lastIndexOf('###');
+ message = message.substr(0, valid_pos); // Remove triple hash in the end
+ // Decrypt if required
+ if( joomlaupdate_password.length > 0 )
+ {
+ try {
+ var data = JSON.parse(message);
+ } catch(err) {
+ message = AesCtr.decrypt(message, joomlaupdate_password, 128);
+ }
+ }
+
+ try {
+ var data = JSON.parse(message);
+ } catch(err) {
+ var msg = err.message + "\n<br/>\n<pre>\n" + message + "\n</pre>";
+ if(joomlaupdate_error_callback != null)
+ {
+ joomlaupdate_error_callback(msg);
+ }
+ return;
+ }
+
+ // Call the callback function
+ successCallback(data);
+ },
+ onFailure: function(req) {
+ var message = 'AJAX Loading Error: '+req.statusText;
+ if(joomlaupdate_error_callback != null)
+ {
+ joomlaupdate_error_callback(msg);
+ }
+ }
+ };
+
+ var ajax_object = null;
+ structure.url = joomlaupdate_ajax_url;
+ ajax_object = new Request(structure);
+ ajax_object.send(post_data);
+}
+
+/**
+ * Pings the update script (making sure its executable!!)
+ * @return
+ */
+function pingUpdate()
+{
+ // Reset variables
+ joomlaupdate_stat_files = 0;
+ joomlaupdate_stat_inbytes = 0;
+ joomlaupdate_stat_outbytes = 0;
+
+ // Do AJAX post
+ var post = {task : 'ping'};
+ doAjax(post, function(data){
+ startUpdate(data);
+ });
+}
+
+/**
+ * Starts the update
+ * @return
+ */
+function startUpdate()
+{
+ // Reset variables
+ joomlaupdate_stat_files = 0;
+ joomlaupdate_stat_inbytes = 0;
+ joomlaupdate_stat_outbytes = 0;
+
+ var post = { task : 'startRestore' };
+ doAjax(post, function(data){
+ processUpdateStep(data);
+ });
+}
+
+/**
+ * Steps through the update
+ * @param data
+ * @return
+ */
+function processUpdateStep(data)
+{
+ if(data.status == false)
+ {
+ if(joomlaupdate_error_callback != null)
+ {
+ joomlaupdate_error_callback(data.message);
+ }
+ }
+ else
+ {
+ if(data.done)
+ {
+ joomlaupdate_factory = data.factory;
+ window.location = joomlaupdate_return_url;
+ }
+ else
+ {
+ // Add data to variables
+ joomlaupdate_stat_inbytes += data.bytesIn;
+ joomlaupdate_stat_outbytes += data.bytesOut;
+ joomlaupdate_stat_files += data.files;
+
+ // Display data
+ document.getElementById('extbytesin').innerHTML = joomlaupdate_stat_inbytes;
+ document.getElementById('extbytesout').innerHTML = joomlaupdate_stat_outbytes;
+ document.getElementById('extfiles').innerHTML = joomlaupdate_stat_files;
+
+ // Do AJAX post
+ post = {
+ task: 'stepRestore',
+ factory: data.factory
+ };
+ doAjax(post, function(data){
+ processUpdateStep(data);
+ });
+ }
+ }
+}
+
+window.addEvent('domready', function() {
+ pingUpdate();
+});
\ No newline at end of file

Modified: development/trunk/plugins/quickicon/joomlaupdate/joomlaupdate.php
===================================================================
--- development/trunk/plugins/quickicon/joomlaupdate/joomlaupdate.php 2012-03-28 11:46:24 UTC (rev 22956)
+++ development/trunk/plugins/quickicon/joomlaupdate/joomlaupdate.php 2012-03-28 18:36:44 UTC (rev 22957)
@@ -64,7 +64,7 @@
$document->addScript(JURI::base().'../media/plg_quickicon_joomlaupdate/jupdatecheck.js');

return array(array(
- 'link' => 'index.php?option=com_installer&view=update',
+ 'link' => 'index.php?option=com_joomlaupdate',
'image' => 'header/icon-48-download.png',
'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'),
'id' => 'plg_quickicon_joomlaupdate'

_______________________________________________
Joomla-commits mailing list
Joomla-...@joomlacode.org
http://joomlacode.org/mailman/listinfo/joomla-commits

Reply all
Reply to author
Forward
0 new messages