| /plugin/davcal/vendor/sabre/dav/tests/Sabre/DAV/Locks/Backend/ |
| H A D | AbstractTest.php | 29 $lock = new DAV\Locks\LockInfo(); 30 $lock->owner = 'Sinterklaas'; 31 $lock->timeout = 60; 32 $lock->created = time(); 33 $lock->token = 'MY-UNIQUE-TOKEN'; 34 $lock->uri ='someuri'; 36 $this->assertTrue($backend->lock('someuri', $lock)); 53 $lock = new DAV\Locks\LockInfo(); 54 $lock->owner = 'Sinterklaas'; 55 $lock->timeout = 60; [all …]
|
| H A D | Mock.php | 10 * This backend stores lock information in memory. Mainly useful for testing. 37 foreach($locks as $lock) { 39 if ($lock->uri === $uri || 41 ($lock->depth!=0 && strpos($uri, $lock->uri . '/')===0) || 44 ($returnChildLocks && (strpos($lock->uri, $uri . '/')===0)) ) { 46 $newLocks[] = $lock; 53 foreach($newLocks as $k=>$lock) { 54 if (time() > $lock->timeout + $lock->created) unset($newLocks[$k]); 67 public function lock($uri, LockInfo $lockInfo) { function in Sabre\\DAV\\Locks\\Backend\\Mock 69 // We're making the lock timeout 30 minutes [all …]
|
| /plugin/combo/ComboStrap/ |
| H A D | Lock.php | 10 * Adapted from the {@link Indexer::lock()} 13 * https://forum.dokuwiki.org/d/21044-taskrunner-running-multiple-times-eating-the-memory-lock 17 * ComboLockTaskRunner(): Trying to get a lock 29 * ComboDispatchEvent(): Trying to get a lock 31 * ComboDispatchEvent(): Lock Released 32 * ComboLockTaskRunner(): Lock Released 35 class Lock class 60 $this->lockFile = $conf['lockdir'] . "/_{$this->lockName}.lock"; 64 public static function create(string $name): Lock 66 return new Lock($name); [all …]
|
| H A D | Mutex.php | 13 * https://github.com/php-lock/lock 36 function lock($wait=10) function in ComboStrap\\Mutex 41 $lock = false; 42 for($i = 0; $i < $wait && !($lock = flock($this->filePointer,LOCK_EX|LOCK_NB)); $i++) 47 if(!$lock) 49 trigger_error("Not able to create a lock in $wait seconds");
|
| /plugin/webdav/ |
| D | admin.php | 79 $lock_id = $INPUT->str('lock'); 80 $locks_file = $conf['cachedir'] . '/webdav.lock'; 84 msg('No lock provided', -1); 89 foreach ($locks as $id => $lock) { 90 if ($lock->token == $lock_id) { 91 $locked_file = $lock->uri; 146 foreach ($this->getLocks() as $lock) { 147 $pathinfo = pathinfo($lock->uri); 149 …"#" class="interwiki iw_user"></a>' . (($lock->owner == $lock->user) ? $lock->owner : $lock->user … 150 echo "<td>{$lock->timeout} seconds</td>"; [all …]
|
| /plugin/davcal/vendor/sabre/dav/tests/Sabre/DAV/Xml/Property/ |
| H A D | LockDiscoveryTest.php | 12 $lock = new LockInfo(); 13 $lock->owner = 'hello'; 14 $lock->token = 'blabla'; 15 $lock->timeout = 600; 16 $lock->created = strtotime('2015-03-25 19:21:00'); 17 $lock->scope = LockInfo::EXCLUSIVE; 18 $lock->depth = 0; 19 $lock->uri = 'hi'; 21 $prop = new LockDiscovery([$lock]); 50 $lock = new LockInfo(); [all …]
|
| /plugin/webdav/vendor/sabre/dav/lib/DAV/Locks/Backend/ |
| D | File.php | 59 foreach ($locks as $lock) { 61 if ($lock->uri === $uri || 63 ($lock->depth != 0 && strpos($uri, $lock->uri . '/') === 0) || 66 ($returnChildLocks && (strpos($lock->uri, $uri . '/') === 0))) { 68 $newLocks[] = $lock; 75 foreach ($newLocks as $k => $lock) { 76 if (time() > $lock->timeout + $lock->created) unset($newLocks[$k]); 89 function lock($uri, LockInfo $lockInfo) { function in Sabre\\DAV\\Locks\\Backend\\File 91 // We're making the lock timeout 30 minutes 98 foreach ($locks as $k => $lock) { [all …]
|
| /plugin/davcal/vendor/sabre/dav/lib/DAV/Locks/Backend/ |
| H A D | File.php | 59 foreach ($locks as $lock) { 61 if ($lock->uri === $uri || 63 ($lock->depth != 0 && strpos($uri, $lock->uri . '/') === 0) || 66 ($returnChildLocks && (strpos($lock->uri, $uri . '/') === 0))) { 68 $newLocks[] = $lock; 75 foreach ($newLocks as $k => $lock) { 76 if (time() > $lock->timeout + $lock->created) unset($newLocks[$k]); 89 function lock($uri, LockInfo $lockInfo) { function in Sabre\\DAV\\Locks\\Backend\\File 91 // We're making the lock timeout 30 minutes 98 foreach ($locks as $k => $lock) { [all …]
|
| /plugin/dokukiwix/ |
| D | ajax.php | 34 $lock = $conf['lockdir'].'/_dokukiwix.lock'; variable 72 * Startup routines, called after the lock is created 78 global $lock; 81 if (file_exists($lock)) 82 $archivePath = DOKU_PLUGIN.'dokukiwix/archive/'.file_get_contents($lock).'/'; 84 die('Critical error: The lock file has been removed!'); 98 * Creation of the lock file, that file containing the 99 * date and time the lock was created. 104 global $lock; 106 // try to aquire a lock [all …]
|
| /plugin/webdav/vendor/sabre/dav/lib/DAV/Locks/ |
| D | Plugin.php | 62 $this->server->xml->elementMap['{DAV:}lockinfo'] = 'Sabre\\DAV\\Xml\\Request\\Lock'; 64 $server->on('method:LOCK', [$this, 'httpLock']); 88 * it allows us to add in any Lock-related properties 119 return ['LOCK','UNLOCK']; 138 * Returns all lock information on a particular uri 159 …* The WebDAV lock request can be operated to either create a new lock on a file, or to refresh an … 160 …* If a new lock is created, a full XML body should be supplied, containing information about the l… 161 * of lock (shared or exclusive) and the owner of the lock 163 …* If a lock is to be refreshed, no body should be supplied and there should be a valid If header c… 165 …* Additionally, a lock can be requested for a non-existent file. In these case we're obligated to … [all …]
|
| D | LockInfo.php | 9 * single lock. 18 * A shared lock 23 * An exclusive lock 33 * The owner of the lock 47 * How long till the lock is expiring 54 * UNIX Timestamp of when this lock was created 61 * Exclusive or shared lock 68 * Depth of lock, can be 0 or Sabre\DAV\Server::DEPTH_INFINITY 73 * The uri this lock locks
|
| /plugin/davcal/vendor/sabre/dav/lib/DAV/Locks/ |
| H A D | Plugin.php | 62 $this->server->xml->elementMap['{DAV:}lockinfo'] = 'Sabre\\DAV\\Xml\\Request\\Lock'; 64 $server->on('method:LOCK', [$this, 'httpLock']); 88 * it allows us to add in any Lock-related properties 119 return ['LOCK','UNLOCK']; 138 * Returns all lock information on a particular uri 159 …* The WebDAV lock request can be operated to either create a new lock on a file, or to refresh an … 160 …* If a new lock is created, a full XML body should be supplied, containing information about the l… 161 * of lock (shared or exclusive) and the owner of the lock 163 …* If a lock is to be refreshed, no body should be supplied and there should be a valid If header c… 165 …* Additionally, a lock can be requested for a non-existent file. In these case we're obligated to … [all …]
|
| H A D | LockInfo.php | 9 * single lock. 18 * A shared lock 23 * An exclusive lock 33 * The owner of the lock 47 * How long till the lock is expiring 54 * UNIX Timestamp of when this lock was created 61 * Exclusive or shared lock 68 * Depth of lock, can be 0 or Sabre\DAV\Server::DEPTH_INFINITY 73 * The uri this lock locks
|
| /plugin/webdav/vendor/sabre/dav/lib/DAV/Exception/ |
| D | Locked.php | 10 …rown when a client tried to access a resource that was locked, without supplying a valid lock token 19 * Lock information 23 protected $lock; variable in Sabre\\DAV\\Exception\\Locked 29 * which lock actually has the file locked. 31 * @param DAV\Locks\LockInfo $lock 33 function __construct(DAV\Locks\LockInfo $lock = null) { argument 35 $this->lock = $lock; 59 if ($this->lock) { 60 $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-submitted'); 64 $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri));
|
| /plugin/davcal/vendor/sabre/dav/lib/DAV/Exception/ |
| H A D | Locked.php | 10 …rown when a client tried to access a resource that was locked, without supplying a valid lock token 19 * Lock information 23 protected $lock; variable in Sabre\\DAV\\Exception\\Locked 29 * which lock actually has the file locked. 31 * @param DAV\Locks\LockInfo $lock 33 function __construct(DAV\Locks\LockInfo $lock = null) { argument 35 $this->lock = $lock; 59 if ($this->lock) { 60 $error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-submitted'); 64 $href->appendChild($errorNode->ownerDocument->createTextNode($this->lock->uri));
|
| /plugin/dokucrypt3/ |
| H A D | crypto_high-level.js | 11 function getKeyForLock(lock) { argument 12 return crypt_keys[lock]; 15 function setKeyForLock(lock,key) { argument 16 crypt_keys[lock]=key; 76 var tagend=0, ptend=0, lock=null, ptext; 85 lock=getTagAttr(data.substring(0,tagend+1),"LOCK"); 86 if(lock===null) { lock="default"; } 91 var key=getKeyForLock(lock); 99 return("<" + tag_pt + " LOCK=" + lock + " " + 119 …This should be a text enclosed by a <SECRET> tag, which also contains arguments LOCK and COLLAPSED. [all …]
|
| H A D | script.js | 96 params = 'call=lock&id=' + dw_locktimer.pageid + '&'; 153 lock = "default"; 166 setKeyForLock(lock,key); 176 setKeyForLock(lock,null); 183 lm:"Repeat passphrase key for lock " + lock, 191 lm:"Enter passphrase key for lock " + lock, 201 lock = "default"; 206 setKeyForLock(lock,key); 213 setKeyForLock(lock,null); 219 lm:"Enter passphrase key for lock " + lock, [all …]
|
| /plugin/davcal/vendor/sabre/dav/tests/Sabre/DAV/Locks/ |
| H A D | PluginTest.php | 35 $this->assertEquals(array('LOCK','UNLOCK'),$this->locksPlugin->getHTTPMethods('')); 41 $request = new HTTP\Request('LOCK', '/test.txt'); 58 $request = new HTTP\Request('LOCK', '/test.txt'); 72 …,$this->response->getHeader('Lock-Token'))===1,'We did not get a valid Locktoken back (' . $this->… 106 …$this->assertEquals($this->response->getHeader('Lock-Token'),'<' . (string)$token[0] . '>','Token … 115 $request = new HTTP\Request('LOCK', '/test.txt'); 144 $request = new HTTP\Request('LOCK', '/test.txt'); 157 $lockToken = $this->response->getHeader('Lock-Token'); 162 $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . ')' ]); 179 $request = new HTTP\Request('LOCK', '/test.txt'); [all …]
|
| /plugin/maintenance/ |
| D | helper.php | 14 $this->manual_lock_file = $this->temp_dir.'/.lock'; 39 $locks = glob($this->temp_dir.'/*.lock'); 41 if (is_file($this->temp_dir.'/.lock')) return 1; 52 $lockfile = $this->temp_dir.'/'.$script_hash.'.lock'; 73 $lockfile = $this->temp_dir.'/'.$script_hash.'.lock'; 103 $locks = glob($this->temp_dir.'/*.lock'); 104 foreach ($locks as $lock) { 105 $this->script_updatelock($lock); 110 * Checks a script lock and removes it if already terminated 112 …* @return integer 3: already no lock, 2: terminated and removed, 1: not terminated, 0: terminate… [all …]
|
| /plugin/issuelinks/helper/ |
| D | data.php | 67 throw new RuntimeException('Import of Issues aborted because lock removed'); 104 …* This checks the lock for the import process it behaves differently from the dokuwiki-core checkl… 106 …* It returns false if the lock does not exist. It returns **boolean true** if the lock exists and … 107 * It returns the username/ip if the lock exists and is not mine. 117 $lockFN = $conf['lockdir'] . '/' . md5('_' . $id) . '.lock'; 125 dbglog('issuelinks: stale lock timeout'); 138 * Generate lock file for import of issues/commits 140 * This is mostly a reimplementation of @see lock() 150 $lock = $conf['lockdir'] . '/' . md5('_' . $id) . '.lock'; 151 dbglog('lock import: ' . $jsonData, __FILE__ . ': ' . __LINE__); [all …]
|
| /plugin/jplayer/vendor/james-heinrich/getid3/getid3/ |
| D | extension.cache.dbm.php | 38 * '/tmp/getid3_cache.lock'); 83 private $lock; variable in getID3_cached_dbm 117 // Create lock file if needed 120 throw new Exception('failed to create lock file: '.$lock_filename); 124 // Open lock file for writing 126 throw new Exception('lock file: '.$lock_filename.' is not writable'); 128 $this->lock = fopen($lock_filename, 'w'); 130 // Acquire exclusive write lock to lock file 131 flock($this->lock, LOCK_EX); 180 // Release exclusive lock [all …]
|
| /plugin/autolink3/ |
| D | ajax.php | 89 // try to aquire a lock 90 $lock = $conf['lockdir'].'/_tagindexer.lock'; 91 while(!@mkdir($lock)) 93 if(time()-@filemtime($lock) > 60*5) 95 // looks like a stale lock - remove it 96 @rmdir($lock); 159 $lock = $conf['lockdir'].'/_tagindexer.lock'; 162 @rmdir($lock);
|
| /plugin/webdav/vendor/sabre/dav/lib/DAV/Xml/Property/ |
| D | LockDiscovery.php | 70 foreach ($this->locks as $lock) { 75 if ($lock->scope === LockInfo::SHARED) { 89 $writer->writeElement('{DAV:}href', $writer->contextUri . $lock->uri); 92 …$writer->writeElement('{DAV:}depth', ($lock->depth == DAV\Server::DEPTH_INFINITY ? 'infinity' : $l… 93 $writer->writeElement('{DAV:}timeout', 'Second-' . $lock->timeout); 96 $writer->writeElement('{DAV:}href', 'opaquelocktoken:' . $lock->token); 99 $writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner));
|
| /plugin/davcal/vendor/sabre/dav/lib/DAV/Xml/Property/ |
| H A D | LockDiscovery.php | 70 foreach ($this->locks as $lock) { 75 if ($lock->scope === LockInfo::SHARED) { 89 $writer->writeElement('{DAV:}href', $writer->contextUri . $lock->uri); 92 …$writer->writeElement('{DAV:}depth', ($lock->depth == DAV\Server::DEPTH_INFINITY ? 'infinity' : $l… 93 $writer->writeElement('{DAV:}timeout', 'Second-' . $lock->timeout); 96 $writer->writeElement('{DAV:}href', 'opaquelocktoken:' . $lock->token); 99 $writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner));
|
| /plugin/calendar/classes/ |
| H A D | FileHandler.php | 18 /** @var int Lock timeout in seconds */ 21 /** @var int Maximum retry attempts for acquiring lock */ 24 /** @var int Microseconds to wait between lock attempts */ 44 // Acquire shared lock for reading 56 self::logError("Failed to acquire read lock: $filepath"); 117 // Acquire exclusive lock on temp file 121 self::logError("Failed to lock temp file: $tempFile"); 136 // Now we need to lock the target file during rename 137 // If target exists, lock it first 141 // Try to get exclusive lock [all …]
|