New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow packages to declare that their child extensions cannot be uninstalled #13154

Merged
merged 4 commits into from Dec 13, 2016

Conversation

Projects
None yet
8 participants
@mbabker
Member

mbabker commented Dec 10, 2016

Pull Request for Issue #12976 and #13151

Summary of Changes

This will allow a package to declare in its XML manifest that child extensions cannot be uninstalled separately and implements the checks to block this behavior. It also removes the check in the extension manager which prevents language extensions from being uninstalled separately.

To accomplish this, a new <blockChildUninstall> tag is supported and should provide a value that translates to a PHP boolean. The default behavior is <blockChildUninstall>0</blockChildUninstall> which is consistent with the existing behavior since there is no lookup in place. When set to 1 or true, this will block child elements from being removed.

Testing Instructions

Alter a package extension's manifest to include the new tag and test the uninstall behaviors of its individual extensions. This will rely on a successful install that registers the parent package ID to the database as implemented earlier.

Documentation Changes Required

  • Document the new tag in docs covering package extension manifests
  • Update https://github.com/joomla/schemas with the new tag if we are still maintaining these schemas
@andrepereiradasilva

This comment has been minimized.

Show comment
Hide comment
@andrepereiradasilva

andrepereiradasilva Dec 10, 2016

Contributor

one general comment shouldn't the pkg_en-GB manifest have this new xml tag <allowChildUninstall>0</allowChildUninstall>?
https://github.com/joomla/joomla-cms/blob/staging/administrator/manifests/packages/pkg_en-GB.xml

Contributor

andrepereiradasilva commented Dec 10, 2016

one general comment shouldn't the pkg_en-GB manifest have this new xml tag <allowChildUninstall>0</allowChildUninstall>?
https://github.com/joomla/joomla-cms/blob/staging/administrator/manifests/packages/pkg_en-GB.xml

