Permalink
Browse files

Merge remote-tracking branch 'upstream/staging' into plgtpl

  • Loading branch information...
2 parents 0be77b1 + c600d0a commit 62f1de52462b0dd335778f1560440281a1f932f5 @phproberto phproberto committed Aug 20, 2012
Showing with 2,365 additions and 2,298 deletions.
  1. +1 −1 docs/manual/en-US/Developer_Manual.ent
  2. +27 −0 docs/manual/en-US/chapters/classes/jcryptpasswordsimple.xml
  3. +25 −0 docs/manual/en-US/chapters/interfaces/jcryptpassword.xml
  4. +2 −0 docs/manual/en-US/chapters/packages.xml
  5. +15 −0 docs/manual/en-US/chapters/packages/crypt.xml
  6. +6 −6 libraries/compat/jsonserializable.php
  7. +0 −1 libraries/import.legacy.php
  8. +1 −1 libraries/joomla/application/cli.php
  9. +0 −1 libraries/joomla/application/web.php
  10. +0 −1 libraries/joomla/application/web/router/base.php
  11. +2 −2 libraries/joomla/archive/archive.php
  12. +2 −2 libraries/joomla/archive/bzip2.php
  13. +2 −2 libraries/joomla/archive/gzip.php
  14. +2 −2 libraries/joomla/archive/tar.php
  15. +4 −6 libraries/joomla/archive/zip.php
  16. +0 −2 libraries/joomla/cache/cache.php
  17. +0 −4 libraries/joomla/cache/storage/file.php
  18. +0 −6 libraries/joomla/client/ftp.php
  19. +0 −1 libraries/joomla/client/helper.php
  20. +0 −5 libraries/joomla/crypt/cipher/simple.php
  21. +52 −0 libraries/joomla/crypt/password.php
  22. +148 −0 libraries/joomla/crypt/password/simple.php
  23. +3 −16 libraries/joomla/database/driver.php
  24. +4 −2 libraries/joomla/database/driver/mysql.php
  25. +4 −3 libraries/joomla/database/driver/mysqli.php
  26. +5 −2 libraries/joomla/database/driver/oracle.php
  27. +5 −3 libraries/joomla/database/driver/pdo.php
  28. +5 −5 libraries/joomla/database/driver/postgresql.php
  29. +4 −6 libraries/joomla/database/driver/sqlsrv.php
  30. +6 −7 libraries/joomla/database/factory.php
  31. +0 −3 libraries/joomla/database/importer/mysql.php
  32. +0 −4 libraries/joomla/database/importer/postgresql.php
  33. +48 −4 libraries/joomla/document/html/renderer/message.php
  34. +0 −2 libraries/joomla/event/dispatcher.php
  35. +6 −6 libraries/joomla/filesystem/file.php
  36. +0 −5 libraries/joomla/filesystem/folder.php
  37. +1 −1 libraries/joomla/filesystem/stream.php
  38. +0 −1 libraries/joomla/filter/input.php
  39. +14 −0 libraries/joomla/filter/output.php
  40. +0 −4 libraries/joomla/form/field.php
  41. +0 −1 libraries/joomla/form/fields/accesslevel.php
  42. +0 −1 libraries/joomla/form/fields/cachehandler.php
  43. +0 −2 libraries/joomla/form/fields/checkboxes.php
  44. +0 −1 libraries/joomla/form/fields/combo.php
  45. +0 −1 libraries/joomla/form/fields/databaseconnection.php
  46. +0 −1 libraries/joomla/form/fields/filelist.php
  47. +0 −1 libraries/joomla/form/fields/folderlist.php
  48. +0 −2 libraries/joomla/form/fields/groupedlist.php
  49. +0 −1 libraries/joomla/form/fields/integer.php
  50. +0 −2 libraries/joomla/form/fields/list.php
  51. +0 −1 libraries/joomla/form/fields/plugins.php
  52. +0 −2 libraries/joomla/form/fields/radio.php
  53. +0 −1 libraries/joomla/form/fields/rules.php
  54. +0 −1 libraries/joomla/form/fields/sessionhandler.php
  55. +0 −1 libraries/joomla/form/fields/sql.php
  56. +0 −1 libraries/joomla/form/fields/timezone.php
  57. +0 −1 libraries/joomla/form/fields/usergroup.php
  58. +0 −12 libraries/joomla/form/form.php
  59. +0 −1 libraries/joomla/form/helper.php
  60. +0 −1 libraries/joomla/form/rules/equals.php
  61. +0 −2 libraries/joomla/form/rules/rules.php
  62. +1 −1 libraries/joomla/form/rules/url.php
  63. +0 −1 libraries/joomla/github/gists.php
  64. 0 libraries/joomla/html/{html → }/access.php
  65. +0 −1 libraries/joomla/html/{html → }/behavior.php
  66. 0 libraries/joomla/html/{html → }/content.php
  67. 0 libraries/joomla/html/{html → }/date.php
  68. 0 libraries/joomla/html/{html → }/email.php
  69. 0 libraries/joomla/html/{html → }/form.php
  70. +1 −1 libraries/joomla/html/{html → }/grid.php
  71. +0 −2 libraries/joomla/html/html.php
  72. 0 libraries/joomla/html/{html → }/jgrid.php
  73. 0 libraries/joomla/html/{html → }/list.php
  74. 0 libraries/joomla/html/{html → }/number.php
  75. 0 libraries/joomla/html/{html → }/rules.php
  76. 0 libraries/joomla/html/{html → }/select.php
  77. 0 libraries/joomla/html/{html → }/sliders.php
  78. 0 libraries/joomla/html/{html → }/string.php
  79. 0 libraries/joomla/html/{html → }/tabs.php
  80. 0 libraries/joomla/html/{html → }/tel.php
  81. 0 libraries/joomla/html/{html → }/user.php
  82. +32 −0 libraries/joomla/http/http.php
  83. +9 −2 libraries/joomla/http/transport/curl.php
  84. +2 −3 libraries/joomla/http/transport/socket.php
  85. +14 −1 libraries/joomla/input/input.php
  86. +0 −3 libraries/joomla/installer/adapters/component.php
  87. +0 −1 libraries/joomla/installer/adapters/file.php
  88. +0 −1 libraries/joomla/installer/adapters/library.php
  89. +0 −1 libraries/joomla/installer/adapters/module.php
  90. +0 −1 libraries/joomla/installer/adapters/package.php
  91. +0 −1 libraries/joomla/installer/adapters/plugin.php
  92. +0 −1 libraries/joomla/installer/adapters/template.php
  93. +0 −6 libraries/joomla/installer/installer.php
  94. +11 −13 libraries/joomla/installer/librarymanifest.php
  95. +8 −9 libraries/joomla/installer/packagemanifest.php
  96. +15 −16 libraries/joomla/language/language.php
  97. +0 −1 libraries/joomla/log/log.php
  98. +0 −2 libraries/joomla/log/logger/formattedtext.php
  99. +0 −5 libraries/joomla/pagination/pagination.php
  100. +0 −3 libraries/joomla/registry/format/ini.php
  101. +0 −2 libraries/joomla/registry/format/xml.php
  102. +1 −4 libraries/joomla/registry/registry.php
  103. +6 −7 libraries/joomla/string/string.php
  104. +0 −1 libraries/joomla/table/extension.php
  105. +0 −12 libraries/joomla/table/nested.php
  106. +0 −8 libraries/joomla/table/table.php
  107. +1 −11 libraries/joomla/user/authentication.php
  108. +0 −1 libraries/joomla/utilities/arrayhelper.php
  109. +0 −1 libraries/joomla/utilities/utility.php
  110. +0 −1 libraries/legacy/base/observable.php
  111. +0 −1 libraries/legacy/component/helper.php
  112. +0 −2 libraries/legacy/controller/admin.php
  113. +3 −9 libraries/legacy/controller/form.php
  114. +1 −3 libraries/legacy/controller/legacy.php
  115. +2 −6 libraries/legacy/editor/editor.php
  116. +0 −1 libraries/legacy/error/error.php
  117. +0 −2 libraries/legacy/form/field/category.php
  118. +5 −8 libraries/legacy/form/field/componentlayout.php
  119. +2 −3 libraries/legacy/form/field/modulelayout.php
  120. +0 −208 libraries/legacy/help/help.php
  121. +0 −9 libraries/legacy/model/admin.php
  122. +0 −1 libraries/legacy/model/legacy.php
  123. +0 −3 libraries/legacy/pathway/pathway.php
  124. +0 −1 libraries/legacy/table/category.php
  125. +0 −2 libraries/legacy/table/content.php
  126. +0 −1 libraries/legacy/table/menu/type.php
  127. +0 −139 libraries/legacy/toolbar/button.php
  128. +0 −107 libraries/legacy/toolbar/button/confirm.php
  129. +0 −59 libraries/legacy/toolbar/button/custom.php
  130. +0 −89 libraries/legacy/toolbar/button/help.php
  131. +0 −82 libraries/legacy/toolbar/button/link.php
  132. +0 −103 libraries/legacy/toolbar/button/popup.php
  133. +0 −63 libraries/legacy/toolbar/button/separator.php
  134. +0 −103 libraries/legacy/toolbar/button/standard.php
  135. +0 −307 libraries/legacy/toolbar/toolbar.php
  136. +2 −1 libraries/loader.php
  137. +2 −3 media/system/js/validate-uncompressed.js
  138. +3 −0 tests/bootstrap.php
  139. +0 −63 tests/suites/legacy/toolbar/JToolbarButtonTest.php
  140. +0 −106 tests/suites/legacy/toolbar/JToolbarTest.php
  141. +0 −40 tests/suites/legacy/toolbar/button/JButtonConfirmTest.php
  142. +0 −39 tests/suites/legacy/toolbar/button/JButtonCustomTest.php
  143. +0 −39 tests/suites/legacy/toolbar/button/JButtonHelpTest.php
  144. +0 −39 tests/suites/legacy/toolbar/button/JButtonLinkTest.php
  145. +0 −39 tests/suites/legacy/toolbar/button/JButtonPopupTest.php
  146. +0 −39 tests/suites/legacy/toolbar/button/JButtonSeparatorTest.php
  147. +0 −39 tests/suites/legacy/toolbar/button/JButtonStandardTest.php
  148. +82 −0 tests/suites/unit/joomla/crypt/password/JCryptPasswordSimpleTest.php
  149. +8 −2 tests/suites/unit/joomla/date/JDateTest.php
  150. +29 −0 tests/suites/unit/joomla/event/JEventStub.php
  151. +200 −14 tests/suites/unit/joomla/event/JEventTest.php
  152. +16 −0 tests/suites/unit/joomla/filter/JFilterOutputTest.php
  153. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleBooleanTest.php
  154. +0 −1 tests/suites/unit/joomla/form/rules/JFormRuleColorTest.php
  155. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleEmailTest.php
  156. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleEqualsTest.php
  157. +0 −1 tests/suites/unit/joomla/form/rules/JFormRuleOptionsTest.php
  158. +0 −5 tests/suites/unit/joomla/form/rules/JFormRuleRulesTest.php
  159. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleTelTest.php
  160. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleUrlTest.php
  161. +0 −2 tests/suites/unit/joomla/form/rules/JFormRuleUsernameTest.php
  162. +147 −2 tests/suites/unit/joomla/html/JHtmlTest.php
  163. +1 −1 tests/suites/unit/joomla/html/html/JHtmlAccessTest.php
  164. +1 −1 tests/suites/unit/joomla/html/html/JHtmlBehaviorTest.php
  165. +1 −1 tests/suites/unit/joomla/html/html/JHtmlContentTest.php
  166. +1 −1 tests/suites/unit/joomla/html/html/JHtmlDateTest.php
  167. +1 −1 tests/suites/unit/joomla/html/html/JHtmlEmailTest.php
  168. +1 −1 tests/suites/unit/joomla/html/html/JHtmlFormTest.php
  169. +1 −1 tests/suites/unit/joomla/html/html/JHtmlGridTest.php
  170. +1 −1 tests/suites/unit/joomla/html/html/JHtmlJgridTest.php
  171. +1 −1 tests/suites/unit/joomla/html/html/JHtmlListTest.php
  172. +1 −1 tests/suites/unit/joomla/html/html/JHtmlNumberTest.php
  173. +1 −1 tests/suites/unit/joomla/html/html/JHtmlRulesTest.php
  174. +1 −1 tests/suites/unit/joomla/html/html/JHtmlSelectTest.php
  175. +1 −1 tests/suites/unit/joomla/html/html/JHtmlStringTest.php
  176. +1 −1 tests/suites/unit/joomla/html/html/JHtmlTelTest.php
  177. +1 −1 tests/suites/unit/joomla/html/html/JHtmlUserTest.php
  178. +16 −0 tests/suites/unit/joomla/http/JHttpTest.php
  179. +0 −3 tests/suites/unit/joomla/input/JInputCLITest.php
  180. +26 −2 tests/suites/unit/joomla/input/JInputTest.php
  181. +214 −0 tests/suites/unit/joomla/installer/JInstallerTest.php
  182. +23 −10 tests/suites/unit/joomla/language/JLanguageHelperTest.php
  183. +5 −5 tests/suites/unit/joomla/language/JLanguageInspector.php
  184. +561 −106 tests/suites/unit/joomla/language/JLanguageTest.php
  185. +78 −0 tests/suites/unit/joomla/language/data/language/en-GB/en-GB.localise.php
  186. +97 −0 tests/suites/unit/joomla/language/data/language/en-GB/en-GB.xml
  187. +0 −1 tests/suites/unit/joomla/log/loggers/JLogLoggerFormattedTextTest.php
  188. +0 −1 tests/suites/unit/joomla/log/loggers/JLogLoggerW3CTest.php
  189. +153 −79 tests/suites/unit/joomla/session/JSessionTest.php
  190. +23 −2 tests/suites/unit/joomla/string/JStringTest.php
  191. +12 −0 tests/suites/unit/joomla/user/JAuthenticationTest.php
  192. +140 −0 tests/suites/unit/joomla/user/JUserHelperTest.php
  193. +5 −0 tests/tmp/.gitignore
