Index: trunk/core/kernel/utility/formatters/upload_formatter.php =================================================================== diff -u -N -r6797 -r8074 --- trunk/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 6797) +++ trunk/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 8074) @@ -140,7 +140,7 @@ $new_name = $filename.$ext; while ( file_exists($path.'/'.$new_name) ) { - if ( preg_match("/({$filename}_)([0-9]*)($ext)/", $new_name, $regs) ) { + if ( preg_match('/('.preg_quote($filename, '/').'_)([0-9]*)('.preg_quote($ext, '/').')/', $new_name, $regs) ) { $new_name = $regs[1].($regs[2]+1).$regs[3]; } else { Index: trunk/core/units/theme_files/theme_files_config.php =================================================================== diff -u -N --- trunk/core/units/theme_files/theme_files_config.php (revision 0) +++ trunk/core/units/theme_files/theme_files_config.php (revision 8074) @@ -0,0 +1,62 @@ + 'theme-file', + 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array('class' => 'kDBEventHandler', 'file' => '', 'build_event'=>'OnBuild'), + 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event'=>'OnBuild'), + 'AutoLoad' => true, + + 'QueryString' => Array( + 1 => 'id', + 2 => 'page', + 3 => 'event', + ), + + 'IDField' => 'FileId', + + 'TitleField' => 'FileName', + + 'TableName' => TABLE_PREFIX.'ThemeFiles', + + 'ForeignKey' => 'ThemeId', + 'ParentTableKey' => 'ThemeId', + 'ParentPrefix' => 'theme', + 'AutoDelete' => true, + 'AutoClone' => true, + + 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %s'), + 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %s'), + + 'ListSortings' => Array ( + '' => Array( + 'Sorting' => Array('FileName' => 'asc'), + ) + ), + + 'Fields' => Array( + 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'FilePath' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), + 'FileType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FileFound' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array('default' => 'icon16_custom.gif'), + 'Fields' => Array ( + 'FileId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'FilePath' => Array( 'title'=>'la_col_FilePath',), + 'FileName' => Array( 'title'=>'la_col_FileName',), + 'Description' => Array( 'title'=>'la_col_Description',), + ), + + ), + ), + ); + +?> \ No newline at end of file Index: trunk/core/admin_templates/themes/themes_edit_files.tpl =================================================================== diff -u -N --- trunk/core/admin_templates/themes/themes_edit_files.tpl (revision 0) +++ trunk/core/admin_templates/themes/themes_edit_files.tpl (revision 8074) @@ -0,0 +1,77 @@ + + + + + + + + + + + + +
+ +
+ + + + \ No newline at end of file Index: trunk/core/units/themes/themes_config.php =================================================================== diff -u -N -r8071 -r8074 --- trunk/core/units/themes/themes_config.php (.../themes_config.php) (revision 8071) +++ trunk/core/units/themes/themes_config.php (.../themes_config.php) (revision 8074) @@ -29,11 +29,11 @@ 'themes_list' => Array('prefixes' => Array('theme_List'), 'format' => "!la_title_Configuration! - !la_title_Themes! (#theme_recordcount#)"), 'themes_edit_general' => Array('prefixes' => Array('theme'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_General!"), - 'theme_files_list' => Array('prefixes' => Array('theme', 'theme-files_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles! (#theme-files_recordcount#)"), + 'themes_edit_files' => Array('prefixes' => Array('theme', 'theme-file_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles! (#theme-file_recordcount#)"), ), 'TableName' => TABLE_PREFIX.'Theme', -// 'SubItems' => Array('themefiles'), + 'SubItems' => Array('theme-file'), 'FilterMenu' => Array( 'Groups' => Array(