Review main Abandoned

24902[TASK] Improve calls to the FileRepository

Georg Ringer CR 0 V 0 Normal +49 −46 updated 01/06/15, 20:02

Commit message

Currently the FileRepository is called for every
possible relation, which is quite an overhead.

As the field (e.g. media in pages) needs to have
the count of relations inside, it should be checked
if there is a value inside before trying to do a call
to the database which will return no result anyway.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 16

  1. Mr. Jenkins commented on patch set 1 10/19/13, 08:22

  2. Wouter Wolters voted on patch set 1 CR +1 10/19/13, 10:28

  3. Alexander Opitz commented on patch set 1 11/08/13, 07:24

    FrontendContentAdapterService.php:86

    IMHO isset can be removed, if we test for empty as $row is no string. 1.) No warning is generated if the variable does not exist. 2.) Only on strings there is a glitch with PHP5.3 => http://www.php.net/manual/en/function.empty.php But I didn't try it with PHP5.3 so it needs to be evaluated.
  4. Markus Klein uploaded patch set 2 11/22/13, 12:01

  5. Markus Klein commented on patch set 1 11/22/13, 12:03

    FrontendContentAdapterService.php:86 Reply

    correct, empty replaces isset. The "glitch" only has todo with string offsets. nothing we use very often in connection with empty.
  6. Markus Klein updated the commit message in patch set 2 11/22/13, 12:04

  7. Markus Klein uploaded patch set 4 11/22/13, 12:05

  8. Markus Klein voted on patch set 4 CR +1 11/22/13, 12:06

  9. Mr. Jenkins commented on patch set 2 11/22/13, 12:18

  10. Mr. Jenkins commented on patch set 3 11/22/13, 12:21

  11. Mr. Jenkins commented on patch set 4 11/22/13, 12:36

  12. Alexander Opitz voted on patch set 4 CR +1 11/22/13, 12:37

  13. Steffen Ritter commented on patch set 4 CR -1 11/30/13, 15:28

    I'm not sure if we should do that... Currently only tce-main also updates the field count; if you use the mm_opposite_field feature only the initianting site is updated. Therefore we cannot trust the field value...
  14. Markus Klein voted on patch set 4 CR 0 03/26/14, 21:07

  15. Steffen Ritter commented on patch set 4 06/11/14, 12:09

    Hi Georg, since nothing happend hier since month, I kindly ask to abandon this change and close the issue in forge.
  16. Wouter Wolters abandoned the change 01/06/15, 20:02

    Georg said we can abandon this one.