[pLog-svn] r2346 - in plog/trunk: . class/database/pdb/drivers
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Jul 18 20:51:42 GMT 2005
Author: oscar
Date: 2005-07-18 20:51:42 +0000 (Mon, 18 Jul 2005)
New Revision: 2346
Modified:
plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php
plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php
plog/trunk/wizard.php
Log:
a few changes so that the wizard works fine again
Modified: plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php
===================================================================
--- plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php 2005-07-18 07:37:26 UTC (rev 2345)
+++ plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php 2005-07-18 20:51:42 UTC (rev 2346)
@@ -79,7 +79,7 @@
* @param dbname The name of the database to which we're connecting
* @return Returns true if successful or false otherwise
*/
- function Connect( $host, $username, $password, $dbname )
+ function Connect( $host, $username, $password, $dbname = null )
{
$this->_host = $host;
$this->_username = $username;
Modified: plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php
===================================================================
--- plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php 2005-07-18 07:37:26 UTC (rev 2345)
+++ plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php 2005-07-18 20:51:42 UTC (rev 2346)
@@ -61,7 +61,7 @@
/**
* @see PDbDriverBase::Connect()
*/
- function Connect( $host, $username, $password, $dbname )
+ function Connect( $host, $username, $password, $dbname = null)
{
PDbDriverBase::Connect( $host, $username, $password, $dbname );
@@ -71,13 +71,16 @@
return false;
// continue otherwise and try to select our db
- return( mysql_select_db( $dbname, $this->_res ));
+ if( $dbname )
+ return( mysql_select_db( $dbname, $this->_res ));
+ else
+ return( true );
}
/**
* @see PDbDriverBase::PConnect()
*/
- function PConnect( $host, $username, $password, $dbname )
+ function PConnect( $host, $username, $password, $dbname = null)
{
PDbDriverBase::Connect( $host, $username, $password, $dbname );
@@ -87,7 +90,10 @@
return false;
// continue otherwise and try to select our db
- return( mysql_select_db( $dbname, $this->_res ));
+ if( $dbname )
+ return( mysql_select_db( $dbname, $this->_res ));
+ else
+ return( true );
}
/**
Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php 2005-07-18 07:37:26 UTC (rev 2345)
+++ plog/trunk/wizard.php 2005-07-18 20:51:42 UTC (rev 2346)
@@ -85,8 +85,8 @@
num_reads int(10) default '0',
properties TEXT NOT NULL default '',
slug varchar(255) NOT NULL,
- num_comments int(10) NOT NULL default '0', // new in 1.1
- num_nospam_comments int(10) NOT NULL default '0', // new in 1.1
+ num_comments int(10) NOT NULL default '0',
+ num_nospam_comments int(10) NOT NULL default '0',
PRIMARY KEY (id),
KEY num_reads (num_reads),
KEY category_id (category_id),
@@ -109,8 +109,8 @@
description TEXT NOT NULL DEFAULT '',
properties text NOT NULL default '',
mangled_name varchar(255) NOT NULL default '',
- num_articles int(10) NOT NULL default 0, // new in 1.1
- num_published_articles int(10) NOT NULL default 0, // new in 1.1
+ num_articles int(10) NOT NULL default 0,
+ num_published_articles int(10) NOT NULL default 0,
PRIMARY KEY (id),
KEY parent_id (parent_id),
KEY blog_id (blog_id),
@@ -121,7 +121,7 @@
$Tables[2]["code"] = "CREATE TABLE {dbprefix}articles_comments (
id int(10) unsigned NOT NULL auto_increment,
article_id int(10) unsigned NOT NULL default '0',
- blog_id int(10) unsigned NOT NULL default '0', // new in 1.1
+ blog_id int(10) unsigned NOT NULL default '0',
topic text NOT NULL,
text text,
date timestamp(14) NOT NULL,
@@ -140,8 +140,8 @@
PRIMARY KEY (id),
KEY parent_id (parent_id),
KEY article_id (article_id),
- KEY blog_id (blog_id), // new in 1.1
- KEY article_id_blog_id(article_id,blog_id), // new in 1.1
+ KEY blog_id (blog_id),
+ KEY article_id_blog_id(article_id,blog_id),
FULLTEXT KEY normalized_fields (normalized_text,normalized_topic),
FULLTEXT KEY normalized_text (normalized_text),
FULLTEXT KEY normalized_topic (normalized_topic)
@@ -170,9 +170,9 @@
mangled_blog varchar(50) NOT NULL default '',
status int(4) NOT NULL default '1',
show_in_summary int(4) not null default '1',
- create_date TIMESTAMP(14) NOT NULL, // new in 1.1
- last_update_date TIMESTAMP(14) NOT NULL, // new in 1.1
- modification_date TIMESTAMP(14) NOT NULL, // new in 1.1
+ create_date TIMESTAMP(14) NOT NULL,
+ last_update_date TIMESTAMP(14) NOT NULL,
+ modification_date TIMESTAMP(14) NOT NULL,
PRIMARY KEY (id),
KEY owner_id (owner_id),
KEY mangled_blog (mangled_blog),
@@ -202,7 +202,7 @@
blog_id int(10) NOT NULL default '0',
last_modification timestamp(14) NOT NULL,
properties TEXT NOT NULL DEFAULT '',
- num_links int(10) NOT NULL default '0', // new in 1.1
+ num_links int(10) NOT NULL default '0',
PRIMARY KEY (id),
KEY blog_id (blog_id)
) TYPE=MyISAM;";
@@ -329,7 +329,7 @@
normalized_description text NOT NULL default '',
normalized_name varchar(255) NOT NULL default '',
mangled_name varchar(255) NOT NULL default '',
- num_resources int(10) NOT NULL default '0', // new in 1.1
+ num_resources int(10) NOT NULL default '0',
PRIMARY KEY (id),
KEY parent_id (parent_id),
KEY owner_id (owner_id),
More information about the pLog-svn
mailing list