Optimise Queries#19
Conversation
Merging the two queries to get the key and count into one. I have merged the two queries to delete the entries into one as well. The only real difference between the two is the added WHERE clause for the id.
|
This works fine and reduces the # of lines. 👍
$error as a JText maybe, but anyway without a return false as this concerns only the _associations table. |
|
An error in the database query triggers the error page already, showing the error. I don't think we need to add that. It did that several times while I wrote the code - so I tested it 😄 |
|
OK, merged |
* Update gallery.xml * Update fields.php * Update internal.php * Update field.php * Update dprules.php * Update section.php * Update base.php * Update view.html.php * Update view.html.php * Update render.php * Update modal_article.php * Update sql.php * Update fields.php * Remove commented debug code * Update fields.php * #14 fixed Joomla Coding Standards and added function dock blocks code * #14 fixed Joomla Conding Standards and added function dock blocks * #14 Fixed class dock block mistake * we did not require this any more * #14 fixed Joomla Coding Standards and added function dock block in helper file at back-end * #14 Fixed only Joomla Coding Standards in FieldsHelper file * #14 removed where function, added dock blocks and fixed dock bocks coding standards errors * #14 formatted as the function doc blocks * #14 formatted as the function doc blocks * Check the active menu correct Closes joomla#72 * Move the label field to the options tab Closes #22 * Label has it's own field and must not stay in params Regression from #22 * Backport from Digital-Peak/DPFields#32 * Fix the save and copy action Closes #37 * Store data on reload Closes joomla#76 * Don't add always the All language to the query Closes #38 * Count the items in the category manager from com_fields Closes joomla#61 * Corrected colspan when fields are assigned to a language * #14 fixed conflict * Don't save the All category Closes #19 * Minor language updates * Fix "Show On" tooltip's description The tooltip's description for the 'Show On' field is not showing because it is currently looking for the label. * Don't hardcode com_content.article Closes joomla#80 * Load the types form when the data is an array * Create the links correct for the count item feature Closes joomla#82 * Show the value from com_fields instead of the the users helper Closes joomla#81 * Set the language correct on the fields cache Closes #47 * Removed string conversion error Closes #47 * Changed links to 3.7 * Remove legacy DPFields code * Get data from state correctly * Add joins to the com_fields in search plugin (joomla#83) Add joins to com_fields in the content search plugin * Add new core rule core.edit.value (joomla#75) * Add 'onFieldBeforePrepare' and 'onFieldAfterPrepare' events * Rename "Field Category" to "Field Group" Closes joomla#91 * Add option to disable custom fields per component Closes joomla#87 * Use select box to define the images directory Closes joomla#97 * Truncate correctly Closes joomla#101 * Change description field to plain textarea Closes joomla#94 CLoses joomla#99 * Parameters are more clear and improved comment Adapted change from joomla@32c9048 * onFieldBeforePrepare and onFieldAfterPrepare events now triggered even when custom field value is empty * Cast before access * Create params even when they are empty * Add com_fields menu entries on back end Closes joomla#109 * Extract the context correctly Closes joomla#112 * Add custom fields for contact * Add inline group create Closes joomla#114 * Add simple context mapping Closes joomla#117 * Dont assign a not existing category when a field is saved with no catid * Rename string with group and not category Closes joomla#124 * Category strings should be named Field Groups Closes joomla#126 * Show the fields on the blog listing Closes joomla#108 * Installer crashes somehow Closes joomla#132 * Merge the types set up into JFormField (joomla#104) * Merge field types into JFormFields * Converting the rest of the fields * Merge DP Field Rendering with Joomla Form Fields * Remove the gallery scripts * Rename the interface to JFormDomfieldinterface for auto loading * Add article field as demo how a component can add fields * Removing mustache, will be replaced later with a new parser See #12 for the discussion * Fixing composer setup, reverting to 3.6.x branch * Fixing code style errors Closes #14 * Rename upgrade file to 3.7 * Strip slashes from description Related to joomla#139 * Removing Simplepie from the database installer script Reverts 8381e46 See comments for more information * Show field group description in form Closes joomla#139 * List field changed key to value and value to name Closes joomla#121 * Use the first category as field filter when creating an article Closes joomla#144 * Dont show a user field on the front end Closes joomla#149 * Add always the fields path when adding the custom fields Closes joomla#150 * Added hint (placeholder) option Closes joomla#151 * Correct redirect after checkin action Closes joomla#154 * Check for group access levels when getting the fields (joomla#153) * Consider field group state Closes joomla#155 * Added missing language strings Closes joomla#129 * JArrayHelper => ArrayHelper * reduce model method (joomla#160) * Fixing permission inheritance to edit the value of a field in the form (joomla#157) * Correct path for parameters folder when not in Joomla libraries * Type selection (joomla#162) Closes joomla#134 * Display class attributes (joomla#143) * User home (joomla#161) * Add home parameter to media field * Correct path for paramneters folder when not in Joomla libraries * Fixing code style errors * Add new context for com_contact for contact form fields (joomla#115) * Add new context for com_contact for contact form fields * Prepare the value on com_contact mail * Fixing travis code style errors * Use the correct variable name Closes joomla#163 * Show the all label when no category is assigned Closes joomla#165 * Don't set 0 as default hint when not present Closes joomla#166 * Fix Sniffer Whitespace errors * Fix Sniffer Whitespace errors (joomla#167) * Cleanup field model * Support fields plugins * Add gallery plugin * Moved since tag to 3.7 * Some brushup * Update controller.php * Update field.php * Update fields.php * Update controller.php * Update fields.php * Update internal.php * Update fields.php * Update fields.xml * Update field.php * Update fields.php * Update type.php * Update section.php * Update field.php * Update field.xml * Update filter_fields.xml * Update field.php * Update view.html.php * Update edit.php * Update modal_options.php * Update view.html.php * Update default.php * Update default_batch_body.php * Update modal.php * Update field.xml * Update en-GB.com_fields.sys.ini * Update en-GB.com_fields.ini * Update en-GB.plg_fields_gallery.ini * Update en-GB.plg_fields_gallery.sys.ini * Update en-GB.plg_system_fields.ini * Update en-GB.plg_system_fields.sys.ini * Update modal_article.php * Update controller.php * Update field.php * Update default_custom.php * Update captcha.php * Update editor.php * Update media.php * Update user.php * Update editor.xml * Update media.xml * Update user.xml * Update usergrouplist.xml * Update abstractlist.php * Update domfieldinterface.php * Update field.php * Update email.php * Update file.php * Update imagelist.php * Update sql.php * Update tel.php * Update textarea.php * Update url.php * Update calendar.xml * Update checkboxes.xml * Update imagelist.xml * Update integer.xml * Update list.xml * Update radio.xml * Update sql.xml * Update textarea.xml * Update url.xml * Update gallery.xml * plugin * plugin2 * typo * Change to uft8mb4 * Add new extensions to the script file * Revert merge conflict composer changes * No needed changes * Library form fields should be unaware of com_fields * Default to https * Order the tables correct * Cleanup language strings * Code errors from cleanup * Remove tags support * Add category filter * Display fielg group label when editing a group * Display all fields which are assigned to all languages correct * Don't show fields on categories as it is not ready yet * Update fields.php * Don't transofrm the category name * Correct quote name function used * Revert "Display fielg group label when editing a group" This reverts commit 1331332. * Disable tags on custom field groups * Don't include category state in filter on back end * Remove debug code * CS fix * Shortening the line length * Install SQL files for postgres * Use JDatabaseQuery * Option to show the user custom fields on the front on the contact view * Comment for item_id table column * Remove class for textareas * Fix no menu item pages giving wrong links (joomla#12020) * [plg_system_logout] Load language files only when needed (joomla#11736) * Update logout.php * cs and stuff * Update logout.php * Adding Options Button (joomla#12033) * fix paths (joomla#12032) * Fix routing for non-sef menu items with Modern Routing (joomla#12021) * [com_banners] - publishing time does not honor timezone (joomla#11978) * [com_banners ] - publishing time does not honor timezone * impress only when needed impress only when needed * CS fix cs fix * Order stylesheet attributes the same as link attributes (joomla#12052) * use joomla-projects docker * Phase out JString calls in libraries (joomla#12058) * Admin app - JString -> StringHelper (joomla#12056) * Site app & Plugins - JString -> StringHelper (joomla#12057) * New Feature, Multilanguage: Add the possibility of displaying associations in article info and in articles list. Replaces joomla#11935 (joomla#12042) * Replaces * Modifying to fit Thomas proposal * modifying fetching flags param * adding showon + some * [JAccess] Improve ACL asset preloading performance/memory consumption (joomla#12028) * improve component asset preload speed * Update user.php * Update access.php * Update access.php * Update access.php * Update access.php * not convinced yet, but revert changes in juser * make sure that components are always preloaded * only a logged users (with user id) can be root. * [com_contact] - moved the captchaEnabled var from default to view (joomla#11964) * [com_contact] - moved the captchaEnabled var out of the default.php file to the view.html.php file moved the captchaEnabled var out of the default.php file to the view.html.php file. * moved captchaEnabled to the view moved captchaEnabled to the view * missed var declarationi/initialization missed var $captchaSet declarationi/initialization * Session interaction refactoring (joomla#10905) * Allow lazy starting a session * Defer starting sessions in the installer * Defer starting session in JApplicationCms * Deprecate creating sessions in JFactory * Start restructuring session load sequence in JApplicationCms * Add JSession object to onAfterSessionStart event trigger * Override afterSessionStart for install app to not store the user * Expand the database storage object for better API * Fix session listener declaration * Restructure session bootup and when the session metadata operations run * 3.5 -> 3.6 * Remove option, out of scope * Tweak things so the behavior is closer to current API * Undefined variable * Get store name from session object * Remove this, out of scope * PHPCS fix * Deep rooted application dependencies are my absolute favorite * Move comment, doc blocks, consistent method signature * Again on the consistency, we don't like E_STRICT errors * Nevermind, confused myself with checkSession, carry on... * Until the day the unit tests no longer follow the doc block code styles... * Lost line in merge * One more merge conflict fix * This internal coupling is addressed * Fix query from merge * [com_content] - add articles ordering by votes, ratings (joomla#11225) * Add setDocumentTitle() function in JViewLegacy (joomla#11399) * setDocumentTitle() function in JViewLegacy * PHPCS * JED turned to https (joomla#12076) * JED truned to https JED truned to https Minor fixes on proper use of Joomla! * Update README.txt Same as joomla#12076 * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED turned https * JED and community turned https * JED, community and org turned https * JED and community turned https * JED and community turned https * correct/add quotename (joomla#12070) * Label: Users Options: Login name > Username (joomla#12073) The language label "Change Login Name" is not consistent with the front-end label "Username". This PR changes the language label to "Change Username" and the decription to "Allow users to change their Username when editing their profile." The front-end login screens use the label "Username" Login Component:  Login Module:  ### Testing Instructions #### Before the PR Users > Manage > [Options] > [User Options] The last entry is "Change Login Name" + hover description "Allow users to change their Login name when editing their profile."  #### After the PR Users > Manage > [Options] > [User Options] The last entry is "Change Username" + hover description "Allow users to change their Username when editing their profile."  * Update .travis.yml (joomla#12079) * Add vote order check * [a11y] Protostar back to top (joomla#12446) * [a11y] Protostar - back to top link * Oops Andre was right * add anchor for non-js enabled browsers * Added missing com_fields component from last merge
* codestyle * code style * codestyle * codestyle * codestyle * thanks @wojsmol * corrections - thanks @Quy * corrections - thanks @Quy * oops * make @Quy happy * Update article.xml * Remove space * Update config.xml (#14) * Update filter.xml (#15) * Update config.xml (#16) * Update profile.xml (#17) * Update application.xml (#18) * Update article.xml (#19) * Update filter_articles.xml (#20) * Update config.xml (#24) * Update config.xml (#23) * Update filter_fields.xml (#22) * Update filter_featured.xml (#21) * Update override.xml (#25) * Update config.xml * Update config.xml (#26) * Update itemadmin_alias.xml (#30) * Update itemadmin.xml (#29) * Update item.xml (#27) * Update item_alias.xml (#28) * Update itemadmin_url.xml (#31) * Update module.xml (#32) * Update plugin.xml (#33) * Update config.xml (#34) * Update link.xml (#35) * Update config.xml (#36) * Update style.xml (#38) * Update config.xml (#37) * Update note.xml (#42) * Update group.xml (#41) * Update filter_debuggroup.xml (#40) * Update config.xml (#39) * corrections for @andrepereiradasilva * gotya
Sample data for Cassiopeia header
* Do not double lock assets * db update * Remove double asset lock (#19) * Remove double asset lock * Only remove lock Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
Merging the two queries to get the key and count into one.
I have merged the two queries to delete the entries into one as well. The only real difference between the two is the added WHERE clause for the id.