https://bugs.contribs.org/show_bug.cgi?id=10674

            Bug ID: 10674
           Summary: simplify code using a global property in php key
    Classification: Contribs
           Product: SME Contribs
           Version: 9.2
          Hardware: ---
                OS: ---
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: smeserver-php-scl
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  Target Milestone: ---

Created attachment 6143
  --> https://bugs.contribs.org/attachment.cgi?id=6143&action=edit
patch proposed by John Crisp

instead of using a property PhpModule set as enabled and disabled for every
php* keys, it would be easier to remove all of these keys and to change them to
a unique property in php key


1/ this would be "sclversion" property
if it is not set to something /php[09]{2}/ and which is a key in config db then
it will default to the original version of php


2/ this will reduce the number of line of code in this contrib and make it
easier to upgrade, also it will avoid having 2 php enabled by hand and create
confusion


                if ($php_version eq 'php54')
                {
...
                elsif ($php_version eq 'php55')
                {
....

could become something like

$sclversion = $php{'sclversion'} || 'default';
if ( $sclversion =~ /^php[09]{2}$/ && $cdb{$sclversion} )
{
 $OUT .= "    Action phpscl-cgi /phpscl-cgi/$(sclversion)_REMI\n";
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to