Jeremy D commited on 2011-11-06 15:37:49
Showing 1 changed files, with 16 additions and 0 deletions.
... | ... |
@@ -31,6 +31,7 @@ ini_set('display_errors', 1); |
31 | 31 |
* @TODO Known Bugs |
32 | 32 |
* Converting categories doesn't sort them properly for which category they existed. |
33 | 33 |
* Converting versions doesn't work when repeated due to the data existing in builds already and is skipped. Step 0 anyone? |
34 |
+* Doesn't add the default wiki pages upon creating a project. |
|
34 | 35 |
*/ |
35 | 36 |
|
36 | 37 |
class tbg_converter |
... | ... |
@@ -659,6 +660,21 @@ class mbt_to_tbg extends tbg_converter |
659 | 660 |
INSERT INTO ' . $this->tbg_db_prefix . 'projects (id, name, locked, description) |
660 | 661 |
VALUES (' . $row['id'] . ', "' . $row['name'] . '", ' . $row['locked'] . ', "' . $row['description'] . '")'); |
661 | 662 |
|
663 |
+ // Add the default permissions. |
|
664 |
+ $this->tbg_db->query(' |
|
665 |
+ INSERT INTO ' . $this->tbg_db_prefix . 'permissions (permission_type, target_id, allowed, module, uid, gid, tid, scope) VALUES |
|
666 |
+ ("canseeproject", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
667 |
+ ("canseeprojecthierarchy", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
668 |
+ ("canmanageproject", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
669 |
+ ("page_project_allpages_access", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
670 |
+ ("canvoteforissues", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
671 |
+ ("canlockandeditlockedissues", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
672 |
+ ("cancreateandeditissues", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
673 |
+ ("caneditissue", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
674 |
+ ("caneditissuecustomfields", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
675 |
+ ("canaddextrainformationtoissues", " . $row["id"] . ", 1, "core", 1, 0, 0, 1), |
|
676 |
+ ("canpostseeandeditallcomments", " . $row["id"] . ", 1, "core", 1, 0, 0, 1)'); |
|
677 |
+ |
|
662 | 678 |
++$i; |
663 | 679 |
} |
664 | 680 |
|
665 | 681 |