Lines Matching refs:name
72 private function getPatchDir(int $bugId, string $name): string argument
74 return $this->uploadsDir.'/p'.$bugId.'/'.$name;
80 private function createPatchDir(int $bugId, string $name): void argument
82 $patchDir = $this->getPatchDir($bugId, $name);
143 public function getPatchFullpath(int $bugId, string $name, int $revision): string argument
145 return $this->getPatchDir($bugId, $name).'/'.$this->getPatchFileName($revision);
151 …public function attach(int $bugId, string $patch, string $name, string $developer, array $obsolete… argument
153 $this->uploader->setDir($this->getPatchDir($bugId, $name));
160 $revision = $this->newPatchFileName($bugId, $name, $developer);
169 $this->validatePatchName($name);
171 $this->createPatchDir($bugId, $name);
175 $this->detach($bugId, $name, $revision);
199 $this->obsoletePatch($bugId, $name, $revision, $obsolete[0], $obsolete[1]);
208 private function validatePatchName(string $name): void argument
210 if (!preg_match('/^[\w\-\.]+\z/', $name) || strlen($name) > 80) {
211 throw new \Exception('Invalid patch name "'.htmlspecialchars($name, ENT_QUOTES).'"');
218 private function detach(int $bugId, string $name, int $revision): void argument
224 $this->dbh->prepare($sql)->execute([$bugId, $name, $revision]);
226 @unlink($this->getPatchFullpath($bugId, $name, $revision));
233 …private function obsoletePatch(int $bugId, string $name, int $revision, string $obsoleteName, int … argument
237 … $this->dbh->prepare($sql)->execute([$bugId, $name, $revision, $obsoleteName, $obsoleteRevision]);