Piwik\Filechecks::getAutoUpdateMakeWritableMessage PHP Method

getAutoUpdateMakeWritableMessage() public static method

Returns the help message when the auto update can't run because of missing permissions
public static getAutoUpdateMakeWritableMessage ( ) : string
return string
    public static function getAutoUpdateMakeWritableMessage()
    {
        $realpath = Filesystem::realpath(PIWIK_INCLUDE_PATH . '/');
        $message = '';
        $message .= "<code>" . self::getCommandToChangeOwnerOfPiwikFiles() . "</code><br />";
        $message .= "<code>chmod -R 0755 " . $realpath . "</code><br />";
        $message .= 'After you execute these commands (or change permissions via your FTP software), refresh the page and you should be able to use the "Automatic Update" feature.';
        return $message;
    }

Usage Example

Example #1
0
 public function newVersionAvailable()
 {
     Piwik::checkUserHasSuperUserAccess();
     $this->checkNewVersionIsAvailableOrDie();
     $newVersion = $this->updater->getLatestVersion();
     $view = new View('@CoreUpdater/newVersionAvailable');
     $this->addCustomLogoInfo($view);
     $this->setBasicVariablesView($view);
     $view->piwik_version = Version::VERSION;
     $view->piwik_new_version = $newVersion;
     $incompatiblePlugins = $this->getIncompatiblePlugins($newVersion);
     $marketplacePlugins = array();
     try {
         if (!empty($incompatiblePlugins)) {
             $marketplace = new Marketplace();
             $marketplacePlugins = $marketplace->getAllAvailablePluginNames();
         }
     } catch (\Exception $e) {
     }
     $view->marketplacePlugins = $marketplacePlugins;
     $view->incompatiblePlugins = $incompatiblePlugins;
     $view->piwik_latest_version_url = $this->updater->getArchiveUrl($newVersion);
     $view->can_auto_update = Filechecks::canAutoUpdate();
     $view->makeWritableCommands = Filechecks::getAutoUpdateMakeWritableMessage();
     return $view->render();
 }
All Usage Examples Of Piwik\Filechecks::getAutoUpdateMakeWritableMessage