Changeset 1069
- Timestamp:
- Mar 8, 2006, 4:22:25 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_base.class.php
r1062 r1069 66 66 { 67 67 $res .= $conf['level_separator']; 68 69 $url .= $this->date_components[$i].'-'; 68 if ($i>0) 69 { 70 $url .= '-'; 71 } 72 $url .= $this->date_components[$i]; 70 73 if ( isset($this->date_components[$i+1]) ) 71 74 { … … 97 100 $label = $this->calendar_levels[$level]['labels'][$date_component]; 98 101 } 99 elseif ( $date_component == 'any')102 elseif ('any' === $date_component ) 100 103 { 101 104 $label = l10n('calendar_any'); … … 113 116 for ($i=count($date_components)-1; $i>=0; $i--) 114 117 { 115 if ( $date_components[$i]!='any')116 { 117 $label = $ date_components[$i];118 if ( isset($this->calendar_levels[$i]['labels'][$date_components[$i]]))118 if ('any' !== $date_components[$i]) 119 { 120 $label = $this->get_date_component_label($i, $date_components[$i] ); 121 if ( $res!='' ) 119 122 { 120 $ label = $this->calendar_levels[$i]['labels'][$date_components[$i]];123 $res .= ' '; 121 124 } 122 $res .= $label .' ';125 $res .= $label; 123 126 } 124 127 } … … 193 196 { 194 197 $label = l10n('calendar_any'); 195 if (isset($selected_item) and 'any' == $selected_item)198 if (isset($selected_item) and 'any' === $selected_item) 196 199 { 197 200 $nav_bar .= '<span class="'.$class_prefix.'Sel">'; … … 290 293 if ( empty($this->date_components) ) 291 294 return; 292 293 $current = '';294 295 $query = 'SELECT CONCAT_WS("-"'; 295 296 for ($i=0; $i<count($this->date_components); $i++) 296 297 { 297 if ( $this->date_components[$i] != 'any' ) 298 if ( 'any' === $this->date_components[$i] ) 299 { 300 $query .= ','.'"any"'; 301 } 302 else 298 303 { 299 304 $query .= ','.$this->calendar_levels[$i]['sql']; 300 305 } 301 else 302 { 303 $query .= ','.'"any"'; 304 } 305 $current .= '-' . $this->date_components[$i]; 306 } 307 $current = substr($current, 1); 306 } 307 $current = implode('-', $this->date_components ); 308 308 309 309 $query.=') as period' . $this->inner_sql .' 310 310 AND ' . $this->date_field . ' IS NOT NULL 311 311 GROUP BY period'; 312 312 313 $upper_items = array_from_query( $query, 'period'); 314 313 315 usort($upper_items, 'version_compare'); 314 //echo ('<pre>'. var_export($upper_items, true) . '</pre>');315 316 $upper_items_rank = array_flip($upper_items); 317 if ( !isset($upper_items_rank[$current]) ) 318 { 319 array_push($upper_items, $current);// just in case (external link) 320 usort($upper_items, 'version_compare'); 321 $upper_items_rank = array_flip($upper_items); 322 } 316 323 $current_rank = $upper_items_rank[$current]; 324 317 325 if (!$this->has_nav_bar and 318 326 ($current_rank>0 or $current_rank < count($upper_items)-1 ) ) … … 320 328 $template->assign_block_vars( 'calendar.navbar', array() ); 321 329 } 322 323 330 if ( $current_rank>0 ) 324 331 { // has previous -
trunk/include/calendar_monthly.class.php
r1063 r1069 140 140 } 141 141 $res = ''; 142 if (isset($date[CYEAR]) and $date[CYEAR]!= 'any')142 if (isset($date[CYEAR]) and $date[CYEAR]!=='any') 143 143 { 144 144 $b = $date[CYEAR] . '-'; 145 145 $e = $date[CYEAR] . '-'; 146 if (isset($date[CMONTH]) and $date[CMONTH]!= 'any')146 if (isset($date[CMONTH]) and $date[CMONTH]!=='any') 147 147 { 148 148 $b .= $date[CMONTH] . '-'; 149 149 $e .= $date[CMONTH] . '-'; 150 if (isset($date[CDAY]) and $date[CDAY]!= 'any')150 if (isset($date[CDAY]) and $date[CDAY]!=='any') 151 151 { 152 152 $b .= $date[CDAY]; … … 163 163 $b .= '01-01'; 164 164 $e .= '12-31'; 165 if (isset($date[CMONTH]) and $date[CMONTH]!= 'any')165 if (isset($date[CMONTH]) and $date[CMONTH]!=='any') 166 166 { 167 167 $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH]; 168 168 } 169 if (isset($date[CDAY]) and $date[CDAY]!= 'any')169 if (isset($date[CDAY]) and $date[CDAY]!=='any') 170 170 { 171 171 $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY]; … … 177 177 { 178 178 $res = ' AND '.$this->date_field.' IS NOT NULL'; 179 if (isset($date[CMONTH]) and $date[CMONTH]!= 'any')179 if (isset($date[CMONTH]) and $date[CMONTH]!=='any') 180 180 { 181 181 $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH]; 182 182 } 183 if (isset($date[CDAY]) and $date[CDAY]!= 'any')183 if (isset($date[CDAY]) and $date[CDAY]!=='any') 184 184 { 185 185 $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY]; … … 225 225 $query.= $this->get_date_where(); 226 226 $query.= ' 227 GROUP BY period'; 227 GROUP BY period 228 ORDER BY YEAR('.$this->date_field.') DESC'; 228 229 229 230 $result = pwg_query($query); … … 291 292 $items[$m]['nb_images'] += $row['count']; 292 293 } 293 //echo ('<pre>'. var_export($items, true) . '</pre>');294 294 if (count($items)==1) 295 295 { // only one month exists so bail out to month view -
trunk/include/calendar_weekly.class.php
r1062 r1069 47 47 parent::initialize($date_field, $inner_sql, $date_components); 48 48 global $lang; 49 $week_no_labels=array(); 50 for ($i=1; $i<=53; $i++) 51 { 52 $week_no_labels[$i] = sprintf( l10n("Week %d"), $i); 53 //$week_no_labels[$i] = $i; 54 } 55 49 56 $this->calendar_levels = array( 50 57 array( … … 54 61 array( 55 62 'sql'=> 'WEEK('.$this->date_field.')+1', 56 'labels' => null63 'labels' => $week_no_labels, 57 64 ), 58 65 array( … … 87 94 if ( count($this->date_components)==1 ) 88 95 { 89 $this->build_nav_bar(CWEEK ); // week nav bar 1-5396 $this->build_nav_bar(CWEEK, array()); // week nav bar 1-53 90 97 } 91 98 if ( count($this->date_components)==2 ) … … 112 119 } 113 120 $res = ''; 114 if (isset($date[CYEAR]) and $date[CYEAR]!= 'any')121 if (isset($date[CYEAR]) and $date[CYEAR]!=='any') 115 122 { 116 123 $y = $date[CYEAR]; … … 118 125 } 119 126 120 if (isset($date[CWEEK]) and $date[CWEEK]!= 'any')127 if (isset($date[CWEEK]) and $date[CWEEK]!=='any') 121 128 { 122 129 $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK]; 123 130 } 124 if (isset($date[CDAY]) and $date[CDAY]!= 'any')131 if (isset($date[CDAY]) and $date[CDAY]!=='any') 125 132 { 126 133 $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY]; -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1059 r1069 110 110 $lang['Visits'] = 'Visits'; 111 111 $lang['Webmaster'] = 'Webmaster'; 112 $lang['Week %d'] = 'Week %d'; 112 113 $lang['about_page_title'] = 'About PhpWebGallery'; 113 114 $lang['access_forbiden'] = 'You are not authorized to access the requested page'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1059 r1069 109 109 $lang['Visits'] = 'Visites'; 110 110 $lang['Webmaster'] = 'Webmestre'; 111 $lang['Week %d'] = 'Semaine %d'; 111 112 $lang['about_page_title'] = 'À propos de PhpWebGallery'; 112 113 $lang['access_forbiden'] = 'Vous n\'êtes pas autorisé sur la page demandée'; … … 134 135 $lang['calendar_monthly_c'] = 'Calendrier mensuel'; 135 136 $lang['calendar_picture_hint'] = 'affiche les images du '; 136 $lang['calendar_view'] = 'V iew';137 $lang['calendar_view'] = 'Vue'; 137 138 $lang['calendar_weekly_l'] = 'Liste hebdomadaire'; 138 139 $lang['categories'] = 'Catégories'; -
trunk/template/yoga/content.css
r1062 r1069 18 18 } 19 19 20 #content H 2, H3 {20 #content H3 { 21 21 margin-bottom: 1ex; 22 22 } 23 24 #content H2 { margin-bottom: 3px;} /*<- for IE otherwise calendar select is displaced to middle of page*/ 23 25 24 26 #content H3 { … … 105 107 /* actions */ 106 108 UL.categoryActions { 107 margin: 2px;109 margin: 0 2px; 108 110 width: auto; 109 111 padding: 0; … … 118 120 } 119 121 122 #content DIV.titrePage { 123 padding: 0 0 3px; 124 } 125 120 126 #content UL.categoryActions LI { 121 127 display: inline; 122 123 128 } 124 129 … … 184 189 display: block; 185 190 float: right; 186 margin: 2px 2px;191 margin: 2px 0 0; 187 192 } 188 193 -
trunk/template/yoga/default-layout.css
r972 r1069 31 31 H2 { 32 32 margin: 0; 33 padding: 5px;33 padding: 0px 5px 4px; 34 34 text-align: left; 35 35 font-size: 120%; … … 91 91 92 92 .table2 { 93 border: 1px solid black; 93 border: 1px solid black; 94 94 margin: 1em auto; 95 95 padding: 0; … … 229 229 } 230 230 231 BODY#theAdminPage #theHeader P { 231 BODY#theAdminPage #theHeader P { 232 232 display: none; 233 233 } … … 258 258 } 259 259 260
Note: See TracChangeset
for help on using the changeset viewer.