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_modules / New_pnadmin / html / modules / admin [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 05 Aug 2002 11:10:38 | postnuke_modules/New_pnadmin/html/modules/admin | pnfunctions.php,1.1.1.1,1.2 pninit.php,1.1.1.1,1.2 | John Robeson |
| just a couple formatting fixes | |||
Update of /home/cvsroot/postnuke_modules/New_pnadmin/html/modules/admin
In directory ns7.hostnuke.net:/tmp/cvs-serv30598/New_pnadmin/html/modules/admin
Modified Files:
pnfunctions.php pninit.php
Log Message:
just a couple formatting fixes
Index: pnfunctions.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/New_pnadmin/html/modules/admin/pnfunctions.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** pnfunctions.php 3 Aug 2002 10:01:13 -0000 1.1.1.1
--- pnfunctions.php 5 Aug 2002 11:10:36 -0000 1.2
***************
*** 1,13 ****
! <?
// File: $Id$ $Name$
// ----------------------------------------------------------------------
! // POST-NUKE Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
- // Based on:
- // PHP-NUKE Web Portal System - http://phpnuke.org/
- // Thatware - http://thatware.org/
- // ----------------------------------------------------------------------
// LICENSE
//
--- 1,9 ----
! <?php
// File: $Id$ $Name$
// ----------------------------------------------------------------------
! // PostNuke Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// LICENSE
//
***************
*** 31,37 ****
// Functions in "old" admin:
// ----------------------------------------------------------------------
- // Original Author of file: Francisco Burzi
- // ----------------------------------------------------------------------
-
function getAllSkins(){
--- 27,30 ----
***************
*** 39,43 ****
$skinDir = "modules/".$ModName."/skins";
$handle = opendir($skinDir);
! $i = 0;
while(($file = readdir($handle))!=false){
if(substr($file,0,1) != '.'){
--- 32,36 ----
$skinDir = "modules/".$ModName."/skins";
$handle = opendir($skinDir);
! $i = 0;
while(($file = readdir($handle))!=false){
if(substr($file,0,1) != '.'){
***************
*** 66,72 ****
! function getAdminLiteName($gID,$default=''){
! list($dbconn) = pnDBGetConn();
! $pntable = admin_pntables();
$table = $pntable['group_table'];
$column = &$pntable['group'];
--- 59,66 ----
! function getAdminLiteName($gID,$default='')
! {
! list($dbconn) = pnDBGetConn();
! $pntable = admin_pntables();
$table = $pntable['group_table'];
$column = &$pntable['group'];
***************
*** 92,97 ****
function getAllGroups(){
! list($dbconn) = pnDBGetConn();
! $pntable = admin_pntables();
$table = $pntable['group_table'];
$column = &$pntable['group'];
--- 86,92 ----
function getAllGroups(){
! list($dbconn) = pnDBGetConn();
! $pntable = admin_pntables();
!
$table = $pntable['group_table'];
$column = &$pntable['group'];
Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/New_pnadmin/html/modules/admin/pninit.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** pninit.php 3 Aug 2002 10:01:14 -0000 1.1.1.1
--- pninit.php 5 Aug 2002 11:10:36 -0000 1.2
***************
*** 1,13 ****
! <?
// File: $Id$ $Name$
// ----------------------------------------------------------------------
! // POST-NUKE Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
- // Based on:
- // PHP-NUKE Web Portal System - http://phpnuke.org/
- // Thatware - http://thatware.org/
- // ----------------------------------------------------------------------
// LICENSE
//
--- 1,9 ----
! <?php
// File: $Id$ $Name$
// ----------------------------------------------------------------------
! // PostNuke Content Management System
// Copyright (C) 2001 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// LICENSE
//
***************
*** 25,50 ****
// ----------------------------------------------------------------------
// Original Author of file:
! // Purpose of file:
// ----------------------------------------------------------------------
- if(basename($PHP_SELF) == basename(__FILE__)){
- echo "You have no access to this file!!!";
- exit;
- }
// --------------------------------------------
// This is not a standardfunction in pninit.php
//
! function isInAGroup($mID){
! list($dbconn) = pnDBGetConn();
! if(function_exists(admin_pntables)){
! $pntable = admin_pntables();
! }else{
! $pntable = pnDBGetTables();
! }
! $table = $pntable['member_table'];
! $column = &$pntable['members'];
! $query = "SELECT * FROM ".$table." WHERE ".$column['mid']."='".$mID."'";
! $result = mysql_query($query);
return mysql_numrows($result);
}
--- 21,45 ----
// ----------------------------------------------------------------------
// Original Author of file:
! // Purpose of file: initialization functions for administration module
// ----------------------------------------------------------------------
// --------------------------------------------
// This is not a standardfunction in pninit.php
//
! function isInAGroup($mID)
! {
! list($dbconn) = pnDBGetConn();
!
! if(function_exists(admin_pntables)){
! $pntable = admin_pntables();
! }
! else{
! $pntable = pnDBGetTables();
! }
! $table = $pntable['member_table'];
! $column = &$pntable['members'];
! $query = "SELECT * FROM ".$table." WHERE ".$column['mid']."='".$mID."'";
! $result = mysql_query($query);
return mysql_numrows($result);
}
***************
*** 79,83 ****
// ----------------------------------------------------------------------------------------
// All tabnames
! $tabNames = array("Configuration","Users","Content","Quick Links");
// ----------------------------------------------------------------------------------------
// All sorting of tabs
--- 74,78 ----
// ----------------------------------------------------------------------------------------
// All tabnames
! $tabNames = array("Configuration","Users","Content","Quick Links");
// ----------------------------------------------------------------------------------------
// All sorting of tabs
***************
*** 170,176 ****
! function admin_init(){
list($dbconn) = pnDBGetConn();
! $pntable = pnDBGetTables();
if(!is_array($pntable)){
echo "<p><b>No tables found to create!</b></p>";
--- 165,172 ----
! function admin_init()
! {
list($dbconn) = pnDBGetConn();
! $pntable = pnDBGetTables();
if(!is_array($pntable)){
echo "<p><b>No tables found to create!</b></p>";
***************
*** 231,244 ****
* This function Agent_Registration_user_can be called multiple times
*/
! function admin_upgrade($oldversion){
! list($dbconn) = pnDBGetConn();
! $pntable = pnDBGetTables();
!
!
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
!
! if(!is_array($pntable)){
echo "<p><b>No tables to create were found!</b></p>";
die;
--- 227,236 ----
* This function Agent_Registration_user_can be called multiple times
*/
! function admin_upgrade($oldversion)
! {
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
! if(!is_array($pntable)){
echo "<p><b>No tables to create were found!</b></p>";
die;
***************
*** 314,355 ****
}
- /**
- * delete the template module
- * This function Agent_Registration_user_is only ever called once during the lifetime of a particular
- * module instance
- */
function admin_delete()
{
- // Get datbase setup - note that both pnDBGetConn() and pnDBGetTables()
- // return arrays but we handle them differently. For pnDBGetConn()
- // we currently just want the first item, which is the official
- // database handle. For pnDBGetTables() we want to keep the entire
- // tables array together for easy reference later on
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
! // Drop the table - for such a simple command the advantages of separating
! // out the SQL statement from the Execute() command are minimal, but as
! // this has been done elsewhere it makes sense to stick to a single method
! $sql = "DROP TABLE IF EXISTS ".$pntable['group_table'];
! mysql_query($sql);
! if (mysql_error()) {
! return false;
! }
! $sql = "DROP TABLE IF EXISTS ".$pntable['member_table'];
! mysql_query($sql);
! if (mysql_error()) {
! return false;
! }
$sql = "DELETE FROM ".pnConfigGetVar('prefix')."_module_vars WHERE pn_modname='/PNConfig' AND pn_name='use_new_admin'";
! mysql_query($sql);
if (mysql_error()) {
return false;
}
! return true;
}
-
?>
--- 306,338 ----
}
function admin_delete()
{
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
! $query = "DROP TABLE IF EXISTS ".$pntable['group_table'];
! $dbconn->Execute($query);
!
! if ($dbconn->ErrorNo() != 0) {
! pnSessionSetVar('errormsg', 'Deletion of admin lite group table failed');
! return false;
! }
! $query = "DROP TABLE IF EXISTS ".$pntable['member_table'];
! $dbconn->Execute($query);
+ if ($dbconn->ErrorNo() != 0) {
+ pnSessionSetVar('errormsg', 'Deletion of admin lite group members table failed');
+ return false;
+ }
+ //FIXME <johnny> - use pnModDelVar()
+ pnModDelVar('admin','
$sql = "DELETE FROM ".pnConfigGetVar('prefix')."_module_vars WHERE pn_modname='/PNConfig' AND pn_name='use_new_admin'";
! mysql_query($sql);
if (mysql_error()) {
return false;
}
! return true;
}
?>
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 |