コード例 #1
0
 public function update()
 {
     Meta::loadPackage('diff');
     $updater = new Updater();
     $repositoryVersion = $updater->getRemoteVersion();
     $hasNewVersion = $updater->hasNewVersion();
     $issueUrl = $updater->newIssueUrl();
     $this->setContent('system.update', compact('repositoryVersion', 'hasNewVersion', 'issueUrl'));
 }
コード例 #2
0
 /**
  * @param Updater $updater
  */
 public function diffFiles(Updater $updater)
 {
     $path = $this->getRequiredParameter('path');
     $localFile = base_path($path);
     if (!is_file($localFile)) {
         throw new Exception("File [{$path}] not found");
     }
     $remoteFileContent = $updater->getRemoteFileContent($path);
     $localFileContent = file_get_contents($localFile);
     $this->setContent(view('cms::system.diff_files', compact('remoteFileContent', 'localFileContent')));
 }
 /**
  * @param Updater $updater
  */
 public function __construct(Updater $updater)
 {
     $this->version = $updater->getRemoteVersion();
     $this->newVersion = $updater->hasNewVersion();
 }