Index: trunk/admin/install/install_lib.php =================================================================== diff -u -r775 -r787 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 775) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 787) @@ -473,13 +473,13 @@ } } if(in_array(strtolower($name),$modules)) - { - return TRUE; - } - else - { - return FALSE; - } + { + return TRUE; + } + else + { + return FALSE; + } } else return TRUE; Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r773 -r787 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 773) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 787) @@ -2199,7 +2199,7 @@ return $ret; } - function GetJoinedSQL($PermName, $CatId=NULL, $AdditionalWhere="") + function GetJoinedSQL($PermName, $CatId=NULL, $AdditionalWhere="", $LoadOnlyPrimary = true) { global $objSession, $objPermissions; @@ -2212,8 +2212,15 @@ $sql ="INNER JOIN $cattable ON ($cattable.ItemResourceId=$ltable.ResourceId) "; $sql .="INNER JOIN $CategoryTable ON ($CategoryTable.CategoryId=$cattable.CategoryId) "; $sql .= "INNER JOIN $ptable ON ($cattable.CategoryId=$ptable.CategoryId) "; - $sql .="WHERE ($acl AND PermId=$VIEW AND PrimaryCat=1 AND $CategoryTable.Status=1) "; + // here will come checking for PrimaryCat on search + if ($LoadOnlyPrimary) { + $sql .="WHERE ($acl AND PermId=$VIEW AND PrimaryCat=1 AND $CategoryTable.Status=1) "; + } + else { + $sql .="WHERE ($acl AND PermId=$VIEW AND $CategoryTable.Status=1) "; + } + if(is_numeric($CatId)) { $sql .= " AND ($CategoryTable.CategoryId=$CatId) "; @@ -2748,7 +2755,14 @@ $where = "ItemType=".$this->ItemType." AND $ltable.Status=1"; - $sql .= $this->GetJoinedSQL($p,NULL,$where); + $load_multiple = $objConfig->Get("Search_ShowMultiple_".$attribs['multiple']); + $LoadOnlyPrimary = true; + + if ($load_multiple == 1) { + $LoadOnlyPrimary = false; + } + + $sql .= $this->GetJoinedSQL($p,NULL,$where, $LoadOnlyPrimary); $sql .= " ORDER BY EdPick DESC,Relevance DESC "; $tmp = $this->QueryOrderByClause(FALSE,TRUE,TRUE); @@ -2757,6 +2771,7 @@ { $sql .= ", ".$tmp." "; } + //echo "SQL Search Items: $sql

"; return $sql; } Index: trunk/admin/config/config_search.php =================================================================== diff -u -r374 -r787 --- trunk/admin/config/config_search.php (.../config_search.php) (revision 374) +++ trunk/admin/config/config_search.php (.../config_search.php) (revision 787) @@ -187,9 +187,12 @@ $cfg_var = strtolower(prompt_language($h,1)); $cfg = "SearchRel_Increase_".$cfg_var; $value = $objConfig->Get($cfg); + if(!is_numeric($value)) $value = (int)$objConfig->Get("SearchRel_DefaultIncrease"); + print "%"; + print "%"; print ""; print "\n"; print ""; @@ -212,7 +215,20 @@ $value = (int)$objConfig->Get("SearchRel_DefaultRating"); print "   % "; print prompt_language("la_prompt_Rating"); - + + if ($module != 'In-Portal') { + $cfg = "Search_ShowMultiple_".$cfg_var; + int_subsection_title(prompt_language($h)." ".prompt_language("la_Text_MultipleShow")); + print "\n"; + print "".prompt_language("la_prompt_MultipleShow")."\n"; + $checked = ""; + if((int)$objConfig->Get($cfg)==1) + $checked = " CHECKED"; + print ""; + print ""; + print "\n"; + print "\n"; + } } } ?> Index: trunk/admin/install/upgrades/inportal_upgrade_v1.0.9.sql =================================================================== diff -u --- trunk/admin/install/upgrades/inportal_upgrade_v1.0.9.sql (revision 0) +++ trunk/admin/install/upgrades/inportal_upgrade_v1.0.9.sql (revision 787) @@ -0,0 +1 @@ +UPDATE Modules SET Version = '1.0.9' WHERE Name = 'In-Portal'; \ No newline at end of file Index: trunk/admin/modules/addmodule.php =================================================================== diff -u -r776 -r787 --- trunk/admin/modules/addmodule.php (.../addmodule.php) (revision 776) +++ trunk/admin/modules/addmodule.php (.../addmodule.php) (revision 787) @@ -88,6 +88,7 @@ $pathtolocal = $pathtoroot."kernel/"; require_once ($pathtoroot.$admin."/include/elements.php"); +require_once ($pathtoroot.$admin."/install/install_lib.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); require_once ($pathtolocal."admin/include/navmenu.php"); require_once($pathtoroot.$admin."/toolbar.php"); @@ -149,7 +150,6 @@ closedir($dir); } -print_pre($mod_prefix); foreach($new as $mod => $file) { $m = new clsModule(); @@ -168,8 +168,19 @@ $mod_tmp_name = substr($mod_tmp_name, 0, strlen($mod_tmp_name) - 1); + if (inst_ModuleLicensed($mod_tmp_name)) { - $data["Url"] = "$status"; + if (file_exists($pathtoroot.strtolower($mod_tmp_name)."/admin/install/prerequisit.php")) { + include_once($pathtoroot.strtolower($mod_tmp_name)."/admin/install/prerequisit.php"); + } + + if ($result) { + $data["Url"] = "$status"; + } + else { + $show_errors = true; + $data["Url"] = ''.$pre_error.''; + } } else { $data["Url"] = ''.admin_language("la_module_not_licensed").''; Index: trunk/kernel/include/modules.php =================================================================== diff -u -r774 -r787 --- trunk/kernel/include/modules.php (.../modules.php) (revision 774) +++ trunk/kernel/include/modules.php (.../modules.php) (revision 787) @@ -87,11 +87,6 @@ } -function IsModuleLicensed($name) -{ - return _ModuleLicensed($name); -} - function LoadEnv() { global $env, $var_list, $mod_prefix,$objSession; Index: trunk/kernel/action.php =================================================================== diff -u -r777 -r787 --- trunk/kernel/action.php (.../action.php) (revision 777) +++ trunk/kernel/action.php (.../action.php) (revision 787) @@ -971,6 +971,22 @@ $cfg = "SearchRel_Rating_".$var; $objConfig->Set($cfg,$value); } + + $vals = $_POST["multiple"]; + + if (count($vals) > 0) { + foreach($vals as $var=>$value) + { + $cfg = "Search_ShowMultiple_".$var; + $objConfig->Set($cfg,$value); + } + } + else { + $cfg = "Search_ShowMultiple_".$_POST['cfg_var']; + $objConfig->Set($cfg, 0); + } + + $objConfig->Save(); break; case "m_keyword_reset": if($ro_perm) break; Index: trunk/admin/install/prerequisit_errors.php =================================================================== diff -u --- trunk/admin/install/prerequisit_errors.php (revision 0) +++ trunk/admin/install/prerequisit_errors.php (revision 787) @@ -0,0 +1,133 @@ +'.print_r($s, true).''; +} + +?> + + + In-Portal - Module Errors + + + + + +
+
+ +
+
+
+ + +
+  Module Errors
+
+
+ + + + + +
+ Install + +
+ + + + + + +
+
+ +
+ +
+ + \ No newline at end of file Index: trunk/kernel/include/searchitems.php =================================================================== diff -u -r773 -r787 --- trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 773) +++ trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 787) @@ -516,7 +516,9 @@ } } $SelectSQL .= "GROUP BY $idField "; - echo $SelectSQL."

\n"; + + //echo $SelectSQL."

\n"; + if($InitTable) { $this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$this->ResultTable); Index: trunk/admin/install/inportal_data.sql =================================================================== diff -u -r739 -r787 --- trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 739) +++ trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 787) @@ -187,7 +187,7 @@ INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category'); INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User'); -INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-Portal', 'kernel/', 'm', '1.0.8', 1, 0, '', 0, '1054738405'); +INSERT INTO Modules (Name, Path, Var, Version, Loaded, LoadOrder, TemplatePath, RootCat, BuildDate) VALUES ('In-Portal', 'kernel/', 'm', '1.0.9', 1, 0, '', 0, '1054738405'); INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal'); INSERT INTO PermissionConfig (PermissionName, Description, ErrorMessage, ModuleId) VALUES ('CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal');