From 57b9e5c5350ffb20048d36c508d1e310603b12f8 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 31 Oct 2006 07:11:36 +0000 Subject: --- system/libraries/Ftp.php | 4 +- system/libraries/Model.php | 9 +-- user_guide/general/multiple_apps.html | 139 ---------------------------------- user_guide/libraries/loader.html | 11 --- 4 files changed, 4 insertions(+), 159 deletions(-) delete mode 100644 user_guide/general/multiple_apps.html diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index 3b2be23d5..1572a587c 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -178,7 +178,7 @@ class CI_FTP { if ($result === FALSE) { - if ($this->debug == TRUE AND $supress_debug != TRUE) + if ($this->debug == TRUE AND $supress_debug == FALSE) { $this->_error('ftp_unable_to_changedir'); } @@ -251,7 +251,7 @@ class CI_FTP { // Set the mode if not specified if ($mode == 'auto') { - // Get the file extension so we can se the upload type + // Get the file extension so we can set the upload type $ext = $this->_getext($locpath); $mode = $this->_settype($ext); } diff --git a/system/libraries/Model.php b/system/libraries/Model.php index 1c2b7afce..6f4f7e7ef 100644 --- a/system/libraries/Model.php +++ b/system/libraries/Model.php @@ -40,12 +40,7 @@ class Model { // We don't want to assign the model object to itself when using the // assign_libraries function below so we'll grab the name of the model parent - $methods = get_class_methods($this); - - if (isset($methods[0])) - { - $this->_parent_name = $methods[0]; - } + $this->_parent_name = ucfirst(get_class($this)); log_message('debug', "Model Class Initialized"); } @@ -65,7 +60,7 @@ class Model { foreach (array_keys(get_object_vars($CI)) as $key) { if ( ! isset($this->$key) AND $key != $this->_parent_name) - { + { // In some cases using references can cause // problems so we'll conditionally use them if ($use_reference == TRUE) diff --git a/user_guide/general/multiple_apps.html b/user_guide/general/multiple_apps.html deleted file mode 100644 index 387368b62..000000000 --- a/user_guide/general/multiple_apps.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - -Code Igniter User Guide - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

Code Igniter User Guide Version 1.5.0

-
- - - - - - - - - -
- - -
- - - -
- -

Managing your Applications

- -

By default it is assumed that you only intend to use Code Igniter to manage one application, which you will build in your -system/application/ directory. It is possible, however, to have multiple sets of applications that share a single -Code Igniter installation, or even to rename or relocate your application folder.

- -

Renaming the Application Folder

- -

If you would like to rename your applicaiton folder you may do so as long as you open your main index.php -file and set its name using the $application_folder variable:

- -$application_folder = "application"; - -

Relocating your Application Folder

- -

It is possible to move your application folder to a different location on your server than your system folder. -To do so open your main index.php and set a full server path in the $application_folder variable.

- - -$application_folder = "/Path/to/your/application"; - - -

Running Multiple Applications with one Code Igniter Installation

- -

If you would like to share a common Code Igniter installation to manage several different applications simply -put all of the directories located inside your application folder into their -own sub-folder.

- -

For example, let's say you want to create two applications, "foo" and "bar". You will structure your -application folder like this: - -system/application/foo/
-system/application/foo/config/
-system/application/foo/controllers/
-system/application/foo/errors/
-system/application/foo/libraries/
-system/application/foo/models/
-system/application/foo/views/
-system/application/bar/
-system/application/bar/config/
-system/application/bar/controllers/
-system/application/bar/errors/
-system/application/bar/libraries/
-system/application/bar/models/
-system/application/bar/views/
- - -

To select a particular application for use requires that you open your main index.php file and set the $application_folder -variable. For example, to select the "foo" application for use you would do this:

- -$application_folder = "application/foo"; - -

Note:  Each of your applications will need its own index.php file which -calls the desired application. The index.php file can be named anything you want.

- - - - - -
- - - - - - - \ No newline at end of file diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index 61ed6bff8..c7cf82d40 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -88,17 +88,6 @@ Each library is described in detail in its own page, so please read the informat

Parameters can be passed to the library via an array in the second parameter. - -

If you would like your libraries assigned to a different variable name then the default you can specify the name in the second parameter:

- - -$this->load->library('email', 'E'); // Assigns the email object to "E"
-
-$this->E->some_function() -
- - -

$this->load->view('file_name', $data, true/false)

This function is used to load your View files. If you haven't read the Views section of the -- cgit v1.2.3-24-g4f1b