Show outdated Hide outdated libraries/cms/installer/adapter/component.php
// Does this extension have a parent package? If so, check if the package disallows individual extensions being uninstalled
if ($this->extension->package_id)
{
if (!$this->canUninstallPackageChild($this->extension->package_id))

This comment has been minimized.

@andrepereiradasilva

andrepereiradasilva Dec 10, 2016

Contributor

small thing, but couldn't this be reduced to just one if?

if ($this->extension->package_id && !$this->canUninstallPackageChild($this->extension->package_id))

the same for the others.

@andrepereiradasilva

andrepereiradasilva Dec 10, 2016

Contributor

small thing, but couldn't this be reduced to just one if?

if ($this->extension->package_id && !$this->canUninstallPackageChild($this->extension->package_id))

the same for the others.

@andrepereiradasilva

This comment has been minimized.

Show comment
Hide comment
@andrepereiradasilva

andrepereiradasilva Dec 10, 2016

Contributor

hum tested with weblinks latest beta (just adding <allowChildUninstall>0</allowChildUninstall> to pkg_weblinks.xml file and ziping again) and didn't seem to work. i was able to uninstall every extensions of the component without uninstalling the package.
image

Contributor

andrepereiradasilva commented Dec 10, 2016

hum tested with weblinks latest beta (just adding <allowChildUninstall>0</allowChildUninstall> to pkg_weblinks.xml file and ziping again) and didn't seem to work. i was able to uninstall every extensions of the component without uninstalling the package.
image

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

Did not add to a lang pack the new tag <allowChildUninstall>
Tested both languages which have been installed as packs before #12977 and after.
In both cases, trying to delete a site or an admin language is not permitted and instead of the clear message we got before or the new string, we now get Error uninstalling language.

Then I added <allowChildUninstall>1</allowChildUninstall> in the lang pkg, zipped it and installed.
Tried to delete a site or admin language and could not. Same message.

Changed to <allowChildUninstall>0</allowChildUninstall> and same result.

Member

infograf768 commented Dec 11, 2016

Did not add to a lang pack the new tag <allowChildUninstall>
Tested both languages which have been installed as packs before #12977 and after.
In both cases, trying to delete a site or an admin language is not permitted and instead of the clear message we got before or the new string, we now get Error uninstalling language.

Then I added <allowChildUninstall>1</allowChildUninstall> in the lang pkg, zipped it and installed.
Tried to delete a site or admin language and could not. Same message.

Changed to <allowChildUninstall>0</allowChildUninstall> and same result.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

Concerning language packs, another change as to be done in the model:
See https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_installer/models/manage.php#L234
By taking off && $row->type != 'language', I now can uninstall a language.

But <allowChildUninstall>0</allowChildUninstall> still does not work.

Member

infograf768 commented Dec 11, 2016

Concerning language packs, another change as to be done in the model:
See https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_installer/models/manage.php#L234
By taking off && $row->type != 'language', I now can uninstall a language.

But <allowChildUninstall>0</allowChildUninstall> still does not work.

@Bakual

This comment has been minimized.

Show comment
Hide comment
@Bakual

Bakual Dec 11, 2016

Contributor

I think the whole approach is flawed here.
First I think using an allowChildUninstall tag is the wrong way. Since that is the default behavior I would expect a blockChildUninstall tag instead. It's a bit counterintuitive when you have to add allowChildUninstall="0" to change the behaviour.

But more importantely I don't think it makes sense to have that tag in the package. I think it's a very rare case that you don't want to allow any subpackage to be uninstalled. More often you just want to prevent eg the library or the component to be uninstalled. But the modules and plugins for example are fine to be uninstalled in most cases.

As for the language packs (where this request likely comes from), we're trying to solve the issue from the wrong end. It origins from the fact that you can't reinstall an already installed language from the language installer. Allow that (instead of hiding, show the language as installed and show a "reinstall" button) and you no longer need to block uninstalling language subpacks.
I can do that PR.

Contributor

Bakual commented Dec 11, 2016

I think the whole approach is flawed here.
First I think using an allowChildUninstall tag is the wrong way. Since that is the default behavior I would expect a blockChildUninstall tag instead. It's a bit counterintuitive when you have to add allowChildUninstall="0" to change the behaviour.

But more importantely I don't think it makes sense to have that tag in the package. I think it's a very rare case that you don't want to allow any subpackage to be uninstalled. More often you just want to prevent eg the library or the component to be uninstalled. But the modules and plugins for example are fine to be uninstalled in most cases.

As for the language packs (where this request likely comes from), we're trying to solve the issue from the wrong end. It origins from the fact that you can't reinstall an already installed language from the language installer. Allow that (instead of hiding, show the language as installed and show a "reinstall" button) and you no longer need to block uninstalling language subpacks.
I can do that PR.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

In the mean while my test show here that the culprit comes from

public $allowChildUninstall = true;

if I take off this, then I can prevent an extension from being uninstalled.

Member

infograf768 commented Dec 11, 2016

In the mean while my test show here that the culprit comes from

public $allowChildUninstall = true;

if I take off this, then I can prevent an extension from being uninstalled.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

As for the language packs (where this request likely comes from), we're trying to solve the issue from the wrong end. It origins from the fact that you can't reinstall an already installed language from the language installer. Allow that (instead of hiding, show the language as installed and show a "reinstall" button) and you no longer need to block uninstalling language subpacks.

Agree. I still think that one should not be able to uninstall a language pack site or admin lang without the possibility to reinstall.
I am also concerned about multilingual sites where one would, by mistake, uninstall the site lang and thus breaking the site without knowing it, except by the multilangstatus module.

Member

infograf768 commented Dec 11, 2016

As for the language packs (where this request likely comes from), we're trying to solve the issue from the wrong end. It origins from the fact that you can't reinstall an already installed language from the language installer. Allow that (instead of hiding, show the language as installed and show a "reinstall" button) and you no longer need to block uninstalling language subpacks.

Agree. I still think that one should not be able to uninstall a language pack site or admin lang without the possibility to reinstall.
I am also concerned about multilingual sites where one would, by mistake, uninstall the site lang and thus breaking the site without knowing it, except by the multilangstatus module.

@andrepereiradasilva

This comment has been minimized.

Show comment
Hide comment
@andrepereiradasilva

andrepereiradasilva Dec 11, 2016

Contributor

@Bakual we could use the locked as proposed in #13037 for that.

But this pr is about child parent relation so imo a diferent thing.

Contributor

andrepereiradasilva commented Dec 11, 2016

@Bakual we could use the locked as proposed in #13037 for that.

But this pr is about child parent relation so imo a diferent thing.

@Bakual

This comment has been minimized.

Show comment
Hide comment
@Bakual

Bakual Dec 11, 2016

Contributor

Agree. I still think that one should not be able to uninstall a language pack site or admin lang without the possibility to reinstall.

Exactly that. As long as you can not reinstall the language from the language manager, we have to prevent uninstalling it partially. I haven't looked at it yet but I think it should be simple to add a reinstall button in that list. Just need time to do it 😄

I am also concerned about multilingual sites where one would, by mistake, uninstall the site lang and thus breaking the site without knowing it, except by the multilangstatus module.

They can also break their site by uninstalling the whole language pack and by doing a lot of other stupid stuff. You can't prevent them from doing stupid things. As long as we don't prevent them from fixing it again, I have no issues with that.

we could use the locked as proposed in #13037 for that.

Nah, locked is a different thing. It applies to specific core extensions which should not be able to be uninstalled. This here would be for 3rd party stuff. You would have to make that locked state a conditional ("only allow uninstalling if all other extensions of this package are uninstalled as well").

Contributor

Bakual commented Dec 11, 2016

Agree. I still think that one should not be able to uninstall a language pack site or admin lang without the possibility to reinstall.

Exactly that. As long as you can not reinstall the language from the language manager, we have to prevent uninstalling it partially. I haven't looked at it yet but I think it should be simple to add a reinstall button in that list. Just need time to do it 😄

I am also concerned about multilingual sites where one would, by mistake, uninstall the site lang and thus breaking the site without knowing it, except by the multilangstatus module.

They can also break their site by uninstalling the whole language pack and by doing a lot of other stupid stuff. You can't prevent them from doing stupid things. As long as we don't prevent them from fixing it again, I have no issues with that.

we could use the locked as proposed in #13037 for that.

Nah, locked is a different thing. It applies to specific core extensions which should not be able to be uninstalled. This here would be for 3rd party stuff. You would have to make that locked state a conditional ("only allow uninstalling if all other extensions of this package are uninstalled as well").

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Dec 11, 2016

Member

I'm not making a language package specific fix, I'm trying to create something generally usable for package extensions in general. If you want a language specific fix then feel free to implement it.

But more importantely I don't think it makes sense to have that tag in the package. I think it's a very rare case that you don't want to allow any subpackage to be uninstalled. More often you just want to prevent eg the library or the component to be uninstalled. But the modules and plugins for example are fine to be uninstalled in most cases.

It is up to the distributor to decide that behavior. The current behavior we have a need for is to disallow all children of a package to be uninstalled. If you feel you have a more suitable alternative please propose it.

Member

mbabker commented Dec 11, 2016

I'm not making a language package specific fix, I'm trying to create something generally usable for package extensions in general. If you want a language specific fix then feel free to implement it.

But more importantely I don't think it makes sense to have that tag in the package. I think it's a very rare case that you don't want to allow any subpackage to be uninstalled. More often you just want to prevent eg the library or the component to be uninstalled. But the modules and plugins for example are fine to be uninstalled in most cases.

It is up to the distributor to decide that behavior. The current behavior we have a need for is to disallow all children of a package to be uninstalled. If you feel you have a more suitable alternative please propose it.

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Dec 11, 2016

Member

Fixed the bugged behavior with the manifest object's instantiation keeping things from working right and changed the tag name to blockChildUninstall. Added it to the English package manifest.

Member

mbabker commented Dec 11, 2016

Fixed the bugged behavior with the manifest object's instantiation keeping things from working right and changed the tag name to blockChildUninstall. Added it to the English package manifest.

@Bakual

This comment has been minimized.

Show comment
Hide comment
@Bakual

Bakual Dec 11, 2016

Contributor

I'm not making a language package specific fix, I'm trying to create something generally usable for package extensions in general.

If you have a usecase beside the language pack, then I'm fine with it.

changed the tag name to blockChildUninstall.

Thanks 👍

Contributor

Bakual commented Dec 11, 2016

I'm not making a language package specific fix, I'm trying to create something generally usable for package extensions in general.

If you have a usecase beside the language pack, then I'm fine with it.

changed the tag name to blockChildUninstall.

Thanks 👍

mbabker added some commits Dec 11, 2016

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Dec 11, 2016

Member

Personally, I don't. However, we have a very explicitly hardcoded behavior in core right now which doesn't allow individual language packages to be uninstalled; you have to uninstall the package. So if you do something like a discover install (which is what the initial issue report was anyway), you won't have a package extension installed so you can't uninstall the discovered languages.

So, the hardcoded "special" handling for language extensions is removed from the extension manager's MVC layer and integrated into the install adapters as a configurable behavior, creating a side effect of allowing developers to also do the same with their package extensions if they so choose.

Member

mbabker commented Dec 11, 2016

Personally, I don't. However, we have a very explicitly hardcoded behavior in core right now which doesn't allow individual language packages to be uninstalled; you have to uninstall the package. So if you do something like a discover install (which is what the initial issue report was anyway), you won't have a package extension installed so you can't uninstall the discovered languages.

So, the hardcoded "special" handling for language extensions is removed from the extension manager's MVC layer and integrated into the install adapters as a configurable behavior, creating a side effect of allowing developers to also do the same with their package extensions if they so choose.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

It works OK now for that PR. We still need the reinstall possibility as @Bakual rightfully wrote as otherwise this is no use for languages, causing more issues than fixes.

Remains also to decide what will be our policy for lang packs:
Do we let the TTs individually choose or not to implement the new feature preventing from uninstalling uniquely site or admin lang?
I know I would prefer my French pack to have <blockChildUninstall>true</blockChildUninstall> if this is merged.

Question, unrelated to this PR:
It gives here :

The Frenchfr-FR extension is part of a package which does not allow individual extensions to be uninstalled.
The parenthesis have disappeared for my French site and admin extension name which are French (fr-FR), while they show well for en-GB.
screen shot 2016-12-11 at 18 28 35
Any idea about that?

Member

infograf768 commented Dec 11, 2016

It works OK now for that PR. We still need the reinstall possibility as @Bakual rightfully wrote as otherwise this is no use for languages, causing more issues than fixes.

Remains also to decide what will be our policy for lang packs:
Do we let the TTs individually choose or not to implement the new feature preventing from uninstalling uniquely site or admin lang?
I know I would prefer my French pack to have <blockChildUninstall>true</blockChildUninstall> if this is merged.

Question, unrelated to this PR:
It gives here :

The Frenchfr-FR extension is part of a package which does not allow individual extensions to be uninstalled.
The parenthesis have disappeared for my French site and admin extension name which are French (fr-FR), while they show well for en-GB.
screen shot 2016-12-11 at 18 28 35
Any idea about that?

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Dec 11, 2016

Member

Never claimed this was a "complete" thing for languages, and actually that's a feature above and beyond what I've been working on.

As is, we are in a better shape overall for languages and have given some new features to extension developers. Rightfully the hardcoded handling of languages in the uninstall process has been removed and that logic incorporated into the install routine itself. Fixing the bug originally reported about language extensions not being able to be uninstalled unless you remove the package (which if your install process didn't include it for whatever reason meant it couldn't be removed without FTP and database access).

Please don't let that lack of reinstall be a block to this. IMO it's unrelated and the situation neither improves or worsens with this PR.

Member

mbabker commented Dec 11, 2016

Never claimed this was a "complete" thing for languages, and actually that's a feature above and beyond what I've been working on.

As is, we are in a better shape overall for languages and have given some new features to extension developers. Rightfully the hardcoded handling of languages in the uninstall process has been removed and that logic incorporated into the install routine itself. Fixing the bug originally reported about language extensions not being able to be uninstalled unless you remove the package (which if your install process didn't include it for whatever reason meant it couldn't be removed without FTP and database access).

Please don't let that lack of reinstall be a block to this. IMO it's unrelated and the situation neither improves or worsens with this PR.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 11, 2016

Member

@mbabker
i think this patch is real fine and would not block it at all ( I have anyway no power to block anything 😸 )

indeed allowing or not languages to prevent uninstalling site or admin parts is independant from this.

Member

infograf768 commented Dec 11, 2016

@mbabker
i think this patch is real fine and would not block it at all ( I have anyway no power to block anything 😸 )

indeed allowing or not languages to prevent uninstalling site or admin parts is independant from this.

@Bakual

This comment has been minimized.

Show comment
Hide comment
@Bakual

Bakual Dec 11, 2016

Contributor

@infograf768 If you can reinstall the language, then you don't need this PR at all (for languages) anymore. It would be absolutely fine to allow users to uninstall languages partially.

Please don't let that lack of reinstall be a block to this. IMO it's unrelated and the situation neither improves or worsens with this PR.

It's indeed unrelated.

Contributor

Bakual commented Dec 11, 2016

@infograf768 If you can reinstall the language, then you don't need this PR at all (for languages) anymore. It would be absolutely fine to allow users to uninstall languages partially.

Please don't let that lack of reinstall be a block to this. IMO it's unrelated and the situation neither improves or worsens with this PR.

It's indeed unrelated.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 12, 2016

Member

I see no reason for any user to uninstall partially a language which has been installed by a registered pack. If someone wants to play with discover and expect the same behavior (almost) as in 1.5, then it is fine grace to this PR. For usual core packs I recommend anyway to use the new tag <blockChildUninstall>true</blockChildUninstall>

Member

infograf768 commented Dec 12, 2016

I see no reason for any user to uninstall partially a language which has been installed by a registered pack. If someone wants to play with discover and expect the same behavior (almost) as in 1.5, then it is fine grace to this PR. For usual core packs I recommend anyway to use the new tag <blockChildUninstall>true</blockChildUninstall>

@mahagr

This comment has been minimized.

Show comment
Hide comment
@mahagr

mahagr Dec 12, 2016

Contributor

👍

Though... Wouldn't it make sense to add xml attribute which would allow to override the global setting:

<file type="plugin" group="system" id="gantry5" enabled="1" uninstall="0">plg_system_gantry5.zip</file>

I'm not sure if there's a way to enable a plugin by default either -- right now it looks like I'm doing it manually during postflight.

Contributor

mahagr commented Dec 12, 2016

👍

Though... Wouldn't it make sense to add xml attribute which would allow to override the global setting:

<file type="plugin" group="system" id="gantry5" enabled="1" uninstall="0">plg_system_gantry5.zip</file>

I'm not sure if there's a way to enable a plugin by default either -- right now it looks like I'm doing it manually during postflight.

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Dec 12, 2016

Member

Feel free to send a PR after this one to add attributes for a per-extension basis. I'm cutting back contributions after my current backlog has cleared.

Member

mbabker commented Dec 12, 2016

Feel free to send a PR after this one to add attributes for a per-extension basis. I'm cutting back contributions after my current backlog has cleared.

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 12, 2016

Member

I have tested this item successfully on 9ac5354


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13154.

Member

infograf768 commented Dec 12, 2016

I have tested this item successfully on 9ac5354


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13154.

@mahagr

This comment has been minimized.

Show comment
Hide comment
@mahagr

mahagr Dec 12, 2016

Contributor

@mbabker Ack. I'll add it to my todo list.

Contributor

mahagr commented Dec 12, 2016

@mbabker Ack. I'll add it to my todo list.

@andrepereiradasilva

This comment has been minimized.

Show comment
Hide comment
@andrepereiradasilva

andrepereiradasilva Dec 13, 2016

Contributor

I have tested this item successfully on 9ac5354


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13154.

Contributor

andrepereiradasilva commented Dec 13, 2016

I have tested this item successfully on 9ac5354


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13154.

@jeckodevelopment

This comment has been minimized.

Show comment
Hide comment
Member

jeckodevelopment commented Dec 13, 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13154.

@joomla-cms-bot joomla-cms-bot added the RTC label Dec 13, 2016

@jeckodevelopment jeckodevelopment added this to the Joomla 3.7.0 milestone Dec 13, 2016

@rdeutz rdeutz merged commit 3734f75 into joomla:staging Dec 13, 2016

3 checks passed

JTracker/HumanTestResults Human Test Results: 2 Successful 0 Failed.
Details
continuous-integration/drone the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joomla-cms-bot joomla-cms-bot removed the RTC label Dec 13, 2016

cpfeifer added a commit to cpfeifer/joomla-cms that referenced this pull request Dec 22, 2016

Updating Fork (#1)
* Updated restore.php for updates

* Fix the generation of salt for crypt-blowfish

The salt for crypt-blowfish should be correctly formed as per the [php manual `crypt()` instructions](http://php.net/manual/en/function.crypt.php)

The expected size is at least 30 characters

* Pass hash crypt-blowfish without salt is length 60

* Increase Cost Factor for crypt-blowfish

Note that `getCryptedPassword()` and `getSalt()` are the old encryption methods

* Check to ensure user is not disabled before sending the email

* dont convert to integer - thanks @andrepereiradasilva

* Allow empty search - uses wrong value

* Updated installation language files

* 2fa handeling for mcrypt and openssl (#12497)

* handeling for mcrypt and openssl

* Language changes suggested bei Brian

* Prepare 3.6.4 Stable Release

* incorrect to check for an article

* space fixes

* SQL - FIELD_IN_SET() translation

[com_fields] - mysql dialect used FIND_IN_SET() #12636

* sql portability FIND_IN_SET()

sql portability FIND_IN_SET()

* portable SQL find_in_set()

portable SQL find_in_set()

* rename function to match CS rule

rename function to match CS rule
from  find_in_set() to findInSet()

* rename function to match CS rule 

rename function to match CS rule

* rename function to match CS rule

rename function to match CS rule

* prevent fatal error 

prevent fatal error on untranslated drivers

* delete old files from Joomla 3.2.3 version

delete old files in the update procedure

* remove option from config

* remove option from menu item

* mysql

* postrges

* sqlazure

* unit test

* Error in sr-YU installation ini file (#12984)

* Set correct default values for user creation in the backend (#12589)

* Update joomla.sql

* Update joomla.sql

* Update joomla.sql

* Updater follows Location headers for valid archive filename (#12817)

* made download() follow Location headers to resolve the valid filename of the update archive

* integrated suggestion of ggppdk, valid behavior if no query string

* strict type checking

* make Travis happy again... code style error

* Prepare 3.6.5 Stable Release

* Prepare 3.6.5 Stable Release

* Verify a pre-J3.2.1 crypt-blowfish without salt Password

* Improve the verification of a pre-J3.2.1 `getCryptedPassword()` Password

verify a pre-J3.2.1 Password that was hashed to crypt-blowfish without user specified salt

* verify a pre-phpass password hash

replicates the password hash creation used before 3.2.1 and #2683 implemented phpass

* Add one test with existing hash from old method

Good idea to include one existing hash rather than always generating a new hash for the test.

* Isis font-weight 200 override

* Update strings to be consistent with their use elsewhere in Joomla

* Make desc into a label

* Implement Countable interface in JFeed

* [com_content] - admin fix SQL error when apply empty filter

#13114

* models articles 

models articles fix

* model featured

model featured

* cs

cs

* ops

ops

* Check that extension that owns a category is enabled

* More calendar language files.

* changing en-US color to default en-GB colour

Easy fix on review
changing en-US `color` to default en-GB `colour`

* Fixing installation SQL for PostgreSQL

* Unit test fixes

* Fix placeholder showing "Select a User" when in readonly mode (e.g. modified_by) (#12627)

* Fix placeholder showing "Select a User" when in readonly mode (e.g. modified_by)

Additional changes:
- Remove obsolete extracted variables that are not present for this field type
- Correct variable name in doc block to match extracted name
- Refactor code to remove ternary overuse

* Changed getExcluded method return value to match doc block

Additional changes:
- Satisfy Code Sniffer (e.g. @SInCE)
- Remove else block after variable initialisation

* Change htmlspecialchars($VARNAME, ENT_COMPAT, 'UTF-8') to $this->escape($VARNAME)

Additional changes:
- Change JHtml::script() call to JHtml::_('script' ...) to allow overrides via custom register method

*  Fix placeholder showing "Select a User" when in readonly mode (e.g. modified_by)

Additional changes:
- Change htmlspecialchars($VARNAME, ENT_COMPAT, 'UTF-8') to $this->escape($VARNAME)
- Refactor code to remove the ternary overuse
- Change JHtml::script call to JHtml::_('script' ...) to allow overrides via custom register method
- Correct variable name ($exclude) in doc block to match extracted name
- Remove obsolete extracted variables that are not present for this field type
- Removed the class suffix from the hidden field
- Remove (Fix) obsolete whitespace in class attribute for the visible field when no suffix was entered

* Move hidden field outside the condition for now

* Re-Added interface

Missed that in the manual merge process. While I was working on the PR, the custom fields code got merged. Thanks @wilsonge.

* Add custom class back to hidden field for potential b/c breaks

* Support for sqlsrv

* Mering calendar locales

* resolve conflict

* resolve conflict (reverted from commit 31e131f)

* resolve conflict

* [com_fields] No need for an alias in fields groups. (#13115)

* No need for an alias in fields groups.

* Remove alias from SQL structure.

* [com_menu] - delete reference on #_modules_menu deleting a menu item (#13126)

* Add a static flag to check if the event is registered (Fix #13124) (#13147)

* Coding style - com_newsfeeds (#13139)

* Leave one white-space before the PHP code closing tag.

* Fixed wrong place for space

* [plg_user] - delete messages from deleted user (#13052)

see #12883

* three more calendar languages

* Ensure we have a instance of JApplicationCms (#8166)

* Ensure we have a instance of JApplicationCms

This allows the creation of users via CLI scripts that currently error because the application object is an instance of JApplicationCli

* Change to method exists check

* [3.7.x] Input field invalid highlight (#12443)

* Session field invalid interger

* Input field invalid highlight

* Revert to original invalid highlighting

* [com_content] - deleted featured articles are not deleted from  #__content_frontpage table (#12505)

* [com_content] - deleted featured articles are not deleted from #__content_frontpage table

deleted featured articles are not deleted from #__content_frontpage table

* tabs

tabs

* tabs again

tabs again

* fully delete featured

delete featured from #__content_frontpage

* delete featured

delete featured

* moved to controller/models

moved to controller/models

* deploy version

deploy version

* 1 more space

1 more space

* travis CS

travis CS

* removed postDeleteHook() to solve conflicts

removed postDeleteHook() to solve conflicts and to make it better

* remove old pr way

remove old pr way

* implementation with a method override as suggested

implementation with a method override as suggested

* [NF] UX/UI Module menu assignment item type (#12752)

* Module menu assignment item type

UX UI improvment in module menu assignment to see menu item of type
separator, heading, alias

* add url type

* disabled attribute

* [categories] - respect  user level access for categories (#12931)

* [categories] - respcet  user level access

respcet category user level access

* [categories] - respect user access level

[categories] - respect user access level

* categories - respect user access level

respect user access level

* [categories] - respect categories access level when create a new article

respect categories access level when create a new article

* respect categories access level

search filter in article manager

* [com_installer] review config global default options (#12964)

* defaults

* sincronize with staging

* fix conflicts

* Regression: Bring back translateformat feature to JFormFieldCalendar (#12969)

* Regression: Bring back translateformat feature to JFormFieldCalendar

* Restore the missing part

* Two strings were missing in frontend.

* [com_menus] review config global default options (#12971)

* config.xml

* Update joomla.sql

* Update joomla.sql

* Update joomla.sql

* sincronize with staging

* fix conflicts

* Move the checkboxes to the leftmost column in detail view (#12997)

* [com_menus] - wrong group by when multilanguages enabled - postgresql (#12999)

Pull Request for fix regression from #12051 .

Summary of Changes

fixed wrong group by when multilanguages enabled

Testing Instructions

latest staging fresh multilanguage install

Go to Menu -> All menu items

* Displaying the correct tip in Global Configuration Permissions (#13143)

* Displaying the correct tip in Global Configuration Permissions

* simplification

* Disable Chosen.js for the rule field, again (#12877)

* Revert the check for instance type of data-chosen, to allow to disable Chosen for field with data-chosen="true"

* Add some explanation

* Replace deprecated isSite() and isAdmin() calls

* Fixed accidental replacements in tests

* Rev reverted replacements in external projects' files

* Corrected an oversight

* Resolve?

* Try to fix pagination-test failure

* Try to fix pagination-test failure, take2

* Try to fix pagination-test failure,  final (hopefully)

* Some more replacements

* Multilanguage: correcting saving menu item with same alias when language is changed to ALL (#13112)

* Multilanguage: correcting saving menu item with same alias when language
is changed to ALL

* not syncing anymore

* new string is no more necessary

* thanks @andre

* Coding style - PHP code tag and control structures (#13141)

* Leave one white-space after the PHP code opening tag.

* Leave one white-space before the PHP code closing tag.

* Fixed style for control structures alternative syntax.

* Removed unnecessary space before PHP closing tag

* Removed unnecessary space before php closing tag

* Added missing space before PHP code closing tag

* Multilingual: correcting alternates when associated menu items are com_users items (#13152)

* Multilingual: correcting alternates when associated menu items are
com_users items

* simplification

* Update languagefilter.php

oops

* [Unit Test improvements] Use getMockBuilder rather than getMock directly  (#12990)

* Use getMockBuilder rather than getMock directly

Avoid situations that would cause `PHP Fatal error:  Call to protected method PHPUnit_Framework_TestCase::getMock()` on newer versions of phpunit

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use the correct $this object

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Set up a more mock JTableExtension with getMockBuilder

* Use getMockBuilder rather than getMock directly

* Use the correct $this object

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* remove the method after replacing

* Use getMockBuilder rather than getMock directly

* More getMockBuilder in place of getMock

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Fix testParse mock Constructor Args

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* disableOriginalConstructor

* disableOriginalConstructor()

* disableOriginalConstructor()

* disableOriginalConstructor()

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* another spot for getMockBuilder

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* remove duplicate $this->transport

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Use getMockBuilder rather than getMock directly

* Add 'setUserState' to MockApplicationCms

Fixes 2 warnings on phpUnit 5.6:
1) JModelListTest::testGetuserstateUsesDefault
Trying to configure method "setUserState" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) JModelListTest::testGetuserstateUsesRequestData
Trying to configure method "setUserState" which cannot be configured because it does not exist, has not been specified, is final, or is static

* mockDatabase fails for mockTableExtension on hhvm

Fixes 10 hhvm failures that have one of the following messages
```php
UnexpectedValueException: No columns found for #__extensions table

Expectation failed for method name is equal to <string:parseSchemaUpdates> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.
```

* cs-fix extra semicolon

* remove trailing coma

* remove trailing comma

* Coding style - PHP code tag and control structures II (#13149)

* Removed unnecessary spaces after PHP code opening tag

* Removed unnecessary spaces before PHP code closing tag

* Added a white-space before PHP code closing tag where missing

* Fixed style for control structures alternative syntax

* Remove never needed nor used JED Update Server from new installs (#13047)

* Update joomla.sql

* Update joomla.sql

* Update joomla.sql

* Update joomla.sql

* Update joomla.xml

* Update jos_update_sites.csv

* Update jos_update_sites_extensions.csv

* Update script.php

* Update script.php

* Update joomla.sql

* Update script.php

* [PHP 7.1] Adapt JDate to reflect that php now sets DateTime() with microseconds (#13079)

* Update date.php

* Update date.php

* Update date.php

* Replacements for deprecated JFile::read() (#13160)

* Replacements for deprecated JFile::read()

* Removed replacements for FOF

* Type-safe comparison for isClient (#13157)

* Set correct default values for user creation in the backend also in the sample_learn.sql sample data (#13127)

The default value for the useractivation param is 2
https://github.com/joomla/joomla-cms/blob/3.6.4/administrator/components/com_users/config.xml#L45-L68

* Set correct default values for user creation in the backend also in the sample_learn.sql sample data (#13127)

The default value for the useractivation param is 2
https://github.com/joomla/joomla-cms/blob/3.6.4/administrator/components/com_users/config.xml#L45-L68

* Removed some unnecessary strtotime() calls (#13171)

* Fix unittest on cache - 5 seconds less (#11872)

* Run test at JCacheTest->testGc with not empty storage and caching enabled.

* Test if cache file after run gc does not exists.

* Fixed misuses of array_push() project wide (#12170)

* Replaced rand() with mt_rand() projectwide

* Fixed misuses of array_push()

* Fixed PHPMailer problems

* Reverted some changes, as they are in included external frameworks

* Removed changes which were irrelevant to this PR.

* Changed some recently added array_push calls

* Fixed accidental deletion of curly bracket

* revert e91177d

* Smart search parser leaking CSS and JS terms (#12411)

* Strip head first because of possible nested tags

* Remove chunking from indexer

* Responsive site title for protostar (#13064)

* Responsive site title for protostar

* Updated less file too

* Fixed less compling, added maximum of 40px for font-size

* Better scaling factor, removed calc on line-height it is not really needed and causes a little jumping

* Improve menu associations (#13086)

* Unittest fix - do not use PDO driver directly (#13097)

* Use database driver in the right way in unittests

* Fix unittests

* Allow packages to declare that their child extensions cannot be uninstalled (#13154)

* Allow packages to declare that their child extensions cannot be uninstalled

* Change tag name, fix bugged instanatiation of manifest class, add tag to English package manifest

* Remove language check

* Flag in JInstaller that a package is being uninstalled to allow its children to be removed

* Speed up hhvm unit tests - disable jit (#13169)

* Wrong color on active menu item in mobile view - Protostar (#12303)

* Update template.less

Fix css issue with menu active item in mobile screens

* Update template.css

CSS Fix for active menu item in mobile screens

* [com_fields] Include group state only when not on back end list (#12696)

* Include group state only when not on back end list

* Add comment

* Update default_permissions.php

* Remove senseless proxy functions

* Updating calendar locales

* Replacements for deprecated getCfg() (#13161)

* Replacements for deprecated getCfg()

* Replacements for deprecated AbstractRegistryFormat Class implementations

* Don't load authorised view levels in foreach for tags generation (#13140)

* Don't load authorised groups in foreach for tags generation

* Add $

* Use user method

* Change variable name

* Replacements for deprecated JApplication::getHash() (#13162)

* Replacements for deprecated JApplication::getHash()

* Replacements for deprecated JApplication::getHash()

* Replacements for deprecated JApplication::getHash()

* Coding style - PHP code tag and control structures III (#13173)

* Removed unnecessary spaces after PHP code opening tag

* Added a white-space before PHP code closing tag where missing

* Removed unnecessary spaces before PHP code closing tag

* Fixed style for control structures alternative syntax

* Fixed style for control structures alternative syntax

* Added a semicolon at the end of statement where missing

* Coding style - PHP code tag and control structures IV (#13176)

* Removed unnecessary spaces after PHP code opening tag

* Removed unnecessary spaces before PHP code closing tag

* Added a white-space before PHP code closing tag where missing

* Removed unnecessary spaces before PHP code closing tag

* Added a white-space before PHP code closing tag where missing

* Added a white-space before PHP code closing tag where missing

* Added a semicolon at the end of statement where missing

* Fixed style for control structures alternative syntax

* Copy and new should use the group_id (#13179)

* Unnecessary double quotes in site components (#13183)

* Replace unnecessary double quotes in site/components

* small correction

* Included a fix for an existing bug that @andrepereiradasilva pointed out

* Merged unset calls (#13186)

* Remove one-time-use variables (#13187)

* Remove unnecessary parentheses in site components (#13190)

* Remove unnecessary parentheses in site/components

* Insert space, wrongfully removed

* Re-added a pair, for readability as @andrepereiradasilva suggested not to have it ungrouped for readability

* Removed some whitespace, as noted in @shur's comment

* Use short syntax for applied operations (#13188)

* New Feature: add redirect option after article submission

* Remove DPFields leftover (#13229)

* [com_fields] Migrate from repeatable to subform field for list options (#13069)

* Migrate from repeatable to subform field for list options

* Adapt checkboxes and radio

* Merge regression

* Simplify ternary with elvis in site component (#13185)

* Simplify ternary with elvis operator

* Fixed indentation

* Forgot to remove these parentheses in merge from staging

* Removed silly assignments (#13196)

* Replace unnecessary double quotes (#13239)

* Replace unnecessary double quotes in libraries/cms (#13235)

* Replace unnecessary double quotes

* Reverted some double quotes-replacements

* Various changes in modules (#13216)

* Simplify ternary operation with elvis operator

* Remove unnecessary parentheses

* Remove redundant variables

* Code formatting

* Add cursor:pointer; for making dismiss alert work on ios devices (#11965)

* Simplify ternary operation using elvis operator

* Remove unneeded parentheses

* Media Manager Restyle (#12643)

* Media manager restyle - Initial commit

* Media Manager restyle

* Delete option added on image hover

* Center thumbnail X icon

* Media restyle added to xtd-button

* JS moved popup-imagemanager.js

* JS added to popup-imagemanager.min.js

* CS

* Revert iframe height increase

* Modal margin

* RTL support

* RTL - correcting image popup display

* cs fix travis built (#13255)

* Deleting unused lang strings (com_fields) (#13259)

* Deleting unused language string

* another

* Cleanups, fixes and a bit of optimizations for site/components batch #3 (#12292)

* Cleanups, fixes and a bit of optimizations for site/components batch #3

- com_content

Note: This is a single commit bundling all types of changes, since PR #12261 which had detailed commits, was rejected as a whole

* Ch-Ch-Ch-Changes!

Made some changes as pointed out by @andrepereiradasilva

* A bit more...

* Revert

* Removed empty function, as there is a fallback. Change made according to comment from @wilsonge

* Included @andrepereiradasilva's suggestions

* Inserting whitespace before php closing tag

* Replace unnecessary double quotes in templates (#13245)

* Replace unnecessary double quotes

* Revert overzealous replacements

* Formatting fix

* Replace unnecessary double quotes (#13215)

* Cleanups, fixes and a bit of optimizations for site/components batch #1 (#12290)

* Cleanups, fixes and a bit of optimizations for site/components batch #1

- com_ajax
- com_banners
- com_config
Note: This is a single commit bundling all types of changes, since PR #12261 which had detailed commits, was rejected as a whole

* Ch-Ch-Changes!

* Removed the query changes

* Fix for wrong merge resolve

* Replaced unnecessary double quotes in plugins (#13211)

* Replaced unnecessary double quotes in plugins

* spaces

* Revert change to 3rd party file.

* Removed unnecessary parentheses in plugins (#13212)

* Various changes in plugins (#13213)

* Remove one-time use variable

* Merge unset calls

* Remove obvious variants from ternary operation

* Use short syntax for applied operation

* Performance 5 (modules) (#12229)

* Use Elvis instead of full ternary

* Included nested positive if in parent

* Double quotes to single quotes

* Removed unnecessary parentheses

* Inline one-time use variables

* Type-safe string comparisons

* More type safe comparisons

* Replace is_null() with === null

* Replace strstr with strpos

* Replace substr with strpos

* Optimize non-optimal if conditions.

* Merged cascading str_replace calls

* Another type safe-comparison

* Fix multiple calls to callable in if condition

* Flip some conditions back after removing the condition call

* Fix codesniffer

* Fix codesniffer...

* This one is probably better left loose typed

* ... and this one, too.

* Use Elvis instead of full ternary

* Included nested positive if in parent

* Double quotes to single quotes

* Removed unnecessary parentheses

* Inline one-time use variables

* Type-safe string comparisons

* More type safe comparisons

* Replace is_null() with === null

* Replace strstr with strpos

* Replace substr with strpos

* Optimize non-optimal if conditions.

* Merged cascading str_replace calls

* Another type safe-comparison

* Fix multiple calls to callable in if condition

* Flip some conditions back after removing the condition call

* Fix codesniffer

* Fix codesniffer...

* This one is probably better left loose typed

* ... and this one, too.

* A few more changes based on discussion with @andrepereiradasilva

* Drop index idx_image in #__languages table (#13252)

* Update joomla.sql

* Update joomla.sql

* Update joomla.sql

* Update 3.7.0-2016-11-21.sql

* Update 3.7.0-2016-11-21.sql

* Update 3.7.0-2016-11-21.sql

* HTML5 pattern in validate.js (#13094)

* html5 pattern

* implement @ralain 's suggestion

Thank you @ralain

* Fixes for errors introduced with conflict resolution

* Fixes for errors introduced with conflict resolution

* Update head.php (#13081)

* [com_fields] Change extension variable to context for custom field groups (#13175)

* Change extension variable to context for custom field groups

* Stabilizing javascript

* Fixing code style error

* Check for admin permission of com_fields access correct

* Don't process value adjusting twice (#13233)

* Modals style cleanup (#13261)

* Variable names - naming conventions - testing the waters (#13170)

* Various changes in libraries legacy (#13241)

* Inline one-time use variables

* Removed unnecessary ternary operators

* Merge unset() calls

* Use modern day type-casting

* This can be replaced with type-casting

* Changes on continue statements (#13199)

* Remove unnecessary 'continue' function

* Change 'continue' so that it breaks out of the 'switch', as there is no need to compare against the rest.

* Fixed mistake

* Added a break in `separator` case, as there is nothing to execute under `heading`,  in that case.

* Revert changes in 3rd party file

* Fix vertical scroll (#13269)

* Type safe string comparison of strings in plugins

* Remove false param on fetching form data (#13254)

* Remove unneeded registry creation (#12571)

* Contact params already are Registry objects.

* Newsfeed params already are Registry objects.

* Menu params already are Registry objects.

* Fixing wrong merging

* Lazy session starting (#13074)

* Allow lazy starting a session

* Defer starting sessions in the installer

* Defer starting session in JApplicationCms

* Unit test fixes

* [com_fields] Normalise data structure for assigned categories (#13246)

* Normalise #__fields -> assigned_cat_ids

* Fixing typo in table name

* Fixed issue #11932

Removed an unnecessary range restriction on a SQL query, which caused an
invalid query to be generated for Microsoft SQL Server.

* fix CS after 3.6.5 ..

* Fix accidentally flipped comparison

* Replace unnecessary double quotes

* some more double quote replacements

* This one, too...

* Add context selector to fields groups

* Composer install

* Type-safe string comparison in site/templates

* prepare alpha1 release

* [com_fields] Migrate user groups from categories to field groups (#13103)

* Migrate user groups from categories to field groups

* Renamed variable from category to group

* Show only fields which are in selected groups

* Change identifier from extension to context

* [com_fields] - Creating a New field give SQL error on postgresql (#13155)

* [com_fields] - Creating a New field give SQL error on postgresql

Postgres: Inserting an image field fails with an error #13137

* xml default

xml default

* added JNONE

added JNONE

* Template menu assign fix n styling (#13280)

* Improve doc blocks for JMenu (#13274)

* Moved JPluginHelper::importPlugin() call outside loops. (#13248)

* Logout code needs to account for shared_session parameter (#13273)

* Fix subform chosen (#12993)

* Initialize chosen when adding rows in repeatable subforms

* Use JHtml::script and JHtml::stylesheet in the new way

* Subform does not need to fix chosen.

* Codemirror fluid height (#13266)

* Codemirror fluid height

* Min-height changed to 400px

* Moved less to _editors.less - added max-height

* Delete assigned categories when field is deleted (#13315)

* Remove unused local variables project wide (#13206)

* Remove unused or immediately overwritten variables

* Remove unused or immediately overwritten variables in tests

* Commented out some reference code, as it is not used in that scope

* Not sure on this removal. Added a TODO.

* Fixed accidentally removed $

* Fix codesniffer

* Revert changes in this file, as it is an external library

* Update field.php

@mbabker mbabker deleted the mbabker:block-individual-package-uninstall branch Jan 29, 2017

@mbabker mbabker added the New Feature label Jan 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment