Changeset 1107:3943962d69b8 for admin/blogs.php
- Timestamp:
- 02/27/13 11:48:32 (13 years ago)
- Branch:
- sexy
- Parents:
- 880:02c78f56f430 (diff), 1105:ce855d61f9ce (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 edited
-
admin/blogs.php (modified) (2 diffs)
-
admin/blogs.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin/blogs.php
r873 r1107 76 76 77 77 if (!empty($_GET['del'])) { 78 echo '<p class="message">'.__('Blog has been successfully deleted.').'</p>';78 dcPage::message(__('Blog has been successfully deleted.')); 79 79 } 80 80 … … 133 133 '<th>'.__('Blog name').'</th>'. 134 134 '<th class="nowrap">'.__('Last update').'</th>'. 135 '<th class="nowrap">'.__('Entries ').'</th>'.135 '<th class="nowrap">'.__('Entries (all types)').'</th>'. 136 136 '<th class="nowrap">'.__('Blog ID').'</th>'. 137 137 '<th> </th>'. -
admin/blogs.php
r907 r1107 61 61 try { 62 62 $counter = $core->getBlogs($params,1); 63 $ rs = $core->getBlogs($params);63 $blogs = $core->getBlogs($params); 64 64 $nb_blog = $counter->f(0); 65 65 } catch (Exception $e) { … … 139 139 '</tr>'; 140 140 141 while ($rs->fetch()) {142 echo blogLine($ rs);141 foreach ($blogs as $blog) { 142 echo blogLine($blog); 143 143 } 144 144 … … 151 151 dcPage::close(); 152 152 153 function blogLine($ rs)153 function blogLine($blog) 154 154 { 155 155 global $core; 156 156 157 $blog_id = html::escapeHTML($ rs->blog_id);157 $blog_id = html::escapeHTML($blog->blog_id); 158 158 $edit_link = ''; 159 159 … … 165 165 } 166 166 167 $img_status = $ rs->blog_status == 1 ? 'check-on' : 'check-off';168 $txt_status = $GLOBALS['core']->getBlogStatus($ rs->blog_status);167 $img_status = $blog->blog_status == 1 ? 'check-on' : 'check-off'; 168 $txt_status = $GLOBALS['core']->getBlogStatus($blog->blog_status); 169 169 $img_status = sprintf('<img src="images/%1$s.png" alt="%2$s" title="%2$s" />',$img_status,$txt_status); 170 170 $offset = dt::getTimeOffset($core->auth->getInfo('user_tz')); 171 $blog_upddt = dt::str(__('%Y-%m-%d %H:%M'),strtotime($ rs->blog_upddt) + $offset);171 $blog_upddt = dt::str(__('%Y-%m-%d %H:%M'),strtotime($blog->blog_upddt) + $offset); 172 172 173 173 return 174 174 '<tr class="line">'. 175 '<td class="maximal"><a href="index.php?switchblog='.$ rs->blog_id.'" '.176 'title="'.sprintf(__('Switch to blog %s'),$ rs->blog_id).'">'.177 html::escapeHTML($ rs->blog_name).'</a></td>'.175 '<td class="maximal"><a href="index.php?switchblog='.$blog->blog_id.'" '. 176 'title="'.sprintf(__('Switch to blog %s'),$blog->blog_id).'">'. 177 html::escapeHTML($blog->blog_name).'</a></td>'. 178 178 '<td class="nowrap">'.$blog_upddt.'</td>'. 179 '<td class="nowrap">'.$core->countBlogPosts($ rs->blog_id).'</td>'.179 '<td class="nowrap">'.$core->countBlogPosts($blog->blog_id).'</td>'. 180 180 '<td class="nowrap">'.$blog_id.'</td>'. 181 181 '<td>'.$edit_link.'</td>'.
Note: See TracChangeset
for help on using the changeset viewer.
