Skip to content

Commit

Permalink
[no ticket] Cleanup for autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Oct 3, 2015
1 parent c2a1c9b commit 158a43b
Show file tree
Hide file tree
Showing 29 changed files with 312 additions and 3,466 deletions.
14 changes: 13 additions & 1 deletion Rox/Framework/TwigView.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use \Twig_Environment;
use \RoxModelBase;
use \FlaglistModel;
use \Illuminate\Database\Capsule\Manager as Capsule;

class TwigView extends AbstractBasePage {

Expand Down Expand Up @@ -73,9 +74,20 @@ private function _getDefaults() {
$roxModel = new RoxModelBase();
$member = $roxModel->getLoggedInMember();
$loggedIn = ($member !== false);
$messageCount = 0;
if ($loggedIn) {
$messageCount = \Rox\Models\Message::where(
function ($q) use ($member) {
$q->where('IdReceiver', (int)$member->id)
->where('WhenFirstRead', '0000-00-00 00:00')
->where('Status', 'Sent');
return $q;
}
)->count();
}
return array(
'logged_in' => $loggedIn,
'messages' => 123,
'messages' => $messageCount,
'meta.robots' => 'ALL'
);
}
Expand Down
9 changes: 9 additions & 0 deletions Rox/Models/Message.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Rox\Models;

use Illuminate\Database\Eloquent\Model;

class Message extends Model {
public $timestamps = false;
}
35 changes: 0 additions & 35 deletions build/lastcomments/lastcomments.widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,6 @@ public function render()

public function setGroup($group)
{
// extract information from the $group object
}
}

//------------------------------------------------------------------------------------
/**
* This widget shows a list of members with pictures.
*/
class GroupMemberlistWidget // extends MemberlistWidget?
{
private $_group;

public function render()
{
$memberships = $this->_group->getMembers();
for ($i = 0; $i < 6 && $i < count($memberships); $i++)
{
?>
<div class="groupmembers center float_left">
<?=MOD_layoutbits::PIC_50_50($memberships[$i]->Username) ?>
<a href="members/<?=$memberships[$i]->Username ?>"><?=$memberships[$i]->Username ?></a>
</div>
<?php
}
}

public function setGroup($group)
{
// extract memberlist information from the $group object
$this->_group = $group;
}
}





?>
2 changes: 1 addition & 1 deletion build/notify/groupsettings.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This page allows to create a new group
*
*/
class GroupSettingsPage extends GroupsBasePage
class GroupSettingsPage2 extends GroupsBasePage
{
protected function teaserContent()
{
Expand Down
2 changes: 1 addition & 1 deletion build/notify/notifycreation.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This page allows to create a new group
*
*/
class GroupsCreationPage extends GroupsBasePage
class GroupsCreationPage2 extends GroupsBasePage
{
protected function teaserContent()
{
Expand Down
2 changes: 1 addition & 1 deletion build/notify/notifyoverview.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This page allows to create a new group
*
*/
class GroupsCreationPage extends GroupsBasePage
class GroupsCreationPage3 extends GroupsBasePage
{
protected function teaserContent()
{
Expand Down
29 changes: 0 additions & 29 deletions build/rox/magpierss/code.php

This file was deleted.

Loading

0 comments on commit 158a43b

Please sign in to comment.