bebabi34
unread,Apr 23, 2013, 5:33:44 PM4/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Flatnuk...@googlegroups.com
Update of /cvsroot/flatnuke/flatnuke/flatnews/include
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16072/flatnews/include
Modified Files:
news_functions.php news_view.php
Log Message:
Index: news_view.php
===================================================================
RCS file: /cvsroot/flatnuke/flatnuke/flatnews/include/news_view.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** news_view.php 17 Feb 2013 21:13:29 -0000 1.57
--- news_view.php 23 Apr 2013 21:33:42 -0000 1.58
***************
*** 413,417 ****
// $newslist = list_news($section,"false","false");
//fix by Roberto Balbi
! sort($newslist);
$key = array_search($news,$newslist);
--- 413,417 ----
// $newslist = list_news($section,"false","false");
//fix by Roberto Balbi
! $newslist=array_reverse($newslist);
$key = array_search($news,$newslist);
***************
*** 1096,1100 ****
for ($i=0;$i<count($news_array);$i++){
$data = load_news_header($section,$news_array[$i]);
! echo "<img src=\"themes/$theme/images/read.png\" alt=\"News\" /> <a href=\"index.php?$modstring"."action=viewnews&news=".$news_array[$i]."\" title=\"visualizza news\">".$data['title']."</a> (".date("d/m/Y - H:i", get_news_date($news_array[$i])).", "._LETTO.$data['reads']." "._VOLTE.")<br />";
}
}
--- 1096,1100 ----
for ($i=0;$i<count($news_array);$i++){
$data = load_news_header($section,$news_array[$i]);
! echo "<img src=\"themes/$theme/images/read.png\" alt=\"News\" /> <a href=\"index.php?$modstring"."action=viewnews&news=".$news_array[$i]."\" title=\"visualizza news\">".$data['title']."</a> (".date("d/m/Y - H:i", get_news_time($news_array[$i])).", "._LETTO.$data['reads']." "._VOLTE.")<br />";
}
}
Index: news_functions.php
===================================================================
RCS file: /cvsroot/flatnuke/flatnuke/flatnews/include/news_functions.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** news_functions.php 17 Feb 2013 21:13:29 -0000 1.61
--- news_functions.php 23 Apr 2013 21:33:42 -0000 1.62
***************
*** 69,73 ****
$logtext="";
$logtext = get_file($fflogfile);
! if (!preg_match("/\<\?exit\(1\);\?\>/i",$logtext)){
fnwrite($fflogfile,"<?php exit(1);?>\n$logtext","w",array("nonull"));
}
--- 69,73 ----
$logtext="";
$logtext = get_file($fflogfile);
! if (!preg_match("/\<\?php exit\(1\);\?\>/i",$logtext)){
fnwrite($fflogfile,"<?php exit(1);?>\n$logtext","w",array("nonull"));
}
***************
*** 185,189 ****
//al momento la leggo dal nome del file
$newsdate ="";
! $newsdate = get_news_date($newsfile);
if (!check_var($newsdate,"digit")) $newsdate="0";
$data['date'] =$newsdate;
--- 185,189 ----
//al momento la leggo dal nome del file
$newsdate ="";
! $newsdate = get_news_time($newsfile);
if (!check_var($newsdate,"digit")) $newsdate="0";
$data['date'] =$newsdate;
***************
*** 938,942 ****
}
! if (!preg_match("/^hide_/",$news)){
return TRUE;
}
--- 938,942 ----
}
! if (!preg_match("/hide_/",$news)){
return TRUE;
}
***************
*** 997,1001 ****
if ($first_on_top=="true" or $first_on_top==TRUE){
$important_news = array();
! $important_news = glob(get_news_dir($section)."/top_*.fn.php");
$isortednews=array();
// print_r($important_news);
--- 997,1001 ----
if ($first_on_top=="true" or $first_on_top==TRUE){
$important_news = array();
! $important_news = glob(get_news_dir($section)."top_*.fn.php");
$isortednews=array();
// print_r($important_news);
***************
*** 1020,1024 ****
$normal_news = array();
! $normal_news = glob(get_news_dir($section)."/*.fn.php");
// $nnews = "";
$nsortednews = array();
--- 1020,1024 ----
$normal_news = array();
! $normal_news = glob(get_news_dir($section)."*.fn.php");
// $nnews = "";
$nsortednews = array();
***************
*** 1356,1360 ****
else {
// if (user_can_view_news($section,$news,$user))
! if (!preg_match("/^hide_/",$news))
$newslist[]=$news;
}
--- 1356,1360 ----
else {
// if (user_can_view_news($section,$news,$user))
! if (!preg_match("/hide_/",$news))
$newslist[]=$news;
}
***************
*** 1406,1410 ****
$time = str_replace($search,$replace,basename($news));
! if (ctype_digit($time))
return $time;
else return NULL;
--- 1406,1410 ----
$time = str_replace($search,$replace,basename($news));
! if (ctype_digit("$time"))
return $time;
else return NULL;
***************
*** 1432,1436 ****
function news_is_ontop($news){
$news = getparam($news,PAR_NULL,SAN_FLAT);
! if (preg_match("/^top_|^hide_top_/i",$news))
return TRUE;
else return FALSE;
--- 1432,1436 ----
function news_is_ontop($news){
$news = getparam($news,PAR_NULL,SAN_FLAT);
! if (preg_match("/^top_/i",$news))
return TRUE;
else return FALSE;
***************
*** 2100,2104 ****
*
*/
! function get_news_date($news){
$news = basename($news);
$news = str_replace("top_","",$news);
--- 2100,2104 ----
*
*/
! /*function get_news_date($news){ // funzione sostituita da get_news_time
$news = basename($news);
$news = str_replace("top_","",$news);
***************
*** 2107,2111 ****
return $news;
! }
/**
--- 2107,2111 ----
return $news;
! }*/
/**
***************
*** 2159,2163 ****
$item->guid = "$url?mod=$section&action=viewnews&news=".$news_list[$i];
// $item->author = $news['by'];
! $item->pubDate = date("D, d M Y H:i:s",get_news_date($news_list[$i]))." GMT";
$rss_channel->items[] = $item;
--- 2159,2163 ----
$item->guid = "$url?mod=$section&action=viewnews&news=".$news_list[$i];
// $item->author = $news['by'];
! $item->pubDate = date("D, d M Y H:i:s",get_news_time($news_list[$i]))." GMT";
$rss_channel->items[] = $item;
***************
*** 2234,2238 ****
$item->guid = "$url?mod=$section&action=viewnews&news=".$news_name;
// $item->author = $news['by'];
! $item->pubDate = date("D, d M Y H:i:s",get_news_date($news_name))." GMT";
$rss_channel->items[] = $item;
--- 2234,2238 ----
$item->guid = "$url?mod=$section&action=viewnews&news=".$news_name;
// $item->author = $news['by'];
! $item->pubDate = date("D, d M Y H:i:s",get_news_time($news_name))." GMT";
$rss_channel->items[] = $item;