@@ -1,4 +1,4 @@
<!ENTITY PRODUCT "Joomla Platform">
<!ENTITY BOOKID "Developer_Manual">
-<!ENTITY YEAR "2011">
+<!ENTITY YEAR "2012">
<!ENTITY HOLDER "| Open Source Matters |">
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Developer_Manual.ent">
+%BOOK_ENTITIES;
+]>
+<section id="chap-Joomla_Platform_Manual-JCryptPasswordSimple">
+ <title>JCryptPasswordSimple</title>
+
+ <section>
+ <title>Usage</title>
+
+ <para>In addition to the interface <interface>JCryptPassword</interface> there is also a basic implementation provided
+ which provides for use with the most common password schemes. This if found in the <classname>JCryptPasswordSimple</classname>
+ class.</para>
+
+ <para>Aside from the two methods <methodname>create</methodname> and <methodname>verify</methodname> methods, this
+ implementation also adds an additional method called <methodname>setCost</methodname>. This method is used to
+ set a cost parameter for methods that support workload factors. It takes an integer cost factor as a parameter.</para>
+
+ <para><classname>JCryptPasswordSimple</classname> provides support for bcrypt, MD5 and the traditional Joomla! CMS hashing
+ scheme. The hash format can be specified during hash creation by using the constants <constant>JCryptPassword::BLOWFISH</constant>,
+ <constant>JCryptPassword::MD5</constant> and <constant>JCryptPassword::JOOMLA</constant>. An appropriate salt will be
+ automatically generated when required.
+ </para>
+ </section>
+</section>
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Developer_Manual.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+ <title>JCryptPassword</title>
+
+ <para><interfacename>JCryptPassword</interfacename> is an interface that requires a class to be implemented with a
+ <methodname>create</methodname> and a <methodname>verify</methodname> method.</para>
+
+ <para>The <methodname>create</methodname> method should take a plain text password and a type and return a hashed password.</para>
+
+ <para>The <methodname>verify</methodname> method should accept a plain text password and a hashed password and return a boolean
+ indicating whether or not the password matched the password in the hash.</para>
+
+ <para>The <interfacename>JCryptPassword</interfacename> interface defines the following constants for use with implementations:
+ <itemizedlist>
+ <listitem><para><constant>JCryptPassword::BLOWFISH</constant></para></listitem>
+ <listitem><para><constant>JCryptPassword::JOOMLA</constant></para></listitem>
+ <listitem><para><constant>JCryptPassword::MD5</constant></para></listitem>
+ </itemizedlist>
+ </para>
+</section>
@@ -9,6 +9,8 @@
<para>This is information about the core platform packages.</para>
+ <xi:include href="packages/crypt.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<xi:include href="packages/database.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="packages/github.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Developer_Manual.ent">
+%BOOK_ENTITIES;
+]>
+<section id="chap-Joomla_Platform_Manual-Crypt">
+ <title>The Crypt Package</title>
+
+ <para>The Crypt password provides a set of classes that can be used for encrypting and hashing data.</para>
+
+ <xi:include href="../interfaces/jcryptpassword.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="../classes/jcryptpasswordsimple.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</section>
@@ -1,9 +1,9 @@
<?php
/**
- * @package Joomla.Compat
+ * @package Joomla.Compat
*
- * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
@@ -12,9 +12,9 @@
* JsonSerializable interface. This file should only be loaded on PHP < 5.4
* It allows us to implement it in classes without requiring PHP 5.4
*
- * @package Joomla.Compat
- * @since 12.2
- * @link http://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ * @package Joomla.Compat
+ * @link http://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ * @since 12.2
*/
interface JsonSerializable
{
@@ -70,7 +70,6 @@ class_exists('JLoader') or die;
// Register classes where the names have been changed to fit the autoloader rules
// @deprecated 12.3
-JLoader::register('JToolBar', JPATH_PLATFORM . '/legacy/toolbar/toolbar.php');
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');
@@ -65,7 +65,7 @@ public function __construct(JInputCli $input = null, JRegistry $config = null, J
// Create the input based on the application logic.
else
{
- if (class_exists('Jinput'))
+ if (class_exists('JInput'))
{
$this->input = new JInputCLI;
}
@@ -840,7 +840,6 @@ protected function checkHeadersSent()
*/
protected function detectRequestUri()
{
- // Initialise variables.
$uri = '';
// First we need to detect the URI scheme.
@@ -128,7 +128,6 @@ public function addMaps($maps)
*/
protected function parseRoute($route)
{
- // Initialize variables.
$controller = false;
// Trim the query string off.
@@ -105,7 +105,7 @@ public static function extract($archivename, $extractdir)
{
$path = JPath::clean($extractdir);
JFolder::create($path);
- $result = JFile::copy($tmpfname, $path . '/' . JFile::stripExt(JFile::getName(strtolower($archivename))), null, 1);
+ $result = JFile::copy($tmpfname, $path . '/' . JFile::stripExt(basename(strtolower($archivename))), null, 1);
}
@unlink($tmpfname);
@@ -147,7 +147,7 @@ public static function extract($archivename, $extractdir)
{
$path = JPath::clean($extractdir);
JFolder::create($path);
- $result = JFile::copy($tmpfname, $path . '/' . JFile::stripExt(JFile::getName(strtolower($archivename))), null, 1);
+ $result = JFile::copy($tmpfname, $path . '/' . JFile::stripExt(basename(strtolower($archivename))), null, 1);
}
@unlink($tmpfname);
@@ -42,7 +42,6 @@ class JArchiveBzip2 implements JArchiveExtractable
*/
public function extract($archive, $destination, array $options = array ())
{
- // Initialise variables.
$this->_data = null;
if (!extension_loaded('bz2'))
@@ -60,7 +59,8 @@ public function extract($archive, $destination, array $options = array ())
if (!isset($options['use_streams']) || $options['use_streams'] == false)
{
// Old style: read the whole file and then parse it
- if (!$this->_data = JFile::read($archive))
+ $this->_data = file_get_contents($archive);
+ if (!$this->_data)
{
if (class_exists('JError'))
{
@@ -54,7 +54,6 @@ class JArchiveGzip implements JArchiveExtractable
*/
public function extract($archive, $destination, array $options = array ())
{
- // Initialise variables.
$this->_data = null;
if (!extension_loaded('zlib'))
@@ -71,7 +70,8 @@ public function extract($archive, $destination, array $options = array ())
if (!isset($options['use_streams']) || $options['use_streams'] == false)
{
- if (!$this->_data = JFile::read($archive))
+ $this->_data = file_get_contents($archive);
+ if (!$this->_data)
{
if (class_exists('JError'))
{
@@ -71,11 +71,11 @@ class JArchiveTar implements JArchiveExtractable
*/
public function extract($archive, $destination, array $options = array())
{
- // Initialise variables.
$this->_data = null;
$this->_metadata = null;
- if (!$this->_data = JFile::read($archive))
+ $this->_data = file_get_contents($archive);
+ if (!$this->_data)
{
if (class_exists('JError'))
{
@@ -99,7 +99,6 @@ class JArchiveZip implements JArchiveExtractable
*/
public function create($archive, $files, array $options = array())
{
- // Initialise variables.
$contents = array();
$ctrldir = array();
@@ -139,11 +138,11 @@ public function extract($archive, $destination, array $options = array())
if ($this->hasNativeSupport())
{
- $this->_extractNative($archive, $destination, $options);
+ return $this->_extractNative($archive, $destination, $options);
}
else
{
- $this->_extract($archive, $destination, $options);
+ return $this->_extract($archive, $destination, $options);
}
}
@@ -206,7 +205,6 @@ public function checkZipData(&$data)
*/
private function _extract($archive, $destination, array $options)
{
- // Initialise variables.
$this->_data = null;
$this->_metadata = null;
@@ -222,7 +220,8 @@ private function _extract($archive, $destination, array $options)
}
}
- if (!$this->_data = JFile::read($archive))
+ $this->_data = file_get_contents($archive);
+ if (!$this->_data)
{
if (class_exists('JError'))
{
@@ -393,7 +392,6 @@ private function _extractNative($archive, $destination, array $options)
*/
private function _readZipInfo(&$data)
{
- // Initialise variables.
$entries = array();
// Find the last central directory header entry
@@ -463,7 +463,6 @@ public function &_getStorage()
*/
public static function getWorkarounds($data, $options = array())
{
- // Initialise variables.
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$body = null;
@@ -550,7 +549,6 @@ public static function setWorkarounds($data, $options = array())
$loptions['modulemode'] = $options['modulemode'];
}
- // Initialise variables.
$app = JFactory::getApplication();
$document = JFactory::getDocument();
@@ -9,8 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.filesystem.file');
-
/**
* File cache storage handler
*
@@ -535,7 +533,6 @@ protected function _cleanPath($path, $ds = DIRECTORY_SEPARATOR)
protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullpath = false
, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*', '.*~'))
{
- // Initialise variables.
$arr = array();
// Check to make sure the path valid and clean
@@ -622,7 +619,6 @@ protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullp
protected function _folders($path, $filter = '.', $recurse = false, $fullpath = false
, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*'))
{
- // Initialise variables.
$arr = array();
// Check to make sure the path valid and clean
@@ -250,7 +250,6 @@ public function setOptions(array $options)
*/
public function connect($host = '127.0.0.1', $port = 21)
{
- // Initialise variables.
$errno = null;
$err = null;
@@ -396,7 +395,6 @@ public function pwd()
return $ret;
}
- // Initialise variables.
$match = array(null);
// Send print working directory command and verify success
@@ -1141,7 +1139,6 @@ public function write($remote, $buffer)
*/
public function listNames($path = null)
{
- // Initialise variables.
$data = null;
// If native FTP support is enabled let's use it...
@@ -1241,7 +1238,6 @@ public function listNames($path = null)
*/
public function listDetails($path = null, $type = 'all')
{
- // Initialise variables.
$dir_list = array();
$data = null;
$regs = null;
@@ -1477,7 +1473,6 @@ protected function _putCmd($cmd, $expectedResponse)
*/
protected function _verifyResponse($expected)
{
- // Initialise variables.
$parts = null;
// Wait for a response from the server, but timeout after the set time limit
@@ -1535,7 +1530,6 @@ protected function _verifyResponse($expected)
*/
protected function _passive()
{
- // Initialize variables.
$match = array();
$parts = array();
$errno = null;
@@ -38,7 +38,6 @@ public static function getCredentials($client, $force = false)
if (!isset($credentials[$client]) || $force)
{
- // Initialise variables.
$config = JFactory::getConfig();
// Fetch the client layer configuration options for the specific client
@@ -37,7 +37,6 @@ public function decrypt($data, JCryptKey $key)
throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected simple.');
}
- // Initialise variables.
$decrypted = '';
$tmp = $key->public;
@@ -79,7 +78,6 @@ public function encrypt($data, JCryptKey $key)
throw new InvalidArgumentException('Invalid key of type: ' . $key->type . '. Expected simple.');
}
- // Initialise variables.
$encrypted = '';
$tmp = $key->private;
@@ -134,7 +132,6 @@ public function generateKey(array $options = array())
*/
private function _getRandomKey($length = 256)
{
- // Initialise variables.
$key = '';
$salt = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$saltLength = strlen($salt);
@@ -160,7 +157,6 @@ private function _getRandomKey($length = 256)
*/
private function _hexToInt($s, $i)
{
- // Initialise variables.
$j = (int) $i * 2;
$k = 0;
$s1 = (string) $s;
@@ -241,7 +237,6 @@ private function _hexToInt($s, $i)
*/
private function _hexToIntArray($hex)
{
- // Initialise variables.
$array = array();
$j = (int) strlen($hex) / 2;
Oops, something went wrong.

0 comments on commit 62f1de5

Please sign in to comment.