Suitecrm: OpenListView.php remove file and unused language strings

Created on 31 May 2017  路  7Comments  路  Source: salesagility/SuiteCRM

Edited Issue

OpenListView.php is not in used and should be removed
There are also some language files that should be removed from this 2 modules
modules/History/language/en_us.lang.php
modules/Activities/language/en_us.lang.php

'LBL_UPCOMING' => 'My Upcoming Appointments',
'LBL_TODAY' => 'through ',
'NTC_NONE_SCHEDULED' => 'None scheduled.',

Original Issue text


Where can I see the usage for this string on SuiteCRM interface?
'LBL_TODAY' => 'through ',

How is it used?
It has a space after so I assume its used in the middle of a sentence. What is the word before/after?

On language files I can find it here:
modules/Activities/language/en_us.lang.php
https://github.com/salesagility/SuiteCRM/blob/2e1122effe9684c524dcc9e21b77d1eba45b4787/modules/Activities/language/en_us.lang.php#L108

modules/History/language/en_us.lang.php
https://github.com/salesagility/SuiteCRM/blob/2e1122effe9684c524dcc9e21b77d1eba45b4787/modules/History/language/en_us.lang.php#L89

Moderate Fix Proposed Bug

Most helpful comment

From what I gather, that file is not being used at all...

It contains a reference to another file,
$xtpl=new XTemplate ('modules/Activities/OpenListView.html');

but that one doesn't exist. So it looks like a left-over from the past...

All 7 comments

It seems to be used only here
https://github.com/salesagility/SuiteCRM/blob/932b87108edc154dd3c9c86b57ceaa24acd40835/modules/Activities/OpenListView.php#L234

but I couldn't find the actual place in the app where it's used. It should be near a header saying My Upcoming Appointments, but where is that to be found?

It seems the through is used in the sense of expressing a range of dates, see
https://english.stackexchange.com/questions/44686/through-or-to-for-expression-of-range

From what I gather, that file is not being used at all...

It contains a reference to another file,
$xtpl=new XTemplate ('modules/Activities/OpenListView.html');

but that one doesn't exist. So it looks like a left-over from the past...

I searched the code of SugarCRM CE 6.5 and it's the same, one of the files is gone, the other one is there for nothing. I found older copies (2008) that have the html file. Also some vTiger code has it (it's an old fork of Sugar, also).

If somebody ( @Dillon-Brown ?) can confirm my analysis we could clean up a few more labels and delete the OpenListView.php file.

@pgorod OpenListView.php appears to be unused. Nice find!

@horus68 I suggest renaming this to "delete unused file and language strings" or something similar.

So its one more string to unused language strings (Activities) https://github.com/salesagility/SuiteCRM/issues/2501

@Dillon-Brown please revisit your PR https://github.com/salesagility/SuiteCRM/pull/3550 for reviews I made

@pgorod rename issue just for this OpenListView.php or are you starting a new task finding unused files?

Also remove LBL_UPCOMING and perhaps others in that file, if they are not used elsewhere.

I'm not searching for any more unused files, no. It's too complicated to do in general (it is easier to just inspect one file to see where it's being called from).

Then perhaps you could close this issue and add a commit to that PR deleting the file? Whichever way you prefer.

Was this page helpful?
0 / 5 - 0 ratings