Squiz Matrix Script Index

Last Updated: 20 Sep 2017

This chapter lists an index of the scripts that are provided within Squiz Matrix, categorised by their root directory within the system.

Bookmarks

Scripts within Squiz Matrix should be run by an appropriate user that satisfies the required permissions of the script action. For example, scripts that write to the /data/ or /cache/ directories would usually need to be run by the system's apache user (apache/www-data).

Scripts in The /scripts/ Directory

The following script are located in the /scripts/ root directory within Squiz Matrix. These scripts are predominately used to perform general administrative tasks.

ScriptDescription
add_remove_url.php   Adds or removes a URL from a Site asset and its children or the Designs, Media and Users system folders.    
add_user_own_access.php     Ensures that each user in the system has permissions to access their Squiz Matrix user asset and is provided as a fail safe measure in case the permissions have become corrupted.    
asset_listing_change_metadata_sort_option.php   Generates the SQL queries needed to change the metadata sorting options from raw to presentation or vice versa for an Asset Listing page.
backup.sh   Backs up all files and database data from your Squiz Matrix installation to a single tar.gz file.  
clean_old_shadow_links.php Clean links to shadow assets in the system that are no longer valid 
dejavu_management.php   Enables or disables the Deja Vu Memcache extension on your system.  
generate_ssh_key.phpGenerates a SSH Key that can be used on external services supporting SSH Key authorisation, such as the Git File Bridge.
get_design_area_setable_attrs.php   Prints out the names of all the settable attributes of all the design areas in the Squiz Matrix system, along with their descriptions.  
hipo_management.php   Displays any HIPO Jobs currently running on the system, allowing you to manage jobs that may have stalled.  
indent_list_to_xml.php   Takes a text file containing a list of indented items, and converts it into a Thesaurus XML import file.  
matrixsqlclient.php   Initiates an interactive database terminal in PHP to run commands against Oracle databases and can be used an alternative to SQL*Plus.  
migrate_metadata_text_to_multiple_text.php   Converts metadata content on a group of specified assets from metadata text fields to multiple text fields, splitting single entries by the  specified delimiter.  
move_assets.php   Moves all assets of a single type from one specified folder to another.  
move_assets_to_dated_folders.php   Moves all assets of a single type into a dated folder structure.  
morph_assets.phpMorphs an asset from one asset type to another.
permission_change.php   Changes the Permissions of an asset with the option to cascade the permission change to child assets.  
publish_static_content.php   Publishes the static content of specified assets to a set directory in the system.  
purge_trash.php   Purges the trash within the system.  
recreate_link_tree.php   Regenerates the link tree in the database for all assets.  
recreate_rollback_triggers.php   Regenerates the Rollback triggers in the database and may be required during upgrades.  
regenerate_file_systems.php Regenerates the asset file contents within the system, including metadata, design and bodycopy content files.
regenerate_treeids_for_triggers.php   Regenerates the ids in the database for all triggers.  
regen_metadata_by_root_nodes.php   Takes an argument of a list of root nodes separated by commas and regenerates  the metadata for the child assets of each root node.  
regen_metadata_schemas.php   Regenerates the Metadata Schemas from the command line.  
regen_system_assets_config.php   Generates the system assets config for installed systems.  
remove_assets_of_type.php   Removes all assets of the specified type from your Squiz Matrix system.  
remove_asset_type.php   Removes all assets of the specified type, and then removes the asset type itself from your Matrix system.  
remove_form_submission.php   Removes all form submissions created between two specified dates.  
remove_internal_message.php   Removes internal messages from the Squiz Matrix system, allowing you to specify the time period, source, destination, type and Status of messages to remove.  
remove_old_cron_jobs.php   Removes any Cron jobs that were scheduled to run more than a week ago.  
replace_text.php   Runs the WYSIWYG Editor's Replace Text plugin on the editable content of a specified set of root nodes.  
replace_url.php   Changes the base URL associated with a Site or a system folder.  
reset_root_password.php   Resets the system's root password to root.  
rollback_management.php   Manages Rollback and is used to enable Rollback if you did not enable Rollback during installation.  
session_cleanup.sh   Clears stale session files on the system.  
set_files_unrestricted.php   Sets all files underneath a certain root node to either restricted or unrestricted.  
shrink_matrix_file_assets.phpReduces the space taken up by file assets on the file system for Squiz Matrix systems installed on versions lower than 5.3.2.0.
status_change.php   Changes the status of an asset with the option to cascade the status change to child assets.  
system_apply_metadata_schema.php Applies a Metadata Schema to a set of specified assets and their children.
system_apply_permissions.php Applies permissions to a set of specified assets and their children.
system_check.php   Checks and identifies system integrity issues and reports back on any known inconsistencies in the system.  
system_integrity_check_indexes.php   Checks the Squiz Matrix database for any missing indexes. If missing indexes are found, this script will print an SQL query to run.  
system_integrity_check_links.php   Checks that all hyperlinks to another asset (referenced as ./?a=xx) inside a WYSIWYG Editor (for example, a Standard Page) link to an existing asset.  
system_integrity_clean_cache_dir.php   Deletes any expired cache files in the cache directory of Squiz Matrix.  
system_integrity_clean_old_files.php   Checks for, and optionally deletes, files in the data directory that do not belong to an asset any more (orphaned files).  
system_integrity_content_links.php   Verifies and updates asset NOTICE links for images or files in Bodycopy contents.  
system_integrity_deleted_user_perms.php   Deletes permissions that exist for deleted or non-existent users.  
system_integrity_fix_char_encoding.php   Replaces all non-utf8 smart quote chars by their respective regular counterpart chars. If a string is still invalid, this script will perform charset conversion on the string.  
system_integrity_fix_public_files.php Evaluate and fixes the files on the public data directory, updating any out-of-date files, creating any missing files and removing any files that are private or should not be in the directory.
system_integrity_fix_sort_orders.php   Verifies and corrects the asset sort order in the database.  
system_integrity_foreign_keys.php   Reports on the integrity of foreign keys within a Squiz Matrix database.  
system_integrity_form_submissions.php   Ensures that form submissions only appear under their associated form assets.  
system_integrity_incomplete_attachments.php    Checks for and/or delete any temporary incomplete attachments that were not automatically removed from the Squiz Matrix file system
system_integrity_inconsistent_workflow_status.php Detect and fix assets with a status that is inconsistent with its current workflow statuses.
system_integrity_internal_links.php   Ensures all links to assets in the system in bodycopy contents are using the internal format of (./?a=xxx).  
system_integrity_invalid_links.php Finds and links orphaned assets (i.e. ones with no links to them) underneath a specified asset ID, which should preferably be a folder.
system_integrity_orphaned_assets.php   Finds and links orphaned assets (i.e. ones with no links to them) underneath a specified asset ID, which should preferably be a folder.  
system_integrity_recover_file_versions.php   Recover incorrect file versioning entries in Squiz Matrix.  
system_integrity_run_tidy.php Runs HTML Tidy across all WYSIWYG Editor cells in a system, or under a particular asset.  
system_move_update.php A simple script to be run after the system root path name has been changed, for example when restoring from a backup or migrating your Squiz Matrix installation to a new server.  
system_parse_design.php Re-parses a specified Design asset.  
system_parse_designs.php Re-parses all the Designs in your Squiz Matrix system.  
system_update_lookups.php Refreshes the lookups (Web Paths and Designs) on all the Sites in the system (and their children).  
system_virus_scan.php Runs the system Virus Checker and removes any found viruses.  
system_reimport_content.php Re-imports content into a database. Most useful in cases where a database was not originally set up with the correct character set
tool_export_form_submission_logs.php Exports the form submissions of a Custom Form asset to a CSV file.
upgrade_form_submission_linking.php  Moves Custom Form submissions under their designated Submissions folder (requirement when upgrading to v3.14)  
upgrade_future_trigger_actions.php  Converts any Set Future Permissions and Status Trigger Actions   present in Trigger assets (requirement when upgrading to v3.20.2)  
upgrade_of_funnelback_binary_to_9_1.php     Upgrades the Funnelback binaries to 9.1 OEM (requirement when upgrading to v3.28.6).  
upgrade_session_expiry_preferences.php  Convert existing Global and User Group Session Expiry Rules to multiple-rule format (requirement when upgrading to v3.20.1).  
upgrade_ecom_keyword_total_item_price.phpConverts E-Commerce keyword %total_item_price% to %total_item_price_excl_tax%. 

