Permalink
Browse files

Autoupdater Robot

  • Loading branch information...
1 parent 30a1768 commit c686cd0d65829a2c1f4a67c07b8e676cbf1a9a9e @CuteNews committed Oct 8, 2014
Showing with 12 additions and 7 deletions.
  1. +1 −5 cn_api.php
  2. +3 −1 core/core.php
  3. +1 −0 core/modules/dashboard.php
  4. +7 −1 core/news.php
View
@@ -13,11 +13,7 @@ function cn_api_add_news($id, $data)
db_save_news($db, $nloc);
$user = db_user_by_name($data['u']);
-
- // add index data
- $w = fopen(db_index_file_detect(), 'a+');
- fwrite($w, base_convert($id, 10, 36).':'.$data['c'].':'.base_convert($user['id'], 10, 36).':'.count($data['co']).'::'."\n");
- fclose($w);
+ db_index_add($id, $data['c'], $user['id'], $data['is_draft']);
}
// Since 2.0: Get news entry
View
@@ -3486,12 +3486,14 @@ function cn_snippet_ckeditor($ids = '')
$CKSmiles = join(', ', $CKSmiles);
$CKBar = join(', ', $CKBar);
+ $Cklang = getoption('cklang');
+ if (empty($Cklang)) $Cklang = 'en';
// show
echo '<script src="'.getoption('http_script_dir').'/core/ckeditor/ckeditor.js"></script>';
echo '<script type="text/javascript">'."\n";
echo "(function() { var settings = {"."\n";
- echo "skin: 'moono', width: 'auto', height: 350, customConfig: '', language: 'en', entities_latin: false, entities_greek: false, \n";
+ echo "skin: 'moono', width: 'auto', height: 350, customConfig: '', language: '$Cklang', entities_latin: false, entities_greek: false, \n";
echo "toolbar: [ ". hook('settings/CKEDITOR_customize', $CKBar) . " ], \n";
$add_opt = array();
@@ -297,6 +297,7 @@ function dashboard_sysconf()
'ck_ln6' => array('text', "Row 6|Optional"),
'ck_ln7' => array('text', "Row 7|Optional"),
'ck_ln8' => array('text', "Row 8|Optional"),
+ 'cklang' => array('text', "Ckeditor lang"),
),
'rewrite' => array
View
@@ -679,7 +679,13 @@ function cn_modify_comm_author($e)
$username = isset($user['nick'])&&!empty($user['nick']) ? $user['nick'] : $user['name'];
// User exists
- return $user['name']?cn_htmlspecialchars($username):'Anonymous';
+ $username = $user['name']? cn_htmlspecialchars($username) : 'Anonymous';
+
+ // user allow to show his email?
+ if (isset($user['e-hide']) && $user['e-hide'] || empty($user['email']))
+ return $username;
+ else
+ return '<a href="mailto:'.cn_htmlspecialchars($user['email']).'">'.$username.'</a>';
}
function cn_modify_comm_date($e)

0 comments on commit c686cd0

Please sign in to comment.