summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-03 19:21:39 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-03 19:21:39 +0200
commit320d37c090cbc1497d3951f64da1c16e86bae609 (patch)
tree51e1bf36e4d63e233e0b9b550420805d65548945 /system/libraries/Migration.php
parent31cf46eaec3b4613d5b46f9caed8bdd346b581cc (diff)
parent78f55772adb86b48d0d50572545c24c18f528ff9 (diff)
Merge upstream branch
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php26
1 files changed, 8 insertions, 18 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index c045ac0e2..a18fcb9f1 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -25,8 +25,6 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* Migration Class
*
@@ -71,7 +69,7 @@ class CI_Migration {
}
// If not set, set it
- $this->_migration_path == '' AND $this->_migration_path = APPPATH.'migrations/';
+ $this->_migration_path != '' OR $this->_migration_path = APPPATH.'migrations/';
// Add trailing slash if not set
$this->_migration_path = rtrim($this->_migration_path, '/').'/';
@@ -101,7 +99,7 @@ class CI_Migration {
}
// Do we auto migrate to the latest migration?
- if ($this->_migration_auto_latest === TRUE AND ! $this->latest())
+ if ($this->_migration_auto_latest === TRUE && ! $this->latest())
{
show_error($this->error_string());
}
@@ -115,8 +113,7 @@ class CI_Migration {
* Calls each migration step required to get to the schema version of
* choice
*
- * @access public
- * @param $version integer Target schema version
+ * @param int Target schema version
* @return mixed TRUE if already latest, FALSE if failed, int if upgraded
*/
public function version($target_version)
@@ -241,7 +238,6 @@ class CI_Migration {
/**
* Set's the schema to the latest migration
*
- * @access public
* @return mixed true if already latest, false if failed, int if upgraded
*/
public function latest()
@@ -264,7 +260,6 @@ class CI_Migration {
/**
* Set's the schema to the migration version set in config
*
- * @access public
* @return mixed true if already current, false if failed, int if upgraded
*/
public function current()
@@ -277,7 +272,6 @@ class CI_Migration {
/**
* Error string
*
- * @access public
* @return string Error message returned as a string
*/
public function error_string()
@@ -290,7 +284,6 @@ class CI_Migration {
/**
* Set's the schema to the latest migration
*
- * @access protected
* @return mixed true if already latest, false if failed, int if upgraded
*/
protected function find_migrations()
@@ -317,8 +310,7 @@ class CI_Migration {
/**
* Retrieves current schema version
*
- * @access protected
- * @return integer Current Migration
+ * @return int Current Migration
*/
protected function _get_version()
{
@@ -331,9 +323,8 @@ class CI_Migration {
/**
* Stores the current schema version
*
- * @access protected
- * @param $migrations integer Migration reached
- * @return void Outputs a report of the migration
+ * @param int Migration reached
+ * @return void Outputs a report of the migration
*/
protected function _update_version($migrations)
{
@@ -347,8 +338,7 @@ class CI_Migration {
/**
* Enable the use of CI super-global
*
- * @access public
- * @param $var
+ * @param $var
* @return mixed
*/
public function __get($var)
@@ -358,4 +348,4 @@ class CI_Migration {
}
/* End of file Migration.php */
-/* Location: ./system/libraries/Migration.php */
+/* Location: ./system/libraries/Migration.php */ \ No newline at end of file