Update DataMapper even if it's not needed
This commit is contained in:
@@ -1,33 +1,22 @@
|
|||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data Mapper Configuration
|
* Data Mapper Configuration
|
||||||
*
|
*
|
||||||
* Global configuration settings that apply to all DataMapped models.
|
* Global configuration settings that apply to all DataMapped models.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$config['prefix'] = '';
|
$config['prefix'] = '';
|
||||||
$config['join_prefix'] = '';
|
$config['join_prefix'] = '';
|
||||||
$config['error_prefix'] = '<p>';
|
$config['error_prefix'] = '<p>';
|
||||||
$config['error_suffix'] = '</p>';
|
$config['error_suffix'] = '</p>';
|
||||||
$config['created_field'] = 'created';
|
$config['created_field'] = 'created';
|
||||||
$config['updated_field'] = 'updated';
|
$config['updated_field'] = 'updated';
|
||||||
$config['local_time'] = FALSE;
|
$config['local_time'] = FALSE;
|
||||||
$config['unix_timestamp'] = FALSE;
|
$config['unix_timestamp'] = FALSE;
|
||||||
$config['timestamp_format'] = '';
|
$config['auto_transaction'] = FALSE;
|
||||||
$config['lang_file_format'] = 'model_${model}';
|
$config['auto_populate_has_many'] = FALSE;
|
||||||
$config['field_label_lang_format'] = '${model}_${field}';
|
$config['auto_populate_has_one'] = FALSE;
|
||||||
$config['auto_transaction'] = FALSE;
|
|
||||||
$config['auto_populate_has_many'] = FALSE;
|
/* End of file datamapper.php */
|
||||||
$config['auto_populate_has_one'] = FALSE;
|
|
||||||
$config['all_array_uses_ids'] = FALSE;
|
|
||||||
// set to FALSE to use the same DB instance across the board (breaks subqueries)
|
|
||||||
// Set to any acceptable parameters to $CI->database() to override the default.
|
|
||||||
$config['db_params'] = '';
|
|
||||||
// Uncomment to enable the production cache
|
|
||||||
// $config['production_cache'] = 'datamapper/cache';
|
|
||||||
$config['extensions_path'] = 'datamapper';
|
|
||||||
$config['extensions'] = array();
|
|
||||||
|
|
||||||
/* End of file datamapper.php */
|
|
||||||
/* Location: ./application/config/datamapper.php */
|
/* Location: ./application/config/datamapper.php */
|
||||||
@@ -1,236 +1,215 @@
|
|||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CodeIgniter Inflector Helpers
|
* CodeIgniter Inflector Helpers
|
||||||
*
|
*
|
||||||
* Customised singular and plural helpers.
|
* Customised singular and plural helpers.
|
||||||
*
|
*
|
||||||
* @package CodeIgniter
|
* @package CodeIgniter
|
||||||
* @subpackage Helpers
|
* @subpackage Helpers
|
||||||
* @category Helpers
|
* @category Helpers
|
||||||
* @author ExpressionEngine Dev Team, stensi
|
* @author ExpressionEngine Dev Team, stensi
|
||||||
* @link http://codeigniter.com/user_guide/helpers/inflector_helper.html
|
* @link http://codeigniter.com/user_guide/helpers/directory_helper.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Singular
|
* Singular
|
||||||
*
|
*
|
||||||
* Takes a plural word and makes it singular (improved by stensi)
|
* Takes a plural word and makes it singular (improved by stensi)
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string
|
* @param string
|
||||||
* @return str
|
* @return str
|
||||||
*/
|
*/
|
||||||
if ( ! function_exists('singular'))
|
if ( ! function_exists('singular'))
|
||||||
{
|
{
|
||||||
function singular($str)
|
function singular($str)
|
||||||
{
|
{
|
||||||
$str = strtolower(trim($str));
|
$str = strtolower(trim($str));
|
||||||
$end5 = substr($str, -5);
|
$end5 = substr($str, -5);
|
||||||
$end4 = substr($str, -4);
|
$end4 = substr($str, -4);
|
||||||
$end3 = substr($str, -3);
|
$end3 = substr($str, -3);
|
||||||
$end2 = substr($str, -2);
|
$end2 = substr($str, -2);
|
||||||
$end1 = substr($str, -1);
|
$end1 = substr($str, -1);
|
||||||
|
|
||||||
if ($end5 == 'eives')
|
if ($end5 == 'eives')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -3).'f';
|
$str = substr($str, 0, -3).'f';
|
||||||
}
|
}
|
||||||
elseif ($end4 == 'eaux')
|
elseif ($end4 == 'eaux')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -1);
|
$str = substr($str, 0, -1);
|
||||||
}
|
}
|
||||||
elseif ($end4 == 'ives')
|
elseif ($end4 == 'ives')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -3).'fe';
|
$str = substr($str, 0, -3).'fe';
|
||||||
}
|
}
|
||||||
elseif ($end3 == 'ves')
|
elseif ($end3 == 'ves')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -3).'f';
|
$str = substr($str, 0, -3).'f';
|
||||||
}
|
}
|
||||||
elseif ($end3 == 'ies')
|
elseif ($end3 == 'ies')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -3).'y';
|
$str = substr($str, 0, -3).'y';
|
||||||
}
|
}
|
||||||
elseif ($end3 == 'men')
|
elseif ($end3 == 'men')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -2).'an';
|
$str = substr($str, 0, -2).'an';
|
||||||
}
|
}
|
||||||
elseif ($end3 == 'xes' && strlen($str) > 4 OR in_array($end3, array('ses', 'hes', 'oes')))
|
elseif ($end3 == 'xes' && strlen($str) > 4 OR in_array($end3, array('ses', 'hes', 'oes')))
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -2);
|
$str = substr($str, 0, -2);
|
||||||
}
|
}
|
||||||
elseif (in_array($end2, array('da', 'ia', 'la')))
|
elseif (in_array($end2, array('da', 'ia', 'la')))
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -1).'um';
|
$str = substr($str, 0, -1).'um';
|
||||||
}
|
}
|
||||||
elseif (in_array($end2, array('bi', 'ei', 'gi', 'li', 'mi', 'pi')))
|
elseif (in_array($end2, array('bi', 'ei', 'gi', 'li', 'mi', 'pi')))
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -1).'us';
|
$str = substr($str, 0, -1).'us';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($end1 == 's' && $end2 != 'us' && $end2 != 'ss')
|
if ($end1 == 's')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -1);
|
$str = substr($str, 0, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plural
|
* Plural
|
||||||
*
|
*
|
||||||
* Takes a singular word and makes it plural (improved by stensi)
|
* Takes a singular word and makes it plural (improved by stensi)
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string
|
* @param string
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return str
|
* @return str
|
||||||
*/
|
*/
|
||||||
if ( ! function_exists('plural'))
|
if ( ! function_exists('plural'))
|
||||||
{
|
{
|
||||||
function plural($str, $force = FALSE)
|
function plural($str, $force = FALSE)
|
||||||
{
|
{
|
||||||
$str = strtolower(trim($str));
|
$str = strtolower(trim($str));
|
||||||
$end3 = substr($str, -3);
|
$end3 = substr($str, -3);
|
||||||
$end2 = substr($str, -2);
|
$end1 = substr($str, -1);
|
||||||
$end1 = substr($str, -1);
|
|
||||||
|
if ($end3 == 'eau')
|
||||||
if ($end3 == 'eau')
|
{
|
||||||
{
|
$str .= 'x';
|
||||||
$str .= 'x';
|
}
|
||||||
}
|
elseif ($end3 == 'man')
|
||||||
elseif ($end3 == 'man')
|
{
|
||||||
{
|
$str = substr($str, 0, -2).'en';
|
||||||
$str = substr($str, 0, -2).'en';
|
}
|
||||||
}
|
elseif (in_array($end3, array('dum', 'ium', 'lum')))
|
||||||
elseif (in_array($end3, array('dum', 'ium', 'lum')))
|
{
|
||||||
{
|
$str = substr($str, 0, -2).'a';
|
||||||
$str = substr($str, 0, -2).'a';
|
}
|
||||||
}
|
elseif (strlen($str) > 4 && in_array($end3, array('bus', 'eus', 'gus', 'lus', 'mus', 'pus')))
|
||||||
elseif (strlen($str) > 4 && in_array($end3, array('bus', 'eus', 'gus', 'lus', 'mus', 'pus')))
|
{
|
||||||
{
|
$str = substr($str, 0, -2).'i';
|
||||||
$str = substr($str, 0, -2).'i';
|
}
|
||||||
}
|
elseif ($end3 == 'ife')
|
||||||
elseif ($end3 == 'ife')
|
{
|
||||||
{
|
$str = substr($str, 0, -2).'ves';
|
||||||
$str = substr($str, 0, -2).'ves';
|
}
|
||||||
}
|
elseif ($end1 == 'f')
|
||||||
elseif ($end1 == 'f')
|
{
|
||||||
{
|
$str = substr($str, 0, -1).'ves';
|
||||||
$str = substr($str, 0, -1).'ves';
|
}
|
||||||
}
|
elseif ($end1 == 'y')
|
||||||
elseif ($end1 == 'y')
|
{
|
||||||
{
|
$str = substr($str, 0, -1).'ies';
|
||||||
if(preg_match('#[aeiou]y#i', $end2))
|
}
|
||||||
{
|
elseif (in_array($end1, array('h', 'o', 'x')))
|
||||||
// ays, oys, etc.
|
{
|
||||||
$str = $str . 's';
|
$str .= 'es';
|
||||||
}
|
}
|
||||||
else
|
elseif ($end1 == 's')
|
||||||
{
|
{
|
||||||
$str = substr($str, 0, -1).'ies';
|
if ($force == TRUE)
|
||||||
}
|
{
|
||||||
}
|
$str .= 'es';
|
||||||
elseif ($end1 == 'o')
|
}
|
||||||
{
|
}
|
||||||
if(preg_match('#[aeiou]o#i', $end2))
|
else
|
||||||
{
|
{
|
||||||
// oos, etc.
|
$str .= 's';
|
||||||
$str = $str . 's';
|
}
|
||||||
}
|
|
||||||
else
|
return $str;
|
||||||
{
|
}
|
||||||
$str .= 'es';
|
}
|
||||||
}
|
|
||||||
}
|
// --------------------------------------------------------------------
|
||||||
elseif ($end1 == 'x' || in_array($end2, array('ss', 'ch', 'sh')) )
|
|
||||||
{
|
/**
|
||||||
$str .= 'es';
|
* Camelize
|
||||||
}
|
*
|
||||||
elseif ($end1 == 's')
|
* Takes multiple words separated by spaces or underscores and camelizes them
|
||||||
{
|
*
|
||||||
if ($force == TRUE)
|
* @access public
|
||||||
{
|
* @param string
|
||||||
$str .= 'es';
|
* @return str
|
||||||
}
|
*/
|
||||||
}
|
if ( ! function_exists('camelize'))
|
||||||
else
|
{
|
||||||
{
|
function camelize($str)
|
||||||
$str .= 's';
|
{
|
||||||
}
|
$str = 'x'.strtolower(trim($str));
|
||||||
|
$str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
|
||||||
return $str;
|
return substr(str_replace(' ', '', $str), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Camelize
|
* Underscore
|
||||||
*
|
*
|
||||||
* Takes multiple words separated by spaces or underscores and camelizes them
|
* Takes multiple words separated by spaces and underscores them
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string
|
* @param string
|
||||||
* @return str
|
* @return str
|
||||||
*/
|
*/
|
||||||
if ( ! function_exists('camelize'))
|
if ( ! function_exists('underscore'))
|
||||||
{
|
{
|
||||||
function camelize($str)
|
function underscore($str)
|
||||||
{
|
{
|
||||||
$str = 'x'.strtolower(trim($str));
|
return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
|
||||||
$str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
|
}
|
||||||
return substr(str_replace(' ', '', $str), 1);
|
}
|
||||||
}
|
|
||||||
}
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
/**
|
||||||
|
* Humanize
|
||||||
/**
|
*
|
||||||
* Underscore
|
* Takes multiple words separated by underscores and changes them to spaces
|
||||||
*
|
*
|
||||||
* Takes multiple words separated by spaces and underscores them
|
* @access public
|
||||||
*
|
* @param string
|
||||||
* @access public
|
* @return str
|
||||||
* @param string
|
*/
|
||||||
* @return str
|
if ( ! function_exists('humanize'))
|
||||||
*/
|
{
|
||||||
if ( ! function_exists('underscore'))
|
function humanize($str)
|
||||||
{
|
{
|
||||||
function underscore($str)
|
return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
|
||||||
{
|
}
|
||||||
return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
|
}
|
||||||
}
|
|
||||||
}
|
/* End of file inflector_helper.php */
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Humanize
|
|
||||||
*
|
|
||||||
* Takes multiple words separated by underscores and changes them to spaces
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @return str
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('humanize'))
|
|
||||||
{
|
|
||||||
function humanize($str)
|
|
||||||
{
|
|
||||||
return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of file inflector_helper.php */
|
|
||||||
/* Location: ./application/helpers/inflector_helper.php */
|
/* Location: ./application/helpers/inflector_helper.php */
|
||||||
@@ -1,25 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$lang['alpha_dash_dot'] = 'The %s field may only contain alpha-numeric characters, underscores, dashes, and full stops.';
|
$lang['alpha_dash_dot'] = 'The %s field may only contain alpha-numeric characters, underscores, dashes, and full stops.';
|
||||||
$lang['alpha_slash_dot'] = 'The %s field may only contain alpha-numeric characters, underscores, dashes, slashes, and full stops.';
|
$lang['alpha_slash_dot'] = 'The %s field may only contain alpha-numeric characters, underscores, dashes, slashes, and full stops.';
|
||||||
$lang['min_date'] = 'The %s field must be at least %s.';
|
$lang['min_date'] = 'The %s field must be at least %s.';
|
||||||
$lang['max_date'] = 'The %s field can not exceed %s.';
|
$lang['max_date'] = 'The %s field can not exceed %s.';
|
||||||
$lang['min_size'] = 'The %s field must be at least %s.';
|
$lang['min_size'] = 'The %s field must be at least %s.';
|
||||||
$lang['max_size'] = 'The %s field can not exceed %s.';
|
$lang['max_size'] = 'The %s field can not exceed %s.';
|
||||||
$lang['transaction'] = 'The %s failed to %s.';
|
$lang['transaction'] = 'The %s failed to %s.';
|
||||||
$lang['unique'] = 'The %s you supplied is already taken.';
|
$lang['unique'] = 'The %s you supplied is already taken.';
|
||||||
$lang['unique_pair'] = 'The combination of %s and %s you supplied is already taken.';
|
$lang['unique_pair'] = 'The combination of %s and %s you supplied is already taken.';
|
||||||
$lang['valid_date'] = 'The %s field must contain a valid date.';
|
$lang['valid_date'] = 'The %s field must contain a valid date.';
|
||||||
$lang['valid_date_group'] = 'The %2$s fields must contain a valid date.';
|
$lang['valid_date_group'] = 'The %2$s fields must contain a valid date.';
|
||||||
$lang['valid_match'] = 'The %s field may only be %s.';
|
$lang['valid_match'] = 'The %s field may only be %s.';
|
||||||
|
|
||||||
$lang['related_required'] = 'The %s relationship is required.';
|
$lang['related_required'] = 'The %s relationship is required.';
|
||||||
$lang['related_min_size'] = 'The %s relationship must be at least %s.';
|
$lang['related_min_size'] = 'The %s relationship must be at least %s.';
|
||||||
$lang['related_max_size'] = 'The %s relationship can not exceed %s.';
|
$lang['related_max_size'] = 'The %s relationship can not exceed %s.';
|
||||||
|
|
||||||
$lang['dm_save_rel_failed'] = 'The %s relationship is not properly defined.';
|
/* End of file datamapper_lang.php */
|
||||||
$lang['dm_save_rel_nothis'] = 'Unable to save the %s relationship: This object is not saved.';
|
/* Location: ./application/language/english/datamapper_lang.php */
|
||||||
$lang['dm_save_rel_noobj'] = 'Unable to save the %s relationship: The related object was not saved.';
|
|
||||||
|
|
||||||
/* End of file datamapper_lang.php */
|
|
||||||
/* Location: ./application/language/english/datamapper_lang.php */
|
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user