Skip to content

Commit

Permalink
Removed FCPPATH as it is no longer used. Fixed misspelling of environ…
Browse files Browse the repository at this point in the history
…ment. Fixed language loading.
  • Loading branch information
cdevroe committed Jan 31, 2019
1 parent 787e71f commit 37cba2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions application/hooks/Unmark_Languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public function loadLanguage()
{
$language_to_load = $this->CI->config->item('language');
$language_to_load = ( !isset($language_to_load) || empty($language_to_load) ) ? 'english' : $language_to_load;
$language_file_to_load = FCPATH . APPPATH . 'language/' . $language_to_load . '.php';
$language_file_to_load = APPPATH . 'language/' . $language_to_load . '.php';

if ( file_exists($language_file_to_load) ) :
include( FCPATH . APPPATH . 'language/' . $language_to_load . '.php' );
include( APPPATH . 'language/' . $language_to_load . '.php' );
$this->CI->config->set_item( 'phrases', $unmark_language ); // Load phrases into global config
log_message('DEBUG', 'The "' . $language_to_load . '" language file has been loaded.');
else :
log_message('ERROR', 'The "' . $language_to_load . '" language file could be found.');
log_message('ERROR', 'The "' . $language_to_load . '" language file could not be found.');
endif;

}
Expand All @@ -49,6 +49,9 @@ function unmark_phrase( $phrase, $phrase_plural='', $number=1 )
// Load phrases from config
$phrases = $CI->config->item('phrases');

//print_r($phrases);
//exit;

if ( !is_array($phrases) ) :
return $phrase;
endif;
Expand Down
2 changes: 1 addition & 1 deletion application/libraries/Exceptional.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function sendToTracker($message, $type, $backtrace, $custom_data=array(),
'type' => $type,
'backtrace' => $backtrace,
'custom_data' => $custom_data,
'enviornment' => $env,
'environment' => $env,
'user' => $user
);

Expand Down
1 change: 1 addition & 0 deletions application/views/marks/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
switch ($lookup_type) {
case 'label':
$heading['icon'] = 'icon-circle';
//print_r($total);exit;
$heading['title'] = sprintf(unmark_phrase('mark labeled %s', 'marks labeled %s', $total), unmark_phrase($label_name));
break;
case 'archive':
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
define('BASEPATH', $system_path);

// Path to the front controller (this file)
define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
// Removed when upgrading to CI 3.x define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);

// Name of the "system folder"
define('SYSDIR', basename(BASEPATH));
Expand Down

0 comments on commit 37cba2d

Please sign in to comment.