Ejemplo n.º 1
0
 /**
  * Catches the too many connections error and sets a file system lock.
  */
 protected function connect()
 {
     try {
         parent::connect();
     } catch (DatabaseException $e) {
         if (defined("COOKIE_PREFIX") && isset($_COOKIE[COOKIE_PREFIX . 'userID']) && $_COOKIE[COOKIE_PREFIX . 'userID']) {
             LWUtil::lockAccount(intval($_COOKIE[COOKIE_PREFIX . 'userID']), 10);
         }
         // throw again...
         throw $e;
     }
 }