Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d5672034
Commit
d5672034
authored
Jan 28, 2015
by
Aaron Wells
Browse files
Removing temp edit file
Change-Id: I4349d8c2816a1bec3b01121a6f2ae165add4477c
parent
0754001d
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/blocktype/taggedposts/db/upgrade.php~
deleted
100644 → 0
View file @
0754001d
<?php
/**
*
* @package mahara
* @subpackage artefact-internal
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
defined
(
'INTERNAL'
)
||
die
();
function
xmldb_artefact_blog_upgrade
(
$oldversion
=
0
)
{
if
(
$oldversion
<
2008101602
)
{
$table
=
new
XMLDBTable
(
'artefact_blog_blogpost_file_pending'
);
$table
->
addFieldInfo
(
'id'
,
XMLDB_TYPE_INTEGER
,
10
,
XMLDB_UNSIGNED
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
,
null
,
null
,
null
);
$table
->
addFieldInfo
(
'oldextension'
,
XMLDB_TYPE_TEXT
,
null
);
$table
->
addFieldInfo
(
'filetype'
,
XMLDB_TYPE_TEXT
,
null
);
$table
->
addKeyInfo
(
'primary'
,
XMLDB_KEY_PRIMARY
,
array
(
'id'
));
create_table
(
$table
);
}
if
(
$oldversion
<
2009033100
)
{
$bloguploadbase
=
get_config
(
'dataroot'
)
.
'artefact/blog/uploads/'
;
if
(
is_dir
(
$bloguploadbase
))
{
if
(
$basedir
=
opendir
(
$bloguploadbase
))
{
while
(
false
!==
(
$sessionupload
=
readdir
(
$basedir
)))
{
if
(
$sessionupload
!=
"."
&&
$sessionupload
!=
".."
)
{
$sessionupload
=
$bloguploadbase
.
$sessionupload
;
$subdir
=
opendir
(
$sessionupload
);
while
(
false
!==
(
$uploadfile
=
readdir
(
$subdir
)))
{
if
(
$uploadfile
!=
"."
&&
$uploadfile
!=
".."
)
{
$uploadfile
=
$sessionupload
.
'/'
.
$uploadfile
;
unlink
(
$uploadfile
);
}
}
closedir
(
$subdir
);
rmdir
(
$sessionupload
);
}
}
}
@
rmdir
(
$bloguploadbase
);
}
}
if
(
$oldversion
<
2009081800
)
{
$subscription
=
(
object
)
array
(
'plugin'
=>
'blog'
,
'event'
=>
'createuser'
,
'callfunction'
=>
'create_default_blog'
);
ensure_record_exists
(
'artefact_event_subscription'
,
$subscription
,
$subscription
);
}
if
(
$oldversion
<
2011091400
)
{
delete_records
(
'artefact_cron'
,
'plugin'
,
'blog'
,
'callfunction'
,
'clean_post_files'
);
}
return
true
;
}
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