UPDATEDATABASE
Update the database as required
version | 1 |
---|---|
package | wikindx4\core\startup |
author | Mark Grimshaw |
__construct()
addMissingRows()
checkConfigTable()
checkDatabase()
Here, 1/ we check we have tables, if not, populate the database with tables and set defaults in database_summary and category table and 2/ populate the config table displaying configuration interface if necessary If no admins yet exist, ask for admin configuration to force the input of at least one admin username/password.
checkStatus(string $stage)
string
close(string $pString)
string
confirmUpdateDisplay()
continueExecution()
fixUTF8()
pauseExecution(string $function, string $finished, string $table)
string
string
string
Default is FALSE
populateTables()
recreate40Cache()
rewriteBibliographiesGroups()
rewriteResourceCategory()
rewriteResourceCreator()
In v4, we no longer use MySQL's FIND_IN_SET and therefore no longer want comma-delimited field values such as creator1, creator2 etc. in the resource_creator table. Write a new resource_creator table that has a row comprising: resourceId references resource table), creatorId (references creator table), role (creator1, creator2 etc.) and order (1,2, 3 etc. for first author, second author, third author etc.) resourcecreatorCreatorMain is the creatorId that is the main creator for that resource used when ordering lists.
rewriteResourceKeyword()
rewriteResourceSummary()
rowExists()
Row must be returned as evidence of prior configuration.
setToUtf8()
stage4_1__1()
stage4_1__10()
stage4_1__11()
stage4_1__12()
stage4_1__13()
convert bbcode to html for use with tinymce and correct transTitle errors
stage4_1__14()
stage4_1__15()
stage4_1__2()
stage4_1__3()
stage4_1__4()
stage4_1__5()
stage4_1__6()
stage4_1__7()
stage4_1__8()
stage4_1__9()
stage4_2__1()
swapNumPages()
updateDatabase(boolean $confirm) : boolean
boolean
boolean
upgrade40CheckForValidUtf8(string $basicTable, array $fields)
If invalid code found, store value in array for updating to database after UTF8 upgrade
string
array
upgrade40CheckForValidUtf8Old(string $basicTable, array $fields)
If invalid code found, store value in array for updating to database after UTF8 upgrade NOT USED
string
array
upgrade40CorrectBackSlash()
upgrade40CreateResourceAttachments()
Delete attachment rows if attachments don't exist.
upgrade40CreateResourceText()
upgrade40CreateSubcategory()
upgrade40Nulls()
upgrade40RemoveDupCollections()
upgrade40RemoveDupCreators()
upgrade40Rename()
upgrade40StoreProcedure()
NOT USED
upgrade40Tables(string $tableContinue)
string
Default is FALSE
upgrade40charToBin(string $table)
string
Default is FALSE
upgrade41()
Start with stage1();
upgradeResourceTitle()
$config
$db
$errors
$html
$numStages
$oldTime
$session
$stageInterruptMessage
$statusString
$tables
$utf8