1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-08-01 20:39:06 +08:00

sitemap.xml,robots.txt加入忽略列表

This commit is contained in:
xiaochong0302 2020-08-15 08:48:33 +08:00
parent c85cc3382b
commit 3c2cc976b6
3 changed files with 4 additions and 35 deletions

2
.gitignore vendored
View File

@ -2,4 +2,6 @@
/vendor
/config/config.php
/config/xs.course.ini
/public/robots.txt
/public/sitemap.xml
*KgTest*

View File

@ -1,33 +0,0 @@
<?php
namespace App\Caches;
use App\Repos\CourseUser as CourseUserRepo;
class CourseUser extends Cache
{
protected $lifetime = 1 * 86400;
public function getLifetime()
{
return $this->lifetime;
}
public function getKey($id = null)
{
return "course_user:{$id}";
}
public function getContent($id = null)
{
list($courseId, $userId) = explode('_', $id);
$repo = new CourseUserRepo();
$courseUser = $repo->findCourseUser($courseId, $userId);
return $courseUser ?: null;
}
}

View File

@ -2,7 +2,7 @@
namespace App\Providers;
use Phalcon\Config as PhalconConfig;
use Phalcon\Config as PhConfig;
class Config extends Provider
{
@ -15,7 +15,7 @@ class Config extends Provider
$options = require config_path('config.php');
return new PhalconConfig($options);
return new PhConfig($options);
});
}