Skip to content

Commit

Permalink
Merge pull request #8 from IvanAquino/master
Browse files Browse the repository at this point in the history
Reestructuracion de los directorios, se movieron los componentes a un…
  • Loading branch information
NeoRazorX committed Jun 11, 2017
2 parents fbe8675 + 4d2262a commit 0312aa0
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
},
"autoload": {
"psr-4": {
"FacturaScripts\\Base\\": "base/",
"FacturaScripts\\controller\\": "controller/",
"FacturaScripts\\Plugins\\": "plugins/"
"FacturaScripts\\": "src/"
}
}
}
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
}

/// ¿Buscamos en /controller?
if ($controller == "" && class_exists("FacturaScripts\\controller\\{$controllerName}")) {
$controller = "FacturaScripts\\controller\\{$controllerName}";
if ($controller == "" && class_exists("FacturaScripts\\Controller\\{$controllerName}")) {
$controller = "FacturaScripts\\Controller\\{$controllerName}";
}

/// Si hemos encontrado el controlador, lo cargamos
Expand All @@ -80,8 +80,8 @@
/// Cargamos el motor de plantillas
$twigLoader = new Twig_Loader_Filesystem(__DIR__ . '/view');
foreach ($pluginList as $pName) {
if (file_exists(__DIR__ . '/plugins/' . $pName . '/view')) {
$twigLoader->prependPath(__DIR__ . '/plugins/' . $pName . '/view');
if (file_exists(__DIR__ . '/src/Plugins/' . $pName . '/view')) {
$twigLoader->prependPath(__DIR__ . '/src/Plugins/' . $pName . '/view');
}
}
///$twig = new Twig_Environment($twigLoader, array('cache' => 'cache/twig'));
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions controller/admin_home.php → src/Controller/admin_home.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace FacturaScripts\controller;
namespace FacturaScripts\Controller;

use FacturaScripts\Base\fs_controller;
use FacturaScripts\Base\fs_plugin_manager;
Expand All @@ -33,10 +33,10 @@ class admin_home extends fs_controller {
public function __construct($folder = '', $className = __CLASS__) {
parent::__construct($folder, $className);
}

public function run() {
parent::run();

if ($this->request->get('enable', '') != '') {
$pluginManager = new fs_plugin_manager();
$pluginManager->enable($this->request->get('enable'));
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0312aa0

Please sign in to comment.