Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
c29491c6
Commit
c29491c6
authored
Mar 22, 2010
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add allowcomments column to view and artefact tables
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
cb2f88fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
htdocs/lib/db/install.xml
htdocs/lib/db/install.xml
+2
-0
htdocs/lib/db/upgrade.php
htdocs/lib/db/upgrade.php
+7
-0
No files found.
htdocs/lib/db/install.xml
View file @
c29491c6
...
...
@@ -333,6 +333,7 @@
<FIELD
NAME=
"note"
TYPE=
"text"
NOTNULL=
"false"
/>
<FIELD
NAME=
"author"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"false"
/>
<FIELD
NAME=
"authorname"
TYPE=
"text"
NOTNULL=
"false"
/>
<FIELD
NAME=
"allowcomments"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"0"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
@@ -580,6 +581,7 @@
<FIELD
NAME=
"template"
TYPE=
"int"
LENGTH=
"1"
DEFAULT=
"0"
NOTNULL=
"true"
/>
<FIELD
NAME=
"copynewuser"
TYPE=
"int"
LENGTH=
"1"
DEFAULT=
"0"
NOTNULL=
"true"
/>
<FIELD
NAME=
"type"
TYPE=
"char"
LENGTH=
"50"
NOTNULL=
"true"
/>
<FIELD
NAME=
"allowcomments"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"1"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
htdocs/lib/db/upgrade.php
View file @
c29491c6
...
...
@@ -1401,9 +1401,16 @@ function xmldb_core_upgrade($oldversion=0) {
(author IS NULL AND authorname IS NOT NULL)
)'
);
// Install the comment artefact
if
(
$data
=
check_upgrades
(
'artefact.comment'
))
{
upgrade_plugin
(
$data
);
}
// Flag all views & artefacts to enable/disable comments
table_column
(
'artefact'
,
null
,
'allowcomments'
,
'integer'
,
1
);
table_column
(
'view'
,
null
,
'allowcomments'
,
'integer'
,
1
,
null
,
1
);
// Initially allow comments on blogposts, images, files
set_field_select
(
'artefact'
,
'allowcomments'
,
1
,
'artefacttype IN (?,?,?)'
,
array
(
'blogpost'
,
'image'
,
'file'
));
}
return
$status
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment