Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
esmaeilbahrani committed Feb 15, 2021
2 parents 0617fa6 + 986af94 commit 5eabe4b
Show file tree
Hide file tree
Showing 57 changed files with 6,739 additions and 12,335 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
theme/
!theme/panel/*
!theme/blue/*
!theme/toranj/*
cache
uploads
node_modules/
package-lock.json
pinker
setting/config
theme/*/setting/config
5 changes: 2 additions & 3 deletions app.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
'name' => 'paper',
'description' => 'paper is an application for launching magazine, blog, and content websites',
'icon' => 'icon.png',
'version-code' => 9,
'version-name' => '2.3',
'version-code' => 10,
'version-name' => '2.4.8',
'developer' => 'pinoox',
'enable' => true,
'theme' => 'blue',
'theme-panel' => 'papyrus',
'lang' => 'fa',
'service' => [
'template',
'user',
],
'loader' => [
Expand Down
2 changes: 0 additions & 2 deletions component/helper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public static function getLocaleDate($format = null, $date = 'now')
} else {
return Date::j($format, $date);
}


}

public static function timePrint($seconds)
Expand Down
31 changes: 0 additions & 31 deletions controller/api.controller.php

This file was deleted.

2 changes: 1 addition & 1 deletion controller/api/api.configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function _exception()
$this->error();
}

public function error()
protected function error()
{
Response::json('not found',404);
}
Expand Down
4 changes: 3 additions & 1 deletion controller/api/panel/v1/dashboard.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getStats()
$visitStats = StatisticModel::fetch_stats($today);
$statsProgress = StatisticModel::calc_stats_progress_than_yesterday($visitStats, $yesterday);
$commentStats = CommentModel::fetch_stats();
$contactStats = ContactModel::fetch_stats();
$words = PostModel::fetch_total_words();
$timeTracking = $this->getTimeTrackingRound();

Expand All @@ -56,7 +57,8 @@ public function getStats()
'timeTracking' => $timeTracking,
'stats' => $visitStats,
'progress' => $statsProgress,
'commentStats' => $commentStats
'commentStats' => $commentStats,
'contactStats' => $contactStats,
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

namespace pinoox\app\com_pinoox_paper\controller\api\v1;

use pinoox\app\com_pinoox_paper\model\ContactModel;
use pinoox\component\Request;
use pinoox\component\Response;
use pinoox\component\Validation;
use pinoox\app\com_pinoox_paper\model\ContactModel;

class ApiController extends MasterConfiguration
class MainController extends MasterConfiguration
{
public function newContact()
{
Expand All @@ -38,5 +38,13 @@ public function newContact()
Response::jsonMessage(rlang('front.error_happened'), false);
}

public function getSetting($section, $key = null)
{
if ($section == 'developer')
self::error();

$key = !empty($key) ? $section . '.' . $key : $section;
Response::json(setting($key));
}
}

13 changes: 13 additions & 0 deletions controller/api/v1/master.configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,26 @@
namespace pinoox\app\com_pinoox_paper\controller\api\v1;

use pinoox\app\com_pinoox_paper\controller\api\ApiConfiguration;
use pinoox\component\Template;

class MasterConfiguration extends ApiConfiguration
{

public function __construct()
{
parent::__construct();
$template = new Template();
$api = $template->getMeta('api');
if(!$api)
self::error();
}

protected function printError($data)
{
}

protected function printResult($data)
{
}

}
Expand Down
Loading

0 comments on commit 5eabe4b

Please sign in to comment.