Ticket #1255 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

please commit these patches for an better useful/readable database update files

Reported by: anonymous Assigned to:
Priority: minor Milestone: ispCP ω 1.0.0 - RC5
Component: Frontend (GUI) Version: ispCP ω 1.0.0 - RC4
Severity: Don't know Keywords:
Cc:

Description

1st modified file: ispcp/gui/include/database-update-functions.php

The first diff lines I reduces the sql-SELECT-complexity a little bit.

The last lines remove an unnecessary if-clause. Cause the while loop with checkNewRevisionExists() already checks if the function exists. Furthermore i removed the brackets after the variable $functionName. This diff enables that you can save 5 function-calls and 1 SQL-SELECT for each loop run.


2nd modified file: ispcp/gui/admin/database_update.php

Currently it is checked 2 times if an database update exists. With this second patch I merged the two if clause to one. This saves circa 5 function calls and one SQL-execution.

These are patches against r1151.

Attachments

database-update-functions.php.patch (1.4 kB) - added by anonymous on 05/14/08 19:41:42.
replaced not working 1st patch
database_update.php.2.patch (1.1 kB) - added by anonymous on 05/15/08 13:51:19.
new patch in unidiff
database_update.php.patch (1.1 kB) - added by anonymous on 05/15/08 13:51:23.
new patch in unidiff
database_update.php.3.patch (1.1 kB) - added by anonymous on 05/15/08 13:52:22.
finished patch file (unidiff) for database_update.php
database-update-functions.php.2.patch (1.8 kB) - added by anonymous on 05/15/08 13:58:46.
I've made 2 new diffs in the unified diff format, please ignore the first three ones.

Change History

(follow-up: ↓ 2 ) 05/14/08 19:17:09 changed by zothos

$queryArray[] 	= $functionName;

This wont work... no updates would be executed

ill take a look at the rest and merge the parts which doenst break my functionality.

(in reply to: ↑ 1 ) 05/14/08 19:40:26 changed by anonymous

You mean this line breaks the update? If it's so, please add round brackets after $functionName, like this:

$queryArray[] 	= $functionName();

Replying to zothos:

{{{ $queryArray[] = $functionName; }}} This wont work... no updates would be executed ill take a look at the rest and merge the parts which doenst break my functionality.

05/14/08 19:41:42 changed by anonymous

  • attachment database-update-functions.php.patch added.

replaced not working 1st patch

05/15/08 13:24:32 changed by zothos

another hint for faster commit... the patches should be in unified diff format. Im currently trying to figgure out what you want to do XD

05/15/08 13:51:19 changed by anonymous

  • attachment database_update.php.2.patch added.

new patch in unidiff

05/15/08 13:51:23 changed by anonymous

  • attachment database_update.php.patch added.

new patch in unidiff

05/15/08 13:52:22 changed by anonymous

  • attachment database_update.php.3.patch added.

finished patch file (unidiff) for database_update.php

05/15/08 13:58:46 changed by anonymous

  • attachment database-update-functions.php.2.patch added.

I've made 2 new diffs in the unified diff format, please ignore the first three ones.

05/15/08 15:05:07 changed by zothos

  • status changed from new to closed.
  • resolution set to fixed.
  • component changed from Backend (Engine) to Frontend (GUI).
  • milestone changed from Working to ispCP ω 1.0.0 - RC5.

fixed in r1153

thx ;)


Add/Change #1255 (please commit these patches for an better useful/readable database update files)




Action