Advanced Scripts in the /scripts/ Directory

The following script are located in the /scripts/ root directory within Squiz Matrix. These scripts are used to perform more advanced administrative tasks.

ScriptDescription
clean_oven.sh   Cleans the following directories: core/lib/DAL/Oven/ and core/lib/DAL/QueryStore.  
convert_database.php  Converts a database from postgres to oracle / oracle to postgres.  
delete_assets_by_id.php  Move assets specified by ID to Trash. If an asset is linked under multiple parents only one link will be moved and there is no way to control which link that will be.

This script has been marked as deprecated and it is not recommended to use this on production instances of Matrix. It has been removed from the code base as of version 5.4.3.0.

rebake.php  Rebakes the DAL queries for installed assets/packages.  
run_cron_job.php     Runs a specified Cron job.    

Scripts in the /scripts/import Directory

The following script are located in the /scripts/import directory within Squiz Matrix. These scripts are used to perform import and creation tasks.

ScriptDescription
convert_fonz_for_import.php  Forms a valid Thesaurus XML file from a Comma-Separated Values file (CSV) - Functions of New Zealand (FONZ) thesaurus standard.    
create_pages.php     Mass creates assets, using a Comma-Separated Values file (CSV) containing page data.  
csv_to_html_tree.php     Takes a Comma-Separated Values file (CSV) and converts it to a tree represented by html headings.  
csv_to_xml_actions.php     Creates an import XML file from a Comma-Separated Values file (CSV) and an XML metadata mapping file.  
export_to_xml.php     Takes an asset and all its children, and exports its details to an XML file, able to be used with the import_from_xml.php script.  
import_asset_csv_to_matrix.php     Can be used to import a CSV file containing asset attributes and metadata values into Squiz Matrix to add, edit or delete an asset.  
import_files.php     Uploads files sitting on the server. These include MS Word documents, PDFs, images etc.  
import_folder_structure.php     Creates Folders in the Squiz Matrix system based on directories in the file system.  
import_from_xml.php     Performs actions passed to it in the form of an import script (this can  include the creation of assets, setting metadata, or any other action  that are available when creating a trigger).  
import_quiz_from_xml.php Imports Online Quiz Multiple Choice Questions and Question Groups from an XML file.
update_asset_titles.php     Changes the title attribute on a group of assets (for example file  assets), specified in a header-less Comma-Separated Values (CSV) file.  

