diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php
index e33578e7a..65b74aab5 100644
--- a/e107_core/shortcodes/batch/news_shortcodes.php
+++ b/e107_core/shortcodes/batch/news_shortcodes.php
@@ -209,7 +209,7 @@ class news_shortcodes extends e_shortcode
if (ADMIN && getperms('H'))
{
$adop_icon = (file_exists(THEME."images/newsedit.png") ? THEME_ABS."images/newsedit.png" : e_IMAGE_ABS."admin_images/edit_16.png");
- return " \n";
+ return "
\n";
}
else
{
diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php
index 54601a15c..30d9052b7 100644
--- a/e107_core/shortcodes/batch/page_shortcodes.php
+++ b/e107_core/shortcodes/batch/page_shortcodes.php
@@ -114,7 +114,7 @@ class page_shortcodes extends e_shortcode
* @see eHelper::scDualParams()
* @see eHelper::scParams()
*/
- function sc_cpagehumbnail($parm = '')
+ function sc_cpagethumbnail($parm = '')
{
$parms = eHelper::scDualParams($parm);
if(empty($parms[1])) return '';
@@ -144,6 +144,17 @@ class page_shortcodes extends e_shortcode
break;
}
}
+
+ // For Future Use..
+ function sc_cpageimage($parm = '')
+ {
+ list($num,$size) = explode("|",$parm);
+ if($this->page['page_images'])
+ {
+ $img = explode(",",$this->page['page_images']);
+
+ }
+ }
function sc_cpagelink($parm)
{
diff --git a/e107_handlers/message_handler.php b/e107_handlers/message_handler.php
index 5c99d8c1a..4a36cdaae 100644
--- a/e107_handlers/message_handler.php
+++ b/e107_handlers/message_handler.php
@@ -799,6 +799,69 @@ class eMessage
}
throw new Exception('Method eMessage::'.$method.' does not exist!');//FIXME - e107Exception handler
}
+
+
+
+ /**
+ * Automate DB system messages
+ * NOTE: default value of $output parameter will be changed to false (no output by default) in the future
+ *
+ * @param integer|bool $update return result of db::db_Query
+ * @param string $type update|insert|update
+ * @param string $success forced success message
+ * @param string $failed forced error message
+ * @param bool $output false suppress any function output
+ * @return integer|bool db::db_Query result
+ */
+ // TODO - This function often needs to be available BEFORE header.php is loaded.
+ // It has been copied from admin_update() in e107_admin/header.php
+
+ public function autoMessage($update, $type = 'update', $success = false, $failed = false, $output = false)
+ {
+
+ if (($type == 'update' && $update) || ($type == 'insert' && $update !== false))
+ {
+ $this->add(($success ? $success : ($type == 'update' ? LAN_UPDATED : LAN_CREATED)), E_MESSAGE_SUCCESS);
+ }
+ elseif ($type == 'delete' && $update)
+ {
+ $this->add(($success ? $success : LAN_DELETED), E_MESSAGE_SUCCESS);
+ }
+ elseif (!mysql_errno())
+ {
+ if ($type == 'update')
+ {
+ $this->add(LAN_NO_CHANGE.' '.LAN_TRY_AGAIN, E_MESSAGE_INFO);
+ }
+ elseif ($type == 'delete')
+ {
+ $this->add(LAN_DELETED_FAILED.' '.LAN_TRY_AGAIN, E_MESSAGE_INFO);
+ }
+ }
+ else
+ {
+ switch ($type)
+ {
+ case 'insert':
+ $msg = LAN_CREATED_FAILED;
+ break;
+ case 'delete':
+ $msg = LAN_DELETED_FAILED;
+ break;
+ default:
+ $msg = LAN_UPDATED_FAILED;
+ break;
+ }
+
+ $text = ($failed ? $failed : $msg." - ".LAN_TRY_AGAIN)."
".LAN_ERROR." ".mysql_errno().": ".mysql_error();
+ $this->add($text, E_MESSAGE_ERROR);
+ }
+
+ if ($output) echo $this->render();
+ return $update;
+ }
+
+
}
diff --git a/e107_plugins/download/admin_download.php b/e107_plugins/download/admin_download.php
index 1521ce9de..25227eb92 100644
--- a/e107_plugins/download/admin_download.php
+++ b/e107_plugins/download/admin_download.php
@@ -26,7 +26,10 @@ if (!getperms("P") || !plugInstalled('download'))
include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php');
include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/admin_download.php');
-require_once(e_PLUGIN.'download/handlers/adminDownload_class.php');
+// require_once(e_PLUGIN.'download/handlers/adminDownload_class.php');
+require_once(e_PLUGIN.'download/handlers/download_class.php');
+require_once(e_HANDLER.'upload_handler.php');
+require_once(e_HANDLER.'xml_class.php');
require_once(e_HANDLER."form_handler.php");
require_once(e_HANDLER."ren_help.php");
require_once(e_HANDLER."calendar/calendar_class.php");
@@ -55,12 +58,14 @@ $pst->id = array("admin_downloads","admin_dl_cat");
// -------------------------------
$download = new download();
-$adminDownload = new adminDownload();
+// $adminDownload = new adminDownload();
+$pst->save_preset(); // unique name(s) for the presets - comma separated.
new plugin_download_admin();
require_once(e_ADMIN."auth.php");
-$pst->save_preset(); // unique name(s) for the presets - comma separated.
+
+
/*
One form example (no arrays needed)
@@ -68,6 +73,7 @@ $pst->form = "myform"; // form id of the form that will have it's values saved.
$pst->page = "download.php?create"; // display preset options on which page.
$pst->save_preset("admin_downloads"); // unique name for the preset
*/
+/*
$rs = new form;
$subAction = '';
@@ -82,7 +88,7 @@ if (e_QUERY)
unset($tmp);
}
-$adminDownload->observer();
+// $adminDownload->observer();
require_once (e_HANDLER.'message_handler.php');
$emessage = &eMessage::getInstance();
@@ -95,17 +101,18 @@ $amount = varset($pref['download_view'], 50);
if (isset($_POST))
{
$e107cache->clear("download_cat");
-}
+}*/
+/*
if (isset($_POST['submit_download']))
{
$adminDownload->submit_download($subAction, $id);
$action = "main";
unset($subAction, $id);
}
-
+*/
if (isset($_POST['update_catorder']))
{
@@ -119,6 +126,7 @@ if (isset($_POST['update_catorder']))
$admin_log->log_event('DOWNL_08',implode(',',array_keys($_POST['catorder'])),E_LOG_INFORMATIVE,'');
$ns->tablerender("", "