From: Yves K. <yku...@us...> - 2004-10-25 00:42:18
|
Update of /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14029/modules/xwysiwyg/mod/xwysiwyg/boost Added Files: install.php install.sql uninstall.php uninstall.sql update.php Log Message: Initial Revision --- NEW FILE: install.sql --- CREATE TABLE mod_xwysiwyg_conf ( editor varchar(10) NOT NULL default 'htmlarea', lang_activ smallint(1) NOT NULL default '1', view_anon smallint(1) NOT NULL default '1', view_user smallint(1) NOT NULL default '1', request_mode smallint(1) NOT NULL default '0', plug_table smallint(1) NOT NULL default '0', plug_context smallint(1) NOT NULL default '0', plug_chara smallint(1) NOT NULL default '0', plug_para smallint(1) NOT NULL default '0', plug_list smallint(1) NOT NULL default '0', plug_file smallint(1) NOT NULL default '0', plug_image smallint(1) NOT NULL default '0', plug_spell smallint(1) NOT NULL default '0', fck_skin varchar(20) NOT NULL default 'default' ); CREATE TABLE mod_xwysiwyg_areas ( id int PRIMARY KEY, area varchar(50) NOT NULL default '' ); INSERT INTO mod_xwysiwyg_conf VALUES ('htmlarea','1','1','1', '0', '0','0','0','0','0','0','0','0','default'); --- NEW FILE: uninstall.php --- <?php /** * This is the xwysiwyg-version of an uninstall file for boost. Edit it to * be used with your module. * * $Id: uninstall.php,v 1.1 2004/10/25 00:42:07 ykuendig Exp $ */ /* Make sure the user is a deity before running this script */ if(!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); exit(); } /* Import the uninstall database file and dump the result into the status variable */ if($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/xwysiwyg/boost/uninstall.sql", 1, 1)) { $content .= "All xwysiwyg tables successfully removed!<br /><br />"; } else { $content .= "There was a problem accessing the database.<br /><br />"; } $status = 1; // instead ?> --- NEW FILE: install.php --- <?php /** * This is a xwysiwyg of an installation file for boost. Edit it to be * used with your module. * * $Id: install.php,v 1.1 2004/10/25 00:42:07 ykuendig Exp $ */ /* Make sure the user is a deity before running this script */ if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); exit(); } $status = 0; if($GLOBALS["core"]->version < "0.9.3-4") { $content .= "This module requires a phpWebSite core version of 0.9.3-4 or greater to install.<br />"; $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; return; } /* Import installation database and dump result into status variable */ if($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/xwysiwyg/boost/install.sql", TRUE)) { $content .= "All xwysiwyg tables successfully written.<br /><br />"; $status = 1; } else { $content .= "There was a problem writing to the database!<br /><br />"; return; } /* Create images directory */ if(!is_dir("{$GLOBALS['core']->home_dir}images/javascript/wysiwyg/")) PHPWS_File::makeDir($GLOBALS['core']->home_dir . "images/javascript/wysiwyg/"); if(is_dir("{$GLOBALS['core']->home_dir}images/javascript/wysiwyg/")) { PHPWS_File::fileCopy(PHPWS_SOURCE_DIR . "mod/xwysiwyg/img/xw.gif", $GLOBALS['core']->home_dir . "images/javascript/wysiwyg/", "xw.gif", false, false); $status = 1; } else { $content .= "There was a problem copying the icons!<br /><br />"; return; } $status = 1; //instead ?> --- NEW FILE: uninstall.sql --- DROP TABLE mod_xwysiwyg_conf; DROP TABLE mod_xwysiwyg_areas; --- NEW FILE: update.php --- <?php if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); exit(); } $status = 1; ?> |