mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-24 13:40:29 +01:00
module_creator improvement on column headers and findcols
This commit is contained in:
parent
2ffee66e00
commit
cb8b2487d7
@ -17,6 +17,8 @@
|
||||
* PLACEHOLDER_GET_INPUT
|
||||
* PLACEHOLDER_SET_INPUT
|
||||
* PLACEHOLDER_COLUMNS
|
||||
* PLACEHOLDER_ID_COLUMN
|
||||
* PLACEHOLDER_HEADERS
|
||||
* PLACEHOLDER_SET_TPL
|
||||
*/
|
||||
|
||||
@ -164,6 +166,7 @@ if ($argc >= 2) {
|
||||
// Create php file
|
||||
|
||||
$list_of_columns = implode(', ', $columns);
|
||||
$list_of_columns_headers_in_quotes = "'" . implode('\', \'', array_map('ucfirst',$columns)) . "'";
|
||||
$list_of_columns_in_quotes = "'" . implode('\', \'', $columns) . "'";
|
||||
$sql_list_of_columns = implode(', ', $sql_columns);
|
||||
$sql_list_of_columns_in_quotes = "'" . implode('\', \'', $sql_columns) . "'";
|
||||
@ -194,6 +197,8 @@ if ($argc >= 2) {
|
||||
$php_file_contents = str_replace('PLACEHOLDER_GET_INPUT', $get_input, $php_file_contents);
|
||||
$php_file_contents = str_replace('PLACEHOLDER_SET_INPUT', $set_input, $php_file_contents);
|
||||
$php_file_contents = str_replace('PLACEHOLDER_COLUMNS', $list_of_columns_in_quotes, $php_file_contents);
|
||||
$php_file_contents = str_replace('PLACEHOLDER_ID_COLUMN', $table_short_name.".id", $php_file_contents);
|
||||
$php_file_contents = str_replace('PLACEHOLDER_HEADERS', $list_of_columns_headers_in_quotes, $php_file_contents);
|
||||
$php_file_contents = str_replace('PLACEHOLDER_SQL_COLUMNS', $sql_list_of_columns_in_quotes, $php_file_contents);
|
||||
|
||||
$php_file = fopen($target_php_folder . $php_file_name, "w");
|
||||
|
@ -30,13 +30,13 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
switch ($name) {
|
||||
case "PLACEHOLDER_LIST":
|
||||
$allowed['PLACEHOLDER_LIST'] = array('list');
|
||||
$heading = array('','',PLACEHOLDER_COLUMNS, 'Menü');
|
||||
$heading = array('','',PLACEHOLDER_HEADERS, 'Menü');
|
||||
$width = array('1%','1%','10%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array(PLACEHOLDER_SQL_COLUMNS);
|
||||
$findcols = array('PLACEHOLDER_ID_COLUMN','PLACEHOLDER_ID_COLUMN',PLACEHOLDER_SQL_COLUMNS);
|
||||
$searchsql = array(PLACEHOLDER_SQL_COLUMNS);
|
||||
|
||||
$defaultorder = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user