Open Monograph Press  3.3.0
Upgrade Class Reference
Inheritance diagram for Upgrade:
Installer

Public Member Functions

 __construct ($params, $installFile='upgrade.xml', $isPlugin=false)
 
 changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit ()
 
 convertCommentsToEditor ()
 
 convertQueries ()
 
 enableDefaultTheme ()
 
 fixAuthorSettings ()
 
 fixFilenames ($upgrade, $params, $dryrun=false)
 
 fixQueriesAssocTypes ()
 
 htmlifyEmailTemplates ()
 
 isUpgrade ()
 
 migrateStaticPagesToNavigationMenuItems ()
 
 migrateSubmissionCoverImages ()
 
 migrateUserAndAuthorNames ()
 
 syncSeriesAssocType ()
 
- Public Member Functions inherited from Installer
 abort ($installer, $attr)
 
 addInstallAction ($node)
 
 addPluginVersions ()
 
 checkPhpVersion ()
 
 clearDataCache ()
 
 columnExists ($tableName, $columnName)
 
 destroy ()
 
 execute ()
 
 executeAction ($action)
 
 executeInstaller ()
 
 executeSQL ($sql)
 
 fixLibraryFiles ()
 
 getConfigContents ()
 
 getCurrentVersion ()
 
 getErrorMsg ()
 
 getErrorString ()
 
 getErrorType ()
 
 getNewVersion ()
 
 getNotes ()
 
 getParam ($name)
 
 getSQL ()
 
 installDefaultNavigationMenus ()
 
 installEmailTemplate ($installer, $attr)
 
 installFilterConfig ($filterConfigFile)
 
 log ($message)
 
 migrateMetadataSettings ()
 
 migrateSidebarBlocks ()
 
 migrateSiteLocales ()
 
 parseInstaller ()
 
 parseInstallNodes ($installTree)
 
 postInstall ()
 
 preInstall ()
 
 setCurrentVersion ($version)
 
 setError ($type, $msg)
 
 setLogger ($logger)
 
 setStatsEmailSettings ()
 
 tableExists ($tableName)
 
 updateConfig ($configParams)
 
 updateVersion ()
 
 wroteConfig ()
 

Additional Inherited Members

- Data Fields inherited from Installer
 $actions
 
 $configContents
 
 $currentVersion
 
 $dataXMLParser
 
 $dbconn
 
 $descriptor
 
 $errorMsg
 
 $errorType
 
 $installedLocales
 
 $isPlugin
 
 $locale
 
 $logger
 
 $migrations = []
 
 $newVersion
 
 $notes
 
 $params
 
 $sql
 
 $wroteConfig
 

Detailed Description

Perform system upgrade.

Definition at line 19 of file Upgrade.inc.php.

Constructor & Destructor Documentation

◆ __construct()

Upgrade::__construct (   $params,
  $installFile = 'upgrade.xml',
  $isPlugin = false 
)

Constructor.

Parameters
$paramsarray upgrade parameters

Reimplemented from Installer.

Definition at line 25 of file Upgrade.inc.php.

References Installer\$isPlugin, and Installer\$params.

Member Function Documentation

◆ changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit()

Upgrade::changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit ( )

Update permit_metadata_edit and can_change_metadata for user_groups and stage_assignments tables.

Returns
boolean True indicates success.

Definition at line 696 of file Upgrade.inc.php.

References fatalError(), DAORegistry\getDAO(), and UserGroupDAO\getNotChangeMetadataEditPermissionRoles().

◆ convertCommentsToEditor()

Upgrade::convertCommentsToEditor ( )

Convert comments to editors to queries.

Returns
boolean True indicates success.

Definition at line 435 of file Upgrade.inc.php.

References DAORegistry\getDAO(), and PKPString\stripUnsafeHtml().

◆ convertQueries()

Upgrade::convertQueries ( )

Convert signoffs to queries.

Returns
boolean True indicates success.

Definition at line 263 of file Upgrade.inc.php.

References DAORegistry\getDAO().

◆ enableDefaultTheme()

Upgrade::enableDefaultTheme ( )

Enable the default theme plugin for versions < 1.1.

Returns
boolean

Definition at line 106 of file Upgrade.inc.php.

References DAORegistry\getDAO().

◆ fixAuthorSettings()

Upgrade::fixAuthorSettings ( )

Fix incorrectly stored author settings. (See bug #8663.)

Returns
boolean

Definition at line 154 of file Upgrade.inc.php.

References Installer\$locale, and DAORegistry\getDAO().

◆ fixFilenames()

Upgrade::fixFilenames (   $upgrade,
  $params,
  $dryrun = false 
)

Fix broken submission filenames (bug #8461)

Parameters
$upgradeUpgrade
$paramsarray
$dryrunboolean True iff only a dry run (displaying rather than executing changes) should be done.
Returns
boolean

Definition at line 50 of file Upgrade.inc.php.

References DAORegistry\getDAO(), and strtolower_codesafe().

Referenced by fixFilenames\execute().

◆ fixQueriesAssocTypes()

Upgrade::fixQueriesAssocTypes ( )

The assoc_type = ASSOC_TYPE_REPRESENTATION (from SIGNOFF_PROOFING migration) should be changed to assoc_type = ASSOC_TYPE_SUBMISSION, for queries to be displayed in the production discussions list. After changing this, the submission queries should be resequenced, in their order in the DB table.

Returns
boolean True indicates success.

Definition at line 390 of file Upgrade.inc.php.

References DAORegistry\getDAO().

◆ htmlifyEmailTemplates()

Upgrade::htmlifyEmailTemplates ( )

Convert email templates to HTML.

Returns
boolean True indicates success.

Definition at line 196 of file Upgrade.inc.php.

References DAORegistry\getDAO().

◆ isUpgrade()

Upgrade::isUpgrade ( )

Returns true iff this is an upgrade process.

Returns
boolean

Reimplemented from Installer.

Definition at line 34 of file Upgrade.inc.php.

◆ migrateStaticPagesToNavigationMenuItems()

Upgrade::migrateStaticPagesToNavigationMenuItems ( )

If StaticPages table exists we should port the data as NMIs

Returns
boolean

Definition at line 557 of file Upgrade.inc.php.

References Application\getContextDAO(), DAORegistry\getDAO(), and Installer\tableExists().

◆ migrateSubmissionCoverImages()

Upgrade::migrateSubmissionCoverImages ( )

Update how submission cover images are stored

  1. Move the cover images into /public and rename them.
  2. Change the coverImage setting to a multilingual setting stored under the submission_settings table, which will be migrated to the publication_settings table once it is created.

Definition at line 732 of file Upgrade.inc.php.

References PKPServices\get(), and DAORegistry\getDAO().

◆ migrateUserAndAuthorNames()

Upgrade::migrateUserAndAuthorNames ( )

Migrate first and last user names as multilingual into the DB table user_settings.

Returns
boolean

Definition at line 587 of file Upgrade.inc.php.

References Installer\$locale, Installer\$params, fatalError(), DAORegistry\getDAO(), and PKPLocale\isLocaleWithFamilyFirst().

◆ syncSeriesAssocType()

Upgrade::syncSeriesAssocType ( )

Synchronize the ASSOC_TYPE_SERIES constant to ASSOC_TYPE_SECTION defined in PKPApplication.

Returns
boolean

Definition at line 125 of file Upgrade.inc.php.

References DAORegistry\getDAO().


The documentation for this class was generated from the following file: