Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r4962 -r4977 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 4962) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 4977) @@ -333,19 +333,19 @@ if ($i % $columns == 0) { // record in this iteration is first in row, then open row $column_number = 1; - $o .= $block_start_row_params['name'] ? $this->Application->ParseBlock($block_start_row_params, 1) : ''; + $o.= $block_start_row_params['name'] ? $this->Application->ParseBlock($block_start_row_params, 1) : ''; } else { $column_number++; } - $block_params['column_number'] = $column_number; - $o .= $this->Application->ParseBlock($block_params, 1); - array_push($displayed, $list->GetDBField($id_field)); + $block_params['column_number'] = $column_number; + $o.= $this->Application->ParseBlock($block_params, 1); + array_push($displayed, $list->GetDBField($id_field)); if (($i+1) % $columns == 0) { // record in next iteration is first in row too, then close this row - $o .= $block_end_row_params['name'] ? $this->Application->ParseBlock($block_end_row_params, 1) : ''; + $o.= $block_end_row_params['name'] ? $this->Application->ParseBlock($block_end_row_params, 1) : ''; } $list->GoNext(); Index: trunk/admin/modules/addmodule.php =================================================================== diff -u -r2853 -r4977 --- trunk/admin/modules/addmodule.php (.../addmodule.php) (revision 2853) +++ trunk/admin/modules/addmodule.php (.../addmodule.php) (revision 4977) @@ -52,39 +52,34 @@ +// 1. get list of modules installed in system $objModules->Clear(); $sql = "SELECT * FROM ".GetTablePrefix()."Modules"; - $objModules->Query_Item($sql); $objModList = new clsModList(); $path = $pathtoroot; +// 2. get folders on HDD, that probably are modules, but not installed yet $new = array(); -if ($dir = @opendir($path)) -{ - while (($file = readdir($dir)) !== false) - { - if($file !="." && $file !=".." && substr($file,0,1)!="_") - { - if(is_dir($path.'/'.$file)) - { - $inst_file = $path.'/'.$file.'/'.$admin."/install.php"; - if(file_exists($inst_file)) - { - if(!$objModules->ModuleInstalled($file)) - { - $new[$file] = $inst_file; - } - } - } - } - } - closedir($dir); +if ($dir = @opendir($path)) { + while (($file = readdir($dir)) !== false) { + if ($file !="." && $file !=".." && substr($file,0,1)!="_") { + if (is_dir($path.'/'.$file)) { + $inst_file = $path.'/'.$file.'/'.$admin."/install.php"; + if (file_exists($inst_file)) { + if (!$objModules->ModuleInstalled($file)) { + $new[$file] = $inst_file; + } + } + } + } + } + closedir($dir); } -foreach($new as $mod => $file) +foreach ($new as $mod => $file) { $m = new clsModule(); @@ -109,9 +104,11 @@ } if ($result) { + // prerequisit check is ok $data["Url"] = "$status"; } else { + // prerequisit check failed $show_errors = true; $data["Url"] = ''.$pre_error.''; }