Scripts in the /scripts/locale Directory

The following script are located in the /scripts/locale directory within Squiz Matrix. These scripts are used to manage locale data within the system.

ScriptDescription
locale_backup.php     Gathers locale information stored underneath each asset and package, to assist with the process of translating the interface and error messages to different languages.  
locale_restore.php   Takes all the locale string data generated by locale_backup.php and reintegrates it with your installation.  

Package Scripts

The following script are package specified scripts located in the various locations within Squiz Matrix. These scripts are used to manage different package-specific tasks.

ScriptDescription
ldap_change_dn.php     Updates the DN of an old LDAP user to point to a new LDAP user.  
reindexSearchIndex.php   Re-indexes the assets within Squiz Matrix on either a root node or system wide basis.  
reset_bulkmail_job.php     Prepares a Bulkmail Job to be resent - changes its Status from Live to Under Construction.  
run.php Runs the Bulk Mailer, dispatching the Bulkmail Jobs.  
schedule_bulkmail_job.php   Schedules a Bulkmail Job to be run immediately.  
import_files_from_bridge.php   Imports the files exposed by a File Bridge asset into Squiz Matrix.  
check_funnelback_setup.php  Checks the setup of the Funnelback system.  
funnelback_rebuild_cache.php Rebuilds the cache for a set of assets (or system-wide).  
funnelback_reindex.php Indexes a specified set of assets (or system-wide).  
give_funnelback_permission.php Applies Write permission on a set of assets for a specified user.  
upgrade_suiteid.php(Funnelback) Updates the  db table information on  Funnelback Search Pages in the system (run during Matrix's Automatic Upgrade procedure).
upgrade_suiteid.php(Squiz Suite) Updates the IDs on the Squiz Suite db table (run during Matrix's Automatic Upgrade procedure).

Install Scripts

The following scripts are used during Squiz Matrix's installation process. These scripts are located in the system's /install directory.

ScriptDescription
check_requirements.php   Verifies the program requirements of a Squiz Matrix installation against your server configuration.  
generate_install_key.php  Generates an install key for the system.  
step_01.php  Creates the main system configuration file during installation.  
step_02.php  Initialises the Squiz Matrix database schema, creating database tables, views, functions and sequences.  
step_03.php  Installs the various asset types on the system, including certain system assets.  
update_squiz_logo_login_design.php  Updates the Squiz Matrix logo in login designs (requirement when upgrading to v4.0).  

Additional Scripts

The following additional scripts are also available for use within Squiz Matrix.

ScriptDescription
matrix_upgrade.php     Automatically upgrades your system from one version to another. Please note that automatic updates are only available to users who have an update subscription.

Previous Chapter Next Chapter