Version 12.2 ("Neil Armstrong") of the Joomla Platform was tagged and released on 21 September 2012. It is the second release of the 12.x series. Joomla Platform 12.2 was also included in the Joomla CMS 3.0 release. In addition to numerous bug fixes, it also brings new features, the main ones:
- New (and generic) web application routers
- New password hashing interface and basic implementation
- Basic PHARchive support
- New JInputJSON class
- Allowing override of the xx-XX.localise.php
- Composer support
With the addition of Composer and PHARchive support in this release, the Joomla Platform extends its available distribution channels and formats.
The full list of commits is available here https://github.com/joomla/joomla-platform/commits/12.2 and the api doc here https://api.joomla.org
Project size
- Classes: 300 (309 in platform 12.1)
- Methods: 2136 (2122 in platform 12.1)
Summary of code quality
- Check style: 124 warnings (142 in platform 12.1)
- Duplicate code: 27 warnings (27 in platform 12.1)
- Programming Mess Detector (PMD): 801 warnings (702 in platform 12.1)
- Test Coverage: 38.16% (39.70% in platform 12.1).
New feature
- new JLogger type: JLoggerCallback (issue #866)
- Implement the JsonSerializable interface in JRegistry
- Making the Joomla platform loadable as a dependency from Composer
- Add new params to media field: preview_width / preview_height
- namespace support in JFactory::getConfig
- Use JPATH_THEMES constant to set themes directory in JApplicationWeb::render()
- Allow JApplicationWeb::render() to receive params for a theme
- Fixed an error inside component.php file, coming from an old change.
- Adding new JInputJSON class
- Force cached CSS/JavaScript reload after update
- Have the session fire an event after it is started and use this to populate the session with some default objects.
- [IMP] JImage->toFile() returns boolean
- [IMP] add crop automatic offsets calculation
- Improvements to install adapters
- [IMP] function to create thumbnails from the current image
- Add basic PHARchive support.
- Allowing override of the xx-XX.localise.php
- Add active flag to JPaginationObject, add coverage-legacy to build/.gitignore
- Allow template to override system message
- Add patch() method to JHttp.
- Add stripIframe method
- Implement Countable in JInput.
- Allow database queries to always be counted
- Remove follow redirects.
- Add name.min.ext file format to debug check
- Add password hashing interface and basic implementation.
- Making the Joomla platform loadable as a dependency from Composer (2)
- Build multi-key update support for JDatabaseDriver::updateObject.
- Fix a bug where the session could be started twice and additional improvements to JSession.
- Add in robot detection
- Method in POST requests - router for RESTful web application
- New (and generic) web application routers.
Issue fixed
- fix for issue #27946
- Fix for issue #1094
- Fix JPath::clean() to support UNC style paths. [#1220]
- Remove the weird exception handling from string.php.
- JSession still uses JRequest
- Fix PHP error: Access to undeclared static property
- $lang is not initialised in adapter JInstallerTemplate::discover_install()
- Passing input array by reference
- Remove duplicated line
- fix issue #1190
- Reverting 1201
- Updated database session code to avoid duplication of session id
- Allow JArrayHelper::getColumn process associative array (of arrays/ objects)
- Fixed an error inside component.php file, coming from an old change.
- Remove workaround for old WebKit versions.
- Curl request() encodes $data regardless the Content-type header.
- Fix syntax error.
- Added slash normalisation for JApplicationWeb media.uri properties.
- Fix a fatal bug in JSession and lay the groundwork for lazy sessions.
- Fix a fatal bug in JAccess + docblock fix.
- Correct response code for creating forks
- Fix an issue with providing a zero ID to JUser::getInstance
- Changed PostgreSQL's minimum version.
- Fixes for Oracle driver, Oracle query and PDO driver
- Joomla CMS [#27267] Multiple Loggers fail when using formattedtext
- BUGFIX: discover template install
- change yes/no to true/false as will be committed in joomla-cms
- Enabling multiple color fields
- Checkboxes fixes and tests
- Add tests for JFormFieldCheckbox and fix an issue in the field.
- Run some code only when debug is on.
- Fix a parse error
- Add an exception to the equals rule.
- Joomla CMS [#28535] Joomla 2.5.4 Timezones being doubled
- Fix issue #1266
- Standardize default Content-Type handling across all transports.
- Joomla CMS [#28411] Site breaks when deleting alternate style which is in use
- Fix an issue in bind() when load() is directly from database meaning articletext is "".
- Stop default handling of href in toolbar buttons
- Check if $client->id is set before trying to use it.
- Import plugins on authorise instead of loading
- Fix a PHP notice and a checkstyle error.
- Joomla CMS [#28741] E_STRICT: JArrayHelper::pivot should be declared as static
- Fix issue #1309
- Check that $wpoption['modulemode'] == 1, not just that it is set.
- Remove getter for non-existing "class" property
- Fix two parse errors
- Fix a couple of issues with cache.
- Joomla! throws error with valid xml string
- PDO does not support serialization
- Fix a PHP notice in JControllerLegacy.
- Import code changes from Joomla 2.5.5.
- Correct use of setLocation
- Joomla CMS [#28633] JUserHelper getProfile method should be static
- Handling msg object in adapter uninstall
- Errors during a save redirect incorrectly to page resulting in creation of new record.
- Handle scriptfile for file extensions
- Update staging
- Fix a fatal error in JInstaller and some clean up.
- Update Oracle driver to set timestamp format as well as date format
- fix JViewLegacy::getName model name discovery
- [CMS #28823] Re-add isError into the JError legacy class
- JUpdate load form XML - fixed empty response data
- There is no reason no to allow blank article bodies.
- Fixes for extension update adapter
- Required and validate elements errors messages are not translatable (Regression).
- Fix issue where existing article can't be saved blank.
- Fix unit test failures from #1352.
- JFactory::createDocument always creates HTML documents.
- Speed improvement to JRoute::_()
- Correct confusion between required and validate messages
- Fix problem with JLoader prefixes
- Corrections to JAccess when there is an invalid or missing asset or parenting is to root.
- Fix improper detection of UTF-8 encoding in strcasecmp and strcmp.
- [#28817] Cache not being cleared automatically when changes are made in
- Missing parentheses in grid sort
- Fixing warnings triggered by cURL when no response is received.
- Regex filter fits
- Fix cache error due to incorrect commit 83eb8fae
- [#28912] Browser doesn't respond when debug language is enabled
- Add missing return in the "extract()"
- Fix issue with Oracle timestamp
- Fix JInput loading in JApplicationCli
- Fix bug in JString::parse_url that causes urlencoded strings to be decoded
- Set guest properly after load in JUser
- Deal with the PDO class not being available.
- Fixed a fatal error in JHttpTransportStream.
- Make sure JFolder is imported in files that use it.
- Validate that the key parameter is a string
- Bring some sanity to JComponentHelper::isEnabled
- Route Query String Fix and Raw Route
- Fix a bug where the session could be started twice and additional improvements to JSession.
- Three Bug Fixes
- Fix issue with cURL confusing itself with 100 Continue headers.
- Add support for changing the default schema when connecting to Oracle.
- Fix typos in JInstaller.
Refactoring
- Make the log package fully autoloadable.
- Autoload JMenu and JRouter child classes
- Improve the JSession package.
- Reduce dependency on JFolder
- Move JPagination to its own package.
- Fix a fatal bug in JSession and lay the groundwork for lazy sessions.
- JHtml doesn't need to depend on JDatabase.
- Fix a few issues with JLog autoloading.
- JPaginationObject dosesn't need to extend JObject.
- Reduce the use of JBrowser.
- Use native session handlers whenever possible.
- Use JFactory::getXML() and JXMLElement less.
- Unify the checking of the platform.
- Move JGrid to its own package and allow JHtml to use the autoloader again.
- Support applications without JMenu.
- JSession: Removed duplicated code, code style
- Replace JRequest uses
- Clean up the legacy MVC a bit more.
- Move aliases for the old class names to the legacy folder.
- Remove workarounds in JProfiler::getMemory() for when memory_get_usage() is not available.
- Let mysqli be the base class for mysql instead of the other way around.
- Remove unreachable code (dead code)
- Remove our custom session ID generating code if favor of session_regenerate_id().
- Remove use of intval() and floatval() in favor of casting.
- Make JImageFilter child classes autoloadable
- Improve mysql database handling.
- Remove dependency on JObject from JRouter, JMenu and JPathway.
- Optimize images to reduce their filesize.
- Remove dependency on JObject from JPagination.
- Autoloader cleanup
- Make mysqli the default driver everywhere and use exception chaining in JDatabaseDriverPdo
- Further reduce dependency on JObject and the filesystem package
- Reduce dependency on JFile. Deprecate JFile::read() and JFile::getName().
- Move JHtmlBehavior::_getJSObject() to JHtml::getJSObject().
- Reduce dependency on JFolder and JFile.
- Some additional changes since memory_get_usage() is now always available.
- We have to prefer the main libraries over the legacy libraries.
- Various little cleanups.
- Move JURI to its own package. Stop using JFactory::getUri().
- Remove dependency on JObject from JApplicationBase.
- Reduce dependency on JObject.
Update library
Tests
- Running test on php 5.4
- Additions to mock application classes.
- Add more tests for JUser
- Fix failing unit tests.
- Changed PostgreSQL's minimum version.
- Rename tests so they will run
- Code Style in Jhtmltest plus fix places where files are created twice causing errors
- Update unit tests in JTableContent
- Fix unit test failures from #1352.
- Add active flag to JPaginationObject, add coverage-legacy to build/.gitignore
- Add more unit tests from the CMS.
- Import additional tests from the CMS.
- Add .gitignore for the unit tests' tmp folder.
- If the locale isn't available, skip the unit tests so they don't fail.
- Add additional unit tests.
- Fix issues with Oracle DB Unit
- Fix some small holes in the test coverage.
- Improve test coverage some more.
- Fix errors introduced in #1504.
- Reduce phpmd warnings. Cover all out folders with phpmd.
- Add a lint target to build.xml and fix an error found by it.
- Various little cleanups.
Style
- Copy edit/code style a comment
- Fixing up code styling from #1204.
- Fix code style error.
- JSession: Removed duplicated code, code style
- Fix code style for JsonSerializable.
- Remove pointless comments.
- Todos should not be included in the repository in most cases
- Various little cleanups.
Documentation
- comment for database quote methods to avoid IDE error
- Fix magic method declaration in docblocks
- JHtml::date format parameter documtentation is not correct
- Updated doc chapter about testing (TestReflection)
- Fix a few issues with JLog autoloading.
- Remove commented code and related comment.
- Doc block style fixes in the table package.
- Move more classes to legacy.
- Fix docblock style and wording
- Update documentation
- Fix a doc block
- Fix a grammar mistake in a comment
- Update version history
- Removing doc references to JController in JViewBase and JViewHtml
- Create a legacy package.
- Fix the subpackage tag for the controller package.
Deprecation
- Change JApplication to use JCrypt, not JSimpleCrypt. + some clean-up
- Move JObserver and JObservable to legacy.
- Remove JFormFields moved to the CMS tree.
- Use the PHP 5.3 const syntax where possible.
- Deprecate the following methods in JFactory: getACL(), getUri() and getXML().
- Fix a few issues with JLog autoloading.
- Move JEditor to the legacy folder.
- Rename the old MVC classes so their names don't conflict with the new ones.
- Use native session handlers whenever possible.
- Deal with exceptions in a couple of places.
- Don't use deprecated APIs.
- Remove somes traces of PHP 5.2.
- Replace JRequest uses
- Remove JHtmlBatch and JHtmlCategory since they were moved to the CMS.
- Don't have JFactory depend on SimplePie and move the code related to it to legacy.
- Move JXMLElement to legacy.
- Remove/deprecate more code in legacy.
- Remove more form fields that belong to the CMS.
- Avoid using deprecated APIs and remove more deprecated code in JModuleHelper.
- Remove JToolbar and JHelp.
- More preparations for removing the mysql driver.
- Deprecating IS_MAC in favor of IS_UNIX
- Remove JEditor since it has been moved to the CMS.
- Remove references to zend.ze1_compatibility_mode.
Backward incompatibility
The following pull requests made by community contributors were merged:
- [#874] new JLogger type: JLoggerCallback (issue #866) (okonomiyaki3000)
This adds a new JLogger type that simply passes a log entry to a user defined callback function. Callback can be in any of the callback formats normally used by PHP, including lambda (available since PHP 5.3).
In order to properly support lambda functions (Closure objects), a minor modification to JLog was required.
- [#829] fix for issue #27946 (jamesmoey)
- [#1025] Implement the JsonSerializable interface in JRegistry (realityking)
This is would be the first use of one of the new PHP 5.4 features, but it maintains compatibility with PHP 5.3.
How to use:
$a = new JRegistry(); $a->set('foo', 'bar'); echo json_encode($a);
This isn't immediately useful since PHP 5.4 is very rare for now, but it may be appreciated by someone building a custom app who runs 5.4.
- [#1099] Fix for issue #1094 (aaronschmitz)
Cause JStream to actually iterate along the string rather than repeating the beginning.
- [#1184] Make the log package fully autoloadable. (realityking)
- [#1224] Update mooRainbow to version 1.4. (realityking)
- [#1226] Fix JPath::clean() to support UNC style paths. [#1220] (LouisLandry)
This will close #1220.
This should also resolve the old JoomlaCode tracker item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=25337
The fix comes complete with unit tests to help ensure we don't run into this problem again.
- [#1245] Running test on php 5.4 (chdemko)
PHP 5.4 is not running test successfully:
- E_STRICT became part of E_ALL (in PHP 5.4)
- converting an array to a string now generates a notice
- a class containing an abstract method must be abstract
and some others issues
- [#1463] Remove the weird exception handling from string.php. (aaronschmitz)
This handling can cause problems in JArrayHelper::sortObjects due to https://bugs.php.net/bug.php?id=50688.
Iconv throws a notice if there is an illegal character regardless of whether ignore is set so this handling is pointless (and in fact broken since it will always fall back to IGNORE not TRANSLIT). Also, //TRANSLIT,IGNORE not //TRANSLIT//IGNORE will properly both transliterate and ignore.
See also: https://github.com/joomla/joomla-cms/issues/179#issuecomment-7835266
- [#1481] Making the Joomla platform loadable as a dependency from Composer (eirslett)
Adding the file "composer.json" will allow Composer (http://getcomposer.org/) to import the Joomla Platform as a dependency. It is now temporarily defined as a package in Packagist.org: http://packagist.org/packages/joomla/joomla-platform, pointing to my fork, which can be changed if this pull request is accepted.
- [#1180] JSession still uses JRequest (florianv)
It causes a fatal error when instanciating JSession because _start() still uses JRequest. I don't know if you want to use this construction
- [#1187] Add new params to media field: preview_width / preview_height (benjaminpick)
Improvement of #1105 : Allowing full-size preview.
- [#1193] namespace support in JFactory::getConfig (florianv)
- [#1194] Use JPATH_THEMES constant to set themes directory in JApplicationWeb::render()(mbabker)
The
JPATH_THEMES
constant is set in the CMS, unit tests, and in some of the example apps I've seen to define the path where themes (templates) are located. Instead of checking for a hard-coded themes folder underJPATH_BASE
, this allows the themes directory to be set to this constant (which, for example, allows the CMS to continue using the "templates" directory if so desired when the applications are refactored) and retains the current fallback of__DIR__ . '/themes'
- [#1195] Fix PHP error: Access to undeclared static property (mbabker)
With the current Platform, JComponentHelper is unusable due to the
$_components
property being declared with the underscore, but all uses within the class do not use the underscore. This makes it usable again. - [#1196] Autoload JMenu and JRouter child classes (mbabker)
Following the example in
JPathway::getInstance()
, I've modified JMenu and JRouter's getInstance methods to allow for autoloading the child classes. If the class can't be found first, then it will look in the hardcodedincludes/<file>.php
location for the class. - [#1197] Additions to mock application classes. (eddieajau)
Added basic TestMockApplicationCli class. Added mock response body support to TestMockApplicationWeb.
- [#1199] $lang is not initialised in adapter JInstallerTemplate::discover_install() (Denitz)
- [#1200] Copy edit/code style a comment (elinw)
- [#1201] Passing input array by reference (chdemko)
The JInput constructor is not receiving its argument by reference. This is causing unexpected behevior:
JFactory::getApplication()->input->set('foo', 'bar');
This will set $_REQUEST['foo'] equal to 'bar' (because of https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/input/input.php#L89: var is set by ref)
JFactory::getApplication()->input->post->set('foo', 'bar');
This will not set $_POST['foo'] equal to 'bar' (because of https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/input/input.php#L76, arg is not received by ref)
- [#1202] Allow JApplicationWeb::render() to receive params for a theme (mbabker)
Similar to
JApplication::render()
and the CMS's application classes, this sets the params for a theme if they are set in the configuration. - [#1203] Remove duplicated line (vietvh)
- [#1204] fix issue #1190 (ramalama)
Fixes only addRecipient
- [#1205] Reverting 1201 (eddieajau)
This pull is to revert the changes in 1201. For some reason it has changed the way internal data persist (made some independent tests fail). But looking at it, I actually think we should go further and not allow JInput to modify the source input (for example, it should get a copy of $_REQUEST, not a reference so that that input variable can make changes without affecting the rest of the application).
- [#1208] comment for database quote methods to avoid IDE error (florianv)
- [#1209] Updated database session code to avoid duplication of session id (garyamort)
See https://github.com/joomla/joomla-platform/pull/454 for original request. Repository reorg removed the old fix, so here is a new, updated one.
- [#1210] Allow JArrayHelper::getColumn process associative array (of arrays/ objects) (piotr-cz)
At the moment JArrayHelper::getColumn doesn't work on non-associative arrays. No idea why
for
loop has been used instead offoreach
.. - [#1213] Fix magic method declaration in docblocks (elkuku)
Those IDEs are getting smarter every day....
- [#1214] Add more tests for JUser (realityking)
- [#1215] Fixed an error inside component.php file, coming from an old change. (gpongelli)
Added sqlValue method inside PostgreSQL's driver, added its use inside insertObject and inside updateObject. Added sqlValue's test.
- [#1216] Remove workaround for old WebKit versions. (realityking)
This will improve (perceived) performance a bit for users of current versions of WebKit (and lower performance for older versions). since the majority of WebKit users use Chrome and update quickly this should be a net gain.
- [#1217] Change JApplication to use JCrypt, not JSimpleCrypt. + some clean-up (realityking)
- [#1219] Improve the JSession package. (realityking)
First bunch of changes to rework the session package. This is mostly very safe stuff, only B/C problem is dropping the JObject.
- [#1221] Curl request() encodes $data regardless the Content-type header. (dianaprajescu)
To post a file using curl the '@' prefix must be used with the file's full path. As of PHP 5.2.0, the CURLOPT_POSTFIELDS option must be an array if this prefix is used. That means the $data parameter of the request() method must not be encoded if the Content-type header is multipart/form-data.
- [#1223] Fix syntax error. (realityking)
- [#1225] Fixing up code styling from #1204. (LouisLandry)
- [#1227] JHtml::date format parameter documtentation is not correct (ramalama)
JHtml::date says in the doc that the $format parameter is use with strftime. This is not correct: The underlying functions JDate::format and JDate::calendar are using the php date format.
Updated the parameter hint.
- [#1228] Reduce dependency on JFolder (realityking)
The cache package still depends on filesystem, however JCache itself doesn't. JLanguage only depends on the string package and JXMLElement after this. The session package shouldn't depend on the filesystem package anymore.
Note: B/C issue created by removing JLanguage::parseXMLLanguageFiles(). It's simply not needed anymore due to the RecusiveDirectoryIterator in JLanguage::parseLanguageFiles()
- [#1229] Move JObserver and JObservable to legacy. (realityking)
- [#1230] Move JPagination to its own package. (realityking)
- [#1233] Updated doc chapter about testing (TestReflection) (florianv)
- [#1234] Added slash normalisation for JApplicationWeb media.uri properties. (robschley)
- [#1235] Remove JFormFields moved to the CMS tree. (realityking)
- [#1236] Fix a fatal bug in JSession and lay the groundwork for lazy sessions. (realityking)
- [#1237] JHtml doesn't need to depend on JDatabase. (realityking)
- [#1238] Use the PHP 5.3 const syntax where possible. (realityking)
This is mainly for consistency with class constants. Note that this only works for constants that are not conditional and that they take only a simple value and not the result of an expression. Since they are compile time instead of runtime based they get cached a bit more efficient with an opcode cache (negligible improvement thou)
- [#1239] Deprecate the following methods in JFactory: getACL(), getUri() and getXML(). (realityking)
- [#1240] Fix a few issues with JLog autoloading. (realityking)
- [#1241] Fix code style error. (realityking)
- [#1242] JPaginationObject dosesn't need to extend JObject. (realityking)
Also adds type hints to JPagination.
- [#1243] Fix a fatal bug in JAccess + docblock fix. (realityking)
Also fixes a docblock in the session package that causes a mismatch in JDepend.
- [#1244] Move JEditor to the legacy folder. (realityking)
- [#1246] Correct response code for creating forks (mbabker)
The GitHub API sends a 202 response on successful completion of forking a repo, not a 201. This fixes that as well as a few docblock lines in the class.
- [#1247] Fix failing unit tests. (realityking)
- [#1248] Fix an issue with providing a zero ID to JUser::getInstance (pasamio)
This pull request resolves an edge case where two requests to JUser::getInstance (and by extension JFactory::getUser) would return a user with a different ID. When called with a user ID of 0, a user object is created and cached in JUser::getInstance and then returned. If this JUser object is then persisted to the database, it is updated to have it's new user ID. However if another call to JUser::getInstance is made for a user ID of zero again, the existing object with it's new user ID will be returned.
This resolves the situation by ensuring that when the ID is zero that a new JUser object is returned and not cached.
- [#1249] Changed PostgreSQL's minimum version. (gpongelli)
This pull only contains change of minimum required version of PostgreSQL database.
Test class was run and returns same result under these PostgreSQL's versions: - 8.3.18 - 8.4.11 - 9.0.7 - 9.1.3
This pull includes a change inside "insertObject" test because 8.3 version doesn't support 'RESTART IDENTITY' clause, so switched to old-style sequence restart.
- [#1250] Fixes for Oracle driver, Oracle query and PDO driver (pasamio)
This pull request introduces various fixes for the Oracle driver, Oracle query class and PDO driver.
Summarised changes:
- Add double quote as the Oracle name quote to handle name quoting properly.
- Added support for supplying a query to execute to verify that a connection is active.
- Override default connection verification query for Oracle to support "dual" idiom.
- Update getTableColumns() to support rewriting a prefix on Oracle.
- Fix getTableColumns() to return results consistent with other drivers.
- Add replacePrefix() to Oracle driver to ignore double quoted items (it being the name quote character).
- Fix getEscaped() for PDO driver to not automatically quote it's results inline with other drivers.
- Store a copy of the error message in PDO execute() before trying to run keep-alive query which wipes out previous value.
- Suppress error message from lastInsertId() to avoid PDO warning you that a given database platform doesn't support it natively.
- Add a sudden death when trying to check if connected when already trying to check if connected to prevent infinite loop.
- Update Oracle query to only mangle the query for limiting and offset when applicable otherwise pass the query through unmodified.
- [#1255] Write unit tests for the JArchive package. (aaronschmitz)
A few unit tests added... and some to go still.
- [#1256] Joomla CMS [#27267] Multiple Loggers fail when using formattedtext (chdemko)
See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27267 and http://groups.google.com/group/joomla-dev-cms/browse_thread/thread/5513070c2c2ca6db
- [#1260] BUGFIX: discover template install (rdeutz)
lang was used but not set so the template installation failed and the style for the template wasn't created
- [#1262] change yes/no to true/false as will be committed in joomla-cms (benjaminpick)
As decided in http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28176 , true/false should be used instead of yes/no for consistency.
- [#1264] Remove commented code and related comment. (elinw)
- [#1267] Enabling multiple color fields (infograf768)
only a single JFormFieldColor field can exist (functionally) within a form See: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28426
The whole mooRainbow.css is included as it had a wrong encoding
- [#1268] Checkboxes fixes and tests (elinw)
This fixes a few issues in the checkboxes field and adds detailed tests. 1. Formerly the field was not checking for stored data when rendering, so it was always using the information from the field definition. Going to the field definition is now conditioned on there not being an existing value. 2. Formerly selecting more than one item to be checked (preset) was not working because the array of checked values was not being created correctly. Checkboxes continues to have the limitation that it cannot distinguish between a field that is deliberately saved as empty and one that has never been saved, so if the checked element is used it will always render with the checked items when the form is reopened. This is inherent to the structure of the checkboxes field type so developers should be aware of that and use the checked attribute with caution or consider using a "none of the above" option to force a value to be saved.
- [#1270] Add tests for JFormFieldCheckbox and fix an issue in the field. (elinw)
- [#1271] Adding new JInputJSON class (pasamio)
This pull request introduces a new JInputJSON class that permits handling requests that include a JSON body and automatically populates itself from the JSON in the request.
- [#1273] Doc block style fixes in the table package. (elinw)
- [#1274] Rename tests so they will run (elinw)
Rename the JFormRulesUrl and JFormRulesColor tests so they will run. Fix an issue in JString revealed by JFormRulesUrlTest. Add a test to JStringTest for that issue.
- [#1277] Run some code only when debug is on. (realityking)
- [#1282] Fix a parse error (elkuku)
So it happened that a parse error was committed and Mr. Jenkins let is pass silently (almost) pushing it to the master branch.
It would be nice to implement a call to php lint to prevent those "accidents" in the future.
- [#1283] Move more classes to legacy. (realityking)
Unit tests for legacy run fine with this,
- [#1284] Add an exception to the equals rule. (elinw)
- [#1294] Force cached CSS/JavaScript reload after update (chdemko)
When css/js/images are updated on a site, they are not reloaded on browsers that use caching. This pull request add a timestamp to files loaded by the JHtml library to force the reload of cached files.
- [#1293] Joomla CMS [#28535] Joomla 2.5.4 Timezones being doubled (chdemko)
See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28535
- [#1292] Fix issue #1266 (dianaprajescu)
I created the add function in order to avoid duplicated code since addRecipient, addCC, addBCC and addReplyTo are almost the same. #1266
- [#1289] Standardize default Content-Type handling across all transports. (piotr-cz)
According to IETF (http://www.ietf.org/rfc/rfc2616.txt) and W3C (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2) are case-insensitive, but in both documentations used in camel case.
- [#1288] Joomla CMS [#28411] Site breaks when deleting alternate style which is in use (chdemko)
See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28411
- [#1287] Fix docblock style and wording (elinw)
- [#1297] Fix an issue in bind() when load() is directly from database meaning articletext is "".(elinw)
- [#1299] Stop default handling of href in toolbar buttons (rvsjoen)
I refer to https://github.com/joomla/joomla-cms/pull/189 and http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28404
It has been suggested that this pull is done against the platform.
- [#1300] Reduce the use of JBrowser. (realityking)
Note that JHtml still depends on JBrowser, we'll need to fix that before we can move JBrowser to legacy.
Legacy unit tests run fine on my local machine.
- [#1301] Rename the old MVC classes so their names don't conflict with the new ones. (realityking)
This also among other things mixing the two MVCs in the same application.
Legacy unit tests run fine locally.
- [#1302] Use native session handlers whenever possible. (realityking)
I couldn't test these because I have neither memcache nor a windows server but I see no reason why the PHP handlers shouldn't work.
- [#1304] Check if $client->id is set before trying to use it. (elinw)
- [#1305] Import plugins on authorise instead of loading (ShMaunder)
*Apologies if this has been done incorrectly - this is my first ever pull request.
I think the authorise method is suppose to importPlugin() - I can't see any point in using getPlugin() as this will return plug-in data (which isn't captured anyway) and doesn't import them for the dispatcher.
Also, when calling the authorise method, you have to import both plug-in groups manually which seems pointless: JPluginHelper::importPlugin('user'); JPluginHelper::importPlugin('authentication'); $authorisations = JAuthentication::authorise($response, $options);
- [#1306] Fix a PHP notice and a checkstyle error. (realityking)
- [#1308] Use JFactory::getXML() and JXMLElement less. (realityking)
- [#1310] Code Style in Jhtmltest plus fix places where files are created twice causing errors (elinw)
There were a bunch of tests that had corrupted unit test results because JHtmlTest was having problems in testStylesheet when it was attempting to create a file with the same name as a file created earlier.
- [#1311] Unify the checking of the platform. (realityking)
The standardizes everything on the IS_WIN/IS_MAC/IS_UNIX constants. JApplication::isWinOS() is only deprecated for legacy purposes.
- [#1312] Deal with exceptions in a couple of places. (realityking)
- [#1313] Joomla CMS [#28741] E_STRICT: JArrayHelper::pivot should be declared as static(chdemko)
See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28741
- [#1315] Update documentation (elinw)
- [#1317] Move JGrid to its own package and allow JHtml to use the autoloader again. (realityking)
This is required for the CMS, since it relies on the autoloader for JHtml classes.
- [#1319] Fix issue #1309 (dianaprajescu)
Replace $this->input with $this->_input.
- [#1320] Check that $wpoption['modulemode'] == 1, not just that it is set. (okonomiyaki3000)
This is a fix for this bug: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28676
- [#1322] Support applications without JMenu. (realityking)
Deprecate some code not needed with the autoloader.
- [#1324] Remove getter for non-existing "class" property (sybrek)
Remove getter for non-existing "class" property (we're using class as part of the element).
- [#1325] Don't use deprecated APIs. (realityking)
- [#1326] Remove somes traces of PHP 5.2. (realityking)
- [#1327] Fix two parse errors (elkuku)
Yes i know that php lint takes a lot of time but...
- [#1328] Fix a couple of issues with cache. (realityking)
- [#1329] JSession: Removed duplicated code, code style (piotr-cz)
Minor fixes not affecting functionality
- [#1330] Joomla! throws error with valid xml string (bembelimen)
Test:
$xml = JFactory::getXML('<foo />');
expected result:
No JError warning
actual result:
Joomla! calls a "JLIB_UTIL_ERROR_XML_LOAD" JError Warning
Solution:
Don't check for "empty()", use === false instead.
- [#1332] Replace JRequest uses (mbabker)
- [#1333] PDO does not support serialization (stefanneculai)
PDO does not support serialization, so I think it should not be serialized. Adding the __sleep method would prevent serializing properties that are instances of PDO.
The connection is established again on __wakeup.
- [#1334] Fix a PHP notice in JControllerLegacy. (realityking)
- [#1336] Import code changes from Joomla 2.5.5. (realityking)
- [#1338] Correct use of setLocation (mbabker)
Since the API for JTableNested::setLocation changed to not return a boolean value, its use in the component install adapter needs to be corrected. As is, component menu items are not created because of the use of the old API.
- [#1339] Remove JHtmlBatch and JHtmlCategory since they were moved to the CMS. (realityking)
- [#1340] Don't have JFactory depend on SimplePie and move the code related to it to legacy.(realityking)
SimplePie ist outdated and throws way too many E_STRICT errors. These changes allow us to eventually remove it. The different versions for the @deprecated tags are for backwards compatibility for the CMS. The CMS can take JSimplepieFactory but we need the method in JFactory for the next cycle.
- [#1341] Joomla CMS [#28633] JUserHelper getProfile method should be static (ShMaunder)
In no way a major issue; noticed while using JUserHelper::getProfile that it is not declared as static:
public static function getProfile($userId = 0)
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28633
I don't believe there are backward compatibility issues.
- [#1343] Handling msg object in adapter uninstall (mbabker)
1) Presently, a PHP Notice "ob_end_clean(): failed to delete buffer. No buffer to delete in /libraries/joomla/installer/adapters/plugin.php on line 638" is thrown during plugin uninstall because a
$msg
object is created before theob_start()
command is issued. This instance is not necessary since the object is set at the correct time after the custom uninstall method.2) In the file, module, and package adapters, the
$msg
object wasn't registered to extension_message, contradictory in behavior to the component and plugin adapters. This is corrected. - [#1344] Errors during a save redirect incorrectly to page resulting in creation of new record.(Octobit)
See Joomla tracker issue #28770
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28770
- [#1345] Handle scriptfile for file extensions (mbabker)
At present, the scriptfile for file extension types isn't copied over during install, leaving it unavailable for uninstall routines. This change sets it up so that it is installed in a manner similar to packages.
- [#1346] Update staging (infograf768)
See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28535
This solves the display of the Modified date
- [#1347] Move JXMLElement to legacy. (realityking)
- [#1348] Fix a fatal error in JInstaller and some clean up. (realityking)
- [#1351] Clean up the legacy MVC a bit more. (realityking)
Mostly deprecating some stuff or adding the log messages for deprecated stuff. Also adds a $input member to hold a JInput object to JControllerLegacy. This makes the old JController a bit more like the new one.
- [#1352] Remove/deprecate more code in legacy. (realityking)
- [#1357] Update Oracle driver to set timestamp format as well as date format (pasamio)
This pull request updates the Oracle driver to set the timestamp format to match the date format which is the Joomla! standard. This means that instead of getting Oracle's default timestamp formatting, timestamp fields are returned with Joomla!'s preferred date formatting.
- [#1509] fix JViewLegacy::getName model name discovery (dongilbert)
The current regex implementation for model name auto-discovery in the JViewLegacy prevents a developer from the use of the substr of "view" in the classname without consequences. Hence the reason for the custom error created just for that case. (see line 466 of the diff: https://github.com/joomla/joomla-platform/pull/1509/files#L0L466). This pull request fixes that.
Note: This fix breaks Backwards Compatibility (potentially) as the previous regex implementation used the /i modifier and searched for case insensitive strings. Here we use strpos (case-sensitive). Be sure your classnames are properly CamelCased (https://docs.joomla.org/Coding_style_and_standards#Classes)
This is how I tested - https://gist.github.com/3563618
- [#1363] [CMS #28823] Re-add isError into the JError legacy class (ShMaunder)
Not sure the reason for the removal of isError() from the JError legacy class in J3.0 Alpha 1 - https://github.com/joomla/joomla-platform/pull/802 ?
I understand its old and "instanceof Exception" is the better way... but it just seems like this removal might break any extensions that use it (including my old code).
If we have a legacy class, we may as well keep it all in tact.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28823
- [#1362] JUpdate load form XML - fixed empty response data (juliopontes)
Hi,
the joomla update are getting a empty response from Http because use $response->data instead of $response->body.
- [#1364] Have the session fire an event after it is started and use this to populate the session with some default objects. (realityking)
This is an alternative approach to #1349 that doesn't cause JSession to depend on JUser and JRegistry.
- [#1365] Move aliases for the old class names to the legacy folder. (realityking)
Also fix the unit tests to not rely on these legacy name.
- [#1366] There is no reason no to allow blank article bodies. (elinw)
As discussed on the CMS list there is no reason for this annoying requirement though there may have been in the past. https://groups.google.com/forum/?fromgroups#!topic/joomla-dev-cms/994z5Pnzvms
- [#1368] Update unit tests in JTableContent (elinw)
- [#1370] Remove workarounds in JProfiler::getMemory() for when memory_get_usage() is not available. (realityking)
According to the PHP documentation memory_get_usage() is always available since 5.2.1. http://php.net/manual/de/function.memory-get-usage.php
- [#1371] Let mysqli be the base class for mysql instead of the other way around. (realityking)
This this is a necessary first step to eventually get rid of mysql.
- [#1372] Fixes for extension update adapter (mbabker)
The update adapter is failing in the CMS master repo currently. These changes get it working again.
- [#1373] Required and validate elements errors messages are not translatable (Regression).(infograf768)
Required and validate elements error messages are not translatable (Regression). + errors in front-end wrong display. See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28827
- [#1374] [IMP] JImage->toFile() returns boolean (phproberto)
Add a return value to the method toFile in the JImage library.
- [#1375] [IMP] add crop automatic offsets calculation (phproberto)
Modify crop function to autogenerate left & top centered offsets if received null values.
- [#1376] Fix a doc block (elinw)
- [#1377] Fix issue where existing article can't be saved blank. (elinw)
- [#1378] Remove unreachable code (dead code) (pborreli)
- [#1379] Remove more form fields that belong to the CMS. (realityking)
Removed are the following classes: JFormFieldContentLanguage JFormFieldEditor JFormFieldMedia JFormFieldMenuitem
- [#1380] Remove our custom session ID generating code if favor of session_regenerate_id().(realityking)
Note there's one non-optional use of session_id() left on line 624. I'm not really sure what it does so I didn't touch it for now.
I confirmed the CMS works fine with this change (tested admin login/logout). The session id changes on logout. (It doesn't on login because apparently we don't fork the session on login)
- [#1383] Remove use of intval() and floatval() in favor of casting. (realityking)
We mainly use the cast syntax but sometime we use intval() and floatval(), the pull makes things more consistent.
- [#1385] Make JImageFilter child classes autoloadable (mbabker)
This should fix #1384
- [#1386] Improvements to install adapters (mbabker)
- Restored preflight method to plugin uninstall per @pasamio comments at https://github.com/joomla/joomla-platform/pull/1343#issuecomment-6798887
- Added check to package adapter install method to determine whether to use install or update route; subsequently changed later JInstaller::install trigger to use the route information
- Document class vars in template adapter
- Remove check for install root tag in JInstallerHelper::detectType()
- Deprecate JInstallerHelper::splitSql() in favor of JDatabaseDriver::splitSql() (which the deprecated method already proxies to)
- Remove obsolete code per @infograf768 as suggested at https://github.com/joomla/joomla-platform/pull/953#issuecomment-4316832
- [#1387] Fix unit test failures from #1352. (realityking)
- [#1388] Improve mysql database handling. (realityking)
Two changes are in this pull request: -JDatabaseQueryMysql now extends JDatabaseQueryMysqli instead of the other way around, making it easier to eventually remove the mysql version. -The eating of the charset was changed to follow PHP best practices
- [#1389] JFactory::createDocument always creates HTML documents. (Bakual)
Fixing the "format" URL parameter. Bug was introduced when the depreceated "no_html" was removed. Now it is no longer possible to create other document types using "&format=raw". This PR brings back this function but doesn't reintroduce the "no_html" parameter.
- [#1391] [IMP] function to create thumbnails from the current image (phproberto)
Finally after the previous JImage required modifications I submit the optimized createThumbs function to quickly create thumbnails from the current image.
Example. Create 2 thumbnails with cropping: jimport('joomla.image.image'); $imagen = new JImage(JPATH_SITE . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'powered_by.png'); $thumbSizes = array('50x50', '250x100'); $imagen->createThumbs($thumbSizes, 4);
- [#1392] Remove dependency on JObject from JRouter, JMenu and JPathway. (realityking)
- [#1393] Speed improvement to JRoute::_() (realityking)
JRoute::_() may be executed several hundred times on a complex site so even a small optimization can be measureable.
- [#1398] Optimize images to reduce their filesize. (realityking)
- [#1399] Avoid using deprecated APIs and remove more deprecated code in JModuleHelper.(realityking)
- [#1402] Remove dependency on JObject from JPagination. (realityking)
For backwards compatibility we'll keep the get() and set() methods around.
- [#1404] Correct confusion between required and validate messages (infograf768)
When a field contains both a required and a validate element, we get a confusion for the error messages. This patch takes element['message'] out of the required conditional as, in this case, the label or the name can be used for the error. (Patch also ready for the CMS with fields and strings changes)
- [#1405] Add basic PHARchive support. (LouisLandry)
Add basic package definition files for using https://github.com/LouisLandry/packager to package either a platform PHAR or a platform + test libraries PHAR. Additionally there are a few small fixes here and there to allow the platform to work as a PHAR.
- [#1406] Fix problem with JLoader prefixes (rvsjoen)
When registering a custom prefix that has more than a single uppercase character, JLoader searches the wrong path. For example, registering
php JLoader::registerPrefix('Jcms', JPATH_PLATFORM . '/cms');
will cause it to look for, say, JcmsViewHtml in libraries/cms/cms/view/html.php because the "cms" part of the prefix is mistakenly interpreted as a path segment.
This patch will make sure the whole first segment of a CamelCasedWord is used as the loader prefix.
- [#1411] Autoloader cleanup (ianmacl)
Moving JHtml files so that they can be autoloaded. This allows for more readable code because you can now use, f.e., JHtmlSelect::radiolist($params) instead of using _.
- [#1416] Corrections to JAccess when there is an invalid or missing asset or parenting is to root.(elinw)
Although there is some confusion in the wording examination of the comments and docblocks of JAccess indicates that if there is parenting to the root asset or there is an invalid asset that the rules from the root asset should be used. For various reasons this was not actually working in the current class. This has been causing problems for developers who wish to parent assets from the root asset. In addition this corrects a situation where as a result of the asset_id being privately manage a corrupted asset_id could never be corrected using the class.
The approach to solving this involved several steps. First, change the code so that the id of the root asset is always obtained using the API rather than assuming either that the parent_id is 0 or that the id is 1. This solves problems when the asset table data has been created outside of Joomla and imported, possibly with the root not as the first record.
Second, when there are no rules available, for example when the asset is not found, the root asset rules are used regardless of whether the rules are being treated as recursive or not. This is important for a number of reasons not least of which is it provides super user permissions if available. Previously in this situation the super user did not have special super user permissions.
Third, there are some complications when getActions/getActionsFromFile/getActionsFromData do not include a section that matches an asset (that is that final assets are parented to the root asset with nothing akin to a component in between). In this case, such assets will now fall back to the root asset for their rules unless something else is provided.
Fourth, a number of the tests for JRules and JAccess had incorrect expected results. These have been corrected.
- [#1417] Allowing override of the xx-XX.localise.php (infograf768)
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28877
This patch let's override the settings in the localise.php file without touching at the original file in the core language folders by letting add an xx-XX.localise.php file in the language/overrides/ folders. For example the maximum number of characters allowed to search.
- [#1419] Add active flag to JPaginationObject, add coverage-legacy to build/.gitignore (mbabker)
This adds a flag to JPaginationObject so that items can be reported as the active page in the pagination.
Also, I added the legacy unit report coverage to the .gitignore since it wasn't there.
- [#1420] Allow template to override system message (vietvh)
Previous pull: https://github.com/joomla/joomla-platform/pull/1381
This pull will allow template developer to override the system message by putting a file name 'message.php' in template's html folder. If no message template file found, the default (current) markup will be used.
- [#1421] Add patch() method to JHttp. (dianaprajescu)
- [#1426] Fix improper detection of UTF-8 encoding in strcasecmp and strcmp. (elinw)
The test of whether locale is UTF-8 is incorrect because it is missing the 'utf8' string which is commonly what is in the string returned when locale0 is obtained.
- [#1428] [#28817] Cache not being cleared automatically when changes are made in (dextercowley)
- [#1429] Add more unit tests from the CMS. (realityking)
- [#1430] Missing parentheses in grid sort (dextercowley)
This causes sort columns to not work correctly in CMS manager screens. For example, the desc icon always shows.
- [#1433] Import additional tests from the CMS. (realityking)
Also fixes two small bugs in JLanguage revealed by the tests.
- [#1435] Fix code style for JsonSerializable. (realityking)
For some strange reason this was picked up the CMS style checker but not by ours.
- [#1439] Make mysqli the default driver everywhere and use exception chaining in JDatabaseDriverPdo (realityking)
- [#1438] Fixing warnings triggered by cURL when no response is received. (pasamio)
This pull request resolves a situation where when no response from a server is received a PHP warning is thrown by the cURL transport. Instead the code triggering the warning is mitigated and additionally a check to see if there was any response data is added to validate a response was actually received or throw an exception.
- [#1440] Further reduce dependency on JObject and the filesystem package (realityking)
The change to JLanguage saved 0.2 MB RAM with language debug on in my testing.
- [#1443] Regex filter fits (Radek-Suski)
Modified the regular expression in language debugger to include dot sign as a valid KEY character and allow including an escaped double quotes inside the value (right-hand)
- [#1444] Fix cache error due to incorrect commit 83eb8fae (dextercowley)
I goofed with the prior pull request. This should fix it. Thanks.
- [#1446] Remove JToolbar and JHelp. (realityking)
They have been moved to the CMS.
- [#1447] Add stripIframe method (elinw)
In doing some work with feeds I noticed that we have stripImage available, but we don't have a way to strip iFrames which pose similar or more serious issues than images. A separate method makes sense because sometimes it is very reasonable to take the images from a feed but not to want the risks associated with iFrames.
- [#1448] [#28912] Browser doesn't respond when debug language is enabled (pjwiseman)
Simplified regex to prevent stack overflow on long strings.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28912
- [#1449] Implement Countable in JInput. (realityking)
We need this in the CMS to remove some uses of JRequest.
- [#1450] Remove pointless comments. (realityking)
I got bored on the train today and thought I clean this up ;)
This removed all occurrences of the "Initialise variables" comment which is pretty pointless since the code is absolutely self explanatory.
- [#1451] Add missing return in the "extract()" (jms2win)
This apply the fix reported in the issue https://github.com/joomla/joomla-platform/issues/1437#issuecomment-7539014
- [#1452] Fix issue with Oracle timestamp (pasamio)
This pull request fixes up an issue with the Oracle NLS_DATE_FORMAT not being set properly after the change to add the NLS_TIMESTAMP_FORMAT to the set. The code should have duplicated the
execute()
clause however this was not done so this meant that the NLS_TIMESTAMP_FORMAT was updated triggering timestamp fields to follow with the right format however the NLS_DATE_FORMAT wasn't set properly triggering the existing date fields to utilise the wrong format. - [#1453] Allow database queries to always be counted (eddieajau)
This change moves the query count out of the debug conditional, so that the number of queries the driver executes is always counted (meaning JDatabaseDriver::getCount is always available). The additional overhead would be negligible but allows permanent access to a useful statistic regardless of the debug setting but without the overhead of storing all the queries.
- [#1455] Add .gitignore for the unit tests' tmp folder. (aaronschmitz)
Ignores: /tests/tmp/cache/.php /tests/tmp/cache/_testing /tests/tmp/media /tests/tmp/themes /tests/tmp/error.
- [#1457] Fix JInput loading in JApplicationCli (elkuku)
The autoloader is quite case sensitive ;)
- [#1458] Fix bug in JString::parse_url that causes urlencoded strings to be decoded (aaronschmitz)
Switch JString::parse_url to return false on failure as specified in it's doc block. JString::parse_url is now identical to parse_url for ascii strings.
- [#1461] Remove follow redirects. (dianaprajescu)
I have removed the option to automatically follow redirects for reasons specified in pull request #1432
- [#1462] Reduce dependency on JFile. Deprecate JFile::read() and JFile::getName(). (realityking)
- [#1464] If the locale isn't available, skip the unit tests so they don't fail. (aaronschmitz)
- [#1466] Add additional unit tests. (realityking)
Also fix a bug with JStream revealed by the tests.
- [#1471] Add name.min.ext file format to debug check (mbabker)
Improving on JHtml::includeRelativeFiles() debug mode checks, I've added the possibility for files supplied in the format name.min.ext (jQuery files use this format for example) to be loaded in an uncompressed format in debug mode by stripping the .min portion of the filename out instead of appending -uncompressed.
Sample use case: In some code (https://github.com/mbabker/Podcast-Manager/blob/master/plg_content_podcastmanager/player.php#L283), I currently manually check for JDEBUG and change the filename as appropriate. With this patch, the conditional around JDEBUG is no longer necessary in my code.
- [#1472] Add password hashing interface and basic implementation. (ianmacl)
This will provide basic password hashing capabilities using a straightforward and easy to use interface.
Use is easy: $hasher = new JCryptPasswordSimple();
$hash = $hasher->create('MyPasswordHere', JCryptPassword::BLOWFISH);
$isPasswordCorrect = $hasher->verify('MyPasswordHere', $hash);
The basic implementation supports BLOWFISH, MD5 and the legacy Joomla password format. For more complex requirements an alternative implementation of the interface can be supplied and used.
- [#1473] Fix a grammar mistake in a comment (elinw)
- [#1474] Set guest properly after load in JUser (stefanneculai)
This is a fix for issue #1427
- [#1475] Move JHtmlBehavior::_getJSObject() to JHtml::getJSObject(). (realityking)
Reduces code duplication a fair bit.
- [#1476] More preparations for removing the mysql driver. (realityking)
I hope the is the final step, at least I didn't find anymore dependencies on mysql.
- [#1477] Deal with the PDO class not being available. (realityking)
Database drivers that use PDO throw fatal erros when isSupported() is called and the PDO class doesn't exist.
- [#1478] Fixed a fatal error in JHttpTransportStream. (robschley)
- [#1482] Update version history (elinw)
- [#1483] Making the Joomla platform loadable as a dependency from Composer (2) (eirslett)
See this discussion: https://github.com/joomla/joomla-platform/pull/1481#issuecomment-7914023
- [#1484] Make sure JFolder is imported in files that use it. (realityking)
Due to using JFolder less and less classes that just relied on it to be already loaded now error out. This pull adds all the missing jimports so this doesn't happen.
- [#1485] Todos should not be included in the repository in most cases (elinw)
- [#1486] Validate that the key parameter is a string (pasamio)
This pull request validates that the
$key
parameter provided to the function is actually a string before trying to use this. I came across this as I was working to modify JTable to be able to support multiple primary keys in a somewhat transparent way. By default JTable passes through it's keys onto the databaseinsertObject
andupdateObject
function which works well for single keys but not properly forinsertObject
when the$key
is an array. - [#1487] Fix issues with Oracle DB Unit (pasamio)
This commit provides some extra functionality and fixes to the Oracle DB Unit base case. It fixes an issue with the URI parsing where the preceding slash was included with the database name which triggered errors and it also supports passing in a custom Oracle database schema and table prefix as well. A bug with the charset is also fixes to use the right field instead of the host field it was previously using.
- [#1493] Removing doc references to JController in JViewBase and JViewHtml (dongilbert)
When the new MVC was proposed, the original JViewBase and JViewHtml classes took a required second parameter of a JController object. This is not the case now. This pull request updates the docs to reflect the code.
- [#1495] Fix some small holes in the test coverage. (realityking)
- [#1496] Reduce dependency on JFolder and JFile. (realityking)
- [#1498] Deprecating IS_MAC in favor of IS_UNIX (dongilbert)
- [#1501] Improve test coverage some more. (realityking)
- [#1503] Bring some sanity to JComponentHelper::isEnabled (realityking)
JComponentHelper::isEnabled is a rather confusing piece of API, this should let it behave as expected.
Please don't pull this until we have buy-in from the CMS since this a B/C break and a CMS specific piece of API!
- [#1505] Remove JEditor since it has been moved to the CMS. (realityking)
- [#1506] Fix errors introduced in #1504. (realityking)
- [#1504] Reduce phpmd warnings. Cover all out folders with phpmd. (realityking)
- [#1513] Add a lint target to build.xml and fix an error found by it. (realityking)
- [#1397] Some additional changes since memory_get_usage() is now always available. (realityking)
No addition to the deprecated log because I felt JProfiler should remain without dependencies on other classes.
- [#1360] Route Query String Fix and Raw Route (pasamio)
This pull request fixes an issue where if a query string contained a colon in it (e.g. ?filters=content_id:20) that PHP's parse_url function would get confused. This meant that it would fail to properly process the path resulting in the first path segment being truncated erroneously and no match found for the route. This pull request preprocesses the route to remove the query string before parse_url function so that it will work reliably.
The second change is pushing into the input the raw route for the request. This is to permit direct access to the route segments in the controller should it wish to make further decisions based on the route segments. A use case is multiple hard coded mappings where the last segment is not variable however may have meaning to the individual controller (e.g. there are limited options available that can be reasonably elaborated).
- [#1395] We have to prefer the main libraries over the legacy libraries. (realityking)
Otherwise we're in autoloader hell.
This breaks the current platform on the CMS.
- [#1394] Various little cleanups. (realityking)
-Fix package tags. -Remove an useless file. -Add a unit test for JFactory::getXML() -Prefer not to use aliases for functions. -Prevent a deprecation warning in a supported case.
- [#1358] Move JURI to its own package. Stop using JFactory::getUri(). (realityking)
- [#1361] Build multi-key update support for JDatabaseDriver::updateObject. (pasamio)
This pull request provides support for providing an array as the key to the JDatabaseDriver::updateObject method. This permits updating objects where there is more than a single key for the given table. JDatabaseDriver::insertObject does not require this because it can directly insert without worrying about providing a where clause which is required for the update statement to work properly. This change is backwards compatible and will map the
$key
from a string to array if a string is provided. Support is also provided for re-mapping an object into an array for using objects as well for the key. - [#1353] Fix a bug where the session could be started twice and additional improvements to JSession. (realityking)
- [#1321] Three Bug Fixes (robschley)
Fixed fatal error in JCacheStorageMemcached. Fixed JHttpTransportCurl not following redirects. Fixed an undefined offset notice in JInput.
- [#1314] Fix issue with cURL confusing itself with 100 Continue headers. (pasamio)
cURL has an issue handling 100 Continue headers. It sends an Expect for 100 Continue however when it was given a 100 Continue header, it uses that and populates it with no header information and then puts the expected headers in with the rest of the body. This obviously makes life rather difficult to process the headers or make any assumptions about the contents of the body.
- [#1291] Add in robot detection (stefanneculai)
Fix for issue #1254.
Code and tests included.
- [#1290] Method in POST requests - router for RESTful web application (stefanneculai)
Most of the RESTful web applications allow to pass method as a parameter in the POST request, because not all clients support advanced methods such as PUT or DELETE.
I have added in a variable called
methodInPostRequest
in theJApplicationWebRouterRest
which allows or not such requests.There are tests for the new code too.
- [#1276] Remove dependency on JObject from JApplicationBase. (realityking)
Causes some small backwards compatibility problems in the CMS but overall still a good idea.
Special pull request for @LouisLandry
- [#1281] Create a legacy package. (realityking)
This has advantages for documentation and JDepend.
- [#1259] New (and generic) web application routers. (LouisLandry)
I still need to write some documentation, but hopefully the code is simple and clean enough to understand clearly. There are three new classes:
JApplicationWebRouter
,JApplicationWebRouterBase
andJApplicationWebRouterRest
. These are not meant to be one size fits all. They are meant to provide a solid foundation for what is hopefully the majority of use cases in URL routing.JApplicationWebRouter
The foundational web router class is abstract. The premise of the class is that some sort of route string would be passed into the execute method, that string would be parsed within the
parseRoute()
method to determine the name of the appropriate controller to execute, thenfetchController()
would be called to actually instantiate the controller object and return it. Once that is done then the controller is simply executed.I've purposefully not provided an implementation of
parseRoute()
in the base class because there are infinite different ways a route can be examined to determine how to proceed. Other features of the class include the ability to set a default controller name if an empty route was given, and also the ability to set a controller class prefix that would be prepended to any controller name returned fromparseRoute()
.JApplicationWebRouterBase
The basic concrete implementation of
JApplicationWebRouter
provides a very simple algorithm to parse routes based on apattern => controller
mapping. The premise is that if an incoming route matches the given pattern than the associated controller will be returned and ultimately executed. It is important to note that for this implementation the pattern is not a regular expression. The route and patterns are broken down into segments split over/
and evaluated segment by segment. There must be an exact match for all segments to constitute the route matching the pattern.For example if we have pattern
continents/europe
:- The route
continents/europe
is a match. [Every segment matches] - The route
continents/asia
is NOT a match. [The second segment asia does not match europe] - The route
continents/europe/germany
is also NOT a match. [The final segment germany is not in the pattern]
Variables
Along with standard string comparison for route segments, patterns can include variables by prefixing the segment with a
:
. To continue with our previous example let's make the actual continent a variable.The new pattern is
continents/:continent
:- The route
continents/europe
is a match. [Every segment matches because europe is in a variable segment] - The route
continents/asia
is ALSO a match. [Again, asia is in a variable segment] - The route
continents/europe/germany
does NOT a match. [The final segment germany is still not in the pattern even though the europe segment works since it is in a variable segment]
A side effect of using variables is that the variable name (everything in the segment except the opening
:
) is added to the application input object with the value found in a successful route match. Using the same example as above; patterncontinents/:continent
:- The route
continents/europe
matches and the application input object will haveeurope
set for input variablecontinent
. - The route
continents/asia
matches and the application input object will haveasia
set for input variablecontinent
.
Note: If you need to start a segment of your pattern with a
:
and do not want the segment to be considered a variable simply escape the colon like\:
.Splats
In addition to the standard per-segment variables you can use the asterisk
*
symbol to indicate a match across segments. For example the patterncontinents/*/berlin
would match a routecontinents/europe/germany/berlin
. It would not match the routecontinents/europe/germany/frankfurt
since it is looking for the last segments to beberlin
.If you want to capture the part of the route that matches the splat then you simply need to name the segment. For example the pattern
continents/*cont_nation/berlin
would still match the routecontinents/europe/germany/berlin
however this time the input object will haveeurope/germany
set for the input variablecont_nation
.You can also mix and match the splats and variables such as the pattern
continents/*/:city
. That will match the routecontinents/europe/germany/berlin
andberlin
will be the value for the input variablecity
.Note: Similar to variables if you need to start a segment of your pattern with a
*
and do not want the segment to be considered a splat simply escape the asterisk like\*
.JApplicationWebRouterRest
The generic RESTful router extends
JApplicationWebRouterBase
and inherits the same pattern matching with variables as discussed above. The only addition is thatJApplicationWebRouterRest
also maintains a map of HTTP Methods [GET, POST, PUT, etc.] to controller class suffixes. This is used so that you can namespace your controllers based on the type of action being performed on the resource. As an example if we have an application that manages resources called "articles" we would only need two pattern rules: one for with an article ID and one for without.articles
=>articles
- If no ID is present.articles/:article_id
=>articles
- If an article ID is present.
Let's also set the controller prefix to
MyController
since that happens to be my application's prefix for finding controllers.Now all we need are the following classes since the
JApplicationWebRouterRest
router is going to take care of the HTTP Method mapping for us.MyControllerArticlesCreate
-POST /articles
- Create a new article.MyControllerArticlesDelete
-DELETE /articles/42
- Delete article 42.MyControllerArticlesGet -
GET /articles/7` - Get article 7.MyControllerArticlesUpdate
-PUT /articles/7
- Save an update to article 7.
- The route
- [#1278] Add support for changing the default schema when connecting to Oracle. (pasamio)
This pull request adds support for changing the default schema when connecting to an Oracle database. This is useful for when the user connecting isn't the same user as the desired schema where the Oracle tables are being stored. This adds a new
schema
option to the supported options for Oracle. Schema is similar to database name in other systems however as Oracle treats database names differently when connecting this is a distinct option. - [#1269] Reduce dependency on JObject. (realityking)
- [#1275] Remove references to zend.ze1_compatibility_mode. (realityking)
It has been removed in PHP 5.3.
- [#1212] Fix typos in JInstaller. (realityking)
- [#1211] Fix the subpackage tag for the controller package. (realityking)
Makes the dependency graph a bit more helpful.
228 Pull Requests:
- realityking: 91
- elinw: 22
- mbabker: 14
- pasamio: 12
- chdemko: 7
- aaronschmitz: 6
- infograf768: 5
- dianaprajescu: 5
- stefanneculai: 4
- elkuku: 4
- LouisLandry: 4
- florianv: 4
- phproberto: 3
- robschley: 3
- piotr-cz: 3
- dextercowley: 3
- ShMaunder: 3
- eddieajau: 3
- dongilbert: 3
- rvsjoen: 2
- benjaminpick: 2
- ianmacl: 2
- okonomiyaki3000: 2
- eirslett: 2
- ramalama: 2
- vietvh: 2
- gpongelli: 2
- pborreli: 1
- jms2win: 1
- Bakual: 1
- pjwiseman: 1
- Radek-Suski: 1
- jamesmoey: 1
- garyamort: 1
- Denitz: 1
- rdeutz: 1
- sybrek: 1
- Octobit: 1
- bembelimen: 1
- juliopontes: 1
Merged By:
- LouisLandry: 95
- chdemko: 46
- realityking: 41
- ianmacl: 22
- pasamio: 17
- eddieajau: 4
- robschley: 2
- eirslett: 1