Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Aug 2013 at 11:45 UTC
Updated:
29 Jul 2014 at 22:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
legolasboRemoved unused variables
Comment #2
phiit commentedReviewed, patch clears all mentioned unused variables, but after removing the $arg at line 1023 (see below) $handler becomes unused variable.
Remaining code that has unused $handler starts at line 1026 with the patch applied:
Comment #3
legolasboI've had a look at the code chunk related to $handler and found a way to remove both $handler and $token. While figuring out if this code chunk is actually used i deleted it and ran almost all views tests. The tests didn't seem to break so i think this code needs tests. However i think we should check for and add missing tests for the entire class in a follow up issue.
Comment #4
Anonymous (not verified) commentedI have reviewed this patch, all looks OK except you are now using a function within a loop declaration, which may cause performance issues as it may perform on each loop iteration:
I've attached a patch and interdiff to take the calculation out of the loop declaration. Tried to choose an appropriate variable name but feel free to alter:
Comment #6
Anonymous (not verified) commented#4: core-remove-unused-vars-displaypluginbase.php-2072593-4.patch queued for re-testing.
Comment #7
boran commentedReviewed the patch + interdiff in #4
- all the changes make sense and are easy to read
- the patch applies cleanly
- views continues working
Comment #8
alexpottPatch no longer applies.
Comment #9
Anonymous (not verified) commentedPatch re-rolled. Following section removed as no longer applicable:
Comment #10
Anonymous (not verified) commentedD'oh, setting to "needs review".
Comment #11
mcrittenden commentedTags
Comment #12
johnmcc commentedLooks good and applies cleanly. +1.
Comment #13
areke commentedThis still applies and works well.
Comment #14
catch$count = 1 - missing spaces.
Comment #15
deneo commentedfixed
Comment #16
catchComment #17
webchickCommitted and pushed to 8.x. Thanks!
Comment #19
oadaeh commentedLooking only at the last patch, it looks like no tests were included. Is that true? It's also been a while, so it's possible they were added after this patch went in.