Skip to content

less $lang->load() part 0: JLanguage::load() accepts an array of paths#131

Closed
WebMechanic wants to merge 1 commit intojoomla:masterfrom
WebMechanic:lesslang0
Closed

less $lang->load() part 0: JLanguage::load() accepts an array of paths#131
WebMechanic wants to merge 1 commit intojoomla:masterfrom
WebMechanic:lesslang0

Conversation

@WebMechanic
Copy link
Copy Markdown
Contributor

...to search for language files.

allows a single line of
$lang->load('plg_'.$folder.'_'.$element, array(JPATH_ADMINISTRATOR,JPATH_PLUGINS.'/'.$folder.'/'.$element), true, false, false);
to perform the same as a bulks of
$lang->load('plg_'.$folder.'_'.$element, JPATH_ADMINISTRATOR, null, false, false) || $lang->load('plg_'.$folder.'_'.$element, JPATH_PLUGINS.'/'.$folder.'/'.$element, null, false, false) || $lang->load('plg_'.$folder.'_'.$element, JPATH_ADMINISTRATOR, $lang->getDefault(), false, false) || $lang->load('plg_'.$folder.'_'.$element, JPATH_PLUGINS.'/'.$folder.'/'.$element, $lang->getDefault(), false, false);

I'll add subsequent pull requests where this change is used.
Next part will handle "tpl_" files.

…s to seach.

allows a single line of
   $lang->load('plg_'.$folder.'_'.$element, array(JPATH_ADMINISTRATOR,JPATH_PLUGINS.'/'.$folder.'/'.$element), true, false, false);
to perform the same as a bulks of
   $lang->load('plg_'.$folder.'_'.$element, JPATH_ADMINISTRATOR, null, false, false)
|| $lang->load('plg_'.$folder.'_'.$element, JPATH_PLUGINS.'/'.$folder.'/'.$element, null, false, false)
|| $lang->load('plg_'.$folder.'_'.$element, JPATH_ADMINISTRATOR, $lang->getDefault(), false, false)
|| $lang->load('plg_'.$folder.'_'.$element, JPATH_PLUGINS.'/'.$folder.'/'.$element, $lang->getDefault(), false, false);
@nicksavov
Copy link
Copy Markdown
Contributor

Thanks for coding this, WebMechanic!

While we’re transitioning to a new integrated tracker, could you report the issue on our current main tracker at JoomlaCode and cross-reference each with a link to the other? Here’s the process for reporting on the other tracker:
http://docs.joomla.org/Filing_bugs_and_issues

Alternatively, let me know if you’d like me to create it for you and I can go ahead and do that.

Thanks in advance and thanks again for coding this, WebMechanic!

@nicksavov
Copy link
Copy Markdown
Contributor

I'm closing this one, since it looks like #132 has the same code.

Thanks WebMechanic!

@nicksavov nicksavov closed this May 5, 2013
wilsonge pushed a commit that referenced this pull request Jan 23, 2017
wilsonge pushed a commit to wilsonge/joomla-cms that referenced this pull request May 26, 2019
richard67 pushed a commit to richard67/joomla-cms that referenced this pull request Apr 3, 2020
Use tabs in the patchtester.xml
bembelimen added a commit that referenced this pull request Nov 24, 2021
* basics

* language and options

* clean temp

* code corrections from @Fedik

* Update tinymce.php

* Update tinymce.php

* Build step for building the source.html (#130)

* build step

* Update tinymce.es6.js

* Update setoptions.xml

* Revert the change for scripts/styles (#131)

* Revert the change for scripts/styles

Whenever we append a script tag using JS the script is loading ASYNC and most probably will break the order of execution

* Give the dog a bone

Co-authored-by: Dimitris Grammatikogiannis <dg@dgrammatiko.dev>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants