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 / modules / blocks [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
30 Jul 2002 02:26:21 | postnuke_official/html/modules/blocks | pnadmin.php,1.45,1.46 pnadminapi.php,1.17,1.18 | Paul Rosania |
misc bugfixes, and added ability to change block state (hidden, visible) |
Update of /home/cvsroot/postnuke_official/html/modules/blocks In directory ns7.hostnuke.net:/tmp/cvs-serv13860 Modified Files: pnadmin.php pnadminapi.php Log Message: misc bugfixes, and added ability to change block state (hidden, visible) Index: pnadmin.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/blocks/pnadmin.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** pnadmin.php 29 Jul 2002 19:20:03 -0000 1.45 --- pnadmin.php 30 Jul 2002 02:26:18 -0000 1.46 *************** *** 108,111 **** --- 108,112 ---- inst.pn_content as content, inst.pn_last_update as last_update, + inst.pn_state as state, groups.pn_name as group_name, groups.pn_id as group_id, *************** *** 137,140 **** --- 138,153 ---- while(!$result->EOF) { $block = $result->GetRowAssoc(false); + + switch ($block['state']) { + case 0: + $block['state_desc'] = 'Hidden'; + break; + case 1: + $block['state_desc'] = 'Minimized'; + break; + case 2: + $block['state_desc'] = 'Maximized'; + break; + } $blocks[] = $block; *************** *** 210,217 **** $type, $group, ! $template) = pnVarCleanFromInput('block_title', 'block_type', 'block_group', ! 'block_template'); // Confirm authorisation code --- 223,232 ---- $type, $group, ! $template, ! $state) = pnVarCleanFromInput('block_title', 'block_type', 'block_group', ! 'block_template', ! 'block_state'); // Confirm authorisation code *************** *** 231,235 **** 'type' => $type, 'group' => $group, ! 'template' => $template)); // TODO: handle status messaging properly --- 246,251 ---- 'type' => $type, 'group' => $group, ! 'template' => $template, ! 'state' => $state)); // TODO: handle status messaging properly *************** *** 269,272 **** --- 285,289 ---- inst.pn_content as content, inst.pn_refresh as refresh, + inst.pn_state as state, group_inst.pn_group_id as group_id, type.pn_module as module, *************** *** 373,376 **** --- 390,394 ---- $content, $refresh, + $state, $group_id) = pnVarCleanFromInput('bid', 'block_title', *************** *** 378,381 **** --- 396,400 ---- 'block_content', 'block_refresh', + 'block_state', 'block_group'); *************** *** 394,397 **** --- 413,417 ---- $blockinfo['content'] = $content; $blockinfo['refresh'] = $refresh; + $blockinfo['state'] = $state; if ($blockinfo['group_id'] != $group_id) { // Changed group, not worth keeping track of position, IMO Index: pnadminapi.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/blocks/pnadminapi.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pnadminapi.php 29 Jul 2002 19:20:03 -0000 1.17 --- pnadminapi.php 30 Jul 2002 02:26:19 -0000 1.18 *************** *** 44,48 **** (!isset($type)) || (!isset($group)) || ! (!isset($position))) { pnSessionSetVar('errormsg', _MODARGSERROR); return false; --- 44,49 ---- (!isset($type)) || (!isset($group)) || ! (!isset($position)) || ! (!isset($state))) { pnSessionSetVar('errormsg', _MODARGSERROR); return false; *************** *** 71,80 **** pn_type_id, pn_title, ! pn_template) VALUES ( " . pnVarPrepForStore($nextId) . ", '" . pnVarPrepForStore($type) . "', '" . pnVarPrepForStore($title) . "', ! '" . pnVarPrepForStore($template) . "');"; $dbconn->Execute($query); --- 72,83 ---- pn_type_id, pn_title, ! pn_template, ! pn_state) VALUES ( " . pnVarPrepForStore($nextId) . ", '" . pnVarPrepForStore($type) . "', '" . pnVarPrepForStore($title) . "', ! '" . pnVarPrepForStore($template) . "', ! '" . pnVarPrepForStore($state) . "');"; $dbconn->Execute($query); *************** *** 147,151 **** (!isset($title)) || (!isset($refresh)) || ! (!isset($group_id))) { pnSessionSetVar('errormsg', _MODARGSERROR); return false; --- 150,155 ---- (!isset($title)) || (!isset($refresh)) || ! (!isset($group_id)) || ! (!isset($state))) { pnSessionSetVar('errormsg', _MODARGSERROR); return false; *************** *** 167,179 **** pn_template='" . pnVarPrepForStore($template) . "', pn_title='" . pnVarPrepForStore($title) . "', ! pn_refresh='" . pnVarPrepForStore($refresh) . "' WHERE pn_id=" . pnVarPrepForStore($id); $dbconn->Execute($query); if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return false; } --- 171,184 ---- pn_template='" . pnVarPrepForStore($template) . "', pn_title='" . pnVarPrepForStore($title) . "', ! pn_refresh='" . pnVarPrepForStore($refresh) . "', ! pn_state='" . pnVarPrepForStore($state) . "' WHERE pn_id=" . pnVarPrepForStore($id); $dbconn->Execute($query); if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return false; }
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 |