ezpublish-legacy icon indicating copy to clipboard operation
ezpublish-legacy copied to clipboard

Removed: old code that isn't in use since 80d4d3d3488f5585d3b9a59aceb25d05f605baf7

Open patrickallaert opened this issue 11 years ago • 7 comments

patrickallaert avatar Apr 03 '13 14:04 patrickallaert

This whole block is to define a $view_dir variable that isn't used anymore. $renderMode and $renderData variables are only used to create $view_dir.

patrickallaert avatar Apr 03 '13 14:04 patrickallaert

-1 Could break third party code using eZObjectForwarder

lolautruche avatar Apr 03 '13 15:04 lolautruche

@patrickallaert & @lolautruche I first thought, too, that the code isn't needed any more, but then I saw it: The variable $view_dir should be named $viewDir, as defined in Line 62 , extended in Line 76 and used in Line 118.

I hope I'm not wrong, it took me longer to gather and format the links than to find it :).

jeromegamez avatar May 23 '13 22:05 jeromegamez

@lolautruche I really don't understand why. $view_dir on L78 is an unused variable, so L77/L78 could be removed. In turn $renderMode variable is only there for L77, so it makes the whole block I removed completely useless. How can removing this break third party code?

Or is the goal of that code to modify $viewDir variable and not $view_dir?

In any cases, there is something to fix.

patrickallaert avatar May 24 '13 14:05 patrickallaert

ping?

I also think this variable should be named $viewDir. But that would change the logic of that code a bit and requires testing. Something might not work because of that, but what... What's sure is that in its current state, that part of the code is just useless.

patrickallaert avatar Sep 25 '13 08:09 patrickallaert

Unsure. @andrerom @bdunogier maybe ?

lolautruche avatar Sep 25 '13 11:09 lolautruche

Seem to be a copy pasty issue, the process() function uses $view_dir consistently, while this should use $viewDir Kernel don't seem to be affected by this, could only see two uses of render-mode, and they are both false.

So +1 for consistency and fixing the naming of the variable, but issue needed for it as it might be a bug for someone.

andrerom avatar Sep 25 '13 14:09 andrerom