Plugin Directory

Changeset 2784030


Ignore:
Timestamp:
09/13/2022 01:24:39 PM (3 years ago)
Author:
pmpr
Message:

update codebase

Location:
pmpr-ir
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pmpr-ir/tags/1.2.1/src/Pmpr/Plugin/Pmpr/Component/Common.php

    r2783555 r2784030  
    4646    public function adminNotices()
    4747    {
    48         if (!$this->isCurrentPage()
    49             && !$this->isCommonsInstalled()) {
     48        if ($this->isRequirementsSatisfied(true)) {
    5049
    51             Manipulate::renderNotice($this->getCommonsNotice());
     50            if (!$this->isCurrentPage()
     51                && !$this->isCommonsInstalled()) {
     52
     53                Manipulate::renderNotice($this->getCommonsNotice());
     54            }
     55
     56            $notice = null;
     57            if ($components = $this->getCommonComponents()) {
     58
     59                foreach ($components as $component) {
     60
     61                    if ($component->hasUpdate()) {
     62
     63                        $notice = sprintf('%s %s',
     64                            __('PMPR Commons needs to be updated.', PR__PLG__PMPR),
     65                            $this->getPageLinkElement(__('Click here', PR__PLG__PMPR))
     66                        );
     67                        break;
     68                    }
     69                }
     70            } else {
     71
     72                $notice = $this->getTranslation(self::COMMONS_INSTALLATION_PROBLEM);
     73            }
     74            if ($notice) {
     75
     76                Manipulate::renderNotice($notice);
     77            }
    5278        }
    53 
    54         $notice = null;
    55         if ($components = $this->getCommonComponents()) {
    56 
    57             foreach ($components as $component) {
    58 
    59                 if ($component->hasUpdate()) {
    60 
    61                     $notice = sprintf('%s %s',
    62                         __('PMPR Commons needs to be updated.', PR__PLG__PMPR),
    63                         $this->getPageLinkElement(__('Click here', PR__PLG__PMPR))
    64                     );
    65                     break;
    66                 }
    67             }
    68         } else {
    69 
    70             $notice = $this->getTranslation(self::COMMONS_INSTALLATION_PROBLEM);
    71         }
    72 
    73         if ($notice) {
    74 
    75             Manipulate::renderNotice($notice);
    76         }
    77 
    7879    }
    7980
  • pmpr-ir/trunk/src/Pmpr/Plugin/Pmpr/Component/Common.php

    r2783555 r2784030  
    4646    public function adminNotices()
    4747    {
    48         if (!$this->isCurrentPage()
    49             && !$this->isCommonsInstalled()) {
     48        if ($this->isRequirementsSatisfied(true)) {
    5049
    51             Manipulate::renderNotice($this->getCommonsNotice());
     50            if (!$this->isCurrentPage()
     51                && !$this->isCommonsInstalled()) {
     52
     53                Manipulate::renderNotice($this->getCommonsNotice());
     54            }
     55
     56            $notice = null;
     57            if ($components = $this->getCommonComponents()) {
     58
     59                foreach ($components as $component) {
     60
     61                    if ($component->hasUpdate()) {
     62
     63                        $notice = sprintf('%s %s',
     64                            __('PMPR Commons needs to be updated.', PR__PLG__PMPR),
     65                            $this->getPageLinkElement(__('Click here', PR__PLG__PMPR))
     66                        );
     67                        break;
     68                    }
     69                }
     70            } else {
     71
     72                $notice = $this->getTranslation(self::COMMONS_INSTALLATION_PROBLEM);
     73            }
     74            if ($notice) {
     75
     76                Manipulate::renderNotice($notice);
     77            }
    5278        }
    53 
    54         $notice = null;
    55         if ($components = $this->getCommonComponents()) {
    56 
    57             foreach ($components as $component) {
    58 
    59                 if ($component->hasUpdate()) {
    60 
    61                     $notice = sprintf('%s %s',
    62                         __('PMPR Commons needs to be updated.', PR__PLG__PMPR),
    63                         $this->getPageLinkElement(__('Click here', PR__PLG__PMPR))
    64                     );
    65                     break;
    66                 }
    67             }
    68         } else {
    69 
    70             $notice = $this->getTranslation(self::COMMONS_INSTALLATION_PROBLEM);
    71         }
    72 
    73         if ($notice) {
    74 
    75             Manipulate::renderNotice($notice);
    76         }
    77 
    7879    }
    7980
Note: See TracChangeset for help on using the changeset viewer.