Skip to content

Commit

Permalink
fixed modules.php config file to adapt php 7.*>
Browse files Browse the repository at this point in the history
  • Loading branch information
fjerbi committed Aug 20, 2020
1 parent a11bfe9 commit bc17579
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 909 deletions.
523 changes: 0 additions & 523 deletions application/config/config.example.php

This file was deleted.

96 changes: 0 additions & 96 deletions application/config/database.example.php

This file was deleted.

18 changes: 16 additions & 2 deletions application/third_party/MX/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function run($module) {

/** Load a module controller **/
public static function load($module) {
(is_array($module)) ? list($module, $params) = each($module) : $params = NULL;
(is_array($module)) ? list($module, $params) = Self::makeEach($module) : $params = NULL;

/* get the requested controller class name */
$alias = strtolower(basename($module));
Expand Down Expand Up @@ -201,5 +201,19 @@ public static function parse_routes($module, $uri) {
return explode('/', $module.'/'.$val);
}
}

}
}
public static function makeEach(&$arr)
{
$key = key($arr);

$result = ($key === null)
? false
: [$key, current($arr), 'key' => $key, 'value' => current($arr)];

next($arr);

return $result;
}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
*
* NOTE: If you change these, also change the error_reporting() code below
*/
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');

/*
*---------------------------------------------------------------
Expand Down
Loading

0 comments on commit bc17579

Please sign in to comment.