/plugin/structpublish/_test/ |
H A D | revision.test.php | 56 $pid = 'public:structpublish'; 57 $ID = $pid; 58 $INFO['id'] = $pid; 62 saveWikiText($pid, $text, 'Save first draft'); 67 $revision = new Revision($pid, $currentrev); 97 saveWikiText($pid, "$text $text", 'Save second draft');
|
/plugin/structpublish/db/ |
H A D | update0001.sql | 9 pid TEXT NOT NULL, field 13 PRIMARY KEY(pid, user, status)
|
/plugin/structpublish/helper/ |
H A D | db.php | 50 $sql = 'SELECT pid FROM titles'; argument 52 return array_column($list, 'pid'); 57 * If no pid is given, check current page. 61 public function isPublishable($pid = null) 69 if (!$pid) { 70 $pid = $ID; 73 $sql = 'SELECT pid FROM structpublish_assignments WHERE pid = ? AND assigned = 1'; 74 return (bool) $sqlite->queryAll($sql, $pid); 80 * @param string $pid Th 91 userHasRole($pid, $userId = '', $grps = [], $roles = []) global() argument [all...] |
/plugin/structpublish/meta/ |
H A D | AccessTableStructpublish.php | 49 return ['pid', 'rev', 'latest', 'published']; 55 return [$this->pid, AccessTable::DEFAULT_REV, AccessTable::DEFAULT_LATEST, $this->published]; 65 $where = "WHERE pid = ?"; 66 $opts = [$this->pid]; 91 "UPDATE $this->stable SET latest = 0 WHERE latest = 1 AND pid = ?", 92 [$this->pid]
|
H A D | Assignments.php | 90 foreach ($pids as $pid) { 91 $this->updatePageAssignments($pid); 120 $sql = 'SELECT pid FROM structpublish_assignments WHERE user = ? AND status = ?'; 126 $ok = $ok && $this->deassignPage($row['pid'], $user, $status); 135 * @param string $pid 137 public function updatePageAssignments($pid, $reload = false) argument 142 $rules = $this->getPageAssignments($pid, true); 146 $this->assignPage($pid, $user, $status); 189 $sql = 'REPLACE INTO structpublish_assignments (pid, user, status, assigned) VALUES (?, ?, ?, 1)'; 202 $sql = 'UPDATE structpublish_assignments SET assigned = 0 WHERE pid [all...] |
H A D | Revision.php | 212 * @param string $pid 215 protected function updateCoreData($pid, $rid = 0) 225 $access = new AccessTableStructpublish($schema, $pid, 0, $rid); 213 updateCoreData($pid, $rid = 0) global() argument
|
/plugin/struct/db/ |
H A D | update0008.sql | 3 pid NOT NULL, field 5 PRIMARY KEY(pid) 9 INSERT INTO titles SELECT DISTINCT pid, pid FROM schema_assignments;
|
H A D | update0003.sql | 6 pid NOT NULL, field 10 PRIMARY KEY(tbl, colref, pid, rev, row)
|
/plugin/struct/meta/ |
H A D | AccessTable.php | 19 protected $pid; variable in dokuwiki\\plugin\\struct\\meta\\AccessTable 57 public static function getPageAccess($tablename, $pid, $ts = 0) argument 60 return new AccessTablePage($schema, $pid, $ts, 0); 63 public static function getSerialAccess($tablename, $pid, $rid = 0) argument 66 return new AccessTableSerial($schema, $pid, 0, $rid); 79 * @param string $pid Page id to access 85 public static function bySchema(Schema $schema, $pid, $ts = 0, $rid = 0) argument 87 if (self::isTypePage($pid, $ts)) { 88 return new AccessTablePage($schema, $pid, $ts, $rid); 90 return new AccessTableGlobal($schema, $pid, 104 byTableName($tablename, $pid, $ts = 0, $rid = 0) global() argument 124 __construct($schema, $pid, $ts = 0, $rid = 0) global() argument 585 isTypePage($pid, $rev) global() argument 598 isTypeGlobal($pid, $rev) global() argument 611 isTypeSerial($pid, $rev) global() argument 624 handleEmptyMulti($pid, $rid, $colref) global() argument [all...] |
H A D | AccessTableGlobal.php | 14 public function __construct($table, $pid, $ts = 0, $rid = 0) argument 16 parent::__construct($table, $pid, $ts, $rid); 69 return "REPLACE INTO $this->mtable (pid, rid, rev, latest, colref, row, value) VALUES (?,?,?,?,?,?,?)"; 92 return ['pid', 'rev', 'latest']; 100 return [$this->pid, AccessTable::DEFAULT_REV, AccessTable::DEFAULT_LATEST]; 108 return [$this->pid, $this->rid, AccessTable::DEFAULT_REV, AccessTable::DEFAULT_LATEST]; 137 * @param string $pid 141 protected function handleEmptyMulti($pid, $rid, $colref) 145 "DELETE FROM $table WHERE pid = ? AND rid = ? AND colref = ?", 146 $pid, 134 handleEmptyMulti($pid, $rid, $colref) global() argument [all...] |
H A D | AccessTablePage.php | 16 public function __construct($schema, $pid, $ts = 0, $rid = 0) argument 19 parent::__construct($schema, $pid, $ts, $rid); 50 $where = "WHERE pid = ?"; 51 $opts = [$this->pid]; 83 "UPDATE $this->stable SET latest = 0 WHERE latest = 1 AND pid = ? AND rid = 0", 84 [$this->pid] 88 "UPDATE $this->mtable SET latest = 0 WHERE latest = 1 AND pid = ? AND rid = 0", 89 [$this->pid] 100 return ['rid, pid, rev, latest']; 108 return [self::DEFAULT_PAGE_RID, $this->pid, [all...] |
H A D | AccessTableSerial.php | 14 public function __construct($table, $pid, $ts = 0, $rid = 0) argument 19 parent::__construct($table, $pid, $ts, $rid);
|
H A D | AggregationTable.php | 350 $pid = $this->searchConfig->getPids()[$rownum]; 354 $this->renderer->doc .= ' data-pid="' . hsc($pid) . '" data-rev="' . $rev . '" data-rid="' . $rid . '">';
|
H A D | Assignments.php | 104 $sql = 'SELECT pid FROM schema_assignments WHERE tbl = ?'; 109 $tables = $this->getPageAssignments($row['pid'], true); 111 $this->deassignPageSchema($row['pid'], $table); 121 * @param string $pid argument 123 public function reevaluatePageAssignments($pid) 127 $tables = $this->getPageAssignments($pid, true); 130 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ?'; 131 $tablerows = $this->sqlite->queryAll($sql, [$pid]); 136 $this->assignPageSchema($pid, $row['tbl']); 138 $this->deassignPageSchema($pid, [all...] |
H A D | CSVExporter.php | 46 $pid = $pids[$i]; 48 $pid = ''; 50 echo $this->row($row, $pid); 65 $row .= $this->escape('pid'); 80 * @param string $pid pid of this row 83 protected function row($values, $pid) 87 $row .= $this->escape($pid); 82 row($values, $pid) global() argument
|
H A D | CSVImporter.php | 114 $pageType = new Page(null, 'pid'); 121 // just skip the checks for 'pid' but discard other columns not present in the schema 123 if ($head !== 'pid') { 211 // pid is a non-data column and must be supplied to the AccessTable separately 212 $pid = $data['pid'] ?? ''; 213 unset($data['pid']); 219 $helper->saveData($pid, [$table => $data], 'CSV data imported'); 223 $access = AccessTable::getSerialAccess($table, $pid);
|
H A D | CSVPageImporter.php | 13 * Import page schema only when the pid header is present. 18 if (!in_array('pid', $this->header)) 19 throw new StructException('There is no "pid" header in the CSV. Schema not imported.'); 30 $pid = cleanID($values[0]); 31 if (isset($this->createPage[$pid])) { 32 $this->createPage($pid, $values); 37 $pid, 49 * @param string $pid 52 protected function createPage($pid, $line) argument 54 $text = pageTemplate($pid); [all...] |
H A D | CSVSerialImporter.php | 11 * Import page schema only when the pid header is present. 16 if (!in_array('pid', $this->header)) 17 throw new StructException('There is no "pid" header in the CSV. Schema not imported.'); 28 $pid = cleanID($values[0]); 29 if ($this->createPage[$pid]) { 30 $this->createPage($pid, $values); 40 * @param string $pid 43 protected function createPage($pid, $line) argument 45 $text = pageTemplate($pid); 47 $pageParts = explode(':', $pid); [all...] |
H A D | PageMeta.php | 10 protected $pid; variable in dokuwiki\\plugin\\struct\\meta\\PageMeta 18 public function __construct($pid) argument 23 $this->pid = $pid; 41 $sql = "SELECT pid, title, lasteditor, lastrev, lastsummary FROM titles WHERE pid = ?"; 42 $data = $this->sqlite->queryRecord($sql, [$this->pid]); 51 $sql = "REPLACE INTO titles (pid, title, lasteditor, lastrev, lastsummary) VALUES (?,?,?,?,?)"; 52 $this->sqlite->query($sql, [$this->pid, $this->title, $this->lasteditor, $this->lastrev, $this->lastsummary]); 64 $title = noNS($this->pid); [all...] |
/plugin/struct/script/ |
H A D | AggregationEditor.js | 29 const pid = $me.data('pid'); 42 if (rid && pid && disableDeleteSerial) { 98 // if page id needs to be passed to backend, add pid 102 name: 'pid',
|
H A D | InlineEditor.js | 12 var pid = $self.parent().data('pid'); 17 if ((!pid && !rid) || !field) return; 25 $form.append(jQuery('<input type="hidden" name="pid">').val(pid)); 39 pid: pid, 101 pid: pid
|
/plugin/struct/action/ |
H A D | bureaucracy.php | 112 foreach ($value as $pid) { 115 // lookups can reference pages or global data, so check both pid and rid 116 // make sure not to double decode pid! 117 $originalPid = $pid; 119 $pid = json_decode($pid, null, 512)[0] ?? $pid; 121 if (($pid && $pids[$i] === $pid) || ($rid && $rids[$i] === $rid)) { 122 $field->opt['struct_pids'][] = $pid; [all...] |
H A D | inline.php | 34 protected $pid = ''; 88 // only check page permissions for data with pid, skip for global data 89 if ($this->pid && auth_quickaclcheck($this->pid) < AUTH_EDIT) return; 90 if (checklock($this->pid)) return; 93 lock($this->pid); 131 $tables = $assignments->getPageAssignments($this->pid, true); 155 $revision = helper_plugin_struct::createPageRevision($this->pid, 'inline edit'); 156 p_get_metadata($this->pid); // reparse the metadata of the page top update the titles/rev/lasteditor table 167 $this->pid, 31 protected $pid = ''; global() variable in action_plugin_struct_inline [all...] |
H A D | migration.php | 103 // update pid definitions 104 $sql = preg_replace('/pid (\w* ?NOT NULL|\w* ?PRIMARY KEY)/', 'pid TEXT DEFAULT ""', $sql); 111 $sql = str_replace(')', ', rid INTEGER, PRIMARY KEY(pid,rid) )', $sql); 134 // transfer pid to rid 135 $s = sprintf('INSERT INTO data_%s SELECT *, pid FROM temp_data_%s', $name, $name); 139 $s = sprintf('INSERT INTO multi_%s SELECT *, pid FROM temp_multi_%s', $name, $name); 144 $s = "UPDATE data_$name SET pid = ''"; 148 $s = "UPDATE multi_$name SET pid = ''"; 232 * was always ["", <previous-pid [all...] |
H A D | aggregationeditor.php | 33 protected $pid = ''; 125 $this->pid = $INPUT->str('pid'); 141 $this->pid, 228 if ($this->pid) { 229 return AccessTable::getSerialAccess($tablename, $this->pid, $this->rid); 243 if ($this->pid) { 244 $config['filter'][] = ['%pageid%', '=', $this->pid, 'AND']; 30 protected $pid = ''; global() variable in action_plugin_struct_aggregationeditor
|