Changeset 873:f9ef04edef05 for admin/blogs.php
- Timestamp:
- 08/14/12 15:43:05 (13 years ago)
- Branch:
- sexy
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/blogs.php
r792 r873 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.