[Easymod-cvs] easymod2/mods/easymod/em_includes em_schema.php,1.7,1.8
Status: Beta
Brought to you by:
wgeric
|
From: Jim W. <ter...@us...> - 2005-06-21 05:30:50
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29836/mods/easymod/em_includes Modified Files: em_schema.php Log Message: - Added some stuff to lang_easymod_english.php - Removed a line that was no longer needed for -=ET=-'s modification. Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** em_schema.php 11 Jun 2005 23:05:53 -0000 1.7 --- em_schema.php 21 Jun 2005 05:30:09 -0000 1.8 *************** *** 22,26 **** define('IN_PHPBB', 1); ! define('FATAL_ERROR_MSG', '<b>FATAL ERROR</b>: Unable to parse SQL statement; ') ; define('DB_TYPE', SQL_LAYER) ; /* --- 22,26 ---- define('IN_PHPBB', 1); ! define('FATAL_ERROR_MSG', $lang['EM_Unable_to_parse']) ; define('DB_TYPE', SQL_LAYER) ; /* *************** *** 73,77 **** if ( !strstr($param, ')')) { ! $error = FATAL_ERROR_MSG . "malformed type length in field near [$param]" ; return ; } --- 73,77 ---- if ( !strstr($param, ')')) { ! $error = FATAL_ERROR_MSG . $lang['EM_malformed_type'] . " [$param]" ; return ; } *************** *** 94,98 **** if ( strtoupper($param2) != 'NULL') { ! $error = FATAL_ERROR_MSG . "unmatched NOT in field near [$param1 $param2]" ; return '' ; } --- 94,98 ---- if ( strtoupper($param2) != 'NULL') { ! $error = FATAL_ERROR_MSG . $lang['EM_unmatched_NOT'] . " [$param1 $param2]" ; return '' ; } *************** *** 149,153 **** else { ! $error = FATAL_ERROR_MSG . "missing DEFAULT value in field near [$param]" ; return ; } --- 149,153 ---- else { ! $error = FATAL_ERROR_MSG . $lang['EM_missing_DEFAULT'] . " [$param]" ; return ; } *************** *** 221,225 **** if ( $numparams < 2) { ! $error = FATAL_ERROR_MSG . "not enough parameters to parse column." ; return ; } --- 221,225 ---- if ( $numparams < 2) { ! $error = FATAL_ERROR_MSG . $lang['EM_not_enough'] ; return ; } *************** *** 276,280 **** if ((strtoupper($name) == 'PRIMARY') && (!strstr(strtoupper($params[1]), 'KEY'))) { ! $error = FATAL_ERROR_MSG . 'improperly formated key' ; return ; } --- 276,280 ---- if ((strtoupper($name) == 'PRIMARY') && (!strstr(strtoupper($params[1]), 'KEY'))) { ! $error = FATAL_ERROR_MSG . $lang['EM_improper_key'] ; return ; } *************** *** 306,310 **** if ( $type == 'undefined') { ! $error = FATAL_ERROR_MSG . "type [" . $params[1] . "] invalid" ; // return ; } --- 306,310 ---- if ( $type == 'undefined') { ! $error = FATAL_ERROR_MSG . sprintf($lang['EM_type_invalid'],'[' . $params[1] . ']') ; // return ; } *************** *** 313,317 **** else if (($length != '') && (!is_numeric($length))) { ! $error = FATAL_ERROR_MSG . "length [$length] invalid" ; // return ; } --- 313,317 ---- else if (($length != '') && (!is_numeric($length))) { ! $error = FATAL_ERROR_MSG . sprintf($lang['EM_length_invalid'],"[$length]") ; // return ; } *************** *** 1059,1063 **** else { ! $error = FATAL_ERROR_MSG . "malformed DROP action [$param1][$param2]" ; return ; } --- 1059,1063 ---- else { ! $error = FATAL_ERROR_MSG . $lang['EM_malformed_DROP'] . " [$param1][$param2]" ; return ; } *************** *** 1069,1074 **** $line = trim($sql[0]) ; $sql = array() ; ! $sql[] = "ABORTED: [$line]<br /> Dropping a field in postgresql was not implemented. Contact Nuttzy if you know ! how to safely do this without having to drop the whole table." ; } --- 1069,1073 ---- $line = trim($sql[0]) ; $sql = array() ; ! $sql[] = sprintf($lang['EM_postgresql_ABORTED'],$line); } *************** *** 1161,1165 **** if ($target == '') { ! $error = FATAL_ERROR_MSG . 'malformed SQL, no target defined' ; } --- 1160,1164 ---- if ($target == '') { ! $error = FATAL_ERROR_MSG . $lang['EM_malformed_sql'] ; } *************** *** 1178,1182 **** if (($type != 'TABLE') && (($action != 'INSERT') && ($action != 'UPDATE'))) { ! $error = FATAL_ERROR_MSG . "type '$type' unknown." ; } --- 1177,1181 ---- if (($type != 'TABLE') && (($action != 'INSERT') && ($action != 'UPDATE'))) { ! $error = FATAL_ERROR_MSG . sprintf($lang['EM_type_unknown'],$type) ; } *************** *** 1227,1231 **** else { ! $error = FATAL_ERROR_MSG . "subaction '$subaction' unknown." ; } } --- 1226,1230 ---- else { ! $error = FATAL_ERROR_MSG . sprintf($lang['EM_subaction_unknown'],$subaction) ; } } *************** *** 1236,1240 **** if ( count($attributes) > 3) { ! $error = FATAL_ERROR_MSG . 'malformed DROP statement, too many attributes.' ; } $sql[] = "$action $type $target" ; --- 1235,1239 ---- if ( count($attributes) > 3) { ! $error = FATAL_ERROR_MSG . $lang['EM_malformed_DROP2'] ; } $sql[] = "$action $type $target" ; *************** *** 1264,1268 **** else { ! $error = FATAL_ERROR_MSG . "action '$action' unknown." ; } --- 1263,1267 ---- else { ! $error = FATAL_ERROR_MSG . sprintf($lang['EM_unknown_action'],$action) ; } *************** *** 1271,1275 **** if ($error != '') { ! $error .= "<br /><br />SQL Line:<br />$message" ; return ; } --- 1270,1274 ---- if ($error != '') { ! $error .= "<br /><br />".$lang['EM_SQL_line']."<br />$message" ; return ; } |