private static function getInstance()
 {
     if (self::$instance == null) {
         include_once Wave_Config::get('wave')->path->vendors . 'phpass-1.3' . DS . 'PasswordHash.php';
         self::$instance = new PasswordHash(12, false);
     }
     return self::$instance;
 }
Beispiel #2
0
 public static function redirect($uri, $profile = null, $permanent = false)
 {
     if ($permanent) {
         header("Status: 302 Moved Permanently");
     }
     if ($profile !== null) {
         $conf = Wave_Config::get('deploy')->profiles->{$profile};
         $domain = $conf->baseurl;
         $protocol = 'http';
         if (isset($conf->ssl) && $conf->ssl == true) {
             $protocol .= 's';
         }
         $uri = $protocol . '://' . $domain . $uri;
     }
     header('Location: ' . $uri);
 }