[TYPO3-dam-devel] RFC: #8365: Cleanup class.ext_update.php
Michiel Roos [netcreators]
michiel at netcreators.com
Sun Jun 29 17:17:23 CEST 2008
+1
On May 30, 2008, at 11:37 PM, Benjamin Mack wrote:
> Hey all,
>
> this is a SVN patch request.
>
> Affected Extension: tx_dam
>
> Type: cleanup
>
> BT reference: http://bugs.typo3.org/view.php?id=8365
>
> Branches: Trunk (1.1) only
>
> Problem: class.ext_update.php does not use compat-version interface.
>
> Solution:
> Although this is of very little importance (and there is even a
> return statement), Michiel and I found this code on the T3DD08 and I
> wanted to clean this up.
>
> --
> greetings,
> benni.
> -SDG-
> Index: class.ext_update.php
> ===================================================================
> --- class.ext_update.php (revision 9260)
> +++ class.ext_update.php (working copy)
> @@ -21,10 +21,6 @@
> *
> * This copyright notice MUST APPEAR in all copies of the script!
> ***************************************************************/
> -
> -
> -
> -
> /**
> * Class for updating the db
> *
> @@ -62,8 +58,7 @@
> function access() {
>
>
> - // Just do the upgrade without asking
> -
> + // Just do the upgrade without asking
> $this->perform_update();
> return false;
>
> @@ -77,11 +72,12 @@
> $doit = $row[0] ? true : $doit;
>
> $res = $GLOBALS['TYPO3_DB']->admin_get_fields('tt_content');
> - if (isset($res['tx_dam_flexform']) AND !
> isset($res['ce_flexform'])) {
> +
> + if (isset($res['tx_dam_flexform']) && !
> isset($res['ce_flexform'])) {
> $doit = true;
> }
> -
> - if
> (t3lib_div
> ::int_from_ver(TYPO3_branch)>=t3lib_div::int_from_ver('4.1')) {
> +
> + if (t3lib_div::compat_version('4.1')) {
> $res = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dam_mm_ref');
> if (!isset($res['sorting_foreign'])) {
> $doit = true;
> @@ -111,13 +107,12 @@
> $content .= 'Updated Media folder to be a SysFolder<br />';
>
> $res = $GLOBALS['TYPO3_DB']->admin_get_fields('tt_content');
> - if (isset($res['tx_dam_flexform']) AND !
> isset($res['ce_flexform'])) {
> + if (isset($res['tx_dam_flexform']) && !
> isset($res['ce_flexform'])) {
> $GLOBALS['TYPO3_DB']->admin_query('ALTER TABLE tt_content CHANGE
> tx_dam_flexform ce_flexform mediumtext NOT NULL');
> $content .= 'Renamed field tt_content.tx_dam_flexform to
> ce_flexform<br />';
> }
>
> - if
> (t3lib_div
> ::int_from_ver(TYPO3_branch)>=t3lib_div::int_from_ver('4.1')) {
> -
> + if (t3lib_div::compat_version('4.1')) {
> $existingTables=$GLOBALS['TYPO3_DB']->admin_get_tables();
> if(isset($existingTables['tx_dam_mm_ref'])) {
> $res = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dam_mm_ref');
> @@ -150,4 +145,4 @@
> }
>
>
> -?>
> \ No newline at end of file
> +?>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
Met vriendelijke groet,
Michiel Roos
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
More information about the TYPO3-team-dam
mailing list