mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Bugfixe - corrects menu/page mixup in custom-pages. News-posts labelled correctly now and default field columns added.
This commit is contained in:
@@ -112,7 +112,13 @@ class page_admin extends e_admin_dispatcher
|
|||||||
{
|
{
|
||||||
|
|
||||||
protected $modes = array(
|
protected $modes = array(
|
||||||
'main' => array(
|
'page' => array(
|
||||||
|
'controller' => 'page_admin_ui',
|
||||||
|
'path' => null,
|
||||||
|
'ui' => 'page_admin_form_ui',
|
||||||
|
'uipath' => null
|
||||||
|
),
|
||||||
|
'menu' => array(
|
||||||
'controller' => 'page_admin_ui',
|
'controller' => 'page_admin_ui',
|
||||||
'path' => null,
|
'path' => null,
|
||||||
'ui' => 'page_admin_form_ui',
|
'ui' => 'page_admin_form_ui',
|
||||||
@@ -120,18 +126,18 @@ class page_admin extends e_admin_dispatcher
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
protected $adminMenu = array(
|
protected $adminMenu = array(
|
||||||
'main/list' => array('caption'=> CUSLAN_48, 'perm' => '5'),
|
'page/list' => array('caption'=> CUSLAN_48, 'perm' => '5'),
|
||||||
'main/menus' => array('caption'=> CUSLAN_49, 'perm' => 'J'),
|
'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J'),
|
||||||
'main/create' => array('caption'=> CUSLAN_12, 'perm' => '5'),
|
'page/create' => array('caption'=> CUSLAN_12, 'perm' => '5'),
|
||||||
'main/createem' => array('caption'=> CUSLAN_31, 'perm' => 'J'),
|
'menu/create' => array('caption'=> CUSLAN_31, 'perm' => 'J'),
|
||||||
'main/options' => array('caption'=> LAN_OPTIONS, 'perm' => '0')
|
'page/options' => array('caption'=> LAN_OPTIONS, 'perm' => '0')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
protected $adminMenuAliases = array(
|
protected $adminMenuAliases = array(
|
||||||
'main/edit' => 'main/list'
|
'page/edit' => 'page/list',
|
||||||
|
'menu/edit' => 'menu/list'
|
||||||
);
|
);
|
||||||
|
|
||||||
protected $menuTitle = 'Custom Pages';
|
protected $menuTitle = 'Custom Pages';
|
||||||
@@ -209,8 +215,8 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
//FIX ME - mode not retained after using drop-down 'filter' or 'search'.
|
//FIXME - mode not retained after using drop-down 'filter' or 'search'.
|
||||||
if($_GET['mode'] =='main' && $_GET['action'] =='menus')
|
if($_GET['mode'] =='menu')
|
||||||
{
|
{
|
||||||
$this->listQry = "SELECT p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE p.page_theme != '' "; // without any Order or Limit.
|
$this->listQry = "SELECT p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE p.page_theme != '' "; // without any Order or Limit.
|
||||||
}
|
}
|
||||||
@@ -266,7 +272,10 @@ class page_admin_ui extends e_admin_ui
|
|||||||
function createPage($mode=FALSE)
|
function createPage($mode=FALSE)
|
||||||
{
|
{
|
||||||
/* mode: FALSE == page, mode: TRUE == menu */
|
/* mode: FALSE == page, mode: TRUE == menu */
|
||||||
|
if($_GET['mode'] =='menu')
|
||||||
|
{
|
||||||
|
$mode = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
global $e107, $e_userclass, $e_event;
|
global $e107, $e_userclass, $e_event;
|
||||||
@@ -283,7 +292,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
$edit = ($sub_action == 'edit');
|
$edit = ($sub_action == 'edit');
|
||||||
$caption =(!$mode ? ($edit ? CUSLAN_23 : CUSLAN_24) : ($edit ? CUSLAN_25 : CUSLAN_26));
|
$caption =(!$mode ? ($edit ? CUSLAN_23 : CUSLAN_24) : ($edit ? CUSLAN_25 : CUSLAN_26));
|
||||||
|
|
||||||
if ($sub_action == "edit" && !isset($_POST['preview']) && !isset($_POST['submit']))
|
if ($_GET['action'] == "edit" && !isset($_POST['preview']) && !isset($_POST['submit']))
|
||||||
{
|
{
|
||||||
|
|
||||||
//$url = e107::getUrl()->sc('page/view', $row, 'allow=page_id,page_title,page_sef');
|
//$url = e107::getUrl()->sc('page/view', $row, 'allow=page_id,page_title,page_sef');
|
||||||
@@ -403,7 +412,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
// $text .= "<textarea class='e-wysiwyg tbox' tabindex='".$frm->getNext()."' id='data' name='data' cols='80'{$insertjs}>".(strstr($data, "[img]http") ? $data : str_replace("[img]../", "[img]", $data))."</textarea>";
|
// $text .= "<textarea class='e-wysiwyg tbox' tabindex='".$frm->getNext()."' id='data' name='data' cols='80'{$insertjs}>".(strstr($data, "[img]http") ? $data : str_replace("[img]../", "[img]", $data))."</textarea>";
|
||||||
// <br />".display_help('cpage-help', 'cpage')."
|
// <br />".display_help('cpage-help', 'cpage')."
|
||||||
|
|
||||||
|
/*
|
||||||
$text .= "</td>
|
$text .= "</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -413,7 +422,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
|
|
||||||
";
|
";
|
||||||
|
*/
|
||||||
if(!$mode)
|
if(!$mode)
|
||||||
{
|
{
|
||||||
$text .= "
|
$text .= "
|
||||||
|
@@ -283,7 +283,7 @@ class news_sub_form_ui extends e_admin_form_ui
|
|||||||
|
|
||||||
class news_admin_ui extends e_admin_ui
|
class news_admin_ui extends e_admin_ui
|
||||||
{
|
{
|
||||||
protected $pluginTitle = 'Media Categories';
|
protected $pluginTitle = ADLAN_0; // "News"
|
||||||
protected $pluginName = 'core';
|
protected $pluginName = 'core';
|
||||||
protected $table = "news";
|
protected $table = "news";
|
||||||
protected $pid = "news_id";
|
protected $pid = "news_id";
|
||||||
@@ -321,6 +321,8 @@ class news_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected $fieldpref = array('checkboxes','news_id', 'news_thumbnail', 'news_title', 'news_datestamp', 'news_category', 'options');
|
||||||
|
|
||||||
|
|
||||||
protected $cats = array();
|
protected $cats = array();
|
||||||
protected $newspost;
|
protected $newspost;
|
||||||
|
Reference in New Issue
Block a user