Steven Garcia has proposed merging lp:~fosdevel/aikiframework/file-struct into lp:aikiframework.
Requested reviews: Aiki Framework Developers (aikiframework-devel) For more details, see: https://code.launchpad.net/~fosdevel/aikiframework/file-struct/+merge/64625 Moved src/system/libraries to src/libs. Moved src/system/core.php to src/libs/core.php. Moved src/system/widgets.php to src/libs/widgets.php. Moved src/system/sql to src/sql. Moved src/system/database to src/libs/database. Renamed $system_folder to $AIKI_ROOT_DIR. I think that the src/system folder is not a system folder. So, eliminate it. src/libs is more GNU/Linux conventional and quite easy to understand. Also, the global $system_folder variable is quite misleading based on the name. Due to the fact that there is a src/system folder in the trunk, but the $system_folder does not point to it. I will merge these changes if they are approved. -- https://code.launchpad.net/~fosdevel/aikiframework/file-struct/+merge/64625 Your team Aiki Framework Developers is requested to review the proposed merge of lp:~fosdevel/aikiframework/file-struct into lp:aikiframework.
=== modified file 'Makefile.am' --- Makefile.am 2011-06-14 01:49:52 +0000 +++ Makefile.am 2011-06-15 00:48:33 +0000 @@ -110,9 +110,9 @@ @$(MYSQL) -v -u $(DB_USER) -p$(DB_PASS) \ -e "CREATE DATABASE IF NOT EXISTS $(DB_NAME) \ DEFAULT CHARACTER SET $(DB_ENCODE) COLLATE utf8_general_ci;" \ - && $(CAT) $(abs_top_srcdir)/src/system/sql/CreateTables.sql \ - $(abs_top_srcdir)/src/system/sql/InsertDefaults.sql \ - $(abs_top_builddir)/src/system/sql/InsertVariable.sql \ + && $(CAT) $(abs_top_srcdir)/src/sql/CreateTables.sql \ + $(abs_top_srcdir)/src/sql/InsertDefaults.sql \ + $(abs_top_builddir)/src/sql/InsertVariable.sql \ | $(MYSQL) -B -u $(DB_USER) -p$(DB_PASS) $(DB_NAME) # Additional things to do on install @@ -347,8 +347,8 @@ $$($(FIND) $(srcdir)/ -name stamp-h1) \ $$($(FIND) $(srcdir)/ -name mkinstalldirs) \ $$($(FIND) $(srcdir)/ -type d | $(GREP) stage) \ - $$($(FIND) $(srcdir)/ -type d | $(GREP) \.libs) \ - $$($(FIND) $(srcdir)/ -type d | $(GREP) \.deps) \ + $$($(FIND) $(srcdir)/ -type d | $(GREP) \\.libs) \ + $$($(FIND) $(srcdir)/ -type d | $(GREP) \\.deps) \ $$($(FIND) $(srcdir)/ -type d | $(GREP) autom4te.cache) \ $(abs_top_srcdir)/build/* === modified file 'PACKAGE-LICENSING.in' --- PACKAGE-LICENSING.in 2010-11-23 03:59:51 +0000 +++ PACKAGE-LICENSING.in 2011-06-15 00:48:33 +0000 @@ -23,13 +23,13 @@ Link: http://justinvincent.com/ezsql Download: http://justinvincent.com/wp-content/uploads/2010/10/ez_sql_2.05.zip Files: -@PKG_DATA_DIR@/system/database/index.php -@PKG_DATA_DIR@/system/database/mssql.php -@PKG_DATA_DIR@/system/database/mysql.php -@PKG_DATA_DIR@/system/database/oracle8_9.php -@PKG_DATA_DIR@/system/database/pdo.php -@PKG_DATA_DIR@/system/database/postgresql.php -@PKG_DATA_DIR@/system/database/sqlite.php +@PKG_DATA_DIR@/libs/database/index.php +@PKG_DATA_DIR@/libs/database/mssql.php +@PKG_DATA_DIR@/libs/database/mysql.php +@PKG_DATA_DIR@/libs/database/oracle8_9.php +@PKG_DATA_DIR@/libs/database/pdo.php +@PKG_DATA_DIR@/libs/database/postgresql.php +@PKG_DATA_DIR@/libs/database/sqlite.php jQuery ====== === modified file 'configure.ac' --- configure.ac 2011-06-14 01:49:52 +0000 +++ configure.ac 2011-06-15 00:48:33 +0000 @@ -548,16 +548,15 @@ src/assets/javascript/plupload/Makefile \ src/assets/javascript/plupload/img/Makefile \ src/assets/uploads/Makefile \ - src/system/Makefile \ - src/system/database/Makefile \ - src/system/libraries/Makefile \ - src/system/sql/Makefile \ - src/system/sql/UserExists.sql:src/system/sql/UserExists-in.sql \ - src/system/sql/CreateUser.sql:src/system/sql/CreateUser-in.sql \ - src/system/sql/CreateDatabase.sql:src/system/sql/CreateDatabase-in.sql \ - src/system/sql/InsertVariable.sql:src/system/sql/InsertVariable-in.sql \ - src/system/sql/DropUser.sql:src/system/sql/DropUser-in.sql \ - src/system/sql/DropDatabase.sql:src/system/sql/DropDatabase-in.sql \ + src/libs/database/Makefile \ + src/libs/Makefile \ + src/sql/Makefile \ + src/sql/UserExists.sql:src/sql/UserExists-in.sql \ + src/sql/CreateUser.sql:src/sql/CreateUser-in.sql \ + src/sql/CreateDatabase.sql:src/sql/CreateDatabase-in.sql \ + src/sql/InsertVariable.sql:src/sql/InsertVariable-in.sql \ + src/sql/DropUser.sql:src/sql/DropUser-in.sql \ + src/sql/DropDatabase.sql:src/sql/DropDatabase-in.sql \ src/configs/aiki-defs.php:src/configs/aiki-defs.inc \ src/configs/defs.php:src/configs/defs.inc \ src/configs/z-aiki.conf:src/configs/z-aiki.in \ === modified file 'rpm/spec.in' --- rpm/spec.in 2010-12-28 21:57:27 +0000 +++ rpm/spec.in 2011-06-15 00:48:33 +0000 @@ -130,7 +130,7 @@ # For a breakdown of the licensing, see PACKAGE-LICENSING %doc ChangeLog README README.fedora LICENSE AUTHORS INSTALL VERSION PACKAGE-LICENSING # LGPLv2+ -%{_datadir}/%{name}/system/database/ +%{_datadir}/%{name}/libs/database/ # (MIT or GPLv2) and (MIT or BSD or GPLv2+) and (ASL 2.0 or GPLv2+ or LGPLv2+) %{_datadir}/%{name}/assets/javascript/jquery/ # GPLv2 and BSD and MPLv1.1 @@ -141,10 +141,10 @@ %{_datadir}/%{name}/%{name}.php %{_datadir}/%{name}/index.php %{_datadir}/%{name}/style.php -%{_datadir}/%{name}/system/core.php -%{_datadir}/%{name}/system/widgets.php -%{_datadir}/%{name}/system/sql/ -%{_datadir}/%{name}/system/libraries/ +%{_datadir}/%{name}/libs/core.php +%{_datadir}/%{name}/libs/widgets.php +%{_datadir}/%{name}/sql/ +%{_datadir}/%{name}/libs/ %{_datadir}/%{name}/assets/apps/ %{_datadir}/%{name}/assets/extensions/ %{_datadir}/%{name}/assets/images/ === modified file 'scripts/aiki.in' --- scripts/aiki.in 2011-06-05 07:35:00 +0000 +++ scripts/aiki.in 2011-06-15 00:48:33 +0000 @@ -91,14 +91,14 @@ echo "Checking existing database users" echo "********************************" if test "$(mysql -B -u @DB_SUPER_USER@ -p \ - < @PKG_DATA_DIR@/system/sql/UserExists.sql \ + < @PKG_DATA_DIR@/sql/UserExists.sql \ | grep USER_EXISTS | awk '{print $2}')" == "TRUE"; then echo "Failed, the user @DB_USER@ already exists." else echo "************************************" echo "Attempting creation of database user" echo "************************************" - mysql -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/system/sql/CreateUser.sql + mysql -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/sql/CreateUser.sql fi exit $? };; @@ -107,7 +107,7 @@ echo "************************************" echo "Attempting deletion of database user" echo "************************************" - mysql -B -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/system/sql/DropUser.sql + mysql -B -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/sql/DropUser.sql exit $? };; --create-db | -C) @@ -116,10 +116,10 @@ echo "Attempting creation of database" echo "*******************************" mysql -B -u @DB_USER@ -p@DB_PASS@ \ - < @PKG_DATA_DIR@/system/sql/CreateDatabase.sql \ - && cat @PKG_DATA_DIR@/system/sql/CreateTables.sql \ - @PKG_DATA_DIR@/system/sql/InsertDefaults.sql \ - @PKG_DATA_DIR@/system/sql/InsertVariable.sql \ + < @PKG_DATA_DIR@/sql/CreateDatabase.sql \ + && cat @PKG_DATA_DIR@/sql/CreateTables.sql \ + @PKG_DATA_DIR@/sql/InsertDefaults.sql \ + @PKG_DATA_DIR@/sql/InsertVariable.sql \ | mysql -B -u @DB_USER@ -p@DB_PASS@ @DB_NAME@ \ && echo "Success" exit $? @@ -129,7 +129,7 @@ echo "*******************************" echo "Attempting deletion of database" echo "*******************************" - mysql -B -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/system/sql/DropDatabase.sql + mysql -B -v -u @DB_SUPER_USER@ -p < @PKG_DATA_DIR@/sql/DropDatabase.sql exit $? };; -u) === modified file 'scripts/bone-clean.sh' --- scripts/bone-clean.sh 2011-05-26 19:21:27 +0000 +++ scripts/bone-clean.sh 2011-06-15 00:48:33 +0000 @@ -58,7 +58,7 @@ $(find . -name stamp-h1) \ $(find . -name mkinstalldirs) \ $(find . -type d | grep stage) \ - $(find . -type d | grep \.libs) \ - $(find . -type d | grep \.deps) \ + $(find . -type d | grep \\.libs) \ + $(find . -type d | grep \\.deps) \ $(find . -type d | grep autom4te.cache) fi === modified file 'src/Makefile.am' --- src/Makefile.am 2011-06-06 05:34:28 +0000 +++ src/Makefile.am 2011-06-15 00:48:33 +0000 @@ -27,13 +27,15 @@ SUBDIRS = \ assets \ configs \ - system + libs \ + sql # Subdirectories to distribute DIST_SUBDIRS = \ assets \ configs \ - system + libs \ + sql # Additional files to remove on dist-clean DISTCLEANFILES = .htaccess === modified file 'src/aiki.php' --- src/aiki.php 2011-06-14 01:49:52 +0000 +++ src/aiki.php 2011-06-15 00:48:33 +0000 @@ -25,26 +25,23 @@ * When the MAJOR number changes, the MINOR number should reset to zero. * When the MAJOR number is zero, this indicates an alpha or beta type * release. Each number can, but should probably not exceed 99 */ -define('AIKI_VERSION','0.8.19'); +define('AIKI_VERSION','0.8.20'); /** * Used to test for script access */ define('IN_AIKI', true); -/** - * Determine the full-server path. - * @global string $system_folder +/** Determine the full path to the Aiki root directory. + * @global string $AIKI_ROOT_DIR */ -$system_folder = realpath(dirname(__FILE__)); +$AIKI_ROOT_DIR = realpath(dirname(__FILE__)); // append to the include path while preserving existing entries set_include_path( get_include_path() . PATH_SEPARATOR . - "$system_folder" . - PATH_SEPARATOR . - "$system_folder/system"); + "$AIKI_ROOT_DIR"); /** * @todo these should be set in some class, and are scoped wrong @@ -55,9 +52,9 @@ /** The existence of aiki-defs.php indicates an Automake installation. * @see aiki-defs.inc */ -if (file_exists("$system_folder/configs/aiki-defs.php")) { +if (file_exists("$AIKI_ROOT_DIR/configs/aiki-defs.php")) { /** @see config.php */ - require_once("$system_folder/configs/config.php"); + require_once("$AIKI_ROOT_DIR/configs/config.php"); } /** ENABLE_RUNTIME_INSTALLER is defined by aiki-defs.php which @@ -70,13 +67,13 @@ if (!defined('ENABLE_RUNTIME_INSTALLER') or ENABLE_RUNTIME_INSTALLER == TRUE) { /* use run-time installer config */ - if (file_exists("$system_folder/config.php")) { + if (file_exists("$AIKI_ROOT_DIR/config.php")) { /** @see config.php */ - require_once("$system_folder/config.php"); + require_once("$AIKI_ROOT_DIR/config.php"); } else { /** @see installer.php */ - require("$system_folder/system/libraries/installer.php"); + require("$AIKI_ROOT_DIR/libs/installer.php"); die(); } } @@ -85,14 +82,14 @@ * or "None" and "none". Also if the log_level is not valid * the log will default to disabled. */ /** @see Log.php */ -require_once("$system_folder/system/libraries/Log.php"); +require_once("$AIKI_ROOT_DIR/libs/Log.php"); /** Instantiate a new log for global use * @global Log $log */ $log = new Log($config["log_dir"], $config["log_file"], $config["log_level"], - $system_folder); + $AIKI_ROOT_DIR); /* the following lines are usage examples: $log->message("test message which defaults to debug level"); @@ -106,12 +103,12 @@ * * @see index.php */ -require_once("$system_folder/system/database/index.php"); +require_once("$AIKI_ROOT_DIR/libs/database/index.php"); /** * @see core.php */ -require_once ("$system_folder/system/core.php"); +require_once ("$AIKI_ROOT_DIR/libs/core.php"); /** * Global creation of the aiki instance. === modified file 'src/assets/apps/admin/config.php' --- src/assets/apps/admin/config.php 2011-06-10 08:58:43 +0000 +++ src/assets/apps/admin/config.php 2011-06-15 00:48:33 +0000 @@ -28,7 +28,7 @@ require_once("../../../aiki.php"); /** - * @see /src/system/libraries/membership.php + * @see /src/libs/membership.php */ if ($membership->permissions != "SystemGOD"){ die("You do not have permissions to access this file"); @@ -39,7 +39,7 @@ <root>'; /** - * @see /src/system/database/index.php + * @see /src/libs/database/index.php */ $get_config = $db->get_results("select config_id, config_type from aiki_config order by config_id"); === modified file 'src/assets/apps/admin/database_forms.php' --- src/assets/apps/admin/database_forms.php 2011-06-10 08:58:43 +0000 +++ src/assets/apps/admin/database_forms.php 2011-06-15 00:48:33 +0000 @@ -36,7 +36,7 @@ <root>'; /** - * @see /src/system/database/index.php + * @see /src/libs/database/index.php */ $db->select($config['db_name']); === modified file 'src/assets/apps/admin/events.php' --- src/assets/apps/admin/events.php 2011-06-10 08:58:43 +0000 +++ src/assets/apps/admin/events.php 2011-06-15 00:48:33 +0000 @@ -27,14 +27,14 @@ /** - * @see /src/system/libraries/membership.php + * @see /src/libs/membership.php */ if ($membership->permissions != "SystemGOD"){ die("You do not have permissions to access this file"); } /** - * @see /src/system/database/index.php + * @see /src/libs/database/index.php */ if (!isset($_GET['widget'])){ === modified file 'src/assets/apps/admin/run_sql.php' --- src/assets/apps/admin/run_sql.php 2011-06-10 08:58:43 +0000 +++ src/assets/apps/admin/run_sql.php 2011-06-15 00:48:33 +0000 @@ -33,7 +33,7 @@ } /** - * @see /src/system/database/index.php + * @see /src/libs/database/index.php */ if (isset($_POST['sql_query'])){ $query = stripslashes($_POST['sql_query']); === modified file 'src/assets/apps/image_viewer.php' --- src/assets/apps/image_viewer.php 2011-06-10 08:58:43 +0000 +++ src/assets/apps/image_viewer.php 2011-06-15 00:48:33 +0000 @@ -152,7 +152,7 @@ /** * Begin constructing the URL */ - $get_root = $system_folder."/"; + $get_root = $AIKI_ROOT_DIR."/"; $original_filename = $get_root.$image->full_path.$id; === modified file 'src/assets/javascript/plupload/upload.php' --- src/assets/javascript/plupload/upload.php 2010-11-29 12:34:06 +0000 +++ src/assets/javascript/plupload/upload.php 2011-06-15 00:48:33 +0000 @@ -44,7 +44,7 @@ if (isset($config["plupload_path"])){ - $targetDir = $system_folder."/"; + $targetDir = $AIKI_ROOT_DIR."/"; $targetDir .= $aiki->processVars($config["plupload_path"]); }else{ die("please configure upload_path in aiki settings"); === modified file 'src/configs/config.php' --- src/configs/config.php 2011-06-13 00:09:41 +0000 +++ src/configs/config.php 2011-06-15 00:48:33 +0000 @@ -19,7 +19,7 @@ */ /** @see defs.php */ -require_once("$system_folder/configs/defs.php"); +require_once("$AIKI_ROOT_DIR/configs/defs.php"); /* Do NOT remove the following constant definitions. * The run-time installer should insert the correct values here. === modified file 'src/configs/defs.inc' --- src/configs/defs.inc 2011-06-13 00:09:41 +0000 +++ src/configs/defs.inc 2011-06-15 00:48:33 +0000 @@ -29,9 +29,9 @@ /* the following file should NOT exist * in a run-time installation distribution package */ -if (file_exists("$system_folder/configs/aiki-defs.php")) { +if (file_exists("$AIKI_ROOT_DIR/configs/aiki-defs.php")) { /** @see aiki-defs.php */ - require_once("$system_folder/configs/aiki-defs.php"); + require_once("$AIKI_ROOT_DIR/configs/aiki-defs.php"); } /** Aiki Framework Revision */ === modified file 'src/index.php' --- src/index.php 2011-06-11 06:26:38 +0000 +++ src/index.php 2011-06-15 00:48:33 +0000 @@ -45,7 +45,7 @@ /** * @see widgets.php */ -require_once ("system/widgets.php"); +require_once ("libs/widgets.php"); $layout = new CreateLayout(); /** === added directory 'src/libs' === renamed file 'src/system/libraries/Log.php' => 'src/libs/Log.php' === renamed file 'src/system/libraries/Makefile.am' => 'src/libs/Makefile.am' --- src/system/libraries/Makefile.am 2011-06-11 06:41:06 +0000 +++ src/libs/Makefile.am 2011-06-15 00:48:33 +0000 @@ -40,13 +40,17 @@ text.php \ url.php \ wiki.php \ - Log.php + Log.php \ + core.php \ + widgets.php # Subdirectories to be built -SUBDIRS = +SUBDIRS = \ + database # Subdirectories to distribute -DIST_SUBDIRS = +DIST_SUBDIRS = \ + database # Additional files to distribute EXTRA_DIST = \ @@ -54,7 +58,7 @@ # The directory to put the files aiki_srcdir = \ - $(pkgdatadir)/system/libraries + $(pkgdatadir)/libs # The source data aiki_src_DATA = \ === renamed file 'src/system/libraries/aiki_array.php' => 'src/libs/aiki_array.php' === renamed file 'src/system/libraries/aiki_curl.php' => 'src/libs/aiki_curl.php' === renamed file 'src/system/libraries/bot.php' => 'src/libs/bot.php' --- src/system/libraries/bot.php 2011-06-07 03:10:07 +0000 +++ src/libs/bot.php 2011-06-15 00:48:33 +0000 @@ -461,13 +461,13 @@ } function auto_update_to_latest_aiki(){ - global $system_folder, $db; + global $AIKI_ROOT_DIR, $db; $output = ''; //create tables if one doesn't exists and check structure - $sql_create_tables = file_get_contents("$system_folder/system/sql/CreateTables.sql"); + $sql_create_tables = file_get_contents("$AIKI_ROOT_DIR/sql/CreateTables.sql"); if (false == $sql_create_tables){ - die("<br />FATAL: failed to read file -> $system_folder/system/sql/CreateTables.sql<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/sql/CreateTables.sql<br />"); } define("SQL_DELIMIT",'-- ------------------------------------------------------'); @@ -511,9 +511,9 @@ } //check for default values - $sql_insert_defaults = file_get_contents("$system_folder/system/sql/InsertDefaults.sql"); + $sql_insert_defaults = file_get_contents("$AIKI_ROOT_DIR/sql/InsertDefaults.sql"); if (false == $sql_insert_defaults){ - die("<br />FATAL: failed to read file -> $system_folder/system/sql/InsertDefaults.sql<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/sql/InsertDefaults.sql<br />"); } $output .= "your aiki installation is now up to date using version ".AIKI_VERSION . "." . AIKI_REVISION; === renamed file 'src/system/core.php' => 'src/libs/core.php' --- src/system/core.php 2011-06-11 06:26:38 +0000 +++ src/libs/core.php 2011-06-15 00:48:33 +0000 @@ -35,29 +35,29 @@ * from extensions, then finally tries classname/classname.php. * * @param string $class name of class to be loaded - * @global string $system_folder the system folder + * @global string $AIKI_ROOT_DIR the full path to the Aiki root directory * @return mixed */ public function load($class) { - global $system_folder; + global $AIKI_ROOT_DIR; if (isset($this->$class)) return $this->$class; - if (file_exists($system_folder.'/system/libraries/'.$class.'.php')) + if (file_exists($AIKI_ROOT_DIR.'/libs/'.$class.'.php')) { - require_once($system_folder.'/system/libraries/'.$class.'.php'); + require_once($AIKI_ROOT_DIR.'/libs/'.$class.'.php'); } - elseif(file_exists($system_folder.'/assets/extensions/'.$class.'.php')) + elseif(file_exists($AIKI_ROOT_DIR.'/assets/extensions/'.$class.'.php')) { - require_once($system_folder.'/assets/extensions/'.$class.'.php'); + require_once($AIKI_ROOT_DIR.'/assets/extensions/'.$class.'.php'); } elseif(file_exists( - $system_folder.'/assets/extensions/'.$class.'/'.$class.'.php')) + $AIKI_ROOT_DIR.'/assets/extensions/'.$class.'/'.$class.'.php')) { require_once( - $system_folder.'/assets/extensions/'.$class.'/'.$class.'.php'); + $AIKI_ROOT_DIR.'/assets/extensions/'.$class.'/'.$class.'.php'); } else { return false; === added directory 'src/libs/database' === renamed file 'src/system/database/Makefile.am' => 'src/libs/database/Makefile.am' --- src/system/database/Makefile.am 2011-06-07 03:10:07 +0000 +++ src/libs/database/Makefile.am 2011-06-15 00:48:33 +0000 @@ -39,7 +39,7 @@ # The directory to put the files aiki_srcdir = \ - $(pkgdatadir)/system/database + $(pkgdatadir)/libs/database # The source data aiki_src_DATA = \ === renamed file 'src/system/database/index.php' => 'src/libs/database/index.php' === renamed file 'src/system/database/mssql.php' => 'src/libs/database/mssql.php' === renamed file 'src/system/database/mysql.php' => 'src/libs/database/mysql.php' === renamed file 'src/system/database/oracle8_9.php' => 'src/libs/database/oracle8_9.php' === renamed file 'src/system/database/pdo.php' => 'src/libs/database/pdo.php' === renamed file 'src/system/database/postgresql.php' => 'src/libs/database/postgresql.php' === renamed file 'src/system/database/sqlite.php' => 'src/libs/database/sqlite.php' === renamed file 'src/system/libraries/errors.php' => 'src/libs/errors.php' === renamed file 'src/system/libraries/forms.php' => 'src/libs/forms.php' === renamed file 'src/system/libraries/image.php' => 'src/libs/image.php' === renamed file 'src/system/libraries/input.php' => 'src/libs/input.php' === renamed file 'src/system/libraries/installer.php' => 'src/libs/installer.php' --- src/system/libraries/installer.php 2011-06-13 03:10:01 +0000 +++ src/libs/installer.php 2011-06-15 00:48:33 +0000 @@ -20,20 +20,20 @@ if(!defined('IN_AIKI')){die('No direct script access allowed');} /** @see defs.inc */ -require_once("$system_folder/configs/defs.php"); +require_once("$AIKI_ROOT_DIR/configs/defs.php"); /* setting $config["log_level"] = "NONE" disables the log * or "None" and "none". Also if the log_level is not valid * the log will default to disabled. */ /** @see Log.php */ -require_once("$system_folder/system/libraries/Log.php"); +require_once("$AIKI_ROOT_DIR/libs/Log.php"); /** Instantiate a new log for installer use * Log $log */ $log = new Log(AIKI_LOG_DIR, AIKI_LOG_FILE, AIKI_LOG_LEVEL, - $system_folder); + $AIKI_ROOT_DIR); $log->message("Starting run-time installation", Log::INFO); echo ' @@ -243,14 +243,14 @@ $pageURL = "http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; $page_strlen = strlen($pageURL); - $system_folder_strlen = strlen($system_folder); + $AIKI_ROOT_DIR_strlen = strlen($AIKI_ROOT_DIR); $_SERVER["REQUEST_URI"] = str_replace("index.php", '', $_SERVER["REQUEST_URI"]); /* Read config from file. This way the configurations can be shared with the * other installers and it's much easier to maintain one PHP configuration file */ - $config_file = file_get_contents("$system_folder/configs/config.php"); + $config_file = file_get_contents("$AIKI_ROOT_DIR/configs/config.php"); if (false == $config_file){ - die("<br />FATAL: failed to read file -> $system_folder/configs/config.php<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/configs/config.php<br />"); } $config_file = str_replace("DB_TYPE","\"".$_POST['db_type']."\"",$config_file); $config_file = str_replace("DB_NAME","\"".$_POST['db_name']."\"",$config_file); @@ -279,7 +279,7 @@ } } - $htaccess_file_path = "$system_folder/configs/htaccess.inc"; + $htaccess_file_path = "$AIKI_ROOT_DIR/configs/htaccess.inc"; $htaccess_file = file_get_contents($htaccess_file_path); if ( false == $htaccess_file ) die("<br />WARN: failed to read file $htaccess_file_path<br />"); @@ -293,7 +293,7 @@ $htaccess_file_html = nl2br($htaccess_file); $config_file_name = "config.php"; - $FileHandle = fopen($config_file_name, 'w') or die("<br />Sorry, no permissions to create config.php, please create it in <b>$system_folder</b> with the following: <br /><br />$config_file_html<hr /><br />also please add the following to .htaccess to enable pretty urls:<br /><br /><small>".$htaccess_file_html."</small>"); + $FileHandle = fopen($config_file_name, 'w') or die("<br />Sorry, no permissions to create config.php, please create it in <b>$AIKI_ROOT_DIR</b> with the following: <br /><br />$config_file_html<hr /><br />also please add the following to .htaccess to enable pretty urls:<br /><br /><small>".$htaccess_file_html."</small>"); fwrite($FileHandle, $config_file); fclose($FileHandle); @@ -303,22 +303,22 @@ /* Read SQL from files. This way the SQL statements can be shared with the * other installers and it's much easier to maintain SQL scripts separately * using a SQL supported editor rather than the PHP escaped SQL statements */ - $sql_create_tables = file_get_contents("$system_folder/system/sql/CreateTables.sql"); + $sql_create_tables = file_get_contents("$AIKI_ROOT_DIR/sql/CreateTables.sql"); if (false == $sql_create_tables){ - die("<br />FATAL: failed to read file -> $system_folder/system/sql/CreateTables.sql<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/sql/CreateTables.sql<br />"); } - $sql_insert_defaults = file_get_contents("$system_folder/system/sql/InsertDefaults.sql"); + $sql_insert_defaults = file_get_contents("$AIKI_ROOT_DIR/sql/InsertDefaults.sql"); if (false == $sql_insert_defaults){ - die("<br />FATAL: failed to read file -> $system_folder/system/sql/InsertDefaults.sql<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/sql/InsertDefaults.sql<br />"); } - $sql_insert_variable = file_get_contents("$system_folder/system/sql/InsertVariable-in.sql"); + $sql_insert_variable = file_get_contents("$AIKI_ROOT_DIR/sql/InsertVariable-in.sql"); if (false == $sql_insert_variable){ - die("<br />FATAL: failed to read file -> $system_folder/system/sql/InsertVariable-in.sql<br />"); + die("<br />FATAL: failed to read file -> $AIKI_ROOT_DIR/sql/InsertVariable-in.sql<br />"); } $sql_insert_variable = str_replace("@AIKI_SITE_URL_LEN@",$page_strlen,$sql_insert_variable); $sql_insert_variable = str_replace("@AIKI_SITE_URL@",$pageURL,$sql_insert_variable); - $sql_insert_variable = str_replace("@PKG_DATA_DIR_LEN@",$system_folder_strlen,$sql_insert_variable); - $sql_insert_variable = str_replace("@PKG_DATA_DIR@",$system_folder,$sql_insert_variable); + $sql_insert_variable = str_replace("@PKG_DATA_DIR_LEN@",$AIKI_ROOT_DIR_strlen,$sql_insert_variable); + $sql_insert_variable = str_replace("@PKG_DATA_DIR@",$AIKI_ROOT_DIR,$sql_insert_variable); $sql_insert_variable = str_replace("@ADMIN_USER@",$username,$sql_insert_variable); $sql_insert_variable = str_replace("@ADMIN_NAME@",$full_name,$sql_insert_variable); $sql_insert_variable = str_replace("@ADMIN_PASS@",$admin_password_md5_md5,$sql_insert_variable); === renamed file 'src/system/libraries/languages.php' => 'src/libs/languages.php' === renamed file 'src/system/libraries/membership.php' => 'src/libs/membership.php' === renamed file 'src/system/libraries/message.php' => 'src/libs/message.php' === renamed file 'src/system/libraries/openid.php' => 'src/libs/openid.php' === renamed file 'src/system/libraries/output.php' => 'src/libs/output.php' === renamed file 'src/system/libraries/parser.php' => 'src/libs/parser.php' === renamed file 'src/system/libraries/php.php' => 'src/libs/php.php' === renamed file 'src/system/libraries/records.php' => 'src/libs/records.php' --- src/system/libraries/records.php 2011-06-07 03:10:07 +0000 +++ src/libs/records.php 2011-06-15 00:48:33 +0000 @@ -96,7 +96,7 @@ } public function insert_from_form_to_db($post, $form_id, $form_posted_id){ - global $db, $aiki, $membership, $config, $system_folder; + global $db, $aiki, $membership, $config, $AIKI_ROOT_DIR; if (!$form_posted_id){ return ''; === renamed file 'src/system/libraries/security.php' => 'src/libs/security.php' === renamed file 'src/system/libraries/sql_markup.php' => 'src/libs/sql_markup.php' === renamed file 'src/system/libraries/text.php' => 'src/libs/text.php' === renamed file 'src/system/libraries/url.php' => 'src/libs/url.php' === renamed file 'src/system/widgets.php' => 'src/libs/widgets.php' === renamed file 'src/system/libraries/wiki.php' => 'src/libs/wiki.php' === added directory 'src/sql' === renamed file 'src/system/sql/CreateDatabase-in.sql' => 'src/sql/CreateDatabase-in.sql' === renamed file 'src/system/sql/CreateTables.sql' => 'src/sql/CreateTables.sql' --- src/system/sql/CreateTables.sql 2011-06-14 06:38:54 +0000 +++ src/sql/CreateTables.sql 2011-06-15 00:48:33 +0000 @@ -19,8 +19,8 @@ * * IMPORTANT in between each pair of SQL statements there must * exist a comment line with a precise series of dashes. - * These are delimiters used by system/libraries/installer.php - * For more info see SQL_DELIMIT in system/libraries/installer.php. + * These are delimiters used by libs/installer.php + * For more info see SQL_DELIMIT in libs/installer.php. */ CREATE TABLE IF NOT EXISTS aiki_config ( === renamed file 'src/system/sql/CreateUser-in.sql' => 'src/sql/CreateUser-in.sql' --- src/system/sql/CreateUser-in.sql 2011-06-11 06:34:17 +0000 +++ src/sql/CreateUser-in.sql 2011-06-15 00:48:33 +0000 @@ -19,8 +19,8 @@ * * IMPORTANT in between each pair of SQL statements there must * exist a comment line with a precise series of dashes. - * These are delimiters used by system/libraries/installer.php - * For more info see SQL_DELIMIT in system/libraries/installer.php. + * These are delimiters used by libs/installer.php + * For more info see SQL_DELIMIT in libs/installer.php. */ CREATE USER '@DB_USER@'@'@DB_HOST@' IDENTIFIED BY '@DB_PASS@'; === renamed file 'src/system/sql/DropDatabase-in.sql' => 'src/sql/DropDatabase-in.sql' === renamed file 'src/system/sql/DropUser-in.sql' => 'src/sql/DropUser-in.sql' --- src/system/sql/DropUser-in.sql 2011-06-11 06:34:17 +0000 +++ src/sql/DropUser-in.sql 2011-06-15 00:48:33 +0000 @@ -19,8 +19,8 @@ * * IMPORTANT in between each pair of SQL statements there must * exist a comment line with a precise series of dashes. - * These are delimiters used by system/libraries/installer.php - * For more info see SQL_DELIMIT in system/libraries/installer.php. + * These are delimiters used by libs/installer.php + * For more info see SQL_DELIMIT in libs/installer.php. */ GRANT USAGE ON *.* TO '@DB_USER@'@'@DB_HOST@'; === renamed file 'src/system/sql/InsertDefaults.sql' => 'src/sql/InsertDefaults.sql' --- src/system/sql/InsertDefaults.sql 2011-06-11 00:10:41 +0000 +++ src/sql/InsertDefaults.sql 2011-06-15 00:48:33 +0000 @@ -19,8 +19,8 @@ * * IMPORTANT in between each pair of SQL statements there must * exist a comment line with a precise series of dashes. - * These are delimiters used by system/libraries/installer.php - * For more info see SQL_DELIMIT in system/libraries/installer.php. + * These are delimiters used by libs/installer.php + * For more info see SQL_DELIMIT in libs/installer.php. */ INSERT IGNORE INTO `aiki_dictionary` (`term_id`, `app_id`, `short_term`, `lang_english`, `lang_arabic`, `lang_german`, `lang_chinese`) VALUES === renamed file 'src/system/sql/InsertVariable-in.sql' => 'src/sql/InsertVariable-in.sql' --- src/system/sql/InsertVariable-in.sql 2011-06-14 06:38:54 +0000 +++ src/sql/InsertVariable-in.sql 2011-06-15 00:48:33 +0000 @@ -19,8 +19,8 @@ * * IMPORTANT in between each pair of SQL statements there must * exist a comment line with a precise series of dashes. - * These are delimiters used by system/libraries/installer.php - * For more info see SQL_DELIMIT in system/libraries/installer.php. + * These are delimiters used by libs/installer.php + * For more info see SQL_DELIMIT in libs/installer.php. */ INSERT IGNORE INTO `aiki_config` (`config_id`, `app_id`, `config_type`, `config_data`) VALUES === renamed file 'src/system/sql/Makefile.am' => 'src/sql/Makefile.am' --- src/system/sql/Makefile.am 2011-06-07 03:10:07 +0000 +++ src/sql/Makefile.am 2011-06-15 00:48:33 +0000 @@ -51,7 +51,7 @@ # The directory to put the files aiki_sqldir = \ - $(pkgdatadir)/system/sql + $(pkgdatadir)/sql # The config data aiki_sql_DATA = \ === renamed file 'src/system/sql/UserExists-in.sql' => 'src/sql/UserExists-in.sql' === removed directory 'src/system' === removed file 'src/system/Makefile.am' --- src/system/Makefile.am 2011-06-07 03:10:07 +0000 +++ src/system/Makefile.am 1970-01-01 00:00:00 +0000 @@ -1,47 +0,0 @@ -# Process this file with automake to produce Makefile.in -*-Makefile-*- - -# Copyright (c) 2010-2011 Aiki Lab Pte Ltd - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Written by Steven Garcia - -# The source files -aiki_src_files = \ - core.php \ - widgets.php - -# Subdirectories to be built -SUBDIRS = \ - database \ - libraries \ - sql - -# Subdirectories to distribute -DIST_SUBDIRS = \ - database \ - libraries \ - sql - -# Additional files to distribute -EXTRA_DIST = \ - $(aiki_src_files) - -# The directory to put the files -aiki_srcdir = \ - $(pkgdatadir)/system - -# The source data -aiki_src_DATA = \ - $(aiki_src_files) === removed directory 'src/system/database' === removed directory 'src/system/libraries' === removed directory 'src/system/sql' === modified file 'tests/Makefile.am' --- tests/Makefile.am 2011-06-14 01:49:52 +0000 +++ tests/Makefile.am 2011-06-15 00:48:33 +0000 @@ -32,7 +32,7 @@ EXTRA_DIST = \ $(aiki_test_files) \ assets \ - system + libs # Additional things to do on dist dist-hook : === added directory 'tests/libs' === renamed file 'tests/system/libraries/LogTest.php' => 'tests/libs/LogTest.php' --- tests/system/libraries/LogTest.php 2011-06-14 02:24:18 +0000 +++ tests/libs/LogTest.php 2011-06-15 00:48:33 +0000 @@ -20,7 +20,7 @@ /** define this for script access */ define("IN_AIKI", TRUE); -require_once("system/libraries/Log.php"); +require_once("libs/Log.php"); /** To test protected properties and methods */ class TestLog extends Log { === modified file 'tests/phpunit.xml' --- tests/phpunit.xml 2011-06-14 01:49:52 +0000 +++ tests/phpunit.xml 2011-06-15 00:48:33 +0000 @@ -13,7 +13,7 @@ verbose="true"> <testsuites> <testsuite name="Aiki Test Suite"> - <file>system/libraries/LogTest.php</file> + <file>libs/LogTest.php</file> </testsuite> </testsuites> </phpunit> === removed directory 'tests/system' === removed directory 'tests/system/libraries'
_______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp