Merge branch 'master' of ssh://gitolite@asdynamics.com:50005/projects/fdn2.git
This commit is contained in:
@@ -31,7 +31,7 @@ else {
|
||||
GlobalVariables::get("dao")->save($admin);
|
||||
}
|
||||
|
||||
$imgDir = "/home/rik/Scrivania/FDN_BAK/mediaimg/notizie";
|
||||
$imgDir = "/home/r.didato/mediaimg/notizie";
|
||||
$statement = $pdo->query("select * from notizia order by id desc limit 0,100");
|
||||
$dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
|
||||
// while (is_array($dati) && sizeof($dati)==0){
|
||||
@@ -85,12 +85,16 @@ $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
|
||||
if ( preg_match("~^http[s]?[:]//youtu\.be/(.+)$~", trim($ele->img), $matches) ){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/embed/([^\"]+)[\"]~", trim($ele->img), $matches)){
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/embed/([^\"]++)~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
else if (preg_match("~http[s]?[:]//www\.youtube\.com/watch[?]v[=](.+)$~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
// LEGACY FORMAT http://www.youtube.com/v/c0B1snrcoPk&hl=it_IT&fs=1&
|
||||
else if (preg_match("~http[:]//www\.youtube\.com/v/([^&]++)~", trim($ele->img), $matches)){
|
||||
$media->link = $matches[1];
|
||||
}
|
||||
// $media->link = $ele->img;
|
||||
$media = new MediaModel($media);
|
||||
GlobalVariables::get("dao")->save($media);
|
||||
|
||||
@@ -20,6 +20,8 @@ class GenerateAdminActivationMailTask extends Task {
|
||||
foreach ($admins as $admin){
|
||||
$mail = FDN_MailHelper::getAdminConfirmMail($admin);
|
||||
GlobalVariables::get("dao")->save($mail);
|
||||
$admin->activationSent = true;
|
||||
GlobalVariables::get("dao")->save($admin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,10 @@ try {
|
||||
$searchParameters = "";
|
||||
if(array_key_exists("search", $_POST) && strcmp($_POST["search"], "")!=0){
|
||||
|
||||
var_dump($_POST["search"]);
|
||||
// var_dump($_POST["search"]);
|
||||
$searchParameters = strip_tags(PostHandler::get("search"));
|
||||
|
||||
// $notizie = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED),
|
||||
// array("sort"=>array("about.data"=>-1),"limit"=>$limit,"skip"=>$page*$limit)
|
||||
// );
|
||||
|
||||
$found = false;
|
||||
$limit=12;
|
||||
$page = 1;
|
||||
@@ -28,7 +25,7 @@ try {
|
||||
}
|
||||
|
||||
$skip =($page - 1) * $limit;
|
||||
$notizieAll = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
$notizieAll = GlobalVariables::get("dao")->count("NotiziaModel",
|
||||
array("status"=>NotiziaModel::STATUS_ACCEPTED)
|
||||
);
|
||||
|
||||
@@ -40,11 +37,16 @@ try {
|
||||
$found = false;
|
||||
}
|
||||
|
||||
$notizie = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
$notizie = GlobalVariables::get("dao")->search("NotiziaModel",$searchParameters,
|
||||
array("status"=>NotiziaModel::STATUS_ACCEPTED),
|
||||
array("sort"=>array("about.data"=>-1),"skip"=>$skip,"limit"=>$limit)
|
||||
array("sort"=>array("about.data"=>-1),"limit"=>$limit,"skip"=>$page*$limit)
|
||||
);
|
||||
|
||||
// $notizie = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED),
|
||||
// array("sort"=>array("about.data"=>-1),"skip"=>$skip,"limit"=>$limit)
|
||||
// );
|
||||
|
||||
if (sizeof($notizie)>0){
|
||||
$found=true;
|
||||
$notizie = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $notizie);
|
||||
|
||||
@@ -310,7 +310,9 @@ display: inline-block;
|
||||
|
||||
.headArticolo{margin-bottom:25px;}
|
||||
|
||||
.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;text-align:center;}
|
||||
.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;text-align:center; max-height:225px;}
|
||||
.articoloMainMedia iframe{min-height:180px;}
|
||||
.articoloMainMedia.mediaContent img{max-height:225px;}
|
||||
|
||||
.articoloTitle{display:inline-block;width:550px;padding:0px 20px;vertical-align:top;}
|
||||
.articoloTitle > .title{font-size:20px;font-weight:bold;text-transform:uppercase;font-family:"Arial Bold";}
|
||||
|
||||
Reference in New Issue
Block a user