diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 9b76329d8da..c87af9558e8 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -138,16 +138,18 @@ if (empty($action) && !GETPOSTISSET('action')) { if ($action == 'default') { // When action is default, we want a calendar view and not the list $action = (($defaultview != 'show_list') ? $defaultview : 'show_month'); } -if (GETPOST('viewcal', 'restricthtml') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') { +if (GETPOST('viewcal', 'int') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') { $action = 'show_month'; $day = ''; } // View by month -if (GETPOST('viewweek', 'restricthtml') || GETPOST('action', 'alpha') == 'show_week') { +if (GETPOST('viewweek', 'int') || GETPOST('action', 'alpha') == 'show_week') { $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); } // View by week -if (GETPOST('viewday', 'restricthtml') || GETPOST('action', 'alpha') == 'show_day') { +if (GETPOST('viewday', 'int') || GETPOST('action', 'alpha') == 'show_day') { $action = 'show_day'; $day = ($day ? $day : date("d")); } // View by day +$object = new ActionComm($db); + // Load translation files required by the page $langs->loadLangs(array('agenda', 'other', 'commercial')); @@ -197,6 +199,7 @@ if (GETPOST("viewperuser", 'alpha') || $action == 'show_peruser') { exit; } +/* if ($action == 'delete_action') { $event = new ActionComm($db); $event->fetch($actionid); @@ -206,6 +209,7 @@ if ($action == 'delete_action') { $result = $event->delete(); } +*/ /* @@ -484,25 +488,25 @@ $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="pictoaction //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -939,6 +943,7 @@ if ($showbirthday) { } } +// LEAVE CALENDAR $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.rowid = x.fk_user"; @@ -1877,7 +1882,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cacheusers[$tmpid] = $newuser; } - $listofusertoshow .= '
'.$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); + $listofusertoshow = ''; + $listofusertoshow .= '
'.$cacheusers[$tmpid]->getNomUrl(-1, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); print $listofusertoshow; } else { // Other calendar // Picto diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d27aba89217..914c323df05 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -779,7 +779,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = do { $oldstringtoclean = $out; - if (!empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) && $check != 'restricthtmlallowunvalid') { + if (!empty($out) && !empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) && $check != 'restricthtmlallowunvalid') { try { $dom = new DOMDocument; $dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index eb778f521ad..b0f4d831473 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4955,7 +4955,7 @@ function migrate_export_import_profiles($mode = 'export') if ($oldfield != $newfield || $oldfilter != $newfilter) { $sqlupd = 'UPDATE '.MAIN_DB_PREFIX.$mode."_model SET field = '".$db->escape($newfield)."'"; if ($mode == 'export') { - $sql .= ", filter = '".$db->escape($newfilter)."'"; + $sqlupd .= ", filter = '".$db->escape($newfilter)."'"; } $sqlupd .= ' WHERE rowid='.$obj->rowid; $resultstring .= ''.$sqlupd."\n"; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index cab4f537c5d..f08ddd217ab 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -105,7 +105,8 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be print ''.$langs->trans("Search").''; } print ''; - print ''; + print ''; + print ''; if ($i == 0) { print ''; } @@ -336,11 +337,11 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $product_static->status_buy = $objp->tobuy; $product_static->status_batch = $objp->tobatch; - //Multilangs + // Multilangs if (!empty($conf->global->MAIN_MULTILANGS)) { $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; - $sql .= " WHERE fk_product=".$objp->rowid; + $sql .= " WHERE fk_product=".((int) $objp->rowid); $sql .= " AND lang='".$db->escape($langs->getDefaultLang())."'"; $resultd = $db->query($sql); @@ -372,7 +373,7 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $objp->price = $price_result; } } - print ''; + print ''; if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') { print price($objp->price_ttc).' '.$langs->trans("TTC"); } else {