Skip to content

Commit

Permalink
Merge branch 'dev' of git://github.com/ceeram/infinitas into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jan 31, 2010
2 parents 284ba43 + 27d293e commit 6c69d7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
10 changes: 8 additions & 2 deletions infinitas/blog/views/posts/admin_dashboard.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@
<h3 class="left"><?php __('Recent activity'); ?></h3>
<div class="view-all left">&nbsp;<?php echo $html->link('(view all)', array('controller' => 'posts')); ?></div>
<ul class="feed clr">
<?php foreach($blogFeeds as $feed): ?>
<?php
if($blogFeeds):
foreach($blogFeeds as $feed):
?>
<?php
if (!isset($iteration)) $iteration = 0;
$iteration++;
Expand Down Expand Up @@ -127,7 +130,10 @@
<div class="preview clr"><?php echo $text->truncate($feed['Feed']['intro'], 150, array('exact' => false, 'html' => true)); ?></div>
</div>
</li>
<?php endforeach; ?>
<?php
endforeach;
endif;
?>
</ul>
</div>
</div>
Expand Down
13 changes: 3 additions & 10 deletions infinitas/installer/controllers/install_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,31 +332,24 @@ function done() {
*/
function __executeSQLScript($db, $fileName) {
$statements = file($fileName);

$status = true;
$templine = '';
foreach ($statements as $line)
{
foreach ($statements as $line) {
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
{
if (substr($line, 0, 2) == '--' || $line == '') {
continue;
}

// Add this line to the current segment
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';')
{
if (substr(trim($line), -1, 1) == ';') {
// Perform the query
$status = $status && $db->query($templine);
// Reset temp variable to empty
$templine = '';
}
}

return $status;
}
}

?>

0 comments on commit 6c69d7b

Please sign in to comment.