Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F211561
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/controllers/home.php b/controllers/home.php
--- a/controllers/home.php
+++ b/controllers/home.php
@@ -1,62 +1,62 @@
<?php
/*
* Zed
* (c) 2010, Dereckson, some rights reserved
* Released under BSD license
*
* Homepage
*/
//
// Gets and manage messages
//
require_once('includes/objects/message.php');
//Deletes a message if user have clicked the X
if ($_GET['action'] == 'msg_delete') {
//Deletes message $_GET['id']
$id = $_GET['id'];
$messageToDelete = new Message($id);
if ($messageToDelete->to != $CurrentUser->id) {
//Not one of user message
$smarty->assign('WAP', lang_get('NotYourMessage'));
} elseif ($messageToDelete->flag == 2) {
//Already deleted
$smarty->assign('WAP', lang_get('MessageAlreadyDeleted'));
} else {
$messageToDelete->delete();
$smarty->assign('NOTIFY', lang_get('MessageDeleted'));
}
}
//Gets messages
-$messages = Message::get_messages($CurrentUser->id);
+$messages = Message::get_messages($CurrentPerso->id);
$smarty->assign('MESSAGES', $messages);
//Gets scene
require_once("includes/geo/scene.php");
$scene = new GeoScene($CurrentPerso->location);
$smarty->assign('SCENE', $scene);
//
// HTML output
//
//Serves header
$smarty->assign('PAGE_TITLE', lang_get('Welcome'));
include('header.php');
//Serves content
if (!$scene->lastError)
$scene->render();
$smarty->display('home.tpl');
if ($messages)
$smarty->display('messages.tpl');
//Serves footer
$smarty->assign("screen", "Home console");
include('footer.php');
?>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 24, 10:00 (10 h, 17 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21236
Default Alt Text
(1 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment