было...
code:
function mosLoadModules( $position='left', $horiz=false)
{
global $conn,$Itemid,$access_sql;
$horiz=false;
$query = "SELECT id,title,message,module,ordering,position,showtitle,showon,params"
."\nFROM #__modules"
."\nWHERE published=1 AND position='$position' $access_sql"
."\nORDER BY ordering ASC";
$rs=$conn->Execute($query);
if($rs && $rs->RecordCount()>0 && $rsa = $rs->GetArray() )
{
if ($horiz)
{echo '<table cellpadding="0" cellspacing="0" border="1" width="100%"><tr>';}
foreach($rsa as $module)
{
if ($horiz)
{echo "<td valign=\"top\">";}
if($module['showon']=='' || ($Itemid<>'' && strstr($module['showon'],'_'.$Itemid.'_')) || strstr($module['showon'],'_0_'))
{
$params=parseparams(dbdecode($module['params']));
html_module2( $module, $params, $Itemid );
}
if ($horiz)
{echo "</td>";}
}
if ($horiz)
{echo "\n</tr>\n</table>";}
}
}
{
global $conn,$Itemid,$access_sql;
$horiz=false;
$query = "SELECT id,title,message,module,ordering,position,showtitle,showon,params"
."\nFROM #__modules"
."\nWHERE published=1 AND position='$position' $access_sql"
."\nORDER BY ordering ASC";
$rs=$conn->Execute($query);
if($rs && $rs->RecordCount()>0 && $rsa = $rs->GetArray() )
{
if ($horiz)
{echo '<table cellpadding="0" cellspacing="0" border="1" width="100%"><tr>';}
foreach($rsa as $module)
{
if ($horiz)
{echo "<td valign=\"top\">";}
if($module['showon']=='' || ($Itemid<>'' && strstr($module['showon'],'_'.$Itemid.'_')) || strstr($module['showon'],'_0_'))
{
$params=parseparams(dbdecode($module['params']));
html_module2( $module, $params, $Itemid );
}
if ($horiz)
{echo "</td>";}
}
if ($horiz)
{echo "\n</tr>\n</table>";}
}
}
стало...
code:
function mosLoadModules( $position='left')
{
global $conn,$Itemid,$access_sql;
$query = "SELECT id,title,message,module,ordering,position,showtitle,showon,params"
."\nFROM #__modules"
."\nWHERE published=1 AND position='$position' $access_sql"
."\nORDER BY ordering ASC";
$rs=$conn->Execute($query);
if($rs && $rs->RecordCount()>0 && $rsa = $rs->GetArray() )
{
foreach($rsa as $module)
{
if($module['showon']=='' || ($Itemid<>'' && strstr($module['showon'],'_'.$Itemid.'_')) || strstr($module['showon'],'_0_'))
{
$params=parseparams(dbdecode($module['params']));
html_module2( $module, $params, $Itemid );
}
}
}
}
{
global $conn,$Itemid,$access_sql;
$query = "SELECT id,title,message,module,ordering,position,showtitle,showon,params"
."\nFROM #__modules"
."\nWHERE published=1 AND position='$position' $access_sql"
."\nORDER BY ordering ASC";
$rs=$conn->Execute($query);
if($rs && $rs->RecordCount()>0 && $rsa = $rs->GetArray() )
{
foreach($rsa as $module)
{
if($module['showon']=='' || ($Itemid<>'' && strstr($module['showon'],'_'.$Itemid.'_')) || strstr($module['showon'],'_0_'))
{
$params=parseparams(dbdecode($module['params']));
html_module2( $module, $params, $Itemid );
}
}
}
}
Убрал куски кода связанные с переменной $horiz т.к. она всегда false и условия никогда не выполнятся.