Esempio n. 1
0
 private function load()
 {
     if ($this->key_id) {
         $key = new Key($this->key_id);
     } else {
         $key = Key::getHomeKey();
     }
     $this->url = PHPWS_Core::getHomeHttp() . $key->url;
     $this->tag = md5($this->url);
     $this->file = QR_IMAGE_DIR . $this->tag . '_' . $this->size . '.png';
     $this->image = QR_IMAGE_HTTP . $this->tag . '_' . $this->size . '.png';
 }
Esempio n. 2
0
 /**
  * Retrieves the current flagged key. Will return the home key if
  * on the home page and allow_home is true.
  */
 public static function getCurrent($allow_home = true)
 {
     if (!isset($GLOBALS['Current_Flag'])) {
         if (isset($_REQUEST['module']) || !$allow_home) {
             return null;
         } else {
             return Key::getHomeKey();
         }
     } else {
         return $GLOBALS['Current_Flag'];
     }
 }