Logo Search packages:      
Sourcecode: davical version File versions  Download package

CalDAVRequest::GetLockRow ( lock_token )

Returns the locked row, either from the cache or from the database

Parameters:
string$dav_nameThe resource which we want to know the lock status for

Definition at line 449 of file CalDAVRequest.php.

References DoResponse().

Referenced by FailIfLocked().

                                     {
    if ( isset($this->_locks_found) && isset($this->_locks_found[$lock_token]) ) {
      return $this->_locks_found[$lock_token];
    }

    $sql = "SELECT * FROM locks WHERE opaquelocktoken = ?;";
    $qry = new PgQuery($sql, $lock_token );
    if ( $qry->Exec("caldav",__LINE__,__FILE__) ) {
      $lock_row = $qry->Fetch();
      $this->_locks_found = array( $lock_token => $lock_row );
      return $this->_locks_found[$lock_token];
    }
    else {
      $this->DoResponse( 500, translate("Database Error") );
    }

    return false;  // Nothing matched
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index