Skip to content

Commit

Permalink
Bugfix for make command
Browse files Browse the repository at this point in the history
  • Loading branch information
tkaratug committed Apr 26, 2022
1 parent f8dec8f commit 4a10894
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v2.4.1
- [Düzeltme] Model ve Controller oluşturma komutlarındaki hata giderildi.

v2.4.0
- [Düzeltme] `Request` kütüphanesinde bulunan `getQueryString()` methodundaki hata giderildi.
- [Yeni] `Request` kütüphanesine `makeQueryString()` methodu eklendi.
Expand Down
2 changes: 1 addition & 1 deletion System/Kernel/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
define('ENV', 'development');

// Framework Version
define('VERSION', '2.3.1');
define('VERSION', '2.4.1');

// Default Timezone
define('TIMEZONE', 'Europe/Istanbul');
12 changes: 8 additions & 4 deletions System/Libs/Console/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ private function createController($controller)
$location = 'App/Controllers/' . $controller;
}

if (file_exists($location)) {
return $this->getColoredString('Controller zaten mevcut:', 'red') . "\t" . $this->getColoredString($location);
$file = "{$location}/{$class}.php";

if (file_exists($file)) {
return $this->getColoredString('Controller zaten mevcut:', 'red') . "\t" . $this->getColoredString($file);
} else {
$this->makeDir($location);
$location = $location . '/' . $class . '.php';
Expand Down Expand Up @@ -216,8 +218,10 @@ private function createModel($model)
$location = 'App/Models';
}

if (file_exists($location))
return $this->getColoredString('Model zaten mevcut:', 'red') . "\t" . $this->getColoredString($location);
$file = "{$location}/{$class}.php";

if (file_exists($file))
return $this->getColoredString('Model zaten mevcut:', 'red') . "\t" . $this->getColoredString($file);

$this->makeDir($location);
$location = $location . '/' . $class . '.php';
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author : Turan Karatuğ
* Web : http://www.titanphp.com
* Docs : http://kilavuz.titanphp.com
* Version : 2.2.4
* Version : 2.4.1
* Github : http://github.com/tkaratug/titan2
* License : MIT
*
Expand Down

0 comments on commit 4a10894

Please sign in to comment.