Commit 06e2572d authored by Carsten  Rose's avatar Carsten Rose
Browse files

Rename function.sql on various places.

parent 704c728e
Pipeline #1959 passed with stages
in 2 minutes and 41 seconds
......@@ -1793,10 +1793,11 @@ const HTTP_404_NOT_FOUND = '404 Not Found';
const HTTP_409_CONFLICT = '409 Conflict';
// update sql functions
const ACTION_FUNCTION_UPDATE = '_fupdate'; // get parameter to set the update behaviour of functions.sql
const ACTION_FUNCTION_UPDATE_NEXT_UPDATE = 'nextUpdate'; // functions.sql is updated at next qfq update
const ACTION_FUNCTION_UPDATE_NEVER = 'never'; // functions.sql is never updated
const ACTION_FUNCTION_UPDATE_NOT_PERFORMED = 'notUpdated'; // functions.sql update was skipped during last qfq update
const ACTION_FUNCTION_UPDATE = '_fupdate'; // get parameter to set the update behaviour of function.sql
const ACTION_FUNCTION_UPDATE_NEXT_UPDATE = 'nextUpdate'; // function.sql is updated at next qfq update
const ACTION_FUNCTION_UPDATE_NEVER = 'never'; // function.sql is never updated
const ACTION_FUNCTION_UPDATE_NOT_PERFORMED = 'notUpdated'; // function.sql update was skipped during last qfq update
const QFQ_VERSION_KEY_FUNCTION_HASH = 'functionHash';
const QFQ_VERSION_KEY_FUNCTION_VERSION = 'functionVersion';
const QFQ_VERSION_KEY = 'Version';
\ No newline at end of file
const QFQ_VERSION_KEY = 'Version';
const QFQ_FUNCTION_SQL = 'function.sql';
\ No newline at end of file
......@@ -187,8 +187,8 @@ class DatabaseUpdate {
$query = str_replace('%%FUNCTIONSHASH%%', $functionHash, $functionSql);
if (stripos($query, 'delimiter')) {
$errorMsg[ERROR_MESSAGE_TO_USER] = 'Error while updating qfq.';
$errorMsg[ERROR_MESSAGE_TO_DEVELOPER] = "Error in file functions.sql: The keyword DELIMITER is present " .
"in functions.sql, this usually leads to errors when trying to execute it on the database.";
$errorMsg[ERROR_MESSAGE_TO_DEVELOPER] = "Error in file " . QFQ_FUNCTION_SQL . ": The keyword DELIMITER is present " .
"in " . QFQ_FUNCTION_SQL . ", this usually leads to errors when trying to execute it on the database.";
throw new DbException(json_encode($errorMsg), ERROR_PLAY_SQL_FILE);
}
$this->db->playMultiQuery($query);
......@@ -202,13 +202,13 @@ class DatabaseUpdate {
} else {
$errorMsg[ERROR_MESSAGE_TO_USER] = 'Error while updating qfq.';
$errorMsg[ERROR_MESSAGE_TO_DEVELOPER] =
"Failed to play functions.sql, probably not enough permissions for the qfq mysql user. " .
"Failed to play " . QFQ_FUNCTION_SQL . ", probably not enough permissions for the qfq mysql user. " .
"Possible solutions: <ul>" .
'<li>Grant Super privilages to qfq mysql user temporarily.</li>' .
'<li>Play the following file manually on the database: ' .
'<a href="http://webwork16.math.uzh.ch/megger/qfq/typo3conf/ext/qfq/Source/sql/functions.sql">typo3conf/ext/qfq/Source/sql/functions.sql</a></li>' .
'<li><a href="?' . http_build_query(array_merge($_GET, array(ACTION_FUNCTION_UPDATE=>ACTION_FUNCTION_UPDATE_NEXT_UPDATE))) . '">Click here</a> to skip the sql functions update until next qfq release update</li>' .
'<li><a href="?' . http_build_query(array_merge($_GET, array(ACTION_FUNCTION_UPDATE=>ACTION_FUNCTION_UPDATE_NEVER))) . '">Click here</a> to skip the sql functions update forever</li>' .
'<a href="typo3conf/ext/qfq/Source/sql/' . QFQ_FUNCTION_SQL . '">typo3conf/ext/qfq/Source/sql/' . QFQ_FUNCTION_SQL . '</a></li>' .
'<li><a href="?' . http_build_query(array_merge($_GET, array(ACTION_FUNCTION_UPDATE => ACTION_FUNCTION_UPDATE_NEXT_UPDATE))) . '">Click here</a> to skip the sql functions update until next qfq release update</li>' .
'<li><a href="?' . http_build_query(array_merge($_GET, array(ACTION_FUNCTION_UPDATE => ACTION_FUNCTION_UPDATE_NEVER))) . '">Click here</a> to skip the sql functions update forever</li>' .
'</ul>' .
"To enable the sql functions update again you can delete the parameter 'functionsHash' in the table comments of the table 'Form'.";
$errorMsg[ERROR_MESSAGE_TO_DEVELOPER_SANITIZE] = false;
......
###
#
# GETFUNCTIONSHASH() is used for checking whether this file has been played properly in DatabaseUpdate.php
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment