Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / includes [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 28 Jul 2002 03:47:26 | postnuke_official/html/includes | pnBlocks.php,1.44,1.45 | Paul Rosania |
| updated block funcs to new block tables | |||
Update of /home/cvsroot/postnuke_official/html/includes
In directory ns7.hostnuke.net:/tmp/cvs-serv27821
Modified Files:
pnBlocks.php
Log Message:
updated block funcs to new block tables
Index: pnBlocks.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/includes/pnBlocks.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** pnBlocks.php 20 Jul 2002 20:31:36 -0000 1.44
--- pnBlocks.php 28 Jul 2002 03:47:24 -0000 1.45
***************
*** 341,371 ****
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return;
}
list ($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
! $blockstable = $pntable['blocks'];
! $query = "SELECT pn_bkey,
! pn_title,
! pn_content,
! pn_url,
! pn_position,
! pn_weight,
! pn_active,
! pn_refresh,
! pn_last_update,
! pn_language,
! pn_mid
! FROM $blockstable
! WHERE pn_bid = " . pnVarPrepForStore($bid);
! $result = $dbconn->Execute($query);
if ($dbconn->ErrorNo() != 0) {
$msg = pnMLByKey('DATABASE_ERROR', $query);
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return;
}
if ($result->EOF) {
--- 341,381 ----
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return NULL;
}
list ($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
! $block_instances_table = $pntable['block_instances'];
! $block_types_table = $pntable['block_types'];
! $block_groups_table = $pntable['block_groups'];
! $block_group_instances_table = $pntable['block_group_instances'];
! $query = "SELECT inst.pn_id as id,
! inst.pn_title as title,
! inst.pn_template as template,
! inst.pn_content as content,
! inst.pn_refresh as refresh,
! inst.pn_state as state,
! inst.pn_last_update as last_update,
! group_inst.pn_group_id as group_id,
! type.pn_module as module,
! type.pn_type as type,
! groups.pn_name as group_name
! FROM $block_instances_table as inst
! LEFT JOIN $block_group_instances_table as group_inst
! ON group_inst.pn_instance_id = inst.pn_id
! LEFT JOIN $block_types_table as type
! ON type.pn_id = inst.pn_type_id
! LEFT JOIN $block_groups_table as groups
! ON groups.pn_id = group_inst.pn_group_id
! WHERE inst.pn_id = $bid";
+ $result = $dbconn->Execute($query);
+ echo $dbconn->ErrorMsg();
if ($dbconn->ErrorNo() != 0) {
$msg = pnMLByKey('DATABASE_ERROR', $query);
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return NULL;
}
if ($result->EOF) {
***************
*** 374,393 ****
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'ID_NOT_EXIST',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return;
}
! list($resarray['bkey'],
! $resarray['title'],
! $resarray['content'],
! $resarray['url'],
! $resarray['position'],
! $resarray['weight'],
! $resarray['active'],
! $resarray['refresh'],
! $resarray['last_update'],
! $resarray['language'],
! $resarray['mid']) = $result->fields;
$result->Close();
! return $resarray;
}
?>
--- 384,398 ----
pnExceptionSet(PN_SYSTEM_EXCEPTION, 'ID_NOT_EXIST',
new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! return NULL;
}
!
! $block_info = $result->GetRowAssoc(false);
! $block_info['mid'] = $block_info['module'];
! $block_info['bkey'] = $block_info['id'];
!
$result->Close();
! return $block_info;
}
+
?>
View Statistics - Next Notice - Previous Notice
| Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |