diff --git a/.drone.yml b/.drone.yml index e80834c1c0975..1c71301190fd9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,5 @@ build: - image: yveshoppe/joomla-systemtests:latest + image: joomlaprojects/docker-systemtests:latest commands: - apt-get install nodejs npm - ln -s /usr/bin/nodejs /usr/bin/node diff --git a/.gitignore b/.gitignore index 2f8c9c9b1241c..16e231be50131 100644 --- a/.gitignore +++ b/.gitignore @@ -101,10 +101,11 @@ Desktop.ini /libraries/vendor/phpmailer/phpmailer/.travis.yml /libraries/vendor/phpmailer/phpmailer/changelog.md /libraries/vendor/phpmailer/phpmailer/composer.json +/libraries/vendor/phpmailer/phpmailer/composer.lock +/libraries/vendor/phpmailer/phpmailer/get_oauth_token.php +/libraries/vendor/phpmailer/phpmailer/phpdoc.dist.xml /libraries/vendor/phpmailer/phpmailer/README.md /libraries/vendor/phpmailer/phpmailer/travis.phpunit.xml.dist -/libraries/vendor/phpmailer/phpmailer/extras/README.md -/libraries/vendor/phpmailer/phpmailer/get_oauth_token.php /libraries/vendor/psr/log/Psr/Log/Test /libraries/vendor/psr/log/.gitignore /libraries/vendor/psr/log/composer.json diff --git a/README.md b/README.md index 2cd9d959bafe2..98fbbd77685a8 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ What is this? What is Joomla? --------------------- -* [Joomla](https://www.joomla.org/about-joomla.html) is a **Content Management System** (CMS) which enables you to build websites and powerful online applications. +* [Joomla!](https://www.joomla.org/about-joomla.html) is a **Content Management System** (CMS) which enables you to build websites and powerful online applications. * It is a simple and powerful web server application which requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run. You can find [full technical requirements here](https://www.joomla.org/about-joomla/technical-requirements.html). -* Joomla is **free and OpenSource software** distributed under the GNU General Public License version 2 or later. +* Joomla! is **free and OpenSource software** distributed under the GNU General Public License version 2 or later. Is Joomla! for you? --------------------- -* Joomla is [the right solution for most content web projects](https://docs.joomla.org/Portal:Learn_More). +* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Portal:Learn_More). * View Joomla's [core features here](https://www.joomla.org/core-features.html). * Try it out for yourself in our [online demo](https://demo.joomla.org). @@ -38,9 +38,9 @@ Learn Joomla! What are the benefits of Joomla? --------------------- -* The functionality of a Joomla website can be extended by installing extensions that you can create (or download) to suit your needs. +* The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs. * There are many ready-made extensions that you can download and install. -* Check out the [Joomla! Extensions Directory (JED)](http://extensions.joomla.org). +* Check out the [Joomla! Extensions Directory (JED)](https://extensions.joomla.org). Is it easy to change the layout display? --------------------- diff --git a/README.txt b/README.txt index 9042958105877..b3754aa3af95b 100644 --- a/README.txt +++ b/README.txt @@ -5,13 +5,13 @@ * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/master 2- What is Joomla? - * Joomla is a Content Management System (CMS) which enables you to build Web sites and powerful online applications. + * Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications. * It's a free and OpenSource software, distributed under the GNU General Public License version 2 or later. * This is a simple and powerful web server application and it requires a server with PHP and either MySQL, PostgreSQL, or SQL Server to run. You can find full technical requirements here: https://www.joomla.org/about-joomla/technical-requirements.html. 3- Is Joomla! for you? - * Joomla is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More + * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More * See Joomla's core features - https://www.joomla.org/core-features.html * Try out our online demo: https://demo.joomla.org/ @@ -25,9 +25,9 @@ * Before installing, read the beginners guide: https://docs.joomla.org/Portal:Beginners 6- What are the benefits of Joomla? - * The functionality of a Joomla website can be extended by installing extensions that you can create (or download) to suit your needs. + * The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs. * There are many ready-made extensions that you can download and install. - * Check out the Joomla! Extensions Directory (JED): http://extensions.joomla.org + * Check out the Joomla! Extensions Directory (JED): https://extensions.joomla.org 7- Is it easy to change the layout display? * The layout is controlled by templates that you can edit. diff --git a/administrator/components/com_installer/helpers/installer.php b/administrator/components/com_installer/helpers/installer.php index eef635d2d5447..c97e6590303f0 100644 --- a/administrator/components/com_installer/helpers/installer.php +++ b/administrator/components/com_installer/helpers/installer.php @@ -121,25 +121,6 @@ public static function getExtensionGroupes() return $options; } - /** - * Gets a list of the actions that can be performed. - * - * @return JObject - * - * @since 1.6 - * @deprecated 3.2 Use JHelperContent::getActions() instead - */ - public static function getActions() - { - // Log usage of deprecated function - JLog::add(__METHOD__ . '() is deprecated, use JHelperContent::getActions() with new arguments order instead.', JLog::WARNING, 'deprecated'); - - // Get list of actions - $result = JHelperContent::getActions('com_installer'); - - return $result; - } - /** * Get a list of filter options for the application clients. * diff --git a/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php b/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php deleted file mode 100644 index 0ba8a22be5f9e..0000000000000 --- a/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php +++ /dev/null @@ -1,37 +0,0 @@ -getTag(); $search_ignore = $lang->getIgnoredSearchWords(); + $ignored = false; // Deprecated in 1.6 use $lang->getIgnoredSearchWords instead. $ignoreFile = $lang->getLanguagePath() . '/' . $tag . '/' . $tag . '.ignore.php'; diff --git a/administrator/components/com_templates/helpers/templates.php b/administrator/components/com_templates/helpers/templates.php index 498a655c10faa..dd53192116f12 100644 --- a/administrator/components/com_templates/helpers/templates.php +++ b/administrator/components/com_templates/helpers/templates.php @@ -37,24 +37,6 @@ public static function addSubmenu($vName) ); } - /** - * Gets a list of the actions that can be performed. - * - * @return JObject - * - * @deprecated 3.2 Use JHelperContent::getActions() instead - */ - public static function getActions() - { - // Log usage of deprecated function - JLog::add(__METHOD__ . '() is deprecated, use JHelperContent::getActions() with new arguments order instead.', JLog::WARNING, 'deprecated'); - - // Get list of actions - $result = JHelperContent::getActions('com_templates'); - - return $result; - } - /** * Get a list of filter options for the application clients. * diff --git a/administrator/components/com_users/helpers/users.php b/administrator/components/com_users/helpers/users.php index c3a9770ca39c7..35780a46002fa 100644 --- a/administrator/components/com_users/helpers/users.php +++ b/administrator/components/com_users/helpers/users.php @@ -69,24 +69,6 @@ public static function addSubmenu($vName) } } - /** - * Gets a list of the actions that can be performed. - * - * @return JObject - * - * @deprecated 3.2 Use JHelperContent::getActions() instead - */ - public static function getActions() - { - // Log usage of deprecated function - JLog::add(__METHOD__ . '() is deprecated, use JHelperContent::getActions() with new arguments order instead.', JLog::WARNING, 'deprecated'); - - // Get list of actions - $result = JHelperContent::getActions('com_users'); - - return $result; - } - /** * Get a list of filter options for the blocked state of a user. * diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini index 2f1471b1c5664..7a1209296898c 100644 --- a/administrator/language/en-GB/en-GB.com_installer.ini +++ b/administrator/language/en-GB/en-GB.com_installer.ini @@ -67,8 +67,8 @@ COM_INSTALLER_INSTALL_FROM_DIRECTORY="Install from Folder" COM_INSTALLER_INSTALL_FROM_URL="Install from URL" COM_INSTALLER_INSTALL_FROM_WEB="Install from Web" COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB="Add "Install from Web" tab" -COM_INSTALLER_INSTALL_FROM_WEB_INFO="Joomla! Extensions Directory™ (JED) now available with Install from Web on this page." -COM_INSTALLER_INSTALL_FROM_WEB_TOS="By selecting "_QQ_"Add Install from Web tab"_QQ_" below, you agree to the JED Terms of Service and all applicable third party license terms." +COM_INSTALLER_INSTALL_FROM_WEB_INFO="Joomla! Extensions Directory™ (JED) now available with Install from Web on this page." +COM_INSTALLER_INSTALL_FROM_WEB_TOS="By selecting "_QQ_"Add Install from Web tab"_QQ_" below, you agree to the JED Terms of Service and all applicable third party license terms." COM_INSTALLER_INSTALL_LANGUAGE_SUCCESS="Installation of the %s language was successful." COM_INSTALLER_INSTALL_SUCCESS="Installation of the %s was successful." COM_INSTALLER_INSTALL_URL="Install URL" diff --git a/administrator/language/en-GB/en-GB.com_users.ini b/administrator/language/en-GB/en-GB.com_users.ini index 4454576f0002a..237dfe939eed5 100644 --- a/administrator/language/en-GB/en-GB.com_users.ini +++ b/administrator/language/en-GB/en-GB.com_users.ini @@ -32,8 +32,8 @@ COM_USERS_CONFIG_FIELD_ALLOWREGISTRATION_DESC="If set to Yes, new Users are allo COM_USERS_CONFIG_FIELD_ALLOWREGISTRATION_LABEL="Allow User Registration" COM_USERS_CONFIG_FIELD_CAPTCHA_DESC="Select the captcha plugin that will be used in the registration, password and username reminder forms. You may need to enter required information for your captcha plugin in the Plugin Manager.
If 'Use Default' is selected, make sure a captcha plugin is selected in Global Configuration." COM_USERS_CONFIG_FIELD_CAPTCHA_LABEL="Captcha" -COM_USERS_CONFIG_FIELD_CHANGEUSERNAME_DESC="Allow users to change their Login name when editing their profile." -COM_USERS_CONFIG_FIELD_CHANGEUSERNAME_LABEL="Change Login Name" +COM_USERS_CONFIG_FIELD_CHANGEUSERNAME_DESC="Allow users to change their Username when editing their profile." +COM_USERS_CONFIG_FIELD_CHANGEUSERNAME_LABEL="Change Username" COM_USERS_CONFIG_FIELD_FRONTEND_LANG_DESC="If 'Frontend User Parameters' is set to 'Show', users will be able to select their Frontend language preference when registering." COM_USERS_CONFIG_FIELD_FRONTEND_LANG_LABEL="Frontend Language" COM_USERS_CONFIG_FIELD_FRONTEND_RESET_COUNT_DESC="The maximum number of password resets allowed within the time period. Zero indicates no limit." diff --git a/administrator/modules/mod_menu/tmpl/default_enabled.php b/administrator/modules/mod_menu/tmpl/default_enabled.php index 2dce7ebe6eecb..ffd44957b2ecb 100644 --- a/administrator/modules/mod_menu/tmpl/default_enabled.php +++ b/administrator/modules/mod_menu/tmpl/default_enabled.php @@ -376,7 +376,7 @@ $menu->addChild(new JMenuNode(JText::_('MOD_MENU_HELP_DOCUMENTATION'), 'https://docs.joomla.org', 'class:help-docs', false, '_blank')); $menu->addSeparator(); - $menu->addChild(new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'http://extensions.joomla.org', 'class:help-jed', false, '_blank')); + $menu->addChild(new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'https://extensions.joomla.org', 'class:help-jed', false, '_blank')); $menu->addChild( new JMenuNode(JText::_('MOD_MENU_HELP_TRANSLATIONS'), 'https://community.joomla.org/translations.html', 'class:help-trans', false, '_blank') ); diff --git a/administrator/templates/hathor/html/mod_menu/default_enabled.php b/administrator/templates/hathor/html/mod_menu/default_enabled.php index 6f44d8e056cb5..0f0350c086300 100644 --- a/administrator/templates/hathor/html/mod_menu/default_enabled.php +++ b/administrator/templates/hathor/html/mod_menu/default_enabled.php @@ -348,7 +348,7 @@ $menu->addSeparator(); $menu->addChild( - new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'http://extensions.joomla.org', 'class:help-jed', false, '_blank') + new JMenuNode(JText::_('MOD_MENU_HELP_EXTENSIONS'), 'https://extensions.joomla.org', 'class:help-jed', false, '_blank') ); $menu->addChild( new JMenuNode(JText::_('MOD_MENU_HELP_TRANSLATIONS'), 'https://community.joomla.org/translations.html', 'class:help-trans', false, '_blank') diff --git a/bin/index.html b/bin/index.html deleted file mode 100644 index 2efb97f319a35..0000000000000 --- a/bin/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bin/keychain.php b/bin/keychain.php deleted file mode 100644 index bfb40b7ebd28e..0000000000000 --- a/bin/keychain.php +++ /dev/null @@ -1,427 +0,0 @@ -#!/usr/bin/env php -load('finder_cli', JPATH_SITE, null, false, false) - -// Fallback to the finder_cli file in the default language -|| $lang->load('finder_cli', JPATH_SITE, null, true); - -/** - * Keychain Manager. - * - * @since 12.3 - */ -class KeychainManager extends JApplicationCli -{ - /** - * @var boolean A flag if the keychain has been updated to trigger saving the keychain - * @since 12.3 - */ - protected $updated = false; - - /** - * @var JKeychain The keychain object being manipulated. - * @since 12.3 - */ - protected $keychain = null; - - /** - * Execute the application - * - * @return void - * - * @since 12.3 - */ - public function execute( ) - { - if (!count($this->input->args)) - { - // Check if they passed --help in otherwise display short usage summary - if ($this->input->get('help', false) === false) - { - $this->out("usage: {$this->input->executable} [options] [command] []"); - exit(1); - } - else - { - $this->displayHelp(); - exit(0); - } - } - - // For all tasks but help and init we use the keychain - if (!in_array($this->input->args[0], array('help', 'init'))) - { - $this->loadKeychain(); - } - - switch ($this->input->args[0]) - { - case 'init': - $this->initPassphraseFile(); - break; - case 'list': - $this->listEntries(); - break; - case 'create': - $this->create(); - break; - case 'change': - $this->change(); - break; - case 'delete': - $this->delete(); - break; - case 'read': - $this->read(); - break; - case 'help': - $this->displayHelp(); - break; - default: - $this->out('Invalid command.'); - break; - } - - if ($this->updated) - { - $this->saveKeychain(); - } - - exit(0); - } - - /** - * Load the keychain from a file. - * - * @return void - * - * @since 12.3 - */ - protected function loadKeychain() - { - $keychain = $this->input->get('keychain', '', 'raw'); - $publicKeyFile = $this->input->get('public-key', '', 'raw'); - $passphraseFile = $this->input->get('passphrase', '', 'raw'); - - $this->keychain = new JKeychain; - - if (file_exists($keychain)) - { - if (file_exists($publicKeyFile)) - { - $this->keychain->loadKeychain($keychain, $passphraseFile, $publicKeyFile); - } - else - { - $this->out('Public key not specified or missing!'); - exit(1); - } - } - } - - /** - * Save this keychain to a file. - * - * @return void - * - * @since 12.3 - */ - protected function saveKeychain() - { - $keychain = $this->input->get('keychain', '', 'raw'); - $publicKeyFile = $this->input->get('public-key', '', 'raw'); - $passphraseFile = $this->input->get('passphrase', '', 'raw'); - - if (!file_exists($publicKeyFile)) - { - $this->out("Public key file specified doesn't exist: $publicKeyFile"); - exit(1); - } - - $this->keychain->saveKeychain($keychain, $passphraseFile, $publicKeyFile); - } - - /** - * Initialise a new passphrase file. - * - * @return void - * - * @since 12.3 - */ - protected function initPassphraseFile() - { - $keychain = new JKeychain; - - $passphraseFile = $this->input->get('passphrase', '', 'raw'); - $privateKeyFile = $this->input->get('private-key', '', 'raw'); - - if (!strlen($passphraseFile)) - { - $this->out('A passphrase file must be specified with --passphrase'); - exit(1); - } - - if (!file_exists($privateKeyFile)) - { - $this->out("protected key file specified doesn't exist: $privateKeyFile"); - exit(1); - } - - $this->out('Please enter the new passphrase:'); - $passphrase = $this->in(); - - $this->out('Please enter the passphrase for the protected key:'); - $privateKeyPassphrase = $this->in(); - - $keychain->createPassphraseFile($passphrase, $passphraseFile, $privateKeyFile, $privateKeyPassphrase); - } - - /** - * Create a new entry - * - * @return void - * - * @since 12.3 - */ - protected function create() - { - if (count($this->input->args) != 3) - { - $this->out("usage: {$this->input->executable} [options] create entry_name entry_value"); - exit(1); - } - - if ($this->keychain->exists($this->input->args[1])) - { - $this->out('error: entry already exists. To change this entry, use "change"'); - exit(1); - } - - $this->change(); - } - - /** - * Change an existing entry to a new value or create an entry if missing. - * - * @return void - * - * @since 12.3 - */ - protected function change() - { - if (count($this->input->args) != 3) - { - $this->out("usage: {$this->input->executable} [options] change entry_name entry_value"); - exit(1); - } - - $this->updated = true; - $this->keychain->setValue($this->input->args[1], $this->input->args[2]); - } - - /** - * Read an entry from the keychain - * - * @return void - * - * @since 12.3 - */ - protected function read() - { - if (count($this->input->args) != 2) - { - $this->out("usage: {$this->input->executable} [options] read entry_name"); - exit(1); - } - - $key = $this->input->args[1]; - $this->out($key . ': ' . $this->dumpVar($this->keychain->get($key))); - } - - /** - * Get the string from var_dump - * - * @param mixed $var The variable you want to have dumped. - * - * @return string The result of var_dump - * - * @since 12.3 - */ - private function dumpVar($var) - { - ob_start(); - var_dump($var); - $result = trim(ob_get_contents()); - ob_end_clean(); - - return $result; - } - - /** - * Delete an entry from the keychain - * - * @return void - * - * @since 12.3 - */ - protected function delete() - { - if (count($this->input->args) != 2) - { - $this->out("usage: {$this->input->executable} [options] delete entry_name"); - exit(1); - } - - $this->updated = true; - $this->keychain->deleteValue($this->input->args[1]); - } - - /** - * List entries in the keychain - * - * @return void - * - * @since 12.3 - */ - protected function listEntries() - { - foreach ($this->keychain->toArray() as $key => $value) - { - $line = $key; - - if ($this->input->get('print-values')) - { - $line .= ': ' . $this->dumpVar($value); - } - - $this->out($line); - } - } - - /** - * Display the help information - * - * @return void - * - * @since 12.3 - */ - protected function displayHelp() - { -/* -COMMANDS - - - list - - create entry_name entry_value - - change entry_name entry_value - - delete entry_name - - read entry_name -*/ - - $help = <<input->executable} [--keychain=/path/to/keychain] - [--passphrase=/path/to/passphrase.dat] [--public-key=/path/to/public.pem] - [command] [] - -OPTIONS - - --keychain=/path/to/keychain - Path to a keychain file to manipulate. - - --passphrase=/path/to/passphrase.dat - Path to a passphrase file containing the encryption/decryption key. - - --public-key=/path/to/public.pem - Path to a public key file to decrypt the passphrase file. - - -COMMANDS - - list: - Usage: list [--print-values] - Lists all entries in the keychain. Optionally pass --print-values to print the values as well. - - create: - Usage: create entry_name entry_value - Creates a new entry in the keychain called "entry_name" with the plaintext value "entry_value". - NOTE: This is an alias for change. - - change: - Usage: change entry_name entry_value - Updates the keychain entry called "entry_name" with the value "entry_value". - - delete: - Usage: delete entry_name - Removes an entry called "entry_name" from the keychain. - - read: - Usage: read entry_name - Outputs the plaintext value of "entry_name" from the keychain. - - init: - Usage: init - Creates a new passphrase file and prompts for a new passphrase. - -HELP; - $this->out($help); - } -} - -try -{ - JApplicationCli::getInstance('KeychainManager')->execute(); -} -catch (Exception $e) -{ - echo $e->getMessage() . "\n"; - exit(1); -} diff --git a/build/build.php b/build/build.php index 0a635f31bd126..3bfbf32dc79e2 100644 --- a/build/build.php +++ b/build/build.php @@ -72,7 +72,6 @@ */ $filesArray = array( "administrator/index.php\n" => true, - "bin/index.html\n" => true, "cache/index.html\n" => true, "cli/index.html\n" => true, "components/index.html\n" => true, diff --git a/components/com_contact/views/contact/tmpl/default_form.php b/components/com_contact/views/contact/tmpl/default_form.php index 243c562e750b5..31b0e2b282b99 100644 --- a/components/com_contact/views/contact/tmpl/default_form.php +++ b/components/com_contact/views/contact/tmpl/default_form.php @@ -12,23 +12,11 @@ JHtml::_('behavior.keepalive'); JHtml::_('behavior.formvalidator'); -$captchaEnabled = false; - -$captchaSet = $this->params->get('captcha', JFactory::getApplication()->get('captcha', '0')); - -foreach (JPluginHelper::getPlugin('captcha') as $plugin) -{ - if ($captchaSet === $plugin->name) - { - $captchaEnabled = true; - break; - } -} ?>
form->getFieldsets() as $fieldset): ?> - name === 'captcha' && !$captchaEnabled) : ?> + name === 'captcha' && !$this->captchaEnabled) : ?> form->getFieldset($fieldset->name); ?> diff --git a/components/com_contact/views/contact/view.html.php b/components/com_contact/views/contact/view.html.php index 254db88e75f56..77979c4450ce0 100644 --- a/components/com_contact/views/contact/view.html.php +++ b/components/com_contact/views/contact/view.html.php @@ -49,6 +49,14 @@ class ContactViewContact extends JViewLegacy */ protected $return_page; + /** + * Should we show a captcha form for the submission of the contact request? + * + * @var bool + * @since __DEPLOY_VERSION__ + */ + protected $captchaEnabled = false; + /** * Execute and display a template script. * @@ -287,8 +295,19 @@ public function display($tpl = null) $model = $this->getModel(); $model->hit(); - $this->_prepareDocument(); + $captchaSet = $params->get('captcha', JFactory::getApplication()->get('captcha', '0')); + + foreach (JPluginHelper::getPlugin('captcha') as $plugin) + { + if ($captchaSet === $plugin->name) + { + $this->captchaEnabled = true; + break; + } + } + + $this->_prepareDocument(); return parent::display($tpl); } diff --git a/composer.json b/composer.json index 0ea61dbe0cdbe..09dbd22e3ac2e 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "ircmaxell/password-compat": "1.*", "leafo/lessphp": "0.5.0", "paragonie/random_compat": "~1.0", - "phpmailer/phpmailer": "5.2.16", + "phpmailer/phpmailer": "~6.0@rc", "symfony/polyfill-php55": "~1.2", "symfony/polyfill-php56": "~1.0", "symfony/yaml": "2.*", @@ -46,6 +46,6 @@ "phpunit/dbunit": "~1.3", "friendsofphp/php-cs-fixer": "~1.11", "squizlabs/php_codesniffer": "~1.5", - "pear/cache_lite": "1.7.16" + "pear/cache_lite": "1.8.0" } } diff --git a/composer.lock b/composer.lock index d7c6e3e7858dd..09fd2052c5af0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8e3d62a47fa60681cb0651978d0b8fba", - "content-hash": "752838bbe6f83d4a986b40c8cf4d1dd1", + "hash": "0bcff7c61f95c68adc76178b8b2c7cc8", + "content-hash": "5321237d122c5aecd1bb224c44db92f4", "packages": [ { "name": "ircmaxell/password-compat", @@ -393,16 +393,16 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/session.git", - "reference": "144cd6bc1d268e3777963cef6f5f705ebe22d9c0" + "reference": "927573d3208cec451b8a61c2916d97a1ef280a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/session/zipball/144cd6bc1d268e3777963cef6f5f705ebe22d9c0", - "reference": "144cd6bc1d268e3777963cef6f5f705ebe22d9c0", + "url": "https://api.github.com/repos/joomla-framework/session/zipball/927573d3208cec451b8a61c2916d97a1ef280a32", + "reference": "927573d3208cec451b8a61c2916d97a1ef280a32", "shasum": "" }, "require": { - "php": ">=5.4|>=7.0" + "php": "^5.5.9|~7.0" }, "require-dev": { "joomla/database": "~2.0@dev", @@ -415,9 +415,16 @@ "squizlabs/php_codesniffer": "1.*" }, "suggest": { + "ext-apc": "To use APC cache as a session handler", + "ext-apcu": "To use APCu cache as a session handler", + "ext-memcache": "To use a Memcache server as a session handler", + "ext-memcached": "To use a Memcached server as a session handler", + "ext-redis": "To use a Redis server as a session handler", + "ext-wincache": "To use WinCache as a session handler", + "ext-xcache": "To use XCache as a session handler", "joomla/database": "Install joomla/database if you want to use Database session storage.", "joomla/event": "The joomla/event package is required to use Joomla\\Session\\Session.", - "joomla/input": "The joomla/input package is required to use Joomla\\Session\\Session.", + "joomla/input": "The joomla/input package is required to use Address and Forwarded session validators.", "paragonie/random_compat": "The paragonie/random_compat package is required to use Joomla\\Session\\Session on PHP 5.x." }, "type": "joomla-package", @@ -442,7 +449,7 @@ "joomla", "session" ], - "time": "2016-05-24 11:57:24" + "time": "2016-09-21 10:28:18" }, { "name": "joomla/string", @@ -683,39 +690,35 @@ }, { "name": "phpmailer/phpmailer", - "version": "v5.2.16", + "version": "v6.0.0rc2", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a" + "reference": "5b34f25e314558a8f7bc94f0f2ee0a09969f0640" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", - "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/5b34f25e314558a8f7bc94f0f2ee0a09969f0640", + "reference": "5b34f25e314558a8f7bc94f0f2ee0a09969f0640", "shasum": "" }, "require": { - "php": ">=5.0.0" + "php": ">=5.5.0" }, "require-dev": { - "phpdocumentor/phpdocumentor": "*", - "phpunit/phpunit": "4.7.*" + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "4.*" }, "suggest": { - "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication" }, "type": "library", "autoload": { - "classmap": [ - "class.phpmailer.php", - "class.phpmaileroauth.php", - "class.phpmaileroauthgoogle.php", - "class.smtp.php", - "class.pop3.php", - "extras/EasyPeasyICS.php", - "extras/ntlm_sasl_client.php" - ] + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -739,7 +742,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2016-06-06 09:09:37" + "time": "2016-05-10 22:00:21" }, { "name": "psr/log", @@ -1162,16 +1165,16 @@ }, { "name": "pear/cache_lite", - "version": "v1.7.16", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/pear/Cache_Lite.git", - "reference": "9fa08bd625f86946d41a6e7ff66f6f4ea5c0f0bb" + "reference": "a3ad6baed101247a3e4a0806113b6f755060f3a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Cache_Lite/zipball/9fa08bd625f86946d41a6e7ff66f6f4ea5c0f0bb", - "reference": "9fa08bd625f86946d41a6e7ff66f6f4ea5c0f0bb", + "url": "https://api.github.com/repos/pear/Cache_Lite/zipball/a3ad6baed101247a3e4a0806113b6f755060f3a3", + "reference": "a3ad6baed101247a3e4a0806113b6f755060f3a3", "shasum": "" }, "require": { @@ -1208,7 +1211,7 @@ "keywords": [ "cache" ], - "time": "2014-05-11 15:02:19" + "time": "2016-07-04 05:20:43" }, { "name": "phpdocumentor/reflection-docblock", @@ -2578,7 +2581,8 @@ "minimum-stability": "stable", "stability-flags": { "joomla/event": 20, - "joomla/session": 20 + "joomla/session": 20, + "phpmailer/phpmailer": 5 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/installation/INSTALL b/installation/INSTALL index 4bd90aad5bb80..dcfdfce71854a 100644 --- a/installation/INSTALL +++ b/installation/INSTALL @@ -142,7 +142,7 @@ Use Admin to install and configure additional extensions, add users, select default language and much more. Note that additional community contributed extensions and languages are -available at the Joomla! Extensions Directory (JED): http://extensions.joomla.org/ +available at the Joomla! Extensions Directory (JED): https://extensions.joomla.org/ You can also install and use the `Install from Web Tab` to access the JED directly from the Admin here: diff --git a/installation/service/provider/session.php b/installation/service/provider/session.php index 2755572a9cf6e..b880c24b1b224 100644 --- a/installation/service/provider/session.php +++ b/installation/service/provider/session.php @@ -8,9 +8,11 @@ defined('_JEXEC') or die; +use Joomla\Cms\Session\Storage\JoomlaStorage; +use Joomla\Cms\Session\Validator\AddressValidator; +use Joomla\Cms\Session\Validator\ForwardedValidator; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use Joomla\Input\Input; use Joomla\Session\Handler\FilesystemHandler; /** @@ -55,13 +57,18 @@ function (Container $container) // Set up the storage handler $handler = new FilesystemHandler(JPATH_INSTALLATION . '/sessions'); - $storage = new JSessionStorageJoomla($handler, array(), JFactory::getApplication()->input); + $input = $app->input; + + $storage = new JoomlaStorage($handler, array(), $input); $dispatcher = $container->get('Joomla\Event\DispatcherInterface'); $dispatcher->addListener('onAfterSessionStart', array($app, 'afterSessionStart')); - // TODO - Migrate JInput to Framework Input package - return new JSession(new Input($_REQUEST), $storage, null, $options); + $session = new JSession($storage, $dispatcher, $options); + $session->addValidator(new AddressValidator($input, $session)); + $session->addValidator(new ForwardedValidator($input, $session)); + + return $session; }, true ); diff --git a/installation/sql/mysql/sample_blog.sql b/installation/sql/mysql/sample_blog.sql index e0a0b9e010d1f..baf48aac66d30 100644 --- a/installation/sql/mysql/sample_blog.sql +++ b/installation/sql/mysql/sample_blog.sql @@ -72,7 +72,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (2, 37, 'Working on Your Site', 'working-on-your-site', '

Here are some basic tips for working on your site.

  • Joomla! has a "front end" that you are looking at now and an "administrator" or "back end" 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.
  • One of the first things you will probably want to do is change the site title and tag line and to add a logo. To do this click on the Template Settings link in the top menu. To change your site description, browser title, default email and other items, click Site Settings. More advanced configuration options are available in the administrator.
  • To totally change the look of your 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.
  • 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
  • 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.
  • You can learn much more about working with Joomla from the Joomla documentation site and get help from other users at the Joomla forums. In the administrator there are help buttons on every page that provide detailed information about the functions on that page.
', '', 1, 2, '2011-01-01 00:00:01', 713, 'Joomla', '2013-10-13 17:16:12', 713, 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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 2, 1, '', '', 3, 8, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (3, 38, 'Welcome to your blog', 'welcome-to-your-blog', '

This is a sample blog posting.

If you log in to the site (the Author Login link is on the very 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 and make other changes to the site.

As you add and modify articles you will see how your site changes and also how you can customise it in various ways.

Go ahead, you can''t break it.

', '', 1, 9, '2011-01-05 00:00:01', 713, 'Joomla', '2013-10-13 16:58:11', 713, 0, '0000-00-00 00:00:00', '2012-01-05 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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 4, 2, '', '', 1, 5, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (4, 39, 'About your home page', 'about-your-home-page', '

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 nest oldest articles. 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.

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.

', '

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.

', 1, 9, '2011-01-03 00:00:01', 713, 'Joomla', '2013-10-13 16:59:32', 713, 0, '0000-00-00 00:00:00', '2012-01-03 00:00:00', '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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 7, 1, '', '', 1, 5, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), -(5, 40, 'Your Modules', 'your-modules', '

Your site has some commonly used modules already preconfigured. These include:

  • Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.
  • 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 blog roll on the top menu to update this.
  • Most Read Posts which lists articles based on the number of times they have been read.
  • Older Articles which lists out articles by month.
  • Syndicate which allows your readers to read your posts in a news reader.
  • Popular Tags, which will appear if you use tagging on your articles. Just enter a tag in the Tags field when editing.

Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.

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 Joomla Extensions Directory.

', '', 1, 9, '2010-12-31 00:00:01', 713, 'Joomla', '2013-10-13 17:59:36', 713, 0, '0000-00-00 00:00:00', '2010-12-31 00:00:01', '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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 11, 0, '', '', 1, 4, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(5, 40, 'Your Modules', 'your-modules', '

Your site has some commonly used modules already preconfigured. These include:

  • Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.
  • 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 blog roll on the top menu to update this.
  • Most Read Posts which lists articles based on the number of times they have been read.
  • Older Articles which lists out articles by month.
  • Syndicate which allows your readers to read your posts in a news reader.
  • Popular Tags, which will appear if you use tagging on your articles. Just enter a tag in the Tags field when editing.

Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.

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 Joomla Extensions Directory.

', '', 1, 9, '2010-12-31 00:00:01', 713, 'Joomla', '2013-10-13 17:59:36', 713, 0, '0000-00-00 00:00:00', '2010-12-31 00:00:01', '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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 11, 0, '', '', 1, 4, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (6, 43, 'Your Template', 'your-template', '

Templates control the look and feel of your website.

This blog is installed with the Protostar template.

You can edit the options by clicking on the Working on Your Site, Template Settings link in the top menu (visible when you login).

For example you can change the site background color, highlights color, site title, site description and title font used.

More options are available in the site administrator. You may also install a new template using the extension manager.

', '', 1, 9, '2011-01-02 00:00:01', 713, 'Joomla', '2013-10-13 17:04:31', 713, 0, '0000-00-00 00:00:00', '2011-01-02 00:00:01', '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":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 17, 0, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT IGNORE INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES diff --git a/installation/sql/mysql/sample_learn.sql b/installation/sql/mysql/sample_learn.sql index b92d1f2dd531e..7acd052d9c09b 100644 --- a/installation/sql/mysql/sample_learn.sql +++ b/installation/sql/mysql/sample_learn.sql @@ -201,14 +201,14 @@ INSERT IGNORE INTO `#__categories` (`id`, `asset_id`, `parent_id`, `lft`, `rgt`, (16, 41, 1, 61, 122, 1, 'sample-data-contact', 'com_contact', 'Sample Data-Contact', 'sample-data-contact', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (17, 42, 1, 57, 58, 1, 'sample-data-newsfeeds', 'com_newsfeeds', 'Sample Data-Newsfeeds', 'sample-data-newsfeeds', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (19, 44, 14, 10, 37, 2, 'sample-data-articles/joomla', 'com_content', 'Joomla!', 'joomla', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), -(20, 45, 19, 11, 36, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), +(20, 45, 19, 11, 36, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (21, 46, 20, 12, 13, 4, 'sample-data-articles/joomla/extensions/components', 'com_content', 'Components', 'components', '', '

Components are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:33:59', 0, '*', 1), (22, 47, 20, 14, 25, 4, 'sample-data-articles/joomla/extensions/modules', 'com_content', 'Modules', 'modules', '', '

Modules are small blocks of content that can be displayed in positions on a web page. The menus on this site are displayed in modules. The core of Joomla! includes 24 separate modules ranging from login to search to random images. Each module has a name that starts mod_ but when it displays it has a title. In the descriptions in this section, the titles are the same as the names.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:34:18', 0, '*', 1), (23, 48, 20, 26, 31, 4, 'sample-data-articles/joomla/extensions/templates', 'com_content', 'Templates', 'templates', '', '

Templates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:36:13', 0, '*', 1), -(24, 49, 20, 32, 33, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:37:26', 0, '*', 1), +(24, 49, 20, 32, 33, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:37:26', 0, '*', 1), (25, 50, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/plugins', 'com_content', 'Plugins', 'plugins', '', '

Plugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 06:36:50', 0, '*', 1), (26, 51, 14, 38, 47, 2, 'sample-data-articles/park-site', 'com_content', 'Park Site', 'park-site', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), -(27, 52, 26, 39, 40, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), +(27, 52, 26, 39, 40, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), (28, 53, 26, 41, 46, 3, 'sample-data-articles/park-site/photo-gallery', 'com_content', 'Photo Gallery', 'photo-gallery', '', '

These are my photos from parks I have visited (I didn''t take them, they are all from Wikimedia Commons).

This shows you how to make a simple image gallery using articles in com_content.

In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 123, '2012-09-25 11:05:37', 0, 'en-GB', 1), (29, 54, 14, 48, 53, 2, 'sample-data-articles/fruit-shop-site', 'com_content', 'Fruit Shop Site', 'fruit-shop-site', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (30, 55, 29, 49, 50, 3, 'sample-data-articles/fruit-shop-site/growers', 'com_content', 'Growers', 'growers', '', '

We search the whole countryside for the best fruit growers.

You can let each supplier have a page that he or she can edit. To see this in action you will need to create a user who is in the suppliers group.

Create one page in the growers category for that user and make that supplier the author of the page. That user will be able to edit his or her page.

This illustrates the use of the Edit Own permission.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 910, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), @@ -272,7 +272,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (5, 101, 'Authentication', 'authentication', '

The authentication plugins operate when users login to your site or administrator. The Joomla! authentication plugin is in operation by default but you can enable Gmail or LDAP or install a plugin for a different system. An example is included that may be used to create a new authentication plugin.

Default on:

Default off:

', '', 1, 25, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (6, 102, 'Australian Parks ', 'australian-parks', '

Welcome!

This is a basic site about the beautiful and fascinating parks of Australia.

On this site you can read all about my travels to different parks, see photos, and find links to park websites.

This sample site is an example of using the core of Joomla! to create a basic website, whether a "brochure site," a personal blog, or as a way to present information on a topic you are interested in.

Read more about the site in the About Parks module.

', '', 1, 26, '2011-01-01 00:00:01', 123, 'Joomla', '2012-09-25 11:04:30', 123, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 1, '', '', 1, 14, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (7, 103, 'Banner Module', 'banner-module', '

The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

{loadmodule banners,Banners}
', '', 1, 66, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, '', '', 1, 0, '', 0, '*', ''), -(8, 104, 'Beginners', 'beginners', '

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

', '

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), +(8, 104, 'Beginners', 'beginners', '

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

', '

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), (9, 105, 'Contacts', 'contact', '

The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

', '', 1, 21, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (10, 106, 'Content', 'content', '

The content component (com_content) is what you use to write articles. It is extremely flexible and has the largest number of built in views. Articles can be created and edited from the front end, making content the easiest component to use to create your site content. Help

', '', 1, 21, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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":""}', 1, 1, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (11, 107, 'Cradle Mountain', 'cradle-mountain', '

', '

', 1, 73, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/250px_cradle_mountain_seen_from_barn_bluff.jpg","float_intro":"","image_intro_alt":"Cradle Mountain","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/800px_cradle_mountain_seen_from_barn_bluff.jpg","float_fulltext":"none","image_fulltext_alt":"Cradle Mountain","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Alan J.W.C. License: GNU Free Documentation License v . 1.2 or later"}', '{"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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), @@ -302,7 +302,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (35, 133, 'Professionals', 'professionals', '

Joomla! 3 continues development of the Joomla Platform and CMS as a powerful and flexible way to bring your vision of the web to reality. With the new administrator interface and adoption of Twitter Bootstrap, the ability to control its look and the management of extensions is now complete.

', '

Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.3.10 and above makes Joomla lighter and faster than ever.

The separation of the Joomla! Platform project from the Joomla! CMS project makes continuous development of new, powerful APIs and continuous improvement of existing APIs possible while maintaining the stability of the CMS that millions of webmasters and professionals rely upon.

', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '2012-09-25 07:14:30', 123, 0, '0000-00-00 00:00:00', '2011-01-09 16:41:13', '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":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 2, 5, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), (36, 134, 'Random Image Module', 'random-image-module', '

This module displays a random image from your chosen image directory. Help

{loadmodule random_image,Random Image}
', '', 1, 66, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (37, 135, 'Related Items Module', 'related-items-module', '

This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

{loadmodule related_items,Articles Related Items}
', '', 1, 64, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), -(38, 136, 'Sample Sites', 'sample-sites', '

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, weblinks, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 11, '', '', 1, 14, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(38, 136, 'Sample Sites', 'sample-sites', '

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, weblinks, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 11, '', '', 1, 14, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (39, 137, 'Search', 'search-component', '

Joomla! 2.5 offers two search options.

The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

', '', 1, 21, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (40, 138, 'Search Module', 'search-module', '

This module will display a search box. Help

{loadmodule search,Search}
', '', 1, 67, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 4, '', '', 1, 0, '', 0, '*', ''), (41, 139, 'Search ', 'search-plugin', '

The search component uses plugins to control which parts of your Joomla! site are searched. You may choose to turn off some areas to improve performance or for other reasons. Many third party Joomla! extensions have search plugins that extend where search takes place.

Default On:

', '', 1, 25, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), @@ -311,7 +311,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (44, 142, 'Statistics Module', 'statistics', '

This module shows information about your server installation together with statistics on the website users, number of Articles in your database and the number of Web links you provide.

{loadmodule mod_stats,Statistics}
', '', 1, 67, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 5, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (45, 143, 'Syndicate Module', 'syndicate-module', '

The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, contact or weblinks pages, such as this one. Help

{loadposition syndicate,Syndicate}
', '', 1, 67, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 6, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (46, 144, 'System', 'system', '

System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

Default on:

Default off:

', '', 1, 25, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), -(47, 145, 'The Joomla! Community', 'the-joomla-community', '

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(47, 145, 'The Joomla! Community', 'the-joomla-community', '

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (48, 146, 'The Joomla! Project', 'the-joomla-project', '

The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

Our mission is to provide a flexible platform for digital publishing and collaboration.

The core values are:

  • Freedom
  • Equality
  • Trust
  • Community
  • Collaboration
  • Usability

In our vision, we see:

  • People publishing and collaborating in their communities and around the world
  • Software that is free, secure, and high-quality
  • A community that is enjoyable and rewarding to participate in
  • People around the world using their preferred languages
  • A project that acts autonomously
  • A project that is socially responsible
  • A project dedicated to maintaining the trust of its users

There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 1, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (49, 147, 'Typography', 'typography', '

H1 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H2 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H3 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H4 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H5 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz
H6 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

P The quick brown fox ran over the lazy dog. THE QUICK BROWN FOX RAN OVER THE LAZY DOG.

  • Item
  • Item
  • Item
    • Item
    • Item
    • Item
      • Item
      • Item
      • Item
  1. tem
  2. Item
  3. Item
    1. Item
    2. Item
    3. Item
      1. Item
      2. Item
      3. Item
', '', 1, 23, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 8, '', 0, '*', ''), (50, 148, 'Upgraders', 'upgraders', '

If you are an experienced Joomla! user, this Joomla site will seem very familiar but also very different. The biggest change is the new administrator interface and the adoption of responsive design. Hundreds of other improvements have been made.

', '', 1, 19, '2011-01-01 00:00:01', 123, 'Joomla', '2012-09-25 07:12:10', 123, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 3, 6, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), diff --git a/installation/sql/mysql/sample_testing.sql b/installation/sql/mysql/sample_testing.sql index f2fa0a816234d..32306b90cca7f 100644 --- a/installation/sql/mysql/sample_testing.sql +++ b/installation/sql/mysql/sample_testing.sql @@ -205,14 +205,14 @@ INSERT IGNORE INTO `#__categories` (`id`, `asset_id`, `parent_id`, `lft`, `rgt`, (16, 41, 1, 63, 124, 1, 'sample-data-contact', 'com_contact', 'Sample Data-Contact', 'sample-data-contact', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (17, 42, 1, 59, 60, 1, 'sample-data-newsfeeds', 'com_newsfeeds', 'Sample Data-Newsfeeds', 'sample-data-newsfeeds', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (19, 44, 14, 10, 39, 2, 'sample-data-articles/joomla', 'com_content', 'Joomla!', 'joomla', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), -(20, 45, 19, 11, 38, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), +(20, 45, 19, 11, 38, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (21, 46, 20, 12, 13, 4, 'sample-data-articles/joomla/extensions/components', 'com_content', 'Components', 'components', '', '

Component ImageComponents are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (22, 47, 20, 14, 25, 4, 'sample-data-articles/joomla/extensions/modules', 'com_content', 'Modules', 'modules', '', '

Media ImageModules are small blocks of content that can be displayed in positions on a web page. The menus on this site are displayed in modules. The core of Joomla! includes 24 separate modules ranging from login to search to random images. Each module has a name that starts mod_ but when it displays it has a title. In the descriptions in this section, the titles are the same as the names.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (23, 48, 20, 26, 33, 4, 'sample-data-articles/joomla/extensions/templates', 'com_content', 'Templates', 'templates', '', '

Media ImageTemplates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), -(24, 49, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), +(24, 49, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (25, 50, 20, 36, 37, 4, 'sample-data-articles/joomla/extensions/plugins', 'com_content', 'Plugins', 'plugins', '', '

Plugin ImagePlugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (26, 51, 14, 40, 49, 2, 'sample-data-articles/park-site', 'com_content', 'Park Site', 'park-site', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), -(27, 52, 26, 41, 42, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), +(27, 52, 26, 41, 42, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), (28, 53, 26, 43, 48, 3, 'sample-data-articles/park-site/photo-gallery', 'com_content', 'Photo Gallery', 'photo-gallery', '', '

These are my photos from parks I have visited (I didn''t take them, they are all from Wikimedia Commons).

This shows you how to make a simple image gallery using articles in com_content.

In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, 'en-GB', 1), (29, 54, 14, 50, 55, 2, 'sample-data-articles/fruit-shop-site', 'com_content', 'Fruit Shop Site', 'fruit-shop-site', '', '', 1, 0, '0000-00-00 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), (30, 55, 29, 51, 52, 3, 'sample-data-articles/fruit-shop-site/growers', 'com_content', 'Growers', 'growers', '', '

We search the whole countryside for the best fruit growers.

You can let each supplier have a page that he or she can edit. To see this in action you will need to create a user who is in the suppliers group.

Create one page in the growers category for that user and make that supplier the author of the page. That user will be able to edit his or her page.

This illustrates the use of the Edit Own permission.

', 1, 0, '0000-00-00 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 42, '2011-01-01 00:00:01', 0, '0000-00-00 00:00:00', 0, '*', 1), @@ -277,7 +277,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (5, 101, 'Authentication', 'authentication', '

The authentication plugins operate when users login to your site or administrator. The Joomla! authentication plugin is in operation by default but you can enable Gmail or LDAP or install a plugin for a different system. An example is included that may be used to create a new authentication plugin.

Default on:

Default off:

', '', 1, 25, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (6, 102, 'Australian Parks ', 'australian-parks', '

Cradle Park Banner

Welcome!

This is a basic site about the beautiful and fascinating parks of Australia.

On this site you can read all about my travels to different parks, see photos, and find links to park websites.

This sample site is an example of using the core of Joomla! to create a basic website, whether a "brochure site," a personal blog, or as a way to present information on a topic you are interested in.

Read more about the site in the About Parks module.

', '', 1, 26, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (7, 103, 'Banner Module', 'banner-module', '

The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

{loadmodule banners,Banners}
', '', 1, 66, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, '', '', 1, 0, '', 0, '*', ''), -(8, 104, 'Beginners', 'beginners', '

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

', '

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), +(8, 104, 'Beginners', 'beginners', '

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

', '

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), (9, 105, 'Contacts', 'contact', '

The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (10, 106, 'Content', 'content', '

The content component (com_content) is what you use to write articles. It is extremely flexible and has the largest number of built in views. Articles can be created and edited from the front end, making content the easiest component to use to create your site content. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (11, 107, 'Cradle Mountain', 'cradle-mountain', '

', '

', 1, 73, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/250px_cradle_mountain_seen_from_barn_bluff.jpg","float_intro":"","image_intro_alt":"Cradle Mountain","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/800px_cradle_mountain_seen_from_barn_bluff.jpg","float_fulltext":"none","image_fulltext_alt":"Cradle Mountain","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Alan J.W.C. License: GNU Free Documentation License v . 1.2 or later"}', '{"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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), @@ -289,7 +289,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (17, 115, 'First Blog Post', 'first-blog-post', '

Lorem Ipsum is filler text that is commonly used by designers before the content for a new site is ready.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus purus vitae diam posuere nec eleifend elit dictum. Aenean sit amet erat purus, id fermentum lorem. Integer elementum tristique lectus, non posuere quam pretium sed. Quisque scelerisque erat at urna condimentum euismod. Fusce vestibulum facilisis est, a accumsan massa aliquam in. In auctor interdum mauris a luctus. Morbi euismod tempor dapibus. Duis dapibus posuere quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In eu est nec erat sollicitudin hendrerit. Pellentesque sed turpis nunc, sit amet laoreet velit. Praesent vulputate semper nulla nec varius. Aenean aliquam, justo at blandit sodales, mauris leo viverra orci, sed sodales mauris orci vitae magna.

', '

Quisque a massa sed libero tristique suscipit. Morbi tristique molestie metus, vel vehicula nisl ultrices pretium. Sed sit amet est et sapien condimentum viverra. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus viverra tortor porta orci convallis ac cursus erat sagittis. Vivamus aliquam, purus non luctus adipiscing, orci urna imperdiet eros, sed tincidunt neque sapien et leo. Cras fermentum, dolor id tempor vestibulum, neque lectus luctus mauris, nec congue tellus arcu nec augue. Nulla quis mi arcu, in bibendum quam. Sed placerat laoreet fermentum. In varius lobortis consequat. Proin vulputate felis ac arcu lacinia adipiscing. Morbi molestie, massa id sagittis luctus, sem sapien sollicitudin quam, in vehicula quam lectus quis augue. Integer orci lectus, bibendum in fringilla sit amet, rutrum eget enim. Curabitur at libero vitae lectus gravida luctus. Nam mattis, ligula sit amet vestibulum feugiat, eros sem sodales mi, nec dignissim ante elit quis nisi. Nulla nec magna ut leo convallis sagittis ac non erat. Etiam in augue nulla, sed tristique orci. Vestibulum quis eleifend sapien.

Nam ut orci vel felis feugiat posuere ut eu lorem. In risus tellus, sodales eu eleifend sed, imperdiet id nulla. Nunc at enim lacus. Etiam dignissim, arcu quis accumsan varius, dui dui faucibus erat, in molestie mauris diam ac lacus. Sed sit amet egestas nunc. Nam sollicitudin lacinia sapien, non gravida eros convallis vitae. Integer vehicula dui a elit placerat venenatis. Nullam tincidunt ligula aliquet dui interdum feugiat. Maecenas ultricies, lacus quis facilisis vehicula, lectus diam consequat nunc, euismod eleifend metus felis eu mauris. Aliquam dapibus, ipsum a dapibus commodo, dolor arcu accumsan neque, et tempor metus arcu ut massa. Curabitur non risus vitae nisl ornare pellentesque. Pellentesque nec ipsum eu dolor sodales aliquet. Vestibulum egestas scelerisque tincidunt. Integer adipiscing ultrices erat vel rhoncus.

Integer ac lectus ligula. Nam ornare nisl id magna tincidunt ultrices. Phasellus est nisi, condimentum at sollicitudin vel, consequat eu ipsum. In venenatis ipsum in ligula tincidunt bibendum id et leo. Vivamus quis purus massa. Ut enim magna, pharetra ut condimentum malesuada, auctor ut ligula. Proin mollis, urna a aliquam rutrum, risus erat cursus odio, a convallis enim lectus ut lorem. Nullam semper egestas quam non mattis. Vestibulum venenatis aliquet arcu, consectetur pretium erat pulvinar vel. Vestibulum in aliquet arcu. Ut dolor sem, pellentesque sit amet vestibulum nec, tristique in orci. Sed lacinia metus vel purus pretium sit amet commodo neque condimentum.

Aenean laoreet aliquet ullamcorper. Nunc tincidunt luctus tellus, eu lobortis sapien tincidunt sed. Donec luctus accumsan sem, at porttitor arcu vestibulum in. Sed suscipit malesuada arcu, ac porttitor orci volutpat in. Vestibulum consectetur vulputate eros ut porttitor. Aenean dictum urna quis erat rutrum nec malesuada tellus elementum. Quisque faucibus, turpis nec consectetur vulputate, mi enim semper mi, nec porttitor libero magna ut lacus. Quisque sodales, leo ut fermentum ullamcorper, tellus augue gravida magna, eget ultricies felis dolor vitae justo. Vestibulum blandit placerat neque, imperdiet ornare ipsum malesuada sed. Quisque bibendum quam porta diam molestie luctus. Sed metus lectus, ornare eu vulputate vel, eleifend facilisis augue. Maecenas eget urna velit, ac volutpat velit. Nam id bibendum ligula. Donec pellentesque, velit eu convallis sodales, nisi dui egestas nunc, et scelerisque lectus quam ut ipsum.

', 1, 27, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 2, '', '', 1, 0, '', 0, '*', ''), (18, 116, 'Second Blog Post', 'second-blog-post', '

Lorem Ipsum is text that is traditionally used by designers when working on a site before the content is ready.

Pellentesque bibendum metus ut dolor fermentum ut pulvinar tortor hendrerit. Nam vel odio vel diam tempus iaculis in non urna. Curabitur scelerisque, nunc id interdum vestibulum, felis elit luctus dui, ac dapibus tellus mauris tempus augue. Duis congue facilisis lobortis. Phasellus neque erat, tincidunt non lacinia sit amet, rutrum vitae nunc. Sed placerat lacinia fermentum. Integer justo sem, cursus id tristique eget, accumsan vel sapien. Curabitur ipsum neque, elementum vel vestibulum ut, lobortis a nisl. Fusce malesuada mollis purus consectetur auctor. Morbi tellus nunc, dapibus sit amet rutrum vel, laoreet quis mauris. Aenean nec sem nec purus bibendum venenatis. Mauris auctor commodo libero, in adipiscing dui adipiscing eu. Praesent eget orci ac nunc sodales varius.

', '

Nam eget venenatis lorem. Vestibulum a interdum sapien. Suspendisse potenti. Quisque auctor purus nec sapien venenatis vehicula malesuada velit vehicula. Fusce vel diam dolor, quis facilisis tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque libero nisi, pellentesque quis cursus sit amet, vehicula vitae nisl. Curabitur nec nunc ac sem tincidunt auctor. Phasellus in mattis magna. Donec consequat orci eget tortor ultricies rutrum. Mauris luctus vulputate molestie. Proin tincidunt vehicula euismod. Nam congue leo non erat cursus a adipiscing ipsum congue. Nulla iaculis purus sit amet turpis aliquam sit amet dapibus odio tincidunt. Ut augue diam, congue ut commodo pellentesque, fermentum mattis leo. Sed iaculis urna id enim dignissim sodales at a ipsum. Quisque varius lobortis mollis. Nunc purus magna, pellentesque pellentesque convallis sed, varius id ipsum. Etiam commodo mi mollis erat scelerisque fringilla. Nullam bibendum massa sagittis diam ornare rutrum.

Praesent convallis metus ut elit faucibus tempus in quis dui. Donec fringilla imperdiet nibh, sit amet fringilla velit congue et. Quisque commodo luctus ligula, vitae porttitor eros venenatis in. Praesent aliquet commodo orci id varius. Nulla nulla nibh, varius id volutpat nec, sagittis nec eros. Cras et dui justo. Curabitur malesuada facilisis neque, sed tempus massa tincidunt ut. Sed suscipit odio in lacus auctor vehicula non ut lacus. In hac habitasse platea dictumst. Sed nulla nisi, lacinia in viverra at, blandit vel tellus. Nulla metus erat, ultrices non pretium vel, varius nec sem. Morbi sollicitudin mattis lacus quis pharetra. Donec tincidunt mollis pretium. Proin non libero justo, vitae mattis diam. Integer vel elit in enim varius posuere sed vitae magna. Duis blandit tempor elementum. Vestibulum molestie dui nisi.

Curabitur volutpat interdum lorem sed tempus. Sed placerat quam non ligula lacinia sodales. Cras ultrices justo at nisi luctus hendrerit. Quisque sit amet placerat justo. In id sapien eu neque varius pharetra sed in sapien. Etiam nisl nunc, suscipit sed gravida sed, scelerisque ut nisl. Mauris quis massa nisl, aliquet posuere ligula. Etiam eget tortor mauris. Sed pellentesque vestibulum commodo. Mauris vitae est a libero dapibus dictum fringilla vitae magna.

Nulla facilisi. Praesent eget elit et mauris gravida lobortis ac nec risus. Ut vulputate ullamcorper est, volutpat feugiat lacus convallis non. Maecenas quis sem odio, et aliquam libero. Integer vel tortor eget orci tincidunt pulvinar interdum at erat. Integer ullamcorper consequat eros a pellentesque. Cras sagittis interdum enim in malesuada. Etiam non nunc neque. Fusce non ligula at tellus porta venenatis. Praesent tortor orci, fermentum sed tincidunt vel, varius vel dui. Duis pulvinar luctus odio, eget porta justo vulputate ac. Nulla varius feugiat lorem sed tempor. Phasellus pulvinar dapibus magna eget egestas. In malesuada lectus at justo pellentesque vitae rhoncus nulla ultrices. Proin ut sem sem. Donec eu suscipit ipsum. Cras eu arcu porttitor massa feugiat aliquet at quis nisl.

', 1, 27, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), (19, 117, 'Footer Module', 'footer-module', '

This module shows the Joomla! copyright information. Help

{loadmodule footer,Footer}
', '', 1, 66, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 3, '', '', 1, 0, '', 0, '*', ''), -(20, 118, 'Fruit Shop', 'fruit-shop', '

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

', '', 1, 29, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(20, 118, 'Fruit Shop', 'fruit-shop', '

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

', '', 1, 29, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (21, 119, 'Getting Help', 'getting-help', '

There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 8, '', '', 1, 0, '', 0, '*', ''), (22, 120, 'Getting Started', 'getting-started', '

It''s easy to get started creating your website. Knowing some of the basics will help.

What is a Content Management System?

A content management system is software that allows you to create and manage webpages easily by separating the creation of your content from the mechanics required to present it on the web.

In this site, the content is stored in a database. The look and feel are created by a template. The Joomla! software brings together the template and the content to create web pages.

Site and Administrator

Your site actually has two separate sites. The site (also called the front end) is what visitors to your site will see. The administrator (also called the back end) is only used by people managing your site. You can access the administrator by clicking the "Site Administrator" link on the "This Site" menu or by adding /administrator to the end of you domain name.

Log in to the administrator using the username and password created during the installation of Joomla.

Logging in

To login to the front end of your site use the login form or the login menu link on the "This Site" menu. Use the user name and password that were created as part of the installation process. Once logged-in you will be able to create and edit articles.

In managing your site, you will be able to create content that only logged-in users are able to see.

Creating an article

Once you are logged-in, a new menu will be visible. To create a new article, click on the "submit article" link on that menu.

The new article interface gives you a lot of options, but all you need to do is add a title and put something in the content area. To make it easy to find, set the state to published and put it in the Joomla category.

You can edit an existing article by clicking on the edit icon (this only displays to users who have the right to edit).

Learn more

There is much more to learn about how to use Joomla! to create the website you envision. You can learn much more at the Joomla! documentation site and on the Joomla! forums.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 9, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (23, 121, 'Happy Orange Orchard', 'happy-orange-orchard', '

At our orchard we grow the world''s best oranges as well as other citrus fruit such as lemons and grapefruit. Our family has been tending this orchard for generations.

', '', 1, 30, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 2, '', '', 1, 0, '', 0, '*', ''), @@ -308,7 +308,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (35, 133, 'Professionals', 'professionals', '

Joomla! 2.5 continues development of the Joomla Framework and CMS as a powerful and flexible way to bring your vision of the web to reality. With the administrator now fully MVC, the ability to control its look and the management of extensions is now complete.

', '

Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.2.4 and above makes Joomla lighter and faster than ever. Languages files can now be overridden without having your changes lost during an upgrade. With the proper xml your users update extensions with a single click.

Access control lists are now incorporated using a new system developed for Joomla. The ACL system is designed with developers in mind, so it is easy to incorporate into your extensions. The new nested sets libraries allow you to incorporate infinitely deep categories but also to use nested sets in a variety of other ways.

A new forms library makes creating all kinds of user interaction simple. MooTools 1.3 provides a highly flexible javascript framework that is a major advance over MooTools 1.0.

New events throughout the core make integration of your plugins where you want them a snap.

The separation of the Joomla! Platform project from the Joomla! CMS project makes continuous development of new, powerful APIs and continuous improvement of existing APIs possible while maintaining the stability of the CMS that millions of webmasters and professionals rely upon.

Learn about:

', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-09 16:41:13', '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, 5, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), (36, 134, 'Random Image Module', 'random-image-module', '

This module displays a random image from your chosen image directory. Help

{loadmodule random_image,Random Image}
', '', 1, 66, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (37, 135, 'Related Items Module', 'related-items-module', '

This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

{loadmodule related_items,Articles Related Items}
', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 4, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), -(38, 136, 'Sample Sites', 'sample-sites', '

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, weblinks, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 11, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(38, 136, 'Sample Sites', 'sample-sites', '

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, weblinks, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 11, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (39, 137, 'Search', 'search-component', '

Joomla! 2.5 offers two search options.

The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (40, 138, 'Search Module', 'search-module', '

This module will display a search box. Help

{loadmodule search,Search}
', '', 1, 67, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 4, '', '', 1, 0, '', 0, '*', ''), (41, 139, 'Search ', 'search-plugin', '

The search component uses plugins to control which parts of your Joomla! site are searched. You may choose to turn off some areas to improve performance or for other reasons. Many third party Joomla! extensions have search plugins that extend where search takes place.

Default On:

', '', 1, 25, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), @@ -317,7 +317,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (44, 142, 'Statistics Module', 'statistics', '

This module shows information about your server installation together with statistics on the website users, number of Articles in your database and the number of Web links you provide.

{loadmodule mod_stats,Statistics}
', '', 1, 67, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 5, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (45, 143, 'Syndicate Module', 'syndicate-module', '

The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, contact or weblinks pages, such as this one. Help

{loadposition syndicate,Syndicate}
', '', 1, 67, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 6, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (46, 144, 'System', 'system', '

System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

Default on:

Default off:

', '', 1, 25, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), -(47, 145, 'The Joomla! Community', 'the-joomla-community', '

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(47, 145, 'The Joomla! Community', 'the-joomla-community', '

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (48, 146, 'The Joomla! Project', 'the-joomla-project', '

The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

Our mission is to provide a flexible platform for digital publishing and collaboration.

The core values are:

  • Freedom
  • Equality
  • Trust
  • Community
  • Collaboration
  • Usability

In our vision, we see:

  • People publishing and collaborating in their communities and around the world
  • Software that is free, secure, and high-quality
  • A community that is enjoyable and rewarding to participate in
  • People around the world using their preferred languages
  • A project that acts autonomously
  • A project that is socially responsible
  • A project dedicated to maintaining the trust of its users

There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

', '', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (49, 147, 'Typography', 'typography', '

H1 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H2 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H3 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H4 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H5 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz
H6 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

P The quick brown fox ran over the lazy dog. THE QUICK BROWN FOX RAN OVER THE LAZY DOG.

  • Item
  • Item
  • Item
    • Item
    • Item
    • Item
      • Item
      • Item
      • Item
  1. tem
  2. Item
  3. Item
    1. Item
    2. Item
    3. Item
      1. Item
      2. Item
      3. Item
', '', 1, 23, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), (50, 148, 'Upgraders', 'upgraders', '

If you are an experienced Joomla! 1.5 user, this Joomla site will seem very familiar. There are new templates and improved user interfaces, but most functionality is the same. The biggest changes are improved access control (ACL) and nested categories. This release of Joomla has strong continuity with Joomla! 1.7 while adding enhancements.

', '

The new user manager will let you manage who has access to what in your site. You can leave access groups exactly the way you had them in Joomla 1.5 or make them as complicated as you want. You can learn more about how access control works in on the Joomla! Documentation site

In Joomla 1.5 and 1.0 content was organized into sections and categories. From 1.6 forward sections are gone, and you can create categories within categories, going as deep as you want. The sample data provides many examples of the use of nested categories.

All layouts have been redesigned to improve accessibility and flexibility.

Updating your site and extensions when needed is easier than ever thanks to installer improvements.

', 1, 19, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '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, 6, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''), diff --git a/installation/sql/postgresql/sample_blog.sql b/installation/sql/postgresql/sample_blog.sql index f999a3a4f4c71..c3b91489bb96f 100644 --- a/installation/sql/postgresql/sample_blog.sql +++ b/installation/sql/postgresql/sample_blog.sql @@ -78,7 +78,7 @@ INSERT INTO "#__content" VALUES (2,37,'Working on Your Site','working-on-your-site','

Here are some basic tips for working on your site.

  • Joomla! has a "front end" that you are looking at now and an "administrator" or "back end" 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.
  • One of the first things you will probably want to do is change the site title and tag line and to add a logo. To do this click on the Template Settings link in the top menu. To change your site description, browser title, default email and other items, click Site Settings. More advanced configuration options are available in the administrator.
  • To totally change the look of your 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.
  • As you have already seen, you can control who can see different parts of you site. When you work with modules, articles setting the Access level to Registered will mean that only logged in users can see them
  • 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.
  • You can learn much more about working with Joomla from the Joomla documentation site and get help from other users at the Joomla forums. In the administrator there are help buttons on every page that provide detailed information about the functions on that page.
','',1,2,'2011-01-01 00:00:01',713,'Joomla','2013-10-13 17:16:12',713,0,'1970-01-01 00:00:00','2012-01-04 16:48:38','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',2,1,'','',3,8,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (3,38,'Welcome to your blog','welcome-to-your-blog','

This is a sample blog posting.

If you log in to the site (the Author Login link is on the very 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 and make other changes to the site.

As you add and modify articles you will see how your site changes and also how you can customise it in various ways.

Go ahead, you can\'t break it.

','',1,9,'2011-01-05 00:00:01',713,'Joomla','2013-10-13 16:58:11',713,0,'1970-01-01 00:00:00','2012-01-05 16:55:36','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',4,2,'','',1,5,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (4,39,'About your home page','about-your-home-page','

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 nest oldest articles. 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.

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.

','

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.

',1,9,'2011-01-03 00:00:01',713,'Joomla','2013-10-13 16:59:32',713,0,'1970-01-01 00:00:00','2012-01-03 00:00:00','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',7,1,'','',1,5,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), -(5,40,'Your Modules','your-modules','

Your site has some commonly used modules already preconfigured. These include:

  • Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.
  • 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 blog roll on the top menu to update this.
  • Most Read Posts which lists articles based on the number of times they have been read.
  • Older Articles which lists out articles by month.
  • Syndicate which allows your readers to read your posts in a news reader.
  • Popular Tags, which will appear if you use tagging on your articles. Just enter a tag in the Tags field when editing.

Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.

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 Joomla Extensions Directory.

','',1,9,'2010-12-31 00:00:01',713,'Joomla','2013-10-13 17:59:36',713,0,'1970-01-01 00:00:00','2010-12-31 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',11,0,'','',1,4,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(5,40,'Your Modules','your-modules','

Your site has some commonly used modules already preconfigured. These include:

  • Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.
  • 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 blog roll on the top menu to update this.
  • Most Read Posts which lists articles based on the number of times they have been read.
  • Older Articles which lists out articles by month.
  • Syndicate which allows your readers to read your posts in a news reader.
  • Popular Tags, which will appear if you use tagging on your articles. Just enter a tag in the Tags field when editing.

Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.

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 Joomla! Extensions Directory.

','',1,9,'2010-12-31 00:00:01',713,'Joomla','2013-10-13 17:59:36',713,0,'1970-01-01 00:00:00','2010-12-31 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',11,0,'','',1,4,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (6,43,'Your Template','your-template','

Templates control the look and feel of your website.

This blog is installed with the Protostar template.

You can edit the options by clicking on the Working on Your Site, Template Settings link in the top menu (visible when you login).

For example you can change the site background color, highlights color, site title, site description and title font used.

More options are available in the site administrator. You may also install a new template using the extension manager.

','',1,9,'2011-01-02 00:00:01',713,'Joomla','2013-10-13 17:04:31',713,0,'1970-01-01 00:00:00','2011-01-02 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}',17,0,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''); SELECT setval('#__content_id_seq', max(id)) FROM #__content; diff --git a/installation/sql/postgresql/sample_learn.sql b/installation/sql/postgresql/sample_learn.sql index 0702ff308a7aa..b6fe27162179f 100644 --- a/installation/sql/postgresql/sample_learn.sql +++ b/installation/sql/postgresql/sample_learn.sql @@ -209,14 +209,14 @@ INSERT INTO "#__categories" VALUES (16,41,1,61,122,1,'sample-data-contact','com_contact','Sample Data-Contact','sample-data-contact','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (17,42,1,57,58,1,'sample-data-newsfeeds','com_newsfeeds','Sample Data-Newsfeeds','sample-data-newsfeeds','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (19,44,14,10,37,2,'sample-data-articles/joomla','com_content','Joomla!','joomla','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), -(20,45,19,11,36,3,'sample-data-articles/joomla/extensions','com_content','Extensions','extensions','','

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), +(20,45,19,11,36,3,'sample-data-articles/joomla/extensions','com_content','Extensions','extensions','','

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (21,46,20,12,13,4,'sample-data-articles/joomla/extensions/components','com_content','Components','components','','

Components are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:33:59',0,'*',1), (22,47,20,14,25,4,'sample-data-articles/joomla/extensions/modules','com_content','Modules','modules','','

Modules are small blocks of content that can be displayed in positions on a web page. The menus on this site are displayed in modules. The core of Joomla! includes 24 separate modules ranging from login to search to random images. Each module has a name that starts mod_ but when it displays it has a title. In the descriptions in this section, the titles are the same as the names.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:34:18',0,'*',1), (23,48,20,26,31,4,'sample-data-articles/joomla/extensions/templates','com_content','Templates','templates','','

Templates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:36:13',0,'*',1), -(24,49,20,32,33,4,'sample-data-articles/joomla/extensions/languages','com_content','Languages','languages','','

Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:37:26',0,'*',1), +(24,49,20,32,33,4,'sample-data-articles/joomla/extensions/languages','com_content','Languages','languages','','

Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:37:26',0,'*',1), (25,50,20,34,35,4,'sample-data-articles/joomla/extensions/plugins','com_content','Plugins','plugins','','

Plugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 06:36:50',0,'*',1), (26,51,14,38,47,2,'sample-data-articles/park-site','com_content','Park Site','park-site','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), -(27,52,26,39,40,3,'sample-data-articles/park-site/park-blog','com_content','Park Blog','park-blog','','

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), +(27,52,26,39,40,3,'sample-data-articles/park-site/park-blog','com_content','Park Blog','park-blog','','

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), (28,53,26,41,46,3,'sample-data-articles/park-site/photo-gallery','com_content','Photo Gallery','photo-gallery','','

These are my photos from parks I have visited (I didn\'t take them, they are all from Wikimedia Commons).

This shows you how to make a simple image gallery using articles in com_content.

In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',123,'2012-09-25 11:05:37',0,'en-GB',1), (29,54,14,48,53,2,'sample-data-articles/fruit-shop-site','com_content','Fruit Shop Site','fruit-shop-site','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (30,55,29,49,50,3,'sample-data-articles/fruit-shop-site/growers','com_content','Growers','growers','','

We search the whole countryside for the best fruit growers.

You can let each supplier have a page that he or she can edit. To see this in action you will need to create a user who is in the suppliers group.

Create one page in the growers category for that user and make that supplier the author of the page. That user will be able to edit his or her page.

This illustrates the use of the Edit Own permission.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',910,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), @@ -290,7 +290,7 @@ INSERT INTO "#__content" VALUES (5,101,'Authentication','authentication','

The authentication plugins operate when users login to your site or administrator. The Joomla! authentication plugin is in operation by default but you can enable Gmail or LDAP or install a plugin for a different system. An example is included that may be used to create a new authentication plugin.

Default on:

Default off:

','',1,25,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (6,102,'Australian Parks ','australian-parks','

Welcome!

This is a basic site about the beautiful and fascinating parks of Australia.

On this site you can read all about my travels to different parks, see photos, and find links to park websites.

This sample site is an example of using the core of Joomla! to create a basic website, whether a "brochure site," a personal blog, or as a way to present information on a topic you are interested in.

Read more about the site in the About Parks module.

','',1,26,'2011-01-01 00:00:01',123,'Joomla','2012-09-25 11:04:30',123,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',3,1,'','',1,14,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (7,103,'Banner Module','banner-module','

The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

{loadmodule banners,Banners}
','',1,66,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,6,'','',1,0,'',0,'*',''), -(8,104,'Beginners','beginners','

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

','

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you\'re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners\' Areas of the Joomla documentation and support forums.

You\'ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can\'t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can\'t find one near you? Start one yourself.

',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,1,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), +(8,104,'Beginners','beginners','

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

','

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you\'re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners\' Areas of the Joomla documentation and support forums.

You\'ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can\'t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can\'t find one near you? Start one yourself.

',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,1,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), (9,105,'Contacts','contact','

The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

','',1,21,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (10,106,'Content','content','

The content component (com_content) is what you use to write articles. It is extremely flexible and has the largest number of built in views. Articles can be created and edited from the front end, making content the easiest component to use to create your site content. Help

','',1,21,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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":""}',1,1,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (11,107,'Cradle Mountain','cradle-mountain','

','

',1,73,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/250px_cradle_mountain_seen_from_barn_bluff.jpg","float_intro":"","image_intro_alt":"Cradle Mountain","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/800px_cradle_mountain_seen_from_barn_bluff.jpg","float_fulltext":"none","image_fulltext_alt":"Cradle Mountain","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Alan J.W.C. License: GNU Free Documentation License v . 1.2 or later"}','{"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,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), @@ -302,7 +302,7 @@ INSERT INTO "#__content" VALUES (17,115,'First Blog Post','first-blog-post','

Lorem Ipsum is filler text that is commonly used by designers before the content for a new site is ready.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus purus vitae diam posuere nec eleifend elit dictum. Aenean sit amet erat purus, id fermentum lorem. Integer elementum tristique lectus, non posuere quam pretium sed. Quisque scelerisque erat at urna condimentum euismod. Fusce vestibulum facilisis est, a accumsan massa aliquam in. In auctor interdum mauris a luctus. Morbi euismod tempor dapibus. Duis dapibus posuere quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In eu est nec erat sollicitudin hendrerit. Pellentesque sed turpis nunc, sit amet laoreet velit. Praesent vulputate semper nulla nec varius. Aenean aliquam, justo at blandit sodales, mauris leo viverra orci, sed sodales mauris orci vitae magna.

','

Quisque a massa sed libero tristique suscipit. Morbi tristique molestie metus, vel vehicula nisl ultrices pretium. Sed sit amet est et sapien condimentum viverra. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus viverra tortor porta orci convallis ac cursus erat sagittis. Vivamus aliquam, purus non luctus adipiscing, orci urna imperdiet eros, sed tincidunt neque sapien et leo. Cras fermentum, dolor id tempor vestibulum, neque lectus luctus mauris, nec congue tellus arcu nec augue. Nulla quis mi arcu, in bibendum quam. Sed placerat laoreet fermentum. In varius lobortis consequat. Proin vulputate felis ac arcu lacinia adipiscing. Morbi molestie, massa id sagittis luctus, sem sapien sollicitudin quam, in vehicula quam lectus quis augue. Integer orci lectus, bibendum in fringilla sit amet, rutrum eget enim. Curabitur at libero vitae lectus gravida luctus. Nam mattis, ligula sit amet vestibulum feugiat, eros sem sodales mi, nec dignissim ante elit quis nisi. Nulla nec magna ut leo convallis sagittis ac non erat. Etiam in augue nulla, sed tristique orci. Vestibulum quis eleifend sapien.

Nam ut orci vel felis feugiat posuere ut eu lorem. In risus tellus, sodales eu eleifend sed, imperdiet id nulla. Nunc at enim lacus. Etiam dignissim, arcu quis accumsan varius, dui dui faucibus erat, in molestie mauris diam ac lacus. Sed sit amet egestas nunc. Nam sollicitudin lacinia sapien, non gravida eros convallis vitae. Integer vehicula dui a elit placerat venenatis. Nullam tincidunt ligula aliquet dui interdum feugiat. Maecenas ultricies, lacus quis facilisis vehicula, lectus diam consequat nunc, euismod eleifend metus felis eu mauris. Aliquam dapibus, ipsum a dapibus commodo, dolor arcu accumsan neque, et tempor metus arcu ut massa. Curabitur non risus vitae nisl ornare pellentesque. Pellentesque nec ipsum eu dolor sodales aliquet. Vestibulum egestas scelerisque tincidunt. Integer adipiscing ultrices erat vel rhoncus.

Integer ac lectus ligula. Nam ornare nisl id magna tincidunt ultrices. Phasellus est nisi, condimentum at sollicitudin vel, consequat eu ipsum. In venenatis ipsum in ligula tincidunt bibendum id et leo. Vivamus quis purus massa. Ut enim magna, pharetra ut condimentum malesuada, auctor ut ligula. Proin mollis, urna a aliquam rutrum, risus erat cursus odio, a convallis enim lectus ut lorem. Nullam semper egestas quam non mattis. Vestibulum venenatis aliquet arcu, consectetur pretium erat pulvinar vel. Vestibulum in aliquet arcu. Ut dolor sem, pellentesque sit amet vestibulum nec, tristique in orci. Sed lacinia metus vel purus pretium sit amet commodo neque condimentum.

Aenean laoreet aliquet ullamcorper. Nunc tincidunt luctus tellus, eu lobortis sapien tincidunt sed. Donec luctus accumsan sem, at porttitor arcu vestibulum in. Sed suscipit malesuada arcu, ac porttitor orci volutpat in. Vestibulum consectetur vulputate eros ut porttitor. Aenean dictum urna quis erat rutrum nec malesuada tellus elementum. Quisque faucibus, turpis nec consectetur vulputate, mi enim semper mi, nec porttitor libero magna ut lacus. Quisque sodales, leo ut fermentum ullamcorper, tellus augue gravida magna, eget ultricies felis dolor vitae justo. Vestibulum blandit placerat neque, imperdiet ornare ipsum malesuada sed. Quisque bibendum quam porta diam molestie luctus. Sed metus lectus, ornare eu vulputate vel, eleifend facilisis augue. Maecenas eget urna velit, ac volutpat velit. Nam id bibendum ligula. Donec pellentesque, velit eu convallis sodales, nisi dui egestas nunc, et scelerisque lectus quam ut ipsum.

',1,27,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,2,'','',1,1,'',0,'*',''), (18,116,'Second Blog Post','second-blog-post','

Lorem Ipsum is text that is traditionally used by designers when working on a site before the content is ready.

Pellentesque bibendum metus ut dolor fermentum ut pulvinar tortor hendrerit. Nam vel odio vel diam tempus iaculis in non urna. Curabitur scelerisque, nunc id interdum vestibulum, felis elit luctus dui, ac dapibus tellus mauris tempus augue. Duis congue facilisis lobortis. Phasellus neque erat, tincidunt non lacinia sit amet, rutrum vitae nunc. Sed placerat lacinia fermentum. Integer justo sem, cursus id tristique eget, accumsan vel sapien. Curabitur ipsum neque, elementum vel vestibulum ut, lobortis a nisl. Fusce malesuada mollis purus consectetur auctor. Morbi tellus nunc, dapibus sit amet rutrum vel, laoreet quis mauris. Aenean nec sem nec purus bibendum venenatis. Mauris auctor commodo libero, in adipiscing dui adipiscing eu. Praesent eget orci ac nunc sodales varius.

','

Nam eget venenatis lorem. Vestibulum a interdum sapien. Suspendisse potenti. Quisque auctor purus nec sapien venenatis vehicula malesuada velit vehicula. Fusce vel diam dolor, quis facilisis tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque libero nisi, pellentesque quis cursus sit amet, vehicula vitae nisl. Curabitur nec nunc ac sem tincidunt auctor. Phasellus in mattis magna. Donec consequat orci eget tortor ultricies rutrum. Mauris luctus vulputate molestie. Proin tincidunt vehicula euismod. Nam congue leo non erat cursus a adipiscing ipsum congue. Nulla iaculis purus sit amet turpis aliquam sit amet dapibus odio tincidunt. Ut augue diam, congue ut commodo pellentesque, fermentum mattis leo. Sed iaculis urna id enim dignissim sodales at a ipsum. Quisque varius lobortis mollis. Nunc purus magna, pellentesque pellentesque convallis sed, varius id ipsum. Etiam commodo mi mollis erat scelerisque fringilla. Nullam bibendum massa sagittis diam ornare rutrum.

Praesent convallis metus ut elit faucibus tempus in quis dui. Donec fringilla imperdiet nibh, sit amet fringilla velit congue et. Quisque commodo luctus ligula, vitae porttitor eros venenatis in. Praesent aliquet commodo orci id varius. Nulla nulla nibh, varius id volutpat nec, sagittis nec eros. Cras et dui justo. Curabitur malesuada facilisis neque, sed tempus massa tincidunt ut. Sed suscipit odio in lacus auctor vehicula non ut lacus. In hac habitasse platea dictumst. Sed nulla nisi, lacinia in viverra at, blandit vel tellus. Nulla metus erat, ultrices non pretium vel, varius nec sem. Morbi sollicitudin mattis lacus quis pharetra. Donec tincidunt mollis pretium. Proin non libero justo, vitae mattis diam. Integer vel elit in enim varius posuere sed vitae magna. Duis blandit tempor elementum. Vestibulum molestie dui nisi.

Curabitur volutpat interdum lorem sed tempus. Sed placerat quam non ligula lacinia sodales. Cras ultrices justo at nisi luctus hendrerit. Quisque sit amet placerat justo. In id sapien eu neque varius pharetra sed in sapien. Etiam nisl nunc, suscipit sed gravida sed, scelerisque ut nisl. Mauris quis massa nisl, aliquet posuere ligula. Etiam eget tortor mauris. Sed pellentesque vestibulum commodo. Mauris vitae est a libero dapibus dictum fringilla vitae magna.

Nulla facilisi. Praesent eget elit et mauris gravida lobortis ac nec risus. Ut vulputate ullamcorper est, volutpat feugiat lacus convallis non. Maecenas quis sem odio, et aliquam libero. Integer vel tortor eget orci tincidunt pulvinar interdum at erat. Integer ullamcorper consequat eros a pellentesque. Cras sagittis interdum enim in malesuada. Etiam non nunc neque. Fusce non ligula at tellus porta venenatis. Praesent tortor orci, fermentum sed tincidunt vel, varius vel dui. Duis pulvinar luctus odio, eget porta justo vulputate ac. Nulla varius feugiat lorem sed tempor. Phasellus pulvinar dapibus magna eget egestas. In malesuada lectus at justo pellentesque vitae rhoncus nulla ultrices. Proin ut sem sem. Donec eu suscipit ipsum. Cras eu arcu porttitor massa feugiat aliquet at quis nisl.

',1,27,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,2,'',0,'*',''), (19,117,'Footer Module','footer-module','

This module shows the Joomla! copyright information. Help

{loadmodule footer,Footer}
','',1,66,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,3,'','',1,0,'',0,'*',''), -(20,118,'Fruit Shop','fruit-shop','

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

','',1,29,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,10,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(20,118,'Fruit Shop','fruit-shop','

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

','',1,29,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,10,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (21,119,'Getting Help','getting-help','

There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

','',1,19,'2011-01-01 00:00:01',123,'Joomla','2012-09-25 07:39:17',123,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',2,8,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (22,120,'Getting Started','getting-started','

It\'s easy to get started creating your website. Knowing some of the basics will help.

What is a Content Management System?

A content management system is software that allows you to create and manage webpages easily by separating the creation of your content from the mechanics required to present it on the web.

In this site, the content is stored in a database. The look and feel are created by a template. The Joomla! software brings together the template and the content to create web pages.

Site and Administrator

Your site actually has two separate sites. The site (also called the front end) is what visitors to your site will see. The administrator (also called the back end) is only used by people managing your site. You can access the administrator by clicking the "Site Administrator" link on the "This Site" menu or by adding /administrator to the end of you domain name.

Log in to the administrator using the username and password created during the installation of Joomla.

Logging in

To login to the front end of your site use the login form or the login menu link on the "This Site" menu. Use the user name and password that were created as part of the installation process. Once logged-in you will be able to create and edit articles.

In managing your site, you will be able to create content that only logged-in users are able to see.

Creating an article

Once you are logged-in, a new menu will be visible. To create a new article, click on the "submit article" link on that menu.

The new article interface gives you a lot of options, but all you need to do is add a title and put something in the content area. To make it easy to find, set the state to published and put it in the Joomla category.

You can edit an existing article by clicking on the edit icon (this only displays to users who have the right to edit).

Learn more

There is much more to learn about how to use Joomla! to create the website you envision. You can learn much more at the Joomla! documentation site and on the Joomla! forums.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,9,'','',1,1,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (23,121,'Happy Orange Orchard','happy-orange-orchard','

At our orchard we grow the world\'s best oranges as well as other citrus fruit such as lemons and grapefruit. Our family has been tending this orchard for generations.

','',1,30,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,2,'','',1,0,'',0,'*',''), @@ -320,7 +320,7 @@ INSERT INTO "#__content" VALUES (35,133,'Professionals','professionals','

Joomla! 3 continues development of the Joomla Platform and CMS as a powerful and flexible way to bring your vision of the web to reality. With the new administrator interface and adoption of Twitter Bootstrap, the ability to control its look and the management of extensions is now complete.

','

Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.3.10 and above makes Joomla lighter and faster than ever.

The separation of the Joomla! Platform project from the Joomla! CMS project makes continuous development of new, powerful APIs and continuous improvement of existing APIs possible while maintaining the stability of the CMS that millions of webmasters and professionals rely upon.

',1,19,'2011-01-01 00:00:01',123,'Joomla','2012-09-25 07:14:30',123,0,'1970-01-01 00:00:00','2011-01-09 16:41:13','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',2,5,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), (36,134,'Random Image Module','random-image-module','

This module displays a random image from your chosen image directory. Help

{loadmodule random_image,Random Image}
','',1,66,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (37,135,'Related Items Module','related-items-module','

This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

{loadmodule related_items,Articles Related Items}
','',1,64,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'modules, content','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), -(38,136,'Sample Sites','sample-sites','

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site\'s focus.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,11,'','',1,14,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(38,136,'Sample Sites','sample-sites','

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site\'s focus.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,11,'','',1,14,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (39,137,'Search','search-component','

Joomla! 2.5 offers two search options.

The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

','',1,21,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (40,138,'Search Module','search-module','

This module will display a search box. Help

{loadmodule search,Search}
','',1,67,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,4,'','',1,0,'',0,'*',''), (41,139,'Search ','search-plugin','

The search component uses plugins to control which parts of your Joomla! site are searched. You may choose to turn off some areas to improve performance or for other reasons. Many third party Joomla! extensions have search plugins that extend where search takes place.

Default On:

','',1,25,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), @@ -329,7 +329,7 @@ INSERT INTO "#__content" VALUES (44,142,'Statistics Module','statistics','

This module shows information about your server installation together with statistics on the website users, number of Articles in your database and the number of Web links you provide.

{loadmodule mod_stats,Statistics}
','',1,67,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,5,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (45,143,'Syndicate Module','syndicate-module','

The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, contact pages, such as this one. Help

{loadposition syndicate,Syndicate}
','',1,67,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,6,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (46,144,'System','system','

System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

Default on:

Default off:

','',1,25,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), -(47,145,'The Joomla! Community','the-joomla-community','

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,1,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(47,145,'The Joomla! Community','the-joomla-community','

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,1,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (48,146,'The Joomla! Project','the-joomla-project','

The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

Our mission is to provide a flexible platform for digital publishing and collaboration.

The core values are:

  • Freedom
  • Equality
  • Trust
  • Community
  • Collaboration
  • Usability

In our vision, we see:

  • People publishing and collaborating in their communities and around the world
  • Software that is free, secure, and high-quality
  • A community that is enjoyable and rewarding to participate in
  • People around the world using their preferred languages
  • A project that acts autonomously
  • A project that is socially responsible
  • A project dedicated to maintaining the trust of its users

There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (49,147,'Typography','typography','

H1 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H2 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H3 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H4 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H5 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz
H6 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

P The quick brown fox ran over the lazy dog. THE QUICK BROWN FOX RAN OVER THE LAZY DOG.

  • Item
  • Item
  • Item
    • Item
    • Item
    • Item
      • Item
      • Item
      • Item
  1. tem
  2. Item
  3. Item
    1. Item
    2. Item
    3. Item
      1. Item
      2. Item
      3. Item
','',1,23,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,8,'',0,'*',''), (50,148,'Upgraders','upgraders','

If you are an experienced Joomla! user, this Joomla site will seem very familiar but also very different. The biggest change is the new administrator interface and the adoption of responsive design. Hundreds of other improvements have been made.

','',1,19,'2011-01-01 00:00:01',123,'Joomla','2012-09-25 07:12:10',123,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',3,6,'','',1,2,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), diff --git a/installation/sql/postgresql/sample_testing.sql b/installation/sql/postgresql/sample_testing.sql index deff10d29c92e..20c45b83d9b66 100644 --- a/installation/sql/postgresql/sample_testing.sql +++ b/installation/sql/postgresql/sample_testing.sql @@ -210,14 +210,14 @@ INSERT INTO "#__categories" VALUES (16,41,1,63,124,1,'sample-data-contact','com_contact','Sample Data-Contact','sample-data-contact','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (17,42,1,59,60,1,'sample-data-newsfeeds','com_newsfeeds','Sample Data-Newsfeeds','sample-data-newsfeeds','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (19,44,14,10,39,2,'sample-data-articles/joomla','com_content','Joomla!','joomla','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), -(20,45,19,11,38,3,'sample-data-articles/joomla/extensions','com_content','Extensions','extensions','','

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), +(20,45,19,11,38,3,'sample-data-articles/joomla/extensions','com_content','Extensions','extensions','','

The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (21,46,20,12,13,4,'sample-data-articles/joomla/extensions/components','com_content','Components','components','','

Component ImageComponents are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (22,47,20,14,25,4,'sample-data-articles/joomla/extensions/modules','com_content','Modules','modules','','

Media ImageModules are small blocks of content that can be displayed in positions on a web page. The menus on this site are displayed in modules. The core of Joomla! includes 24 separate modules ranging from login to search to random images. Each module has a name that starts mod_ but when it displays it has a title. In the descriptions in this section, the titles are the same as the names.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (23,48,20,26,33,4,'sample-data-articles/joomla/extensions/templates','com_content','Templates','templates','','

Media ImageTemplates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), -(24,49,20,34,35,4,'sample-data-articles/joomla/extensions/languages','com_content','Languages','languages','','

Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), +(24,49,20,34,35,4,'sample-data-articles/joomla/extensions/languages','com_content','Languages','languages','','

Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

Translation information

If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (25,50,20,36,37,4,'sample-data-articles/joomla/extensions/plugins','com_content','Plugins','plugins','','

Plugin ImagePlugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (26,51,14,40,49,2,'sample-data-articles/park-site','com_content','Park Site','park-site','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), -(27,52,26,41,42,3,'sample-data-articles/park-site/park-blog','com_content','Park Blog','park-blog','','

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), +(27,52,26,41,42,3,'sample-data-articles/park-site/park-blog','com_content','Park Blog','park-blog','','

Here is where I will blog all about the parks of Australia.

You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":"images\\/sampledata\\/parks\\/banner_cradle.jpg"}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), (28,53,26,43,48,3,'sample-data-articles/park-site/photo-gallery','com_content','Photo Gallery','photo-gallery','','

These are my photos from parks I have visited (I didn''t take them, they are all from Wikimedia Commons).

This shows you how to make a simple image gallery using articles in com_content.

In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'en-GB',1), (29,54,14,50,55,2,'sample-data-articles/fruit-shop-site','com_content','Fruit Shop Site','fruit-shop-site','','',1,0,'1970-01-01 00:00:00',1,'{"target":"","image":""}','','','{"page_title":"","author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), (30,55,29,51,52,3,'sample-data-articles/fruit-shop-site/growers','com_content','Growers','growers','','

We search the whole countryside for the best fruit growers.

You can let each supplier have a page that he or she can edit. To see this in action you will need to create a user who is in the suppliers group.

Create one page in the growers category for that user and make that supplier the author of the page. That user will be able to edit his or her page.

This illustrates the use of the Edit Own permission.

',1,0,'1970-01-01 00:00:00',1,'{"category_layout":"","image":""}','','','{"author":"","robots":""}',42,'2011-01-01 00:00:01',0,'1970-01-01 00:00:00',0,'*',1), @@ -292,7 +292,7 @@ INSERT INTO "#__content" VALUES (5,101,'Authentication','authentication','

The authentication plugins operate when users login to your site or administrator. The Joomla! authentication plugin is in operation by default but you can enable Gmail or LDAP or install a plugin for a different system. An example is included that may be used to create a new authentication plugin.

Default on:

Default off:

','',1,25,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (6,102,'Australian Parks ','australian-parks','

Cradle Park Banner

Welcome!

This is a basic site about the beautiful and fascinating parks of Australia.

On this site you can read all about my travels to different parks, see photos, and find links to park websites.

This sample site is an example of using the core of Joomla! to create a basic website, whether a "brochure site," a personal blog, or as a way to present information on a topic you are interested in.

Read more about the site in the About Parks module.

','',1,26,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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":""}',1,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (7,103,'Banner Module','banner-module','

The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

{loadmodule banners,Banners}
','',1,66,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,6,'','',1,0,'',0,'*',''), -(8,104,'Beginners','beginners','

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

','

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), +(8,104,'Beginners','beginners','

If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

Start off using your site by logging in using the administrator account you created when you installed Joomla.

','

Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), (9,105,'Contacts','contact','

The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

','',1,21,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (10,106,'Content','content','

The content component (com_content) is what you use to write articles. It is extremely flexible and has the largest number of built in views. Articles can be created and edited from the front end, making content the easiest component to use to create your site content. Help

','',1,21,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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":""}',1,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (11,107,'Cradle Mountain','cradle-mountain','

','

',1,73,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/250px_cradle_mountain_seen_from_barn_bluff.jpg","float_intro":"","image_intro_alt":"Cradle Mountain","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/800px_cradle_mountain_seen_from_barn_bluff.jpg","float_fulltext":"none","image_fulltext_alt":"Cradle Mountain","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Alan J.W.C. License: GNU Free Documentation License v . 1.2 or later"}','{"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,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), @@ -304,7 +304,7 @@ INSERT INTO "#__content" VALUES (17,115,'First Blog Post','first-blog-post','

Lorem Ipsum is filler text that is commonly used by designers before the content for a new site is ready.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus purus vitae diam posuere nec eleifend elit dictum. Aenean sit amet erat purus, id fermentum lorem. Integer elementum tristique lectus, non posuere quam pretium sed. Quisque scelerisque erat at urna condimentum euismod. Fusce vestibulum facilisis est, a accumsan massa aliquam in. In auctor interdum mauris a luctus. Morbi euismod tempor dapibus. Duis dapibus posuere quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In eu est nec erat sollicitudin hendrerit. Pellentesque sed turpis nunc, sit amet laoreet velit. Praesent vulputate semper nulla nec varius. Aenean aliquam, justo at blandit sodales, mauris leo viverra orci, sed sodales mauris orci vitae magna.

','

Quisque a massa sed libero tristique suscipit. Morbi tristique molestie metus, vel vehicula nisl ultrices pretium. Sed sit amet est et sapien condimentum viverra. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus viverra tortor porta orci convallis ac cursus erat sagittis. Vivamus aliquam, purus non luctus adipiscing, orci urna imperdiet eros, sed tincidunt neque sapien et leo. Cras fermentum, dolor id tempor vestibulum, neque lectus luctus mauris, nec congue tellus arcu nec augue. Nulla quis mi arcu, in bibendum quam. Sed placerat laoreet fermentum. In varius lobortis consequat. Proin vulputate felis ac arcu lacinia adipiscing. Morbi molestie, massa id sagittis luctus, sem sapien sollicitudin quam, in vehicula quam lectus quis augue. Integer orci lectus, bibendum in fringilla sit amet, rutrum eget enim. Curabitur at libero vitae lectus gravida luctus. Nam mattis, ligula sit amet vestibulum feugiat, eros sem sodales mi, nec dignissim ante elit quis nisi. Nulla nec magna ut leo convallis sagittis ac non erat. Etiam in augue nulla, sed tristique orci. Vestibulum quis eleifend sapien.

Nam ut orci vel felis feugiat posuere ut eu lorem. In risus tellus, sodales eu eleifend sed, imperdiet id nulla. Nunc at enim lacus. Etiam dignissim, arcu quis accumsan varius, dui dui faucibus erat, in molestie mauris diam ac lacus. Sed sit amet egestas nunc. Nam sollicitudin lacinia sapien, non gravida eros convallis vitae. Integer vehicula dui a elit placerat venenatis. Nullam tincidunt ligula aliquet dui interdum feugiat. Maecenas ultricies, lacus quis facilisis vehicula, lectus diam consequat nunc, euismod eleifend metus felis eu mauris. Aliquam dapibus, ipsum a dapibus commodo, dolor arcu accumsan neque, et tempor metus arcu ut massa. Curabitur non risus vitae nisl ornare pellentesque. Pellentesque nec ipsum eu dolor sodales aliquet. Vestibulum egestas scelerisque tincidunt. Integer adipiscing ultrices erat vel rhoncus.

Integer ac lectus ligula. Nam ornare nisl id magna tincidunt ultrices. Phasellus est nisi, condimentum at sollicitudin vel, consequat eu ipsum. In venenatis ipsum in ligula tincidunt bibendum id et leo. Vivamus quis purus massa. Ut enim magna, pharetra ut condimentum malesuada, auctor ut ligula. Proin mollis, urna a aliquam rutrum, risus erat cursus odio, a convallis enim lectus ut lorem. Nullam semper egestas quam non mattis. Vestibulum venenatis aliquet arcu, consectetur pretium erat pulvinar vel. Vestibulum in aliquet arcu. Ut dolor sem, pellentesque sit amet vestibulum nec, tristique in orci. Sed lacinia metus vel purus pretium sit amet commodo neque condimentum.

Aenean laoreet aliquet ullamcorper. Nunc tincidunt luctus tellus, eu lobortis sapien tincidunt sed. Donec luctus accumsan sem, at porttitor arcu vestibulum in. Sed suscipit malesuada arcu, ac porttitor orci volutpat in. Vestibulum consectetur vulputate eros ut porttitor. Aenean dictum urna quis erat rutrum nec malesuada tellus elementum. Quisque faucibus, turpis nec consectetur vulputate, mi enim semper mi, nec porttitor libero magna ut lacus. Quisque sodales, leo ut fermentum ullamcorper, tellus augue gravida magna, eget ultricies felis dolor vitae justo. Vestibulum blandit placerat neque, imperdiet ornare ipsum malesuada sed. Quisque bibendum quam porta diam molestie luctus. Sed metus lectus, ornare eu vulputate vel, eleifend facilisis augue. Maecenas eget urna velit, ac volutpat velit. Nam id bibendum ligula. Donec pellentesque, velit eu convallis sodales, nisi dui egestas nunc, et scelerisque lectus quam ut ipsum.

',1,27,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,2,'','',1,0,'',0,'*',''), (18,116,'Second Blog Post','second-blog-post','

Lorem Ipsum is text that is traditionally used by designers when working on a site before the content is ready.

Pellentesque bibendum metus ut dolor fermentum ut pulvinar tortor hendrerit. Nam vel odio vel diam tempus iaculis in non urna. Curabitur scelerisque, nunc id interdum vestibulum, felis elit luctus dui, ac dapibus tellus mauris tempus augue. Duis congue facilisis lobortis. Phasellus neque erat, tincidunt non lacinia sit amet, rutrum vitae nunc. Sed placerat lacinia fermentum. Integer justo sem, cursus id tristique eget, accumsan vel sapien. Curabitur ipsum neque, elementum vel vestibulum ut, lobortis a nisl. Fusce malesuada mollis purus consectetur auctor. Morbi tellus nunc, dapibus sit amet rutrum vel, laoreet quis mauris. Aenean nec sem nec purus bibendum venenatis. Mauris auctor commodo libero, in adipiscing dui adipiscing eu. Praesent eget orci ac nunc sodales varius.

','

Nam eget venenatis lorem. Vestibulum a interdum sapien. Suspendisse potenti. Quisque auctor purus nec sapien venenatis vehicula malesuada velit vehicula. Fusce vel diam dolor, quis facilisis tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque libero nisi, pellentesque quis cursus sit amet, vehicula vitae nisl. Curabitur nec nunc ac sem tincidunt auctor. Phasellus in mattis magna. Donec consequat orci eget tortor ultricies rutrum. Mauris luctus vulputate molestie. Proin tincidunt vehicula euismod. Nam congue leo non erat cursus a adipiscing ipsum congue. Nulla iaculis purus sit amet turpis aliquam sit amet dapibus odio tincidunt. Ut augue diam, congue ut commodo pellentesque, fermentum mattis leo. Sed iaculis urna id enim dignissim sodales at a ipsum. Quisque varius lobortis mollis. Nunc purus magna, pellentesque pellentesque convallis sed, varius id ipsum. Etiam commodo mi mollis erat scelerisque fringilla. Nullam bibendum massa sagittis diam ornare rutrum.

Praesent convallis metus ut elit faucibus tempus in quis dui. Donec fringilla imperdiet nibh, sit amet fringilla velit congue et. Quisque commodo luctus ligula, vitae porttitor eros venenatis in. Praesent aliquet commodo orci id varius. Nulla nulla nibh, varius id volutpat nec, sagittis nec eros. Cras et dui justo. Curabitur malesuada facilisis neque, sed tempus massa tincidunt ut. Sed suscipit odio in lacus auctor vehicula non ut lacus. In hac habitasse platea dictumst. Sed nulla nisi, lacinia in viverra at, blandit vel tellus. Nulla metus erat, ultrices non pretium vel, varius nec sem. Morbi sollicitudin mattis lacus quis pharetra. Donec tincidunt mollis pretium. Proin non libero justo, vitae mattis diam. Integer vel elit in enim varius posuere sed vitae magna. Duis blandit tempor elementum. Vestibulum molestie dui nisi.

Curabitur volutpat interdum lorem sed tempus. Sed placerat quam non ligula lacinia sodales. Cras ultrices justo at nisi luctus hendrerit. Quisque sit amet placerat justo. In id sapien eu neque varius pharetra sed in sapien. Etiam nisl nunc, suscipit sed gravida sed, scelerisque ut nisl. Mauris quis massa nisl, aliquet posuere ligula. Etiam eget tortor mauris. Sed pellentesque vestibulum commodo. Mauris vitae est a libero dapibus dictum fringilla vitae magna.

Nulla facilisi. Praesent eget elit et mauris gravida lobortis ac nec risus. Ut vulputate ullamcorper est, volutpat feugiat lacus convallis non. Maecenas quis sem odio, et aliquam libero. Integer vel tortor eget orci tincidunt pulvinar interdum at erat. Integer ullamcorper consequat eros a pellentesque. Cras sagittis interdum enim in malesuada. Etiam non nunc neque. Fusce non ligula at tellus porta venenatis. Praesent tortor orci, fermentum sed tincidunt vel, varius vel dui. Duis pulvinar luctus odio, eget porta justo vulputate ac. Nulla varius feugiat lorem sed tempor. Phasellus pulvinar dapibus magna eget egestas. In malesuada lectus at justo pellentesque vitae rhoncus nulla ultrices. Proin ut sem sem. Donec eu suscipit ipsum. Cras eu arcu porttitor massa feugiat aliquet at quis nisl.

',1,27,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), (19,117,'Footer Module','footer-module','

This module shows the Joomla! copyright information. Help

{loadmodule footer,Footer}
','',1,66,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,3,'','',1,0,'',0,'*',''), -(20,118,'Fruit Shop','fruit-shop','

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

','',1,29,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(20,118,'Fruit Shop','fruit-shop','

Welcome to the Fruit Shop

We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

','',1,29,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (21,119,'Getting Help','getting-help','

There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,8,'','',1,0,'',0,'*',''), (22,120,'Getting Started','getting-started','

It''s easy to get started creating your website. Knowing some of the basics will help.

What is a Content Management System?

A content management system is software that allows you to create and manage webpages easily by separating the creation of your content from the mechanics required to present it on the web.

In this site, the content is stored in a database. The look and feel are created by a template. The Joomla! software brings together the template and the content to create web pages.

Site and Administrator

Your site actually has two separate sites. The site (also called the front end) is what visitors to your site will see. The administrator (also called the back end) is only used by people managing your site. You can access the administrator by clicking the "Site Administrator" link on the "This Site" menu or by adding /administrator to the end of you domain name.

Log in to the administrator using the username and password created during the installation of Joomla.

Logging in

To login to the front end of your site use the login form or the login menu link on the "This Site" menu. Use the user name and password that were created as part of the installation process. Once logged-in you will be able to create and edit articles.

In managing your site, you will be able to create content that only logged-in users are able to see.

Creating an article

Once you are logged-in, a new menu will be visible. To create a new article, click on the "submit article" link on that menu.

The new article interface gives you a lot of options, but all you need to do is add a title and put something in the content area. To make it easy to find, set the state to published and put it in the Joomla category.

You can edit an existing article by clicking on the edit icon (this only displays to users who have the right to edit).

Learn more

There is much more to learn about how to use Joomla! to create the website you envision. You can learn much more at the Joomla! documentation site and on the Joomla! forums.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,9,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (23,121,'Happy Orange Orchard','happy-orange-orchard','

At our orchard we grow the world''s best oranges as well as other citrus fruit such as lemons and grapefruit. Our family has been tending this orchard for generations.

','',1,30,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,2,'','',1,0,'',0,'*',''), @@ -322,7 +322,7 @@ INSERT INTO "#__content" VALUES (35,133,'Professionals','professionals','

Joomla! 2.5 continues development of the Joomla Framework and CMS as a powerful and flexible way to bring your vision of the web to reality. With the administrator now fully MVC, the ability to control its look and the management of extensions is now complete.

','

Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.2.4 and above makes Joomla lighter and faster than ever. Languages files can now be overridden without having your changes lost during an upgrade. With the proper xml your users update extensions with a single click.

Access control lists are now incorporated using a new system developed for Joomla. The ACL system is designed with developers in mind, so it is easy to incorporate into your extensions. The new nested sets libraries allow you to incorporate infinitely deep categories but also to use nested sets in a variety of other ways.

A new forms library makes creating all kinds of user interaction simple. MooTools 1.3 provides a highly flexible javascript framework that is a major advance over MooTools 1.0.

New events throughout the core make integration of your plugins where you want them a snap.

The separation of the Joomla! Platform project from the Joomla! CMS project makes continuous development of new, powerful APIs and continuous improvement of existing APIs possible while maintaining the stability of the CMS that millions of webmasters and professionals rely upon.

Learn about:

',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-09 16:41:13','1970-01-01 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,5,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), (36,134,'Random Image Module','random-image-module','

This module displays a random image from your chosen image directory. Help

{loadmodule random_image,Random Image}
','',1,66,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (37,135,'Related Items Module','related-items-module','

This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

{loadmodule related_items,Articles Related Items}
','',1,64,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,4,'modules, content','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), -(38,136,'Sample Sites','sample-sites','

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,11,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(38,136,'Sample Sites','sample-sites','

Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,11,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (39,137,'Search','search-component','

Joomla! 2.5 offers two search options.

The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

','',1,21,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (40,138,'Search Module','search-module','

This module will display a search box. Help

{loadmodule search,Search}
','',1,67,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,4,'','',1,0,'',0,'*',''), (41,139,'Search ','search-plugin','

The search component uses plugins to control which parts of your Joomla! site are searched. You may choose to turn off some areas to improve performance or for other reasons. Many third party Joomla! extensions have search plugins that extend where search takes place.

Default On:

','',1,25,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), @@ -331,7 +331,7 @@ INSERT INTO "#__content" VALUES (44,142,'Statistics Module','statistics','

This module shows information about your server installation together with statistics on the website users, number of Articles in your database and the number of Web links you provide.

{loadmodule mod_stats,Statistics}
','',1,67,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,5,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (45,143,'Syndicate Module','syndicate-module','

The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, or contact pages, such as this one. Help

{loadposition syndicate,Syndicate}
','',1,67,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,6,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (46,144,'System','system','

System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

Default on:

Default off:

','',1,25,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), -(47,145,'The Joomla! Community','the-joomla-community','

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(47,145,'The Joomla! Community','the-joomla-community','

Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,3,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (48,146,'The Joomla! Project','the-joomla-project','

The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

Our mission is to provide a flexible platform for digital publishing and collaboration.

The core values are:

  • Freedom
  • Equality
  • Trust
  • Community
  • Collaboration
  • Usability

In our vision, we see:

  • People publishing and collaborating in their communities and around the world
  • Software that is free, secure, and high-quality
  • A community that is enjoyable and rewarding to participate in
  • People around the world using their preferred languages
  • A project that acts autonomously
  • A project that is socially responsible
  • A project dedicated to maintaining the trust of its users

There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

','',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (49,147,'Typography','typography','

H1 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H2 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H3 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H4 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

H5 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz
H6 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmonpqrstuvwzyz

P The quick brown fox ran over the lazy dog. THE QUICK BROWN FOX RAN OVER THE LAZY DOG.

  • Item
  • Item
  • Item
    • Item
    • Item
    • Item
      • Item
      • Item
      • Item
  1. tem
  2. Item
  3. Item
    1. Item
    2. Item
    3. Item
      1. Item
      2. Item
      3. Item
','',1,23,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), (50,148,'Upgraders','upgraders','

If you are an experienced Joomla! 1.5 user, this Joomla site will seem very familiar. There are new templates and improved user interfaces, but most functionality is the same. The biggest changes are improved access control (ACL) and nested categories. This release of Joomla has strong continuity with Joomla! 1.7 while adding enhancements.

','

The new user manager will let you manage who has access to what in your site. You can leave access groups exactly the way you had them in Joomla 1.5 or make them as complicated as you want. You can learn more about how access control works in on the Joomla! Documentation site

In Joomla 1.5 and 1.0 content was organized into sections and categories. From 1.6 forward sections are gone, and you can create categories within categories, going as deep as you want. The sample data provides many examples of the use of nested categories.

All layouts have been redesigned to improve accessibility and flexibility.

Updating your site and extensions when needed is easier than ever thanks to installer improvements.

',1,19,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 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,6,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',1,'*',''), diff --git a/installation/sql/sqlazure/sample_blog.sql b/installation/sql/sqlazure/sample_blog.sql index 7b82a5dcc461b..5f4f2c6c5bd11 100644 --- a/installation/sql/sqlazure/sample_blog.sql +++ b/installation/sql/sqlazure/sample_blog.sql @@ -156,7 +156,7 @@ SELECT 5, 40, 'Your Modules', 'your-modules', '

Your site has some commonly us

  • Popular Tags, which will appear if you use tagging on your articles. Just enter a tag in the Tags field when editing.
  • Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.

    -

    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 Joomla Extensions Directory.

    ', '', 1, 9, '2011-01-01 00:00:00', 628, 'Joomla', '1900-01-01 00:00:00', 713, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 11, 0, '', '', 1, 4, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +

    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 Joomla! Extensions Directory.

    ', '', 1, 9, '2011-01-01 00:00:00', 628, 'Joomla', '1900-01-01 00:00:00', 713, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":""}', 11, 0, '', '', 1, 4, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 6, 43, 'Your Template', 'your-template', '

    Templates control the look and feel of your website.

    This blog is installed with the Protostar template.

    diff --git a/installation/sql/sqlazure/sample_learn.sql b/installation/sql/sqlazure/sample_learn.sql index 2a70199284cb1..92d34620a52d6 100644 --- a/installation/sql/sqlazure/sample_learn.sql +++ b/installation/sql/sqlazure/sample_learn.sql @@ -378,7 +378,7 @@ SELECT 17, 42, 1, 57, 58, 1, 'sample-data-newsfeeds', 'com_newsfeeds', 'Sample D UNION ALL SELECT 19, 44, 14, 10, 37, 2, 'sample-data-articles/joomla', 'com_content', 'Joomla!', 'joomla', '', '', 1, 0, '1900-01-01 00:00:01', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL -SELECT 20, 45, 19, 11, 36, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

    The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, '*', 1 +SELECT 20, 45, 19, 11, 36, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

    The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL SELECT 21, 46, 20, 12, 13, 4, 'sample-data-articles/joomla/extensions/components', 'com_content', 'Components', 'components', '', '

    Components are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL @@ -386,13 +386,13 @@ SELECT 22, 47, 20, 14, 25, 4, 'sample-data-articles/joomla/extensions/modules', UNION ALL SELECT 23, 48, 20, 26, 31, 4, 'sample-data-articles/joomla/extensions/templates', 'com_content', 'Templates', 'templates', '', '

    Templates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL -SELECT 24, 49, 20, 32, 33, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

    Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

    Translation information

    If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

    Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

    If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

    Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

    There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, '*', 1 +SELECT 24, 49, 20, 32, 33, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

    Joomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

    Translation information

    If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

    Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

    If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

    Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

    There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL SELECT 25, 50, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/plugins', 'com_content', 'Plugins', 'plugins', '', '

    Plugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, '*', 1 UNION ALL SELECT 26, 51, 14, 38, 47, 2, 'sample-data-articles/park-site', 'com_content', 'Park Site', 'park-site', '', '', 1, 0, '1900-01-01 00:00:01', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, 'en-GB', 1 UNION ALL -SELECT 27, 52, 26, 39, 40, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

    Here is where I will blog all about the parks of Australia.

    You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

    To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":"images\/sampledata\/parks\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, 'en-GB', 1 +SELECT 27, 52, 26, 39, 40, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

    Here is where I will blog all about the parks of Australia.

    You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

    To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":"images\/sampledata\/parks\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 0, '1900-01-01 00:00:01', 0, 'en-GB', 1 UNION ALL SELECT 28, 53, 26, 41, 46, 3, 'sample-data-articles/park-site/photo-gallery', 'com_content', 'Photo Gallery', 'photo-gallery', '', '

    These are my photos from parks I have visited (I didn''t take them, they are all from Wikimedia Commons).

    This shows you how to make a simple image gallery using articles in com_content.

    In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

    ', 1, 0, '1900-01-01 00:00:01', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 726, '2011-01-01 00:00:01', 123, '1900-01-01 00:00:01', 0, 'en-GB', 1 UNION ALL @@ -522,7 +522,7 @@ SELECT 6, 102, 'Australian Parks ', 'australian-parks', '

    Welcome!

    This UNION ALL SELECT 7, 103, 'Banner Module', 'banner-module', '

    The banner module is used to display the banners that are managed by the banners component in the site administrator. Help.

    {loadmodule banners,Banners}
    ', '', 1, 66, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, '', '', 1, 0, '', 0, '*', '' UNION ALL -SELECT 8, 104, 'Beginners', 'beginners', '

    If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

    Start off using your site by logging in using the administrator account you created when you installed Joomla.

    ', '

    Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

    You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

    The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

    Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

    ', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 4, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', '' +SELECT 8, 104, 'Beginners', 'beginners', '

    If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

    Start off using your site by logging in using the administrator account you created when you installed Joomla.

    ', '

    Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

    You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

    The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

    Want to learn more? Consider attending a JoomlaDay or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

    ', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 4, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', '' UNION ALL SELECT 9, 105, 'Contacts', 'contact', '

    The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"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":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL @@ -546,7 +546,7 @@ SELECT 18, 116, 'Second Blog Post', 'second-blog-post', '

    Lorem Ipsum is t UNION ALL SELECT 19, 117, 'Footer Module', 'footer-module', '

    This module shows the Joomla! copyright information. Help

    {loadmodule footer,Footer}
    ', '', 1, 66, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 3, '', '', 1, 0, '', 0, '*', '' UNION ALL -SELECT 20, 118, 'Fruit Shop', 'fruit-shop', '

    Welcome to the Fruit Shop

    We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

    This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

    To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

    ', '', 1, 29, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 1, '', '', 1, 10, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +SELECT 20, 118, 'Fruit Shop', 'fruit-shop', '

    Welcome to the Fruit Shop

    We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

    This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

    To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

    ', '', 1, 29, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 1, '', '', 1, 10, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 21, 119, 'Getting Help', 'getting-help', '

    There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 123, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":null,"urlatext":"","targeta":"","urlb":null,"urlbtext":"","targetb":"","urlc":null,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","info_block_position":"0","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":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 2, 8, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL @@ -582,7 +582,7 @@ SELECT 36, 134, 'Random Image Module', 'random-image-module', '

    This module di UNION ALL SELECT 37, 135, 'Related Items Module', 'related-items-module', '

    This module displays other Articles that are related to the one currently being viewed. These relations are established by the Meta Keywords. All the keywords of the current Article are searched against all the keywords of all other published articles. Help

    {loadmodule related_items,Articles Related Items}
    ', '', 1, 64, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 4, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL -SELECT 38, 136, 'Sample Sites', 'sample-sites', '

    Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

    The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

    The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

    In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 11, '', '', 1, 14, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +SELECT 38, 136, 'Sample Sites', 'sample-sites', '

    Your installation includes sample data, designed to show you some of the options you have for building your website. In addition to information about Joomla! there are two sample "sites within a site" designed to help you get started with building your own site.

    The first site is a simple site about Australian Parks. It shows how you can quickly and easily build a personal site with just the building blocks that are part of Joomla. It includes a personal blog, and a very simple image gallery.

    The second site is slightly more complex and represents what you might do if you are building a site for a small business, in this case a Fruit Shop.

    In building either style site, or something completely different, you will probably want to add extensions and either create or purchase your own template. Many Joomla users start by modifying the templates that come with the core distribution so that they include special images and other design elements that relate to their site''s focus.

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 11, '', '', 1, 14, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 39, 137, 'Search', 'search-component', '

    Joomla! 2.5 offers two search options.

    The Basic Search component provides basic search functionality for the information contained in your core components. Many extensions can also be searched by the search component. Help

    The Smart Search component offers searching similar to that found in major search engines. Smart Search is disabled by default. If you choose to enable it you will need to take several steps. First, enable the Smart Search Plugin in the plugin manager. Then, if you are using the Basic Search Module replace it with the Smart Search Module. Finally, if you have already created content, go to the Smart Search component in your site administrator and click the Index icon. Once indexing of your content is complete, Smart Search will be ready to use. Help.

    ', '', 1, 21, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL @@ -600,7 +600,7 @@ SELECT 45, 143, 'Syndicate Module', 'syndicate-module', '

    The syndicate module UNION ALL SELECT 46, 144, 'System', 'system', '

    System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

    Default on:

    Default off:

    ', '', 1, 25, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL -SELECT 47, 145, 'The Joomla! Community', 'the-joomla-community', '

    Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 3, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +SELECT 47, 145, 'The Joomla! Community', 'the-joomla-community', '

    Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 3, '', '', 1, 1, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 48, 146, 'The Joomla! Project', 'the-joomla-project', '

    The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

    Our mission is to provide a flexible platform for digital publishing and collaboration.

    The core values are:

    • Freedom
    • Equality
    • Trust
    • Community
    • Collaboration
    • Usability

    In our vision, we see:

    • People publishing and collaborating in their communities and around the world
    • Software that is free, secure, and high-quality
    • A community that is enjoyable and rewarding to participate in
    • People around the world using their preferred languages
    • A project that acts autonomously
    • A project that is socially responsible
    • A project dedicated to maintaining the trust of its users

    There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

    Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

    ', '', 1, 19, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 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, 1, '', '', 1, 2, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL diff --git a/installation/sql/sqlazure/sample_testing.sql b/installation/sql/sqlazure/sample_testing.sql index 3cb3bf766763c..a250419dcb9f0 100644 --- a/installation/sql/sqlazure/sample_testing.sql +++ b/installation/sql/sqlazure/sample_testing.sql @@ -380,7 +380,7 @@ SELECT 17, 42, 1, 59, 60, 1, 'sample-data-newsfeeds', 'com_newsfeeds', 'Sample D UNION ALL SELECT 19, 44, 14, 10, 39, 2, 'sample-data-articles/joomla', 'com_content', 'Joomla!', 'joomla', '', '', 1, 0, '1900-01-01 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL -SELECT 20, 45, 19, 11, 38, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

    The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 +SELECT 20, 45, 19, 11, 38, 3, 'sample-data-articles/joomla/extensions', 'com_content', 'Extensions', 'extensions', '', '

    The Joomla! content management system lets you create webpages of various types using extensions. There are 5 basic types of extensions: components, modules, templates, languages, and plugins. Your website includes the extensions you need to create a basic website in English, but thousands of additional extensions of all types are available. The Joomla! Extensions Directory is the largest directory of Joomla extensions.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL SELECT 21, 46, 20, 12, 13, 4, 'sample-data-articles/joomla/extensions/components', 'com_content', 'Components', 'components', '', '

    Component ImageComponents are larger extensions that produce the major content for your site. Each component has one or more "views" that control how content is displayed. In the Joomla administrator there are additional extensions such as Menus, Redirection, and the extension managers.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL @@ -388,13 +388,13 @@ SELECT 22, 47, 20, 14, 25, 4, 'sample-data-articles/joomla/extensions/modules', UNION ALL SELECT 23, 48, 20, 26, 33, 4, 'sample-data-articles/joomla/extensions/templates', 'com_content', 'Templates', 'templates', '', '

    Media ImageTemplates give your site its look and feel. They determine layout, colours, typefaces, graphics and other aspects of design that make your site unique. Your installation of Joomla comes prepackaged with three front end templates and two backend templates. Help

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL -SELECT 24, 49, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

    Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

    Translation information

    If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

    Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

    If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

    Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

    There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 +SELECT 24, 49, 20, 34, 35, 4, 'sample-data-articles/joomla/extensions/languages', 'com_content', 'Languages', 'languages', '', '

    Languages ImageJoomla! installs in English, but translations of the interfaces, sample data and help screens are available in dozens of languages. Help

    Translation information

    If there is no language pack available for your language, instructions are available for creating your own translation, which you can also contribute to the community by starting a translation team to create an accredited translation.

    Translations of the interfaces are installed using the extensions manager in the site administrator and then managed using the language manager.

    If you have two or more languages installed you may enable the language switcher plugin and module. They should always be used together. If you create multilingual content and mark your content, menu items or modules as being in specific languages and follow the complete instructions your users will be able to select a specific content language using the module. By default both the plugin and module are disabled.

    Joomla 2.5 installs with a language override manager that allows you to change the specific words (such as Edit or Search) used in the Joomla application.

    There are a number of extensions that can help you manage translations of content available in the Joomla! Extensions Directory.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL SELECT 25, 50, 20, 36, 37, 4, 'sample-data-articles/joomla/extensions/plugins', 'com_content', 'Plugins', 'plugins', '', '

    Plugin ImagePlugins are small task oriented extensions that enhance the Joomla! framework. Some are associated with particular extensions and others, such as editors, are used across all of Joomla. Most beginning users do not need to change any of the plugins that install with Joomla. Help

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":""}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, '*', 1 UNION ALL SELECT 26, 51, 14, 40, 49, 2, 'sample-data-articles/park-site', 'com_content', 'Park Site', 'park-site', '', '', 1, 0, '1900-01-01 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, 'en-GB', 1 UNION ALL -SELECT 27, 52, 26, 41, 42, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

    Here is where I will blog all about the parks of Australia.

    You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

    To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":"images\/sampledata\/parks\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, 'en-GB', 1 +SELECT 27, 52, 26, 41, 42, 3, 'sample-data-articles/park-site/park-blog', 'com_content', 'Park Blog', 'park-blog', '', '

    Here is where I will blog all about the parks of Australia.

    You can make a blog on your website by creating a category to write your blog posts in (this one is called Park Blog). Each blog post will be an article in that category. If you make a category blog menu link with 1 column it will look like this page, if you display the category description then this part is displayed.

    To enhance your blog you may want to add extensions for comments, interacting with social network sites, tagging, and keeping in contact with your readers. You can also enable the syndication that is included in Joomla (in the Integration Options set Show Feed Link to Show and make sure to display the syndication module on the page).

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"category_layout":"","image":"images\/sampledata\/parks\/banner_cradle.jpg"}', '', '', '{"author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, 'en-GB', 1 UNION ALL SELECT 28, 53, 26, 43, 48, 3, 'sample-data-articles/park-site/photo-gallery', 'com_content', 'Photo Gallery', 'photo-gallery', '', '

    These are my photos from parks I have visited (I didn''t take them, they are all from Wikimedia Commons).

    This shows you how to make a simple image gallery using articles in com_content.

    In each article put a thumbnail image before a "readmore" and the full size image after it. Set the article to Show Intro Text: Hide.

    ', 1, 0, '1900-01-01 00:00:00', 1, '{"target":"","image":""}', '', '', '{"page_title":"","author":"","robots":""}', 793, '2011-01-01 00:00:00', 0, '1900-01-01 00:00:00', 0, 'en-GB', 1 UNION ALL @@ -526,7 +526,7 @@ SELECT 6, 102, 'Australian Parks ', 'australian-parks', '

    Help.

    {loadmodule banners,Banners}
    ', '', 1, 66, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, '', '', 1, 0, '', 0, '*', '' UNION ALL -SELECT 8, 104, 'Beginners', 'beginners', '

    If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

    Start off using your site by logging in using the administrator account you created when you installed Joomla.

    ', '

    Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

    You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

    The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

    Want to learn more? Consider attending a Joomla! Day or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

    ', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', '' +SELECT 8, 104, 'Beginners', 'beginners', '

    If this is your first Joomla! site or your first website, you have come to the right place. Joomla will help you get your website up and running quickly and easily.

    Start off using your site by logging in using the administrator account you created when you installed Joomla.

    ', '

    Explore the articles and other resources right here on your site data to learn more about how Joomla works. (When you''re done reading, you can delete or archive all of this.) You will also probably want to visit the Beginners'' Areas of the Joomla documentation and support forums.

    You''ll also want to sign up for the Joomla Security Mailing list and the Announcements mailing list. For inspiration visit the Joomla! Site Showcase to see an amazing array of ways people use Joomla to tell their stories on the web.

    The basic Joomla installation will let you get a great site up and running, but when you are ready for more features the power of Joomla is in the creative ways that developers have extended it to do all kinds of things. Visit the Joomla! Extensions Directory to see thousands of extensions that can do almost anything you could want on a website. Can''t find what you need? You may want to find a Joomla professional in the Joomla! Resource Directory.

    Want to learn more? Consider attending a JoomlaDay or other event or joining a local Joomla! Users Group. Can''t find one near you? Start one yourself.

    ', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', '' UNION ALL SELECT 9, 105, 'Contacts', 'contact', '

    The contact component provides a way to provide contact forms and information for your site or to create a complex directory that can be used for many different purposes. Help

    ', '', 1, 21, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"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":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL @@ -550,7 +550,7 @@ SELECT 18, 116, 'Second Blog Post', 'second-blog-post', '

    Lorem Ipsum is t UNION ALL SELECT 19, 117, 'Footer Module', 'footer-module', '

    This module shows the Joomla! copyright information. Help

    {loadmodule footer,Footer}
    ', '', 1, 66, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 3, '', '', 1, 0, '', 0, '*', '' UNION ALL -SELECT 20, 118, 'Fruit Shop', 'fruit-shop', '

    Welcome to the Fruit Shop

    We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

    This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

    To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

    ', '', 1, 29, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +SELECT 20, 118, 'Fruit Shop', 'fruit-shop', '

    Welcome to the Fruit Shop

    We sell fruits from around the world. Please use our website to learn more about our business. We hope you will come to our shop and buy some fruit.

    This mini site will show you how you might want to set up a site for a business, in this example one selling fruit. It shows how to use access controls to manage your site content. If you were building a real site, you might want to extend it with e-commerce, a catalog, mailing lists or other enhancements, many of which are available through the Joomla! Extensions Directory.

    To understand this site you will probably want to make one user with group set to customer and one with group set to grower. By logging in with different privileges you can see how access control works.

    ', '', 1, 29, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 21, 119, 'Getting Help', 'getting-help', '

    There are lots of places you can get help with Joomla!. In many places in your site administrator you will see the help icon. Click on this for more information about the options and functions of items on your screen. Other places to get help are:

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"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_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 8, '', '', 1, 0, '', 0, '*', '' UNION ALL @@ -604,7 +604,7 @@ SELECT 45, 143, 'Syndicate Module', 'syndicate-module', '

    The syndicate module UNION ALL SELECT 46, 144, 'System', 'system', '

    System plugins operate every time a page on your site loads. They control such things as your URLS, whether users can check a "remember me" box on the login module, and whether caching is enabled. New is the redirect plugin that together with the redirect component will assist you in managing changes in URLs.

    Default on:

    Default off:

    ', '', 1, 25, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL -SELECT 47, 145, 'The Joomla! Community', 'the-joomla-community', '

    Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' +SELECT 47, 145, 'The Joomla! Community', 'the-joomla-community', '

    Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL SELECT 48, 146, 'The Joomla! Project', 'the-joomla-project', '

    The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

    Our mission is to provide a flexible platform for digital publishing and collaboration.

    The core values are:

    • Freedom
    • Equality
    • Trust
    • Community
    • Collaboration
    • Usability

    In our vision, we see:

    • People publishing and collaborating in their communities and around the world
    • Software that is free, secure, and high-quality
    • A community that is enjoyable and rewarding to participate in
    • People around the world using their preferred languages
    • A project that acts autonomously
    • A project that is socially responsible
    • A project dedicated to maintaining the trust of its users

    There are millions of users around the world and thousands of people who contribute to the Joomla Project. They work in three main groups: the Production Working Group, responsible for everything that goes into software and documentation; the Community Working Group, responsible for creating a nurturing the community; and Open Source Matters, the non profit organization responsible for managing legal, financial and organizational issues.

    Joomla is a free and open source project, which uses the GNU General Public License version 2 or later.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 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, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', '' UNION ALL diff --git a/libraries/bootstrap.php b/libraries/bootstrap.php index 4019b38fb7cd8..fcb0d4b124b71 100644 --- a/libraries/bootstrap.php +++ b/libraries/bootstrap.php @@ -100,8 +100,6 @@ JLoader::register('JSimpleCrypt', JPATH_PLATFORM . '/legacy/simplecrypt/simplecrypt.php'); JLoader::register('JTree', JPATH_PLATFORM . '/legacy/base/tree.php'); JLoader::register('JNode', JPATH_PLATFORM . '/legacy/base/node.php'); -JLoader::register('LogException', JPATH_PLATFORM . '/legacy/log/logexception.php'); -JLoader::register('JXMLElement', JPATH_PLATFORM . '/legacy/utilities/xmlelement.php'); // Create class name aliases for the legacy application classes. // @deprecated 4.0 diff --git a/libraries/cms/component/helper.php b/libraries/cms/component/helper.php index 89a457e92acfe..1c3b62f07e4bc 100644 --- a/libraries/cms/component/helper.php +++ b/libraries/cms/component/helper.php @@ -97,10 +97,10 @@ public static function isInstalled($option) return (int) $db->setQuery( $db->getQuery(true) - ->select('COUNT(extension_id)') - ->from('#__extensions') - ->where('element = ' . $db->quote($option)) - ->where('type = ' . $db->quote('component')) + ->select('COUNT(' . $db->quoteName('extension_id') . ')') + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . ' = ' . $db->quote($option)) + ->where($db->quoteName('type') . ' = ' . $db->quote('component')) )->loadResult(); } @@ -421,8 +421,8 @@ protected static function load($option) { $db = JFactory::getDbo(); $query = $db->getQuery(true) - ->select('extension_id AS id, element AS "option", params, enabled') - ->from('#__extensions') + ->select($db->quoteName(array('extension_id', 'element', 'params', 'enabled'), array('id', 'option', null, null))) + ->from($db->quoteName('#__extensions')) ->where($db->quoteName('type') . ' = ' . $db->quote('component')); $db->setQuery($query); diff --git a/libraries/cms/library/helper.php b/libraries/cms/library/helper.php index dd79830d376f0..65fb44582223f 100644 --- a/libraries/cms/library/helper.php +++ b/libraries/cms/library/helper.php @@ -143,8 +143,8 @@ protected static function _load($element) { $db = JFactory::getDbo(); $query = $db->getQuery(true) - ->select('extension_id AS id, element AS "option", params, enabled') - ->from('#__extensions') + ->select($db->quoteName(array('extension_id', 'element', 'params', 'enabled'), array('id', 'option', null, null))) + ->from($db->quoteName('#__extensions')) ->where($db->quoteName('type') . ' = ' . $db->quote('library')) ->where($db->quoteName('element') . ' = ' . $db->quote($element)); $db->setQuery($query); diff --git a/libraries/import.legacy.php b/libraries/import.legacy.php index a5d706df73151..7a882480f313c 100644 --- a/libraries/import.legacy.php +++ b/libraries/import.legacy.php @@ -85,10 +85,3 @@ JLoader::register('JSimpleCrypt', JPATH_PLATFORM . '/legacy/simplecrypt/simplecrypt.php'); JLoader::register('JTree', JPATH_PLATFORM . '/legacy/base/tree.php'); JLoader::register('JNode', JPATH_PLATFORM . '/legacy/base/node.php'); -JLoader::register('LogException', JPATH_PLATFORM . '/legacy/log/logexception.php'); -JLoader::register('JXMLElement', JPATH_PLATFORM . '/legacy/utilities/xmlelement.php'); -JLoader::register('JRule', JPATH_PLATFORM . '/legacy/access/rule.php'); -JLoader::register('JRules', JPATH_PLATFORM . '/legacy/access/rules.php'); -JLoader::register('JCli', JPATH_PLATFORM . '/legacy/application/cli.php'); -JLoader::register('JDaemon', JPATH_PLATFORM . '/legacy/application/daemon.php'); -JLoader::register('JApplication', JPATH_LIBRARIES . '/legacy/application/application.php'); diff --git a/libraries/joomla/application/web.php b/libraries/joomla/application/web.php index 51e3185c81590..516c7427cd871 100644 --- a/libraries/joomla/application/web.php +++ b/libraries/joomla/application/web.php @@ -10,6 +10,7 @@ defined('JPATH_PLATFORM') or die; use Joomla\Cms\Application\Autoconfigurable; +use Joomla\Event\DispatcherInterface; use Joomla\Registry\Registry; use Joomla\Session\SessionInterface; use Joomla\String\StringHelper; @@ -18,7 +19,6 @@ * Base class for a Joomla! Web application. * * @since 11.4 - * @note As of 4.0 this class will be abstract */ class JApplicationWeb extends JApplicationBase { @@ -61,7 +61,7 @@ class JApplicationWeb extends JApplicationBase protected $language; /** - * @var JSession The application session object. + * @var SessionInterface The application session object. * @since 11.3 */ protected $session; @@ -230,7 +230,7 @@ public function initialise($session = null, $document = null, $language = null, // Create the session based on the application logic. if ($session !== false) { - $this->loadSession($session); + $this->setSession($session); } // Create the document based on the application logic. @@ -245,7 +245,10 @@ public function initialise($session = null, $document = null, $language = null, $this->loadLanguage($language); } - $this->setDispatcher($dispatcher); + if ($dispatcher) + { + $this->setDispatcher($dispatcher); + } return $this; } diff --git a/libraries/joomla/archive/tar.php b/libraries/joomla/archive/tar.php index 2c12c3c50d17d..70df5f565fc73 100644 --- a/libraries/joomla/archive/tar.php +++ b/libraries/joomla/archive/tar.php @@ -161,20 +161,10 @@ protected function _getTarInfo(& $data) while ($position < strlen($data)) { - if (version_compare(PHP_VERSION, '5.5', '>=')) - { - $info = @unpack( - "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Ctypeflag/Z100link/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor", - substr($data, $position) - ); - } - else - { - $info = @unpack( - "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/Ctypeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor", - substr($data, $position) - ); - } + $info = @unpack( + "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Ctypeflag/Z100link/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor", + substr($data, $position) + ); /** * This variable has been set in the previous loop, diff --git a/libraries/joomla/crypt/README.md b/libraries/joomla/crypt/README.md deleted file mode 100644 index 8a0fd935ddd48..0000000000000 --- a/libraries/joomla/crypt/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Important Security Information - -If you're going to use JCrypt in any of your plugins, make *sure* you use **JCryptCipherCrypto**; it's the only one that's cryptographically secure. (It's [version 1.1 of Defuse Security's encryption library](https://github.com/defuse/php-encryption)). - -```php -$cipher = new JCryptCipherCrypto(); -$key = $cipher->generateKey(); // Store this for long-term use - -$message = "We're all living on a yellow submarine!"; -$ciphertext = $cipher->encrypt($message, $key); -$decrypted = $cipher->decrypt($ciphertext, $key); -``` - -## Avoid these Ciphers if Possible - -* `JcryptCipher3Des` -* `JcryptCipherBlowfish` -* `JcryptCipherMcrypt` -* `JcryptCipherRijndael256` - -All of these ciphers are vulnerable to something called a [chosen-ciphertext attack](https://en.wikipedia.org/wiki/Chosen-ciphertext_attack). The only provable way to prevent chosen-ciphertext attacks is to [use authenticated encryption](https://paragonie.com/blog/2015/05/using-encryption-and-authentication-correctly), preferrably in an [Encrypt-then-MAC construction](http://www.thoughtcrime.org/blog/the-cryptographic-doom-principle/). - -The only JCrypt cipher that meets the *authenticated encryption* criteria is **`JCryptCipherCrypto`**. - -## Absolutely Avoid JCryptCipherSimple - -`JCryptCipherSimple` is deprecated and will be removed in Joomla 4. It's vulnerable to a known plaintext attack: If you know any information about the plaintext (e.g. the first character is '<'), an attacker can recover bits of the encryption key with ease. - -If an attacker can influence the message, they can actually steal your encryption key. Here's how: - -1. Feed `str_repeat('A', 256)` into your application, towards `JCryptCipherSimple`. -2. Observe the output of the cipher (the ciphertext). -3. Run it through this code: - -```php -function recoverJcryptCipherSimpleKey($ciphertext, $knownPlaintext) -{ - $key = ''; - for ($i = 0; $i < strlen($knownPlaintext); ++$i) { - $key.= chr(ord($ciphertext[$i]) ^ ord($knownPlaintext[$i])); - } -} - -$key = recoverJcryptCipherSimpleKey( - $someEncryptedTextOutput, - str_repeat('A', 256) -); -``` - -Given how trivial it is to steal the encryption key from this cipher, you absolutely should not use it. diff --git a/libraries/joomla/crypt/cipher/3des.php b/libraries/joomla/crypt/cipher/3des.php deleted file mode 100644 index 2d08b2d5a5207..0000000000000 --- a/libraries/joomla/crypt/cipher/3des.php +++ /dev/null @@ -1,38 +0,0 @@ -type != $this->keyType) - { - throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected ' . $this->keyType . '.'); - } - - // Decrypt the data. - $decrypted = trim(mcrypt_decrypt($this->type, $key->private, $data, $this->mode, $key->public)); - - return $decrypted; - } - - /** - * Method to encrypt a data string. - * - * @param string $data The data string to encrypt. - * @param JCryptKey $key The key object to use for encryption. - * - * @return string The encrypted data string. - * - * @since 12.1 - * @throws InvalidArgumentException - */ - public function encrypt($data, JCryptKey $key) - { - // Validate key. - if ($key->type != $this->keyType) - { - throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected ' . $this->keyType . '.'); - } - - // Encrypt the data. - $encrypted = mcrypt_encrypt($this->type, $key->private, $data, $this->mode, $key->public); - - return $encrypted; - } - - /** - * Method to generate a new encryption key object. - * - * @param array $options Key generation options. - * - * @return JCryptKey - * - * @since 12.1 - * @throws InvalidArgumentException - */ - public function generateKey(array $options = array()) - { - // Create the new encryption key object. - $key = new JCryptKey($this->keyType); - - // Generate an initialisation vector based on the algorithm. - $key->public = mcrypt_create_iv(mcrypt_get_iv_size($this->type, $this->mode), MCRYPT_DEV_URANDOM); - - // Get the salt and password setup. - $salt = (isset($options['salt'])) ? $options['salt'] : substr(pack("h*", md5(JCrypt::genRandomBytes())), 0, 16); - - if (!isset($options['password'])) - { - throw new InvalidArgumentException('Password is not set.'); - } - - // Generate the derived key. - $key->private = $this->pbkdf2($options['password'], $salt, mcrypt_get_key_size($this->type, $this->mode)); - - return $key; - } - - /** - * PBKDF2 Implementation for deriving keys. - * - * @param string $p Password - * @param string $s Salt - * @param integer $kl Key length - * @param integer $c Iteration count - * @param string $a Hash algorithm - * - * @return string The derived key. - * - * @see https://en.wikipedia.org/wiki/PBKDF2 - * @see http://www.ietf.org/rfc/rfc2898.txt - * @since 12.1 - */ - public function pbkdf2($p, $s, $kl, $c = 10000, $a = 'sha256') - { - // Hash length. - $hl = strlen(hash($a, null, true)); - - // Key blocks to compute. - $kb = ceil($kl / $hl); - - // Derived key. - $dk = ''; - - // Create the key. - for ($block = 1; $block <= $kb; $block++) - { - // Initial hash for this block. - $ib = $b = hash_hmac($a, $s . pack('N', $block), $p, true); - - // Perform block iterations. - for ($i = 1; $i < $c; $i++) - { - $ib ^= ($b = hash_hmac($a, $b, $p, true)); - } - - // Append the iterated block. - $dk .= $ib; - } - - // Return derived key of correct length. - return substr($dk, 0, $kl); - } -} diff --git a/libraries/joomla/crypt/cipher/rijndael256.php b/libraries/joomla/crypt/cipher/rijndael256.php deleted file mode 100644 index 9e5f4ebc0dd45..0000000000000 --- a/libraries/joomla/crypt/cipher/rijndael256.php +++ /dev/null @@ -1,38 +0,0 @@ -type != 'simple') - { - throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected simple.'); - } - - $decrypted = ''; - $tmp = $key->public; - - // Convert the HEX input into an array of integers and get the number of characters. - $chars = $this->_hexToIntArray($data); - $charCount = count($chars); - - // Repeat the key as many times as necessary to ensure that the key is at least as long as the input. - for ($i = 0; $i < $charCount; $i = strlen($tmp)) - { - $tmp = $tmp . $tmp; - } - - // Get the XOR values between the ASCII values of the input and key characters for all input offsets. - for ($i = 0; $i < $charCount; $i++) - { - $decrypted .= chr($chars[$i] ^ ord($tmp[$i])); - } - - return $decrypted; - } - - /** - * Method to encrypt a data string. - * - * @param string $data The data string to encrypt. - * @param JCryptKey $key The key[/pair] object to use for encryption. - * - * @return string The encrypted data string. - * - * @since 12.1 - * @throws InvalidArgumentException - */ - public function encrypt($data, JCryptKey $key) - { - // Validate key. - if ($key->type != 'simple') - { - throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected simple.'); - } - - $encrypted = ''; - $tmp = $key->private; - - // Split up the input into a character array and get the number of characters. - $chars = preg_split('//', $data, -1, PREG_SPLIT_NO_EMPTY); - $charCount = count($chars); - - // Repeat the key as many times as necessary to ensure that the key is at least as long as the input. - for ($i = 0; $i < $charCount; $i = strlen($tmp)) - { - $tmp = $tmp . $tmp; - } - - // Get the XOR values between the ASCII values of the input and key characters for all input offsets. - for ($i = 0; $i < $charCount; $i++) - { - $encrypted .= $this->_intToHex(ord($tmp[$i]) ^ ord($chars[$i])); - } - - return $encrypted; - } - - /** - * Method to generate a new encryption key[/pair] object. - * - * @param array $options Key generation options. - * - * @return JCryptKey - * - * @since 12.1 - */ - public function generateKey(array $options = array()) - { - // Create the new encryption key[/pair] object. - $key = new JCryptKey('simple'); - - // Just a random key of a given length. - $key->private = JCrypt::genRandomBytes(256); - $key->public = $key->private; - - return $key; - } - - /** - * Convert hex to an integer - * - * @param string $s The hex string to convert. - * @param integer $i The offset? - * - * @return integer - * - * @since 11.1 - */ - private function _hexToInt($s, $i) - { - $j = (int) $i * 2; - $k = 0; - $s1 = (string) $s; - - // Get the character at position $j. - $c = substr($s1, $j, 1); - - // Get the character at position $j + 1. - $c1 = substr($s1, $j + 1, 1); - - switch ($c) - { - case 'A': - $k += 160; - break; - case 'B': - $k += 176; - break; - case 'C': - $k += 192; - break; - case 'D': - $k += 208; - break; - case 'E': - $k += 224; - break; - case 'F': - $k += 240; - break; - case ' ': - $k += 0; - break; - default: - (int) $k = $k + (16 * (int) $c); - break; - } - - switch ($c1) - { - case 'A': - $k += 10; - break; - case 'B': - $k += 11; - break; - case 'C': - $k += 12; - break; - case 'D': - $k += 13; - break; - case 'E': - $k += 14; - break; - case 'F': - $k += 15; - break; - case ' ': - $k += 0; - break; - default: - $k += (int) $c1; - break; - } - - return $k; - } - - /** - * Convert hex to an array of integers - * - * @param string $hex The hex string to convert to an integer array. - * - * @return array An array of integers. - * - * @since 11.1 - */ - private function _hexToIntArray($hex) - { - $array = array(); - - $j = (int) strlen($hex) / 2; - - for ($i = 0; $i < $j; $i++) - { - $array[$i] = (int) $this->_hexToInt($hex, $i); - } - - return $array; - } - - /** - * Convert an integer to a hexadecimal string. - * - * @param integer $i An integer value to convert to a hex string. - * - * @return string - * - * @since 11.1 - */ - private function _intToHex($i) - { - // Sanitize the input. - $i = (int) $i; - - // Get the first character of the hexadecimal string if there is one. - $j = (int) ($i / 16); - - if ($j === 0) - { - $s = ' '; - } - else - { - $s = strtoupper(dechex($j)); - } - - // Get the second character of the hexadecimal string. - $k = $i - $j * 16; - $s = $s . strtoupper(dechex($k)); - - return $s; - } -} diff --git a/libraries/joomla/crypt/password/simple.php b/libraries/joomla/crypt/password/simple.php deleted file mode 100644 index bad97aa3146e3..0000000000000 --- a/libraries/joomla/crypt/password/simple.php +++ /dev/null @@ -1,200 +0,0 @@ -defaultType; - } - - switch ($type) - { - case '$2a$': - case JCryptPassword::BLOWFISH: - - $type = '$2a$'; - - if (JCrypt::hasStrongPasswordSupport()) - { - $type = '$2y$'; - } - - $salt = $type . str_pad($this->cost, 2, '0', STR_PAD_LEFT) . '$' . $this->getSalt(22); - - return crypt($password, $salt); - - case JCryptPassword::MD5: - $salt = $this->getSalt(12); - - $salt = '$1$' . $salt; - - return crypt($password, $salt); - - case JCryptPassword::JOOMLA: - $salt = $this->getSalt(32); - - return md5($password . $salt) . ':' . $salt; - - default: - throw new InvalidArgumentException(sprintf('Hash type %s is not supported', $type)); - break; - } - } - - /** - * Sets the cost parameter for the generated hash for algorithms that use a cost factor. - * - * @param integer $cost The new cost value. - * - * @return void - * - * @since 12.2 - * @deprecated 4.0 Use PHP 5.5's native password hashing API - */ - public function setCost($cost) - { - $this->cost = $cost; - } - - /** - * Generates a salt of specified length. The salt consists of characters in the set [./0-9A-Za-z]. - * - * @param integer $length The number of characters to return. - * - * @return string The string of random characters. - * - * @since 12.2 - * @deprecated 4.0 Use PHP 5.5's native password hashing API - */ - protected function getSalt($length) - { - $bytes = ceil($length * 6 / 8); - - $randomData = str_replace('+', '.', base64_encode(JCrypt::genRandomBytes($bytes))); - - return substr($randomData, 0, $length); - } - - /** - * Verifies a password hash - * - * @param string $password The password to verify. - * @param string $hash The password hash to check. - * - * @return boolean True if the password is valid, false otherwise. - * - * @since 12.2 - * @deprecated 4.0 Use PHP 5.5's native password hashing API - */ - public function verify($password, $hash) - { - // Check if the hash is a blowfish hash. - if (substr($hash, 0, 4) == '$2a$' || substr($hash, 0, 4) == '$2y$') - { - $type = '$2a$'; - - if (JCrypt::hasStrongPasswordSupport()) - { - $type = '$2y$'; - } - - return password_verify($password, $hash); - } - - // Check if the hash is an MD5 hash. - if (substr($hash, 0, 3) == '$1$') - { - return JCrypt::timingSafeCompare(crypt($password, $hash), $hash); - } - - // Check if the hash is a Joomla hash. - if (preg_match('#[a-z0-9]{32}:[A-Za-z0-9]{32}#', $hash) === 1) - { - // Check the password - $parts = explode(':', $hash); - $salt = @$parts[1]; - - // Compile the hash to compare - // If the salt is empty AND there is a ':' in the original hash, we must append ':' at the end - $testcrypt = md5($password . $salt) . ($salt ? ':' . $salt : (strpos($hash, ':') !== false ? ':' : '')); - - return JCrypt::timingSafeCompare($hash, $testcrypt); - } - - return false; - } - - /** - * Sets a default type - * - * @param string $type The value to set as default. - * - * @return void - * - * @since 12.3 - * @deprecated 4.0 Use PHP 5.5's native password hashing API - */ - public function setDefaultType($type) - { - if (!empty($type)) - { - $this->defaultType = $type; - } - } - - /** - * Gets the default type - * - * @return string $type The default type - * - * @since 12.3 - * @deprecated 4.0 Use PHP 5.5's native password hashing API - */ - public function getDefaultType() - { - return $this->defaultType; - } -} diff --git a/libraries/joomla/facebook/album.php b/libraries/joomla/facebook/album.php deleted file mode 100644 index 813dac3fc37d9..0000000000000 --- a/libraries/joomla/facebook/album.php +++ /dev/null @@ -1,197 +0,0 @@ -get($album); - } - - /** - * Method to get the photos contained in this album. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $album The album id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getPhotos($album, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($album, 'photos', '', $limit, $offset, $until, $since); - } - - /** - * Method to add photos to an album. Note: check can_upload flag first. Requires authentication and publish_stream permission. - * - * @param string $album The album id. - * @param string $source Path to photo. - * @param string $message Photo description. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPhoto($album, $source, $message = null) - { - // Set POST request parameters. - $data = array(); - $data[basename($source)] = '@' . realpath($source); - - if ($message) - { - $data['message'] = $message; - } - - return $this->createConnection($album, 'photos', $data, array('Content-Type' => 'multipart/form-data')); - } - - /** - * Method to get an album's comments. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $album The album id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($album, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($album, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on an album. Requires authentication and publish_stream permission. - * - * @param string $album The album id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($album, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($album, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission. - * - * @param string $comment The comment's id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get album's likes. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $album The album id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($album, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($album, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like an album. Requires authentication and publish_stream permission. - * - * @param string $album The album id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($album) - { - return $this->createConnection($album, 'likes'); - } - - /** - * Method to unlike an album. Requires authentication and publish_stream permission. - * - * @param string $album The album id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($album) - { - return $this->deleteConnection($album, 'likes'); - } - - /** - * Method to get the album's cover photo, the first picture uploaded to an album becomes the cover photo for the album. - * Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $album The album id. - * @param boolean $redirect If false this will return the URL of the picture without a 302 redirect. - * - * @return string URL of the picture. - * - * @since 13.1 - */ - public function getPicture($album, $redirect = true) - { - $extra_fields = ''; - - if ($redirect == false) - { - $extra_fields = '?redirect=false'; - } - - return $this->getConnection($album, 'picture', $extra_fields); - } -} diff --git a/libraries/joomla/facebook/checkin.php b/libraries/joomla/facebook/checkin.php deleted file mode 100644 index 11b43379d8f6c..0000000000000 --- a/libraries/joomla/facebook/checkin.php +++ /dev/null @@ -1,131 +0,0 @@ -get($checkin); - } - - /** - * Method to get a checkin's comments. Requires authentication and user_checkins or friends_checkins permission. - * - * @param string $checkin The checkin id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($checkin, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($checkin, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a comment to the checkin. Requires authentication and publish_stream and user_checkins or friends_checkins permission. - * - * @param string $checkin The checkin id. - * @param string $message The checkin's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($checkin, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($checkin, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission. - * - * @param string $comment The comment's id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get a checkin's likes. Requires authentication and user_checkins or friends_checkins permission. - * - * @param string $checkin The checkin id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($checkin, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($checkin, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a checkin. Requires authentication and publish_stream and user_checkins or friends_checkins permission. - * - * @param string $checkin The checkin id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createLike($checkin) - { - return $this->createConnection($checkin, 'likes'); - } - - /** - * Method to unlike a checkin. Requires authentication and publish_stream permission. - * - * @param string $checkin The checkin id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteLike($checkin) - { - return $this->deleteConnection($checkin, 'likes'); - } -} diff --git a/libraries/joomla/facebook/comment.php b/libraries/joomla/facebook/comment.php deleted file mode 100644 index ba85b4b20dc3b..0000000000000 --- a/libraries/joomla/facebook/comment.php +++ /dev/null @@ -1,131 +0,0 @@ -get($comment); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission. - * - * @param string $comment The comment id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get a comment's comments. Requires authentication. - * - * @param string $comment The comment id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($comment, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($comment, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a comment. Requires authentication with publish_stream permission. - * - * @param string $comment The comment id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($comment, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($comment, 'comments', $data); - } - - /** - * Method to get comment's likes. Requires authentication. - * - * @param string $comment The comment id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($comment, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($comment, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a comment. Requires authentication and publish_stram permission. - * - * @param string $comment The comment id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($comment) - { - return $this->createConnection($comment, 'likes'); - } - - /** - * Method to unlike a comment. Requires authentication and publish_stram permission. - * - * @param string $comment The comment id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($comment) - { - return $this->deleteConnection($comment, 'likes'); - } -} diff --git a/libraries/joomla/facebook/event.php b/libraries/joomla/facebook/event.php deleted file mode 100644 index c404d2cfe5044..0000000000000 --- a/libraries/joomla/facebook/event.php +++ /dev/null @@ -1,520 +0,0 @@ -get($event); - } - - /** - * Method to get the event's wall. Requires authentication. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFeed($event, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($event, 'feed', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a link on event's feed which the current_user is or maybe attending. Requires authentication and publish_stream permission. - * - * @param string $event The event id. - * @param string $link Link URL. - * @param string $message Link message. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createLink($event, $link, $message = null) - { - // Set POST request parameters. - $data = array(); - $data['link'] = $link; - $data['message'] = $message; - - return $this->createConnection($event, 'feed', $data); - } - - /** - * Method to delete a link. Requires authentication and publish_stream permission. - * - * @param mixed $link The Link ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLink($link) - { - return $this->deleteConnection($link); - } - - /** - * Method to post on event's wall. Message or link parameter is required. Requires authentication and publish_stream permission. - * - * @param string $event The event id. - * @param string $message Post message. - * @param string $link Post URL. - * @param string $picture Post thumbnail image (can only be used if link is specified) - * @param string $name Post name (can only be used if link is specified). - * @param string $caption Post caption (can only be used if link is specified). - * @param string $description Post description (can only be used if link is specified). - * @param array $actions Post actions array of objects containing name and link. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPost($event, $message = null, $link = null, $picture = null, $name = null, $caption = null, - $description = null, $actions = null) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - $data['link'] = $link; - $data['name'] = $name; - $data['caption'] = $caption; - $data['description'] = $description; - $data['actions'] = $actions; - $data['picture'] = $picture; - - return $this->createConnection($event, 'feed', $data); - } - - /** - * Method to delete a post. Note: you can only delete the post if it was created by the current user. - * Requires authentication and publish_stream permission. - * - * @param string $post The Post ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deletePost($post) - { - return $this->deleteConnection($post); - } - - /** - * Method to post a status message on behalf of the user on the event's wall. Requires authentication and publish_stream permission. - * - * @param string $event The event id. - * @param string $message Status message content. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createStatus($event, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($event, 'feed', $data); - } - - /** - * Method to delete a status. Note: you can only delete the post if it was created by the current user. - * Requires authentication and publish_stream permission. - * - * @param string $status The Status ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteStatus($status) - { - return $this->deleteConnection($status); - } - - /** - * Method to get the list of invitees for the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getInvited($event, $limit = 0, $offset = 0) - { - return $this->getConnection($event, 'invited', '', $limit, $offset); - } - - /** - * Method to check if a user is invited to the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * - * @return array The decoded JSON response or an empty array if the user is not invited. - * - * @since 13.1 - */ - public function isInvited($event, $user) - { - return $this->getConnection($event, 'invited/' . $user); - } - - /** - * Method to invite users to the event. Requires authentication and create_event permission. - * - * @param string $event The event id. - * @param string $users Comma separated list of user ids. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createInvite($event, $users) - { - // Set POST request parameters. - $data = array(); - $data['users'] = $users; - - return $this->createConnection($event, 'invited', $data); - } - - /** - * Method to delete an invitation. Note: you can only delete the invite if the current user is the event admin. - * Requires authentication and rsvp_event permission. - * - * @param string $event The event id. - * @param string $user The user id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteInvite($event, $user) - { - return $this->deleteConnection($event, 'invited/' . $user); - } - - /** - * Method to get the list of attending users. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getAttending($event, $limit = 0, $offset = 0) - { - return $this->getConnection($event, 'attending', '', $limit, $offset); - } - - /** - * Method to check if a user is attending an event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * - * @return array The decoded JSON response or an empty array if the user is not invited. - * - * @since 13.1 - */ - public function isAttending($event, $user) - { - return $this->getConnection($event, 'attending/' . $user); - } - - /** - * Method to set the current user as attending. Requires authentication and rsvp_event permission. - * - * @param string $event The event id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createAttending($event) - { - return $this->createConnection($event, 'attending'); - } - - /** - * Method to get the list of maybe attending users. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getMaybe($event, $limit = 0, $offset = 0) - { - return $this->getConnection($event, 'maybe', '', $limit, $offset); - } - - /** - * Method to check if a user is maybe attending an event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * - * @return array The decoded JSON response or an empty array if the user is not invited. - * - * @since 13.1 - */ - public function isMaybe($event, $user) - { - return $this->getConnection($event, 'maybe/' . $user); - } - - /** - * Method to set the current user as maybe attending. Requires authentication and rscp_event permission. - * - * @param string $event The event id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createMaybe($event) - { - return $this->createConnection($event, 'maybe'); - } - - /** - * Method to get the list of users which declined the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getDeclined($event, $limit = 0, $offset = 0) - { - return $this->getConnection($event, 'declined', '', $limit, $offset); - } - - /** - * Method to check if a user responded 'no' to the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * - * @return array The decoded JSON response or an empty array if the user is not invited. - * - * @since 13.1 - */ - public function isDeclined($event, $user) - { - return $this->getConnection($event, 'declined/' . $user); - } - - /** - * Method to set the current user as declined. Requires authentication and rscp_event permission. - * - * @param string $event The event id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createDeclined($event) - { - return $this->createConnection($event, 'declined'); - } - - /** - * Method to get the list of users which have not replied to the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getNoreply($event, $limit = 0, $offset = 0) - { - return $this->getConnection($event, 'noreply', '', $limit, $offset); - } - - /** - * Method to check if a user has not replied to the event. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * - * @return array The decoded JSON response or an empty array if the user is not invited. - * - * @since 13.1 - */ - public function isNoreply($event, $user) - { - return $this->getConnection($event, 'noreply/' . $user); - } - - /** - * Method to get the event's profile picture. Requires authentication and user_events or friends_events permission. - * - * @param string $event The event id. - * @param boolean $redirect If false this will return the URL of the picture without a 302 redirect. - * @param string $type To request a different photo use square | small | normal | large. - * - * @return string The URL to the event's profile picture. - * - * @since 13.1 - */ - public function getPicture($event, $redirect = true, $type = null) - { - $extra_fields = ''; - - if ($redirect == false) - { - $extra_fields = '?redirect=false'; - } - - if ($type) - { - $extra_fields .= (strpos($extra_fields, '?') === false) ? '?type=' . $type : '&type=' . $type; - } - - return $this->getConnection($event, 'picture', $extra_fields); - } - - /** - * Method to get photos published on event's wall. Requires authentication. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getPhotos($event, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($event, 'photos', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a photo on event's wall. Requires authentication and publish_stream permission. - * - * @param string $event The event id. - * @param string $source Path to photo. - * @param string $message Photo description. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPhoto($event, $source, $message = null) - { - // Set POST request parameters. - $data = array(); - $data[basename($source)] = '@' . realpath($source); - - if ($message) - { - $data['message'] = $message; - } - - return $this->createConnection($event, 'photos', $data, array('Content-Type' => 'multipart/form-data')); - } - - /** - * Method to get videos published on event's wall. Requires authentication. - * - * @param string $event The event id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getVideos($event, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($event, 'videos', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a video on event's wall. Requires authentication and publish_stream permission. - * - * @param string $event The event id. - * @param string $source Path to photo. - * @param string $title Video title. - * @param string $description Video description. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createVideo($event, $source, $title = null, $description = null) - { - // Set POST request parameters. - $data = array(); - $data[basename($source)] = '@' . realpath($source); - - if ($title) - { - $data['title'] = $title; - } - - if ($description) - { - $data['description'] = $description; - } - - return $this->createConnection($event, 'videos', $data, array('Content-Type' => 'multipart/form-data')); - } -} diff --git a/libraries/joomla/facebook/facebook.php b/libraries/joomla/facebook/facebook.php deleted file mode 100644 index aff940deb8004..0000000000000 --- a/libraries/joomla/facebook/facebook.php +++ /dev/null @@ -1,188 +0,0 @@ -oauth = $oauth; - $this->options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - - // Setup the default API url if not already set. - $this->options->def('api.url', 'https://graph.facebook.com/'); - } - - /** - * Magic method to lazily create API objects - * - * @param string $name Name of property to retrieve - * - * @return JFacebookObject Facebook API object (status, user, friends etc). - * - * @since 13.1 - * @throws InvalidArgumentException - */ - public function __get($name) - { - $class = 'JFacebook' . ucfirst($name); - - if (class_exists($class)) - { - if (false == isset($this->$name)) - { - $this->$name = new $class($this->options, $this->client, $this->oauth); - } - - return $this->$name; - } - - throw new InvalidArgumentException(sprintf('Argument %s produced an invalid class name: %s', $name, $class)); - } - - /** - * Get an option from the JFacebook instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 13.1 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JFacebook instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JFacebook This object for method chaining. - * - * @since 13.1 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/facebook/group.php b/libraries/joomla/facebook/group.php deleted file mode 100644 index 2b3ba953635f8..0000000000000 --- a/libraries/joomla/facebook/group.php +++ /dev/null @@ -1,250 +0,0 @@ -get($group); - } - - /** - * Method to get the group's wall. Requires authentication and user_groups or friends_groups permission for non-public groups. - * - * @param string $group The group id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFeed($group, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($group, 'feed', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the group's members. Requires authentication and user_groups or friends_groups permission for non-public groups. - * - * @param string $group The group id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getMembers($group, $limit = 0, $offset = 0) - { - return $this->getConnection($group, 'members', '', $limit, $offset); - } - - /** - * Method to get the group's docs. Requires authentication and user_groups or friends_groups permission for non-public groups. - * - * @param string $group The group id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getDocs($group, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($group, 'docs', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the groups's picture. Requires authentication and user_groups or friends_groups permission. - * - * @param string $group The group id. - * @param string $type To request a different photo use square | small | normal | large. - * - * @return string The URL to the group's picture. - * - * @since 13.1 - */ - public function getPicture($group, $type = null) - { - if ($type) - { - $type = '?type=' . $type; - } - - return $this->getConnection($group, 'picture', $type); - } - - /** - * Method to post a link on group's wall. Requires authentication and publish_stream permission. - * - * @param string $group The group id. - * @param string $link Link URL. - * @param strin $message Link message. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createLink($group, $link, $message = null) - { - // Set POST request parameters. - $data = array(); - $data['link'] = $link; - - if ($message) - { - $data['message'] = $message; - } - - return $this->createConnection($group, 'feed', $data); - } - - /** - * Method to delete a link. Requires authentication. - * - * @param mixed $link The Link ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLink($link) - { - return $this->deleteConnection($link); - } - - /** - * Method to post on group's wall. Message or link parameter is required. Requires authentication and publish_stream permission. - * - * @param string $group The group id. - * @param string $message Post message. - * @param string $link Post URL. - * @param string $picture Post thumbnail image (can only be used if link is specified) - * @param string $name Post name (can only be used if link is specified). - * @param string $caption Post caption (can only be used if link is specified). - * @param string $description Post description (can only be used if link is specified). - * @param array $actions Post actions array of objects containing name and link. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPost($group, $message = null, $link = null, $picture = null, $name = null, $caption = null, - $description = null, $actions = null) - { - // Set POST request parameters. - if ($message) - { - $data['message'] = $message; - } - - if ($link) - { - $data['link'] = $link; - } - - if ($name) - { - $data['name'] = $name; - } - - if ($caption) - { - $data['caption'] = $caption; - } - - if ($description) - { - $data['description'] = $description; - } - - if ($actions) - { - $data['actions'] = $actions; - } - - if ($picture) - { - $data['picture'] = $picture; - } - - return $this->createConnection($group, 'feed', $data); - } - - /** - * Method to delete a post. Note: you can only delete the post if it was created by the current user. Requires authentication. - * - * @param string $post The Post ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deletePost($post) - { - return $this->deleteConnection($post); - } - - /** - * Method to post a status message on behalf of the user on the group's wall. Requires authentication and publish_stream permission. - * - * @param string $group The group id. - * @param string $message Status message content. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createStatus($group, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($group, 'feed', $data); - } - - /** - * Method to delete a status. Note: you can only delete the status if it was created by the current user. Requires authentication. - * - * @param string $status The Status ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteStatus($status) - { - return $this->deleteConnection($status); - } -} diff --git a/libraries/joomla/facebook/link.php b/libraries/joomla/facebook/link.php deleted file mode 100644 index 2457b93cdbca3..0000000000000 --- a/libraries/joomla/facebook/link.php +++ /dev/null @@ -1,131 +0,0 @@ -get($link); - } - - /** - * Method to get a link's comments. Requires authentication and read_stream permission for non-public links. - * - * @param string $link The link id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($link, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($link, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a link. Requires authentication and publish_stream permission. - * - * @param string $link The link id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($link, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($link, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission. - * - * @param string $comment The comment's id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get link's likes. Requires authentication and read_stream permission for non-public links. - * - * @param string $link The link id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($link, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($link, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a link. Requires authentication and publish_stream permission. - * - * @param string $link The link id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($link) - { - return $this->createConnection($link, 'likes'); - } - - /** - * Method to unlike a link. Requires authentication and publish_stream permission. - * - * @param string $link The link id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($link) - { - return $this->deleteConnection($link, 'likes'); - } -} diff --git a/libraries/joomla/facebook/note.php b/libraries/joomla/facebook/note.php deleted file mode 100644 index eed231f28c528..0000000000000 --- a/libraries/joomla/facebook/note.php +++ /dev/null @@ -1,131 +0,0 @@ -get($note); - } - - /** - * Method to get a note's comments. Requires authentication and user_notes or friends_notes permission for non-public notes. - * - * @param string $note The note id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($note, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($note, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a note. Requires authentication and publish_stream and user_notes or friends_notes permissions. - * - * @param string $note The note id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($note, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($note, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream and user_notes or friends_notes permissions. - * - * @param string $comment The comment's id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get note's likes. Requires authentication and user_notes or friends_notes for non-public notes. - * - * @param string $note The note id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($note, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($note, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a note. Requires authentication and publish_stream and user_notes or friends_notes permissions. - * - * @param string $note The note id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($note) - { - return $this->createConnection($note, 'likes'); - } - - /** - * Method to unlike a note. Requires authentication and publish_stream and user_notes or friends_notes permissions. - * - * @param string $note The note id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($note) - { - return $this->deleteConnection($note, 'likes'); - } -} diff --git a/libraries/joomla/facebook/oauth.php b/libraries/joomla/facebook/oauth.php deleted file mode 100644 index 74139f73493d3..0000000000000 --- a/libraries/joomla/facebook/oauth.php +++ /dev/null @@ -1,76 +0,0 @@ -options = isset($options) ? $options : new Registry; - - // Setup the authentication and token urls if not already set. - $this->options->def('authurl', 'http://www.facebook.com/dialog/oauth'); - $this->options->def('tokenurl', 'https://graph.facebook.com/oauth/access_token'); - - // Call the JOAuth2Client constructor to setup the object. - parent::__construct($this->options, $client, $input); - } - - /** - * Method used to set permissions. - * - * @param string $scope Comma separated list of permissions. - * - * @return JFacebookOauth This object for method chaining - * - * @since 13.1 - */ - public function setScope($scope) - { - $this->setOption('scope', $scope); - - return $this; - } - - /** - * Method to get the current scope - * - * @return string Comma separated list of permissions. - * - * @since 13.1 - */ - public function getScope() - { - return $this->getOption('scope'); - } -} diff --git a/libraries/joomla/facebook/object.php b/libraries/joomla/facebook/object.php deleted file mode 100644 index 3e0df2e7836e2..0000000000000 --- a/libraries/joomla/facebook/object.php +++ /dev/null @@ -1,304 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - $this->oauth = $oauth; - } - - /** - * Method to build and return a full request URL for the request. This method will - * add appropriate pagination details if necessary and also prepend the API url - * to have a complete URL for the request. - * - * @param string $path URL to inflect. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param timestamp $until A unix timestamp or any date accepted by strtotime. - * @param timestamp $since A unix timestamp or any date accepted by strtotime. - * - * @return string The request URL. - * - * @since 13.1 - */ - protected function fetchUrl($path, $limit = 0, $offset = 0, $until = null, $since = null) - { - // Get a new JUri object fousing the api url and given path. - $uri = new JUri($this->options->get('api.url') . $path); - - if ($limit > 0) - { - $uri->setVar('limit', (int) $limit); - } - - if ($offset > 0) - { - $uri->setVar('offset', (int) $offset); - } - - if ($until != null) - { - $uri->setVar('until', $until); - } - - if ($since != null) - { - $uri->setVar('since', $since); - } - - return (string) $uri; - } - - /** - * Method to send the request. - * - * @param string $path The path of the request to make. - * @param mixed $data Either an associative array or a string to be sent with the post request. - * @param array $headers An array of name-value pairs to include in the header of the request - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The request response. - * - * @since 13.1 - * @throws DomainException - */ - public function sendRequest($path, $data = '', array $headers = null, $limit = 0, $offset = 0, $until = null, $since = null) - { - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $limit, $offset, $until, $since), $headers); - - $response = json_decode($response->body); - - // Validate the response. - if (property_exists($response, 'error')) - { - throw new RuntimeException($response->error->message); - } - - return $response; - } - - /** - * Method to get an object. - * - * @param string $object The object id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function get($object) - { - if ($this->oauth != null) - { - if ($this->oauth->isAuthenticated()) - { - $response = $this->oauth->query($this->fetchUrl($object)); - - return json_decode($response->body); - } - else - { - return false; - } - } - - // Send the request. - return $this->sendRequest($object); - } - - /** - * Method to get object's connection. - * - * @param string $object The object id. - * @param string $connection The object's connection name. - * @param string $extra_fields URL fields. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getConnection($object, $connection = null, $extra_fields = '', $limit = 0, $offset = 0, $until = null, $since = null) - { - $path = $object . '/' . $connection . $extra_fields; - - if ($this->oauth != null) - { - if ($this->oauth->isAuthenticated()) - { - $response = $this->oauth->query($this->fetchUrl($path, $limit, $offset, $until, $since)); - - if (strcmp($response->body, '')) - { - return json_decode($response->body); - } - else - { - return $response->headers['Location']; - } - } - else - { - return false; - } - } - - // Send the request. - return $this->sendRequest($path, '', null, $limit, $offset, $until, $since); - } - - /** - * Method to create a connection. - * - * @param string $object The object id. - * @param string $connection The object's connection name. - * @param array $parameters The POST request parameters. - * @param array $headers An array of name-value pairs to include in the header of the request - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createConnection($object, $connection = null, $parameters = null, array $headers = null) - { - if ($this->oauth->isAuthenticated()) - { - // Build the request path. - if ($connection != null) - { - $path = $object . '/' . $connection; - } - else - { - $path = $object; - } - - // Send the post request. - $response = $this->oauth->query($this->fetchUrl($path), $parameters, $headers, 'post'); - - return json_decode($response->body); - } - else - { - return false; - } - } - - /** - * Method to delete a connection. - * - * @param string $object The object id. - * @param string $connection The object's connection name. - * @param string $extra_fields URL fields. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteConnection($object, $connection = null, $extra_fields = '') - { - if ($this->oauth->isAuthenticated()) - { - // Build the request path. - if ($connection != null) - { - $path = $object . '/' . $connection . $extra_fields; - } - else - { - $path = $object . $extra_fields; - } - - // Send the delete request. - $response = $this->oauth->query($this->fetchUrl($path), null, array(), 'delete'); - - return json_decode($response->body); - } - else - { - return false; - } - } - - /** - * Method used to set the OAuth client. - * - * @param JFacebookOAuth $oauth The OAuth client object. - * - * @return JFacebookObject This object for method chaining. - * - * @since 13.1 - */ - public function setOAuth($oauth) - { - $this->oauth = $oauth; - - return $this; - } - - /** - * Method used to get the OAuth client. - * - * @return JFacebookOAuth The OAuth client - * - * @since 13.1 - */ - public function getOAuth() - { - return $this->oauth; - } -} diff --git a/libraries/joomla/facebook/photo.php b/libraries/joomla/facebook/photo.php deleted file mode 100644 index 8b8d6eaa2e679..0000000000000 --- a/libraries/joomla/facebook/photo.php +++ /dev/null @@ -1,245 +0,0 @@ -get($photo); - } - - /** - * Method to get a photo's comments. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($photo, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($photo, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($photo, $message) - { - // Set POST request parameters. - $data['message'] = $message; - - return $this->createConnection($photo, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos. - * - * @param string $comment The comment's id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get photo's likes. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($photo, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($photo, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($photo) - { - return $this->createConnection($photo, 'likes'); - } - - /** - * Method to unlike a photo. Requires authentication and publish_stream permission, user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($photo) - { - return $this->deleteConnection($photo, 'likes'); - } - - /** - * Method to get the Users tagged in the photo. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getTags($photo, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($photo, 'tags', '', $limit, $offset, $until, $since); - } - - /** - * Method to tag one or more Users in a photo. $to or $tag_text required. - * Requires authentication and publish_stream permission, user_photos permission for private photos. - * - * @param string $photo The photo id. - * @param mixed $to ID of the User or an array of Users to tag in the photo: [{"id":"1234"}, {"id":"12345"}]. - * @param string $tag_text A text string to tag. - * @param integer $x x coordinate of tag, as a percentage offset from the left edge of the picture. - * @param integer $y y coordinate of tag, as a percentage offset from the top edge of the picture. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createTag($photo, $to = null, $tag_text = null, $x = null, $y = null) - { - // Set POST request parameters. - if (is_array($to)) - { - $data['tags'] = $to; - } - else - { - $data['to'] = $to; - } - - if ($tag_text) - { - $data['tag_text'] = $tag_text; - } - - if ($x) - { - $data['x'] = $x; - } - - if ($y) - { - $data['y'] = $y; - } - - return $this->createConnection($photo, 'tags', $data); - } - - /** - * Method to update the position of the tag for a particular Users in a photo. - * Requires authentication and publish_stream permission, user_photos permission for private photos. - * - * @param string $photo The photo id. - * @param string $to ID of the User to update tag in the photo. - * @param integer $x x coordinate of tag, as a percentage offset from the left edge of the picture. - * @param integer $y y coordinate of tag, as a percentage offset from the top edge of the picture. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function updateTag($photo, $to, $x = null, $y = null) - { - // Set POST request parameters. - $data['to'] = $to; - - if ($x) - { - $data['x'] = $x; - } - - if ($y) - { - $data['y'] = $y; - } - - return $this->createConnection($photo, 'tags', $data); - } - - /** - * Method to get the album-sized view of the photo. Requires authentication and user_photos or friends_photos permission for private photos. - * - * @param string $photo The photo id. - * @param boolean $redirect If false this will return the URL of the picture without a 302 redirect. - * - * @return string URL of the picture. - * - * @since 13.1 - */ - public function getPicture($photo, $redirect = true) - { - $extra_fields = ''; - - if ($redirect == false) - { - $extra_fields = '?redirect=false'; - } - - return $this->getConnection($photo, 'picture', $extra_fields); - } -} diff --git a/libraries/joomla/facebook/post.php b/libraries/joomla/facebook/post.php deleted file mode 100644 index a1e81493fb70a..0000000000000 --- a/libraries/joomla/facebook/post.php +++ /dev/null @@ -1,144 +0,0 @@ -get($post); - } - - /** - * Method to delete a post if it was created by this application. Requires authentication and publish_stream permission - * - * @param string $post The post id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deletePost($post) - { - return $this->deleteConnection($post); - } - - /** - * Method to get a post's comments. Requires authentication and read_stream permission. - * - * @param string $post The post id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($post, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($post, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a post. Requires authentication and publish_stream permission - * - * @param string $post The post id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($post, $message) - { - // Set POST request parameters. - $data['message'] = $message; - - return $this->createConnection($post, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission - * - * @param string $comment The comment's id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get post's likes. Requires authentication and read_stream permission. - * - * @param string $post The post id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($post, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($post, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a post. Requires authentication and publish_stream permission - * - * @param string $post The post id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($post) - { - return $this->createConnection($post, 'likes'); - } - - /** - * Method to unlike a post. Requires authentication and publish_stream permission - * - * @param string $post The post id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($post) - { - return $this->deleteConnection($post, 'likes'); - } -} diff --git a/libraries/joomla/facebook/status.php b/libraries/joomla/facebook/status.php deleted file mode 100644 index 4ed4dd74196ea..0000000000000 --- a/libraries/joomla/facebook/status.php +++ /dev/null @@ -1,130 +0,0 @@ -get($status); - } - - /** - * Method to get a status message's comments. Requires authentication. - * - * @param string $status The status message id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($status, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($status, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a comment to the status message. Requires authentication and publish_stream and user_status or friends_status permission. - * - * @param string $status The status message id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($status, $message) - { - // Set POST request parameters. - $data['message'] = $message; - - return $this->createConnection($status, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream and user_status or friends_status permission. - * - * @param string $comment The comment's id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get a status message's likes. Requires authentication. - * - * @param string $status The status message id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($status, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($status, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like status message. Requires authentication and publish_stream and user_status or friends_status permission. - * - * @param string $status The status message id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createLike($status) - { - return $this->createConnection($status, 'likes'); - } - - /** - * Method to unlike a status message. Requires authentication and publish_stream and user_status or friends_status permission. - * - * @param string $status The status message id. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteLike($status) - { - return $this->deleteConnection($status, 'likes'); - } -} diff --git a/libraries/joomla/facebook/user.php b/libraries/joomla/facebook/user.php deleted file mode 100644 index 5f8b61534bd14..0000000000000 --- a/libraries/joomla/facebook/user.php +++ /dev/null @@ -1,987 +0,0 @@ -get($user); - } - - /** - * Method to get the specified user's friends. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFriends($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'friends', '', $limit, $offset); - } - - /** - * Method to get the user's incoming friend requests. Requires authentication and read_requests permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFriendRequests($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'friendrequests', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the user's friend lists. Requires authentication and read_friendlists permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFriendLists($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'friendlists', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the user's wall. Requires authentication and read_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFeed($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'feed', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the user's news feed. Requires authentication and read_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $filter User's stream filter. - * @param boolean $location Retreive only posts with a location attached. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getHome($user, $filter = null, $location = false, $limit = 0, $offset = 0, $until = null, $since = null) - { - $extra_fields = ''; - - if ($filter != null) - { - $extra_fields = '?filter=' . $filter; - } - - if ($location == true) - { - $extra_fields .= (strpos($extra_fields, '?') === false) ? '?with=location' : '&with=location'; - } - - return $this->getConnection($user, 'home', $extra_fields, $limit, $offset, $until, $since); - } - - /** - * Method to see if a user is a friend of the current user. Requires authentication. - * - * @param mixed $current_user Either an integer containing the user ID or a string containing the username for the current user. - * @param mixed $user Either an integer containing the user ID or a string containing the username for the user. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function hasFriend($current_user, $user) - { - return $this->getConnection($current_user, 'friends/' . $user); - } - - /** - * Method to get mutual friends of one user and the current user. Requires authentication. - * - * @param mixed $current_user Either an integer containing the user ID or a string containing the username for the current user. - * @param mixed $user Either an integer containing the user ID or a string containing the username for the user. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getMutualFriends($current_user, $user, $limit = 0, $offset = 0) - { - return $this->getConnection($current_user, 'mutualfriends/' . $user, '', $limit, $offset); - } - - /** - * Method to get the user's profile picture. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param boolean $redirect If false this will return the URL of the profile picture without a 302 redirect. - * @param string $type To request a different photo use square | small | normal | large. - * - * @return string The URL to the user's profile picture. - * - * @since 13.1 - */ - public function getPicture($user, $redirect = true, $type = null) - { - $extra_fields = ''; - - if ($redirect == false) - { - $extra_fields = '?redirect=false'; - } - - if ($type != null) - { - $extra_fields .= (strpos($extra_fields, '?') === false) ? '?type=' . $type : '&type=' . $type; - } - - return $this->getConnection($user, 'picture', $extra_fields); - } - - /** - * Method to get the user's family relationships. Requires authentication and user_relationships permission.. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getFamily($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'family', '', $limit, $offset); - } - - /** - * Method to get the user's notifications. Requires authentication and manage_notifications permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param boolean $read Enables you to see notifications that the user has already read. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getNotifications($user, $read = null, $limit = 0, $offset = 0, $until = null, $since = null) - { - if ($read == true) - { - $read = '?include_read=1'; - } - - // Send the request. - return $this->getConnection($user, 'notifications', $read, $limit, $offset, $until, $since); - } - - /** - * Method to mark a notification as read. Requires authentication and manage_notifications permission. - * - * @param string $notification The notification id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function updateNotification($notification) - { - $data['unread'] = 0; - - return $this->createConnection($notification, null, $data); - } - - /** - * Method to get the user's permissions. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getPermissions($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'permissions', '', $limit, $offset); - } - - /** - * Method to revoke a specific permission on behalf of a user. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $permission The permission to revoke. If none specified, then this will de-authorize the application completely. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deletePermission($user, $permission = '') - { - return $this->deleteConnection($user, 'permissions', '?permission=' . $permission); - } - - /** - * Method to get the user's albums. Requires authentication and user_photos or friends_photos permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getAlbums($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'albums', '', $limit, $offset, $until, $since); - } - - /** - * Method to create an album for a user. Requires authentication and publish_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $name Album name. - * @param string $description Album description. - * @param json $privacy A JSON-encoded object that defines the privacy setting for the album. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createAlbum($user, $name, $description = null, $privacy = null) - { - // Set POST request parameters. - $data = array(); - $data['name'] = $name; - $data['description'] = $description; - $data['privacy'] = $privacy; - - return $this->createConnection($user, 'albums', $data); - } - - /** - * Method to get the user's checkins. Requires authentication and user_checkins or friends_checkins permission - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getCheckins($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'checkins', '', $limit, $offset, $until, $since); - } - - /** - * Method to create a checkin for a user. Requires authentication and publish_checkins permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $place Id of the Place Page. - * @param string $coordinates A JSON-encoded string containing latitute and longitude. - * @param string $tags Comma separated list of USER_IDs. - * @param string $message A message to add to the checkin. - * @param string $link A link to add to the checkin. - * @param string $picture A picture to add to the checkin. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createCheckin($user, $place, $coordinates, $tags = null, $message = null, $link = null, $picture = null) - { - // Set POST request parameters. - $data = array(); - $data['place'] = $place; - $data['coordinates'] = $coordinates; - $data['tags'] = $tags; - $data['message'] = $message; - $data['link'] = $link; - $data['picture'] = $picture; - - return $this->createConnection($user, 'checkins', $data); - } - - /** - * Method to get the user's likes. Requires authentication and user_likes or friends_likes permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to see if a user likes a specific Page. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $page Facebook ID of the Page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function likesPage($user, $page) - { - return $this->getConnection($user, 'likes/' . $page); - } - - /** - * Method to get the current user's events. Requires authentication and user_events or friends_events permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getEvents($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'events', '', $limit, $offset, $until, $since); - } - - /** - * Method to create an event for a user. Requires authentication create_event permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $name Event name. - * @param string $start_time Event start time as UNIX timestamp. - * @param string $end_time Event end time as UNIX timestamp. - * @param string $description Event description. - * @param string $location Event location. - * @param string $location_id Facebook Place ID of the place the Event is taking place. - * @param string $privacy_type Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createEvent($user, $name, $start_time, $end_time = null, $description = null, - $location = null, $location_id = null, $privacy_type = null) - { - // Set POST request parameters. - $data = array(); - $data['start_time'] = $start_time; - $data['name'] = $name; - $data['end_time'] = $end_time; - $data['description'] = $description; - $data['location'] = $location; - $data['location_id'] = $location_id; - $data['privacy_type'] = $privacy_type; - - return $this->createConnection($user, 'events', $data); - } - - /** - * Method to edit an event. Requires authentication create_event permission. - * - * @param mixed $event Event ID. - * @param string $name Event name. - * @param string $start_time Event start time as UNIX timestamp. - * @param string $end_time Event end time as UNIX timestamp. - * @param string $description Event description. - * @param string $location Event location. - * @param string $location_id Facebook Place ID of the place the Event is taking place. - * @param string $privacy_type Event privacy setting, a string containing 'OPEN' (default), 'CLOSED', or 'SECRET'. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function editEvent($event, $name = null, $start_time = null, $end_time = null, $description = null, - $location = null, $location_id = null, $privacy_type = null) - { - // Set POST request parameters. - $data = array(); - $data['start_time'] = $start_time; - $data['name'] = $name; - $data['end_time'] = $end_time; - $data['description'] = $description; - $data['location'] = $location; - $data['location_id'] = $location_id; - $data['privacy_type'] = $privacy_type; - - return $this->createConnection($event, null, $data); - } - - /** - * Method to delete an event. Note: you can only delete the event if it was created by the same app. Requires authentication create_event permission. - * - * @param string $event Event ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteEvent($event) - { - return $this->deleteConnection($event); - } - - /** - * Method to get the groups that the user belongs to. Requires authentication and user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getGroups($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'groups', '', $limit, $offset); - } - - /** - * Method to get the user's posted links. Requires authentication and user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLinks($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'links', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a link on user's feed. Requires authentication and publish_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $link Link URL. - * @param strin $message Link message. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createLink($user, $link, $message = null) - { - // Set POST request parameters. - $data = array(); - $data['link'] = $link; - $data['message'] = $message; - - return $this->createConnection($user, 'feed', $data); - } - - /** - * Method to delete a link. Requires authentication and publish_stream permission. - * - * @param mixed $link The Link ID. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLink($link) - { - return $this->deleteConnection($link); - } - - /** - * Method to get the user's notes. Requires authentication and user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getNotes($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'notes', '', $limit, $offset, $until, $since); - } - - /** - * Method to create a note on the behalf of the user. - * Requires authentication and publish_stream permission, user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $subject The subject of the note. - * @param string $message Note content. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createNote($user, $subject, $message) - { - // Set POST request parameters. - $data = array(); - $data['subject'] = $subject; - $data['message'] = $message; - - return $this->createConnection($user, 'notes', $data); - } - - /** - * Method to get the user's photos. Requires authentication and user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getPhotos($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'photos', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a photo on user's wall. Requires authentication and publish_stream permission, user_groups or friends_groups permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $source Path to photo. - * @param string $message Photo description. - * @param string $place Facebook ID of the place associated with the photo. - * @param boolean $no_story If set to 1, optionally suppresses the feed story that is automatically - * generated on a user’s profile when they upload a photo using your application. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPhoto($user, $source, $message = null, $place = null, $no_story = null) - { - // Set POST request parameters. - $data = array(); - $data[basename($source)] = '@' . realpath($source); - $data['message'] = $message; - $data['place'] = $place; - $data['no_story'] = $no_story; - - return $this->createConnection($user, 'photos', $data, array('Content-Type' => 'multipart/form-data')); - } - - /** - * Method to get the user's posts. Requires authentication and read_stream permission for non-public posts. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param boolean $location Retreive only posts with a location attached. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getPosts($user, $location = false, $limit = 0, $offset = 0, $until = null, $since = null) - { - if ($location == true) - { - $location = '?with=location'; - } - - // Send the request. - return $this->getConnection($user, 'posts', $location, $limit, $offset, $until, $since); - } - - /** - * Method to post on a user's wall. Message or link parameter is required. Requires authentication and publish_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $message Post message. - * @param string $link Post URL. - * @param string $picture Post thumbnail image (can only be used if link is specified) - * @param string $name Post name (can only be used if link is specified). - * @param string $caption Post caption (can only be used if link is specified). - * @param string $description Post description (can only be used if link is specified). - * @param array $actions Post actions array of objects containing name and link. - * @param string $place Facebook Page ID of the location associated with this Post. - * @param string $tags Comma-separated list of Facebook IDs of people tagged in this Post. - * For example: 1207059,701732. You cannot specify this field without also specifying a place. - * @param string $privacy Post privacy settings (can only be specified if the Timeline being posted - * on belongs to the User creating the Post). - * @param string $object_attachment Facebook ID for an existing picture in the User's photo albums to use as the thumbnail image. - * The User must be the owner of the photo, and the photo cannot be part of a message attachment. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createPost($user, $message = null, $link = null, $picture = null, $name = null, $caption = null, - $description = null, $actions = null, $place = null, $tags = null, $privacy = null, $object_attachment = null) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - $data['link'] = $link; - $data['name'] = $name; - $data['caption'] = $caption; - $data['description'] = $description; - $data['actions'] = $actions; - $data['place'] = $place; - $data['tags'] = $tags; - $data['privacy'] = $privacy; - $data['object_attachment'] = $object_attachment; - $data['picture'] = $picture; - - return $this->createConnection($user, 'feed', $data); - } - - /** - * Method to delete a post. Note: you can only delete the post if it was created by the current user. Requires authentication - * - * @param string $post The Post ID. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deletePost($post) - { - return $this->deleteConnection($post); - } - - /** - * Method to get the user's statuses. Requires authentication read_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getStatuses($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'statuses', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a status message on behalf of the user. Requires authentication publish_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $message Status message content. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createStatus($user, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($user, 'feed', $data); - } - - /** - * Method to delete a status. Note: you can only delete the post if it was created by the current user. - * Requires authentication publish_stream permission. - * - * @param string $status The Status ID. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function deleteStatus($status) - { - return $this->deleteConnection($status); - } - - /** - * Method to get the videos the user has been tagged in. Requires authentication and user_videos or friends_videos permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getVideos($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'videos', '', $limit, $offset, $until, $since); - } - - /** - * Method to post a video on behalf of the user. Requires authentication and publish_stream permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param string $source Path to video. - * @param string $title Video title. - * @param string $description Video description. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createVideo($user, $source, $title = null, $description = null) - { - // Set POST request parameters. - $data = array(); - $data[basename($source)] = '@' . realpath($source); - $data['title'] = $title; - $data['description'] = $description; - - return $this->createConnection($user, 'videos', $data, array('Content-Type' => 'multipart/form-data')); - } - - /** - * Method to get the posts the user has been tagged in. Requires authentication and user_videos or friends_videos permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getTagged($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'tagged', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the activities listed on the user's profile. Requires authentication and user_activities or friends_activities permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getActivities($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'activities', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the books listed on the user's profile. Requires authentication and user_likes or friends_likes permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getBooks($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'books', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the interests listed on the user's profile. Requires authentication. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getInterests($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'interests', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the movies listed on the user's profile. Requires authentication and user_likes or friends_likes permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getMovies($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'movies', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the television listed on the user's profile. Requires authentication and user_likes or friends_likes permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getTelevision($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'television', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the music listed on the user's profile. Requires authentication user_likes or friends_likes permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getMusic($user, $limit = 0, $offset = 0, $until = null, $since = null) - { - return $this->getConnection($user, 'music', '', $limit, $offset, $until, $since); - } - - /** - * Method to get the user's subscribers. Requires authentication and user_subscriptions or friends_subscriptions permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getSubscribers($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'subscribers', '', $limit, $offset); - } - - /** - * Method to get the people the user is subscribed to. Requires authentication and user_subscriptions or friends_subscriptions permission. - * - * @param mixed $user Either an integer containing the user ID or a string containing the username. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getSubscribedTo($user, $limit = 0, $offset = 0) - { - return $this->getConnection($user, 'subscribedto', '', $limit, $offset); - } -} diff --git a/libraries/joomla/facebook/video.php b/libraries/joomla/facebook/video.php deleted file mode 100644 index cd55f53c683a2..0000000000000 --- a/libraries/joomla/facebook/video.php +++ /dev/null @@ -1,145 +0,0 @@ -get($video); - } - - /** - * Method to get a video's comments. Requires authentication and user_videos or friends_videos permission for private videos. - * - * @param string $video The video id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getComments($video, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($video, 'comments', '', $limit, $offset, $until, $since); - } - - /** - * Method to comment on a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos. - * - * @param string $video The video id. - * @param string $message The comment's text. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function createComment($video, $message) - { - // Set POST request parameters. - $data = array(); - $data['message'] = $message; - - return $this->createConnection($video, 'comments', $data); - } - - /** - * Method to delete a comment. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos. - * - * @param string $comment The comment's id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteComment($comment) - { - return $this->deleteConnection($comment); - } - - /** - * Method to get video's likes. Requires authentication and user_videos or friends_videos permission for private videos. - * - * @param string $video The video id. - * @param integer $limit The number of objects per page. - * @param integer $offset The object's number on the page. - * @param string $until A unix timestamp or any date accepted by strtotime. - * @param string $since A unix timestamp or any date accepted by strtotime. - * - * @return mixed The decoded JSON response or false if the client is not authenticated. - * - * @since 13.1 - */ - public function getLikes($video, $limit=0, $offset=0, $until=null, $since=null) - { - return $this->getConnection($video, 'likes', '', $limit, $offset, $until, $since); - } - - /** - * Method to like a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos. - * - * @param string $video The video id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function createLike($video) - { - return $this->createConnection($video, 'likes'); - } - - /** - * Method to unlike a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos. - * - * @param string $video The video id. - * - * @return boolean Returns true if successful, and false otherwise. - * - * @since 13.1 - */ - public function deleteLike($video) - { - return $this->deleteConnection($video, 'likes'); - } - - /** - * Method to get the album-sized view of the video. Requires authentication and user_videos or friends_videos permission for private photos. - * - * @param string $video The video id. - * - * @return string URL of the picture. - * - * @since 13.1 - */ - public function getPicture($video) - { - return $this->getConnection($video, 'picture'); - } -} diff --git a/libraries/joomla/factory.php b/libraries/joomla/factory.php index 1e9d13715bc3c..acf847d70aba9 100644 --- a/libraries/joomla/factory.php +++ b/libraries/joomla/factory.php @@ -10,6 +10,7 @@ use Joomla\DI\Container; use Joomla\Registry\Registry; +use PHPMailer\PHPMailer\Exception as phpmailerException; /** * Joomla Platform Factory class. diff --git a/libraries/joomla/github/account.php b/libraries/joomla/github/account.php deleted file mode 100644 index 2fc642a87fa25..0000000000000 --- a/libraries/joomla/github/account.php +++ /dev/null @@ -1,253 +0,0 @@ -create() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function createAuthorisation(array $scopes = array(), $note = '', $url = '') - { - // Build the request path. - $path = '/authorizations'; - - $data = json_encode( - array('scopes' => $scopes, 'note' => $note, 'note_url' => $url) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete an authorisation - * - * @param integer $id ID of the authorisation to delete - * - * @deprecated use authorization->delete() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function deleteAuthorisation($id) - { - // Build the request path. - $path = '/authorizations/' . $id; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to edit an authorisation. - * - * @param integer $id ID of the authorisation to edit - * @param array $scopes Replaces the authorisation scopes with these. - * @param array $addScopes A list of scopes to add to this authorisation. - * @param array $removeScopes A list of scopes to remove from this authorisation. - * @param string $note A note to remind you what the OAuth token is for. - * @param string $url A URL to remind you what app the OAuth token is for. - * - * @deprecated use authorization->edit() - * - * @return object - * - * @since 12.3 - * @throws DomainException - * @throws RuntimeException - */ - public function editAuthorisation($id, array $scopes = array(), array $addScopes = array(), array $removeScopes = array(), $note = '', $url = '') - { - // Check if more than one scopes array contains data - $scopesCount = 0; - - if (!empty($scopes)) - { - $scope = 'scopes'; - $scopeData = $scopes; - $scopesCount++; - } - - if (!empty($addScopes)) - { - $scope = 'add_scopes'; - $scopeData = $addScopes; - $scopesCount++; - } - - if (!empty($removeScopes)) - { - $scope = 'remove_scopes'; - $scopeData = $removeScopes; - $scopesCount++; - } - - // Only allowed to send data for one scope parameter - if ($scopesCount >= 2) - { - throw new RuntimeException('You can only send one scope key in this request.'); - } - - // Build the request path. - $path = '/authorizations/' . $id; - - $data = json_encode( - array( - $scope => $scopeData, - 'note' => $note, - 'note_url' => $url, - ) - ); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get details about an authorised application for the authenticated user. - * - * @param integer $id ID of the authorisation to retrieve - * - * @deprecated use authorization->get() - * - * @return object - * - * @since 12.3 - * @note This method will only accept Basic Authentication - * @throws DomainException - */ - public function getAuthorisation($id) - { - // Build the request path. - $path = '/authorizations/' . $id; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get the authorised applications for the authenticated user. - * - * @deprecated use authorization->getList() - * - * @return object - * - * @since 12.3 - * @throws DomainException - * @note This method will only accept Basic Authentication - */ - public function getAuthorisations() - { - // Build the request path. - $path = '/authorizations'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get the rate limit for the authenticated user. - * - * @deprecated use authorization->getRateLimit() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function getRateLimit() - { - // Build the request path. - $path = '/rate_limit'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/commits.php b/libraries/joomla/github/commits.php deleted file mode 100644 index d503c701bd7bf..0000000000000 --- a/libraries/joomla/github/commits.php +++ /dev/null @@ -1,376 +0,0 @@ -commits->create() - * - * @return object - * - * @since 12.1 - */ - public function create($user, $repo, $message, $tree, array $parents = array()) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/commits'; - - $data = json_encode( - array('message' => $message, 'tree' => $tree, 'parents' => $parents) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to create a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to comment on. - * @param string $comment The text of the comment. - * @param integer $line The line number of the commit to comment on. - * @param string $filepath A relative path to the file to comment on within the commit. - * @param integer $position Line index in the diff to comment on. - * - * @deprecated use repositories->comments->create() - * - * @return object - * - * @since 12.1 - */ - public function createCommitComment($user, $repo, $sha, $comment, $line, $filepath, $position) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; - - $data = json_encode( - array( - 'body' => $comment, - 'commit_id' => $sha, - 'line' => (int) $line, - 'path' => $filepath, - 'position' => (int) $position, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $id The ID of the comment to edit. - * - * @deprecated use repositories->comments->delete() - * - * @return object - * - * @since 12.1 - */ - public function deleteCommitComment($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to edit a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $id The ID of the comment to edit. - * @param string $comment The text of the comment. - * - * @deprecated use repositories->comments->edit() - * - * @return object - * - * @since 12.1 - */ - public function editCommitComment($user, $repo, $id, $comment) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; - - $data = json_encode( - array( - 'body' => $comment, - ) - ); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single commit for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to retrieve. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->commits->get() - * - * @return array - * - * @since 12.1 - */ - public function getCommit($user, $repo, $sha, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the comment to retrieve - * - * @deprecated use repositories->comments->get() - * - * @return array - * - * @since 12.1 - */ - public function getCommitComment($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of comments for a single commit for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to retrieve. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->comments->getList() - * - * @return array - * - * @since 12.1 - */ - public function getCommitComments($user, $repo, $sha, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a diff for two commits. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $base The base of the diff, either a commit SHA or branch. - * @param string $head The head of the diff, either a commit SHA or branch. - * - * @deprecated use repositories->commits->compare() - * - * @return array - * - * @since 12.1 - */ - public function getDiff($user, $repo, $base, $head) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/compare/' . $base . '...' . $head; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list commits for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->commits->getList() - * - * @return array - * - * @since 12.1 - */ - public function getList($user, $repo, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of commit comments for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->comments->getListRepository() - * - * @return array - * - * @since 12.1 - */ - public function getListComments($user, $repo, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/forks.php b/libraries/joomla/github/forks.php deleted file mode 100644 index fee9b62913ace..0000000000000 --- a/libraries/joomla/github/forks.php +++ /dev/null @@ -1,97 +0,0 @@ -forks->create() - * - * @return object - * - * @since 11.4 - * @throws DomainException - */ - public function create($user, $repo, $org = '') - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/forks'; - - if (strlen($org) > 0) - { - $data = json_encode( - array('org' => $org) - ); - } - else - { - $data = json_encode(array()); - } - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 202) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list forks for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->forks->getList() - * - * @return array - * - * @since 11.4 - * @throws DomainException - */ - public function getList($user, $repo, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/forks'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/github.php b/libraries/joomla/github/github.php deleted file mode 100644 index 14ccdce94b358..0000000000000 --- a/libraries/joomla/github/github.php +++ /dev/null @@ -1,167 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JGithubHttp($this->options); - - // Setup the default API url if not already set. - $this->options->def('api.url', 'https://api.github.com'); - } - - /** - * Magic method to lazily create API objects - * - * @param string $name Name of property to retrieve - * - * @throws RuntimeException - * - * @since 11.3 - * @return JGithubObject GitHub API object (gists, issues, pulls, etc). - */ - public function __get($name) - { - if (false == in_array($name, $this->packages)) - { - // Check for a legacy class - if (in_array($name, $this->legacyPackages)) - { - if (false == isset($this->$name)) - { - $className = 'JGithub' . ucfirst($name); - - $this->$name = new $className($this->options, $this->client); - } - - return $this->$name; - } - - throw new RuntimeException(sprintf('%1$s - Unknown package %2$s', __METHOD__, $name)); - } - - if (false == isset($this->$name)) - { - $className = 'JGithubPackage' . ucfirst($name); - - $this->$name = new $className($this->options, $this->client); - } - - return $this->$name; - } - - /** - * Get an option from the JGitHub instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 11.3 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JGitHub instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JGitHub This object for method chaining. - * - * @since 11.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/github/hooks.php b/libraries/joomla/github/hooks.php deleted file mode 100644 index a9da1ae9259ba..0000000000000 --- a/libraries/joomla/github/hooks.php +++ /dev/null @@ -1,250 +0,0 @@ -hooks->create() - * - * @return object - * - * @since 12.3 - * @throws DomainException - * @throws RuntimeException - */ - public function create($user, $repo, $name, array $config, array $events = array('push'), $active = true) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks'; - - // Check to ensure all events are in the allowed list - foreach ($events as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your events array contains an unauthorized event.'); - } - } - - $data = json_encode( - array('name' => $name, 'config' => $config, 'events' => $events, 'active' => $active) - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Method to delete a hook - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to delete. - * - * @deprecated use repositories->hooks->delete() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function delete($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Method to edit a hook. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to edit. - * @param string $name The name of the service being called. - * @param array $config Array containing the config for the service. - * @param array $events The events the hook will be triggered for. This resets the currently set list - * @param array $addEvents Events to add to the hook. - * @param array $removeEvents Events to remove from the hook. - * @param boolean $active Flag to determine if the hook is active - * - * @deprecated use repositories->hooks->edit() - * - * @return object - * - * @since 12.3 - * @throws DomainException - * @throws RuntimeException - */ - public function edit($user, $repo, $id, $name, array $config, array $events = array('push'), array $addEvents = array(), - array $removeEvents = array(), $active = true) - { - // Check to ensure all events are in the allowed list - foreach ($events as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your events array contains an unauthorized event.'); - } - } - - foreach ($addEvents as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your active_events array contains an unauthorized event.'); - } - } - - foreach ($removeEvents as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your remove_events array contains an unauthorized event.'); - } - } - - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - $data = json_encode( - array( - 'name' => $name, - 'config' => $config, - 'events' => $events, - 'add_events' => $addEvents, - 'remove_events' => $removeEvents, - 'active' => $active, - ) - ); - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to get details about a single hook for the repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to retrieve - * - * @deprecated use repositories->hooks->get() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function get($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to list hooks for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use repositories->hooks->getList() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function getList($user, $repo, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to test a hook against the latest repository commit - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to delete - * - * @deprecated use repositories->hooks->test() - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function test($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id . '/test'; - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode('')), - 204 - ); - } -} diff --git a/libraries/joomla/github/http.php b/libraries/joomla/github/http.php deleted file mode 100644 index 472a234f9313e..0000000000000 --- a/libraries/joomla/github/http.php +++ /dev/null @@ -1,59 +0,0 @@ -options->def('userAgent', 'JGitHub/2.0'); - - // Set the default timeout to 120 seconds. - $this->options->def('timeout', 120); - } -} diff --git a/libraries/joomla/github/meta.php b/libraries/joomla/github/meta.php deleted file mode 100644 index f75810c663b45..0000000000000 --- a/libraries/joomla/github/meta.php +++ /dev/null @@ -1,58 +0,0 @@ -processResponse($this->client->get($this->fetchUrl($path)), 200); - - /* - * The response body returns the IP addresses in CIDR format - * Decode the response body and strip the subnet mask information prior to - * returning the data to the user. We're assuming quite a bit here that all - * masks will be /32 as they are as of the time of development. - */ - - $authorizedIps = array(); - - foreach ($githubIps as $key => $serviceIps) - { - // The first level contains an array of IPs based on the service - $authorizedIps[$key] = array(); - - foreach ($serviceIps as $serviceIp) - { - // The second level is each individual IP address, strip the mask here - $authorizedIps[$key][] = substr($serviceIp, 0, -3); - } - } - - return $authorizedIps; - } -} diff --git a/libraries/joomla/github/milestones.php b/libraries/joomla/github/milestones.php deleted file mode 100644 index c1f3b0025304f..0000000000000 --- a/libraries/joomla/github/milestones.php +++ /dev/null @@ -1,239 +0,0 @@ -milestones->getList() - * - * @return array - * - * @since 12.3 - */ - public function getList($user, $repo, $state = 'open', $sort = 'due_date', $direction = 'desc', $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones?'; - - $path .= 'state=' . $state; - $path .= '&sort=' . $sort; - $path .= '&direction=' . $direction; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a specific milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The milestone id to get. - * - * @deprecated use issues->milestones->get() - * - * @return object - * - * @since 12.3 - */ - public function get($user, $repo, $milestoneId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to create a milestone for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $title The title of the milestone. - * @param string $state Can be open (default) or closed. - * @param string $description Optional description for milestone. - * @param string $due_on Optional ISO 8601 time. - * - * @deprecated use issues->milestones->create() - * - * @return object - * - * @since 12.3 - */ - public function create($user, $repo, $title, $state = null, $description = null, $due_on = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones'; - - // Build the request data. - $data = array( - 'title' => $title, - ); - - if (!is_null($state)) - { - $data['state'] = $state; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - if (!is_null($due_on)) - { - $data['due_on'] = $due_on; - } - - $data = json_encode($data); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The id of the comment to update. - * @param integer $title Optional title of the milestone. - * @param string $state Can be open (default) or closed. - * @param string $description Optional description for milestone. - * @param string $due_on Optional ISO 8601 time. - * - * @deprecated use issues->milestones->edit() - * - * @return object - * - * @since 12.3 - */ - public function edit($user, $repo, $milestoneId, $title = null, $state = null, $description = null, $due_on = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Build the request data. - $data = array(); - - if (!is_null($title)) - { - $data['title'] = $title; - } - - if (!is_null($state)) - { - $data['state'] = $state; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - if (!is_null($due_on)) - { - $data['due_on'] = $due_on; - } - - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete a milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The id of the milestone to delete. - * - * @deprecated use issues->milestones->delete() - * - * @return void - * - * @since 12.3 - */ - public function delete($user, $repo, $milestoneId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } -} diff --git a/libraries/joomla/github/object.php b/libraries/joomla/github/object.php deleted file mode 100644 index 0ba9497314666..0000000000000 --- a/libraries/joomla/github/object.php +++ /dev/null @@ -1,130 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JGithubHttp($this->options); - } - - /** - * Method to build and return a full request URL for the request. This method will - * add appropriate pagination details if necessary and also prepend the API url - * to have a complete URL for the request. - * - * @param string $path URL to inflect - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @return string The request URL. - * - * @since 11.3 - */ - protected function fetchUrl($path, $page = 0, $limit = 0) - { - // Get a new JUri object fousing the api url and given path. - $uri = new JUri($this->options->get('api.url') . $path); - - if ($this->options->get('gh.token', false)) - { - // Use oAuth authentication - @todo set in request header ? - $uri->setVar('access_token', $this->options->get('gh.token')); - } - else - { - // Use basic authentication - if ($this->options->get('api.username', false)) - { - $username = $this->options->get('api.username'); - $username = str_replace('@', '%40', $username); - $uri->setUser($username); - } - - if ($this->options->get('api.password', false)) - { - $password = $this->options->get('api.password'); - $password = str_replace('@', '%40', $password); - $uri->setPass($password); - } - } - - // If we have a defined page number add it to the JUri object. - if ($page > 0) - { - $uri->setVar('page', (int) $page); - } - - // If we have a defined items per page add it to the JUri object. - if ($limit > 0) - { - $uri->setVar('per_page', (int) $limit); - } - - return (string) $uri; - } - - /** - * Process the response and decode it. - * - * @param JHttpResponse $response The response. - * @param integer $expectedCode The expected "good" code. - * @param boolean $decode If the should be response be JSON decoded. - * - * @throws DomainException - * @since 12.4 - * - * @return mixed - */ - protected function processResponse(JHttpResponse $response, $expectedCode = 200, $decode = true) - { - // Validate the response code. - if ($response->code == $expectedCode) - { - return ($decode) ? json_decode($response->body) : $response->body; - } - - // Decode the error response and throw an exception. - $error = json_decode($response->body); - $message = (isset($error->message)) ? $error->message : 'Error: ' . $response->code; - - throw new DomainException($message, $response->code); - } -} diff --git a/libraries/joomla/github/package.php b/libraries/joomla/github/package.php deleted file mode 100644 index 61f23a3929b6e..0000000000000 --- a/libraries/joomla/github/package.php +++ /dev/null @@ -1,58 +0,0 @@ -packages)) - { - throw new RuntimeException(sprintf('%1$s - Unknown package %2$s', __METHOD__, $name)); - } - - if (false == isset($this->$name)) - { - $className = 'JGithubPackage' . ucfirst($this->name) . ucfirst($name); - - $this->$name = new $className($this->options, $this->client); - } - - return $this->$name; - } -} diff --git a/libraries/joomla/github/package/activity.php b/libraries/joomla/github/package/activity.php deleted file mode 100644 index ddec96f057846..0000000000000 --- a/libraries/joomla/github/package/activity.php +++ /dev/null @@ -1,27 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List repository events. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 12.3 - * - * @return object - */ - public function getRepository($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List issue events for a repository. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 12.3 - * @return object - */ - public function getIssue($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List public events for a network of repositories. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 12.3 - * @return object - */ - public function getNetwork($owner, $repo) - { - // Build the request path. - $path = '/networks/' . $owner . '/' . $repo . '/events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List public events for an organization. - * - * @param string $org Organisation. - * - * @since 12.3 - * @return object - */ - public function getOrg($org) - { - // Build the request path. - $path = '/orgs/' . $org . '/events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List events that a user has received. - * - * These are events that you’ve received by watching repos and following users. - * If you are authenticated as the given user, you will see private events. - * Otherwise, you’ll only see public events. - * - * @param string $user User name. - * - * @since 12.3 - * @return object - */ - public function getUser($user) - { - // Build the request path. - $path = '/users/' . $user . '/received_events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List public events that a user has received. - * - * @param string $user User name. - * - * @since 12.3 - * @return object - */ - public function getUserPublic($user) - { - // Build the request path. - $path = '/users/' . $user . '/received_events/public'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List events performed by a user. - * - * If you are authenticated as the given user, you will see your private events. - * Otherwise, you’ll only see public events. - * - * @param string $user User name. - * - * @since 12.3 - * @return object - */ - public function getByUser($user) - { - // Build the request path. - $path = '/users/' . $user . '/events'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List public events performed by a user. - * - * @param string $user User name. - * - * @since 12.3 - * @return object - */ - public function getByUserPublic($user) - { - // Build the request path. - $path = '/users/' . $user . '/events/public'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List events for an organization. - * - * This is the user’s organization dashboard. - * You must be authenticated as the user to view this. - * - * @param string $user User name. - * @param string $org Organisation. - * - * @since 12.3 - * @return object - */ - public function getUserOrg($user, $org) - { - // Build the request path. - $path = '/users/' . $user . '/events/orgs/' . $org; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/activity/notifications.php b/libraries/joomla/github/package/activity/notifications.php deleted file mode 100644 index dd84f2bdd4b5b..0000000000000 --- a/libraries/joomla/github/package/activity/notifications.php +++ /dev/null @@ -1,271 +0,0 @@ -toISO8601() : ''; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List your notifications in a repository. - * - * List all notifications for the current user. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $all True to show notifications marked as read. - * @param boolean $participating True to show only notifications in which the user is directly participating or - * mentioned. - * @param JDate $since filters out any notifications updated before the given time. The time should be passed in - * as UTC in the ISO 8601 format. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListRepository($owner, $repo, $all = true, $participating = true, JDate $since = null) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/notifications?'; - - $path .= ($all) ? '&all=1' : ''; - $path .= ($participating) ? '&participating=1' : ''; - $path .= ($since) ? '&since=' . $since->toISO8601() : ''; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Mark as read. - * - * Marking a notification as “read†removes it from the default view on GitHub.com. - * - * @param boolean $unread Changes the unread status of the threads. - * @param boolean $read Inverse of “unreadâ€. - * @param JDate $last_read_at Describes the last point that notifications were checked. - * Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function markRead($unread = true, $read = true, JDate $last_read_at = null) - { - // Build the request path. - $path = '/notifications'; - - $data = array( - 'unread' => $unread, - 'read' => $read, - ); - - if ($last_read_at) - { - $data['last_read_at'] = $last_read_at->toISO8601(); - } - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), json_encode($data)), - 205 - ); - } - - /** - * Mark notifications as read in a repository. - * - * Marking all notifications in a repository as “read†removes them from the default view on GitHub.com. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $unread Changes the unread status of the threads. - * @param boolean $read Inverse of “unreadâ€. - * @param JDate $last_read_at Describes the last point that notifications were checked. - * Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function markReadRepository($owner, $repo, $unread, $read, JDate $last_read_at = null) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/notifications'; - - $data = array( - 'unread' => $unread, - 'read' => $read, - ); - - if ($last_read_at) - { - $data['last_read_at'] = $last_read_at->toISO8601(); - } - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), json_encode($data)), - 205 - ); - } - - /** - * View a single thread. - * - * @param integer $id The thread id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function viewThread($id) - { - // Build the request path. - $path = '/notifications/threads/' . $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Mark a thread as read. - * - * @param integer $id The thread id. - * @param boolean $unread Changes the unread status of the threads. - * @param boolean $read Inverse of “unreadâ€. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function markReadThread($id, $unread = true, $read = true) - { - // Build the request path. - $path = '/notifications/threads/' . $id; - - $data = array( - 'unread' => $unread, - 'read' => $read, - ); - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), json_encode($data)), - 205 - ); - } - - /** - * Get a Thread Subscription. - * - * This checks to see if the current user is subscribed to a thread. - * You can also get a Repository subscription. - * - * @param integer $id The thread id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getThreadSubscription($id) - { - // Build the request path. - $path = '/notifications/threads/' . $id . '/subscription'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Set a Thread Subscription. - * - * This lets you subscribe to a thread, or ignore it. Subscribing to a thread is unnecessary - * if the user is already subscribed to the repository. Ignoring a thread will mute all - * future notifications (until you comment or get @mentioned). - * - * @param integer $id The thread id. - * @param boolean $subscribed Determines if notifications should be received from this thread. - * @param boolean $ignored Determines if all notifications should be blocked from this thread. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function setThreadSubscription($id, $subscribed, $ignored) - { - // Build the request path. - $path = '/notifications/threads/' . $id . '/subscription'; - - $data = array( - 'subscribed' => $subscribed, - 'ignored' => $ignored, - ); - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * Delete a Thread Subscription. - * - * @param integer $id The thread id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function deleteThreadSubscription($id) - { - // Build the request path. - $path = '/notifications/threads/' . $id . '/subscription'; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/activity/starring.php b/libraries/joomla/github/package/activity/starring.php deleted file mode 100644 index 8960c7333cdde..0000000000000 --- a/libraries/joomla/github/package/activity/starring.php +++ /dev/null @@ -1,146 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List repositories being starred. - * - * List repositories being starred by a user. - * - * @param string $user User name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getRepositories($user = '') - { - // Build the request path. - $path = ($user) - ? '/users' . $user . '/starred' - : '/user/starred'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Check if you are starring a repository. - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function check($owner, $repo) - { - // Build the request path. - $path = '/user/starred/' . $owner . '/' . $repo; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case '204' : - // This repository is watched by you. - return true; - break; - - case '404' : - // This repository is not watched by you. - return false; - break; - } - - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - } - - /** - * Star a repository. - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function star($owner, $repo) - { - // Build the request path. - $path = '/user/starred/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Unstar a repository. - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function unstar($owner, $repo) - { - // Build the request path. - $path = '/user/starred/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/activity/watching.php b/libraries/joomla/github/package/activity/watching.php deleted file mode 100644 index a8c57f3cfeb4b..0000000000000 --- a/libraries/joomla/github/package/activity/watching.php +++ /dev/null @@ -1,214 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List repositories being watched. - * - * List repositories being watched by a user. - * - * @param string $user User name. - * - * @since 3.3 (CMS) - * - * @return mixed - */ - public function getRepositories($user = '') - { - // Build the request path. - $path = ($user) - ? '/users/' . $user . '/subscriptions' - : '/user/subscriptions'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a Repository Subscription. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return mixed - */ - public function getSubscription($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/subscription'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Set a Repository Subscription. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $subscribed Determines if notifications should be received from this thread. - * @param boolean $ignored Determines if all notifications should be blocked from this thread. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function setSubscription($owner, $repo, $subscribed, $ignored) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/subscription'; - - $data = array( - 'subscribed' => $subscribed, - 'ignored' => $ignored, - ); - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * Delete a Repository Subscription. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function deleteSubscription($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/subscription'; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Check if you are watching a repository (LEGACY). - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function check($owner, $repo) - { - // Build the request path. - $path = '/user/subscriptions/' . $owner . '/' . $repo; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case '204' : - // This repository is watched by you. - return true; - break; - - case '404' : - // This repository is not watched by you. - return false; - break; - } - - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - } - - /** - * Watch a repository (LEGACY). - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function watch($owner, $repo) - { - // Build the request path. - $path = '/user/subscriptions/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Stop watching a repository (LEGACY). - * - * Requires for the user to be authenticated. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function unwatch($owner, $repo) - { - // Build the request path. - $path = '/user/subscriptions/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/authorization.php b/libraries/joomla/github/package/authorization.php deleted file mode 100644 index 74ae76cc466e1..0000000000000 --- a/libraries/joomla/github/package/authorization.php +++ /dev/null @@ -1,334 +0,0 @@ - $scopes, 'note' => $note, 'note_url' => $url) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete an authorization - * - * @param integer $id ID of the authorization to delete - * - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function delete($id) - { - // Build the request path. - $path = '/authorizations/' . $id; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to edit an authorization. - * - * @param integer $id ID of the authorization to edit - * @param array $scopes Replaces the authorization scopes with these. - * @param array $addScopes A list of scopes to add to this authorization. - * @param array $removeScopes A list of scopes to remove from this authorization. - * @param string $note A note to remind you what the OAuth token is for. - * @param string $url A URL to remind you what app the OAuth token is for. - * - * @throws RuntimeException - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function edit($id, array $scopes = array(), array $addScopes = array(), array $removeScopes = array(), $note = '', $url = '') - { - // Check if more than one scopes array contains data - $scopesCount = 0; - - if (!empty($scopes)) - { - $scope = 'scopes'; - $scopeData = $scopes; - $scopesCount++; - } - - if (!empty($addScopes)) - { - $scope = 'add_scopes'; - $scopeData = $addScopes; - $scopesCount++; - } - - if (!empty($removeScopes)) - { - $scope = 'remove_scopes'; - $scopeData = $removeScopes; - $scopesCount++; - } - - // Only allowed to send data for one scope parameter - if ($scopesCount >= 2) - { - throw new RuntimeException('You can only send one scope key in this request.'); - } - - // Build the request path. - $path = '/authorizations/' . $id; - - $data = json_encode( - array( - $scope => $scopeData, - 'note' => $note, - 'note_url' => $url, - ) - ); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get details about an authorised application for the authenticated user. - * - * @param integer $id ID of the authorization to retrieve - * - * @throws DomainException - * @since 12.3 - * @note This method will only accept Basic Authentication - * - * @return object - */ - public function get($id) - { - // Build the request path. - $path = '/authorizations/' . $id; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get the authorised applications for the authenticated user. - * - * @throws DomainException - * @since 12.3 - * @note This method will only accept Basic Authentication - * - * @return object - */ - public function getList() - { - // Build the request path. - $path = '/authorizations'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get the rate limit for the authenticated user. - * - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function getRateLimit() - { - // Build the request path. - $path = '/rate_limit'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * 1. Request authorization on GitHub. - * - * @param string $client_id The client ID you received from GitHub when you registered. - * @param string $redirect_uri URL in your app where users will be sent after authorization. - * @param string $scope Comma separated list of scopes. - * @param string $state An unguessable random string. It is used to protect against - * cross-site request forgery attacks. - * - * @since 3.3 (CMS) - * - * @return JUri - */ - public function getAuthorizationLink($client_id, $redirect_uri = '', $scope = '', $state = '') - { - $uri = new JUri('https://github.com/login/oauth/authorize'); - - $uri->setVar('client_id', $client_id); - - if ($redirect_uri) - { - $uri->setVar('redirect_uri', urlencode($redirect_uri)); - } - - if ($scope) - { - $uri->setVar('scope', $scope); - } - - if ($state) - { - $uri->setVar('state', $state); - } - - return (string) $uri; - } - - /** - * 2. Request the access token. - * - * @param string $client_id The client ID you received from GitHub when you registered. - * @param string $client_secret The client secret you received from GitHub when you registered. - * @param string $code The code you received as a response to Step 1. - * @param string $redirect_uri URL in your app where users will be sent after authorization. - * @param string $format The response format (json, xml, ). - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return string - */ - public function requestToken($client_id, $client_secret, $code, $redirect_uri = '', $format = '') - { - $uri = 'https://github.com/login/oauth/access_token'; - - $data = array( - 'client_id' => $client_id, - 'client_secret' => $client_secret, - 'code' => $code, - ); - - if ($redirect_uri) - { - $data['redirect_uri'] = $redirect_uri; - } - - $headers = array(); - - switch ($format) - { - case 'json' : - $headers['Accept'] = 'application/json'; - break; - case 'xml' : - $headers['Accept'] = 'application/xml'; - break; - default : - if ($format) - { - throw new UnexpectedValueException('Invalid format'); - } - break; - } - - // Send the request. - return $this->processResponse( - $this->client->post($uri, $data, $headers), - 200, false - ); - } -} diff --git a/libraries/joomla/github/package/data.php b/libraries/joomla/github/package/data.php deleted file mode 100644 index 4df74210939c3..0000000000000 --- a/libraries/joomla/github/package/data.php +++ /dev/null @@ -1,55 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a Blob. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param string $content The content of the blob. - * @param string $encoding The encoding to use. - * - * @return object - */ - public function create($owner, $repo, $content, $encoding = 'utf-8') - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/blobs'; - - $data = array( - 'content' => $content, - 'encoding' => $encoding, - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } -} diff --git a/libraries/joomla/github/package/data/commits.php b/libraries/joomla/github/package/data/commits.php deleted file mode 100644 index 32ea147cc4d39..0000000000000 --- a/libraries/joomla/github/package/data/commits.php +++ /dev/null @@ -1,73 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to create a commit. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $message The commit message. - * @param string $tree SHA of the tree object this commit points to. - * @param array $parents Array of the SHAs of the commits that were the parents of this commit. - * If omitted or empty, the commit will be written as a root commit. - * For a single parent, an array of one SHA should be provided. - * For a merge commit, an array of more than one should be provided. - * - * @throws DomainException - * @since 12.1 - * - * @return object - */ - public function create($owner, $repo, $message, $tree, array $parents = array()) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/commits'; - - $data = json_encode( - array('message' => $message, 'tree' => $tree, 'parents' => $parents) - ); - - // Send the request. - return $this->processResponse( - $response = $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } -} diff --git a/libraries/joomla/github/package/data/refs.php b/libraries/joomla/github/package/data/refs.php deleted file mode 100644 index e9cc3e3867da4..0000000000000 --- a/libraries/joomla/github/package/data/refs.php +++ /dev/null @@ -1,191 +0,0 @@ -client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list references for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $namespace Optional sub-namespace to limit the returned references. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @return array - * - * @since 11.3 - */ - public function getList($user, $repo, $namespace = '', $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs' . $namespace; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to create a ref. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $ref The name of the fully qualified reference. - * @param string $sha The SHA1 value to set this reference to. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function create($user, $repo, $ref, $sha) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs'; - - // Build the request data. - $data = json_encode( - array( - 'ref' => $ref, - 'sha' => $sha, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a reference. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $ref The reference to update. - * @param string $sha The SHA1 value to set the reference to. - * @param boolean $force Whether the update should be forced. Default to false. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($user, $repo, $ref, $sha, $force = false) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref; - - // Craete the data object. - $data = new stdClass; - - // If a title is set add it to the data object. - if ($force) - { - $data->force = true; - } - - $data->sha = $sha; - - // Encode the request data. - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Delete a Reference - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $ref The reference to update. - * - * @since 3.3 (CMS) - * @return object - */ - public function delete($owner, $repo, $ref) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/refs/' . $ref; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/data/tags.php b/libraries/joomla/github/package/data/tags.php deleted file mode 100644 index 71fe99283951d..0000000000000 --- a/libraries/joomla/github/package/data/tags.php +++ /dev/null @@ -1,88 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a Tag Object - * - * Note that creating a tag object does not create the reference that makes a tag in Git. - * If you want to create an annotated tag in Git, you have to do this call to create the tag object, - * and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, - * you simply have to create the reference - this call would be unnecessary. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $tag The tag string. - * @param string $message The tag message. - * @param string $object The SHA of the git object this is tagging. - * @param string $type The type of the object we’re tagging. Normally this is a commit - * but it can also be a tree or a blob. - * @param string $tagger_name The name of the author of the tag. - * @param string $tagger_email The email of the author of the tag. - * @param string $tagger_date Timestamp of when this object was tagged. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function create($owner, $repo, $tag, $message, $object, $type, $tagger_name, $tagger_email, $tagger_date) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/tags'; - - $data = array( - 'tag' => $tag, - 'message' => $message, - 'object' => $object, - 'type' => $type, - 'tagger_name' => $tagger_name, - 'tagger_email' => $tagger_email, - 'tagger_date' => $tagger_date, - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } -} diff --git a/libraries/joomla/github/package/data/trees.php b/libraries/joomla/github/package/data/trees.php deleted file mode 100644 index 5cae74ec51fa2..0000000000000 --- a/libraries/joomla/github/package/data/trees.php +++ /dev/null @@ -1,116 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a Tree Recursively - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA1 value to set the reference to. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getRecursively($owner, $repo, $sha) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/trees/' . $sha . '?recursive=1'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a Tree. - * - * The tree creation API will take nested entries as well. If both a tree and a nested path - * modifying that tree are specified, it will overwrite the contents of that tree with the - * new path contents and write a new tree out. - * - * Parameters fir the tree: - * - * tree.path - * String of the file referenced in the tree - * tree.mode - * String of the file mode - one of 100644 for file (blob), 100755 for executable (blob), - * 040000 for subdirectory (tree), 160000 for submodule (commit) or 120000 for a blob - * that specifies the path of a symlink - * tree.type - * String of blob, tree, commit - * tree.sha - * String of SHA1 checksum ID of the object in the tree - * tree.content - * String of content you want this file to have - GitHub will write this blob out and use - * that SHA for this entry. Use either this or tree.sha - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param array $tree Array of Hash objects (of path, mode, type and sha) specifying - * a tree structure - * @param string $base_tree The SHA1 of the tree you want to update with new data. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function create($owner, $repo, $tree, $base_tree = '') - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/git/trees'; - - $data = array(); - - $data['tree'] = $tree; - - if ($base_tree) - { - $data['base_tree'] = $base_tree; - } - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } -} diff --git a/libraries/joomla/github/package/gists.php b/libraries/joomla/github/package/gists.php deleted file mode 100644 index 11fe24337db78..0000000000000 --- a/libraries/joomla/github/package/gists.php +++ /dev/null @@ -1,548 +0,0 @@ - $this->buildFileData((array) $files), - 'public' => (bool) $public, - 'description' => $description, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete a gist. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return void - */ - public function delete($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to update a gist. - * - * @param integer $gistId The gist number. - * @param mixed $files Either an array of file paths or a single file path as a string. - * @param boolean $public True if the gist should be public. - * @param string $description The description of the gist. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($gistId, $files = null, $public = null, $description = null) - { - // Build the request path. - $path = '/gists/' . (int) $gistId; - - // Craete the data object. - $data = new stdClass; - - // If a description is set add it to the data object. - if (isset($description)) - { - $data->description = $description; - } - - // If the public flag is set add it to the data object. - if (isset($public)) - { - $data->public = $public; - } - - // If a state is set add it to the data object. - if (isset($files)) - { - $data->files = $this->buildFileData((array) $files); - } - - // Encode the request data. - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to fork a gist. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function fork($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId . '/fork'; - - // Send the request. - // TODO: Verify change - $response = $this->client->post($this->fetchUrl($path), ''); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single gist. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function get($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list gists. If a user is authenticated it will return the user's gists, otherwise - * it will return all public gists. - * - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getList($page = 0, $limit = 0) - { - // Build the request path. - $path = '/gists'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of gists belonging to a given user. - * - * @param string $user The name of the GitHub user from which to list gists. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getListByUser($user, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/users/' . $user . '/gists'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of all public gists. - * - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getListPublic($page = 0, $limit = 0) - { - // Build the request path. - $path = '/gists/public'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of the authenticated users' starred gists. - * - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getListStarred($page = 0, $limit = 0) - { - // Build the request path. - $path = '/gists/starred'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to check if a gist has been starred. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return boolean True if the gist is starred. - */ - public function isStarred($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId . '/star'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code == 204) - { - return true; - } - elseif ($response->code == 404) - { - return false; - } - else - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to star a gist. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return void - */ - public function star($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId . '/star'; - - // Send the request. - $response = $this->client->put($this->fetchUrl($path), ''); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to star a gist. - * - * @param integer $gistId The gist number. - * - * @throws DomainException - * @since 11.3 - * - * @return void - */ - public function unstar($gistId) - { - // Build the request path. - $path = '/gists/' . (int) $gistId . '/star'; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to fetch a data array for transmitting to the GitHub API for a list of files based on - * an input array of file paths or filename and content pairs. - * - * @param array $files The list of file paths or filenames and content. - * - * @throws InvalidArgumentException - * @since 11.3 - * - * @return array - */ - protected function buildFileData(array $files) - { - $data = array(); - - foreach ($files as $key => $file) - { - // If the key isn't numeric, then we are dealing with a file whose content has been supplied - if (!is_numeric($key)) - { - $data[$key] = array('content' => $file); - } - - // Otherwise, we have been given a path and we have to load the content - // Verify that the each file exists. - elseif (!file_exists($file)) - { - throw new InvalidArgumentException('The file ' . $file . ' does not exist.'); - } - else - { - $data[basename($file)] = array('content' => file_get_contents($file)); - } - } - - return $data; - } - - /* - * Deprecated methods - */ - - /** - * Method to create a comment on a gist. - * - * @param integer $gistId The gist number. - * @param string $body The comment body text. - * - * @deprecated use gists->comments->create() - * - * @return object - * - * @since 11.3 - */ - public function createComment($gistId, $body) - { - return $this->comments->create($gistId, $body); - } - - /** - * Method to delete a comment on a gist. - * - * @param integer $commentId The id of the comment to delete. - * - * @deprecated use gists->comments->delete() - * - * @return void - * - * @since 11.3 - */ - public function deleteComment($commentId) - { - $this->comments->delete($commentId); - } - - /** - * Method to update a comment on a gist. - * - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @deprecated use gists->comments->edit() - * - * @return object - * - * @since 11.3 - */ - public function editComment($commentId, $body) - { - return $this->comments->edit($commentId, $body); - } - - /** - * Method to get a specific comment on a gist. - * - * @param integer $commentId The comment id to get. - * - * @deprecated use gists->comments->get() - * - * @return object - * - * @since 11.3 - */ - public function getComment($commentId) - { - return $this->comments->get($commentId); - } - - /** - * Method to get the list of comments on a gist. - * - * @param integer $gistId The gist number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @deprecated use gists->comments->getList() - * - * @return array - * - * @since 11.3 - */ - public function getComments($gistId, $page = 0, $limit = 0) - { - return $this->comments->getList($gistId, $page, $limit); - } -} diff --git a/libraries/joomla/github/package/gists/comments.php b/libraries/joomla/github/package/gists/comments.php deleted file mode 100644 index 5f632e5c1d2ed..0000000000000 --- a/libraries/joomla/github/package/gists/comments.php +++ /dev/null @@ -1,182 +0,0 @@ - $body, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete a comment on a gist. - * - * @param integer $commentId The id of the comment to delete. - * - * @throws DomainException - * @since 11.3 - * - * @return void - */ - public function delete($commentId) - { - // Build the request path. - $path = '/gists/comments/' . (int) $commentId; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to update a comment on a gist. - * - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($commentId, $body) - { - // Build the request path. - $path = '/gists/comments/' . (int) $commentId; - - // Build the request data. - $data = json_encode( - array( - 'body' => $body, - ) - ); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a specific comment on a gist. - * - * @param integer $commentId The comment id to get. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function get($commentId) - { - // Build the request path. - $path = '/gists/comments/' . (int) $commentId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get the list of comments on a gist. - * - * @param integer $gistId The gist number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getList($gistId, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/gists/' . (int) $gistId . '/comments'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/package/gitignore.php b/libraries/joomla/github/package/gitignore.php deleted file mode 100644 index 6dace175c5bbc..0000000000000 --- a/libraries/joomla/github/package/gitignore.php +++ /dev/null @@ -1,81 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a single template - * - * @param string $name The name of the template - * @param boolean $raw Raw output - * - * @throws DomainException - * @since 3.3 (CMS) - * - * @return mixed|string - */ - public function get($name, $raw = false) - { - // Build the request path. - $path = '/gitignore/templates/' . $name; - - $headers = array(); - - if ($raw) - { - $headers['Accept'] = 'application/vnd.github.raw+json'; - } - - $response = $this->client->get($this->fetchUrl($path), $headers); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - $message = (isset($error->message)) ? $error->message : 'Invalid response'; - - throw new DomainException($message, $response->code); - } - - return ($raw) ? $response->body : json_decode($response->body); - } -} diff --git a/libraries/joomla/github/package/issues.php b/libraries/joomla/github/package/issues.php deleted file mode 100644 index 3af5e30578c75..0000000000000 --- a/libraries/joomla/github/package/issues.php +++ /dev/null @@ -1,511 +0,0 @@ - $title, - 'assignee' => $assignee, - 'milestone' => $milestone, - 'labels' => $labels, - 'body' => $body, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param string $state The optional new state for the issue. [open, closed] - * @param string $title The title of the new issue. - * @param string $body The body text for the new issue. - * @param string $assignee The login for the GitHub user that this issue should be assigned to. - * @param integer $milestone The milestone to associate this issue with. - * @param array $labels The labels to associate with this issue. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($user, $repo, $issueId, $state = null, $title = null, $body = null, $assignee = null, $milestone = null, array $labels = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId; - - // Craete the data object. - $data = new stdClass; - - // If a title is set add it to the data object. - if (isset($title)) - { - $data->title = $title; - } - - // If a body is set add it to the data object. - if (isset($body)) - { - $data->body = $body; - } - - // If a state is set add it to the data object. - if (isset($state)) - { - $data->state = $state; - } - - // If an assignee is set add it to the data object. - if (isset($assignee)) - { - $data->assignee = $assignee; - } - - // If a milestone is set add it to the data object. - if (isset($milestone)) - { - $data->milestone = $milestone; - } - - // If labels are set add them to the data object. - if (isset($labels)) - { - // Ensure that we have a non-associative array. - if (isset($labels)) - { - $labels = array_values($labels); - } - - $data->labels = $labels; - } - - // Encode the request data. - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function get($user, $repo, $issueId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list an authenticated user's issues. - * - * @param string $filter The filter type: assigned, created, mentioned, subscribed. - * @param string $state The optional state to filter requests by. [open, closed] - * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. - * @param string $sort The sort order: created, updated, comments, default: created. - * @param string $direction The list direction: asc or desc, default: desc. - * @param JDate $since The date/time since when issues should be returned. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getList($filter = null, $state = null, $labels = null, $sort = null, - $direction = null, JDate $since = null, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/issues'; - - // TODO Implement the filtering options. - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list issues. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $milestone The milestone number, 'none', or *. - * @param string $state The optional state to filter requests by. [open, closed] - * @param string $assignee The assignee name, 'none', or *. - * @param string $mentioned The GitHub user name. - * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. - * @param string $sort The sort order: created, updated, comments, default: created. - * @param string $direction The list direction: asc or desc, default: desc. - * @param JDate $since The date/time since when issues should be returned. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getListByRepository($user, $repo, $milestone = null, $state = null, $assignee = null, $mentioned = null, $labels = null, - $sort = null, $direction = null, JDate $since = null, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues'; - - $uri = new JUri($this->fetchUrl($path, $page, $limit)); - - if ($milestone) - { - $uri->setVar('milestone', $milestone); - } - - if ($state) - { - $uri->setVar('state', $state); - } - - if ($assignee) - { - $uri->setVar('assignee', $assignee); - } - - if ($mentioned) - { - $uri->setVar('mentioned', $mentioned); - } - - if ($labels) - { - $uri->setVar('labels', $labels); - } - - if ($sort) - { - $uri->setVar('sort', $sort); - } - - if ($direction) - { - $uri->setVar('direction', $direction); - } - - if ($since) - { - $uri->setVar('since', $since->toISO8601()); - } - - // Send the request. - $response = $this->client->get((string) $uri); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /* - * Deprecated methods - */ - - /** - * Method to create a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param string $body The comment body text. - * - * @deprecated use issues->comments->create() - * - * @return object - * - * @since 11.3 - */ - public function createComment($user, $repo, $issueId, $body) - { - return $this->comments->create($user, $repo, $issueId, $body); - } - - /** - * Method to create a label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The label name. - * @param string $color The label color. - * - * @deprecated use issues->labels->create() - * - * @return object - * - * @since 12.3 - */ - public function createLabel($user, $repo, $name, $color) - { - return $this->labels->create($user, $repo, $name, $color); - } - - /** - * Method to delete a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to delete. - * - * @deprecated use issues->comments->delete() - * - * @return void - * - * @since 11.3 - */ - public function deleteComment($user, $repo, $commentId) - { - $this->comments->delete($user, $repo, $commentId); - } - - /** - * Method to delete a label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $label The label name. - * - * @deprecated use issues->labels->delete() - * - * @return object - * - * @since 12.3 - */ - public function deleteLabel($user, $repo, $label) - { - return $this->labels->delete($user, $repo, $label); - } - - /** - * Method to update a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @deprecated use issues->comments->edit() - * - * @return object - * - * @since 11.3 - */ - public function editComment($user, $repo, $commentId, $body) - { - return $this->comments->edit($user, $repo, $commentId, $body); - } - - /** - * Method to update a label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $label The label name. - * @param string $name The label name. - * @param string $color The label color. - * - * @deprecated use issues->labels->update() - * - * @return object - * - * @since 12.3 - */ - public function editLabel($user, $repo, $label, $name, $color) - { - return $this->labels->update($user, $repo, $label, $name, $color); - } - - /** - * Method to get a specific comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The comment id to get. - * - * @deprecated use issues->comments->get() - * - * @return object - * - * @since 11.3 - */ - public function getComment($user, $repo, $commentId) - { - return $this->comments->get($user, $repo, $commentId); - } - - /** - * Method to get the list of comments on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @deprecated use issues->comments->getList() - * - * @return array - * - * @since 11.3 - */ - public function getComments($user, $repo, $issueId, $page = 0, $limit = 0) - { - return $this->comments->getList($user, $repo, $issueId, $page, $limit); - } - - /** - * Method to get a specific label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The label name to get. - * - * @deprecated use issues->labels->get() - * - * @return object - * - * @since 12.3 - */ - public function getLabel($user, $repo, $name) - { - return $this->labels->get($user, $repo, $name); - } - - /** - * Method to get the list of labels on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * - * @deprecated use issues->labels->getList() - * - * @return array - * - * @since 12.3 - */ - public function getLabels($user, $repo) - { - return $this->labels->getList($user, $repo); - } -} diff --git a/libraries/joomla/github/package/issues/assignees.php b/libraries/joomla/github/package/issues/assignees.php deleted file mode 100644 index 01597bb0cd6a0..0000000000000 --- a/libraries/joomla/github/package/issues/assignees.php +++ /dev/null @@ -1,83 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Check assignee. - * - * You may check to see if a particular user is an assignee for a repository. - * If the given assignee login belongs to an assignee for the repository, a 204 header - * with no content is returned. - * Otherwise a 404 status code is returned. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $assignee The assinees login name. - * - * @throws DomainException|Exception - * @return boolean - */ - public function check($owner, $repo, $assignee) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/assignees/' . $assignee; - - try - { - $response = $this->client->get($this->fetchUrl($path)); - - if (204 == $response->code) - { - return true; - } - - throw new DomainException('Invalid response: ' . $response->code); - } - catch (DomainException $e) - { - if (isset($response->code) && 404 == $response->code) - { - return false; - } - - throw $e; - } - } -} diff --git a/libraries/joomla/github/package/issues/comments.php b/libraries/joomla/github/package/issues/comments.php deleted file mode 100644 index 69c6935bca84e..0000000000000 --- a/libraries/joomla/github/package/issues/comments.php +++ /dev/null @@ -1,208 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } - - /** - * Method to get the list of comments in a repository. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sort The sort field - created or updated. - * @param string $direction The sort order- asc or desc. Ignored without sort parameter. - * @param JDate $since A timestamp in ISO 8601 format. - * - * @throws UnexpectedValueException - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getRepositoryList($owner, $repo, $sort = 'created', $direction = 'asc', JDate $since = null) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/comments'; - - if (false == in_array($sort, array('created', 'updated'))) - { - throw new UnexpectedValueException( - sprintf( - '%1$s - sort field must be "created" or "updated"', __METHOD__ - ) - ); - } - - if (false == in_array($direction, array('asc', 'desc'))) - { - throw new UnexpectedValueException( - sprintf( - '%1$s - direction field must be "asc" or "desc"', __METHOD__ - ) - ); - } - - $path .= '?sort=' . $sort; - $path .= '&direction=' . $direction; - - if ($since) - { - $path .= '&since=' . $since->toISO8601(); - } - - // Send the request. - return $this->processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Method to get a single comment. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The comment id. - * - * @return mixed - */ - public function get($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/comments/' . (int) $id; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to update a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @since 11.3 - * @throws DomainException - * - * @return object - */ - public function edit($user, $repo, $commentId, $body) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues/comments/' . (int) $commentId; - - // Build the request data. - $data = json_encode( - array( - 'body' => $body, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to create a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param string $body The comment body text. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function create($user, $repo, $issueId, $body) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId . '/comments'; - - // Build the request data. - $data = json_encode( - array( - 'body' => $body, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Method to delete a comment on an issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to delete. - * - * @throws DomainException - * @since 11.3 - * - * @return boolean - */ - public function delete($user, $repo, $commentId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/issues/comments/' . (int) $commentId; - - // Send the request. - $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - - return true; - } -} diff --git a/libraries/joomla/github/package/issues/events.php b/libraries/joomla/github/package/issues/events.php deleted file mode 100644 index c5de743c20e6a..0000000000000 --- a/libraries/joomla/github/package/issues/events.php +++ /dev/null @@ -1,89 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } - - /** - * List events for a repository. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @return object - */ - public function getListRepository($owner, $repo, $issueId, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . (int) $issueId . '/comments'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } - - /** - * Get a single event. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The event number. - * - * @return object - */ - public function get($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/events/' . (int) $id; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/issues/labels.php b/libraries/joomla/github/package/issues/labels.php deleted file mode 100644 index 24e7201522b94..0000000000000 --- a/libraries/joomla/github/package/issues/labels.php +++ /dev/null @@ -1,301 +0,0 @@ -processResponse( - $response = $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to get a specific label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The label name to get. - * - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function get($user, $repo, $name) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/labels/' . $name; - - // Send the request. - return $this->processResponse( - $response = $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to create a label on a repo. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The label name. - * @param string $color The label color. - * - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function create($owner, $repo, $name, $color) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/labels'; - - // Build the request data. - $data = json_encode( - array( - 'name' => $name, - 'color' => $color, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a label on a repo. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $label The label name. - * @param string $name The new label name. - * @param string $color The new label color. - * - * @throws DomainException - * @since 12.3 - * - * @return object - */ - public function update($user, $repo, $label, $name, $color) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/labels/' . $label; - - // Build the request data. - $data = json_encode( - array( - 'name' => $name, - 'color' => $color, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to delete a label on a repo. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The label name. - * - * @throws DomainException - * @return object - * - * @since 12.3 - */ - public function delete($owner, $repo, $name) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/labels/' . $name; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * List labels on an issue. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $number The issue number. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListByIssue($owner, $repo, $number) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Add labels to an issue. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $number The issue number. - * @param array $labels An array of labels to add. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function add($owner, $repo, $number, array $labels) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels'; - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($labels)) - ); - } - - /** - * Remove a label from an issue. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $number The issue number. - * @param string $name The name of the label to remove. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function removeFromIssue($owner, $repo, $number, $name) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels/' . $name; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)) - ); - } - - /** - * Replace all labels for an issue. - * - * Sending an empty array ([]) will remove all Labels from the Issue. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $number The issue number. - * @param array $labels New labels - * - * @since 3.3 (CMS) - * - * @return object - */ - public function replace($owner, $repo, $number, array $labels) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels'; - - // Send the request. - return $this->processResponse( - $this->client->put($this->fetchUrl($path), json_encode($labels)) - ); - } - - /** - .* Remove all labels from an issue. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $number The issue number. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function removeAllFromIssue($owner, $repo, $number) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels'; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Get labels for every issue in a milestone. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $number The issue number. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListByMilestone($owner, $repo, $number) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/milestones/' . $number . '/labels'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/issues/milestones.php b/libraries/joomla/github/package/issues/milestones.php deleted file mode 100644 index 9121a5f672d3e..0000000000000 --- a/libraries/joomla/github/package/issues/milestones.php +++ /dev/null @@ -1,236 +0,0 @@ -client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a specific milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The milestone id to get. - * - * @throws DomainException - * @return object - * - * @since 12.3 - */ - public function get($user, $repo, $milestoneId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to create a milestone for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $title The title of the milestone. - * @param string $state Can be open (default) or closed. - * @param string $description Optional description for milestone. - * @param string $due_on Optional ISO 8601 time. - * - * @throws DomainException - * @return object - * - * @since 12.3 - */ - public function create($user, $repo, $title, $state = null, $description = null, $due_on = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones'; - - // Build the request data. - $data = array( - 'title' => $title, - ); - - if (!is_null($state)) - { - $data['state'] = $state; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - if (!is_null($due_on)) - { - $data['due_on'] = $due_on; - } - - $data = json_encode($data); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The id of the comment to update. - * @param integer $title Optional title of the milestone. - * @param string $state Can be open (default) or closed. - * @param string $description Optional description for milestone. - * @param string $due_on Optional ISO 8601 time. - * - * @throws DomainException - * @return object - * - * @since 12.3 - */ - public function edit($user, $repo, $milestoneId, $title = null, $state = null, $description = null, $due_on = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Build the request data. - $data = array(); - - if (!is_null($title)) - { - $data['title'] = $title; - } - - if (!is_null($state)) - { - $data['state'] = $state; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - if (!is_null($due_on)) - { - $data['due_on'] = $due_on; - } - - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to delete a milestone. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $milestoneId The id of the milestone to delete. - * - * @throws DomainException - * @return void - * - * @since 12.3 - */ - public function delete($user, $repo, $milestoneId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId; - - // Send the request. - $response = $this->client->delete($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 204) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } -} diff --git a/libraries/joomla/github/package/markdown.php b/libraries/joomla/github/package/markdown.php deleted file mode 100644 index 520d185605bf8..0000000000000 --- a/libraries/joomla/github/package/markdown.php +++ /dev/null @@ -1,73 +0,0 @@ - $text, - 'mode' => $mode, - 'context' => $context, - ) - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - $message = (isset($error->message)) ? $error->message : 'Error: ' . $response->code; - throw new DomainException($message, $response->code); - } - - return $response->body; - } -} diff --git a/libraries/joomla/github/package/orgs.php b/libraries/joomla/github/package/orgs.php deleted file mode 100644 index 1526a08a73f95..0000000000000 --- a/libraries/joomla/github/package/orgs.php +++ /dev/null @@ -1,111 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get an Organization. - * - * @param string $org The organization name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function get($org) - { - // Build the request path. - $path = '/orgs/' . $org; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Edit an Organization. - * - * @param string $org The organization name. - * @param string $billingEmail Billing email address. This address is not publicized. - * @param string $company The company name. - * @param string $email The email address. - * @param string $location The location name. - * @param string $name The name. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function edit($org, $billingEmail = '', $company = '', $email = '', $location = '', $name = '') - { - // Build the request path. - $path = '/orgs/' . $org; - - $args = array('billing_email', 'company', 'email', 'location', 'name'); - - $data = array(); - - $fArgs = func_get_args(); - - foreach ($args as $i => $arg) - { - if (array_key_exists($i + 1, $fArgs) && $fArgs[$i + 1]) - { - $data[$arg] = $fArgs[$i + 1]; - } - } - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } -} diff --git a/libraries/joomla/github/package/orgs/members.php b/libraries/joomla/github/package/orgs/members.php deleted file mode 100644 index aee3b8f2f34c2..0000000000000 --- a/libraries/joomla/github/package/orgs/members.php +++ /dev/null @@ -1,235 +0,0 @@ -client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case 302 : - // Requester is not an organization member. - return false; - break; - - case 200 : - return json_decode($response->body); - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Check membership. - * - * Check if a user is, publicly or privately, a member of the organization. - * - * @param string $org The name of the organization. - * @param string $user The name of the user. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return boolean - */ - public function check($org, $user) - { - // Build the request path. - $path = '/orgs/' . $org . '/members/' . $user; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case 204 : - // Requester is an organization member and user is a member. - return true; - break; - - case 404 : - // Requester is an organization member and user is not a member. - // Requester is not an organization member and is inquiring about themselves. - return false; - break; - - case 302 : - // Requester is not an organization member. - return false; - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Add a member. - * - * To add someone as a member to an org, you must add them to a team. - */ - - /** - * Remove a member. - * - * Removing a user from this list will remove them from all teams and they will no longer have - * any access to the organization’s repositories. - * - * @param string $org The name of the organization. - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function remove($org, $user) - { - // Build the request path. - $path = '/orgs/' . $org . '/members/' . $user; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Public members list. - * - * Members of an organization can choose to have their membership publicized or not. - * - * @param string $org The name of the organization. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListPublic($org) - { - // Build the request path. - $path = '/orgs/' . $org . '/public_members'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Check public membership. - * - * @param string $org The name of the organization. - * @param string $user The name of the user. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function checkPublic($org, $user) - { - // Build the request path. - $path = '/orgs/' . $org . '/public_members/' . $user; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case 204 : - // Response if user is a public member. - return true; - break; - - case 404 : - // Response if user is not a public member. - return false; - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Publicize a user’s membership. - * - * @param string $org The name of the organization. - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function publicize($org, $user) - { - // Build the request path. - $path = '/orgs/' . $org . '/public_members/' . $user; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Conceal a user’s membership. - * - * @param string $org The name of the organization. - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function conceal($org, $user) - { - // Build the request path. - $path = '/orgs/' . $org . '/public_members/' . $user; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/orgs/teams.php b/libraries/joomla/github/package/orgs/teams.php deleted file mode 100644 index 2962181097cf3..0000000000000 --- a/libraries/joomla/github/package/orgs/teams.php +++ /dev/null @@ -1,392 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get team. - * - * @param integer $id The team id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function get($id) - { - // Build the request path. - $path = '/teams/' . (int) $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create team. - * - * In order to create a team, the authenticated user must be an owner of the organization. - * - * @param string $org The name of the organization. - * @param string $name The name of the team. - * @param array $repoNames Repository names. - * @param string $permission The permission. - * pull - team members can pull, but not push to or administer these repositories. Default - * push - team members can pull and push, but not administer these repositories. - * admin - team members can pull, push and administer these repositories. - * - * @throws UnexpectedValueException - * - * @since 3.3 (CMS) - * - * @return object - */ - public function create($org, $name, array $repoNames = array(), $permission = '') - { - // Build the request path. - $path = '/orgs/' . $org . '/teams'; - - $data = array( - 'name' => $name, - ); - - if ($repoNames) - { - $data['repo_names'] = $repoNames; - } - - if ($permission) - { - if (false == in_array($permission, array('pull', 'push', 'admin'))) - { - throw new UnexpectedValueException('Permissions must be either "pull", "push", or "admin".'); - } - - $data['permission'] = $permission; - } - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Edit team. - * - * In order to edit a team, the authenticated user must be an owner of the org that the team is associated with. - * - * @param integer $id The team id. - * @param string $name The name of the team. - * @param string $permission The permission. - * pull - team members can pull, but not push to or administer these repositories. Default - * push - team members can pull and push, but not administer these repositories. - * admin - team members can pull, push and administer these repositories. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function edit($id, $name, $permission = '') - { - // Build the request path. - $path = '/teams/' . (int) $id; - - $data = array( - 'name' => $name, - ); - - if ($permission) - { - if (false == in_array($permission, array('pull', 'push', 'admin'))) - { - throw new UnexpectedValueException('Permissions must be either "pull", "push", or "admin".'); - } - - $data['permission'] = $permission; - } - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Delete team. - * - * In order to delete a team, the authenticated user must be an owner of the org that the team is associated with. - * - * @param integer $id The team id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function delete($id) - { - // Build the request path. - $path = '/teams/' . $id; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * List team members. - * - * In order to list members in a team, the authenticated user must be a member of the team. - * - * @param integer $id The team id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListMembers($id) - { - // Build the request path. - $path = '/teams/' . $id . '/members'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get team member. - * - * In order to get if a user is a member of a team, the authenticated user must be a member of the team. - * - * @param integer $id The team id. - * @param string $user The name of the user. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function isMember($id, $user) - { - // Build the request path. - $path = '/teams/' . $id . '/members/' . $user; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case 204 : - // Response if user is a member - return true; - break; - - case 404 : - // Response if user is not a member - return false; - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Add team member. - * - * In order to add a user to a team, the authenticated user must have ‘admin’ permissions - * to the team or be an owner of the org that the team is associated with. - * - * @param integer $id The team id. - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function addMember($id, $user) - { - // Build the request path. - $path = '/teams/' . $id . '/members/' . $user; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Remove team member. - * - * In order to remove a user from a team, the authenticated user must have ‘admin’ permissions - * to the team or be an owner of the org that the team is associated with. - * NOTE: This does not delete the user, it just remove them from the team. - * - * @param integer $id The team id. - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function removeMember($id, $user) - { - // Build the request path. - $path = '/teams/' . $id . '/members/' . $user; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * List team repos. - * - * @param integer $id The team id. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListRepos($id) - { - // Build the request path. - $path = '/teams/' . $id . '/repos'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Check if the repo is managed by this team. - * - * @param integer $id The team id. - * @param string $repo The name of the GitHub repository. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function checkRepo($id, $repo) - { - // Build the request path. - $path = '/teams/' . $id . '/repos/' . $repo; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case 204 : - // Response if repo is managed by this team. - return true; - break; - - case 404 : - // Response if repo is not managed by this team. - return false; - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Add team repo. - * - * In order to add a repo to a team, the authenticated user must be an owner of the - * org that the team is associated with. Also, the repo must be owned by the organization, - * or a direct form of a repo owned by the organization. - * - * If you attempt to add a repo to a team that is not owned by the organization, you get: - * Status: 422 Unprocessable Entity - * - * @param integer $id The team id. - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function addRepo($id, $owner, $repo) - { - // Build the request path. - $path = '/teams/' . $id . '/repos/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Remove team repo. - * - * In order to remove a repo from a team, the authenticated user must be an owner - * of the org that the team is associated with. NOTE: This does not delete the - * repo, it just removes it from the team. - * - * @param integer $id The team id. - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function removeRepo($id, $owner, $repo) - { - // Build the request path. - $path = '/teams/' . (int) $id . '/repos/' . $owner . '/' . $repo; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/pulls.php b/libraries/joomla/github/package/pulls.php deleted file mode 100644 index 6eb65f053d6c3..0000000000000 --- a/libraries/joomla/github/package/pulls.php +++ /dev/null @@ -1,512 +0,0 @@ - $title, - 'base' => $base, - 'head' => $head, - 'body' => $body, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to create a pull request from an existing issue. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number for which to attach the new pull request. - * @param string $base The branch (or git ref) you want your changes pulled into. This - * should be an existing branch on the current repository. You cannot - * submit a pull request to one repo that requests a merge to a base - * of another repo. - * @param string $head The branch (or git ref) where your changes are implemented. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function createFromIssue($user, $repo, $issueId, $base, $head) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls'; - - // Build the request data. - $data = json_encode( - array( - 'issue' => (int) $issueId, - 'base' => $base, - 'head' => $head, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param string $title The optional new title for the pull request. - * @param string $body The optional new body text for the pull request. - * @param string $state The optional new state for the pull request. [open, closed] - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($user, $repo, $pullId, $title = null, $body = null, $state = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId; - - // Craete the data object. - $data = new stdClass; - - // If a title is set add it to the data object. - if (isset($title)) - { - $data->title = $title; - } - - // If a body is set add it to the data object. - if (isset($body)) - { - $data->body = $body; - } - - // If a state is set add it to the data object. - if (isset($state)) - { - $data->state = $state; - } - - // Encode the request data. - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function get($user, $repo, $pullId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of commits for a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getCommits($user, $repo, $pullId, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/commits'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a list of files for a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getFiles($user, $repo, $pullId, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/files'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list pull requests. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $state The optional state to filter requests by. [open, closed] - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getList($user, $repo, $state = 'open', $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls'; - - // If a state exists append it as an option. - if ($state != 'open') - { - $path .= '?state=' . $state; - } - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to check if a pull request has been merged. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. The pull request number. - * - * @throws DomainException - * @since 11.3 - * - * @return boolean True if the pull request has been merged. - */ - public function isMerged($user, $repo, $pullId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/merge'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code == 204) - { - return true; - } - elseif ($response->code == 404) - { - return false; - } - else - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - } - - /** - * Method to merge a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param string $message The message that will be used for the merge commit. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function merge($user, $repo, $pullId, $message = '') - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/merge'; - - // Build the request data. - $data = json_encode( - array( - 'commit_message' => $message, - ) - ); - - // Send the request. - $response = $this->client->put($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /* - * Legacy methods - */ - - /** - * Method to create a comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param string $body The comment body text. - * @param string $commitId The SHA1 hash of the commit to comment on. - * @param string $filePath The Relative path of the file to comment on. - * @param string $position The line index in the diff to comment on. - * - * @deprecated use pulls->comments->create() - * - * @return object - * - * @since 11.3 - */ - public function createComment($user, $repo, $pullId, $body, $commitId, $filePath, $position) - { - return $this->comments->create($user, $repo, $pullId, $body, $commitId, $filePath, $position); - } - - /** - * Method to create a comment in reply to another comment. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param string $body The comment body text. - * @param integer $inReplyTo The id of the comment to reply to. - * - * @deprecated use pulls->comments->createReply() - * - * @return object - * - * @since 11.3 - */ - public function createCommentReply($user, $repo, $pullId, $body, $inReplyTo) - { - return $this->comments->createReply($user, $repo, $pullId, $body, $inReplyTo); - } - - /** - * Method to delete a comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to delete. - * - * @deprecated use pulls->comments->delete() - * - * @return void - * - * @since 11.3 - */ - public function deleteComment($user, $repo, $commentId) - { - $this->comments->delete($user, $repo, $commentId); - } - - /** - * Method to update a comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @deprecated use pulls->comments->edit() - * - * @return object - * - * @since 11.3 - */ - public function editComment($user, $repo, $commentId, $body) - { - return $this->comments->edit($user, $repo, $commentId, $body); - } - - /** - * Method to get a specific comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The comment id to get. - * - * @deprecated use pulls->comments->get() - * - * @return object - * - * @since 11.3 - */ - public function getComment($user, $repo, $commentId) - { - return $this->comments->get($user, $repo, $commentId); - } - - /** - * Method to get the list of comments on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @deprecated use pulls->comments->getList() - * - * @return array - * - * @since 11.3 - */ - public function getComments($user, $repo, $pullId, $page = 0, $limit = 0) - { - return $this->comments->getList($user, $repo, $pullId, $page, $limit); - } -} diff --git a/libraries/joomla/github/package/pulls/comments.php b/libraries/joomla/github/package/pulls/comments.php deleted file mode 100644 index 3f4e209ae7906..0000000000000 --- a/libraries/joomla/github/package/pulls/comments.php +++ /dev/null @@ -1,196 +0,0 @@ - $body, - 'commit_id' => $commitId, - 'path' => $filePath, - 'position' => $position, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Method to create a comment in reply to another comment. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param string $body The comment body text. - * @param integer $inReplyTo The id of the comment to reply to. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function createReply($user, $repo, $pullId, $body, $inReplyTo) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/comments'; - - // Build the request data. - $data = json_encode( - array( - 'body' => $body, - 'in_reply_to' => (int) $inReplyTo, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Method to delete a comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to delete. - * - * @throws DomainException - * @since 11.3 - * - * @return void - */ - public function delete($user, $repo, $commentId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/comments/' . (int) $commentId; - - // Send the request. - $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Method to update a comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The id of the comment to update. - * @param string $body The new body text for the comment. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function edit($user, $repo, $commentId, $body) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/comments/' . (int) $commentId; - - // Build the request data. - $data = json_encode( - array( - 'body' => $body, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to get a specific comment on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $commentId The comment id to get. - * - * @throws DomainException - * @since 11.3 - * - * @return object - */ - public function get($user, $repo, $commentId) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/comments/' . (int) $commentId; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to get the list of comments on a pull request. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $pullId The pull request number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * - * @throws DomainException - * @since 11.3 - * - * @return array - */ - public function getList($user, $repo, $pullId, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/comments'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } -} diff --git a/libraries/joomla/github/package/repositories.php b/libraries/joomla/github/package/repositories.php deleted file mode 100644 index 1d436ebb53b2a..0000000000000 --- a/libraries/joomla/github/package/repositories.php +++ /dev/null @@ -1,430 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List user repositories. - * - * List public repositories for the specified user. - * - * @param string $user The user name. - * @param string $type Sort type. all, owner, member. Default: all. - * @param string $sort Sort field. created, updated, pushed, full_name, default: full_name. - * @param string $direction Sort direction. asc or desc, default: when using full_name: asc, otherwise desc. - * - * @throws RuntimeException - * - * @return object - */ - public function getListUser($user, $type = 'all', $sort = 'full_name', $direction = '') - { - if (false == in_array($type, array('all', 'owner', 'member'))) - { - throw new RuntimeException('Invalid type'); - } - - if (false == in_array($sort, array('created', 'updated', 'pushed', 'full_name'))) - { - throw new RuntimeException('Invalid sort field'); - } - - // Sort direction default: when using full_name: asc, otherwise desc. - $direction = ($direction) ? : (('full_name' == $sort) ? 'asc' : 'desc'); - - if (false == in_array($direction, array('asc', 'desc'))) - { - throw new RuntimeException('Invalid sort order'); - } - - // Build the request path. - $path = '/users/' . $user . '/repos' - . '?type=' . $type - . '&sort=' . $sort - . '&direction=' . $direction; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List organization repositories. - * - * List repositories for the specified org. - * - * @param string $org The name of the organization. - * @param string $type Sort type. all, public, private, forks, sources, member. Default: all. - * - * @throws RuntimeException - * - * @return object - */ - public function getListOrg($org, $type = 'all') - { - if (false == in_array($type, array('all', 'public', 'private', 'forks', 'sources', 'member'))) - { - throw new RuntimeException('Invalid type'); - } - - // Build the request path. - $path = '/orgs/' . $org . '/repos' - . '?type=' . $type; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List all repositories. - * - * This provides a dump of every repository, in the order that they were created. - * - * @param integer $id The integer ID of the last Repository that you’ve seen. - * - * @throws RuntimeException - * - * @return object - */ - public function getList($id = 0) - { - // Build the request path. - $path = '/repositories'; - $path .= ($id) ? '?since=' . (int) $id : ''; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a new repository for the authenticated user or an organization. - * OAuth users must supply repo scope. - * - * @param string $name The repository name. - * @param string $org The organization name (if needed). - * @param string $description The repository description. - * @param string $homepage The repository homepage. - * @param boolean $private Set true to create a private repository, false to create a public one. - * Creating private repositories requires a paid GitHub account. - * @param boolean $has_issues Set true to enable issues for this repository, false to disable them. - * @param boolean $has_wiki Set true to enable the wiki for this repository, false to disable it. - * @param boolean $has_downloads Set true to enable downloads for this repository, false to disable them. - * @param integer $team_id The id of the team that will be granted access to this repository. - * This is only valid when creating a repo in an organization. - * @param boolean $auto_init true to create an initial commit with empty README. - * @param string $gitignore_template Desired language or platform .gitignore template to apply. - * Use the name of the template without the extension. For example, - * “Haskell†Ignored if auto_init parameter is not provided. - * - * @return object - */ - public function create($name, $org = '', $description = '', $homepage = '', $private = false, $has_issues = false, - $has_wiki = false, $has_downloads = false, $team_id = 0, $auto_init = false, $gitignore_template = '') - { - $path = ($org) - // Create a repository for an organization - ? '/orgs/' . $org . '/repos' - // Create a repository for a user - : '/user/repos'; - - $data = array( - 'name' => $name, - 'description' => $description, - 'homepage' => $homepage, - 'private' => $private, - 'has_issues' => $has_issues, - 'has_wiki' => $has_wiki, - 'has_downloads' => $has_downloads, - 'team_id' => $team_id, - 'auto_init' => $auto_init, - 'gitignore_template' => $gitignore_template, - ); - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } - - /** - * Get a repository. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function get($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Edit a repository. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param string $name The repository name. - * @param string $description The repository description. - * @param string $homepage The repository homepage. - * @param boolean $private Set true to create a private repository, false to create a public one. - * Creating private repositories requires a paid GitHub account. - * @param boolean $has_issues Set true to enable issues for this repository, false to disable them. - * @param boolean $has_wiki Set true to enable the wiki for this repository, false to disable it. - * @param boolean $has_downloads Set true to enable downloads for this repository, false to disable them. - * @param string $default_branch Update the default branch for this repository - * - * @return object - */ - public function edit($owner, $repo, $name, $description = '', $homepage = '', $private = false, $has_issues = false, - $has_wiki = false, $has_downloads = false, $default_branch = '') - { - $path = '/repos/' . $owner . '/' . $repo; - - $data = array( - 'name' => $name, - 'description' => $description, - 'homepage' => $homepage, - 'private' => $private, - 'has_issues' => $has_issues, - 'has_wiki' => $has_wiki, - 'has_downloads' => $has_downloads, - 'default_branch' => $default_branch, - ); - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * List contributors. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $anon Set to 1 or true to include anonymous contributors in results. - * - * @return object - */ - public function getListContributors($owner, $repo, $anon = false) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/contributors'; - - $path .= ($anon) ? '?anon=true' : ''; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List languages. - * - * List languages for the specified repository. The value on the right of a language is the number of bytes of code - * written in that language. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function getListLanguages($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/languages'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List Teams - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function getListTeams($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/teams'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List Tags. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function getListTags($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/tags'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List Branches. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function getListBranches($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/branches'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a Branch. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param string $branch Branch name. - * - * @return object - */ - public function getBranch($owner, $repo, $branch) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/branches/' . $branch; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Delete a Repository. - * - * Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required. - * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * - * @return object - */ - public function delete($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/repositories/collaborators.php b/libraries/joomla/github/package/repositories/collaborators.php deleted file mode 100644 index 3bdff257693e2..0000000000000 --- a/libraries/joomla/github/package/repositories/collaborators.php +++ /dev/null @@ -1,124 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Test if a user is a collaborator. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $user The name of the GitHub user. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return boolean - */ - public function get($owner, $repo, $user) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/collaborators/' . $user; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case '204'; - - return true; - break; - case '404'; - - return false; - break; - default; - throw new UnexpectedValueException('Unexpected code: ' . $response->code); - break; - } - } - - /** - * Add collaborator. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $user The name of the GitHub user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function add($owner, $repo, $user) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/collaborators/' . $user; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Remove collaborator. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $user The name of the GitHub user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function remove($owner, $repo, $user) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/collaborators/' . $user; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/repositories/comments.php b/libraries/joomla/github/package/repositories/comments.php deleted file mode 100644 index 322c3e30a00d2..0000000000000 --- a/libraries/joomla/github/package/repositories/comments.php +++ /dev/null @@ -1,178 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } - - /** - * Method to get a list of comments for a single commit for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to retrieve. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @return array - * - * @since 12.1 - */ - public function getList($user, $repo, $sha, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path, $page, $limit)) - ); - } - - /** - * Method to get a single comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the comment to retrieve - * - * @return array - * - * @since 12.1 - */ - public function get($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . (int) $id; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to edit a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $id The ID of the comment to edit. - * @param string $comment The text of the comment. - * - * @return object - * - * @since 12.1 - */ - public function edit($user, $repo, $id, $comment) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; - - $data = json_encode( - array( - 'body' => $comment, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to delete a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $id The ID of the comment to edit. - * - * @return object - * - * @since 12.1 - */ - public function delete($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Method to create a comment on a commit. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to comment on. - * @param string $comment The text of the comment. - * @param integer $line The line number of the commit to comment on. - * @param string $filepath A relative path to the file to comment on within the commit. - * @param integer $position Line index in the diff to comment on. - * - * @return object - * - * @since 12.1 - */ - public function create($user, $repo, $sha, $comment, $line, $filepath, $position) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; - - $data = json_encode( - array( - 'body' => $comment, - 'path' => $filepath, - 'position' => (int) $position, - 'line' => (int) $line, - ) - ); - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } -} diff --git a/libraries/joomla/github/package/repositories/commits.php b/libraries/joomla/github/package/repositories/commits.php deleted file mode 100644 index 65f5b5408e1b5..0000000000000 --- a/libraries/joomla/github/package/repositories/commits.php +++ /dev/null @@ -1,121 +0,0 @@ -toISO8601() : ''; - $rPath .= ($until) ? '&until=' . $until->toISO8601() : ''; - - // Send the request. - $response = $this->client->get($this->fetchUrl($rPath)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a single commit for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha The SHA of the commit to retrieve. - * - * @throws DomainException - * @since 12.1 - * - * @return array - */ - public function get($user, $repo, $sha) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a diff for two commits. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $base The base of the diff, either a commit SHA or branch. - * @param string $head The head of the diff, either a commit SHA or branch. - * - * @return array - * - * @since 12.1 - */ - public function compare($user, $repo, $base, $head) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/compare/' . $base . '...' . $head; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/repositories/contents.php b/libraries/joomla/github/package/repositories/contents.php deleted file mode 100644 index d3c419fc924c7..0000000000000 --- a/libraries/joomla/github/package/repositories/contents.php +++ /dev/null @@ -1,201 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get contents - * - * This method returns the contents of any file or directory in a repository. - * - * GET /repos/:owner/:repo/contents/:path - * - * Parameters - * - * path - * Optional string - The content path. - * ref - * Optional string - The String name of the Commit/Branch/Tag. Defaults to master. - * - * Response - * - * Status: 200 OK - * X-RateLimit-Limit: 5000 - * X-RateLimit-Remaining: 4999 - * - * { - * "type": "file", - * "encoding": "base64", - * "_links": { - * "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", - * "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", - * "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" - * }, - * "size": 5362, - * "name": "README.md", - * "path": "README.md", - * "content": "encoded content ...", - * "sha": "3d21ec53a331a6f037a91c368710b99387d012c1" - * } - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $path The content path. - * @param string $ref The String name of the Commit/Branch/Tag. Defaults to master. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function get($owner, $repo, $path, $ref = '') - { - // Build the request path. - $rPath = '/repos/' . $owner . '/' . $repo . '/contents/' . $path; - - if ($ref) - { - $rPath .= '?ref=' . $ref; - } - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($rPath)) - ); - } - - /** - * Get archive link - * - * This method will return a 302 to a URL to download a tarball or zipball archive for a repository. - * Please make sure your HTTP framework is configured to follow redirects or you will need to use the Location header to make a second GET request. - * - * Note: For private repositories, these links are temporary and expire quickly. - * - * GET /repos/:owner/:repo/:archive_format/:ref - * - * Parameters - * - * archive_format - * Either tarball or zipball - * ref - * Optional string - valid Git reference, defaults to master - * - * Response - * - * Status: 302 Found - * Location: http://github.com/me/myprivate/tarball/master?SSO=thistokenexpires - * X-RateLimit-Limit: 5000 - * X-RateLimit-Remaining: 4999 - * - * To follow redirects with curl, use the -L switch: - * - * curl -L https://api.github.com/repos/octokit/octokit.rb/tarball > octokit.tar.gz - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $archive_format Either tarball or zipball. - * @param string $ref The String name of the Commit/Branch/Tag. Defaults to master. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return object - */ - public function getArchiveLink($owner, $repo, $archive_format = 'zipball', $ref = '') - { - if (false == in_array($archive_format, array('tarball', 'zipball'))) - { - throw new UnexpectedValueException('Archive format must be either "tarball" or "zipball".'); - } - - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/' . $archive_format; - - if ($ref) - { - $path .= '?ref=' . $ref; - } - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)), - 302 - ); - } -} diff --git a/libraries/joomla/github/package/repositories/downloads.php b/libraries/joomla/github/package/repositories/downloads.php deleted file mode 100644 index 424bb4fd556d6..0000000000000 --- a/libraries/joomla/github/package/repositories/downloads.php +++ /dev/null @@ -1,201 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a single download. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The id of the download. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function get($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/downloads/' . $id; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a new download (Part 1: Create the resource). - * - * Creating a new download is a two step process. You must first create a new download resource. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $name The name. - * @param string $size Size of file in bytes. - * @param string $description The description. - * @param string $content_type The content type. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function create($owner, $repo, $name, $size, $description = '', $content_type = '') - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/downloads'; - - $data = array( - 'name' => $name, - 'size' => $size, - ); - - if ($description) - { - $data['description'] = $description; - } - - if ($content_type) - { - $data['content_type'] = $content_type; - } - - // Send the request. - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Create a new download (Part 2: Upload file to s3). - * - * Now that you have created the download resource, you can use the information - * in the response to upload your file to s3. This can be done with a POST to - * the s3_url you got in the create response. Here is a brief example using curl: - * - * curl \ - * -F "key=downloads/octocat/Hello-World/new_file.jpg" \ - * -F "acl=public-read" \ - * -F "success_action_status=201" \ - * -F "Filename=new_file.jpg" \ - * -F "AWSAccessKeyId=1ABCDEF..." \ - * -F "Policy=ewogIC..." \ - * -F "Signature=mwnF..." \ - * -F "Content-Type=image/jpeg" \ - * -F "file=@new_file.jpg" \ - * https://github.s3.amazonaws.com/ - * - * NOTES - * The order in which you pass these fields matters! Follow the order shown above exactly. - * All parameters shown are required and if you excluded or modify them your upload will - * fail because the values are hashed and signed by the policy. - * - * More information about using the REST API to interact with s3 can be found here: - * http://docs.amazonwebservices.com/AmazonS3/latest/API/ - * - * @param string $key Value of path field in the response. - * @param string $acl Value of acl field in the response. - * @param string $success_action_status 201, or whatever you want to get back. - * @param string $filename Value of name field in the response. - * @param string $awsAccessKeyId Value of accesskeyid field in the response. - * @param string $policy Value of policy field in the response. - * @param string $signature Value of signature field in the response. - * @param string $content_type Value of mime_type field in the response. - * @param string $file Local file. Example assumes the file existing in the directory - * where you are running the curl command. Yes, the @ matters. - * - * @since 3.3 (CMS) - * - * @return boolean - */ - public function upload($key, $acl, $success_action_status, $filename, $awsAccessKeyId, $policy, $signature, $content_type, $file) - { - // Build the request path. - $url = 'https://github.s3.amazonaws.com/'; - - $data = array( - 'key' => $key, - 'acl' => $acl, - 'success_action_status' => (int) $success_action_status, - 'Filename' => $filename, - 'AWSAccessKeyId' => $awsAccessKeyId, - 'Policy' => $policy, - 'Signature' => $signature, - 'Content-Type' => $content_type, - 'file' => $file, - ); - - // Send the request. - $response = $this->client->post($url, $data); - - // @todo Process the response.. - - return (201 == $response->code) ? true : false; - } - - /** - * Delete a download. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The id of the download. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function delete($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/downloads/' . (int) $id; - - // Send the request. - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/repositories/forks.php b/libraries/joomla/github/package/repositories/forks.php deleted file mode 100644 index dfa03ada7c5fc..0000000000000 --- a/libraries/joomla/github/package/repositories/forks.php +++ /dev/null @@ -1,95 +0,0 @@ - 0) - { - $data = json_encode( - array('org' => $org) - ); - } - else - { - $data = json_encode(array()); - } - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 202) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list forks for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @return array - * - * @since 11.4 - * @throws DomainException - */ - public function getList($user, $repo, $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/forks'; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/package/repositories/hooks.php b/libraries/joomla/github/package/repositories/hooks.php deleted file mode 100644 index 5ad52a26ce435..0000000000000 --- a/libraries/joomla/github/package/repositories/hooks.php +++ /dev/null @@ -1,238 +0,0 @@ -events)) - { - throw new RuntimeException('Your events array contains an unauthorized event.'); - } - } - - $data = json_encode( - array('name' => $name, 'config' => $config, 'events' => $events, 'active' => $active) - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), $data), - 201 - ); - } - - /** - * Method to delete a hook - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to delete. - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function delete($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } - - /** - * Method to edit a hook. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to edit. - * @param string $name The name of the service being called. - * @param array $config Array containing the config for the service. - * @param array $events The events the hook will be triggered for. This resets the currently set list - * @param array $addEvents Events to add to the hook. - * @param array $removeEvents Events to remove from the hook. - * @param boolean $active Flag to determine if the hook is active - * - * @return object - * - * @since 12.3 - * @throws DomainException - * @throws RuntimeException - */ - public function edit($user, $repo, $id, $name, $config, array $events = array('push'), array $addEvents = array(), - array $removeEvents = array(), $active = true) - { - // Check to ensure all events are in the allowed list - foreach ($events as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your events array contains an unauthorized event.'); - } - } - - foreach ($addEvents as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your active_events array contains an unauthorized event.'); - } - } - - foreach ($removeEvents as $event) - { - if (!in_array($event, $this->events)) - { - throw new RuntimeException('Your remove_events array contains an unauthorized event.'); - } - } - - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - $data = json_encode( - array( - 'name' => $name, - 'config' => $config, - 'events' => $events, - 'add_events' => $addEvents, - 'remove_events' => $removeEvents, - 'active' => $active, - ) - ); - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), $data) - ); - } - - /** - * Method to get details about a single hook for the repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to retrieve - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function get($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to list hooks for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function getList($user, $repo) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Method to test a hook against the latest repository commit - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id ID of the hook to delete - * - * @return object - * - * @since 12.3 - * @throws DomainException - */ - public function test($user, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/hooks/' . $id . '/test'; - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode('')), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/repositories/keys.php b/libraries/joomla/github/package/repositories/keys.php deleted file mode 100644 index 4caf9cc7837cb..0000000000000 --- a/libraries/joomla/github/package/repositories/keys.php +++ /dev/null @@ -1,142 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a key. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The id of the key. - * - * @since 12.4 - * - * @return object - */ - public function get($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/keys/' . (int) $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a key. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $title The key title. - * @param string $key The key. - * - * @since 12.4 - * - * @return object - */ - public function create($owner, $repo, $title, $key) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/keys'; - - $data = array( - 'title' => $title, - 'key' => $key, - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } - - /** - * Edit a key. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The id of the key. - * @param string $title The key title. - * @param string $key The key. - * - * @since 12.4 - * - * @return object - */ - public function edit($owner, $repo, $id, $title, $key) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/keys/' . (int) $id; - - $data = array( - 'title' => $title, - 'key' => $key, - ); - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * Delete a key. - * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $id The id of the key. - * - * @since 12.4 - * - * @return boolean - */ - public function delete($owner, $repo, $id) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/keys/' . (int) $id; - - $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - - return true; - } -} diff --git a/libraries/joomla/github/package/repositories/merging.php b/libraries/joomla/github/package/repositories/merging.php deleted file mode 100644 index 71340066769ae..0000000000000 --- a/libraries/joomla/github/package/repositories/merging.php +++ /dev/null @@ -1,90 +0,0 @@ -base = $base; - $data->head = $head; - - if ($commit_message) - { - $data->commit_message = $commit_message; - } - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), json_encode($data)); - - switch ($response->code) - { - case '201': - // Success - return json_decode($response->body); - break; - - case '204': - // No-op response (base already contains the head, nothing to merge) - throw new UnexpectedValueException('Nothing to merge'); - break; - - case '404': - // Missing base or Missing head response - $error = json_decode($response->body); - - $message = (isset($error->message)) ? $error->message : 'Missing base or head: ' . $response->code; - - throw new UnexpectedValueException($message); - break; - - case '409': - // Merge conflict response - $error = json_decode($response->body); - - $message = (isset($error->message)) ? $error->message : 'Merge conflict ' . $response->code; - - throw new UnexpectedValueException($message); - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } -} diff --git a/libraries/joomla/github/package/repositories/statistics.php b/libraries/joomla/github/package/repositories/statistics.php deleted file mode 100644 index 92db493216e3a..0000000000000 --- a/libraries/joomla/github/package/repositories/statistics.php +++ /dev/null @@ -1,174 +0,0 @@ -processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Get the last year of commit activity data. - * - * Returns the last year of commit activity grouped by week. - * The days array is a group of commits per day, starting on Sunday. - * - * @param string $owner The owner of the repository. - * @param string $repo The repository name. - * - * @since 1.0 - * - * @return object - */ - public function getActivityData($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/stats/commit_activity'; - - // Send the request. - return $this->processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Get the number of additions and deletions per week. - * - * Response returns a weekly aggregate of the number of additions and deletions pushed to a repository. - * - * @param string $owner The owner of the repository. - * @param string $repo The repository name. - * - * @since 1.0 - * - * @return object - */ - public function getCodeFrequency($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/stats/code_frequency'; - - // Send the request. - return $this->processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Get the weekly commit count for the repo owner and everyone else. - * - * Returns the total commit counts for the "owner" and total commit counts in "all". "all" is everyone combined, - * including the owner in the last 52 weeks. - * If you’d like to get the commit counts for non-owners, you can subtract all from owner. - * - * The array order is oldest week (index 0) to most recent week. - * - * @param string $owner The owner of the repository. - * @param string $repo The repository name. - * - * @since 1.0 - * - * @return object - */ - public function getParticipation($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/stats/participation'; - - // Send the request. - return $this->processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Get the number of commits per hour in each day. - * - * Response - * Each array contains the day number, hour number, and number of commits: - * - * 0-6: Sunday - Saturday - * 0-23: Hour of day - * Number of commits - * - * For example, [2, 14, 25] indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. - * All times are based on the time zone of individual commits. - * - * @param string $owner The owner of the repository. - * @param string $repo The repository name. - * - * @since 1.0 - * - * @return object - */ - public function getPunchCard($owner, $repo) - { - // Build the request path. - $path = '/repos/' . $owner . '/' . $repo . '/stats/punch_card'; - - // Send the request. - return $this->processResponse($this->client->get($this->fetchUrl($path))); - } - - /** - * Process the response and decode it. - * - * @param JHttpResponse $response The response. - * @param integer $expectedCode The expected "good" code. - * - * @return mixed - * - * @since 1.0 - * @throws \DomainException - */ - protected function processResponse(JHttpResponse $response, $expectedCode = 200) - { - if (202 == $response->code) - { - throw new \DomainException( - 'GitHub is building the statistics data. Please try again in a few moments.', - $response->code - ); - } - - return parent::processResponse($response, $expectedCode); - } -} diff --git a/libraries/joomla/github/package/repositories/statuses.php b/libraries/joomla/github/package/repositories/statuses.php deleted file mode 100644 index 657fc44f00aa0..0000000000000 --- a/libraries/joomla/github/package/repositories/statuses.php +++ /dev/null @@ -1,107 +0,0 @@ - $state, - ); - - if (!is_null($targetUrl)) - { - $data['target_url'] = $targetUrl; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), json_encode($data)); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list statuses for an SHA. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha SHA1 for which to get the statuses. - * - * @return array - * - * @since 12.3 - */ - public function getList($user, $repo, $sha) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/statuses/' . $sha; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/package/search.php b/libraries/joomla/github/package/search.php deleted file mode 100644 index f8e3e2f01e234..0000000000000 --- a/libraries/joomla/github/package/search.php +++ /dev/null @@ -1,131 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Search repositories. - * - * Find repositories by keyword. Note, this legacy method does not follow - * the v3 pagination pattern. - * This method returns up to 100 results per page and pages can be fetched - * using the start_page parameter. - * - * @param string $keyword The search term. - * @param string $language Filter results by language https://github.com/languages - * @param integer $start_page Page number to fetch - * - * @since 3.3 (CMS) - * - * @return object - */ - public function repositories($keyword, $language = '', $start_page = 0) - { - // Build the request path. - $path = '/legacy/repos/search/' . $keyword . '?'; - - $path .= ($language) ? '&language=' . $language : ''; - $path .= ($start_page) ? '&start_page=' . $start_page : ''; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Search users. - * - * Find users by keyword. - * - * @param string $keyword The search term. - * @param integer $start_page Page number to fetch - * - * @since 3.3 (CMS) - * - * @return object - */ - public function users($keyword, $start_page = 0) - { - // Build the request path. - $path = '/legacy/user/search/' . $keyword . '?'; - - $path .= ($start_page) ? '&start_page=' . $start_page : ''; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Email search. - * - * This API call is added for compatibility reasons only. There’s no guarantee - * that full email searches will always be available. The @ character in the - * address must be left unencoded. Searches only against public email addresses - * (as configured on the user’s GitHub profile). - * - * @param string $email The email address(es). - * - * @since 3.3 (CMS) - * - * @return object - */ - public function email($email) - { - // Build the request path. - $path = '/legacy/user/email/' . $email; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } -} diff --git a/libraries/joomla/github/package/users.php b/libraries/joomla/github/package/users.php deleted file mode 100644 index aa7e495634ea4..0000000000000 --- a/libraries/joomla/github/package/users.php +++ /dev/null @@ -1,181 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get the current authenticated user. - * - * @throws DomainException - * - * @return mixed - */ - public function getAuthenticatedUser() - { - // Build the request path. - $path = '/user'; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Update a user. - * - * @param string $name The full name - * @param string $email The email - * @param string $blog The blog - * @param string $company The company - * @param string $location The location - * @param string $hireable If he is unemplayed :P - * @param string $bio The biometrical DNA fingerprint (or smthng...) - * - * @throws DomainException - * - * @return mixed - */ - public function edit($name = '', $email = '', $blog = '', $company = '', $location = '', $hireable = '', $bio = '') - { - $data = array( - 'name' => $name, - 'email' => $email, - 'blog' => $blog, - 'company' => $company, - 'location' => $location, - 'hireable' => $hireable, - 'bio' => $bio, - ); - - // Build the request path. - $path = '/user'; - - // Send the request. - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * Get all users. - * - * This provides a dump of every user, in the order that they signed up for GitHub. - * - * @param integer $since The integer ID of the last User that you’ve seen. - * - * @throws DomainException - * @return mixed - */ - public function getList($since = 0) - { - // Build the request path. - $path = '/users'; - - $path .= ($since) ? '?since=' . $since : ''; - - // Send the request. - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /* - * Legacy methods - */ - - /** - * Get a single user. - * - * @param string $user The users login name. - * - * @deprecated use users->get() - * - * @throws DomainException - * - * @return mixed - */ - public function getUser($user) - { - return $this->get($user); - } - - /** - * Update a user. - * - * @param string $name The full name - * @param string $email The email - * @param string $blog The blog - * @param string $company The company - * @param string $location The location - * @param string $hireable If he is unemplayed :P - * @param string $bio The biometrical DNA fingerprint (or smthng...) - * - * @deprecated use users->edit() - * - * @throws DomainException - * - * @return mixed - */ - public function updateUser($name = '', $email = '', $blog = '', $company = '', $location = '', $hireable = '', $bio = '') - { - return $this->edit($name = '', $email = '', $blog = '', $company = '', $location = '', $hireable = '', $bio = ''); - } - - /** - * Get all users. - * - * This provides a dump of every user, in the order that they signed up for GitHub. - * - * @param integer $since The integer ID of the last User that you’ve seen. - * - * @deprecated use users->getList() - * - * @throws DomainException - * @return mixed - */ - public function getUsers($since = 0) - { - return $this->getList($since); - } -} diff --git a/libraries/joomla/github/package/users/emails.php b/libraries/joomla/github/package/users/emails.php deleted file mode 100644 index bfa64bdbbd8bf..0000000000000 --- a/libraries/joomla/github/package/users/emails.php +++ /dev/null @@ -1,91 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Add email address(es). - * - * @param string|array $email The email address(es). - * - * @since 3.3 (CMS) - * - * @return object - */ - public function add($email) - { - // Build the request path. - $path = '/user/emails'; - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($email)), - 201 - ); - } - - /** - * Delete email address(es). - * - * @param string|array $email The email address(es). - * - * @since 3.3 (CMS) - * - * @return object - */ - public function delete($email) - { - // Build the request path. - $path = '/user/emails'; - - $this->client->setOption('body', json_encode($email)); - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/users/followers.php b/libraries/joomla/github/package/users/followers.php deleted file mode 100644 index c5f2fa09397a4..0000000000000 --- a/libraries/joomla/github/package/users/followers.php +++ /dev/null @@ -1,144 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List users followed by another user. - * - * @param string $user The name of the user. If not set the current authenticated user will be used. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getListFollowedBy($user = '') - { - // Build the request path. - $path = ($user) - ? '/users/' . $user . '/following' - : '/user/following'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Check if you are following a user. - * - * @param string $user The name of the user. - * - * @throws UnexpectedValueException - * @since 3.3 (CMS) - * - * @return boolean - */ - public function check($user) - { - // Build the request path. - $path = '/user/following/' . $user; - - $response = $this->client->get($this->fetchUrl($path)); - - switch ($response->code) - { - case '204' : - // You are following this user - return true; - break; - - case '404' : - // You are not following this user - return false; - break; - - default : - throw new UnexpectedValueException('Unexpected response code: ' . $response->code); - break; - } - } - - /** - * Follow a user. - * - * Following a user requires the user to be logged in and authenticated with - * basic auth or OAuth with the user:follow scope. - * - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function follow($user) - { - // Build the request path. - $path = '/user/following/' . $user; - - return $this->processResponse( - $this->client->put($this->fetchUrl($path), ''), - 204 - ); - } - - /** - * Unfollow a user. - * - * Unfollowing a user requires the user to be logged in and authenticated with - * basic auth or OAuth with the user:follow scope. - * - * @param string $user The name of the user. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function unfollow($user) - { - // Build the request path. - $path = '/user/following/' . $user; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/package/users/keys.php b/libraries/joomla/github/package/users/keys.php deleted file mode 100644 index 10ba9e886eda0..0000000000000 --- a/libraries/joomla/github/package/users/keys.php +++ /dev/null @@ -1,154 +0,0 @@ -processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * List your public keys. - * - * Lists the current user’s keys. - * Management of public keys via the API requires that you are authenticated - * through basic auth, or OAuth with the ‘user’ scope. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function getList() - { - // Build the request path. - $path = '/users/keys'; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Get a single public key. - * - * @param integer $id The id of the key. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function get($id) - { - // Build the request path. - $path = '/users/keys/' . $id; - - return $this->processResponse( - $this->client->get($this->fetchUrl($path)) - ); - } - - /** - * Create a public key - * - * @param string $title The title of the key. - * @param string $key The key. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function create($title, $key) - { - // Build the request path. - $path = '/users/keys'; - - $data = array( - 'title' => $title, - 'key' => $key, - ); - - return $this->processResponse( - $this->client->post($this->fetchUrl($path), json_encode($data)), - 201 - ); - } - - /** - * Update a public key. - * - * @param integer $id The id of the key. - * @param string $title The title of the key. - * @param string $key The key. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function edit($id, $title, $key) - { - // Build the request path. - $path = '/users/keys/' . $id; - - $data = array( - 'title' => $title, - 'key' => $key, - ); - - return $this->processResponse( - $this->client->patch($this->fetchUrl($path), json_encode($data)) - ); - } - - /** - * Delete a public key. - * - * @param integer $id The id of the key. - * - * @since 3.3 (CMS) - * - * @return object - */ - public function delete($id) - { - // Build the request path. - $path = '/users/keys/' . (int) $id; - - return $this->processResponse( - $this->client->delete($this->fetchUrl($path)), - 204 - ); - } -} diff --git a/libraries/joomla/github/refs.php b/libraries/joomla/github/refs.php deleted file mode 100644 index 79acacca85984..0000000000000 --- a/libraries/joomla/github/refs.php +++ /dev/null @@ -1,174 +0,0 @@ -refs->create() - * - * @return object - * - * @since 11.3 - */ - public function create($user, $repo, $ref, $sha) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs'; - - // Build the request data. - $data = json_encode( - array( - 'ref' => $ref, - 'sha' => $sha, - ) - ); - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to update a reference. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $ref The reference to update. - * @param string $sha The SHA1 value to set the reference to. - * @param string $force Whether the update should be forced. Default to false. - * - * @deprecated use data->refs->edit() - * - * @return object - * - * @since 11.3 - */ - public function edit($user, $repo, $ref, $sha, $force = false) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref; - - // Craete the data object. - $data = new stdClass; - - // If a title is set add it to the data object. - if ($force) - { - $data->force = true; - } - - $data->sha = $sha; - - // Encode the request data. - $data = json_encode($data); - - // Send the request. - $response = $this->client->patch($this->fetchUrl($path), $data); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to get a reference. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $ref The reference to get. - * - * @deprecated use data->refs->get() - * - * @return object - * - * @since 11.3 - */ - public function get($user, $repo, $ref) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list references for a repository. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $namespace Optional sub-namespace to limit the returned references. - * @param integer $page Page to request - * @param integer $limit Number of results to return per page - * - * @deprecated use data->refs->getList() - * - * @return array - * - * @since 11.3 - */ - public function getList($user, $repo, $namespace = '', $page = 0, $limit = 0) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/git/refs' . $namespace; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path, $page, $limit)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/github/statuses.php b/libraries/joomla/github/statuses.php deleted file mode 100644 index e056c2e1e82e4..0000000000000 --- a/libraries/joomla/github/statuses.php +++ /dev/null @@ -1,106 +0,0 @@ -statuses->create() - * - * @return object - * - * @since 12.3 - */ - public function create($user, $repo, $sha, $state, $targetUrl = null, $description = null) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/statuses/' . $sha; - - if (!in_array($state, array('pending', 'success', 'error', 'failure'))) - { - throw new InvalidArgumentException('State must be one of pending, success, error or failure.'); - } - - // Build the request data. - $data = array( - 'state' => $state, - ); - - if (!is_null($targetUrl)) - { - $data['target_url'] = $targetUrl; - } - - if (!is_null($description)) - { - $data['description'] = $description; - } - - // Send the request. - $response = $this->client->post($this->fetchUrl($path), json_encode($data)); - - // Validate the response code. - if ($response->code != 201) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } - - /** - * Method to list statuses for an SHA. - * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha SHA1 for which to get the statuses. - * - * @deprecated use repositories->statuses->getList() - * - * @return array - * - * @since 12.3 - */ - public function getList($user, $repo, $sha) - { - // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/statuses/' . $sha; - - // Send the request. - $response = $this->client->get($this->fetchUrl($path)); - - // Validate the response code. - if ($response->code != 200) - { - // Decode the error response and throw an exception. - $error = json_decode($response->body); - throw new DomainException($error->message, $response->code); - } - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/google/auth.php b/libraries/joomla/google/auth.php deleted file mode 100644 index ace55bbe9769f..0000000000000 --- a/libraries/joomla/google/auth.php +++ /dev/null @@ -1,88 +0,0 @@ -options->get($key); - } - - /** - * Set an option for the JGoogleAuth object. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JGoogleAuth This object for method chaining. - * - * @since 12.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/google/auth/oauth2.php b/libraries/joomla/google/auth/oauth2.php deleted file mode 100644 index 51e3dc3c4fea6..0000000000000 --- a/libraries/joomla/google/auth/oauth2.php +++ /dev/null @@ -1,132 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JOAuth2Client($this->options); - } - - /** - * Method to authenticate to Google - * - * @return boolean True on success. - * - * @since 12.3 - */ - public function authenticate() - { - $this->googlize(); - - return $this->client->authenticate(); - } - - /** - * Verify if the client has been authenticated - * - * @return boolean Is authenticated - * - * @since 12.3 - */ - public function isAuthenticated() - { - return $this->client->isAuthenticated(); - } - - /** - * Method to retrieve data from Google - * - * @param string $url The URL for the request. - * @param mixed $data The data to include in the request. - * @param array $headers The headers to send with the request. - * @param string $method The type of http request to send. - * - * @return mixed Data from Google. - * - * @since 12.3 - */ - public function query($url, $data = null, $headers = null, $method = 'get') - { - $this->googlize(); - - return $this->client->query($url, $data, $headers, $method); - } - - /** - * Method to fill in Google-specific OAuth settings - * - * @return JOAuth2Client Google-configured Oauth2 client. - * - * @since 12.3 - */ - protected function googlize() - { - if (!$this->client->getOption('authurl')) - { - $this->client->setOption('authurl', 'https://accounts.google.com/o/oauth2/auth'); - } - - if (!$this->client->getOption('tokenurl')) - { - $this->client->setOption('tokenurl', 'https://accounts.google.com/o/oauth2/token'); - } - - if (!$this->client->getOption('requestparams')) - { - $this->client->setOption('requestparams', array()); - } - - $params = $this->client->getOption('requestparams'); - - if (!array_key_exists('access_type', $params)) - { - $params['access_type'] = 'offline'; - } - - if ($params['access_type'] == 'offline' && $this->client->getOption('userefresh') === null) - { - $this->client->setOption('userefresh', true); - } - - if (!array_key_exists('approval_prompt', $params)) - { - $params['approval_prompt'] = 'auto'; - } - - $this->client->setOption('requestparams', $params); - - return $this->client; - } -} diff --git a/libraries/joomla/google/data.php b/libraries/joomla/google/data.php deleted file mode 100644 index 8290370846c88..0000000000000 --- a/libraries/joomla/google/data.php +++ /dev/null @@ -1,188 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->auth = isset($auth) ? $auth : new JGoogleAuthOauth2($this->options); - } - - /** - * Method to authenticate to Google - * - * @return boolean True on success. - * - * @since 12.3 - */ - public function authenticate() - { - return $this->auth->authenticate(); - } - - /** - * Check authentication - * - * @return boolean True if authenticated. - * - * @since 12.3 - */ - public function isAuthenticated() - { - return $this->auth->isAuthenticated(); - } - - /** - * Method to validate XML - * - * @param string $data XML data to be parsed - * - * @return SimpleXMLElement XMLElement of parsed data - * - * @since 12.3 - * @throws UnexpectedValueException - */ - protected static function safeXml($data) - { - try - { - return new SimpleXMLElement($data, LIBXML_NOWARNING | LIBXML_NOERROR); - } - catch (Exception $e) - { - throw new UnexpectedValueException("Unexpected data received from Google: `$data`.", $e->getCode(), $e); - } - } - - /** - * Method to retrieve a list of data - * - * @param array $url URL to GET - * @param int $maxpages Maximum number of pages to return - * @param string $token Next page token - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - protected function listGetData($url, $maxpages = 1, $token = null) - { - $qurl = $url; - - if (strpos($url, '&') && isset($token)) - { - $qurl .= '&pageToken=' . $token; - } - elseif (isset($token)) - { - $qurl .= 'pageToken=' . $token; - } - - $jdata = $this->query($qurl); - $data = json_decode($jdata->body, true); - - if ($data && array_key_exists('items', $data)) - { - if ($maxpages != 1 && array_key_exists('nextPageToken', $data)) - { - $data['items'] = array_merge($data['items'], $this->listGetData($url, $maxpages - 1, $data['nextPageToken'])); - } - - return $data['items']; - } - elseif ($data) - { - return array(); - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - - /** - * Method to retrieve data from Google - * - * @param string $url The URL for the request. - * @param mixed $data The data to include in the request. - * @param array $headers The headers to send with the request. - * @param string $method The type of http request to send. - * - * @return mixed Data from Google. - * - * @since 12.3 - */ - protected function query($url, $data = null, $headers = null, $method = 'get') - { - return $this->auth->query($url, $data, $headers, $method); - } - - /** - * Get an option from the JGoogleData instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 12.3 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JGoogleData instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JGoogleData This object for method chaining. - * - * @since 12.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/google/data/adsense.php b/libraries/joomla/google/data/adsense.php deleted file mode 100644 index fe0a7bba9434f..0000000000000 --- a/libraries/joomla/google/data/adsense.php +++ /dev/null @@ -1,420 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/adsense'); - } - } - - /** - * Method to get an Adsense account's settings from Google - * - * @param string $accountID ID of account to get - * @param boolean $subaccounts Include list of subaccounts - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getAccount($accountID, $subaccounts = true) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . ($subaccounts ? '?tree=true' : ''); - $jdata = $this->query($url); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense accounts from Google - * - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listAccounts($options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense clients from Google - * - * @param string $accountID ID of account to list the clients from - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listClients($accountID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to get an AdSense AdUnit - * - * @param string $accountID ID of account to get - * @param string $adclientID ID of client to get - * @param string $adunitID ID of adunit to get - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getUnit($accountID, $adclientID, $adunitID) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID); - $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID); - $jdata = $this->query($url); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense Custom Channels for a specific Adunit - * - * @param string $accountID ID of account - * @param string $adclientID ID of client - * @param string $adunitID ID of adunit to list channels from - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listUnitChannels($accountID, $adclientID, $adunitID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID); - $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID) . '/customchannels?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to get an Adsense Channel - * - * @param string $accountID ID of account to get - * @param string $adclientID ID of client to get - * @param string $channelID ID of channel to get - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getChannel($accountID, $adclientID, $channelID) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/'; - $url .= urlencode($adclientID) . '/customchannels/' . urlencode($channelID); - $jdata = $this->query($url); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense Custom Channels - * - * @param string $accountID ID of account - * @param string $adclientID ID of client to list channels from - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listChannels($accountID, $adclientID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/' . urlencode($adclientID); - $url .= '/customchannels?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense Adunits for a specific Custom Channel - * - * @param string $accountID ID of account - * @param string $adclientID ID of client - * @param string $channelID ID of channel to list units from - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listChannelUnits($accountID, $adclientID, $channelID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/' . urlencode($adclientID); - $url .= '/customchannels/' . urlencode($channelID) . '/adunits?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to generate a report from Google AdSense - * - * @param string $accountID ID of account - * @param string $adclientID ID of client - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listUrlChannels($accountID, $adclientID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID); - $url .= '/adclients/' . urlencode($adclientID) . '/urlchannels?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of AdSense Channel URLs - * - * @param string $accountID ID of account - * @param mixed $start Start day - * @param mixed $end End day - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of accounts to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws InvalidArgumentException - * @throws UnexpectedValueException - */ - public function generateReport($accountID, $start, $end = false, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - if (is_int($start)) - { - $startobj = new DateTime; - $startobj->setTimestamp($start); - } - elseif (is_string($start)) - { - $startobj = new DateTime($start); - } - elseif (is_a($start, 'DateTime')) - { - $startobj = $start; - } - else - { - throw new InvalidArgumentException('Invalid start time.'); - } - - if (!$end) - { - $endobj = new DateTime; - } - elseif (is_int($end)) - { - $endobj = new DateTime; - $endobj->setTimestamp($end); - } - elseif (is_string($end)) - { - $endobj = new DateTime($end); - } - elseif (is_a($end, 'DateTime')) - { - $endobj = $end; - } - else - { - throw new InvalidArgumentException('Invalid end time.'); - } - - $options['startDate'] = $startobj->format('Y-m-d'); - $options['endDate'] = $endobj->format('Y-m-d'); - - unset($options['startIndex']); - - $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/reports?' . http_build_query($options); - - if (strpos($url, '&')) - { - $url .= '&'; - } - - $i = 0; - $data['rows'] = array(); - - do - { - $jdata = $this->query($url . 'startIndex=' . count($data['rows'])); - $newdata = json_decode($jdata->body, true); - - if ($newdata && array_key_exists('rows', $newdata)) - { - $newdata['rows'] = array_merge($data['rows'], $newdata['rows']); - $data = $newdata; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - - $i++; - } - while (count($data['rows']) < $data['totalMatchedRows'] && $i < $maxpages); - - return $data; - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/calendar.php b/libraries/joomla/google/data/calendar.php deleted file mode 100644 index 9168f707493cb..0000000000000 --- a/libraries/joomla/google/data/calendar.php +++ /dev/null @@ -1,625 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/calendar'); - } - } - - /** - * Method to remove a calendar from a user's calendar list - * - * @param string $calendarID ID of calendar to delete - * - * @return boolean Success or failure - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function removeCalendar($calendarID) - { - if ($this->isAuthenticated()) - { - $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID), null, null, 'delete'); - - if ($jdata->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - - return true; - } - else - { - return false; - } - } - - /** - * Method to get a calendar's settings from Google - * - * @param string $calendarID ID of calendar to get. - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getCalendar($calendarID) - { - if ($this->isAuthenticated()) - { - $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID)); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to add a calendar to a user's Google Calendar list - * - * @param string $calendarID New calendar ID - * @param array $options New calendar settings - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function addCalendar($calendarID, $options = array()) - { - if ($this->isAuthenticated()) - { - $options['id'] = $calendarID; - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList'; - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to retrieve calendar list from Google - * - * @param array $options Search settings - * @param int $maxpages Maximum number of pages of calendars to return - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listCalendars($options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to edit a Google Calendar's settings - * - * @param string $calendarID Calendar ID - * @param array $options Calendar settings - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function editCalendarSettings($calendarID, $options) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID); - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to clear a Google Calendar - * - * @param string $calendarID ID of calendar to clear - * - * @return boolean Success or failure - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function clearCalendar($calendarID) - { - if ($this->isAuthenticated()) - { - $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/clear', null, null, 'post'); - - if ($data->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$data->body}`."); - } - - return true; - } - else - { - return false; - } - } - - /** - * Method to delete a calendar from Google - * - * @param string $calendarID ID of calendar to delete. - * - * @return boolean Success or failure - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function deleteCalendar($calendarID) - { - if ($this->isAuthenticated()) - { - $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID), null, null, 'delete'); - - if ($data->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$data->body}`."); - } - - return true; - } - else - { - return false; - } - } - - /** - * Method to create a Google Calendar - * - * @param string $title New calendar title - * @param array $options New calendar settings - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function createCalendar($title, $options = array()) - { - if ($this->isAuthenticated()) - { - $options['summary'] = $title; - $url = 'https://www.googleapis.com/calendar/v3/calendars'; - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to edit a Google Calendar - * - * @param string $calendarID Calendar ID. - * @param array $options Calendar settings. - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function editCalendar($calendarID, $options) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID); - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put'); - $data = json_decode($jdata->body, true); - - if ($data && array_key_exists('items', $data)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to delete an event from a Google Calendar - * - * @param string $calendarID ID of calendar to delete from - * @param string $eventID ID of event to delete. - * - * @return boolean Success or failure. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function deleteEvent($calendarID, $eventID) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID); - $data = $this->query($url, null, null, 'delete'); - - if ($data->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$data->body}`."); - } - - return true; - } - else - { - return false; - } - } - - /** - * Method to get an event from a Google Calendar - * - * @param string $calendarID ID of calendar - * @param string $eventID ID of event to get - * @param array $options Options to send to Google - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getEvent($calendarID, $eventID, $options = array()) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/'; - $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . '?' . http_build_query($options); - $jdata = $this->query($url); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to create a Google Calendar event - * - * @param string $calendarID ID of calendar - * @param mixed $start Event start time - * @param mixed $end Event end time - * @param array $options New event settings - * @param mixed $timezone Timezone for event - * @param boolean $allday Treat event as an all-day event - * @param boolean $notify Notify participants - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws InvalidArgumentException - * @throws UnexpectedValueException - */ - public function createEvent($calendarID, $start, $end = false, $options = array(), $timezone = false, $allday = false, $notify = false) - { - if ($this->isAuthenticated()) - { - if (!$start) - { - $startobj = new DateTime; - } - elseif (is_int($start)) - { - $startobj = new DateTime; - $startobj->setTimestamp($start); - } - elseif (is_string($start)) - { - $startobj = new DateTime($start); - } - elseif (is_a($start, 'DateTime')) - { - $startobj = $start; - } - else - { - throw new InvalidArgumentException('Invalid event start time.'); - } - - if (!$end) - { - $endobj = $startobj; - } - elseif (is_int($end)) - { - $endobj = new DateTime; - $endobj->setTimestamp($end); - } - elseif (is_string($end)) - { - $endobj = new DateTime($end); - } - elseif (is_a($end, 'DateTime')) - { - $endobj = $end; - } - else - { - throw new InvalidArgumentException('Invalid event end time.'); - } - - if ($allday) - { - $options['start'] = array('date' => $startobj->format('Y-m-d')); - $options['end'] = array('date' => $endobj->format('Y-m-d')); - } - else - { - $options['start'] = array('dateTime' => $startobj->format(DateTime::RFC3339)); - $options['end'] = array('dateTime' => $endobj->format(DateTime::RFC3339)); - } - - if ($timezone === true) - { - $options['start']['timeZone'] = $startobj->getTimezone()->getName(); - $options['end']['timeZone'] = $endobj->getTimezone()->getName(); - } - elseif (is_a($timezone, 'DateTimeZone')) - { - $options['start']['timeZone'] = $timezone->getName(); - $options['end']['timeZone'] = $timezone->getName(); - } - elseif (is_string($timezone)) - { - $options['start']['timeZone'] = $timezone; - $options['end']['timeZone'] = $timezone; - } - - $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events' . ($notify ? '?sendNotifications=true' : ''); - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of events on a Google calendar - * - * @param string $calendarID Calendar ID - * @param string $eventID ID of the event to change - * @param array $options Search settings - * @param int $maxpages Minimum number of events to retrieve (more may be retrieved depending on page size) - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listRecurrences($calendarID, $eventID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID) . '/instances'; - $url .= '?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of events on a Google calendar - * - * @param string $calendarID Calendar ID - * @param array $options Calendar settings - * @param int $maxpages Cycle through pages of data to generate a complete list - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listEvents($calendarID, $options = array(), $maxpages = 1) - { - if ($this->isAuthenticated()) - { - $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; - unset($options['nextPageToken']); - $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events?' . http_build_query($options); - - return $this->listGetData($url, $maxpages, $next); - } - else - { - return false; - } - } - - /** - * Method to move an event from one calendar to another - * - * @param string $calendarID Calendar ID - * @param string $eventID ID of the event to change - * @param string $destID Calendar ID - * @param boolean $notify Notify participants of changes - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function moveEvent($calendarID, $eventID, $destID, $notify = false) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID) . '/move'; - $url .= '?destination=' . $destID . ($notify ? '&sendNotifications=true' : ''); - $jdata = $this->query($url, null, null, 'post'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to edit a Google Calendar event - * - * @param string $calendarID Calendar ID - * @param string $eventID ID of the event to change - * @param array $options Event settings - * @param boolean $notify Notify participants of changes - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function editEvent($calendarID, $eventID, $options, $notify = false) - { - if ($this->isAuthenticated()) - { - $url = 'https://www.googleapis.com/calendar/v3/calendars/'; - $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . ($notify ? '?sendNotifications=true' : ''); - $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put'); - - if ($data = json_decode($jdata->body, true)) - { - return $data; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/picasa.php b/libraries/joomla/google/data/picasa.php deleted file mode 100644 index b9a9f0738f600..0000000000000 --- a/libraries/joomla/google/data/picasa.php +++ /dev/null @@ -1,151 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://picasaweb.google.com/data/'); - } - } - - /** - * Method to retrieve a list of Picasa Albums - * - * @param string $userID ID of user - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listAlbums($userID = 'default') - { - if ($this->isAuthenticated()) - { - $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID); - $jdata = $this->query($url, null, array('GData-Version' => 2)); - $xml = $this->safeXml($jdata->body); - - if (isset($xml->children()->entry)) - { - $items = array(); - - foreach ($xml->children()->entry as $item) - { - $items[] = new JGoogleDataPicasaAlbum($item, $this->options, $this->auth); - } - - return $items; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Method to create a Picasa Album - * - * @param string $userID ID of user - * @param string $title New album title - * @param string $access New album access settings - * @param string $summary New album summary - * @param string $location New album location - * @param int $time New album timestamp - * @param array $keywords New album keywords - * - * @return mixed Data from Google. - * - * @since 12.3 - */ - public function createAlbum($userID = 'default', $title = '', $access = 'private', $summary = '', $location = '', $time = false, $keywords = array()) - { - if ($this->isAuthenticated()) - { - $time = $time ? $time : time(); - $title = $title != '' ? $title : date('F j, Y'); - $xml = new SimpleXMLElement(''); - $xml->addAttribute('xmlns', 'http://www.w3.org/2005/Atom'); - $xml->addChild('title', $title); - $xml->addChild('summary', $summary); - $xml->addChild('gphoto:location', $location, 'http://schemas.google.com/photos/2007'); - $xml->addChild('gphoto:access', $access); - $xml->addChild('gphoto:timestamp', $time); - $media = $xml->addChild('media:group', '', 'http://search.yahoo.com/mrss/'); - $media->addChild('media:keywords', implode($keywords, ', ')); - $cat = $xml->addChild('category', ''); - $cat->addAttribute('scheme', 'http://schemas.google.com/g/2005#kind'); - $cat->addAttribute('term', 'http://schemas.google.com/photos/2007#album'); - - $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID); - $jdata = $this->query($url, $xml->asXml(), array('GData-Version' => 2, 'Content-type' => 'application/atom+xml'), 'post'); - - $xml = $this->safeXml($jdata->body); - - return new JGoogleDataPicasaAlbum($xml, $this->options, $this->auth); - } - else - { - return false; - } - } - - /** - * Get Picasa Album - * - * @param string $url URL of album to get - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function getAlbum($url) - { - if ($this->isAuthenticated()) - { - $jdata = $this->query($url, null, array('GData-Version' => 2)); - $xml = $this->safeXml($jdata->body); - - return new JGoogleDataPicasaAlbum($xml, $this->options, $this->auth); - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/picasa/album.php b/libraries/joomla/google/data/picasa/album.php deleted file mode 100644 index ac30b3bf9e811..0000000000000 --- a/libraries/joomla/google/data/picasa/album.php +++ /dev/null @@ -1,492 +0,0 @@ -xml = $xml; - - parent::__construct($options, $auth); - - if (isset($this->auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://picasaweb.google.com/data/'); - } - } - - /** - * Method to delete a Picasa album - * - * @param mixed $match Check for most up to date album - * - * @return boolean Success or failure. - * - * @since 12.3 - * @throws Exception - * @throws RuntimeException - * @throws UnexpectedValueException - */ - public function delete($match = '*') - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - - if ($match === true) - { - $match = $this->xml->xpath('./@gd:etag'); - $match = $match[0]; - } - - try - { - $jdata = $this->query($url, null, array('GData-Version' => 2, 'If-Match' => $match), 'delete'); - } - catch (Exception $e) - { - if (strpos($e->getMessage(), 'Error code 412 received requesting data: Mismatch: etags') === 0) - { - throw new RuntimeException("Etag match failed: `$match`.", $e->getCode(), $e); - } - - throw $e; - } - - if ($jdata->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - - $this->xml = null; - - return true; - } - else - { - return false; - } - } - - /** - * Method to get the album link - * - * @param string $type Type of link to return - * - * @return string Link or false on failure - * - * @since 12.3 - */ - public function getLink($type = 'edit') - { - $links = $this->xml->link; - - foreach ($links as $link) - { - if ($link->attributes()->rel == $type) - { - return (string) $link->attributes()->href; - } - } - - return false; - } - - /** - * Method to get the title of the album - * - * @return string Album title - * - * @since 12.3 - */ - public function getTitle() - { - return (string) $this->xml->children()->title; - } - - /** - * Method to get the summary of the album - * - * @return string Album summary - * - * @since 12.3 - */ - public function getSummary() - { - return (string) $this->xml->children()->summary; - } - - /** - * Method to get the location of the album - * - * @return string Album location - * - * @since 12.3 - */ - public function getLocation() - { - return (string) $this->xml->children('gphoto', true)->location; - } - - /** - * Method to get the access level of the album - * - * @return string Album access level - * - * @since 12.3 - */ - public function getAccess() - { - return (string) $this->xml->children('gphoto', true)->access; - } - - /** - * Method to get the time of the album - * - * @return double Album time - * - * @since 12.3 - */ - public function getTime() - { - return (double) $this->xml->children('gphoto', true)->timestamp / 1000; - } - - /** - * Method to set the title of the album - * - * @param string $title New album title - * - * @return JGoogleDataPicasaAlbum The object for method chaining - * - * @since 12.3 - */ - public function setTitle($title) - { - $this->xml->children()->title = $title; - - return $this; - } - - /** - * Method to set the summary of the album - * - * @param string $summary New album summary - * - * @return JGoogleDataPicasaAlbum The object for method chaining - * - * @since 12.3 - */ - public function setSummary($summary) - { - $this->xml->children()->summary = $summary; - - return $this; - } - - /** - * Method to set the location of the album - * - * @param string $location New album location - * - * @return JGoogleDataPicasaAlbum The object for method chaining - * - * @since 12.3 - */ - public function setLocation($location) - { - $this->xml->children('gphoto', true)->location = $location; - - return $this; - } - - /** - * Method to set the access level of the album - * - * @param string $access New album access - * - * @return JGoogleDataPicasaAlbum The object for method chaining - * - * @since 12.3 - */ - public function setAccess($access) - { - $this->xml->children('gphoto', true)->access = $access; - - return $this; - } - - /** - * Method to set the time of the album - * - * @param int $time New album time - * - * @return JGoogleDataPicasaAlbum The object for method chaining - * - * @since 12.3 - */ - public function setTime($time) - { - $this->xml->children('gphoto', true)->timestamp = $time * 1000; - - return $this; - } - - /** - * Method to modify a Picasa Album - * - * @param string $match Optional eTag matching parameter - * - * @return mixed Data from Google. - * - * @since 12.3 - * @throws Exception - */ - public function save($match = '*') - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - - if ($match === true) - { - $match = $this->xml->xpath('./@gd:etag'); - $match = $match[0]; - } - - try - { - $headers = array('GData-Version' => 2, 'Content-type' => 'application/atom+xml', 'If-Match' => $match); - $jdata = $this->query($url, $this->xml->asXml(), $headers, 'put'); - } - catch (Exception $e) - { - if (strpos($e->getMessage(), 'Error code 412 received requesting data: Mismatch: etags') === 0) - { - throw new RuntimeException("Etag match failed: `$match`.", $e->getCode(), $e); - } - - throw $e; - } - - $this->xml = $this->safeXml($jdata->body); - - return $this; - } - else - { - return false; - } - } - - /** - * Refresh Picasa Album - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function refresh() - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - $jdata = $this->query($url, null, array('GData-Version' => 2)); - $this->xml = $this->safeXml($jdata->body); - - return $this; - } - else - { - return false; - } - } - - /** - * Method to retrieve a list of Picasa Photos - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - public function listPhotos() - { - if ($this->isAuthenticated()) - { - $url = $this->getLink('http://schemas.google.com/g/2005#feed'); - $jdata = $this->query($url, null, array('GData-Version' => 2)); - $xml = $this->safeXml($jdata->body); - - if (isset($xml->children()->entry)) - { - $items = array(); - - foreach ($xml->children()->entry as $item) - { - $items[] = new JGoogleDataPicasaPhoto($item, $this->options, $this->auth); - } - - return $items; - } - else - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - } - else - { - return false; - } - } - - /** - * Add photo - * - * @param string $file Path of file to upload - * @param string $title Title to give to file (defaults to filename) - * @param string $summary Description of the file - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws RuntimeException - */ - public function upload($file, $title = '', $summary = '') - { - if ($this->isAuthenticated()) - { - jimport('joomla.filesystem.file'); - $title = $title != '' ? $title : JFile::getName($file); - - if (!($type = $this->getMime($file))) - { - throw new RuntimeException("Inappropriate file type."); - } - - if (!($data = JFile::read($file))) - { - throw new RuntimeException("Cannot access file: `$file`"); - } - - $xml = new SimpleXMLElement(''); - $xml->addAttribute('xmlns', 'http://www.w3.org/2005/Atom'); - $xml->addChild('title', $title); - $xml->addChild('summary', $summary); - $cat = $xml->addChild('category', ''); - $cat->addAttribute('scheme', 'http://schemas.google.com/g/2005#kind'); - $cat->addAttribute('term', 'http://schemas.google.com/photos/2007#photo'); - - $post = "Media multipart posting\n"; - $post .= "--END_OF_PART\n"; - $post .= "Content-Type: application/atom+xml\n\n"; - $post .= $xml->asXml() . "\n"; - $post .= "--END_OF_PART\n"; - $post .= "Content-Type: {$type}\n\n"; - $post .= $data; - - $jdata = $this->query($this->getLink(), $post, array('GData-Version' => 2, 'Content-Type: multipart/related'), 'post'); - - return new JGoogleDataPicasaPhoto($this->safeXml($jdata->body), $this->options, $this->auth); - } - else - { - return false; - } - } - - /** - * Add photo - * - * @param string $file Filename - * - * @return mixed Data from Google - * - * @since 12.3 - * @throws UnexpectedValueException - */ - protected function getMime($file) - { - switch (strtolower(JFile::getExt($file))) - { - case 'bmp': - case 'bm': - return 'image/bmp'; - case 'gif': - return 'image/gif'; - case 'jpg': - case 'jpeg': - case 'jpe': - case 'jif': - case 'jfif': - case 'jfi': - return 'image/jpeg'; - case 'png': - return 'image/png'; - case '3gp': - return 'video/3gpp'; - case 'avi': - return 'video/avi'; - case 'mov': - case 'moov': - case 'qt': - return 'video/quicktime'; - case 'mp4': - case 'm4a': - case 'm4p': - case 'm4b': - case 'm4r': - case 'm4v': - return 'video/mp4'; - case 'mpg': - case 'mpeg': - case 'mp1': - case 'mp2': - case 'mp3': - case 'm1v': - case 'm1a': - case 'm2a': - case 'mpa': - case 'mpv': - return 'video/mpeg'; - case 'asf': - return 'video/x-ms-asf'; - case 'wmv': - return 'video/x-ms-wmv'; - default: - return false; - } - } -} diff --git a/libraries/joomla/google/data/picasa/photo.php b/libraries/joomla/google/data/picasa/photo.php deleted file mode 100644 index 6d81d527973a3..0000000000000 --- a/libraries/joomla/google/data/picasa/photo.php +++ /dev/null @@ -1,376 +0,0 @@ -xml = $xml; - - parent::__construct($options, $auth); - - if (isset($this->auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://picasaweb.google.com/data/'); - } - } - - /** - * Method to delete a Picasa photo - * - * @param mixed $match Check for most up to date photo - * - * @return boolean Success or failure. - * - * @since 12.3 - * @throws Exception - * @throws RuntimeException - * @throws UnexpectedValueException - */ - public function delete($match = '*') - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - - if ($match === true) - { - $match = $this->xml->xpath('./@gd:etag'); - $match = $match[0]; - } - - try - { - $jdata = $this->query($url, null, array('GData-Version' => 2, 'If-Match' => $match), 'delete'); - } - catch (Exception $e) - { - if (strpos($e->getMessage(), 'Error code 412 received requesting data: Mismatch: etags') === 0) - { - throw new RuntimeException("Etag match failed: `$match`.", $e->getCode(), $e); - } - - throw $e; - } - - if ($jdata->body != '') - { - throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`."); - } - - $this->xml = null; - - return true; - } - else - { - return false; - } - } - - /** - * Method to get the photo link - * - * @param string $type Type of link to return - * - * @return string Link or false on failure - * - * @since 12.3 - */ - public function getLink($type = 'edit') - { - $links = $this->xml->link; - - foreach ($links as $link) - { - if ($link->attributes()->rel == $type) - { - return (string) $link->attributes()->href; - } - } - - return false; - } - - /** - * Method to get the photo's URL - * - * @return string Link - * - * @since 12.3 - */ - public function getUrl() - { - return (string) $this->xml->children()->content->attributes()->src; - } - - /** - * Method to get the photo's thumbnails - * - * @return array An array of thumbnails - * - * @since 12.3 - */ - public function getThumbnails() - { - $thumbs = array(); - - foreach ($this->xml->children('media', true)->group->thumbnail as $item) - { - $url = (string) $item->attributes()->url; - $width = (int) $item->attributes()->width; - $height = (int) $item->attributes()->height; - $thumbs[$width] = array('url' => $url, 'w' => $width, 'h' => $height); - } - - return $thumbs; - } - - /** - * Method to get the title of the photo - * - * @return string Photo title - * - * @since 12.3 - */ - public function getTitle() - { - return (string) $this->xml->children()->title; - } - - /** - * Method to get the summary of the photo - * - * @return string Photo description - * - * @since 12.3 - */ - public function getSummary() - { - return (string) $this->xml->children()->summary; - } - - /** - * Method to get the access level of the photo - * - * @return string Photo access level - * - * @since 12.3 - */ - public function getAccess() - { - return (string) $this->xml->children('gphoto', true)->access; - } - - /** - * Method to get the time of the photo - * - * @return double Photo time - * - * @since 12.3 - */ - public function getTime() - { - return (double) $this->xml->children('gphoto', true)->timestamp / 1000; - } - - /** - * Method to get the size of the photo - * - * @return int Photo size - * - * @since 12.3 - */ - public function getSize() - { - return (int) $this->xml->children('gphoto', true)->size; - } - - /** - * Method to get the height of the photo - * - * @return int Photo height - * - * @since 12.3 - */ - public function getHeight() - { - return (int) $this->xml->children('gphoto', true)->height; - } - - /** - * Method to get the width of the photo - * - * @return int Photo width - * - * @since 12.3 - */ - public function getWidth() - { - return (int) $this->xml->children('gphoto', true)->width; - } - - /** - * Method to set the title of the photo - * - * @param string $title New photo title - * - * @return JGoogleDataPicasaPhoto The object for method chaining - * - * @since 12.3 - */ - public function setTitle($title) - { - $this->xml->children()->title = $title; - - return $this; - } - - /** - * Method to set the summary of the photo - * - * @param string $summary New photo description - * - * @return JGoogleDataPicasaPhoto The object for method chaining - * - * @since 12.3 - */ - public function setSummary($summary) - { - $this->xml->children()->summary = $summary; - - return $this; - } - - /** - * Method to set the access level of the photo - * - * @param string $access New photo access level - * - * @return JGoogleDataPicasaPhoto The object for method chaining - * - * @since 12.3 - */ - public function setAccess($access) - { - $this->xml->children('gphoto', true)->access = $access; - - return $this; - } - - /** - * Method to set the time of the photo - * - * @param int $time New photo time - * - * @return JGoogleDataPicasaPhoto The object for method chaining - * - * @since 12.3 - */ - public function setTime($time) - { - $this->xml->children('gphoto', true)->timestamp = $time * 1000; - - return $this; - } - - /** - * Method to modify a Picasa Photo - * - * @param string $match Optional eTag matching parameter - * - * @return mixed Data from Google. - * - * @since 12.3 - */ - public function save($match = '*') - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - - if ($match === true) - { - $match = $this->xml->xpath('./@gd:etag'); - $match = $match[0]; - } - - try - { - $headers = array('GData-Version' => 2, 'Content-type' => 'application/atom+xml', 'If-Match' => $match); - $jdata = $this->query($url, $this->xml->asXml(), $headers, 'put'); - } - catch (Exception $e) - { - if (strpos($e->getMessage(), 'Error code 412 received requesting data: Mismatch: etags') === 0) - { - throw new RuntimeException("Etag match failed: `$match`.", $e->getCode(), $e); - } - - throw $e; - } - - $this->xml = $this->safeXml($jdata->body); - - return $this; - } - else - { - return false; - } - } - - /** - * Refresh photo data - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function refresh() - { - if ($this->isAuthenticated()) - { - $url = $this->getLink(); - $jdata = $this->query($url, null, array('GData-Version' => 2)); - $this->xml = $this->safeXml($jdata->body); - - return $this; - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/plus.php b/libraries/joomla/google/data/plus.php deleted file mode 100644 index 5368d8bf08a43..0000000000000 --- a/libraries/joomla/google/data/plus.php +++ /dev/null @@ -1,99 +0,0 @@ -def('api.url', 'https://www.googleapis.com/plus/v1/'); - - parent::__construct($options, $auth); - - if (isset($this->auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me'); - } - } - - /** - * Magic method to lazily create API objects - * - * @param string $name Name of property to retrieve - * - * @return JGoogleDataPlus Google+ API object (people, activities, comments). - * - * @since 12.3 - */ - public function __get($name) - { - switch ($name) - { - case 'people': - if ($this->people == null) - { - $this->people = new JGoogleDataPlusPeople($this->options, $this->auth); - } - - return $this->people; - - case 'activities': - if ($this->activities == null) - { - $this->activities = new JGoogleDataPlusActivities($this->options, $this->auth); - } - - return $this->activities; - - case 'comments': - if ($this->comments == null) - { - $this->comments = new JGoogleDataPlusComments($this->options, $this->auth); - } - - return $this->comments; - } - } -} diff --git a/libraries/joomla/google/data/plus/activities.php b/libraries/joomla/google/data/plus/activities.php deleted file mode 100644 index 2cb9134ef7f17..0000000000000 --- a/libraries/joomla/google/data/plus/activities.php +++ /dev/null @@ -1,198 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me'); - } - } - - /** - * List all of the activities in the specified collection for a particular user. - * - * @param string $userId The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user. - * @param string $collection The collection of activities to list. Acceptable values are: "public". - * @param string $fields Used to specify the fields you want returned. - * @param integer $max The maximum number of people to include in the response, used for paging. - * @param string $token The continuation token, used to page through large result sets. To get the next page of results, set this - * parameter to the value of "nextPageToken" from the previous response. This token may be of any length. - * @param string $alt Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default) - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function listActivities($userId, $collection, $fields = null, $max = 10, $token = null, $alt = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'people/' . $userId . '/activities/' . $collection; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - // Check if max is specified. - if ($max != 10) - { - $url .= (strpos($url, '?') === false) ? '?maxResults=' : '&maxResults='; - $url .= $max; - } - - // Check if token is specified. - if ($token) - { - $url .= (strpos($url, '?') === false) ? '?pageToken=' : '&pageToken='; - $url .= $token; - } - - // Check if alt is specified. - if ($alt) - { - $url .= (strpos($url, '?') === false) ? '?alt=' : '&alt='; - $url .= $alt; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } - - /** - * Get an activity. - * - * @param string $id The ID of the activity to get. - * @param string $fields Used to specify the fields you want returned. - * @param string $alt Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default) - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function getActivity($id, $fields = null, $alt = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'activities/' . $id; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - // Check if alt is specified. - if ($alt) - { - $url .= (strpos($url, '?') === false) ? '?alt=' : '&alt='; - $url .= $alt; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } - - /** - * Search all public activities. - * - * @param string $query Full-text search query string. - * @param string $fields Used to specify the fields you want returned. - * @param string $language Specify the preferred language to search with. https://developers.google.com/+/api/search#available-languages - * @param integer $max The maximum number of people to include in the response, used for paging. - * @param string $order Specifies how to order search results. Acceptable values are "best" and "recent". - * @param string $token The continuation token, used to page through large result sets. To get the next page of results, set this - * parameter to the value of "nextPageToken" from the previous response. This token may be of any length. - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function search($query, $fields = null, $language = null, $max = 10, $order = null, $token = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'activities?query=' . urlencode($query); - - // Check if fields is specified. - if ($fields) - { - $url .= '&fields=' . $fields; - } - - // Check if language is specified. - if ($language) - { - $url .= '&language=' . $language; - } - - // Check if max is specified. - if ($max != 10) - { - $url .= '&maxResults=' . $max; - } - - // Check if order is specified. - if ($order) - { - $url .= '&orderBy=' . $order; - } - - // Check of token is specified. - if ($token) - { - $url .= '&pageToken=' . $token; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/plus/comments.php b/libraries/joomla/google/data/plus/comments.php deleted file mode 100644 index 6f847aab65fb8..0000000000000 --- a/libraries/joomla/google/data/plus/comments.php +++ /dev/null @@ -1,136 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me'); - } - } - - /** - * List all of the comments for an activity. - * - * @param string $activityId The ID of the activity to get comments for. - * @param string $fields Used to specify the fields you want returned. - * @param integer $max The maximum number of people to include in the response, used for paging. - * @param string $order The order in which to sort the list of comments. Acceptable values are "ascending" and "descending". - * @param string $token The continuation token, used to page through large result sets. To get the next page of results, set this - * parameter to the value of "nextPageToken" from the previous response. This token may be of any length. - * @param string $alt Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default) - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function listComments($activityId, $fields = null, $max = 20, $order = null, $token = null, $alt = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'activities/' . $activityId . '/comments'; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - // Check if max is specified. - if ($max != 20) - { - $url .= (strpos($url, '?') === false) ? '?maxResults=' : '&maxResults='; - $url .= $max; - } - - // Check if order is specified. - if ($order) - { - $url .= (strpos($url, '?') === false) ? '?orderBy=' : '&orderBy='; - $url .= $order; - } - - // Check of token is specified. - if ($token) - { - $url .= (strpos($url, '?') === false) ? '?pageToken=' : '&pageToken='; - $url .= $token; - } - - // Check if alt is specified. - if ($alt) - { - $url .= (strpos($url, '?') === false) ? '?alt=' : '&alt='; - $url .= $alt; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } - - /** - * Get a comment. - * - * @param string $id The ID of the comment to get. - * @param string $fields Used to specify the fields you want returned. - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function getComment($id, $fields = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'comments/' . $id; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/data/plus/people.php b/libraries/joomla/google/data/plus/people.php deleted file mode 100644 index 68ac51041c2a1..0000000000000 --- a/libraries/joomla/google/data/plus/people.php +++ /dev/null @@ -1,175 +0,0 @@ -auth) && !$this->auth->getOption('scope')) - { - $this->auth->setOption('scope', 'https://www.googleapis.com/auth/plus.me'); - } - } - - /** - * Get a person's profile. - * - * @param string $id The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user. - * @param string $fields Used to specify the fields you want returned. - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function getPeople($id, $fields = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'people/' . $id; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } - - /** - * Search all public profiles. - * - * @param string $query Specify a query string for full text search of public text in all profiles. - * @param string $fields Used to specify the fields you want returned. - * @param string $language Specify the preferred language to search with. https://developers.google.com/+/api/search#available-languages - * @param integer $max The maximum number of people to include in the response, used for paging. - * @param string $token The continuation token, used to page through large result sets. To get the next page of results, set this - * parameter to the value of "nextPageToken" from the previous response. This token may be of any length. - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function search($query, $fields = null, $language = null, $max = 10, $token = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'people?query=' . urlencode($query); - - // Check if fields is specified. - if ($fields) - { - $url .= '&fields=' . $fields; - } - - // Check if language is specified. - if ($language) - { - $url .= '&language=' . $language; - } - - // Check if max is specified. - if ($max != 10) - { - $url .= '&maxResults=' . $max; - } - - // Check of token is specified. - if ($token) - { - $url .= '&pageToken=' . $token; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } - - /** - * List all of the people in the specified collection for a particular activity. - * - * @param string $activityId The ID of the activity to get the list of people for. - * @param string $collection The collection of people to list. Acceptable values are "plusoners" and "resharers". - * @param string $fields Used to specify the fields you want returned. - * @param integer $max The maximum number of people to include in the response, used for paging. - * @param string $token The continuation token, used to page through large result sets. To get the next page of results, set this - * parameter to the value of "nextPageToken" from the previous response. This token may be of any length. - * - * @return mixed Data from Google - * - * @since 12.3 - */ - public function listByActivity($activityId, $collection, $fields = null, $max = 10, $token = null) - { - if ($this->isAuthenticated()) - { - $url = $this->getOption('api.url') . 'activities/' . $activityId . '/people/' . $collection; - - // Check if fields is specified. - if ($fields) - { - $url .= '?fields=' . $fields; - } - - // Check if max is specified. - if ($max != 10) - { - $url .= (strpos($url, '?') === false) ? '?maxResults=' : '&maxResults='; - $url .= $max; - } - - // Check of token is specified. - if ($token) - { - $url .= (strpos($url, '?') === false) ? '?pageToken=' : '&pageToken='; - $url .= $token; - } - - $jdata = $this->auth->query($url); - - return json_decode($jdata->body, true); - } - else - { - return false; - } - } -} diff --git a/libraries/joomla/google/embed.php b/libraries/joomla/google/embed.php deleted file mode 100644 index 08a4bf51739db..0000000000000 --- a/libraries/joomla/google/embed.php +++ /dev/null @@ -1,132 +0,0 @@ -options = $options ? $options : new Registry; - $this->uri = $uri ? $uri : JUri::getInstance(); - } - - /** - * Method to retrieve the javascript header for the embed API - * - * @return string The header - * - * @since 12.3 - */ - public function isSecure() - { - return $this->uri->getScheme() == 'https'; - } - - /** - * Method to retrieve the header for the API - * - * @return string The header - * - * @since 12.3 - */ - abstract public function getHeader(); - - /** - * Method to retrieve the body for the API - * - * @return string The body - * - * @since 12.3 - */ - abstract public function getBody(); - - /** - * Method to output the javascript header for the embed API - * - * @return null - * - * @since 12.3 - */ - public function echoHeader() - { - echo $this->getHeader(); - } - - /** - * Method to output the body for the API - * - * @return null - * - * @since 12.3 - */ - public function echoBody() - { - echo $this->getBody(); - } - - /** - * Get an option from the JGoogleEmbed instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 12.3 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JGoogleEmbed instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JGoogleEmbed This object for method chaining. - * - * @since 12.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/google/embed/analytics.php b/libraries/joomla/google/embed/analytics.php deleted file mode 100644 index 70daaec90f858..0000000000000 --- a/libraries/joomla/google/embed/analytics.php +++ /dev/null @@ -1,331 +0,0 @@ -getOption('code'); - } - - /** - * Method to set the tracking code - * - * @param string $code The Google Analytics tracking code - * - * @return JGoogleEmbedAnalytics The object for method chaining - * - * @since 12.3 - */ - public function setCode($code) - { - $this->setOption('code', $code); - - return $this; - } - - /** - * Checks if the javascript is set to be asynchronous - * - * @return boolean True if asynchronous - * - * @since 12.3 - */ - public function isAsync() - { - return $this->getOption('async') === null ? true : $this->getOption('async'); - } - - /** - * Load javascript asynchronously - * - * @return JGoogleEmbedAnalytics The object for method chaining - * - * @since 12.3 - */ - public function useAsync() - { - $this->setOption('async', true); - - return $this; - } - - /** - * Load javascript synchronously - * - * @return JGoogleEmbedAnalytics The object for method chaining - * - * @since 12.3 - */ - public function useSync() - { - $this->setOption('async', false); - - return $this; - } - - /** - * Add an analytics call - * - * @param string $method The name of the function - * @param array $params The parameters for the call - * - * @return array The added call - * - * @since 12.3 - */ - public function addCall($method, $params = array()) - { - $call = array('name' => $method, 'params' => $params); - - $calls = $this->listCalls(); - $calls[] = $call; - $this->setOption('calls', $calls); - - return $call; - } - - /** - * List the analytics calls to be executed - * - * @return array A list of calls - * - * @since 12.3 - */ - public function listCalls() - { - return $this->getOption('calls') ? $this->getOption('calls') : array(); - } - - /** - * Delete a call from the stack - * - * @param int $index Index of call to delete (defaults to last added call) - * - * @return array The deleted call - * - * @since 12.3 - */ - public function deleteCall($index = null) - { - $calls = $this->listCalls(); - - if ($index === null) - { - $index = count($calls) - 1; - } - - $call = $calls[$index]; - unset($calls[$index]); - $calls = array_values($calls); - $this->setOption('calls', $calls); - - return $call; - } - - /** - * Create a javascript function from the call parameters - * - * @param string $method The name of the function - * @param array $params The parameters for the call - * - * @return string The created call - * - * @since 12.3 - */ - public function createCall($method, $params = array()) - { - $params = array_values($params); - - if ($this->isAsync()) - { - $output = "_gaq.push(['{$method}',"; - $output .= substr(json_encode($params), 1, -1); - $output .= ']);'; - } - else - { - $output = "pageTracker.{$method}("; - $output .= substr(json_encode($params), 1, -1); - $output .= ');'; - } - - return $output; - } - - /** - * Add a custom variable to the analytics - * - * @param int $slot The slot to store the variable in (1-5) - * @param string $name The variable name - * @param string $value The variable value - * @param int $scope The scope of the variable (1: visitor level, 2: session level, 3: page level) - * - * @return array The added call - * - * @since 12.3 - */ - public function addCustomVar($slot, $name, $value, $scope = 3) - { - return $this->addCall('_setCustomVar', array($slot, $name, $value, $scope)); - } - - /** - * Get the code to create a custom analytics variable - * - * @param int $slot The slot to store the variable in (1-5) - * @param string $name The variable name - * @param string $value The variable value - * @param int $scope The scope of the variable (1: visitor level, 2: session level, 3: page level) - * - * @return string The created call - * - * @since 12.3 - */ - public function createCustomVar($slot, $name, $value, $scope = 3) - { - return $this->createCall('_setCustomVar', array($slot, $name, $value, $scope)); - } - - /** - * Track an analytics event - * - * @param string $category The general event category - * @param string $action The event action - * @param string $label The event description - * @param string $value The value of the event - * @param boolean $noninteract Don't allow this event to impact bounce statistics - * - * @return array The added call - * - * @since 12.3 - */ - public function addEvent($category, $action, $label = null, $value = null, $noninteract = false) - { - return $this->addCall('_trackEvent', array($category, $action, $label, $value, $noninteract)); - } - - /** - * Get the code to track an analytics event - * - * @param string $category The general event category - * @param string $action The event action - * @param string $label The event description - * @param string $value The value of the event - * @param boolean $noninteract Don't allow this event to impact bounce statistics - * - * @return string The created call - * - * @since 12.3 - */ - public function createEvent($category, $action, $label = null, $value = null, $noninteract = false) - { - return $this->createCall('_trackEvent', array($category, $action, $label, $value, $noninteract)); - } - - /** - * Get code to load Google Analytics javascript - * - * @return string Javascript code - * - * @since 12.3 - */ - public function getHeader() - { - if (!$this->isAsync()) - { - // Synchronous code is included only in the body - return ''; - } - - if (!$this->getOption('code')) - { - throw new UnexpectedValueException('A Google Analytics tracking code is required.'); - } - - $code = $this->getOption('code'); - - $output = ''; - - return $output; - } - - /** - * Google Analytics only needs to be included in the header - * - * @return null - * - * @since 12.3 - */ - public function getBody() - { - if (!$this->getOption('code')) - { - throw new UnexpectedValueException('A Google Analytics tracking code is required.'); - } - - $prefix = $this->isSecure() ? 'https://ssl' : 'http://www'; - $code = $this->getOption('code'); - - if ($this->isAsync()) - { - $output = ''; - } - else - { - $output = ''; - $output .= ''; - } - - return $output; - } -} diff --git a/libraries/joomla/google/embed/maps.php b/libraries/joomla/google/embed/maps.php deleted file mode 100644 index df89041b3c317..0000000000000 --- a/libraries/joomla/google/embed/maps.php +++ /dev/null @@ -1,821 +0,0 @@ -http = $http ? $http : new JHttp($this->options); - } - - /** - * Method to get the API key - * - * @return string The Google Maps API key - * - * @since 12.3 - */ - public function getKey() - { - return $this->getOption('key'); - } - - /** - * Method to set the API key - * - * @param string $key The Google Maps API key - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setKey($key) - { - $this->setOption('key', $key); - - return $this; - } - - /** - * Method to get the id of the map div - * - * @return string The ID - * - * @since 12.3 - */ - public function getMapId() - { - return $this->getOption('mapid') ? $this->getOption('mapid') : 'map_canvas'; - } - - /** - * Method to set the map div id - * - * @param string $id The ID - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setMapId($id) - { - $this->setOption('mapid', $id); - - return $this; - } - - /** - * Method to get the class of the map div - * - * @return string The class - * - * @since 12.3 - */ - public function getMapClass() - { - return $this->getOption('mapclass') ? $this->getOption('mapclass') : ''; - } - - /** - * Method to set the map div class - * - * @param string $class The class - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setMapClass($class) - { - $this->setOption('mapclass', $class); - - return $this; - } - - /** - * Method to get the style of the map div - * - * @return string The style - * - * @since 12.3 - */ - public function getMapStyle() - { - return $this->getOption('mapstyle') ? $this->getOption('mapstyle') : ''; - } - - /** - * Method to set the map div style - * - * @param string $style The style - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setMapStyle($style) - { - $this->setOption('mapstyle', $style); - - return $this; - } - - /** - * Method to get the map type setting - * - * @return string The class - * - * @since 12.3 - */ - public function getMapType() - { - return $this->getOption('maptype') ? $this->getOption('maptype') : 'ROADMAP'; - } - - /** - * Method to set the map type () - * - * @param string $type Valid types are ROADMAP, SATELLITE, HYBRID, and TERRAIN - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setMapType($type) - { - $this->setOption('maptype', strtoupper($type)); - - return $this; - } - - /** - * Method to get additional map options - * - * @return string The options - * - * @since 12.3 - */ - public function getAdditionalMapOptions() - { - return $this->getOption('mapoptions') ? $this->getOption('mapoptions') : array(); - } - - /** - * Method to add additional map options - * - * @param array $options Additional map options - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setAdditionalMapOptions($options) - { - $this->setOption('mapoptions', $options); - - return $this; - } - - /** - * Method to get additional map options - * - * @return string The options - * - * @since 12.3 - */ - public function getAdditionalJavascript() - { - return $this->getOption('extrascript') ? $this->getOption('extrascript') : ''; - } - - /** - * Method to add additional javascript - * - * @param array $script Additional javascript - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setAdditionalJavascript($script) - { - $this->setOption('extrascript', $script); - - return $this; - } - - /** - * Method to get the zoom - * - * @return int The zoom level - * - * @since 12.3 - */ - public function getZoom() - { - return $this->getOption('zoom') ? $this->getOption('zoom') : 0; - } - - /** - * Method to set the map zoom - * - * @param int $zoom Zoom level (0 is whole world) - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setZoom($zoom) - { - $this->setOption('zoom', $zoom); - - return $this; - } - - /** - * Method to set the center of the map - * - * @return mixed A latitude longitude array or an address string - * - * @since 12.3 - */ - public function getCenter() - { - return $this->getOption('mapcenter') ? $this->getOption('mapcenter') : array(0, 0); - } - - /** - * Method to set the center of the map - * - * @param mixed $location A latitude/longitude array or an address string - * @param mixed $title Title of marker or false for no marker - * @param array $markeroptions Options for marker - * @param array $markerevents Events for marker - * - * @example with events call: - * $map->setCenter( - * array(0, 0), - * 'Map Center', - * array(), - * array( - * 'click' => 'function() { // code goes here } - * ) - * ) - * - * @return JGoogleEmbedMaps The latitude/longitude of the center or false on failure - * - * @since 12.3 - */ - public function setCenter($location, $title = true, $markeroptions = array(), $markerevents = array()) - { - if ($title) - { - $title = is_string($title) ? $title : null; - - if (!$marker = $this->addMarker($location, $title, $markeroptions, $markerevents)) - { - return false; - } - - $location = $marker['loc']; - } - elseif (is_string($location)) - { - $geocode = $this->geocodeAddress($location); - - if (!$geocode) - { - return false; - } - - $location = $geocode['geometry']['location']; - $location = array_values($location); - } - - $this->setOption('mapcenter', $location); - - return $this; - } - - /** - * Method to add an event handler to the map. - * Event handlers must be passed in either as callback name or fully qualified function declaration - * - * @param string $type The event name - * @param string $function The event handling function body - * - * @example to add an event call: - * $map->addEventHandler('click', 'function(){ alert("map click event"); }'); - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function addEventHandler($type, $function) - { - $events = $this->listEventHandlers(); - - $events[$type] = $function; - - $this->setOption('events', $events); - - return $this; - } - - /** - * Method to remove an event handler from the map - * - * @param string $type The event name - * - * @example to delete an event call: - * $map->deleteEventHandler('click'); - * - * @return string The event handler content - * - * @since 12.3 - */ - public function deleteEventHandler($type = null) - { - $events = $this->listEventHandlers(); - - if ($type === null || !isset($events[$type])) - { - return; - } - - $event = $events[$type]; - unset($events[$type]); - $this->setOption('events', $events); - - return $event; - } - - /** - * List the events added to the map - * - * @return array A list of events - * - * @since 12.3 - */ - public function listEventHandlers() - { - return $this->getOption('events') ? $this->getOption('events') : array(); - } - - /** - * Add a marker to the map - * - * @param mixed $location A latitude/longitude array or an address string - * @param mixed $title The hover-text for the marker - * @param array $options Options for marker - * @param array $events Events for marker - * - * @example with events call: - * $map->addMarker( - * array(0, 0), - * 'My Marker', - * array(), - * array( - * 'click' => 'function() { // code goes here } - * ) - * ) - * - * @return mixed The marker or false on failure - * - * @since 12.3 - */ - public function addMarker($location, $title = null, $options = array(), $events = array()) - { - if (is_string($location)) - { - if (!$title) - { - $title = $location; - } - - $geocode = $this->geocodeAddress($location); - - if (!$geocode) - { - return false; - } - - $location = $geocode['geometry']['location']; - } - elseif (!$title) - { - $title = implode(', ', $location); - } - - $location = array_values($location); - $marker = array('loc' => $location, 'title' => $title, 'options' => $options, 'events' => $events); - - $markers = $this->listMarkers(); - $markers[] = $marker; - $this->setOption('markers', $markers); - - return $marker; - } - - /** - * List the markers added to the map - * - * @return array A list of markers - * - * @since 12.3 - */ - public function listMarkers() - { - return $this->getOption('markers') ? $this->getOption('markers') : array(); - } - - /** - * Delete a marker from the map - * - * @param int $index Index of marker to delete (defaults to last added marker) - * - * @return array The latitude/longitude of the deleted marker - * - * @since 12.3 - */ - public function deleteMarker($index = null) - { - $markers = $this->listMarkers(); - - if ($index === null) - { - $index = count($markers) - 1; - } - - if ($index >= count($markers) || $index < 0) - { - throw new OutOfBoundsException('Marker index out of bounds.'); - } - - $marker = $markers[$index]; - unset($markers[$index]); - $markers = array_values($markers); - $this->setOption('markers', $markers); - - return $marker; - } - - /** - * Checks if the javascript is set to be asynchronous - * - * @return boolean True if asynchronous - * - * @since 12.3 - */ - public function isAsync() - { - return $this->getOption('async') === null ? true : $this->getOption('async'); - } - - /** - * Load javascript asynchronously - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function useAsync() - { - $this->setOption('async', true); - - return $this; - } - - /** - * Load javascript synchronously - * - * @return JGoogleEmbedAMaps The object for method chaining - * - * @since 12.3 - */ - public function useSync() - { - $this->setOption('async', false); - - return $this; - } - - /** - * Method to get callback function for async javascript loading - * - * @return string The ID - * - * @since 12.3 - */ - public function getAsyncCallback() - { - return $this->getOption('callback') ? $this->getOption('callback') : 'initialize'; - } - - /** - * Method to set the callback function for async javascript loading - * - * @param string $callback The callback function name - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function setAsyncCallback($callback) - { - $this->setOption('callback', $callback); - - return $this; - } - - /** - * Checks if a sensor is set to be required - * - * @return boolean True if asynchronous - * - * @since 12.3 - */ - public function hasSensor() - { - return $this->getOption('sensor') === null ? false : $this->getOption('sensor'); - } - - /** - * Require access to sensor data - * - * @return JGoogleEmbedMaps The object for method chaining - * - * @since 12.3 - */ - public function useSensor() - { - $this->setOption('sensor', true); - - return $this; - } - - /** - * Don't require access to sensor data - * - * @return JGoogleEmbedAMaps The object for method chaining - * - * @since 12.3 - */ - public function noSensor() - { - $this->setOption('sensor', false); - - return $this; - } - - /** - * Checks how the script should be loaded - * - * @return string Autoload type (onload, jquery, mootools, or false) - * - * @since 12.3 - */ - public function getAutoload() - { - return $this->getOption('autoload') ? $this->getOption('autoload') : 'false'; - } - - /** - * Automatically add the callback to the window - * - * @param string $type The method to add the callback (options are onload, jquery, mootools, and false) - * - * @return JGoogleEmbedAMaps The object for method chaining - * - * @since 12.3 - */ - public function setAutoload($type = 'onload') - { - $this->setOption('autoload', $type); - - return $this; - } - - /** - * Get code to load Google Maps javascript - * - * @return string Javascript code - * - * @since 12.3 - */ - public function getHeader() - { - $zoom = $this->getZoom(); - $center = $this->getCenter(); - $maptype = $this->getMapType(); - $id = $this->getMapId(); - $scheme = $this->isSecure() ? 'https' : 'http'; - $key = $this->getKey(); - $sensor = $this->hasSensor() ? 'true' : 'false'; - - $setup = 'var mapOptions = {'; - $setup .= "zoom: {$zoom},"; - $setup .= "center: new google.maps.LatLng({$center[0]},{$center[1]}),"; - $setup .= "mapTypeId: google.maps.MapTypeId.{$maptype},"; - $setup .= substr(json_encode($this->getAdditionalMapOptions()), 1, -1); - $setup .= '};'; - $setup .= "var map = new google.maps.Map(document.getElementById('{$id}'), mapOptions);"; - - $events = $this->listEventHandlers(); - - if (isset($events) && count($events)) - { - foreach ($events as $type => $handler) - { - $setup .= "google.maps.event.addListener(map, '{$type}', {$handler});"; - } - } - - $markers = $this->listMarkers(); - - if (isset($markers) && count($markers)) - { - $setup .= "var marker;"; - - foreach ($markers as $marker) - { - $loc = $marker['loc']; - $title = $marker['title']; - $options = $marker['options']; - - $setup .= 'marker = new google.maps.Marker({'; - $setup .= "position: new google.maps.LatLng({$loc[0]},{$loc[1]}),"; - $setup .= 'map: map,'; - $setup .= "title:'{$title}',"; - $setup .= substr(json_encode($options), 1, -1); - $setup .= '});'; - - if (isset($marker['events']) && is_array($marker['events'])) - { - foreach ($marker['events'] as $type => $handler) - { - $setup .= 'google.maps.event.addListener(marker, "' . $type . '", ' . $handler . ');'; - } - } - } - } - - $setup .= $this->getAdditionalJavascript(); - - if ($this->isAsync()) - { - $asynccallback = $this->getAsyncCallback(); - - $output = ''; - $output .= ''; - - return $output; - } - - /** - * Method to retrieve the div that the map is loaded into - * - * @return string The body - * - * @since 12.3 - */ - public function getBody() - { - $id = $this->getMapId(); - $class = $this->getMapClass(); - $style = $this->getMapStyle(); - - $output = "
    setVar('address', urlencode($address)); - - if (($key = $this->getKey())) - { - $uri->setVar('key', $key); - } - - $response = $this->http->get($uri->toString()); - - if ($response->code < 200 || $response->code >= 300) - { - throw new RuntimeException('Error code ' . $response->code . ' received geocoding address: ' . $response->body . '.'); - } - - $data = json_decode($response->body, true); - - if (!$data) - { - throw new RuntimeException('Invalid json received geocoding address: ' . $response->body . '.'); - } - - if ($data['status'] != 'OK') - { - if (!empty($data['error_message'])) - { - throw new RuntimeException($data['error_message']); - } - - return; - } - - return $data['results'][0]; - } -} diff --git a/libraries/joomla/google/google.php b/libraries/joomla/google/google.php deleted file mode 100644 index c80b350a2dd48..0000000000000 --- a/libraries/joomla/google/google.php +++ /dev/null @@ -1,165 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->auth = isset($auth) ? $auth : new JGoogleAuthOauth2($this->options); - } - - /** - * Method to create JGoogleData objects - * - * @param string $name Name of property to retrieve - * @param Registry $options Google options object. - * @param JGoogleAuth $auth The authentication client object. - * - * @return JGoogleData Google data API object. - * - * @since 12.3 - */ - public function data($name, $options = null, $auth = null) - { - if ($this->options && !$options) - { - $options = $this->options; - } - - if ($this->auth && !$auth) - { - $auth = $this->auth; - } - - switch ($name) - { - case 'plus': - case 'Plus': - return new JGoogleDataPlus($options, $auth); - case 'picasa': - case 'Picasa': - return new JGoogleDataPicasa($options, $auth); - case 'adsense': - case 'Adsense': - return new JGoogleDataAdsense($options, $auth); - case 'calendar': - case 'Calendar': - return new JGoogleDataCalendar($options, $auth); - default: - return; - } - } - - /** - * Method to create JGoogleEmbed objects - * - * @param string $name Name of property to retrieve - * @param Registry $options Google options object. - * - * @return JGoogleEmbed Google embed API object. - * - * @since 12.3 - */ - public function embed($name, $options = null) - { - if ($this->options && !$options) - { - $options = $this->options; - } - - switch ($name) - { - case 'maps': - case 'Maps': - return new JGoogleEmbedMaps($options); - case 'analytics': - case 'Analytics': - return new JGoogleEmbedAnalytics($options); - default: - return; - } - } - - /** - * Get an option from the JGoogle instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 12.3 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JGoogle instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JGoogle This object for method chaining. - * - * @since 12.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/keychain/keychain.php b/libraries/joomla/keychain/keychain.php deleted file mode 100644 index 215dd1ec1bbe5..0000000000000 --- a/libraries/joomla/keychain/keychain.php +++ /dev/null @@ -1,200 +0,0 @@ -data; - - // Traverse the registry to find the correct node for the result. - for ($i = 0, $n = count($nodes) - 1; $i < $n; $i++) - { - if (!isset($node->{$nodes[$i]}) && ($i != $n)) - { - $node->{$nodes[$i]} = new stdClass; - } - - $node = $node->{$nodes[$i]}; - } - - // Get the old value if exists so we can return it - $result = $node->{$nodes[$i]}; - unset($node->{$nodes[$i]}); - } - - return $result; - } - - /** - * Load a keychain file into this object. - * - * @param string $keychainFile Path to the keychain file. - * @param string $passphraseFile The path to the passphrase file to decript the keychain. - * @param string $publicKeyFile The file containing the public key to decrypt the passphrase file. - * - * @return boolean Result of loading the object. - * - * @since 12.3 - * @throws RuntimeException - */ - public function loadKeychain($keychainFile, $passphraseFile, $publicKeyFile) - { - if (!file_exists($keychainFile)) - { - throw new RuntimeException('Attempting to load non-existent keychain file'); - } - - $passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile); - - $cleartext = openssl_decrypt(file_get_contents($keychainFile), $this->method, $passphrase, true, $this->iv); - - if ($cleartext === false) - { - throw new RuntimeException("Failed to decrypt keychain file"); - } - - return $this->loadObject(json_decode($cleartext)); - } - - /** - * Save this keychain to a file. - * - * @param string $keychainFile The path to the keychain file. - * @param string $passphraseFile The path to the passphrase file to encrypt the keychain. - * @param string $publicKeyFile The file containing the public key to decrypt the passphrase file. - * - * @return boolean Result of storing the file. - * - * @since 12.3 - * @throws RuntimeException - */ - public function saveKeychain($keychainFile, $passphraseFile, $publicKeyFile) - { - $passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile); - $data = $this->toString('JSON'); - - $encrypted = @openssl_encrypt($data, $this->method, $passphrase, true, $this->iv); - - if ($encrypted === false) - { - throw new RuntimeException('Unable to encrypt keychain'); - } - - return file_put_contents($keychainFile, $encrypted); - } - - /** - * Get the passphrase for this keychain - * - * @param string $passphraseFile The file containing the passphrase to encrypt and decrypt. - * @param string $publicKeyFile The file containing the public key to decrypt the passphrase file. - * - * @return string The passphrase in from passphraseFile - * - * @since 12.3 - * @throws RuntimeException - */ - protected function getPassphraseFromFile($passphraseFile, $publicKeyFile) - { - if (!file_exists($publicKeyFile)) - { - throw new RuntimeException('Missing public key file'); - } - - $publicKey = openssl_get_publickey(file_get_contents($publicKeyFile)); - - if (!$publicKey) - { - throw new RuntimeException("Failed to load public key."); - } - - if (!file_exists($passphraseFile)) - { - throw new RuntimeException('Missing passphrase file'); - } - - $passphrase = ''; - - if (!openssl_public_decrypt(file_get_contents($passphraseFile), $passphrase, $publicKey)) - { - throw new RuntimeException('Failed to decrypt passphrase file'); - } - - return $passphrase; - } -} diff --git a/libraries/joomla/linkedin/communications.php b/libraries/joomla/linkedin/communications.php deleted file mode 100644 index 344aaf06b5001..0000000000000 --- a/libraries/joomla/linkedin/communications.php +++ /dev/null @@ -1,222 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base. - $base = '/v1/people/~/mailbox'; - - // Build the xml. - $xml = ' - - - - ' . $first_name . ' - ' . $last_name . ' - - - - ' . $subject . ' - ' . $body . ' - - - ' . $connection . ' - - - '; - - $header['Content-Type'] = 'text/xml'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method used to invite people. - * - * @param string $id Member id. - * @param string $first_name A string containing frist name of the recipient. - * @param string $last_name A string containing last name of the recipient. - * @param string $subject The subject of the message that will be sent to the recipient - * @param string $body A text of the message. - * @param string $connection Only connecting as a 'friend' is supported presently. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function inviteById($id, $first_name, $last_name, $subject, $body, $connection = 'friend') - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base for people search. - $base = '/v1/people-search:(people:(api-standard-profile-request))'; - - $data['format'] = 'json'; - $data['first-name'] = $first_name; - $data['last-name'] = $last_name; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - if (strpos($response->body, 'apiStandardProfileRequest') === false) - { - throw new RuntimeException($response->body); - } - - // Get header value. - $value = explode('"value": "', $response->body); - $value = explode('"', $value[1]); - $value = $value[0]; - - // Split on the colon character. - $value = explode(':', $value); - $name = $value[0]; - $value = $value[1]; - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base. - $base = '/v1/people/~/mailbox'; - - // Build the xml. - $xml = ' - - - - - - - ' . $subject . ' - ' . $body . ' - - - ' . $connection . ' - - ' . $name . ' - ' . $value . ' - - - - '; - - $header['Content-Type'] = 'text/xml'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method used to send messages via LinkedIn between two or more individuals connected to the member sending the message.. - * - * @param mixed $recipient A string containing the member id or an array of ids. - * @param string $subject The subject of the message that will be sent to the recipient - * @param string $body A text of the message. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function sendMessage($recipient, $subject, $body) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base. - $base = '/v1/people/~/mailbox'; - - // Build the xml. - $xml = ' - '; - - if (is_array($recipient)) - { - foreach ($recipient as $r) - { - $xml .= ' - - '; - } - } - - $xml .= ' - ' . $subject . ' - ' . $body . ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } -} diff --git a/libraries/joomla/linkedin/companies.php b/libraries/joomla/linkedin/companies.php deleted file mode 100644 index ea26c64ac25ea..0000000000000 --- a/libraries/joomla/linkedin/companies.php +++ /dev/null @@ -1,480 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/companies'; - - if ($id && $name) - { - $base .= '::(' . $id . ',universal-name=' . $name . ')'; - } - elseif ($id) - { - $base .= '/' . $id; - } - elseif ($name) - { - $base .= '/universal-name=' . $name; - } - - // Set request parameters. - $data['format'] = 'json'; - - if ($domain) - { - $data['email-domain'] = $domain; - } - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to read shares for a particular company . - * - * @param string $id The unique company identifier. - * @param string $type Any valid Company Update Type from the table: https://developer.linkedin.com/reading-company-updates. - * @param integer $count Maximum number of updates to return. - * @param integer $start The offset by which to start Network Update pagination. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getUpdates($id, $type = null, $count = 0, $start = 0) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/companies/' . $id . '/updates'; - - // Set request parameters. - $data['format'] = 'json'; - - // Check if type is specified. - if ($type) - { - $data['event-type'] = $type; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to search across company pages. - * - * @param string $fields Request fields beyond the default ones. - * @param string $keywords Members who have all the keywords anywhere in their profile. - * @param boolean $hq Matching companies by the headquarters location. When this is set to "true" and a location facet is used, - * this restricts returned companies to only those whose headquarters resides in the specified location. - * @param string $facets Facet buckets to return, e.g. location. - * @param array $facet Array of facet values to search over. Contains values for location, industry, network, company-size, - * num-followers-range and fortune, in exactly this order, null must be specified for an element if no value. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $sort Controls the search result order. There are four options: relevance, relationship, - * followers and company-size. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function search($fields = null, $keywords = null, $hq = false, $facets = null, $facet = null, $start = 0, $count = 0, $sort = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/company-search'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if keywords is specified. - if ($keywords) - { - $data['keywords'] = $keywords; - } - - // Check if hq is true. - if ($hq) - { - $data['hq-only'] = $hq; - } - - // Check if facets is specified. - if ($facets) - { - $data['facets'] = $facets; - } - - // Check if facet is specified. - if ($facet) - { - $data['facet'] = array(); - - for ($i = 0; $i < count($facet); $i++) - { - if ($facet[$i]) - { - if ($i == 0) - { - $data['facet'][] = 'location,' . $facet[$i]; - } - - if ($i == 1) - { - $data['facet'][] = 'industry,' . $facet[$i]; - } - - if ($i == 2) - { - $data['facet'][] = 'network,' . $facet[$i]; - } - - if ($i == 3) - { - $data['facet'][] = 'company-size,' . $facet[$i]; - } - - if ($i == 4) - { - $data['facet'][] = 'num-followers-range,' . $facet[$i]; - } - - if ($i == 5) - { - $data['facet'][] = 'fortune,' . $facet[$i]; - } - } - } - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if sort is specified. - if ($sort) - { - $data['sort'] = $sort; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get a list of companies the current member is following. - * - * @param string $fields Request fields beyond the default ones. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getFollowed($fields = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/following/companies'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to follow a company. - * - * @param string $id The unique identifier for a company. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function follow($id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/following/companies'; - - // Build xml. - $xml = '' . $id . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to unfollow a company. - * - * @param string $id The unique identifier for a company. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function unfollow($id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/people/~/following/companies/id=' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } - - /** - * Method to get a collection of suggested companies for the current user. - * - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getSuggested($fields = null, $start = 0, $count = 0) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/suggestions/to-follow/companies'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get a collection of suggested companies for the current user. - * - * @param string $id The unique identifier for a company. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getProducts($id, $fields = null, $start = 0, $count = 0) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/companies/' . $id . '/products'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/linkedin/groups.php b/libraries/joomla/linkedin/groups.php deleted file mode 100644 index adf3477f7ca26..0000000000000 --- a/libraries/joomla/linkedin/groups.php +++ /dev/null @@ -1,1096 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/groups/' . $id; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count != 5) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to find the groups a member belongs to. - * - * @param string $id The unique identifier for a user. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $membership_state The state of the caller’s membership to the specified group. - * Values are: non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getMemberships($id = null, $fields = null, $start = 0, $count = 5, $membership_state = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if id is specified. - if ($id) - { - $base .= $id . '/group-memberships'; - } - else - { - $base .= '~/group-memberships'; - } - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count != 5) - { - $data['count'] = $count; - } - - // Check if membership_state is specified. - if ($membership_state) - { - $data['membership-state'] = $membership_state; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to find the groups a member belongs to. - * - * @param string $person_id The unique identifier for a user. - * @param string $group_id The unique identifier for a group. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getSettings($person_id = null, $group_id = null, $fields = null, $start = 0, $count = 5) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if person_id is specified. - if ($person_id) - { - $base .= $person_id . '/group-memberships'; - } - else - { - $base .= '~/group-memberships'; - } - - // Check if group_id is specified. - if ($group_id) - { - $base .= '/' . $group_id; - } - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count != 5) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to change a groups settings. - * - * @param string $group_id The unique identifier for a group. - * @param boolean $show_logo Show group logo in profile. - * @param string $digest_frequency Email digest frequency. - * @param boolean $announcements Email announcements from managers. - * @param boolean $allow_messages Allow messages from members. - * @param boolean $new_post Email for every new post. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function changeSettings($group_id, $show_logo = null, $digest_frequency = null, $announcements = null, - $allow_messages = null, $new_post = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/group-memberships/' . $group_id; - - // Build xml. - $xml = ''; - - if (!is_null($show_logo)) - { - $xml .= '' . $this->booleanToString($show_logo) . ''; - } - - if ($digest_frequency) - { - $xml .= '' . $digest_frequency . ''; - } - - if (!is_null($announcements)) - { - $xml .= '' . $this->booleanToString($announcements) . ''; - } - - if (!is_null($allow_messages)) - { - $xml .= '' . $this->booleanToString($allow_messages) . ''; - } - - if (!is_null($new_post)) - { - $xml .= '' . $this->booleanToString($new_post) . ''; - } - - $xml .= ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to join a group. - * - * @param string $group_id The unique identifier for a group. - * @param boolean $show_logo Show group logo in profile. - * @param string $digest_frequency Email digest frequency. - * @param boolean $announcements Email announcements from managers. - * @param boolean $allow_messages Allow messages from members. - * @param boolean $new_post Email for every new post. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function joinGroup($group_id, $show_logo = null, $digest_frequency = null, $announcements = null, - $allow_messages = null, $new_post = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/group-memberships'; - - // Build xml. - $xml = '' . $group_id . ''; - - if (!is_null($show_logo)) - { - $xml .= '' . $this->booleanToString($show_logo) . ''; - } - - if ($digest_frequency) - { - $xml .= '' . $digest_frequency . ''; - } - - if (!is_null($announcements)) - { - $xml .= '' . $this->booleanToString($announcements) . ''; - } - - if (!is_null($allow_messages)) - { - $xml .= '' . $this->booleanToString($allow_messages) . ''; - } - - if (!is_null($new_post)) - { - $xml .= '' . $this->booleanToString($new_post) . ''; - } - - $xml .= 'member'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to leave a group. - * - * @param string $group_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function leaveGroup($group_id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/people/~/group-memberships/' . $group_id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } - - /** - * Method to get dicussions for a group. - * - * @param string $id The unique identifier for a group. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $order Sort order for posts. Valid for: recency, popularity. - * @param string $category Category of posts. Valid for: discussion - * @param string $modified_since Timestamp filter for posts created after the specified value. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $order = null, $category = 'discussion', $modified_since = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/groups/' . $id . '/posts'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if order is specified. - if ($order) - { - $data['order'] = $order; - } - - // Check if category is specified. - if ($category) - { - $data['category'] = $category; - } - - // Check if modified_since is specified. - if ($modified_since) - { - $data['modified-since'] = $modified_since; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get posts a user started / participated in / follows for a group. - * - * @param string $group_id The unique identifier for a group. - * @param string $role Filter for posts related to the caller. Valid for: creator, commenter, follower. - * @param string $person_id The unique identifier for a user. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $order Sort order for posts. Valid for: recency, popularity. - * @param string $category Category of posts. Valid for: discussion - * @param string $modified_since Timestamp filter for posts created after the specified value. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getUserPosts($group_id, $role, $person_id = null, $fields = null, $start = 0, $count = 0, - $order = null, $category = 'discussion', $modified_since = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if person_id is specified. - if ($person_id) - { - $base .= $person_id; - } - else - { - $base .= '~'; - } - - $base .= '/group-memberships/' . $group_id . '/posts'; - - $data['format'] = 'json'; - $data['role'] = $role; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if order is specified. - if ($order) - { - $data['order'] = $order; - } - - // Check if category is specified. - if ($category) - { - $data['category'] = $category; - } - - // Check if modified_since is specified. - if ($modified_since) - { - $data['modified-since'] = $modified_since; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to retrieve details about a post. - * - * @param string $post_id The unique identifier for a post. - * @param string $fields Request fields beyond the default ones. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getPost($post_id, $fields = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/posts/' . $post_id; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to retrieve all comments of a post. - * - * @param string $post_id The unique identifier for a post. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getPostComments($post_id, $fields = null, $start = 0, $count = 0) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/posts/' . $post_id . '/comments'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to retrieve all comments of a post. - * - * @param string $group_id The unique identifier for a group. - * @param string $title Post title. - * @param string $summary Post summary. - * - * @return string The created post's id. - * - * @since 13.1 - */ - public function createPost($group_id, $title, $summary) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/groups/' . $group_id . '/posts'; - - // Build xml. - $xml = '' . $title . '' . $summary . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - // Return the post id. - $response = explode('posts/', $response->headers['Location']); - - return $response[1]; - } - - /** - * Method to like or unlike a post. - * - * @param string $post_id The unique identifier for a group. - * @param boolean $like True to like post, false otherwise. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - private function _likeUnlike($post_id, $like) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/posts/' . $post_id . '/relation-to-viewer/is-liked'; - - // Build xml. - $xml = '' . $this->booleanToString($like) . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response; - } - - /** - * Method used to like a post. - * - * @param string $post_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function likePost($post_id) - { - return $this->_likeUnlike($post_id, true); - } - - /** - * Method used to unlike a post. - * - * @param string $post_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function unlikePost($post_id) - { - return $this->_likeUnlike($post_id, false); - } - - /** - * Method to follow or unfollow a post. - * - * @param string $post_id The unique identifier for a group. - * @param boolean $follow True to like post, false otherwise. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - private function _followUnfollow($post_id, $follow) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/posts/' . $post_id . '/relation-to-viewer/is-following'; - - // Build xml. - $xml = '' . $this->booleanToString($follow) . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response; - } - - /** - * Method used to follow a post. - * - * @param string $post_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function followPost($post_id) - { - return $this->_followUnfollow($post_id, true); - } - - /** - * Method used to unfollow a post. - * - * @param string $post_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function unfollowPost($post_id) - { - return $this->_followUnfollow($post_id, false); - } - - /** - * Method to flag a post as a Promotion or Job. - * - * @param string $post_id The unique identifier for a group. - * @param string $flag Flag as a 'promotion' or 'job'. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function flagPost($post_id, $flag) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/posts/' . $post_id . '/category/code'; - - // Build xml. - $xml = '' . $flag . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to delete a post if the current user is the creator or flag it as inappropriate otherwise. - * - * @param string $post_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function deletePost($post_id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/posts/' . $post_id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } - - /** - * Method to access the comments resource. - * - * @param string $comment_id The unique identifier for a comment. - * @param string $fields Request fields beyond the default ones. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getComment($comment_id, $fields = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/comments/' . $comment_id; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to add a comment to a post - * - * @param string $post_id The unique identifier for a group. - * @param string $comment The post comment's text. - * - * @return string The created comment's id. - * - * @since 13.1 - */ - public function addComment($post_id, $comment) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/posts/' . $post_id . '/comments'; - - // Build xml. - $xml = '' . $comment . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - // Return the comment id. - $response = explode('comments/', $response->headers['Location']); - - return $response[1]; - } - - /** - * Method to delete a comment if the current user is the creator or flag it as inappropriate otherwise. - * - * @param string $comment_id The unique identifier for a group. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function deleteComment($comment_id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/comments/' . $comment_id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } - - /** - * Method to get suggested groups for a user. - * - * @param string $person_id The unique identifier for a user. - * @param string $fields Request fields beyond the default ones. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getSuggested($person_id = null, $fields = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if person_id is specified. - if ($person_id) - { - $base .= $person_id . '/suggestions/groups'; - } - else - { - $base .= '~/suggestions/groups'; - } - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to delete a group suggestion for a user. - * - * @param string $suggestion_id The unique identifier for a suggestion. - * @param string $person_id The unique identifier for a user. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function deleteSuggestion($suggestion_id, $person_id = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/people/'; - - // Check if person_id is specified. - if ($person_id) - { - $base .= $person_id . '/suggestions/groups/' . $suggestion_id; - } - else - { - $base .= '~/suggestions/groups/' . $suggestion_id; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } -} diff --git a/libraries/joomla/linkedin/jobs.php b/libraries/joomla/linkedin/jobs.php deleted file mode 100644 index 934acae77c32f..0000000000000 --- a/libraries/joomla/linkedin/jobs.php +++ /dev/null @@ -1,376 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/jobs/' . $id; - - // Set request parameters. - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get a list of bookmarked jobs for the current member. - * - * @param string $fields Request fields beyond the default ones. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getBookmarked($fields = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/job-bookmarks'; - - // Set request parameters. - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to bookmark a job to the current user's account. - * - * @param integer $id The unique identifier for a job. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function bookmark($id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/job-bookmarks'; - - // Build xml. - $xml = '' . $id . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to delete a bookmark. - * - * @param integer $id The unique identifier for a job. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function deleteBookmark($id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/people/~/job-bookmarks/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters); - - return $response; - } - - /** - * Method to retrieve job suggestions for the current user. - * - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getSuggested($fields = null, $start = 0, $count = 0) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/suggestions/job-suggestions'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to search across LinkedIn's job postings. - * - * @param string $fields Request fields beyond the default ones. - * @param string $keywords Members who have all the keywords anywhere in their profile. - * @param string $company_name Jobs with a matching company name. - * @param string $job_title Matches jobs with the same job title. - * @param string $country_code Matches members with a location in a specific country. Values are defined in by ISO 3166 standard. - * Country codes must be in all lower case. - * @param integer $postal_code Matches members centered around a Postal Code. Must be combined with the country-code parameter. - * Not supported for all countries. - * @param integer $distance Matches members within a distance from a central point. This is measured in miles. - * @param string $facets Facet buckets to return, e.g. location. - * @param array $facet Array of facet values to search over. Contains values for company, date-posted, location, job-function, - * industry, and salary, in exactly this order, null must be specified for an element if no value. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $sort Controls the search result order. There are four options: R (relationship), DA (date-posted-asc), - * DD (date-posted-desc). - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function search($fields = null, $keywords = null, $company_name = null, $job_title = null, $country_code = null, $postal_code = null, - $distance = null, $facets = null, $facet = null, $start = 0, $count = 0, $sort = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/job-search'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if keywords is specified. - if ($keywords) - { - $data['keywords'] = $keywords; - } - - // Check if company-name is specified. - if ($company_name) - { - $data['company-name'] = $company_name; - } - - // Check if job-title is specified. - if ($job_title) - { - $data['job-title'] = $job_title; - } - - // Check if country_code is specified. - if ($country_code) - { - $data['country-code'] = $country_code; - } - - // Check if postal_code is specified. - if ($postal_code) - { - $data['postal-code'] = $postal_code; - } - - // Check if distance is specified. - if ($distance) - { - $data['distance'] = $distance; - } - - // Check if facets is specified. - if ($facets) - { - $data['facets'] = $facets; - } - - // Check if facet is specified. - if ($facet) - { - $data['facet'] = array(); - - for ($i = 0; $i < count($facet); $i++) - { - if ($facet[$i]) - { - if ($i == 0) - { - $data['facet'][] = 'company,' . $this->oauth->safeEncode($facet[$i]); - } - - if ($i == 1) - { - $data['facet'][] = 'date-posted,' . $facet[$i]; - } - - if ($i == 2) - { - $data['facet'][] = 'location,' . $facet[$i]; - } - - if ($i == 3) - { - $data['facet'][] = 'job-function,' . $this->oauth->safeEncode($facet[$i]); - } - - if ($i == 4) - { - $data['facet'][] = 'industry,' . $facet[$i]; - } - - if ($i == 5) - { - $data['facet'][] = 'salary,' . $facet[$i]; - } - } - } - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if sort is specified. - if ($sort) - { - $data['sort'] = $sort; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/linkedin/linkedin.php b/libraries/joomla/linkedin/linkedin.php deleted file mode 100644 index 159eaca0e1702..0000000000000 --- a/libraries/joomla/linkedin/linkedin.php +++ /dev/null @@ -1,151 +0,0 @@ -oauth = $oauth; - $this->options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - - // Setup the default API url if not already set. - $this->options->def('api.url', 'https://api.linkedin.com'); - } - - /** - * Magic method to lazily create API objects - * - * @param string $name Name of property to retrieve - * - * @return JLinkedinObject Linkedin API object (statuses, users, favorites, etc.). - * - * @since 13.1 - * @throws InvalidArgumentException - */ - public function __get($name) - { - $class = 'JLinkedin' . ucfirst($name); - - if (class_exists($class)) - { - if (false == isset($this->$name)) - { - $this->$name = new $class($this->options, $this->client, $this->oauth); - } - - return $this->$name; - } - - throw new InvalidArgumentException(sprintf('Argument %s produced an invalid class name: %s', $name, $class)); - } - - /** - * Get an option from the JLinkedin instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 13.1 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the Linkedin instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JLinkedin This object for method chaining. - * - * @since 13.1 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/linkedin/oauth.php b/libraries/joomla/linkedin/oauth.php deleted file mode 100644 index e27be2b73f8bd..0000000000000 --- a/libraries/joomla/linkedin/oauth.php +++ /dev/null @@ -1,143 +0,0 @@ -options = isset($options) ? $options : new Registry; - - $this->options->def('accessTokenURL', 'https://www.linkedin.com/uas/oauth/accessToken'); - $this->options->def('authenticateURL', 'https://www.linkedin.com/uas/oauth/authenticate'); - $this->options->def('authoriseURL', 'https://www.linkedin.com/uas/oauth/authorize'); - $this->options->def('requestTokenURL', 'https://www.linkedin.com/uas/oauth/requestToken'); - - // Call the JOauthV1aclient constructor to setup the object. - parent::__construct($this->options, $client, $input); - } - - /** - * Method to verify if the access token is valid by making a request to an API endpoint. - * - * @return boolean Returns true if the access token is valid and false otherwise. - * - * @since 13.1 - */ - public function verifyCredentials() - { - $token = $this->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - $data['format'] = 'json'; - - // Set the API url. - $path = 'https://api.linkedin.com/v1/people::(~)'; - - // Send the request. - $response = $this->oauthRequest($path, 'GET', $parameters, $data); - - // Verify response - if ($response->code == 200) - { - return true; - } - else - { - return false; - } - } - - /** - * Method to validate a response. - * - * @param string $url The request URL. - * @param JHttpResponse $response The response to validate. - * - * @return void - * - * @since 13.1 - * @throws DomainException - */ - public function validateResponse($url, $response) - { - if (!$code = $this->getOption('success_code')) - { - $code = 200; - } - - if (strpos($url, '::(~)') === false && $response->code != $code) - { - if ($error = json_decode($response->body)) - { - throw new DomainException('Error code ' . $error->errorCode . ' received with message: ' . $error->message . '.'); - } - else - { - throw new DomainException($response->body); - } - } - } - - /** - * Method used to set permissions. - * - * @param mixed $scope String or an array of string containing permissions. - * - * @return JLinkedinOauth This object for method chaining - * - * @see https://developer.linkedin.com/documents/authentication - * @since 13.1 - */ - public function setScope($scope) - { - $this->setOption('scope', $scope); - - return $this; - } - - /** - * Method to get the current scope - * - * @return string String or an array of string containing permissions. - * - * @since 13.1 - */ - public function getScope() - { - return $this->getOption('scope'); - } -} diff --git a/libraries/joomla/linkedin/object.php b/libraries/joomla/linkedin/object.php deleted file mode 100644 index b46c80488c5f8..0000000000000 --- a/libraries/joomla/linkedin/object.php +++ /dev/null @@ -1,106 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - $this->oauth = $oauth; - } - - /** - * Method to convert boolean to string. - * - * @param boolean $bool The boolean value to convert. - * - * @return string String with the converted boolean. - * - * @since 13.1 - */ - public function booleanToString($bool) - { - if ($bool) - { - return 'true'; - } - else - { - return 'false'; - } - } - - /** - * Get an option from the JLinkedinObject instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 13.1 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JLinkedinObject instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JLinkedinObject This object for method chaining. - * - * @since 13.1 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/linkedin/people.php b/libraries/joomla/linkedin/people.php deleted file mode 100644 index cdfc9e7a9e390..0000000000000 --- a/libraries/joomla/linkedin/people.php +++ /dev/null @@ -1,387 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - $data['format'] = 'json'; - - // Check if a member id is specified. - if ($id) - { - $base .= 'id=' . $id; - } - elseif (!$url) - { - $base .= '~'; - } - - // Check if profile url is specified. - if ($url) - { - $base .= 'url=' . $this->oauth->safeEncode($url); - - // Choose public profile - if (!strcmp($type, 'public')) - { - $base .= ':public'; - } - } - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if language is specified. - $header = array(); - - if ($language) - { - $header = array('Accept-Language' => $language); - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data, $header); - - return json_decode($response->body); - } - - /** - * Method to get a list of connections for a user who has granted access to his/her account. - * - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $modified Values are updated or new. - * @param string $modified_since Value as a Unix time stamp of milliseconds since epoch. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getConnections($fields = null, $start = 0, $count = 500, $modified = null, $modified_since = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/connections'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - // Check if count is specified. - if ($count != 500) - { - $data['count'] = $count; - } - - // Check if modified is specified. - if ($modified) - { - $data['modified'] = $modified; - } - - // Check if modified_since is specified. - if ($modified_since) - { - $data['modified-since'] = $modified_since; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get information about people. - * - * @param string $fields Request fields beyond the default ones. provide 'api-standard-profile-request' - * field for out of network profiles. - * @param string $keywords Members who have all the keywords anywhere in their profile. - * @param string $first_name Members with a matching first name. Matches must be exact. - * @param string $last_name Members with a matching last name. Matches must be exactly. - * @param string $company_name Members who have a matching company name on their profile. - * @param boolean $current_company A value of true matches members who currently work at the company specified in the company-name - * parameter. - * @param string $title Matches members with that title on their profile. - * @param boolean $current_title A value of true matches members whose title is currently the one specified in the title-name parameter. - * @param string $school_name Members who have a matching school name on their profile. - * @param string $current_school A value of true matches members who currently attend the school specified in the school-name parameter. - * @param string $country_code Matches members with a location in a specific country. Values are defined in by ISO 3166 standard. - * Country codes must be in all lower case. - * @param integer $postal_code Matches members centered around a Postal Code. Must be combined with the country-code parameter. - * Not supported for all countries. - * @param integer $distance Matches members within a distance from a central point. This is measured in miles. - * @param string $facets Facet buckets to return, e.g. location. - * @param array $facet Array of facet values to search over. Contains values for location, industry, network, language, - * current-company, past-company and school, in exactly this order, null must be specified for an element if no value. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $sort Controls the search result order. There are four options: connections, recommenders, - * distance and relevance. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function search($fields = null, $keywords = null, $first_name = null, $last_name = null, $company_name = null, - $current_company = null, $title = null, $current_title = null, $school_name = null, $current_school = null, $country_code = null, - $postal_code = null, $distance = null, $facets = null, $facet = null, $start = 0, $count = 10, $sort = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people-search'; - - $data['format'] = 'json'; - - // Check if fields is specified. - if ($fields) - { - $base .= ':' . $fields; - } - - // Check if keywords is specified. - if ($keywords) - { - $data['keywords'] = $keywords; - } - - // Check if first_name is specified. - if ($first_name) - { - $data['first-name'] = $first_name; - } - - // Check if last_name is specified. - if ($last_name) - { - $data['last-name'] = $last_name; - } - - // Check if company-name is specified. - if ($company_name) - { - $data['company-name'] = $company_name; - } - - // Check if current_company is specified. - if ($current_company) - { - $data['current-company'] = $current_company; - } - - // Check if title is specified. - if ($title) - { - $data['title'] = $title; - } - - // Check if current_title is specified. - if ($current_title) - { - $data['current-title'] = $current_title; - } - - // Check if school_name is specified. - if ($school_name) - { - $data['school-name'] = $school_name; - } - - // Check if current_school is specified. - if ($current_school) - { - $data['current-school'] = $current_school; - } - - // Check if country_code is specified. - if ($country_code) - { - $data['country-code'] = $country_code; - } - - // Check if postal_code is specified. - if ($postal_code) - { - $data['postal-code'] = $postal_code; - } - - // Check if distance is specified. - if ($distance) - { - $data['distance'] = $distance; - } - - // Check if facets is specified. - if ($facets) - { - $data['facets'] = $facets; - } - - // Check if facet is specified. - if ($facet) - { - $data['facet'] = array(); - - for ($i = 0; $i < count($facet); $i++) - { - if ($facet[$i]) - { - if ($i == 0) - { - $data['facet'][] = 'location,' . $facet[$i]; - } - - if ($i == 1) - { - $data['facet'][] = 'industry,' . $facet[$i]; - } - - if ($i == 2) - { - $data['facet'][] = 'network,' . $facet[$i]; - } - - if ($i == 3) - { - $data['facet'][] = 'language,' . $facet[$i]; - } - - if ($i == 4) - { - $data['facet'][] = 'current-company,' . $facet[$i]; - } - - if ($i == 5) - { - $data['facet'][] = 'past-company,' . $facet[$i]; - } - - if ($i == 6) - { - $data['facet'][] = 'school,' . $facet[$i]; - } - } - } - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if count is specified. - if ($count != 10) - { - $data['count'] = $count; - } - - // Check if sort is specified. - if ($sort) - { - $data['sort'] = $sort; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - if (strpos($fields, 'api-standard-profile-request') === false) - { - return json_decode($response->body); - } - - // Get header name. - $name = explode('"name": "', $response->body); - $name = explode('"', $name[1]); - $name = $name[0]; - - // Get header value. - $value = explode('"value": "', $response->body); - $value = explode('"', $value[1]); - $value = $value[0]; - - // Get request url. - $url = explode('"url": "', $response->body); - $url = explode('"', $url[1]); - $url = $url[0]; - - // Build header for out of network profile. - $header[$name] = $value; - - // Send the request. - $response = $this->oauth->oauthRequest($url, 'GET', $parameters, $data, $header); - - return json_decode($response->body); - } -} diff --git a/libraries/joomla/linkedin/stream.php b/libraries/joomla/linkedin/stream.php deleted file mode 100644 index ea5e979563366..0000000000000 --- a/libraries/joomla/linkedin/stream.php +++ /dev/null @@ -1,625 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/shares'; - - // Check if twitter is true. - if ($twitter) - { - $base .= '?twitter-post=true'; - } - - // Build xml. - $xml = ' - - ' . $visibility . ' - '; - - // Check if comment specified. - if ($comment) - { - $xml .= '' . $comment . ''; - } - - // Check if title and url are specified. - if ($title && $url) - { - $xml .= ' - ' . $title . ' - ' . $url . ''; - - // Check if image is specified. - if ($image) - { - $xml .= '' . $image . ''; - } - - // Check if descrption id specified. - if ($description) - { - $xml .= '' . $description . ''; - } - - $xml .= ''; - } - elseif (!$comment) - { - throw new RuntimeException('Post must contain comment and/or (title and url).'); - } - - $xml .= ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to reshare an existing share. - * - * @param string $visibility One of anyone: all members or connections-only: connections only. - * @param string $id The unique identifier for a share. - * @param string $comment Text of member's comment. - * @param boolean $twitter True to have LinkedIn pass the status message along to a member's tethered Twitter account. - * - * @return array The decoded JSON response - * - * @since 13.1 - * @throws RuntimeException - */ - public function reshare($visibility, $id, $comment = null, $twitter = false) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/shares'; - - // Check if twitter is true. - if ($twitter) - { - $base .= '?twitter-post=true'; - } - - // Build xml. - $xml = ' - - ' . $visibility . ' - '; - - // Check if comment specified. - if ($comment) - { - $xml .= '' . $comment . ''; - } - - $xml .= ' - - ' . $id . ' - - - '; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to get a particular member's current share. - * - * @param string $id Member id of the profile you want. - * @param string $url The public profile URL. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getCurrentShare($id = null, $url = null) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if a member id is specified. - if ($id) - { - $base .= 'id=' . $id; - } - elseif (!$url) - { - $base .= '~'; - } - - // Check if profile url is specified. - if ($url) - { - $base .= 'url=' . $this->oauth->safeEncode($url); - } - - $base .= ':(current-share)'; - - // Set request parameters. - $data['format'] = 'json'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get a particular member's current share. - * - * @param string $id Member id of the profile you want. - * @param string $url The public profile URL. - * @param boolean $self Used to return member's feed. Omitted to return aggregated network feed. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getShareStream($id = null, $url = null, $self = true) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if a member id is specified. - if ($id) - { - $base .= $id; - } - elseif (!$url) - { - $base .= '~'; - } - - // Check if profile url is specified. - if ($url) - { - $base .= 'url=' . $this->oauth->safeEncode($url); - } - - $base .= '/network'; - - // Set request parameters. - $data['format'] = 'json'; - $data['type'] = 'SHAR'; - - // Check if self is true - if ($self) - { - $data['scope'] = 'self'; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get the users network updates. - * - * @param string $id Member id. - * @param boolean $self Used to return member's feed. Omitted to return aggregated network feed. - * @param mixed $type String containing any valid Network Update Type from the table or an array of strings - * to specify more than one Network Update type. - * @param integer $count Number of updates to return, with a maximum of 250. - * @param integer $start The offset by which to start Network Update pagination. - * @param string $after Timestamp after which to retrieve updates. - * @param string $before Timestamp before which to retrieve updates. - * @param boolean $hidden Whether to display updates from people the member has chosen to "hide" from their update stream. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getNetworkUpdates($id = null, $self = true, $type = null, $count = 0, $start = 0, $after = null, $before = null, - $hidden = false) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/'; - - // Check if a member id is specified. - if ($id) - { - $base .= $id; - } - else - { - $base .= '~'; - } - - $base .= '/network/updates'; - - // Set request parameters. - $data['format'] = 'json'; - - // Check if self is true. - if ($self) - { - $data['scope'] = 'self'; - } - - // Check if type is specified. - if ($type) - { - $data['type'] = $type; - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if start is specified. - if ($start > 0) - { - $data['start'] = $start; - } - - // Check if after is specified. - if ($after) - { - $data['after'] = $after; - } - - // Check if before is specified. - if ($before > 0) - { - $data['before'] = $before; - } - - // Check if hidden is true. - if ($hidden) - { - $data['hidden'] = $hidden; - } - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get information about the current member's network. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getNetworkStats() - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/network/network-stats'; - - // Set request parameters. - $data['format'] = 'json'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to get the users network updates. - * - * @param string $body The actual content of the update. You can use HTML to include links to the user name and the content the user - * created. Other HTML tags are not supported. All body text should be HTML entity escaped and UTF-8 compliant. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function postNetworkUpdate($body) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/person-activities'; - - // Build the xml. - $xml = ' - linkedin-html - ' . $body . ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to retrieve all comments for a given network update. - * - * @param string $key update/update-key representing an update. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getComments($key) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/network/updates/key=' . $key . '/update-comments'; - - // Set request parameters. - $data['format'] = 'json'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to post a new comment to an existing update. - * - * @param string $key update/update-key representing an update. - * @param string $comment Maximum length of 700 characters - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function postComment($key, $comment) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 201); - - // Set the API base - $base = '/v1/people/~/network/updates/key=' . $key . '/update-comments'; - - // Build the xml. - $xml = ' - ' . $comment . ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - return $response; - } - - /** - * Method to retrieve the complete list of people who liked an update. - * - * @param string $key update/update-key representing an update. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function getLikes($key) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = '/v1/people/~/network/updates/key=' . $key . '/likes'; - - // Set request parameters. - $data['format'] = 'json'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data); - - return json_decode($response->body); - } - - /** - * Method to like or unlike an update. - * - * @param string $key Update/update-key representing an update. - * @param boolean $like True to like update, false otherwise. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - private function _likeUnlike($key, $like) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the success response code. - $this->oauth->setOption('success_code', 204); - - // Set the API base - $base = '/v1/people/~/network/updates/key=' . $key . '/is-liked'; - - // Build xml. - $xml = '' . $this->booleanToString($like) . ''; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response; - } - - /** - * Method used to like an update. - * - * @param string $key Update/update-key representing an update. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function like($key) - { - return $this->_likeUnlike($key, true); - } - - /** - * Method used to unlike an update. - * - * @param string $key Update/update-key representing an update. - * - * @return array The decoded JSON response - * - * @since 13.1 - */ - public function unlike($key) - { - return $this->_likeUnlike($key, false); - } -} diff --git a/libraries/joomla/log/logger/callback.php b/libraries/joomla/log/logger/callback.php index 24e8a84fac03a..acf1bb7a492b4 100644 --- a/libraries/joomla/log/logger/callback.php +++ b/libraries/joomla/log/logger/callback.php @@ -55,7 +55,6 @@ public function __construct(array &$options) * @return boolean True on success. * * @since 12.2 - * @throws LogException */ public function addEntry(JLogEntry $entry) { diff --git a/libraries/joomla/mail/mail.php b/libraries/joomla/mail/mail.php index 25f0d44dba50d..ef3acd38e920e 100644 --- a/libraries/joomla/mail/mail.php +++ b/libraries/joomla/mail/mail.php @@ -9,6 +9,9 @@ defined('JPATH_PLATFORM') or die; +use PHPMailer\PHPMailer\Exception as phpmailerException; +use PHPMailer\PHPMailer\PHPMailer; + /** * Email Class. Provides a common interface to send email from the Joomla! Platform * @@ -74,12 +77,12 @@ public function __construct($exceptions = true) */ public static function getInstance($id = 'Joomla', $exceptions = true) { - if (empty(self::$instances[$id])) + if (empty(static::$instances[$id])) { - self::$instances[$id] = new static($exceptions); + static::$instances[$id] = new static($exceptions); } - return self::$instances[$id]; + return static::$instances[$id]; } /** diff --git a/libraries/joomla/oauth1/client.php b/libraries/joomla/oauth1/client.php index 4f0f4781a2dc8..9d3493a44ab30 100644 --- a/libraries/joomla/oauth1/client.php +++ b/libraries/joomla/oauth1/client.php @@ -70,8 +70,8 @@ public function __construct(Registry $options = null, JHttp $client = null, JInp { $this->options = isset($options) ? $options : new Registry; $this->client = isset($client) ? $client : JHttpFactory::getHttp($this->options); - $this->input = isset($input) ? $input : JFactory::getApplication()->input; $this->application = isset($application) ? $application : new JApplicationWeb; + $this->input = isset($input) ? $input : $this->application->input; $this->version = isset($version) ? $version : '1.0a'; } @@ -122,10 +122,10 @@ public function authenticate() // Callback else { - $session = JFactory::getSession(); + $session = $this->application->getSession(); // Get token form session. - $this->token = array('key' => $session->get('key', null, 'oauth_token'), 'secret' => $session->get('secret', null, 'oauth_token')); + $this->token = array('key' => $session->get('oauth_token.key', null), 'secret' => $session->get('oauth_token.secret', null)); // Verify the returned request token. if (strcmp($this->token['key'], $this->input->get('oauth_token')) !== 0) @@ -183,9 +183,9 @@ private function _generateRequestToken() $this->token = array('key' => $params['oauth_token'], 'secret' => $params['oauth_token_secret']); // Save the request token in session - $session = JFactory::getSession(); - $session->set('key', $this->token['key'], 'oauth_token'); - $session->set('secret', $this->token['secret'], 'oauth_token'); + $session = $this->application->getSession(); + $session->set('oauth_token.key', $this->token['key']); + $session->set('oauth_token.secret', $this->token['secret']); } /** diff --git a/libraries/joomla/openstreetmap/changesets.php b/libraries/joomla/openstreetmap/changesets.php deleted file mode 100644 index 339e36d5433db..0000000000000 --- a/libraries/joomla/openstreetmap/changesets.php +++ /dev/null @@ -1,317 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - 'oauth_token_secret' => $token['secret'], - ); - - // Set the API base - $base = 'changeset/create'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $xml = ' - '; - - if (!empty($changesets)) - { - // Create Changeset element for every changeset - foreach ($changesets as $tags) - { - $xml .= ''; - - if (!empty($tags)) - { - // Create a list of tags for each changeset - foreach ($tags as $key => $value) - { - $xml .= ''; - } - } - - $xml .= ''; - } - } - - $xml .= ''; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to read a changeset - * - * @param integer $id identifier of the changeset - * - * @return array The XML response about a changeset - * - * @since 13.1 - */ - public function readChangeset($id) - { - // Set the API base - $base = 'changeset/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->changeset; - } - - /** - * Method to update a changeset - * - * @param integer $id Identifier of the changeset - * @param array $tags Array of tags to update - * - * @return array The XML response of updated changeset - * - * @since 13.1 - */ - public function updateChangeset($id, $tags = array()) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'changeset/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Create a list of tags to update changeset - $tag_list = ''; - - if (!empty($tags)) - { - foreach ($tags as $key => $value) - { - $tag_list .= ''; - } - } - - $xml = ' - - ' - . $tag_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string->changeset; - } - - /** - * Method to close a changeset - * - * @param integer $id identifier of the changeset - * - * @return void - * - * @since 13.1 - */ - public function closeChangeset($id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'changeset/' . $id . '/close'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['format'] = 'text/xml'; - - // Send the request. - $this->oauth->oauthRequest($path, 'PUT', $parameters, $header); - } - - /** - * Method to download a changeset - * - * @param integer $id Identifier of the changeset - * - * @return array The XML response of requested changeset - * - * @since 13.1 - */ - public function downloadChangeset($id) - { - // Set the API base - $base = 'changeset/' . $id . '/download'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->create; - } - - /** - * Method to expand the bounding box of a changeset - * - * @param integer $id Identifier of the changeset - * @param array $nodes List of lat lon about nodes - * - * @return array The XML response of changed changeset - * - * @since 13.1 - */ - public function expandBBoxChangeset($id, $nodes) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'changeset/' . $id . '/expand_bbox'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Create a list of tags to update changeset - $node_list = ''; - - if (!empty($nodes)) - { - foreach ($nodes as $node) - { - $node_list .= ''; - } - } - - $xml = ' - - ' - . $node_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string->changeset; - } - - /** - * Method to query on changesets - * - * @param string $param Parameters for query - * - * @return array The XML response - * - * @since 13.1 - */ - public function queryChangeset($param) - { - // Set the API base - $base = 'changesets/' . $param; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->osm; - } - - /** - * Method to upload a diff to a changeset - * - * @param string $xml Diff data to upload - * @param integer $id Identifier of the changeset - * - * @return array The XML response of result - * - * @since 13.1 - */ - public function diffUploadChangeset($xml, $id) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'changeset/' . $id . '/upload'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string->diffResult; - } -} diff --git a/libraries/joomla/openstreetmap/elements.php b/libraries/joomla/openstreetmap/elements.php deleted file mode 100644 index 2377fb4fa323a..0000000000000 --- a/libraries/joomla/openstreetmap/elements.php +++ /dev/null @@ -1,550 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'node/create'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $tag_list = ''; - - // Create XML node - if (!empty($tags)) - { - foreach ($tags as $key => $value) - { - $tag_list .= ''; - } - } - - $xml = ' - - ' - . $tag_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to create a way - * - * @param integer $changeset Changeset id - * @param array $tags Array of tags for a way - * @param array $nds Node ids to refer - * - * @return array The XML response - * - * @since 13.1 - */ - public function createWay($changeset, $tags, $nds) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'way/create'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $tag_list = ''; - - // Create XML node - if (!empty($tags)) - { - foreach ($tags as $key => $value) - { - $tag_list .= ''; - } - } - - $nd_list = ''; - - if (!empty($nds)) - { - foreach ($nds as $value) - { - $nd_list .= ''; - } - } - - $xml = ' - - ' - . $tag_list - . $nd_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to create a relation - * - * @param integer $changeset Changeset id - * @param array $tags Array of tags for a relation - * @param array $members Array of members for a relation - * eg: $members = array(array("type"=>"node", "role"=>"stop", "ref"=>"123"), array("type"=>"way", "ref"=>"123")) - * - * @return array The XML response - * - * @since 13.1 - */ - public function createRelation($changeset, $tags, $members) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'relation/create'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $tag_list = ''; - - // Create XML node - if (!empty($tags)) - { - foreach ($tags as $key => $value) - { - $tag_list .= ''; - } - } - - // Members - $member_list = ''; - - if (!empty($members)) - { - foreach ($members as $member) - { - if ($member['type'] == "node") - { - $member_list .= ''; - } - elseif ($member['type'] == "way") - { - $member_list .= ''; - } - } - } - - $xml = ' - - ' - . $tag_list - . $member_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to read an element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function readElement($element, $id) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - // Set the API base - $base = $element . '/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->$element; - } - - /** - * Method to update an Element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param string $xml Full reperentation of the element with a version number - * @param integer $id Element identifier - * - * @return array The xml response - * - * @since 13.1 - * @throws DomainException - */ - public function updateElement($element, $xml, $id) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = $element . '/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to delete an element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * @param integer $version Element version - * @param integer $changeset Changeset identifier - * @param float $latitude Latitude of the element - * @param float $longitude Longitude of the element - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function deleteElement($element, $id, $version, $changeset, $latitude = null, $longitude = null) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = $element . '/' . $id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Create xml - $xml = ' - - <' . $element . ' id="' . $id . '" version="' . $version . '" changeset="' . $changeset . '"'; - - if (!empty($latitude) && !empty($longitude)) - { - $xml .= ' lat="' . $latitude . '" lon="' . $longitude . '"'; - } - - $xml .= '/>'; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'DELETE', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to get history of an element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function historyOfElement($element, $id) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - // Set the API base - $base = $element . '/' . $id . '/history'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->$element; - } - - /** - * Method to get details about a version of an element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * @param integer $version Element version - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function versionOfElement($element, $id, $version) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - // Set the API base - $base = $element . '/' . $id . '/' . $version; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->$element; - } - - /** - * Method to get data about multiple ids of an element [node|way|relation] - * - * @param string $element [nodes|ways|relations] - use plural word - * @param string $params Comma separated list of ids belonging to type $element - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function multiFetchElements($element, $params) - { - if ($element != 'nodes' && $element != 'ways' && $element != 'relations') - { - throw new DomainException("Element should be nodes, ways or relations"); - } - - // Get singular word - $single_element = substr($element, 0, strlen($element) - 1); - - // Set the API base, $params is a string with comma separated values - $base = $element . '?' . $element . "=" . $params; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->$single_element; - } - - /** - * Method to get relations for an Element [node|way|relation] - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function relationsForElement($element, $id) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - // Set the API base - $base = $element . '/' . $id . '/relations'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->$element; - } - - /** - * Method to get ways for a Node element - * - * @param integer $id Node identifier - * - * @return array The XML response - * - * @since 13.1 - */ - public function waysForNode($id) - { - // Set the API base - $base = 'node/' . $id . '/ways'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->way; - } - - /** - * Method to get full information about an element [way|relation] - * - * @param string $element [way|relation] - * @param integer $id Identifier - * - * @return array The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function fullElement($element, $id) - { - if ($element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a way or a relation"); - } - - // Set the API base - $base = $element . '/' . $id . '/full'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path); - - return $xml_string->node; - } - - /** - * Method used by the DWG to hide old versions of elements containing data privacy or copyright infringements - * - * @param string $element [node|way|relation] - * @param integer $id Element identifier - * @param integer $version Element version - * @param integer $redaction_id Redaction id - * - * @return array The xml response - * - * @since 13.1 - * @throws DomainException - */ - public function redaction($element, $id, $version, $redaction_id) - { - if ($element != 'node' && $element != 'way' && $element != 'relation') - { - throw new DomainException("Element should be a node, a way or a relation"); - } - - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = $element . '/' . $id . '/' . $version . '/redact?redaction=' . $redaction_id; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } -} diff --git a/libraries/joomla/openstreetmap/gps.php b/libraries/joomla/openstreetmap/gps.php deleted file mode 100644 index 18b5cdbe6eb59..0000000000000 --- a/libraries/joomla/openstreetmap/gps.php +++ /dev/null @@ -1,141 +0,0 @@ -getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', array()); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } - - /** - * Method to upload GPS Traces - * - * @param string $file File name that contains trace points - * @param string $description Description on trace points - * @param string $tags Tags for trace - * @param integer $public 1 for public, 0 for private - * @param string $visibility One of the following: private, public, trackable, identifiable - * @param string $username Username - * @param string $password Password - * - * @return JHttpResponse The response - * - * @since 13.1 - */ - public function uploadTrace($file, $description, $tags, $public, $visibility, $username, $password) - { - // Set parameters. - $parameters = array( - 'file' => $file, - 'description' => $description, - 'tags' => $tags, - 'public' => $public, - 'visibility' => $visibility, - ); - - // Set the API base - $base = 'gpx/create'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - $header['Content-Type'] = 'multipart/form-data'; - - $header = array_merge($header, $parameters); - $header = array_merge($header, array('Authorization' => 'Basic ' . base64_encode($username . ':' . $password))); - - // Send the request. - $response = $this->sendRequest($path, 'POST', $header, array()); - - return $response; - } - - /** - * Method to download Trace details - * - * @param integer $id Trace identifier - * @param string $username Username - * @param string $password Password - * - * @return array The XML response - * - * @since 13.1 - */ - public function downloadTraceMetadetails($id, $username, $password) - { - // Set the API base - $base = 'gpx/' . $id . '/details'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path, 'GET', array('Authorization' => 'Basic ' . base64_encode($username . ':' . $password))); - - return $xml_string; - } - - /** - * Method to download Trace data - * - * @param integer $id Trace identifier - * @param string $username Username - * @param string $password Password - * - * @return array The XML response - * - * @since 13.1 - */ - public function downloadTraceMetadata($id, $username, $password) - { - // Set the API base - $base = 'gpx/' . $id . '/data'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $xml_string = $this->sendRequest($path, 'GET', array('Authorization' => 'Basic ' . base64_encode($username . ':' . $password))); - - return $xml_string; - } -} diff --git a/libraries/joomla/openstreetmap/info.php b/libraries/joomla/openstreetmap/info.php deleted file mode 100644 index dd635d837a4c5..0000000000000 --- a/libraries/joomla/openstreetmap/info.php +++ /dev/null @@ -1,93 +0,0 @@ -getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', array()); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } - - /** - * Method to retrieve map data of a bounding box - * - * @param float $left Left boundary - * @param float $bottom Bottom boundary - * @param float $right Right boundary - * @param float $top Top boundary - * - * @return array The XML response - * - * @since 13.1 - */ - public function retrieveMapData($left, $bottom, $right, $top) - { - // Set the API base - $base = 'map?bbox=' . $left . ',' . $bottom . ',' . $right . ',' . $top; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', array()); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } - - /** - * Method to retrieve permissions for current user - * - * @return array The XML response - * - * @since 13.1 - */ - public function retrievePermissions() - { - // Set the API base - $base = 'permissions'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', array()); - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } -} diff --git a/libraries/joomla/openstreetmap/oauth.php b/libraries/joomla/openstreetmap/oauth.php deleted file mode 100644 index e2c6d829441dc..0000000000000 --- a/libraries/joomla/openstreetmap/oauth.php +++ /dev/null @@ -1,89 +0,0 @@ -options = isset($options) ? $options : new Registry; - - $this->options->def('accessTokenURL', 'http://www.openstreetmap.org/oauth/access_token'); - $this->options->def('authoriseURL', 'http://www.openstreetmap.org/oauth/authorize'); - $this->options->def('requestTokenURL', 'http://www.openstreetmap.org/oauth/request_token'); - - /* - $this->options->def('accessTokenURL', 'http://api06.dev.openstreetmap.org/oauth/access_token'); - $this->options->def('authoriseURL', 'http://api06.dev.openstreetmap.org/oauth/authorize'); - $this->options->def('requestTokenURL', 'http://api06.dev.openstreetmap.org/oauth/request_token'); - */ - - // Call the JOauth1Client constructor to setup the object. - parent::__construct($this->options, $client, $input, null, '1.0'); - } - - /** - * Method to verify if the access token is valid by making a request to an API endpoint. - * - * @return boolean Returns true if the access token is valid and false otherwise. - * - * @since 13.1 - */ - public function verifyCredentials() - { - return true; - } - - /** - * Method to validate a response. - * - * @param string $url The request URL. - * @param JHttpResponse $response The response to validate. - * - * @return void - * - * @since 13.1 - * @throws DomainException - */ - public function validateResponse($url, $response) - { - if ($response->code != 200) - { - $error = htmlspecialchars($response->body, ENT_COMPAT, 'UTF-8'); - - throw new DomainException($error, $response->code); - } - } -} diff --git a/libraries/joomla/openstreetmap/object.php b/libraries/joomla/openstreetmap/object.php deleted file mode 100644 index d6aae11da2598..0000000000000 --- a/libraries/joomla/openstreetmap/object.php +++ /dev/null @@ -1,132 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - $this->oauth = $oauth; - } - - /** - * Get an option from the JOpenstreetmapObject instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 13.1 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JOpenstreetmapObject instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JOpenstreetmapObject This object for method chaining. - * - * @since 13.1 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } - - /** - * Method to send the request which does not require authentication. - * - * @param string $path The path of the request to make - * @param string $method The request method. - * @param array $headers The headers passed in the request. - * @param mixed $data Either an associative array or a string to be sent with the post request. - * - * @return SimpleXMLElement The XML response - * - * @since 13.1 - * @throws DomainException - */ - public function sendRequest($path, $method = 'GET', $headers = array(), $data = '') - { - // Send the request. - switch ($method) - { - case 'GET': - $response = $this->client->get($path, $headers); - break; - - case 'POST': - $response = $this->client->post($path, $data, $headers); - break; - } - - // Validate the response code. - if ($response->code != 200) - { - $error = htmlspecialchars($response->body, ENT_COMPAT, 'UTF-8'); - - throw new DomainException($error, $response->code); - } - - $xml_string = simplexml_load_string($response->body); - - return $xml_string; - } -} diff --git a/libraries/joomla/openstreetmap/openstreetmap.php b/libraries/joomla/openstreetmap/openstreetmap.php deleted file mode 100644 index 0f68f786def45..0000000000000 --- a/libraries/joomla/openstreetmap/openstreetmap.php +++ /dev/null @@ -1,164 +0,0 @@ -oauth = $oauth; - $this->options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - - // Setup the default API url if not already set. - $this->options->def('api.url', 'http://api.openstreetmap.org/api/0.6/'); - - // $this->options->def('api.url', 'http://api06.dev.openstreetmap.org/api/0.6/'); - } - - /** - * Method to get object instances - * - * @param string $name Name of property to retrieve - * - * @return JOpenstreetmapObject Openstreetmap API object - * - * @since 13.1 - * @throws InvalidArgumentException - */ - public function __get($name) - { - $class = 'JOpenstreetmap' . ucfirst($name); - - if (class_exists($class)) - { - if (false == isset($this->$name)) - { - $this->$name = new $class($this->options, $this->client, $this->oauth); - } - - return $this->$name; - } - - throw new InvalidArgumentException(sprintf('Argument %s produced an invalid class name: %s', $name, $class)); - } - - /** - * Get an option from the JOpenstreetmap instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 13.1 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the Openstreetmap instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JOpenstreetmap This object for method chaining. - * - * @since 13.1 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/openstreetmap/user.php b/libraries/joomla/openstreetmap/user.php deleted file mode 100644 index da956b94c1785..0000000000000 --- a/libraries/joomla/openstreetmap/user.php +++ /dev/null @@ -1,156 +0,0 @@ -oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'user/details'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters); - - return $response->body; - } - - /** - * Method to get preferences - * - * @return array The XML response - * - * @since 13.1 - */ - public function getPreferences() - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'user/preferences'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'GET', $parameters); - - return $response->body; - } - - /** - * Method to replace user preferences - * - * @param array $preferences Array of new preferences - * - * @return array The XML response - * - * @since 13.1 - */ - public function replacePreferences($preferences) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'user/preferences'; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Create a list of preferences - $preference_list = ''; - - if (!empty($preferences)) - { - foreach ($preferences as $key => $value) - { - $preference_list .= ''; - } - } - - $xml = ' - - ' - . $preference_list . - ' - '; - - $header['Content-Type'] = 'text/xml'; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $xml, $header); - - return $response->body; - } - - /** - * Method to change user preferences - * - * @param string $key Key of the preference - * @param string $preference New value for preference - * - * @return array The XML response - * - * @since 13.1 - */ - public function changePreference($key, $preference) - { - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters = array( - 'oauth_token' => $token['key'], - ); - - // Set the API base - $base = 'user/preferences/' . $key; - - // Build the request path. - $path = $this->getOption('api.url') . $base; - - // Send the request. - $response = $this->oauth->oauthRequest($path, 'PUT', $parameters, $preference); - - return $response->body; - } -} diff --git a/libraries/joomla/twitter/block.php b/libraries/joomla/twitter/block.php deleted file mode 100644 index c9a165760ef22..0000000000000 --- a/libraries/joomla/twitter/block.php +++ /dev/null @@ -1,161 +0,0 @@ -checkRateLimit('blocks', 'ids'); - - $data = array(); - - // Check if stringify_ids is specified - if (!is_null($stringify_ids)) - { - $data['stringify_ids'] = $stringify_ids; - } - - // Check if cursor is specified - if (!is_null($stringify_ids)) - { - $data['cursor'] = $cursor; - } - - // Set the API path - $path = '/blocks/ids.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to block the specified user from following the authenticating user. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function block($user, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('blocks', 'create'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_statuses is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Set the API path - $path = '/blocks/create.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to unblock the specified user from following the authenticating user. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function unblock($user, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('blocks', 'destroy'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_statuses is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Set the API path - $path = '/blocks/destroy.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/directmessages.php b/libraries/joomla/twitter/directmessages.php deleted file mode 100644 index 7d11c5fe586c3..0000000000000 --- a/libraries/joomla/twitter/directmessages.php +++ /dev/null @@ -1,219 +0,0 @@ -checkRateLimit('direct_messages'); - - // Set the API path - $path = '/direct_messages.json'; - - // Check if since_id is specified. - if ($since_id) - { - $data['since_id'] = $since_id; - } - - // Check if max_id is specified. - if ($max_id) - { - $data['max_id'] = $max_id; - } - - // Check if count is specified. - if ($count) - { - $data['count'] = $count; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified. - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get the most recent direct messages sent by the authenticating user. - * - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. - * @param integer $count Specifies the number of direct messages to try and retrieve, up to a maximum of 200. - * @param integer $page Specifies the page of results to retrieve. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getSentDirectMessages($since_id = 0, $max_id = 0, $count = 20, $page = 0, $entities = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('direct_messages', 'sent'); - - // Set the API path - $path = '/direct_messages/sent.json'; - - // Check if since_id is specified. - if ($since_id) - { - $data['since_id'] = $since_id; - } - - // Check if max_id is specified. - if ($max_id) - { - $data['max_id'] = $max_id; - } - - // Check if count is specified. - if ($count) - { - $data['count'] = $count; - } - - // Check if page is specified. - if ($page) - { - $data['page'] = $page; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to send a new direct message to the specified user from the authenticating user. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param string $text The text of your direct message. Be sure to keep the message under 140 characters. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function sendDirectMessages($user, $text) - { - // Set the API path - $path = '/direct_messages/new.json'; - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - $data['text'] = $text; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to get a single direct message, specified by an id parameter. - * - * @param integer $id The ID of the direct message. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getDirectMessagesById($id) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('direct_messages', 'show'); - - // Set the API path - $path = '/direct_messages/show.json'; - - $data['id'] = $id; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to delete the direct message specified in the required ID parameter. - * - * @param integer $id The ID of the direct message. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function deleteDirectMessages($id, $entities = null) - { - // Set the API path - $path = '/direct_messages/destroy.json'; - - $data['id'] = $id; - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/favorites.php b/libraries/joomla/twitter/favorites.php deleted file mode 100644 index c7d475d07ecec..0000000000000 --- a/libraries/joomla/twitter/favorites.php +++ /dev/null @@ -1,133 +0,0 @@ -checkRateLimit('favorites', 'list'); - - // Set the API path. - $path = '/favorites/list.json'; - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - - // Set the count string - $data['count'] = $count; - - // Check if since_id is specified. - if ($since_id > 0) - { - $data['since_id'] = $since_id; - } - - // Check if max_id is specified. - if ($max_id > 0) - { - $data['max_id'] = $max_id; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to favorite the status specified in the ID parameter as the authenticating user - * - * @param integer $id The numerical ID of the desired status. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety - * of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function createFavorites($id, $entities = null) - { - // Set the API path. - $path = '/favorites/create.json'; - - $data['id'] = $id; - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to un-favorites the status specified in the ID parameter as the authenticating user. - * - * @param integer $id The numerical ID of the desired status. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety - * of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function deleteFavorites($id, $entities = null) - { - // Set the API path. - $path = '/favorites/destroy.json'; - - $data['id'] = $id; - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/friends.php b/libraries/joomla/twitter/friends.php deleted file mode 100644 index 61fcca86a0279..0000000000000 --- a/libraries/joomla/twitter/friends.php +++ /dev/null @@ -1,460 +0,0 @@ -checkRateLimit('friends', 'ids'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if string_ids is true - if ($string_ids) - { - $data['stringify_ids'] = $string_ids; - } - - // Check if count is specified - if ($count > 0) - { - $data['count'] = $count; - } - - // Set the API path - $path = '/friends/ids.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to display detailed friend information between two users. - * - * @param mixed $user_a Either an integer containing the user ID or a string containing the screen name of the first user. - * @param mixed $user_b Either an integer containing the user ID or a string containing the screen name of the second user. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getFriendshipDetails($user_a, $user_b) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('friendships', 'show'); - - // Determine which type of data was passed for $user_a - if (is_numeric($user_a)) - { - $data['source_id'] = $user_a; - } - elseif (is_string($user_a)) - { - $data['source_screen_name'] = $user_a; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The first specified username is not in the correct format; must use integer or string'); - } - - // Determine which type of data was passed for $user_b - if (is_numeric($user_b)) - { - $data['target_id'] = $user_b; - } - elseif (is_string($user_b)) - { - $data['target_screen_name'] = $user_b; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The second specified username is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/friendships/show.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get an array of user IDs the specified user is followed by. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned - * is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor - * is provided, a value of -1 will be assumed, which is the first "page." - * @param boolean $string_ids Set to true to return IDs as strings, false to return as integers. - * @param integer $count Specifies the number of IDs attempt retrieval of, up to a maximum of 5,000 per distinct request. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getFollowerIds($user, $cursor = null, $string_ids = null, $count = 0) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('followers', 'ids'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/followers/ids.json'; - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if string_ids is specified - if (!is_null($string_ids)) - { - $data['stringify_ids'] = $string_ids; - } - - // Check if count is specified - if (!is_null($count)) - { - $data['count'] = $count; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to determine pending requests to follow the authenticating user. - * - * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned - * is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor - * is provided, a value of -1 will be assumed, which is the first "page." - * @param boolean $string_ids Set to true to return IDs as strings, false to return as integers. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getFriendshipsIncoming($cursor = null, $string_ids = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('friendships', 'incoming'); - - $data = array(); - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if string_ids is specified - if (!is_null($string_ids)) - { - $data['stringify_ids'] = $string_ids; - } - - // Set the API path - $path = '/friendships/incoming.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to determine every protected user for whom the authenticating user has a pending follow request. - * - * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned - * is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor - * is provided, a value of -1 will be assumed, which is the first "page." - * @param boolean $string_ids Set to true to return IDs as strings, false to return as integers. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getFriendshipsOutgoing($cursor = null, $string_ids = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('friendships', 'outgoing'); - - $data = array(); - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if string_ids is specified - if (!is_null($string_ids)) - { - $data['stringify_ids'] = $string_ids; - } - - // Set the API path - $path = '/friendships/outgoing.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Allows the authenticating users to follow the user specified in the ID parameter. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param boolean $follow Enable notifications for the target user. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function follow($user, $follow = false) - { - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if follow is true - if ($follow) - { - $data['follow'] = $follow; - } - - // Set the API path - $path = '/friendships/create.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Allows the authenticating users to unfollow the user specified in the ID parameter. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function unfollow($user) - { - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/friendships/destroy.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to get the relationship of the authenticating user to the comma separated list of up to 100 screen_names or user_ids provided. - * - * @param string $screen_name A comma separated list of screen names, up to 100 are allowed in a single request. - * @param string $id A comma separated list of user IDs, up to 100 are allowed in a single request. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getFriendshipsLookup($screen_name = null, $id = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('friendships', 'lookup'); - - // Set user IDs and screen names. - if ($id) - { - $data['user_id'] = $id; - } - - if ($screen_name) - { - $data['screen_name'] = $screen_name; - } - - if ($id == null && $screen_name == null) - { - // We don't have a valid entry - throw new RuntimeException('You must specify either a comma separated list of screen names, user IDs, or a combination of the two'); - } - - // Set the API path - $path = '/friendships/lookup.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Allows one to enable or disable retweets and device notifications from the specified user. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param boolean $device Enable/disable device notifications from the target user. - * @param boolean $retweets Enable/disable retweets from the target user. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function updateFriendship($user, $device = null, $retweets = null) - { - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if device is specified. - if (!is_null($device)) - { - $data['device'] = $device; - } - - // Check if retweets is specified. - if (!is_null($retweets)) - { - $data['retweets'] = $retweets; - } - - // Set the API path - $path = '/friendships/update.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to get the user ids that currently authenticated user does not want to see retweets from. - * - * @param boolean $string_ids Set to true to return IDs as strings, false to return as integers. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getFriendshipNoRetweetIds($string_ids = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('friendships', 'no_retweets/ids'); - - $data = array(); - - // Check if string_ids is specified - if (!is_null($string_ids)) - { - $data['stringify_ids'] = $string_ids; - } - - // Set the API path - $path = '/friendships/no_retweets/ids.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } -} diff --git a/libraries/joomla/twitter/help.php b/libraries/joomla/twitter/help.php deleted file mode 100644 index f65d890afa9a5..0000000000000 --- a/libraries/joomla/twitter/help.php +++ /dev/null @@ -1,58 +0,0 @@ -checkRateLimit('help', 'languages'); - - // Set the API path - $path = '/help/languages.json'; - - // Send the request. - return $this->sendRequest($path); - } - - /** - * Method to get the current configuration used by Twitter including twitter.com slugs which are not usernames, - * maximum photo resolutions, and t.co URL lengths. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getConfiguration() - { - // Check the rate limit for remaining hits - $this->checkRateLimit('help', 'configuration'); - - // Set the API path - $path = '/help/configuration.json'; - - // Send the request. - return $this->sendRequest($path); - } -} diff --git a/libraries/joomla/twitter/lists.php b/libraries/joomla/twitter/lists.php deleted file mode 100644 index 27bc0dfdea4b2..0000000000000 --- a/libraries/joomla/twitter/lists.php +++ /dev/null @@ -1,982 +0,0 @@ -checkRateLimit('lists', 'list'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if reverse is specified. - if (!is_null($reverse)) - { - $data['reverse'] = $reverse; - } - - // Set the API path - $path = '/lists/list.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get tweet timeline for members of the specified list - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name. - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) or equal to the specified ID. - * @param integer $count Specifies the number of results to retrieve per "page." - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities". This node offers a variety - * of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $include_rts When set to either true, t or 1, the list timeline will contain native retweets (if they exist) in addition - * to the standard stream of tweets. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getStatuses($list, $owner = null, $since_id = 0, $max_id = 0, $count = 0, $entities = null, $include_rts = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'statuses'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/statuses.json'; - - // Check if since_id is specified - if ($since_id > 0) - { - $data['since_id'] = $since_id; - } - - // Check if max_id is specified - if ($max_id > 0) - { - $data['max_id'] = $max_id; - } - - // Check if count is specified - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if include_rts is specified - if (!is_null($include_rts)) - { - $data['include_rts'] = $include_rts; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get the subscribers of the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name. - * @param integer $cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities". This node offers a variety - * of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getSubscribers($list, $owner = null, $cursor = null, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'subscribers'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/subscribers.json'; - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to remove multiple members from a list, by specifying a comma-separated list of member ids or screen names. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param string $user_id A comma separated list of user IDs, up to 100 are allowed in a single request. - * @param string $screen_name A comma separated list of screen names, up to 100 are allowed in a single request. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function deleteMembers($list, $user_id = null, $screen_name = null, $owner = null) - { - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username for owner is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - if ($user_id) - { - $data['user_id'] = $user_id; - } - - if ($screen_name) - { - $data['screen_name'] = $screen_name; - } - - if ($user_id == null && $screen_name == null) - { - // We don't have a valid entry - throw new RuntimeException('You must specify either a comma separated list of screen names, user IDs, or a combination of the two'); - } - - // Set the API path - $path = '/lists/members/destroy_all.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to subscribe the authenticated user to the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function subscribe($list, $owner = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'subscribers/create'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username for owner is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/subscribers/create.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to check if the specified user is a member of the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $user Either an integer containing the user ID or a string containing the screen name of the user to remove. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function isMember($list, $user, $owner = null, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'members/show'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/members/show.json'; - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to check if the specified user is a subscriber of the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $user Either an integer containing the user ID or a string containing the screen name of the user to remove. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function isSubscriber($list, $user, $owner = null, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'subscribers/show'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/subscribers/show.json'; - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to unsubscribe the authenticated user from the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function unsubscribe($list, $owner = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'subscribers/destroy'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/subscribers/destroy.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to add multiple members to a list, by specifying a comma-separated list of member ids or screen names. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param string $user_id A comma separated list of user IDs, up to 100 are allowed in a single request. - * @param string $screen_name A comma separated list of screen names, up to 100 are allowed in a single request. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function addMembers($list, $user_id = null, $screen_name = null, $owner = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'members/create_all'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - if ($user_id) - { - $data['user_id'] = $user_id; - } - - if ($screen_name) - { - $data['screen_name'] = $screen_name; - } - - if ($user_id == null && $screen_name == null) - { - // We don't have a valid entry - throw new RuntimeException('You must specify either a comma separated list of screen names, user IDs, or a combination of the two'); - } - - // Set the API path - $path = '/lists/members/create_all.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to get the members of the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities". This node offers a variety - * of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getMembers($list, $owner = null, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'members'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/members.json'; - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get the specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getListById($list, $owner = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'show'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/show.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param integer $count The amount of results to return per page. Defaults to 20. Maximum of 1,000 when using cursors. - * @param integer $cursor Breaks the results into pages. Provide a value of -1 to begin paging. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getSubscriptions($user, $count = 0, $cursor = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'subscriptions'); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Check if count is specified. - if ($count > 0) - { - $data['count'] = $count; - } - - // Check if cursor is specified. - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Set the API path - $path = '/lists/subscriptions.json'; - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to update the specified list - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * @param string $name The name of the list. - * @param string $mode Whether your list is public or private. Values can be public or private. If no mode is - * specified the list will be public. - * @param string $description The description to give the list. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function update($list, $owner = null, $name = null, $mode = null, $description = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'update'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Check if name is specified. - if ($name) - { - $data['name'] = $name; - } - - // Check if mode is specified. - if ($mode) - { - $data['mode'] = $mode; - } - - // Check if description is specified. - if ($description) - { - $data['description'] = $description; - } - - // Set the API path - $path = '/lists/update.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to create a new list for the authenticated user. - * - * @param string $name The name of the list. - * @param string $mode Whether your list is public or private. Values can be public or private. If no mode is - * specified the list will be public. - * @param string $description The description to give the list. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function create($name, $mode = null, $description = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'create'); - - // Check if name is specified. - if ($name) - { - $data['name'] = $name; - } - - // Check if mode is specified. - if ($mode) - { - $data['mode'] = $mode; - } - - // Check if description is specified. - if ($description) - { - $data['description'] = $description; - } - - // Set the API path - $path = '/lists/create.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to delete a specified list. - * - * @param mixed $list Either an integer containing the list ID or a string containing the list slug. - * @param mixed $owner Either an integer containing the user ID or a string containing the screen name of the owner. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function delete($list, $owner = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('lists', 'destroy'); - - // Determine which type of data was passed for $list - if (is_numeric($list)) - { - $data['list_id'] = $list; - } - elseif (is_string($list)) - { - $data['slug'] = $list; - - // In this case the owner is required. - if (is_numeric($owner)) - { - $data['owner_id'] = $owner; - } - elseif (is_string($owner)) - { - $data['owner_screen_name'] = $owner; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username for owner is not in the correct format; must use integer or string'); - } - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified list is not in the correct format; must use integer or string'); - } - - // Set the API path - $path = '/lists/destroy.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/oauth.php b/libraries/joomla/twitter/oauth.php deleted file mode 100644 index 5b810218f4211..0000000000000 --- a/libraries/joomla/twitter/oauth.php +++ /dev/null @@ -1,133 +0,0 @@ -options = isset($options) ? $options : new Registry; - - $this->options->def('accessTokenURL', 'https://api.twitter.com/oauth/access_token'); - $this->options->def('authenticateURL', 'https://api.twitter.com/oauth/authenticate'); - $this->options->def('authoriseURL', 'https://api.twitter.com/oauth/authorize'); - $this->options->def('requestTokenURL', 'https://api.twitter.com/oauth/request_token'); - - // Call the JOAuth1Client constructor to setup the object. - parent::__construct($this->options, $client, $input, $application); - } - - /** - * Method to verify if the access token is valid by making a request. - * - * @return boolean Returns true if the access token is valid and false otherwise. - * - * @since 12.3 - */ - public function verifyCredentials() - { - $token = $this->getToken(); - - // Set the parameters. - $parameters = array('oauth_token' => $token['key']); - - // Set the API base - $path = 'https://api.twitter.com/1.1/account/verify_credentials.json'; - - // Send the request. - $response = $this->oauthRequest($path, 'GET', $parameters); - - // Verify response - if ($response->code == 200) - { - return true; - } - else - { - return false; - } - } - - /** - * Ends the session of the authenticating user, returning a null cookie. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function endSession() - { - $token = $this->getToken(); - - // Set parameters. - $parameters = array('oauth_token' => $token['key']); - - // Set the API base - $path = 'https://api.twitter.com/1.1/account/end_session.json'; - - // Send the request. - $response = $this->oauthRequest($path, 'POST', $parameters); - - return json_decode($response->body); - } - - /** - * Method to validate a response. - * - * @param string $url The request URL. - * @param JHttpResponse $response The response to validate. - * - * @return void - * - * @since 12.3 - * @throws DomainException - */ - public function validateResponse($url, $response) - { - if (strpos($url, 'verify_credentials') === false && $response->code != 200) - { - $error = json_decode($response->body); - - if (property_exists($error, 'error')) - { - throw new DomainException($error->error); - } - else - { - $error = $error->errors; - throw new DomainException($error[0]->message, $error[0]->code); - } - } - } -} diff --git a/libraries/joomla/twitter/object.php b/libraries/joomla/twitter/object.php deleted file mode 100644 index 2c917fc154ae2..0000000000000 --- a/libraries/joomla/twitter/object.php +++ /dev/null @@ -1,228 +0,0 @@ -options = isset($options) ? $options : new Registry; - $this->client = isset($client) ? $client : new JHttp($this->options); - $this->oauth = $oauth; - } - - /** - * Method to check the rate limit for the requesting IP address - * - * @param string $resource A resource or a comma-separated list of resource families you want to know the current rate limit disposition for. - * @param string $action An action for the specified resource, if only one resource is specified. - * - * @return void - * - * @since 12.3 - * @throws RuntimeException - */ - public function checkRateLimit($resource = null, $action = null) - { - // Check the rate limit for remaining hits - $rate_limit = $this->getRateLimit($resource); - - $property = '/' . $resource; - - if (!is_null($action)) - { - $property .= '/' . $action; - } - - if ($rate_limit->resources->$resource->$property->remaining == 0) - { - // The IP has exceeded the Twitter API rate limit - throw new RuntimeException('This server has exceed the Twitter API rate limit for the given period. The limit will reset at ' - . $rate_limit->resources->$resource->$property->reset - ); - } - } - - /** - * Method to build and return a full request URL for the request. This method will - * add appropriate pagination details if necessary and also prepend the API url - * to have a complete URL for the request. - * - * @param string $path URL to inflect - * @param array $parameters The parameters passed in the URL. - * - * @return string The request URL. - * - * @since 12.3 - */ - public function fetchUrl($path, $parameters = null) - { - if ($parameters) - { - foreach ($parameters as $key => $value) - { - if (strpos($path, '?') === false) - { - $path .= '?' . $key . '=' . $value; - } - else - { - $path .= '&' . $key . '=' . $value; - } - } - } - - // Get a new JUri object fousing the api url and given path. - if (strpos($path, 'http://search.twitter.com/search.json') === false) - { - $uri = new JUri($this->options->get('api.url') . $path); - } - else - { - $uri = new JUri($path); - } - - return (string) $uri; - } - - /** - * Method to retrieve the rate limit for the requesting IP address - * - * @param string $resource A resource or a comma-separated list of resource families you want to know the current rate limit disposition for. - * - * @return array The JSON response decoded - * - * @since 12.3 - */ - public function getRateLimit($resource) - { - // Build the request path. - $path = '/application/rate_limit_status.json'; - - if (!is_null($resource)) - { - return $this->sendRequest($path, 'GET', array('resources' => $resource)); - } - - return $this->sendRequest($path); - } - - /** - * Method to send the request. - * - * @param string $path The path of the request to make - * @param string $method The request method. - * @param mixed $data Either an associative array or a string to be sent with the post request. - * @param array $headers An array of name-value pairs to include in the header of the request - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function sendRequest($path, $method = 'GET', $data = array(), $headers = array()) - { - // Get the access token. - $token = $this->oauth->getToken(); - - // Set parameters. - $parameters['oauth_token'] = $token['key']; - - // Send the request. - $response = $this->oauth->oauthRequest($this->fetchUrl($path), $method, $parameters, $data, $headers); - - if (strpos($path, 'update_with_media') !== false) - { - // Check Media Rate Limit. - $response_headers = $response->headers; - - if ($response_headers['x-mediaratelimit-remaining'] == 0) - { - // The IP has exceeded the Twitter API media rate limit - throw new RuntimeException('This server has exceed the Twitter API media rate limit for the given period. The limit will reset in ' - . $response_headers['x-mediaratelimit-reset'] . 'seconds.' - ); - } - } - - if (strpos($response->body, 'redirected') !== false) - { - return $response->headers['Location']; - } - - return json_decode($response->body); - } - - /** - * Get an option from the JTwitterObject instance. - * - * @param string $key The name of the option to get. - * - * @return mixed The option value. - * - * @since 12.3 - */ - public function getOption($key) - { - return $this->options->get($key); - } - - /** - * Set an option for the JTwitterObject instance. - * - * @param string $key The name of the option to set. - * @param mixed $value The option value to set. - * - * @return JTwitterObject This object for method chaining. - * - * @since 12.3 - */ - public function setOption($key, $value) - { - $this->options->set($key, $value); - - return $this; - } -} diff --git a/libraries/joomla/twitter/places.php b/libraries/joomla/twitter/places.php deleted file mode 100644 index aafcf3b764a71..0000000000000 --- a/libraries/joomla/twitter/places.php +++ /dev/null @@ -1,290 +0,0 @@ -checkRateLimit('geo', 'id/:place_id'); - - // Set the API path - $path = '/geo/id/' . $id . '.json'; - - // Send the request. - return $this->sendRequest($path); - } - - /** - * Method to get up to 20 places that can be used as a place_id when updating a status. - * - * @param float $lat The latitude to search around. - * @param float $long The longitude to search around. - * @param string $accuracy A hint on the "region" in which to search. If a number, then this is a radius in meters, - * but it can also take a string that is suffixed with ft to specify feet. - * @param string $granularity This is the minimal granularity of place types to return and must be one of: poi, neighborhood, - * city, admin or country. - * @param integer $max_results A hint as to the number of results to return. - * @param string $callback If supplied, the response will use the JSONP format with a callback of the given name. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getGeocode($lat, $long, $accuracy = null, $granularity = null, $max_results = 0, $callback = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('geo', 'reverse_geocode'); - - // Set the API path - $path = '/geo/reverse_geocode.json'; - - // Set the request parameters - $data['lat'] = $lat; - $data['long'] = $long; - - // Check if accuracy is specified - if ($accuracy) - { - $data['accuracy'] = $accuracy; - } - - // Check if granularity is specified - if ($granularity) - { - $data['granularity'] = $granularity; - } - - // Check if max_results is specified - if ($max_results) - { - $data['max_results'] = $max_results; - } - - // Check if callback is specified - if ($callback) - { - $data['callback'] = $callback; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to search for places that can be attached to a statuses/update. - * - * @param float $lat The latitude to search around. - * @param float $long The longitude to search around. - * @param string $query Free-form text to match against while executing a geo-based query, best suited for finding nearby - * locations by name. - * @param string $ip An IP address. - * @param string $granularity This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, - * admin or country. - * @param string $accuracy A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can - * also take a string that is suffixed with ft to specify feet. - * @param integer $max_results A hint as to the number of results to return. - * @param string $within This is the place_id which you would like to restrict the search results to. - * @param string $attribute This parameter searches for places which have this given street address. - * @param string $callback If supplied, the response will use the JSONP format with a callback of the given name. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function search($lat = null, $long = null, $query = null, $ip = null, $granularity = null, $accuracy = null, $max_results = 0, - $within = null, $attribute = null, $callback = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('geo', 'search'); - - // Set the API path - $path = '/geo/search.json'; - - // At least one of the following parameters must be provided: lat, long, ip, or query. - if ($lat == null && $long == null && $ip == null && $query == null) - { - throw new RuntimeException('At least one of the following parameters must be provided: lat, long, ip, or query.'); - } - - // Check if lat is specified. - if ($lat) - { - $data['lat'] = $lat; - } - - // Check if long is specified. - if ($long) - { - $data['long'] = $long; - } - - // Check if query is specified. - if ($query) - { - $data['query'] = rawurlencode($query); - } - - // Check if ip is specified. - if ($ip) - { - $data['ip'] = $ip; - } - - // Check if granularity is specified - if ($granularity) - { - $data['granularity'] = $granularity; - } - - // Check if accuracy is specified - if ($accuracy) - { - $data['accuracy'] = $accuracy; - } - - // Check if max_results is specified - if ($max_results) - { - $data['max_results'] = $max_results; - } - - // Check if within is specified - if ($within) - { - $data['contained_within'] = $within; - } - - // Check if attribute is specified - if ($attribute) - { - $data['attribute:street_address'] = rawurlencode($attribute); - } - - // Check if callback is specified - if ($callback) - { - $data['callback'] = $callback; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to locate places near the given coordinates which are similar in name. - * - * @param float $lat The latitude to search around. - * @param float $long The longitude to search around. - * @param string $name The name a place is known as. - * @param string $within This is the place_id which you would like to restrict the search results to. - * @param string $attribute This parameter searches for places which have this given street address. - * @param string $callback If supplied, the response will use the JSONP format with a callback of the given name. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getSimilarPlaces($lat, $long, $name, $within = null, $attribute = null, $callback = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('geo', 'similar_places'); - - // Set the API path - $path = '/geo/similar_places.json'; - - $data['lat'] = $lat; - $data['long'] = $long; - $data['name'] = rawurlencode($name); - - // Check if within is specified - if ($within) - { - $data['contained_within'] = $within; - } - - // Check if attribute is specified - if ($attribute) - { - $data['attribute:street_address'] = rawurlencode($attribute); - } - - // Check if callback is specified - if ($callback) - { - $data['callback'] = $callback; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to create a new place object at the given latitude and longitude. - * - * @param float $lat The latitude to search around. - * @param float $long The longitude to search around. - * @param string $name The name a place is known as. - * @param string $geo_token The token found in the response from geo/similar_places. - * @param string $within This is the place_id which you would like to restrict the search results to. - * @param string $attribute This parameter searches for places which have this given street address. - * @param string $callback If supplied, the response will use the JSONP format with a callback of the given name. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function createPlace($lat, $long, $name, $geo_token, $within, $attribute = null, $callback = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('geo', 'place'); - - $data['lat'] = $lat; - $data['long'] = $long; - $data['name'] = rawurlencode($name); - $data['token'] = $geo_token; - $data['contained_within'] = $within; - - // Check if attribute is specified - if ($attribute) - { - $data['attribute:street_address'] = rawurlencode($attribute); - } - - // Check if callback is specified - if ($callback) - { - $data['callback'] = $callback; - } - - // Set the API path - $path = '/geo/place.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/profile.php b/libraries/joomla/twitter/profile.php deleted file mode 100644 index 987ba62045e96..0000000000000 --- a/libraries/joomla/twitter/profile.php +++ /dev/null @@ -1,347 +0,0 @@ -checkRateLimit('account', 'update_profile'); - - $data = array(); - - // Check if name is specified. - if ($name) - { - $data['name'] = $name; - } - - // Check if url is specified. - if ($url) - { - $data['url'] = $url; - } - - // Check if location is specified. - if ($location) - { - $data['location'] = $location; - } - - // Check if description is specified. - if ($description) - { - $data['description'] = $description; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified. - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Set the API path - $path = '/account/update_profile.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to update the authenticating user's profile background image. This method can also be used to enable or disable the profile - * background image. - * - * @param string $image The background image for the profile. - * @param boolean $tile Whether or not to tile the background image. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * @param boolean $use Determines whether to display the profile background image or not. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function updateProfileBackgroundImage($image = null, $tile = false, $entities = null, $skip_status = null, $use = false) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('account', 'update_profile_background_image'); - - $data = array(); - - // Check if image is specified. - if ($image) - { - $data['image'] = "@{$image}"; - } - - // Check if url is true. - if ($tile) - { - $data['tile'] = $tile; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified. - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Check if use is true. - if ($use) - { - $data['use'] = $use; - } - - // Set the API path - $path = '/account/update_profile_background_image.json'; - - $header = array('Content-Type' => 'multipart/form-data', 'Expect' => ''); - - // Send the request. - return $this->sendRequest($path, 'POST', $data, $header); - } - - /** - * Method to update the authenticating user's profile image. - * - * @param string $image The background image for the profile. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function updateProfileImage($image = null, $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('account', 'update_profile_image'); - - $data = array(); - - // Check if image is specified. - if ($image) - { - $data['image'] = "@{$image}"; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is specified. - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Set the API path - $path = '/account/update_profile_image.json'; - - $header = array('Content-Type' => 'multipart/form-data', 'Expect' => ''); - - // Send the request. - return $this->sendRequest($path, 'POST', $data, $header); - } - - /** - * Method to set one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com. - * - * @param string $background Profile background color. - * @param string $link Profile link color. - * @param string $sidebar_border Profile sidebar's border color. - * @param string $sidebar_fill Profile sidebar's fill color. - * @param string $text Profile text color. - * @param boolean $entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a - * variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $skip_status When set to either true, t or 1 statuses will not be included in the returned user objects. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function updateProfileColors($background = null, $link = null, $sidebar_border = null, $sidebar_fill = null, $text = null, - $entities = null, $skip_status = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('account', 'update_profile_colors'); - - $data = array(); - - // Check if background is specified. - if ($background) - { - $data['profile_background_color'] = $background; - } - - // Check if link is specified. - if ($link) - { - $data['profile_link_color'] = $link; - } - - // Check if sidebar_border is specified. - if ($sidebar_border) - { - $data['profile_sidebar_border_color'] = $sidebar_border; - } - - // Check if sidebar_fill is specified. - if ($sidebar_fill) - { - $data['profile_sidebar_fill_color'] = $sidebar_fill; - } - - // Check if text is specified. - if ($text) - { - $data['profile_text_color'] = $text; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if skip_status is true. - if (!is_null($skip_status)) - { - $data['skip_status'] = $skip_status; - } - - // Set the API path - $path = '/account/update_profile_colors.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to get the settings (including current trend, geo and sleep time information) for the authenticating user. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getSettings() - { - // Check the rate limit for remaining hits - $this->checkRateLimit('account', 'settings'); - - // Set the API path - $path = '/account/settings.json'; - - // Send the request. - return $this->sendRequest($path); - } - - /** - * Method to update the authenticating user's settings. - * - * @param integer $location The Yahoo! Where On Earth ID to use as the user's default trend location. - * @param boolean $sleep_time When set to true, t or 1, will enable sleep time for the user. - * @param integer $start_sleep The hour that sleep time should begin if it is enabled. - * @param integer $end_sleep The hour that sleep time should end if it is enabled. - * @param string $time_zone The timezone dates and times should be displayed in for the user. The timezone must be one of the - * Rails TimeZone names. - * @param string $lang The language which Twitter should render in for this user. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function updateSettings($location = null, $sleep_time = false, $start_sleep = null, $end_sleep = null, - $time_zone = null, $lang = null) - { - $data = array(); - - // Check if location is specified. - if ($location) - { - $data['trend_location_woeid '] = $location; - } - - // Check if sleep_time is true. - if ($sleep_time) - { - $data['sleep_time_enabled'] = $sleep_time; - } - - // Check if start_sleep is specified. - if ($start_sleep) - { - $data['start_sleep_time'] = $start_sleep; - } - - // Check if end_sleep is specified. - if ($end_sleep) - { - $data['end_sleep_time'] = $end_sleep; - } - - // Check if time_zone is specified. - if ($time_zone) - { - $data['time_zone'] = $time_zone; - } - - // Check if lang is specified. - if ($lang) - { - $data['lang'] = $lang; - } - - // Set the API path - $path = '/account/settings.json'; - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } -} diff --git a/libraries/joomla/twitter/search.php b/libraries/joomla/twitter/search.php deleted file mode 100644 index 3ece69c1c8939..0000000000000 --- a/libraries/joomla/twitter/search.php +++ /dev/null @@ -1,199 +0,0 @@ -checkRateLimit('search', 'tweets'); - - // Set the API path - $path = '/search/tweets.json'; - - // Set query parameter. - $data['q'] = rawurlencode($query); - - // Check if callback is specified. - if ($callback) - { - $data['callback'] = $callback; - } - - // Check if geocode is specified. - if ($geocode) - { - $data['geocode'] = $geocode; - } - - // Check if lang is specified. - if ($lang) - { - $data['lang'] = $lang; - } - - // Check if locale is specified. - if ($locale) - { - $data['locale'] = $locale; - } - - // Check if result_type is specified. - if ($result_type) - { - $data['result_type'] = $result_type; - } - - // Check if count is specified. - if ($count != 15) - { - $data['count'] = $count; - } - - // Check if until is specified. - if ($until) - { - $data['until'] = $until; - } - - // Check if since_id is specified. - if ($since_id > 0) - { - $data['since_id'] = $since_id; - } - - // Check if max_id is specified. - if ($max_id > 0) - { - $data['max_id'] = $max_id; - } - - // Check if entities is specified. - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get the authenticated user's saved search queries. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getSavedSearches() - { - // Check the rate limit for remaining hits - $this->checkRateLimit('saved_searches', 'list'); - - // Set the API path - $path = '/saved_searches/list.json'; - - // Send the request. - return $this->sendRequest($path); - } - - /** - * Method to get the information for the saved search represented by the given id. - * - * @param integer $id The ID of the saved search. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getSavedSearchesById($id) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('saved_searches', 'show/:id'); - - // Set the API path - $path = '/saved_searches/show/' . $id . '.json'; - - // Send the request. - return $this->sendRequest($path); - } - - /** - * Method to create a new saved search for the authenticated user. - * - * @param string $query The query of the search the user would like to save. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function createSavedSearch($query) - { - // Set the API path - $path = '/saved_searches/create.json'; - - // Set POST request data - $data['query'] = rawurlencode($query); - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to delete a saved search for the authenticating user. - * - * @param integer $id The ID of the saved search. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function deleteSavedSearch($id) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('saved_searches', 'destroy/:id'); - - // Set the API path - $path = '/saved_searches/destroy/' . $id . '.json'; - - // Send the request. - return $this->sendRequest($path, 'POST'); - } -} diff --git a/libraries/joomla/twitter/statuses.php b/libraries/joomla/twitter/statuses.php deleted file mode 100644 index 3aac516b966bc..0000000000000 --- a/libraries/joomla/twitter/statuses.php +++ /dev/null @@ -1,657 +0,0 @@ -checkRateLimit("statuses", "show/:id"); - - // Set the API base - $path = '/statuses/show/' . $id . '.json'; - - $data = array(); - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if my_retweet is specified - if (!is_null($my_retweet)) - { - $data['include_my_retweet'] = $my_retweet; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to retrieve the latest statuses from the specified user timeline. - * - * @param mixed $user Either an integer containing the user ID or a string containing the screen name. - * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $include_rts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. - * @param boolean $no_replies This parameter will prevent replies from appearing in the returned timeline. This parameter is only supported - * for JSON and XML responses. - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * @param boolean $contributor This parameter enhances the contributors element of the status response to include the screen_name of the - * contributor. By default only the user_id of the contributor is included. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getUserTimeline($user, $count = 20, $include_rts = null, $no_replies = null, $since_id = 0, $max_id = 0, $trim_user = null, - $contributor = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('statuses', 'user_timeline'); - - $data = array(); - - // Determine which type of data was passed for $user - if (is_numeric($user)) - { - $data['user_id'] = $user; - } - elseif (is_string($user)) - { - $data['screen_name'] = $user; - } - else - { - // We don't have a valid entry - throw new RuntimeException('The specified username is not in the correct format; must use integer or string'); - } - - // Set the API base - $path = '/statuses/user_timeline.json'; - - // Set the count string - $data['count'] = $count; - - // Check if include_rts is specified - if (!is_null($include_rts)) - { - $data['include_rts'] = $include_rts; - } - - // Check if no_replies is specified - if (!is_null($no_replies)) - { - $data['exclude_replies'] = $no_replies; - } - - // Check if a since_id is specified - if ($since_id > 0) - { - $data['since_id'] = (int) $since_id; - } - - // Check if a max_id is specified - if ($max_id > 0) - { - $data['max_id'] = (int) $max_id; - } - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Check if contributor details is specified - if (!is_null($contributor)) - { - $data['contributor_details'] = $contributor; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to post a tweet. - * - * @param string $status The text of the tweet. - * @param integer $in_reply_to_status_id The ID of an existing status that the update is in reply to. - * @param float $lat The latitude of the location this tweet refers to. - * @param float $long The longitude of the location this tweet refers to. - * @param string $place_id A place in the world. - * @param boolean $display_coordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long = null, $place_id = null, $display_coordinates = null, - $trim_user = null) - { - // Set the API base. - $path = '/statuses/update.json'; - - // Set POST data. - $data = array('status' => utf8_encode($status)); - - // Check if in_reply_to_status_id is specified. - if ($in_reply_to_status_id) - { - $data['in_reply_to_status_id'] = $in_reply_to_status_id; - } - - // Check if lat is specified. - if ($lat) - { - $data['lat'] = $lat; - } - - // Check if long is specified. - if ($long) - { - $data['long'] = $long; - } - - // Check if place_id is specified. - if ($place_id) - { - $data['place_id'] = $place_id; - } - - // Check if display_coordinates is specified. - if (!is_null($display_coordinates)) - { - $data['display_coordinates'] = $display_coordinates; - } - - // Check if trim_user is specified. - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to retrieve the most recent mentions for the authenticating user. - * - * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $include_rts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * @param string $contributor This parameter enhances the contributors element of the status response to include the screen_name - * of the contributor. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function getMentions($count = 20, $include_rts = null, $entities = null, $since_id = 0, $max_id = 0, - $trim_user = null, $contributor = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('statuses', 'mentions_timeline'); - - // Set the API base - $path = '/statuses/mentions_timeline.json'; - - // Set the count string - $data['count'] = $count; - - // Check if include_rts is specified - if (!is_null($include_rts)) - { - $data['include_rts'] = $include_rts; - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if a since_id is specified - if ($since_id > 0) - { - $data['since_id'] = (int) $since_id; - } - - // Check if a max_id is specified - if ($max_id > 0) - { - $data['max_id'] = (int) $max_id; - } - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Check if contributor is specified - if (!is_null($contributor)) - { - $data['contributor_details'] = $contributor; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get the most recent tweets of the authenticated user that have been retweeted by others. - * - * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $user_entities The user entities node will be disincluded when set to false. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $user_entities = null, $max_id = 0, $trim_user = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('statuses', 'retweets_of_me'); - - // Set the API path - $path = '/statuses/retweets_of_me.json'; - - // Set the count string - $data['count'] = $count; - - // Check if a since_id is specified - if ($since_id > 0) - { - $data['since_id'] = (int) $since_id; - } - - // Check if a max_id is specified - if ($max_id > 0) - { - $data['max_id'] = (int) $max_id; - } - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Check if entities is specified - if (!is_null($entities)) - { - $data['include_entities'] = $entities; - } - - // Check if entities is specified - if (!is_null($user_entities)) - { - $data['include_user_entities'] = $user_entities; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to show user objects of up to 100 members who retweeted the status. - * - * @param integer $id The numerical ID of the desired status. - * @param integer $count Specifies the number of retweets to try and retrieve, up to a maximum of 100. - * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 100 IDs at a time. - * The number of IDs returned is not guaranteed to be 100 as suspended users are - * filtered out after connections are queried. If no cursor is provided, a value of - * -1 will be assumed, which is the first "page." - * @param boolean $stringify_ids Set to true to return IDs as strings, false to return as integers. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getRetweeters($id, $count = 20, $cursor = null, $stringify_ids = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('statuses', 'retweeters/ids'); - - // Set the API path - $path = '/statuses/retweeters/ids.json'; - - // Set the status id. - $data['id'] = $id; - - // Set the count string - $data['count'] = $count; - - // Check if cursor is specified - if (!is_null($cursor)) - { - $data['cursor'] = $cursor; - } - - // Check if entities is specified - if (!is_null($stringify_ids)) - { - $data['stringify_ids'] = $stringify_ids; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to get up to 100 of the first retweets of a given tweet. - * - * @param integer $id The numerical ID of the desired status. - * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function getRetweetsById($id, $count = 20, $trim_user = null) - { - // Check the rate limit for remaining hits - $this->checkRateLimit('statuses', 'retweets/:id'); - - // Set the API path - $path = '/statuses/retweets/' . $id . '.json'; - - // Set the count string - $data['count'] = $count; - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Send the request. - return $this->sendRequest($path, 'GET', $data); - } - - /** - * Method to delete the status specified by the required ID parameter. - * - * @param integer $id The numerical ID of the desired status. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function deleteTweet($id, $trim_user = null) - { - // Set the API path - $path = '/statuses/destroy/' . $id . '.json'; - - $data = array(); - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to retweet a tweet. - * - * @param integer $id The numerical ID of the desired status. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * - * @return array The decoded JSON response - * - * @since 12.3 - */ - public function retweet($id, $trim_user = null) - { - // Set the API path - $path = '/statuses/retweet/' . $id . '.json'; - - $data = array(); - - // Check if trim_user is specified - if (!is_null($trim_user)) - { - $data['trim_user'] = $trim_user; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data); - } - - /** - * Method to post a tweet with media. - * - * @param string $status The text of the tweet. - * @param string $media File to upload - * @param integer $in_reply_to_status_id The ID of an existing status that the update is in reply to. - * @param float $lat The latitude of the location this tweet refers to. - * @param float $long The longitude of the location this tweet refers to. - * @param string $place_id A place in the world. - * @param boolean $display_coordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. - * @param boolean $sensitive Set to true for content which may not be suitable for every audience. - * - * @return array The decoded JSON response - * - * @since 12.3 - * @throws RuntimeException - */ - public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $lat = null, $long = null, $place_id = null, - $display_coordinates = null, $sensitive = null) - { - // Set the API request path. - $path = '/statuses/update_with_media.json'; - - // Set POST data. - $data = array( - 'status' => utf8_encode($status), - 'media[]' => "@{$media}", - ); - - $header = array('Content-Type' => 'multipart/form-data'); - - // Check if in_reply_to_status_id is specified. - if (!is_null($in_reply_to_status_id)) - { - $data['in_reply_to_status_id'] = $in_reply_to_status_id; - } - - // Check if lat is specified. - if ($lat) - { - $data['lat'] = $lat; - } - - // Check if long is specified. - if ($long) - { - $data['long'] = $long; - } - - // Check if place_id is specified. - if ($place_id) - { - $data['place_id'] = $place_id; - } - - // Check if display_coordinates is specified. - if (!is_null($display_coordinates)) - { - $data['display_coordinates'] = $display_coordinates; - } - - // Check if sensitive is specified. - if (!is_null($sensitive)) - { - $data['possibly_sensitive'] = $sensitive; - } - - // Send the request. - return $this->sendRequest($path, 'POST', $data, $header); - } - - /** - * Method to get information allowing the creation of an embedded representation of a Tweet on third party sites. - * Note: either the id or url parameters must be specified in a request. It is not necessary to include both. - * - * @param integer $id The Tweet/status ID to return embed code for. - * @param string $url The URL of the Tweet/status to be embedded. - * @param integer $maxwidth The maximum width in pixels that the embed should be rendered at. This value is constrained to be - * between 250 and 550 pixels. - * @param boolean $hide_media Specifies whether the embedded Tweet should automatically expand images which were uploaded via - * POST statuses/update_with_media. - * @param boolean $hide_thread Specifies whether the embedded Tweet should automatically show the original message in the case that - * the embedded Tweet is a reply. - * @param boolean $omit_script Specifies whether the embedded Tweet HTML should include a `