Skip to content

Commit

Permalink
Various tweaks/fixes to better use $this->params and adding correct c…
Browse files Browse the repository at this point in the history
…lass to tabview ul elements, cleans up some metainfo calls
  • Loading branch information
dleffler committed Jan 15, 2013
1 parent 61c97c2 commit fefecb4
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 93 deletions.
14 changes: 8 additions & 6 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ Added / Fixed / changed for 2.1.1
-- adds 'cancelled event' feature to display events as cancelled
- adds ajax-based navigation in calendar, news items & blog posts to prevent reloading entire page
- adds 'grouping by date' for uncategorized portfolio & file download items (in addition to 'grouping by alpha' for rolodex feature)
- adds new 'headline' view to filedownloads module
- adds new 'toggle' and 'accordion' views to the text module
- adds new 'toggle' view to the portfolio module
- adds new 'flyout sidebar' view to navigation module for hard-coding in themes
- adds new 'vertical' login view
- adds new views to several modules
-- new 'headline' view to filedownloads module
-- new 'toggle' and 'accordion' views to the text module
-- new 'toggle' view to the portfolio module
-- new 'flyout sidebar' view to navigation module for hard-coding in themes
-- new 'vertical' login view
- adds new 'multi-add' feature to create multiple photo album items in one easy step
- adds new 'inline' view to edit text module items directly on page via CKEditor v4
- adds custom module phrase translation libraries feature
- merges module 'Configure Actions & Views' and 'Configure Settings' into a single view for easy module configuration
- adds a mass mailer for super admins to email all users or selected site users
- adds new site configuration setting to reverse the default logic of when module titles are displayed
- adds new 'inline' view to edit text module items directly on page via CKEditor v4
- updates file manager with 'virtual folder' grouping and date features to assist locating files
-- also adds file manager bulk selection (add multiple files to an item all at once) and bulk delete
- updates file uploader to allow html5 drag/drop support and some other user-friendly features
Expand Down
15 changes: 10 additions & 5 deletions framework/core/subsystems/expPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,16 @@ public function __construct($params=array()) {
$this->order_direction = $this->dir;
if (expTheme::inAction()) {
//FIXME: module/controller glue code
$mod = !empty($_REQUEST['controller']) ? expString::sanitize($_REQUEST['controller']) : expString::sanitize($_REQUEST['module']);
if ($this->controller == $mod && $this->action == $_REQUEST['action']) {
$this->order = isset($_REQUEST['order']) ? $_REQUEST['order'] : $this->order;
$this->order_direction = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : $this->dir;
}
// $mod = !empty($_REQUEST['controller']) ? expString::sanitize($_REQUEST['controller']) : expString::sanitize($_REQUEST['module']);
// if ($this->controller == $mod && $this->action == $_REQUEST['action']) {
// $this->order = isset($_REQUEST['order']) ? $_REQUEST['order'] : $this->order;
// $this->order_direction = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : $this->dir;
// }
$mod = !empty($router->params['controller']) ? $router->params['controller'] : $router->params['module'];
if ($this->controller == $mod && $this->action == $router->params['action']) {
$this->order = isset($router->params['order']) ? $router->params['order'] : $this->order;
$this->order_direction = isset($router->params['dir']) ? $router->params['dir'] : $this->dir;
}
}
// allow passing of a single order/dir as stored in config
if (strstr($this->order," ")) {
Expand Down
18 changes: 12 additions & 6 deletions framework/modules-1/common/actions/groupperms.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
if (SEF_URLS == 1) {
$page = new expPaginator(array(
//'model'=>'user',
'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
// 'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
'limit'=>(isset($router->params['limit'])?$router->params['limit']:20),
'records'=>$users,
//'sql'=>$sql,
'order'=>'name',
'dir'=>'ASC',
'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
// 'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'page'=>(isset($router->params['page']) ? $router->params['page'] : 1),
'controller'=>$router->params['controller'],
// 'controller'=>$modulename,
'action'=>$router->params['action'],
Expand All @@ -75,14 +77,18 @@
} else {
$page = new expPaginator(array(
//'model'=>'user',
'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
// 'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
'limit'=>(isset($router->params['limit'])?$router->params['limit']:20),
'records'=>$users,
//'sql'=>$sql,
'order'=>'name',
'dir'=>'ASC',
'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'controller'=>expString::sanitize($_GET['module']),
'action'=>$_GET['action'],
// 'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'page'=>(isset($router->params['page']) ? $router->params['page'] : 1),
// 'controller'=>expString::sanitize($_GET['module']),
'controller'=>$router->params['module'],
// 'action'=>$_GET['action'],
'action'=>$router->params['action'],
'columns'=>$p,
));
}
Expand Down
18 changes: 12 additions & 6 deletions framework/modules-1/common/actions/userperms.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@
if (SEF_URLS == 1) {
$page = new expPaginator(array(
//'model'=>'user',
'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
// 'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
'limit'=>(isset($router->params['limit'])?$router->params['limit']:20),
'records'=>$users,
//'sql'=>$sql,
'order'=>'username',
'dir'=>'ASC',
'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
// 'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'page'=>(isset($router->params['page']) ? $router->params['page'] : 1),
'controller'=>$router->params['controller'],
// 'controller'=>$modulename,
'action'=>$router->params['action'],
Expand All @@ -82,14 +84,18 @@
} else {
$page = new expPaginator(array(
//'model'=>'user',
'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
// 'limit'=>(isset($_REQUEST['limit'])?intval($_REQUEST['limit']):20),
'limit'=>(isset($router->params['limit'])?$router->params['limit']:20),
'records'=>$users,
//'sql'=>$sql,
'order'=>'username',
'dir'=>'ASC',
'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'controller'=>expString::sanitize($_GET['module']),
'action'=>$_GET['action'],
// 'page'=>(isset($_REQUEST['page']) ? $_REQUEST['page'] : 1),
'page'=>(isset($router->params['page']) ? $router->params['page'] : 1),
// 'controller'=>expString::sanitize($_GET['module']),
'controller'=>$router->params['module'],
// 'action'=>$_GET['action'],
'action'=>$router->params['action'],
'columns'=>$p,
));
}
Expand Down
1 change: 1 addition & 0 deletions framework/modules-1/formbuilder/actions/edit_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
$htmlctl->html = "<hr size='1' />";
break;
}
$ctl = new stdClass();
$ctl->name = uniqid("");
$ctl->caption = "";
$ctl->data = serialize($htmlctl);
Expand Down
5 changes: 3 additions & 2 deletions framework/modules-1/formbuilder/actions/export_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,14 @@
// MSIE and Opera seems to prefer 'application/octetstream'
// It seems that other headers I've added make IE prefer octet-stream again. - RAM
$mime_type = (EXPONENT_USER_BROWSER == 'IE' || EXPONENT_USER_BROWSER == 'OPERA') ? 'application/octet-stream;' : 'text/comma-separated-values;';

header('Content-Type: ' . $mime_type . ' charset=' . LANG_CHARSET. "'");
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header("Content-length: ".filesize($tmpfname));
$filesize = filesize($tmpfname);
header("Content-length: " . $filesize);
header('Content-Transfer-Encoding: binary');
header('Content-Encoding:');
header('Content-Disposition: attachment; filename="' . 'report.csv' . '"');
if ($filesize) header("Content-length: ".$filesize); // for some reason the webserver cant run stat on the files and this breaks.
// IE need specific headers
if (EXPONENT_USER_BROWSER == 'IE') {
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
Expand Down
46 changes: 0 additions & 46 deletions framework/modules-1/formbuilder/actions/order_controls.php

This file was deleted.

2 changes: 1 addition & 1 deletion framework/modules/core/views/expCat/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{/if}
{/permissions}
<div id="{$id}" class="yui-navset exp-skin-tabview hide">
<ul>
<ul class="yui-nav">
{if !empty($page)}
<li><a href="#tab0">{$page->model|capitalize} {'Items'|gettext}</a></li>
{/if}
Expand Down
7 changes: 5 additions & 2 deletions framework/modules/events/controllers/eventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,13 @@ function delete_all_past() {
function metainfo() {
global $router;

$metainfo = array('title' => '', 'keywords' => '', 'description' => '');
// look for event date_id which expController::metainfo won't detect
if (!empty($router->params['action']) && $router->params['action'] == 'show' && !isset($_REQUEST['id']) && isset($_REQUEST['date_id'])) {
// if (!empty($router->params['action']) && $router->params['action'] == 'show' && !isset($_REQUEST['id']) && isset($_REQUEST['date_id'])) {
if (!empty($router->params['action']) && $router->params['action'] == 'show' && !isset($router->params['id']) && isset($router->params['date_id'])) {
// look up the record.
$object = new eventdate(intval($_REQUEST['date_id']));
// $object = new eventdate(intval($_REQUEST['date_id']));
$object = new eventdate(intval($router->params['date_id']));
// set the meta info
if (!empty($object)) {
$metainfo['title'] = empty($object->event->meta_title) ? $object->event->title : $object->event->meta_title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,14 @@ public static function returnChildrenAsJSON() {
}

public static function DragnDropReRank() {
global $db;
global $db, $router;

$move = intval($_REQUEST['move']);
$target = intval($_REQUEST['target']);
$type = $_REQUEST['type'];
// $move = intval($_REQUEST['move']);
// $target = intval($_REQUEST['target']);
// $type = $_REQUEST['type'];
$move = $router->params['move'];
$target = $router->params['target'];
$type = $router->params['type'];
$targSec = $db->selectObject("section","id=".$target);
// $targSec = new section($target);
$check_id = $targSec->parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{$myloc=serialize($__loc)}
{$quality=$config.quality|default:$smarty.const.THUMB_QUALITY}
<div id="{$id}" class="yui-navset exp-skin-tabview hide">
<ul>
<ul class="yui-nav">
{foreach name=tabs from=$page->cats key=catid item=cat}
<li><a href="#tab{$smarty.foreach.items.iteration}">{$cat->name}</a></li>
{/foreach}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{/if}
{$myloc=serialize($__loc)}
<div id="{$id}" class="yui-navset exp-skin-tabview hide">
<ul>
<ul class="yui-nav">
{foreach name=tabs from=$page->cats key=catid item=cat}
<li><a href="#tab{$smarty.foreach.tabs.iteration}">{$cat->name}</a></li>
{/foreach}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/text/views/text/showall_tabbed.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{/permissions}
{else}
<div id="text-{$id}" class="yui-navset exp-skin-tabview hide">
<ul>
<ul class="yui-nav">
{foreach from=$items item=tab name=tabs}
<li><a href="#tab{$smarty.foreach.tabs.iteration}">{if $tab->title ==""}&#160;{else}{$tab->title}{/if}</a></li>
{/foreach}
Expand Down
14 changes: 8 additions & 6 deletions install/changes/2.1.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ This release focuses on the new forms module and e-Commerce as OOTB experience
-- adds 'cancelled event' feature to display events as cancelled
- adds ajax-based navigation in calendar, news items & blog posts to prevent reloading entire page
- adds 'grouping by date' for uncategorized portfolio & file download items (in addition to 'grouping by alpha' for rolodex feature)
- adds new 'headline' view to filedownloads module
- adds new 'toggle' and 'accordion' views to the text module
- adds new 'toggle' view to the portfolio module
- adds new 'flyout sidebar' view to navigation module for hard-coding in themes
- adds new 'vertical' login view
- adds new views to several modules
-- new 'headline' view to filedownloads module
-- new 'toggle' and 'accordion' views to the text module
-- new 'toggle' view to the portfolio module
-- new 'flyout sidebar' view to navigation module for hard-coding in themes
-- new 'vertical' login view
- adds new 'multi-add' feature to create multiple photo album items in one easy step
- adds new 'inline' view to edit text module items directly on page via CKEditor v4
- adds custom module phrase translation libraries feature
- merges module 'Configure Actions & Views' and 'Configure Settings' into a single view for easy module configuration
- adds a mass mailer for super admins to email all users or selected site users
- adds new site configuration setting to reverse the default logic of when module titles are displayed
- adds new 'inline' view to edit text module items directly on page via CKEditor v4
- updates file manager with 'virtual folder' grouping and date features to assist locating files
-- also adds file manager bulk selection (add multiple files to an item all at once) and bulk delete
- updates file uploader to allow html5 drag/drop support and some other user-friendly features
5 changes: 3 additions & 2 deletions site_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

require_once('exponent.php');

redirect_to(array('controller'=>'rss','action'=>'feed','module'=>$_REQUEST['module'],'src'=>$_REQUEST['src'])); // use new method
// for backwards compatability, use the new method
redirect_to(array('controller'=>'rss','action'=>'feed','module'=>$_REQUEST['module'],'src'=>$_REQUEST['src']));

//FIXME old method
//FIXME this is the old, deprecated method
require_once(BASE.'external/feedcreator.class.php');

$site_rss = new expRss($_REQUEST);
Expand Down
6 changes: 4 additions & 2 deletions themes/simpletheme/subthemes/Follow Parent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<?php
expTheme::head(array(
"xhtml"=>false,
"css_primer"=>array(YUI3_RELATIVE."cssreset/reset-min.css",
"css_primer"=>array(
YUI3_RELATIVE."cssreset/reset-min.css",
YUI3_RELATIVE."cssfonts/fonts-min.css",
YUI3_RELATIVE."cssgrids/grids-min.css"),
YUI3_RELATIVE."cssgrids/grids-min.css"
),
"css_core"=>array("common"),
"css_links"=>true,
"css_theme"=>true
Expand Down
6 changes: 4 additions & 2 deletions themes/simpletheme/subthemes/Left Sectional.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<?php
expTheme::head(array(
"xhtml"=>false,
"css_primer"=>array(YUI3_RELATIVE."cssreset/reset-min.css",
"css_primer"=>array(
YUI3_RELATIVE."cssreset/reset-min.css",
YUI3_RELATIVE."cssfonts/fonts-min.css",
YUI3_RELATIVE."cssgrids/grids-min.css"),
YUI3_RELATIVE."cssgrids/grids-min.css"
),
"css_core"=>array("common"),
"css_links"=>true,
"css_theme"=>true
Expand Down

0 comments on commit fefecb4

Please sign in to comment.