Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

42 líneas
991 B

  1. <?php
  2. namespace Grav\Plugin\Problems;
  3. use Grav\Plugin\Problems\Base\Problem;
  4. /**
  5. * Class Permissions
  6. * @package Grav\Plugin\Problems
  7. */
  8. class Permissions extends Problem
  9. {
  10. public function __construct()
  11. {
  12. $this->id = 'Permissions Setup';
  13. $this->class = get_class($this);
  14. $this->order = -1;
  15. $this->level = Problem::LEVEL_WARNING;
  16. $this->status = false;
  17. $this->help = 'https://learn.getgrav.org/troubleshooting/permissions';
  18. }
  19. /**
  20. * @return $this
  21. */
  22. public function process()
  23. {
  24. umask($umask = umask(022));
  25. $msg = 'Your default file umask is <strong>%s</strong> which %s';
  26. if (($umask & 2) !== 2) {
  27. $this->msg = sprintf($msg, decoct($umask), 'is potentially dangerous');
  28. $this->status = false;
  29. } else {
  30. $this->msg = sprintf($msg, decoct($umask), 'looks good!');
  31. $this->status = true;
  32. }
  33. return $this;
  34. }
  35. }