Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Gieling <github@dartcafe.de>2019-12-02 00:12:37 +0300
committerGitHub <noreply@github.com>2019-12-02 00:12:37 +0300
commit5b7165b7aae6948c499cb70935c4d9caf4f41e19 (patch)
tree175791231096a1f7b055a576dd84035d304e36ff /lib/Migration
parentaf237c8ba29f6cf1480e8754304c34436916cdce (diff)
Public page (#664)
* adding acl * changing share db and migration (hash becomes token) * View public vote * Refactoring anonymizer * some more refactoring * nearly finished public voting * updated dependencies * linter autofixes
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version0009Date20181125061900.php2
-rw-r--r--lib/Migration/Version0010Date20190801063812.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Migration/Version0009Date20181125061900.php b/lib/Migration/Version0009Date20181125061900.php
index 4c967391..20462e1c 100644
--- a/lib/Migration/Version0009Date20181125061900.php
+++ b/lib/Migration/Version0009Date20181125061900.php
@@ -71,7 +71,7 @@ class Version0009Date20181125061900 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
]);
- $table->addColumn('hash', Type::STRING, [
+ $table->addColumn('token', Type::STRING, [
'notnull' => false,
'length' => 64,
]);
diff --git a/lib/Migration/Version0010Date20190801063812.php b/lib/Migration/Version0010Date20190801063812.php
index acd374db..a334e056 100644
--- a/lib/Migration/Version0010Date20190801063812.php
+++ b/lib/Migration/Version0010Date20190801063812.php
@@ -71,7 +71,7 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
]);
- $table->addColumn('hash', Type::STRING, [
+ $table->addColumn('token', Type::STRING, [
'notnull' => true,
'length' => 64,
]);
@@ -108,18 +108,18 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
$schema = $schemaClosure();
if ($schema->hasTable('polls_share')) {
- $this->copyHashes();
+ $this->copyTokens();
}
}
/**
* Copy date options
*/
- protected function copyHashes() {
+ protected function copyTokens() {
$insert = $this->connection->getQueryBuilder();
$insert->insert('polls_share')
->values([
- 'hash' => $insert->createParameter('hash'),
+ 'token' => $insert->createParameter('token'),
'type' => $insert->createParameter('type'),
'poll_id' => $insert->createParameter('poll_id'),
'user_id' => $insert->createParameter('user_id'),
@@ -132,7 +132,7 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
while ($row = $result->fetch()) {
if ($row['access'] == 'public') {
$insert
- ->setParameter('hash', $row['hash'])
+ ->setParameter('token', $row['hash'])
->setParameter('type', $row['access'])
->setParameter('poll_id', $row['id'])
->setParameter('user_id', null)