Skip to content
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

Adding the Multilanguage Associations Manager #13537

Merged
merged 41 commits into from
Jan 17, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0fbc25a
Merge Associations rewrite
rdeutz Jan 9, 2017
f341aad
updated searchtool with the new way
rdeutz Jan 9, 2017
79d95a5
udpated edit view title
rdeutz Jan 9, 2017
7cf3996
added contact associationshelper class
rdeutz Jan 10, 2017
c1ebda1
temp fix
rdeutz Jan 10, 2017
b662491
fix for category filter
rdeutz Jan 10, 2017
f7c85a5
added newsfeeds associations helper
rdeutz Jan 10, 2017
0495886
CAPS for params
rdeutz Jan 10, 2017
ebe4afc
lang tag and added a helper function
rdeutz Jan 10, 2017
00eb70b
added land tags
rdeutz Jan 10, 2017
a54d3f7
code style fix
rdeutz Jan 10, 2017
f7ebff9
better title in associations view
rdeutz Jan 10, 2017
87a3138
better title
rdeutz Jan 10, 2017
100fb42
use the usual naming
rdeutz Jan 10, 2017
7b0b75f
fix language tag, thanks to brian teeman and twitter :-)
rdeutz Jan 10, 2017
417f0fc
Merge branch 'com_associations_rewrite_merge' of https://github.com/r…
zero-24 Jan 10, 2017
f50ad78
initial review
zero-24 Jan 10, 2017
b2fda8a
on simple change
zero-24 Jan 10, 2017
67d6000
on simple change 2
zero-24 Jan 10, 2017
90f7639
simple
zero-24 Jan 10, 2017
f5ce260
some more helper changes
zero-24 Jan 10, 2017
31a0185
Update associations.php
zero-24 Jan 11, 2017
55dc10c
Update associations.php
zero-24 Jan 11, 2017
0826d30
Merge pull request #7 from zero-24/com_associations_rewrite_merge
rdeutz Jan 11, 2017
7e8422b
app isn’t set a model property
rdeutz Jan 11, 2017
1ca1c8e
correct return value
rdeutz Jan 11, 2017
dbba275
simplify code adn use helper method
rdeutz Jan 11, 2017
fc79b46
use typename directly
rdeutz Jan 11, 2017
d64c742
changed the tooltip position
rdeutz Jan 11, 2017
edccd27
Correct menu helper
infograf768 Jan 12, 2017
868edd4
remove unreacable code
rdeutz Jan 12, 2017
ca50fd1
correcting checked_out
infograf768 Jan 13, 2017
04df8c3
com_menus
infograf768 Jan 13, 2017
7ab1191
Merge pull request #8 from infograf768/patch-10
rdeutz Jan 13, 2017
e5fb8bd
Merge pull request #9 from infograf768/patch-11
rdeutz Jan 13, 2017
97c437f
Merge pull request #11 from infograf768/patch-13
rdeutz Jan 13, 2017
406d18d
fixed not supportted message
rdeutz Jan 15, 2017
e4f03ee
installation
rdeutz Jan 15, 2017
cc61448
fix menu install
rdeutz Jan 15, 2017
95fc4b6
Merge branch 'staging' into com_associations_rewrite_merge
rdeutz Jan 17, 2017
9fd1d9b
Spaces -> tabs
wilsonge Jan 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
initial review
  • Loading branch information
zero-24 committed Jan 10, 2017
commit f50ad7885aaf592e01902de6784d581e60e435eb
3 changes: 2 additions & 1 deletion administrator/components/com_associations/associations.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

defined('_JEXEC') or die;

JHtml::_('behavior.tabstate');

if (!JFactory::getUser()->authorise('core.manage', 'com_associations'))
Expand All @@ -24,7 +25,7 @@
{
list($extensionName, $typeName) = explode('.', $itemtype);

if (! AssociationsHelper::hasSupport($extensionName))
if (!AssociationsHelper::hasSupport($extensionName))
{
throw new Exception(JText::_('COM_ASSOCIATIONS_COMPONENT_NOT_SUPPORTED') . ' ' . $itemType->realcomponent, 404);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does $itemType->realcomponent exists? or is a leftover?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the lang string COM_ASSOCIATIONS_COMPONENT_NOT_SUPPORTED is not present in the ini file.

Copy link
Member

@infograf768 infograf768 Jan 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have something like:
throw new Exception(JText::sprintf('COM_ASSOCIATIONS_COMPONENT_NOT_SUPPORTED', JText::_($extensionName), 404);

and
COM_ASSOCIATIONS_COMPONENT_NOT_SUPPORTED="The extension %s does not support multilingual associations."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with 406d18d thanks!

}
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_associations/associations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<extension type="component" version="3.7" method="upgrade">
<name>com_associations</name>
<author>Joomla! Project</author>
<creationDate>September 2016</creationDate>
<creationDate>Januar 2017</creationDate>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

January

<copyright>(C) 2005 - 2016 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_associations/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
filter="rules"
validate="rules"
component="com_associations"
section="component" />
section="component"
/>
</fieldset>
</config>
4 changes: 3 additions & 1 deletion administrator/components/com_associations/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
class AssociationsController extends JControllerLegacy
{
/**
* @var string The default view.
* The default view.
*
* @var string
*
* @since __DEPLOY_VERSION__
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ class AssociationsControllerAssociation extends JControllerForm
*/
public function edit($key = null, $urlVar = null)
{
$input = JFactory::getApplication()->input;
list($extensionName, $typeName) = explode('.', $this->input->get('itemtype'));

list($extensionName, $typeName) = explode('.', $input->get('itemtype'));

$id = $input->get('id', 0);
$id = $this->input->get('id', 0);

// Check if reference item can be edited.
if (!AssociationsHelper::allowEdit($extensionName, $typeName, $id))
Expand All @@ -62,11 +60,7 @@ public function cancel($key = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

$input = JFactory::getApplication()->input;

list($extensionName, $typeName) = explode('.', $input->get('itemtype'));

$id = $input->get('id', 0);
list($extensionName, $typeName) = explode('.', $this->input->get('itemtype'));

// Only check in, if component item type allows to check out.
if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName))
Expand All @@ -79,7 +73,7 @@ public function cancel($key = null)
$ids = array_unique(explode(',', $targetId));
}

$ids[] = $id;
$ids[] = $this->input->get('id', 0);

foreach ($ids as $key => $id)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public function getModel($name = 'Associations', $prefix = 'AssociationsModel',
*/
public function purge()
{
$model = $this->getModel('associations');
$model->purge();
$this->getModel('associations')->purge();
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
}

Expand All @@ -66,8 +65,7 @@ public function purge()
*/
public function clean()
{
$model = $this->getModel('associations');
$model->clean();
$this->getModel('associations')->clean();
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
}
}
Loading