@@ -124,13 +124,13 @@ |
||
| 124 | 124 | <?php |
| 125 | 125 | $url = $_SERVER['REQUEST_URI']; |
| 126 | 126 | |
| 127 | - if (strpos($url,'computing-support') !== false) { |
|
| 127 | + if (strpos($url, 'computing-support') !== false) { |
|
| 128 | 128 | $dept_name = 'Computing Support'; |
| 129 | 129 | $dept_url = 'computing-support'; |
| 130 | - } elseif (strpos($url,'marketing') !== false) { |
|
| 130 | + } elseif (strpos($url, 'marketing') !== false) { |
|
| 131 | 131 | $dept_name = 'Marketing'; |
| 132 | 132 | $dept_url = 'marketing'; |
| 133 | - } elseif (strpos($url,'human-resources') !== false) { |
|
| 133 | + } elseif (strpos($url, 'human-resources') !== false) { |
|
| 134 | 134 | $dept_name = 'Human Resources'; |
| 135 | 135 | $dept_url = 'human-resources'; |
| 136 | 136 | } else { |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | <?php } ?> |
| 36 | 36 | <?php $controls = PageTypeComposerFormLayoutSetControl::getList($cfl); |
| 37 | 37 | |
| 38 | - foreach($controls as $con) { |
|
| 39 | - if (is_object($page)) { // we are loading content in |
|
| 40 | - $con->setPageObject($page); |
|
| 41 | - } |
|
| 38 | + foreach($controls as $con) { |
|
| 39 | + if (is_object($page)) { // we are loading content in |
|
| 40 | + $con->setPageObject($page); |
|
| 41 | + } |
|
| 42 | 42 | $con->setTargetParentPageID($targetParentPageID); |
| 43 | 43 | ?> |
| 44 | 44 | <?php $con->render(); ?> |
@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | <div class="alert alert-info" style="display: none" id="ccm-page-type-composer-form-save-status"></div> |
| 20 | 20 | |
| 21 | 21 | <style>.form-group.ccm-composer-url-slug {display:none}</style> |
| 22 | -<?php $u = new User(); if($u->inGroup(Group::getByName('Administrators'))){ ?> |
|
| 22 | +<?php $u = new User(); if ($u->inGroup(Group::getByName('Administrators'))) { ?> |
|
| 23 | 23 | <style>.form-group.ccm-composer-url-slug {display:block !important}</style> |
| 24 | 24 | <?php } ?> |
| 25 | 25 | |
| 26 | 26 | <input type="hidden" name="ptID" value="<?php echo $pagetype->getPageTypeID()?>" /> |
| 27 | 27 | |
| 28 | -<?php foreach($fieldsets as $cfl) { ?> |
|
| 28 | +<?php foreach ($fieldsets as $cfl) { ?> |
|
| 29 | 29 | <fieldset> |
| 30 | 30 | <?php if ($cfl->getPageTypeComposerFormLayoutSetDisplayName()) { ?> |
| 31 | 31 | <legend><?php echo $cfl->getPageTypeComposerFormLayoutSetDisplayName()?></legend> |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | <?php } ?> |
| 36 | 36 | <?php $controls = PageTypeComposerFormLayoutSetControl::getList($cfl); |
| 37 | 37 | |
| 38 | - foreach($controls as $con) { |
|
| 38 | + foreach ($controls as $con) { |
|
| 39 | 39 | if (is_object($page)) { // we are loading content in |
| 40 | 40 | $con->setPageObject($page); |
| 41 | 41 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | global $u; |
| 24 | 24 | |
| 25 | 25 | if ($u->isLoggedIn()) { |
| 26 | - echo '<p class="welcome-username">Welcome ' . $u->getUserName() . '</p>'; |
|
| 26 | + echo '<p class="welcome-username">Welcome '.$u->getUserName().'</p>'; |
|
| 27 | 27 | } else { |
| 28 | 28 | echo '<p class="welcome-username"><a href="/login">Click here to Login</a></p>'; |
| 29 | 29 | |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | <?php } ?> |
| 36 | 36 | <?php $controls = PageTypeComposerFormLayoutSetControl::getList($cfl); |
| 37 | 37 | |
| 38 | - foreach($controls as $con) { |
|
| 39 | - if (is_object($page)) { // we are loading content in |
|
| 40 | - $con->setPageObject($page); |
|
| 41 | - } |
|
| 38 | + foreach($controls as $con) { |
|
| 39 | + if (is_object($page)) { // we are loading content in |
|
| 40 | + $con->setPageObject($page); |
|
| 41 | + } |
|
| 42 | 42 | $con->setTargetParentPageID($targetParentPageID); |
| 43 | 43 | ?> |
| 44 | 44 | <?php $con->render(); ?> |
@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | <div class="alert alert-info" style="display: none" id="ccm-page-type-composer-form-save-status"></div> |
| 20 | 20 | |
| 21 | 21 | <style>.form-group.ccm-composer-url-slug {display:none}</style> |
| 22 | -<?php $u = new User(); if($u->inGroup(Group::getByName('Administrators'))){ ?> |
|
| 22 | +<?php $u = new User(); if ($u->inGroup(Group::getByName('Administrators'))) { ?> |
|
| 23 | 23 | <style>.form-group.ccm-composer-url-slug {display:block !important}</style> |
| 24 | 24 | <?php } ?> |
| 25 | 25 | |
| 26 | 26 | <input type="hidden" name="ptID" value="<?php echo $pagetype->getPageTypeID()?>" /> |
| 27 | 27 | |
| 28 | -<?php foreach($fieldsets as $cfl) { ?> |
|
| 28 | +<?php foreach ($fieldsets as $cfl) { ?> |
|
| 29 | 29 | <fieldset> |
| 30 | 30 | <?php if ($cfl->getPageTypeComposerFormLayoutSetDisplayName()) { ?> |
| 31 | 31 | <legend><?php echo $cfl->getPageTypeComposerFormLayoutSetDisplayName()?></legend> |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | <?php } ?> |
| 36 | 36 | <?php $controls = PageTypeComposerFormLayoutSetControl::getList($cfl); |
| 37 | 37 | |
| 38 | - foreach($controls as $con) { |
|
| 38 | + foreach ($controls as $con) { |
|
| 39 | 39 | if (is_object($page)) { // we are loading content in |
| 40 | 40 | $con->setPageObject($page); |
| 41 | 41 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | <div class="col-lg-12"> |
| 7 | 7 | <h1 class="page-header"><?php $page = Page::getCurrentPage(); echo $page->getCollectionName(); ?></h1> |
| 8 | 8 | <br> |
| 9 | - <?php $a= new Area('Page Content'); $a->display($c); ?> |
|
| 9 | + <?php $a = new Area('Page Content'); $a->display($c); ?> |
|
| 10 | 10 | </div> <!-- END col-lg-12 --> |
| 11 | 11 | </div> <!-- END row --> |
| 12 | 12 | </div> <!-- END container-fluid --> |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if (isset($_COOKIE['CI-CONCRETE5']) === FALSE) { |
| 68 | 68 | |
| 69 | 69 | $this->session->set_userdata('last_url', current_url()); |
| 70 | - redirect('/authentication/dashboard?url=' . current_url()); |
|
| 70 | + redirect('/authentication/dashboard?url='.current_url()); |
|
| 71 | 71 | } else { |
| 72 | 72 | |
| 73 | 73 | $cookie = $_COOKIE['CI-CONCRETE5']; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | //expire fake cookie |
| 80 | 80 | setcookie('CI-CONCRETE5', 'expired', time() - (1), "/"); |
| 81 | 81 | $this->session->set_userdata('last_url', current_url()); |
| 82 | - redirect('/authentication/dashboard?url=' . current_url()); |
|
| 82 | + redirect('/authentication/dashboard?url='.current_url()); |
|
| 83 | 83 | } else { |
| 84 | 84 | |
| 85 | 85 | $user_ldap = $this->user_model->user_ldap($username); |
@@ -208,8 +208,8 @@ |
||
| 208 | 208 | $wrapper_inline = explode("|", $CI->config->item('wrapper_inline')); |
| 209 | 209 | if ( ! $CI->config->item('use_wrapper')) |
| 210 | 210 | { |
| 211 | - $wrapper = array('', ''); |
|
| 212 | - $wrapper_inline = array('', ''); |
|
| 211 | + $wrapper = array('', ''); |
|
| 212 | + $wrapper_inline = array('', ''); |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | // Begin writing breadcrumb string |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Breadcrumb helper |
@@ -59,9 +59,9 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | function array_replace(array &$array, array &$array1) |
| 61 | 61 | { |
| 62 | - foreach($array as $k=>$v) |
|
| 62 | + foreach ($array as $k=>$v) |
|
| 63 | 63 | { |
| 64 | - if(array_key_exists($k, $array1)) |
|
| 64 | + if (array_key_exists($k, $array1)) |
|
| 65 | 65 | { |
| 66 | 66 | $array[$k] = $array1[$k]; |
| 67 | 67 | } |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | -if ( ! function_exists('set_breadcrumb')) |
|
| 73 | +if (!function_exists('set_breadcrumb')) |
|
| 74 | 74 | { |
| 75 | - function set_breadcrumb($delimiter_config = '', $exclude = '', $config= array()) |
|
| 75 | + function set_breadcrumb($delimiter_config = '', $exclude = '', $config = array()) |
|
| 76 | 76 | { |
| 77 | - $CI =& get_instance(); |
|
| 77 | + $CI = & get_instance(); |
|
| 78 | 78 | $CI->load->helper('url'); |
| 79 | 79 | $CI->lang->load('breadcrumb'); |
| 80 | 80 | $CI->config->load('breadcrumb'); |
@@ -87,43 +87,43 @@ discard block |
||
| 87 | 87 | * for guidance. |
| 88 | 88 | * @author Chris Miller |
| 89 | 89 | */ |
| 90 | - $attr_home = ( isset( $config['attr_home'] ) |
|
| 90 | + $attr_home = (isset($config['attr_home']) |
|
| 91 | 91 | ? $config['attr_home'] |
| 92 | - : $CI->config->item('attr_home') ); |
|
| 92 | + : $CI->config->item('attr_home')); |
|
| 93 | 93 | |
| 94 | - $unlink_home = ( isset( $config['unlike_home'] ) |
|
| 94 | + $unlink_home = (isset($config['unlike_home']) |
|
| 95 | 95 | ? $config['unlike_home'] |
| 96 | - : $CI->config->item('unlike_home') ); |
|
| 96 | + : $CI->config->item('unlike_home')); |
|
| 97 | 97 | |
| 98 | 98 | if (empty($exclude)) |
| 99 | 99 | { |
| 100 | 100 | $exclude = $CI->config->item('exclude'); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $exclude_segment = ( isset( $config['exclude_segment'] ) |
|
| 104 | - ? array_merge($CI->config->item('exclude_segment'),$config['exclude_segment']) |
|
| 105 | - : $CI->config->item('exclude_segment') ); |
|
| 103 | + $exclude_segment = (isset($config['exclude_segment']) |
|
| 104 | + ? array_merge($CI->config->item('exclude_segment'), $config['exclude_segment']) |
|
| 105 | + : $CI->config->item('exclude_segment')); |
|
| 106 | 106 | |
| 107 | - $replacer_default = ( isset( $config['replacer'] ) |
|
| 108 | - ? array_merge($CI->config->item('replacer'),$config['replacer']) |
|
| 109 | - : $CI->config->item('replacer') ); |
|
| 107 | + $replacer_default = (isset($config['replacer']) |
|
| 108 | + ? array_merge($CI->config->item('replacer'), $config['replacer']) |
|
| 109 | + : $CI->config->item('replacer')); |
|
| 110 | 110 | |
| 111 | - $replacer_embed = ( isset( $config['replacer_embed'] ) |
|
| 112 | - ? array_merge($CI->config->item('replacer_embed'),$config['replacer_embed']) |
|
| 113 | - : $CI->config->item('replacer_embed') ); |
|
| 111 | + $replacer_embed = (isset($config['replacer_embed']) |
|
| 112 | + ? array_merge($CI->config->item('replacer_embed'), $config['replacer_embed']) |
|
| 113 | + : $CI->config->item('replacer_embed')); |
|
| 114 | 114 | |
| 115 | - $partial_replace = ( isset( $config['partial_replace'] ) |
|
| 116 | - ? array_merge($CI->config->item('partial_replace'),$config['partial_replace']) |
|
| 117 | - : $CI->config->item('partial_replace') ); |
|
| 115 | + $partial_replace = (isset($config['partial_replace']) |
|
| 116 | + ? array_merge($CI->config->item('partial_replace'), $config['partial_replace']) |
|
| 117 | + : $CI->config->item('partial_replace')); |
|
| 118 | 118 | |
| 119 | 119 | /* --- End Patch --- */ |
| 120 | 120 | |
| 121 | - $uri = rtrim($CI->uri->uri_string(),'/'); |
|
| 121 | + $uri = rtrim($CI->uri->uri_string(), '/'); |
|
| 122 | 122 | $uri_array_original = explode("/", $uri); |
| 123 | 123 | |
| 124 | 124 | // cahva's fix (http://codeigniter.com/forums/viewreply/855097/) |
| 125 | 125 | $uri_array_cnt = count($uri_array_original); |
| 126 | - if (config_item('hide_number_on_last_segment') && isset($uri_array_original[$uri_array_cnt-1]) && is_numeric($uri_array_original[$uri_array_cnt-1])) |
|
| 126 | + if (config_item('hide_number_on_last_segment') && isset($uri_array_original[$uri_array_cnt - 1]) && is_numeric($uri_array_original[$uri_array_cnt - 1])) |
|
| 127 | 127 | { |
| 128 | 128 | array_pop($uri_array_original); |
| 129 | 129 | } |
@@ -132,22 +132,22 @@ discard block |
||
| 132 | 132 | // If last segment is a number ? |
| 133 | 133 | $show_last_number = -1; |
| 134 | 134 | $number_array = count($uri_array_original); |
| 135 | - if (! $CI->config->item('hide_number_on_last_segment')) |
|
| 135 | + if (!$CI->config->item('hide_number_on_last_segment')) |
|
| 136 | 136 | { |
| 137 | 137 | $l_array = $number_array - 1; // last array number |
| 138 | - if (preg_match("/^[0-9]/", $uri_array_original[$l_array]) AND ! preg_match("/[a-zA-Z]+/", $uri_array_original[$l_array])) |
|
| 138 | + if (preg_match("/^[0-9]/", $uri_array_original[$l_array]) AND !preg_match("/[a-zA-Z]+/", $uri_array_original[$l_array])) |
|
| 139 | 139 | { |
| 140 | 140 | $show_last_number = $l_array; |
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | // Find segments uri that only contain a number |
| 145 | - foreach($uri_array_original as $key => $value) |
|
| 145 | + foreach ($uri_array_original as $key => $value) |
|
| 146 | 146 | { |
| 147 | 147 | // find number but keep number where positioned in the last segment |
| 148 | - if (preg_match("/^[0-9]/", $value) AND ! preg_match("/[a-zA-Z]+/", $value) AND $key != $show_last_number) |
|
| 148 | + if (preg_match("/^[0-9]/", $value) AND !preg_match("/[a-zA-Z]+/", $value) AND $key != $show_last_number) |
|
| 149 | 149 | { |
| 150 | - $uri_array_original[$key] = (int)$value; |
|
| 150 | + $uri_array_original[$key] = (int) $value; |
|
| 151 | 151 | |
| 152 | 152 | // If hide_number is TRUE then set the $exclude_segment array variable; |
| 153 | 153 | if ($CI->config->item('hide_number')) |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $key_uri = array_search($key, $uri_array_original, TRUE); |
| 191 | 191 | |
| 192 | 192 | // Add multilanguage |
| 193 | - if (! is_array($value) && $CI->config->item('multilang')) |
|
| 193 | + if (!is_array($value) && $CI->config->item('multilang')) |
|
| 194 | 194 | { |
| 195 | 195 | if ($CI->lang->line($value)) { |
| 196 | 196 | $value = ucwords($CI->lang->line($value)); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | // Set wrapper |
| 207 | 207 | $wrapper = explode("|", $CI->config->item('wrapper')); |
| 208 | 208 | $wrapper_inline = explode("|", $CI->config->item('wrapper_inline')); |
| 209 | - if ( ! $CI->config->item('use_wrapper')) |
|
| 209 | + if (!$CI->config->item('use_wrapper')) |
|
| 210 | 210 | { |
| 211 | 211 | $wrapper = array('', ''); |
| 212 | 212 | $wrapper_inline = array('', ''); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $segment .= $uri_array_original[$i].'/'; |
| 242 | 242 | |
| 243 | 243 | // If replace value is an array |
| 244 | - if (! in_array($i, $skip_key, TRUE) && is_array($value)) // Skip link if replace value is null |
|
| 244 | + if (!in_array($i, $skip_key, TRUE) && is_array($value)) // Skip link if replace value is null |
|
| 245 | 245 | { |
| 246 | 246 | $number_added_value_array = count($value); |
| 247 | 247 | |
@@ -268,13 +268,13 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | // Look up for partial replace |
| 271 | - if (! empty($partial_replace)) |
|
| 271 | + if (!empty($partial_replace)) |
|
| 272 | 272 | { |
| 273 | 273 | foreach ($partial_replace as $pkey => $pvalue) |
| 274 | 274 | { |
| 275 | 275 | if ($CI->config->item('multilang')) |
| 276 | 276 | { |
| 277 | - $lang_pvalue = $CI->lang->line($pvalue)?$CI->lang->line($pvalue):$CI->lang->line($pkey); |
|
| 277 | + $lang_pvalue = $CI->lang->line($pvalue) ? $CI->lang->line($pvalue) : $CI->lang->line($pkey); |
|
| 278 | 278 | $preplace = ' '.$lang_pvalue.'_'; |
| 279 | 279 | |
| 280 | 280 | } else { |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $str_name[] = ucwords($val_name); |
| 307 | 307 | } |
| 308 | 308 | } |
| 309 | - else if (! in_array($i, $skip_key, TRUE)) // If value is NOT an array |
|
| 309 | + else if (!in_array($i, $skip_key, TRUE)) // If value is NOT an array |
|
| 310 | 310 | { |
| 311 | 311 | // Add multilanguage |
| 312 | 312 | if ($CI->config->item('multilang')) |
@@ -317,13 +317,13 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | // Look up for partial replace |
| 320 | - if (! empty($partial_replace)) |
|
| 320 | + if (!empty($partial_replace)) |
|
| 321 | 321 | { |
| 322 | 322 | foreach ($partial_replace as $pkey => $pvalue) |
| 323 | 323 | { |
| 324 | 324 | if ($CI->config->item('multilang')) |
| 325 | 325 | { |
| 326 | - $lang_pvalue = $CI->lang->line($pvalue)?$CI->lang->line($pvalue):$CI->lang->line($pkey); |
|
| 326 | + $lang_pvalue = $CI->lang->line($pvalue) ? $CI->lang->line($pvalue) : $CI->lang->line($pkey); |
|
| 327 | 327 | $preplace = ' '.$lang_pvalue.'_'; |
| 328 | 328 | |
| 329 | 329 | } else { |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | $value = ucwords(strtolower(str_replace($char_to_replace, " ", $value))); |
| 344 | 344 | if ($CI->config->item('strip_regexp')) |
| 345 | 345 | { |
| 346 | - foreach($CI->config->item('strip_regexp') as $exp) |
|
| 346 | + foreach ($CI->config->item('strip_regexp') as $exp) |
|
| 347 | 347 | { |
| 348 | 348 | $value = preg_replace($exp, '', $value); |
| 349 | 349 | } |
@@ -359,13 +359,13 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | /* --- Chris Miller's Patch --- */ |
| 361 | 361 | // Check for custom additions |
| 362 | - if ( isset( $config['include_segments'] ) ) { |
|
| 362 | + if (isset($config['include_segments'])) { |
|
| 363 | 363 | |
| 364 | 364 | // Set our variable for usage |
| 365 | 365 | $include_segments = $config['include_segments']; |
| 366 | 366 | |
| 367 | 367 | // Loop our config array |
| 368 | - foreach ( $include_segments AS $k => $v ) { |
|
| 368 | + foreach ($include_segments AS $k => $v) { |
|
| 369 | 369 | $str_link[] = $k; |
| 370 | 370 | $str_name[] = ucwords($v); |
| 371 | 371 | } |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | foreach ($str_name as $key => $val) { |
| 386 | 386 | // If home is hidden then don't show first delimiter |
| 387 | - if ( $i == 0 && ($str == '' || $str == $wrapper[0]) ) { |
|
| 387 | + if ($i == 0 && ($str == '' || $str == $wrapper[0])) { |
|
| 388 | 388 | $delimiter = ''; |
| 389 | 389 | } elseif (empty($delimiter_config)) { |
| 390 | 390 | $delimiter = $CI->config->item('delimiter'); |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | if ($val != '') { |
| 396 | - if ($key == $breadcrumb_number-1 && $CI->config->item('unlink_last_segment')) |
|
| 396 | + if ($key == $breadcrumb_number - 1 && $CI->config->item('unlink_last_segment')) |
|
| 397 | 397 | { |
| 398 | 398 | $str .= $delimiter.$wrapper_inline[0].ucwords($val).$wrapper_inline[1]; |
| 399 | 399 | } else { |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | -if ( ! function_exists('clear_breadcrumb')) |
|
| 415 | +if (!function_exists('clear_breadcrumb')) |
|
| 416 | 416 | { |
| 417 | 417 | function clear_breadcrumb() |
| 418 | 418 | { |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | |
| 3 | 5 | /** |
| 4 | 6 | * Breadcrumb helper |
@@ -241,9 +243,11 @@ discard block |
||
| 241 | 243 | $segment .= $uri_array_original[$i].'/'; |
| 242 | 244 | |
| 243 | 245 | // If replace value is an array |
| 244 | - if (! in_array($i, $skip_key, TRUE) && is_array($value)) // Skip link if replace value is null |
|
| 246 | + if (! in_array($i, $skip_key, TRUE) && is_array($value)) { |
|
| 247 | + // Skip link if replace value is null |
|
| 245 | 248 | { |
| 246 | 249 | $number_added_value_array = count($value); |
| 250 | + } |
|
| 247 | 251 | |
| 248 | 252 | foreach ($value as $pair_values) |
| 249 | 253 | { |
@@ -253,8 +257,7 @@ discard block |
||
| 253 | 257 | if ($number_pv_array == 1) |
| 254 | 258 | { |
| 255 | 259 | $val_name = $pv_array[0]; |
| 256 | - } |
|
| 257 | - else |
|
| 260 | + } else |
|
| 258 | 261 | { |
| 259 | 262 | $val_name = $pv_array[1]; |
| 260 | 263 | } |
@@ -292,12 +295,10 @@ discard block |
||
| 292 | 295 | if ($number_pv_array == 1 || $val_url == $uri_array_original[$i]) |
| 293 | 296 | { |
| 294 | 297 | $new_segment_url = $segment; |
| 295 | - } |
|
| 296 | - else if ($val_url[0] == '/') |
|
| 298 | + } else if ($val_url[0] == '/') |
|
| 297 | 299 | { |
| 298 | 300 | $new_segment_url = base_url().substr($val_url, 1); |
| 299 | - } |
|
| 300 | - else |
|
| 301 | + } else |
|
| 301 | 302 | { |
| 302 | 303 | $new_segment_url = $segment.$val_url; |
| 303 | 304 | } |
@@ -305,14 +306,15 @@ discard block |
||
| 305 | 306 | $str_link[] = $new_segment_url; |
| 306 | 307 | $str_name[] = ucwords($val_name); |
| 307 | 308 | } |
| 308 | - } |
|
| 309 | - else if (! in_array($i, $skip_key, TRUE)) // If value is NOT an array |
|
| 309 | + } else if (! in_array($i, $skip_key, TRUE)) { |
|
| 310 | + // If value is NOT an array |
|
| 310 | 311 | { |
| 311 | 312 | // Add multilanguage |
| 312 | 313 | if ($CI->config->item('multilang')) |
| 313 | 314 | { |
| 314 | 315 | if ($CI->lang->line($value)) { |
| 315 | 316 | $value = ucwords($CI->lang->line($value)); |
| 317 | + } |
|
| 316 | 318 | } |
| 317 | 319 | } |
| 318 | 320 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | class Home extends My_Force_Login { |
| 4 | 4 | |
| 5 | 5 | public function __construct() { |
| 6 | - parent::__construct(); |
|
| 6 | + parent::__construct(); |
|
| 7 | 7 | |
| 8 | 8 | } |
| 9 | 9 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | // Each function is run using cron. |
| 6 | 6 | |
| 7 | 7 | public function __construct() { |
| 8 | - parent::__construct(); |
|
| 8 | + parent::__construct(); |
|
| 9 | 9 | $this->load->model('core/Jobs_model', 'jobs_model'); |
| 10 | 10 | } |
| 11 | 11 | |