diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php
index 28827d8c5..88c784fe3 100644
--- a/e107_admin/newspost.php
+++ b/e107_admin/newspost.php
@@ -96,6 +96,12 @@ class news_admin extends e_admin_dispatcher
{
+ if(!empty($_GET['sub']) && $_GET['action'] == 'create')
+ {
+ $this->adminMenu['sub/list']['selected'] = true;
+ $this->getResponse()->setTitle(NWSLAN_47);
+ }
+
}
@@ -291,7 +297,9 @@ class news_sub_form_ui extends e_admin_form_ui
$text .= '
-
+
';
return $text;
@@ -337,10 +346,27 @@ class news_sub_form_ui extends e_admin_form_ui
{
$text = "
";
$approved = $this->getController()->getListModel()->get('submitnews_auth'); // approved;
+
+
+ $row = $this->getController()->getListModel();
+
+ $submitnews_id = $row->get('submitnews_id');
+ $submitnews_title = $row->get('submitnews_title');
+ $submitnews_file = $row->get('submitnews_file');
+ $submitnews_item = $row->get('submitnews_item');
+
+ // $text .= "
";
+
+
+ $text = "".ADMIN_VIEW_ICON."";
+
+
+
+
if($approved == 0)
{
//$text = $this->submit_image('submitnews['.$id.']', 1, 'execute', NWSLAN_58);
- $text = "
".ADMIN_EXECUTE_ICON."";
+ $text .= "
".ADMIN_EXECUTE_ICON."";
// NWSLAN_103;
}
else // Already submitted;
@@ -348,7 +374,7 @@ class news_sub_form_ui extends e_admin_form_ui
}
- $text .= $this->submit_image('etrigger_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'btn btn-large action delete'));
+ $text .= $this->submit_image('etrigger_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'btn btn-default btn-large action delete'));
$text .= "
";
return $text;
}
@@ -452,6 +478,12 @@ class news_admin_ui extends e_admin_ui
public function beforeCreate($new_data)
{
+ if(!empty($new_data['news_thumbnail']) && !empty($_GET['sub'])) // From SubmitNews.
+ {
+ $new_data['news_thumbnail'] = $this->processSubNewsImages($new_data['news_thumbnail']);
+ }
+
+
$new_data['news_thumbnail'] = $this->processThumbs($new_data['news_thumbnail']);
if(empty($new_data['news_datestamp']))
@@ -459,6 +491,8 @@ class news_admin_ui extends e_admin_ui
$new_data['news_datestamp'] = time();
}
+
+
$new_data['news_sef'] = empty($new_data['news_sef']) ? eHelper::title2sef($new_data['news_title']) : eHelper::secureSef($new_data['news_sef']);
$tmp = explode(chr(35), $new_data['news_author']);
@@ -472,6 +506,43 @@ class news_admin_ui extends e_admin_ui
return $new_data;
}
+ private function processSubNewsImages($row)
+ {
+ $new = array();
+ foreach($row as $k=>$v)
+ {
+ $tmp = urldecode($v);
+ if(strpos($tmp,'{e_UPLOAD}')!==false)
+ {
+ list($root,$qry) = explode("?",$tmp);
+ parse_str($qry,$opt);
+ if(!empty($opt['src']))
+ {
+
+ $f = str_replace('{e_UPLOAD}','',$opt['src']);
+ // e107::getMessage()->addInfo("
Importing File
".print_a($f,true));
+ if($bbpath = e107::getMedia()->importFile($f,'news', e_UPLOAD.$f))
+ {
+ $new[] = $bbpath;
+ }
+ }
+
+ }
+ elseif(!empty($v))
+ {
+ $new[] = $v;
+ }
+ }
+
+ // e107::getMessage()->addInfo("
Process SubNews Images
".print_a($new,true));
+
+ return implode(",",$new);
+
+
+
+
+ }
+
public function beforeUpdate($new_data, $old_data, $id)
{
@@ -1190,7 +1261,7 @@ class news_admin_ui extends e_admin_ui
{
$sql = e107::getDb();
$tp = e107::getParser();
-
+
if ($sql->select("submitnews", "*", "submitnews_id=".intval($id)))
{
$row = $sql->fetch();
@@ -1198,23 +1269,9 @@ class news_admin_ui extends e_admin_ui
$data['news_body'] = $row['submitnews_item'];
$data['news_category'] = intval( $row['submitnews_category']);
$data['news_body'] .= "\n[[b]".NWSLAN_49." {$row['submitnews_name']}[/b]]";
- $thumbs = array();
- if($row['submitnews_file'])
- {
- $files = explode(",",$row['submitnews_file']);
- foreach($files as $f)
- {
- if($bbpath = e107::getMedia()->importFile($f,'news'))
- {
- $thumbs[] = $bbpath;
- // $data['news_body'] .= "\n\n[img]".$bbpath."[/img]";
- }
-
- }
- }
-
- $data['news_thumbnail'] = implode(",",$thumbs);
+ $data['news_thumbnail'] = $row['submitnews_file']; // implode(",",$thumbs);
+ $data['news_sef'] = eHelper::dasherize($data['news_title']);
$data['submitted_id'] = $id;
foreach($data as $k=>$v)
@@ -1437,6 +1494,20 @@ class news_form_ui extends e_admin_form_ui
if($mode == 'write')
{
+ if(!empty($_GET['sub']))
+ {
+ $thumbTmp = explode(",",$curval);
+ $paths = array();
+ foreach($thumbTmp as $key=>$path)
+ {
+ $paths[] = e107::getParser()->thumbUrl(e_TEMP.$path,'aw=800'); ;
+ }
+
+ $curval = implode(",", $paths);
+
+ }
+
+
$tp = e107::getParser();
$frm = e107::getForm();
@@ -1447,7 +1518,7 @@ class news_form_ui extends e_admin_form_ui
{
if(!empty($path) && (strpos($path, ",") == false) && $path[0] != "{" && $tp->isVideo($path) === false )//BC compat
{
- $thumbTmp[$key] = "{e_IMAGE}newspost_images/".$path;
+ // $thumbTmp[$key] = "{e_IMAGE}newspost_images/".$path;
}
}
diff --git a/e107_admin/upload.php b/e107_admin/upload.php
index e2dc3d823..639ed385f 100644
--- a/e107_admin/upload.php
+++ b/e107_admin/upload.php
@@ -42,6 +42,7 @@ class upload_admin extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'V'),
+ // 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'V'),
// 'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'V'),
/*
@@ -75,7 +76,7 @@ class upload_ui extends e_admin_ui
'checkboxes' => array ( 'title' => '', 'type' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => true, 'class' => 'center', 'toggle' => 'e-multiselect', ),
'upload_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
'upload_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
- 'upload_name' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', 'validate' => true, 'inline' => true),
+ 'upload_name' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', 'validate' => true, 'inline' => true),
'upload_poster' => array ( 'title' => UPLLAN_5, 'type' => 'user', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
'upload_email' => array ( 'title' => LAN_EMAIL, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
'upload_website' => array ( 'title' => LAN_URL, 'type' => 'url', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
@@ -86,19 +87,25 @@ class upload_ui extends e_admin_ui
'upload_demo' => array ( 'title' => UPLLAN_14, 'type' => 'url', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
'upload_filesize' => array ( 'title' => LAN_SIZE, 'type' => 'hidden', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
'upload_active' => array ( 'title' => LAN_STATUS, 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => array('singleOption' => true), 'class' => 'center', 'thclass' => 'center', 'batch' => true),
- 'upload_category' => array ( 'title' => LAN_CATEGORY, 'type' => 'dropdown', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => array(), 'writeParms' => array(), 'class' => 'left', 'thclass' => 'left', 'validate' => true ),
+ 'upload_category' => array ( 'title' => LAN_CATEGORY, 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => array(), 'writeParms' => array(), 'class' => 'left', 'thclass' => 'left', 'validate' => true ),
+ 'upload_owner' => array ( 'title' => LAN_OWNER, 'type' => 'text', 'readonly'=>true, 'data' => 'str', 'width' => '40%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
+
'options' => array ( 'title' => LAN_OPTIONS, 'type' => '', 'data' => '', 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ),
);
- protected $fieldpref = array('checkboxes', 'upload_datestamp', 'upload_name', 'upload_category', 'options');
+ protected $fieldpref = array('checkboxes', 'upload_datestamp', 'upload_poster','upload_name', 'upload_category', 'upload_owner', 'options');
-
+ public $categories = array();
// optional
public function init()
{
- $qry = "
+
+ $this->categories = e107::getAddonConfig('e_upload','','category');
+
+
+ /* $qry = "
SELECT dc.download_category_name, dc.download_category_id
FROM #download_category AS dc
WHERE dc.download_category_parent = 0
@@ -127,7 +134,7 @@ class upload_ui extends e_admin_ui
$parent = $cats[$id];
$label = e107::getParser()->toHTML($parent['download_category_name'], false, 'TITLE');
$this->addSubcategories($id, $cats, $subIndex, $label);
- }
+ }*/
}
@@ -299,6 +306,60 @@ class upload_ui extends e_admin_ui
class upload_form_ui extends e_admin_form_ui
{
+
+ public function upload_category($value, $type, $options = array())
+ {
+ switch($type)
+ {
+
+
+ case 'read':
+
+
+ $owner = $this->getController()->getListModel()->get('upload_owner');
+
+ $opts = $this->getController()->categories[$owner];
+
+ return print_a($opts,true);
+
+ foreach($opts as $k=>$v)
+ {
+
+ }
+
+ return $value."-- ".$owner; // $this->radio_switch('upload_active', $va
+ return $value ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
+ break;
+
+ case 'write':
+ $owner = $this->getController()->getModel()->get('upload_owner');
+ return $value."-- ".$owner; // $this->radio_switch('upload_active', $value, LAN_ACCEPT, LAN_PENDING, $options);
+ break;
+
+ case 'batch':
+
+ //TODO move all 'downloads' specific code into e_upload.php .
+ /*
+ $pref = e107::pref('core', 'e_upload_list');
+ foreach($pref as $k=>$v)
+ {
+ $def = 'LAN_PLUGIN_'.strtoupper($v).'_NAME';
+ $text = $this->option('Send to '.defset($def,$v), 'send_to_'.$k, false, array('other' => 'style="padding-left: 15px"'));
+ }
+ */
+
+ // $text = $this->option(LAN_ACCEPT, 'upload_active', false, array('other' => 'style="padding-left: 15px"'));
+
+
+ // return $text; // $this->option('Accept', 'upload_active', false, array('other' => 'style="padding-left: 15px"'));
+ break;
+ }
+ }
+
+
+
+
+
public function upload_active($value, $type, $options = array())
{
switch($type)
diff --git a/e107_core/sql/core_sql.php b/e107_core/sql/core_sql.php
index 25ff301c2..4a47d58e0 100644
--- a/e107_core/sql/core_sql.php
+++ b/e107_core/sql/core_sql.php
@@ -503,13 +503,14 @@ CREATE TABLE upload (
upload_datestamp int(10) unsigned NOT NULL default '0',
upload_name varchar(100) NOT NULL default '',
upload_version varchar(10) NOT NULL default '',
- upload_file varchar(100) NOT NULL default '',
+ upload_file varchar(180) NOT NULL default '',
upload_ss varchar(100) NOT NULL default '',
upload_description text NOT NULL,
upload_demo varchar(100) NOT NULL default '',
upload_filesize int(10) unsigned NOT NULL default '0',
upload_active tinyint(3) unsigned NOT NULL default '0',
upload_category tinyint(3) unsigned NOT NULL default '0',
+ upload_owner varchar(50) NOT NULL default '',
PRIMARY KEY (upload_id),
KEY upload_active (upload_active)
) ENGINE=MyISAM;
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 067252af8..fd88d2abf 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -596,8 +596,16 @@ class e_form
{
$url .= "&video=1";
}
-
- $title = "Media Manager : ".$category;
+
+ if(E107_DBG_BASIC)
+ {
+
+ $title = "Media Manager : ".$category;
+ }
+ else
+ {
+ $title = LAN_EDIT;
+ }
// $ret = "
".$label.""; // using colorXXXbox.
$ret = "
".$label.""; // using bootstrap.
@@ -842,7 +850,7 @@ class e_form
$width = vartrue($sc_parameters['w'], 120);
$height = vartrue($sc_parameters['h'], 100);
- $ret = "
";
+ $ret = "
";
$att = 'aw='.$width."'&ah=".$height."'";
$thpath = isset($sc_parameters['nothumb']) || vartrue($hide) ? $default : $tp->thumbUrl($default_thumb, $att, true);
@@ -853,10 +861,17 @@ class e_form
{
$cat = $cat . "_image";
}
+
+
}
$ret .= $this->mediaUrl($cat, $label,$name_id,$sc_parameters);
+
+ if($cat != '_icon' && $blank == false) // ICONS
+ {
+ $ret .= "
";
+ }
$ret .= "
\n";
$ret .= "
";
$ret .= "
";
diff --git a/e107_handlers/login.php b/e107_handlers/login.php
index d0c65597e..28f230f6c 100644
--- a/e107_handlers/login.php
+++ b/e107_handlers/login.php
@@ -616,8 +616,10 @@ class userlogin
// $text = e107::getParser()->toDB($text);
// $text = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS_);
- $debug = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
+ $debug = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,4);
+ // unset($debug[0]);
+ $debug[0] = e_REQUEST_URI;
// $array = debug_backtrace();
// e107::getLog()->e_log_event(4, $array, "LOGIN", $title, $text, FALSE, LOG_TO_ROLLING);
diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php
index 03dc49f92..b5a86ce64 100644
--- a/e107_handlers/media_class.php
+++ b/e107_handlers/media_class.php
@@ -42,6 +42,16 @@ class e_media
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_image.php');
}
+
+
+ public function debug($val)
+ {
+
+ $this->logging = intval($val);
+ }
+
+
+
/**
* Import files from specified path into media database.
* @param string $cat Category nickname
@@ -804,8 +814,12 @@ class e_media
}
-
- function checkDupe($oldpath,$newpath)
+ /**
+ * @param string $oldpath - path to pre-moved file (no e107 constants)
+ * @param string $newpath - new path to move file to (no e107 constants)
+ * @return bool|string returns false if duplciate entry found otherwise return new path.
+ */
+ function checkDupe($oldpath, $newpath)
{
$mes = e107::getMessage();
$tp = e107::getParser();
@@ -823,9 +837,11 @@ class e_media
if($sql->select("core_media","media_url","media_url LIKE '%".$tp->createConstants($newpath,'rel')."' LIMIT 1"))
{
// $mes->addWarning($newpath." detected in media-manager.");
- $this->log("Import not performed. ".$newpath." detected in media table already.");
- $row = $sql->fetch();
- $newpath = $row['media_url'];
+ $this->log("Import not performed. ".$newpath." detected in media table already.");
+
+ return false;
+ //$row = $sql->fetch();
+ //$newpath = $row['media_url']; // causes trouble with importFile() if {e_MEDIA_CONSTANT} returned.
}
return $newpath;
@@ -1022,7 +1038,7 @@ class e_media
$tp = e107::getParser();
$sql = e107::getDb();
- if(!$oldpath) $oldpath = e_IMPORT.$file;
+ if(empty($oldpath)) $oldpath = e_IMPORT.$file;
if(!file_exists($oldpath))
{
@@ -1045,10 +1061,15 @@ class e_media
$mes->addError("Couldn't generate path from file info:".$oldpath);
return FALSE;
}
-
- $newpath = $this->checkDupe($oldpath,$typePath.'/'.$file);
+
+
+ if(!$newpath = $this->checkDupe($oldpath,$typePath.'/'.$file))
+ {
+ return $tp->createConstants($typePath.'/'.$file,'rel');
+ }
+
$newpath = $this->checkFileExtension($newpath, $img_data['media_type']);
-
+
if(!rename($oldpath, $newpath)) // e_MEDIA.$newpath was working before.
{
$this->log("Couldn't move file from ".realpath($oldpath)." to ".e_MEDIA.$newpath);
diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php
index 472d951ee..c435a05cb 100644
--- a/e107_languages/English/English.php
+++ b/e107_languages/English/English.php
@@ -122,6 +122,7 @@ define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field adm
define("LAN_SHOW", "Show");
define("LAN_GENERATE", "Generate");
define("LAN_SUMMARY", "Summary"); // TODO more files use summary replace
+define("LAN_REQUIRED_BLANK", "Required field(s) were left blank.");
?>
\ No newline at end of file
diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php
index 37965474f..9b084bd45 100644
--- a/e107_languages/English/admin/lan_admin.php
+++ b/e107_languages/English/admin/lan_admin.php
@@ -240,7 +240,7 @@ define("LAN_CREATED_FAILED","Creation Unsuccessful");
define("LAN_DELETED_FAILED","Deletion Unsuccessful");
define("LAN_UPDATED_FAILED","Update Unsuccessful");
define("LAN_NO_CHANGE","Nothing updated as no changes were made.");
-define("LAN_REQUIRED_BLANK", "Required field(s) left blank.");
+
define("LAN_TRY_AGAIN","Please try again.");
define("LAN_NEVER", "Never");
define("LAN_PRUNE", "Prune");
diff --git a/e107_plugins/download/e_upload.php b/e107_plugins/download/e_upload.php
index 58de81f4c..ceda1efec 100644
--- a/e107_plugins/download/e_upload.php
+++ b/e107_plugins/download/e_upload.php
@@ -85,13 +85,13 @@ class download_upload
foreach($v['download_category_sub'] as $row)
{
$id2 = $row['download_category_name'];
- $arr[$id] = array($row['download_category_id']=>$id2);
+ $arr[$id] = array('download__'.$row['download_category_id']=>$id2);
if(!empty($row['download_category_sub']))
{
foreach($row['download_category_sub'] as $key=>$val)
{
$subid = $val['download_category_name'];
- $arr[$id][$subid] = array($val['download_category_id']=>$subid);
+ $arr[$id][$subid] = array('download__'.$val['download_category_id']=>$subid);
}
}
diff --git a/upload.php b/upload.php
index 4aa97bdbc..48f145094 100644
--- a/upload.php
+++ b/upload.php
@@ -102,20 +102,24 @@ class userUpload
$mes = e107::getMessage();
$tp = e107::getParser();
- $error = false;
- $postemail ='';
+ $error = false;
+ $postemail ='';
+ $catID = null;
+ $catOwner = null;
+ $file = null;
+ $image = null;
+ $filesize = 0;
+
- if (($_POST['file_email'] || USER == TRUE) && $_POST['file_name'] && $_POST['file_description'] && $_POST['download_category'])
+ if ((!empty($_POST['file_email']) || USER == true) && !empty($_POST['file_name']) && !empty($_POST['file_description']) && !empty($_POST['category']))
{
// $uploaded = file_upload(e_FILE."public/", "unique");
$fl = e107::getFile();
$uploaded = $fl->getUploaded(e_UPLOAD, "unique", array('max_file_count' => 2, 'extra_file_types' => TRUE));
- // $uploaded = process_uploaded_files(e_UPLOAD, "unique", array('max_file_count' => 2, 'extra_file_types' => TRUE));
-
// First, see what errors the upload handler picked up
- if ($uploaded === FALSE)
+ if ($uploaded === false)
{
$error = true;
$mes->addError(LAN_UL_021);
@@ -151,13 +155,17 @@ class userUpload
}
// The upload handler checks max file size
- $downloadCategory = intval($_POST['download_category']);
- if (!$downloadCategory)
- {
- $error = true;
+
+ if(!empty($_POST['category']))
+ {
+ list($catOwner, $catID) = explode("__",$_POST['category'],2);
+ }
+ else
+ {
+ $error = true;
$mes->addError(LAN_UL_037);
- }
-
+ }
+
// an error - delete the files to keep things tidy
if ($error)
{
@@ -196,11 +204,33 @@ class userUpload
$_POST['file_description'] = $tp->toDB($_POST['file_description']);
$file_time = time();
-
- $sql->insert("upload", "0, '".$poster."', '".$postemail."', '".$tp -> toDB($_POST['file_website'])."', '".$file_time."', '".$tp -> toDB($_POST['file_name'])."', '".$tp -> toDB($_POST['file_version'])."', '".$file."', '".$image."', '".$tp -> toDB($_POST['file_description'])."', '".$tp -> toDB($_POST['file_demo'])."', '".$filesize."', 0, '".$downloadCategory."'");
-
- $edata_fu = array("upload_user" => $poster, "upload_email" => $postemail, "upload_name" => $tp -> toDB($_POST['file_name']),"upload_file" => $file, "upload_version" => $_POST['file_version'], "upload_description" => $tp -> toDB($_POST['file_description']), "upload_size" => $filesize, "upload_category" => $downloadCategory, "upload_website" => $tp -> toDB($_POST['file_website']), "upload_image" => $image, "upload_demo" => $tp -> toDB($_POST['file_demo']), "upload_time" => $file_time);
+
+ $insertQry = array(
+ 'upload_id' => 0,
+ 'upload_poster' => $poster,
+ 'upload_email' => $postemail,
+ 'upload_website' => $tp->toDB($_POST['file_website']),
+ 'upload_datestamp' => $file_time,
+ 'upload_name' => $tp->toDB($_POST['file_name']),
+ 'upload_version' => $tp->toDB($_POST['file_version']),
+ 'upload_file' => $file,
+ 'upload_ss' => $image,
+ 'upload_description' => $tp->toDB($_POST['file_description']),
+ 'upload_demo' => $tp->toDB($_POST['file_demo']),
+ 'upload_filesize' => $filesize,
+ 'upload_active' => 0,
+ 'upload_category' => intval($catID),
+ 'upload_owner' => $catOwner
+ );
+
+
+ $sql->insert("upload", $insertQry);
+ $edata_fu = $insertQry;
+ $edata_fu["upload_user"] = $poster;
+ $edata_fu["upload_time"] = $file_time;
+
+
e107::getEvent()->trigger("fileupload", $edata_fu); // BC
e107::getEvent()->trigger("user_file_upload", $edata_fu);
@@ -210,7 +240,7 @@ class userUpload
}
else
{ // Error - missing data
- $mes->addError(LAN_ERROR_29);
+ $mes->addError(LAN_REQUIRED_BLANK);
}
echo e107::getMessage()->render();
@@ -237,7 +267,7 @@ class userUpload
$ns = e107::getRender();
$tp = e107::getParser();
- $text = "