Пример #1
0
 public function __construct($layouts, DiskIO $ioResource, HoverEffect $hoverEffect)
 {
     $this->hoverHandler = $hoverEffect;
     $template = $_REQUEST["template"];
     /* We are now interested in finding which template was chosen */
     if ($template == "" || !in_array($template, $ioResource->getTemplates())) {
         /* We do fallback to default */
         //$template = "default";
         $template = "summer2009";
         $this->template = "{$layouts}/{$template}";
         $this->domDocument = new DOMDocument();
         $this->domDocument->load("{$this->template}/template.xml");
     }
 }
Пример #2
0
 /**
  * Checks for the maximum size uploads.
  *
  * @return int Maximum number of bytes.
  */
 public static function getUploadLimit()
 {
     return (int) min(DiskIO::stringToBytes(ini_get('post_max_size')), DiskIO::stringToBytes(ini_get('upload_max_filesize')));
 }