mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 20:46:26 +05:30
[TASK] update composer
This commit is contained in:
parent
3c6936349f
commit
a685bcf91b
116 changed files with 4837 additions and 8167 deletions
|
|
@ -52,18 +52,19 @@ function config($key, $value = null)
|
|||
$_config[$key] = $value;
|
||||
}
|
||||
|
||||
function save_config($data = array(),$new = array()){
|
||||
function save_config($data = array(), $new = array())
|
||||
{
|
||||
global $config_file;
|
||||
|
||||
$string = file_get_contents($config_file) . "\n";
|
||||
|
||||
foreach ($data as $word => $value) {
|
||||
$value = str_replace('"','\"',$value);
|
||||
$value = str_replace('"', '\"', $value);
|
||||
$string = preg_replace("/^" . $word . " = .+$/m", $word . ' = "' . $value . '"', $string);
|
||||
}
|
||||
$string = rtrim($string);
|
||||
foreach ($new as $word => $value) {
|
||||
$value = str_replace('"','\"',$value);
|
||||
$value = str_replace('"', '\"', $value);
|
||||
$string .= "\n" . $word . ' = "' . $value . '"' . "\n";
|
||||
}
|
||||
$string = rtrim($string);
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
|
|||
// Extract the title and body
|
||||
$post->title = get_content_tag('t', $content, 'Untitled: ' . date('l jS \of F Y', $post->date));
|
||||
$post->feature = get_content_tag('fi', $content);
|
||||
$post->video = get_content_tag('vid', $content);
|
||||
$post->video = get_content_tag('vid', $content);
|
||||
|
||||
// Get the contents and convert it to HTML
|
||||
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
class opml
|
||||
{
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ session_start();
|
|||
|
||||
function login()
|
||||
{
|
||||
if(isset($_SESSION[config("site.url")]['user']) && !empty($_SESSION[config("site.url")]['user'])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (isset($_SESSION[config("site.url")]['user']) && !empty($_SESSION[config("site.url")]['user'])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue