Remove deprecated use of the EXT constant
This commit is contained in:
@@ -79,13 +79,13 @@ class MY_Lang extends CI_Lang {
|
|||||||
* @see CI_Lang::load()
|
* @see CI_Lang::load()
|
||||||
*/
|
*/
|
||||||
public function load($langfile = '', $idiom = '', $return = false, $add_suffix = true, $alt_path = '') {
|
public function load($langfile = '', $idiom = '', $return = false, $add_suffix = true, $alt_path = '') {
|
||||||
$langfile = str_replace(EXT, '', $langfile);
|
$langfile = str_replace('.php', '', $langfile);
|
||||||
|
|
||||||
if ($add_suffix == true) {
|
if ($add_suffix == true) {
|
||||||
$langfile = str_replace('_lang.', '', $langfile) . '_lang';
|
$langfile = str_replace('_lang.', '', $langfile) . '_lang';
|
||||||
}
|
}
|
||||||
|
|
||||||
$langfile .= EXT;
|
$langfile .= '.php';
|
||||||
|
|
||||||
if (in_array($langfile, $this->is_loaded, true)) {
|
if (in_array($langfile, $this->is_loaded, true)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class Assets {
|
|||||||
// $httpHeaders .= '';
|
// $httpHeaders .= '';
|
||||||
// }
|
// }
|
||||||
// $code = $httpHeaders . "\n" . $code;
|
// $code = $httpHeaders . "\n" . $code;
|
||||||
// file_put_contents(FCPATH . $this->cacheFolder . $type . '_' . md5($code) . EXT, $code);
|
// file_put_contents(FCPATH . $this->cacheFolder . $type . '_' . md5($code) . '.php', $code);
|
||||||
$output = '<script src="' . $this->CI->config->slash_item('base_url') . $filepath . '" language="javascript" type="text/javascript"></script>';
|
$output = '<script src="' . $this->CI->config->slash_item('base_url') . $filepath . '" language="javascript" type="text/javascript"></script>';
|
||||||
$output .= "\n";
|
$output .= "\n";
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class DataMapper {
|
|||||||
$path = APPPATH . 'models';
|
$path = APPPATH . 'models';
|
||||||
|
|
||||||
// Prepare file
|
// Prepare file
|
||||||
$file = $path . '/' . $class . EXT;
|
$file = $path . '/' . $class . '.php';
|
||||||
|
|
||||||
// Check if file exists, require_once if it does
|
// Check if file exists, require_once if it does
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
@@ -222,7 +222,7 @@ class DataMapper {
|
|||||||
$recursive_path = $path . '/' . $dir;
|
$recursive_path = $path . '/' . $dir;
|
||||||
|
|
||||||
// Prepare file
|
// Prepare file
|
||||||
$file = $recursive_path . '/' . $class . EXT;
|
$file = $recursive_path . '/' . $class . '.php';
|
||||||
|
|
||||||
// Check if file exists, require_once if it does
|
// Check if file exists, require_once if it does
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
@@ -564,7 +564,7 @@ class DataMapper {
|
|||||||
if (count($data) == 1 && isset($data[$this->updated_field]))
|
if (count($data) == 1 && isset($data[$this->updated_field]))
|
||||||
{
|
{
|
||||||
// Revert updated
|
// Revert updated
|
||||||
$this->{$this->updated_field} = $this->stored->{$this->updated_field};
|
$this->{$this->updated_field} = $this->stored->{$this->updated_field};
|
||||||
|
|
||||||
// Unset it
|
// Unset it
|
||||||
unset($data[$this->updated_field]);
|
unset($data[$this->updated_field]);
|
||||||
@@ -811,7 +811,7 @@ class DataMapper {
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1896,7 +1896,7 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function start_cache()
|
function start_cache()
|
||||||
{
|
{
|
||||||
$this->db->start_cache();
|
$this->db->start_cache();
|
||||||
@@ -1911,7 +1911,7 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function stop_cache()
|
function stop_cache()
|
||||||
{
|
{
|
||||||
$this->db->stop_cache();
|
$this->db->stop_cache();
|
||||||
@@ -1926,9 +1926,9 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function flush_cache()
|
function flush_cache()
|
||||||
{
|
{
|
||||||
$this->db->flush_cache();
|
$this->db->flush_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1952,8 +1952,8 @@ class DataMapper {
|
|||||||
* This permits transactions to be disabled at run-time.
|
* This permits transactions to be disabled at run-time.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function trans_off()
|
function trans_off()
|
||||||
{
|
{
|
||||||
$this->db->trans_enabled = FALSE;
|
$this->db->trans_enabled = FALSE;
|
||||||
@@ -1971,8 +1971,8 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function trans_strict($mode = TRUE)
|
function trans_strict($mode = TRUE)
|
||||||
{
|
{
|
||||||
$this->db->trans_strict($mode);
|
$this->db->trans_strict($mode);
|
||||||
@@ -1988,9 +1988,9 @@ class DataMapper {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function trans_start($test_mode = FALSE)
|
function trans_start($test_mode = FALSE)
|
||||||
{
|
{
|
||||||
$this->db->trans_start($test_mode);
|
$this->db->trans_start($test_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2002,8 +2002,8 @@ class DataMapper {
|
|||||||
* Complete a transaction.
|
* Complete a transaction.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function trans_complete()
|
function trans_complete()
|
||||||
{
|
{
|
||||||
return $this->db->trans_complete();
|
return $this->db->trans_complete();
|
||||||
@@ -2019,9 +2019,9 @@ class DataMapper {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function trans_begin($test_mode = FALSE)
|
function trans_begin($test_mode = FALSE)
|
||||||
{
|
{
|
||||||
return $this->db->trans_begin($test_mode);
|
return $this->db->trans_begin($test_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2033,8 +2033,8 @@ class DataMapper {
|
|||||||
* Lets you retrieve the transaction flag to determine if it has failed.
|
* Lets you retrieve the transaction flag to determine if it has failed.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function trans_status()
|
function trans_status()
|
||||||
{
|
{
|
||||||
return $this->_trans_status;
|
return $this->_trans_status;
|
||||||
@@ -2049,7 +2049,7 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function trans_commit()
|
function trans_commit()
|
||||||
{
|
{
|
||||||
return $this->db->trans_commit();
|
return $this->db->trans_commit();
|
||||||
@@ -2064,7 +2064,7 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function trans_rollback()
|
function trans_rollback()
|
||||||
{
|
{
|
||||||
return $this->db->trans_rollback();
|
return $this->db->trans_rollback();
|
||||||
@@ -2080,7 +2080,7 @@ class DataMapper {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function _auto_trans_begin()
|
function _auto_trans_begin()
|
||||||
{
|
{
|
||||||
// Begin auto transaction
|
// Begin auto transaction
|
||||||
@@ -2100,7 +2100,7 @@ class DataMapper {
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string
|
* @param string
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function _auto_trans_complete($label = 'complete')
|
function _auto_trans_complete($label = 'complete')
|
||||||
{
|
{
|
||||||
// Complete auto transaction
|
// Complete auto transaction
|
||||||
@@ -2363,7 +2363,7 @@ class DataMapper {
|
|||||||
{
|
{
|
||||||
// And it has an existing relation
|
// And it has an existing relation
|
||||||
$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);
|
$query = $this->db->get_where($relationship_table, array($this->model . '_id' => $this->id), 1, 0);
|
||||||
|
|
||||||
if ($query->num_rows() > 0)
|
if ($query->num_rows() > 0)
|
||||||
{
|
{
|
||||||
// Find and update the other objects existing relation to relate with this object
|
// Find and update the other objects existing relation to relate with this object
|
||||||
@@ -2547,7 +2547,7 @@ class DataMapper {
|
|||||||
* @param mixed
|
* @param mixed
|
||||||
* @param string
|
* @param string
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function _related_required($object, $model)
|
function _related_required($object, $model)
|
||||||
{
|
{
|
||||||
return ($this->_count_related($model, $object) == 0) ? FALSE : TRUE;
|
return ($this->_count_related($model, $object) == 0) ? FALSE : TRUE;
|
||||||
@@ -2559,7 +2559,7 @@ class DataMapper {
|
|||||||
* Related Min Size (pre-process)
|
* Related Min Size (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at most the minimum size.
|
* Checks if the value of a property is at most the minimum size.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param mixed
|
* @param mixed
|
||||||
* @param string
|
* @param string
|
||||||
@@ -2577,7 +2577,7 @@ class DataMapper {
|
|||||||
* Related Max Size (pre-process)
|
* Related Max Size (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at most the maximum size.
|
* Checks if the value of a property is at most the maximum size.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param mixed
|
* @param mixed
|
||||||
* @param string
|
* @param string
|
||||||
@@ -2612,7 +2612,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function _alpha_dash_dot($field)
|
function _alpha_dash_dot($field)
|
||||||
{
|
{
|
||||||
return ( ! preg_match('/^([\.-a-z0-9_-])+$/i', $this->{$field})) ? FALSE : TRUE;
|
return ( ! preg_match('/^([\.-a-z0-9_-])+$/i', $this->{$field})) ? FALSE : TRUE;
|
||||||
@@ -2628,7 +2628,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function _alpha_slash_dot($field)
|
function _alpha_slash_dot($field)
|
||||||
{
|
{
|
||||||
return ( ! preg_match('/^([\.\/-a-z0-9_-])+$/i', $this->{$field})) ? FALSE : TRUE;
|
return ( ! preg_match('/^([\.\/-a-z0-9_-])+$/i', $this->{$field})) ? FALSE : TRUE;
|
||||||
@@ -2641,7 +2641,7 @@ class DataMapper {
|
|||||||
*
|
*
|
||||||
* Match one field to another.
|
* Match one field to another.
|
||||||
* This replaces the version in CI_Form_validation.
|
* This replaces the version in CI_Form_validation.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @param string
|
* @param string
|
||||||
@@ -2658,7 +2658,7 @@ class DataMapper {
|
|||||||
* Min Date (pre-process)
|
* Min Date (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at least the minimum date.
|
* Checks if the value of a property is at least the minimum date.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @param string
|
* @param string
|
||||||
@@ -2675,7 +2675,7 @@ class DataMapper {
|
|||||||
* Max Date (pre-process)
|
* Max Date (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at most the maximum date.
|
* Checks if the value of a property is at most the maximum date.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @param string
|
* @param string
|
||||||
@@ -2692,7 +2692,7 @@ class DataMapper {
|
|||||||
* Min Size (pre-process)
|
* Min Size (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at least the minimum size.
|
* Checks if the value of a property is at least the minimum size.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @param integer
|
* @param integer
|
||||||
@@ -2709,7 +2709,7 @@ class DataMapper {
|
|||||||
* Max Size (pre-process)
|
* Max Size (pre-process)
|
||||||
*
|
*
|
||||||
* Checks if the value of a property is at most the maximum size.
|
* Checks if the value of a property is at most the maximum size.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @param integer
|
* @param integer
|
||||||
@@ -2777,7 +2777,7 @@ class DataMapper {
|
|||||||
if ($query->num_rows() > 0)
|
if ($query->num_rows() > 0)
|
||||||
{
|
{
|
||||||
$row = $query->row();
|
$row = $query->row();
|
||||||
|
|
||||||
// If unique pair value does not belong to this object
|
// If unique pair value does not belong to this object
|
||||||
if ($this->id != $row->id)
|
if ($this->id != $row->id)
|
||||||
{
|
{
|
||||||
@@ -2868,7 +2868,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _encode_php_tags($field)
|
function _encode_php_tags($field)
|
||||||
{
|
{
|
||||||
$this->{$field} = encode_php_tags($this->{$field});
|
$this->{$field} = encode_php_tags($this->{$field});
|
||||||
@@ -2885,7 +2885,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _prep_for_form($field)
|
function _prep_for_form($field)
|
||||||
{
|
{
|
||||||
$this->{$field} = $this->form_validation->prep_for_form($this->{$field});
|
$this->{$field} = $this->form_validation->prep_for_form($this->{$field});
|
||||||
@@ -2902,7 +2902,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _prep_url($field)
|
function _prep_url($field)
|
||||||
{
|
{
|
||||||
$this->{$field} = $this->form_validation->prep_url($this->{$field});
|
$this->{$field} = $this->form_validation->prep_url($this->{$field});
|
||||||
@@ -2919,7 +2919,7 @@ class DataMapper {
|
|||||||
* @access private
|
* @access private
|
||||||
* @param string
|
* @param string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _strip_image_tags($field)
|
function _strip_image_tags($field)
|
||||||
{
|
{
|
||||||
$this->{$field} = strip_image_tags($this->{$field});
|
$this->{$field} = strip_image_tags($this->{$field});
|
||||||
@@ -2937,7 +2937,7 @@ class DataMapper {
|
|||||||
* @param string
|
* @param string
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _xss_clean($field, $is_image = FALSE)
|
function _xss_clean($field, $is_image = FALSE)
|
||||||
{
|
{
|
||||||
$this->{$field} = xss_clean($this->{$field}, $is_image);
|
$this->{$field} = xss_clean($this->{$field}, $is_image);
|
||||||
@@ -2977,7 +2977,7 @@ class DataMapper {
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[$field] = $this->{$field};
|
$data[$field] = $this->{$field};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user