Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1171836
files.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Sep 28, 4:22 PM
Size
945 B
Mime Type
text/x-php
Expires
Tue, Sep 30, 4:22 PM (1 d, 12 h)
Engine
blob
Format
Raw Data
Handle
759377
Attached To
rMINC Modules.In-Commerce
files.php
View Options
<?php
/**
* @version $Id: files.php 14257 2011-03-16 21:41:19Z alex $
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
class
FilesItem
extends
kDBItem
{
function
Delete
(
$id
)
{
$this
->
Load
(
$id
);
$upload_dir
=
$this
->
Fields
[
'FilePath'
][
'upload_dir'
];
$file_path
=
FULL_PATH
.
$upload_dir
.
$this
->
GetDBField
(
'FilePath'
);
if
(
file_exists
(
$file_path
))
{
unlink
(
$file_path
);
}
return
parent
::
Delete
(
$id
);
}
}
Event Timeline
Log In to Comment