Skip to content

Commit

Permalink
fix call to some static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Aug 23, 2016
1 parent 5294ffe commit 9fdce9e
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions external/ExtPrograms.csv
Expand Up @@ -31,8 +31,8 @@ Adminer,4.2.5,www.adminer.org,4.2.5,"customized plugsins: tinymce, edit-textarea
SimpleAjaxUploader,2.5.5,github.com/LPology/Simple-Ajax-Uploader,2.5.5,also converted to yui module 2.5.3
normalize.css,4.2.0,necolas.github.com/normalize.css/,4.2.0,auto included in bootstrap 3
MediaElement.js,2.22.0,mediaelementjs.com/,2.22.0,
Facebook PHP SDK3,3.2.3,github.com/facebook/facebook-php-sdk,4-5.2.0,
Facebook PHP SDK4,4.0.23,github.com/facebook/facebook-php-sdk-v4,4-5.2.0,
Facebook PHP SDK3,3.2.3,github.com/facebook/facebook-php-sdk,4-5.3.1,
Facebook PHP SDK4,4.0.23,github.com/facebook/facebook-php-sdk-v4,4-5.3.1,
Respond,1.4.2,github.com/scottjehl/Respond,1.4.2,IE6-8 shim
html5shiv,3.7.3,github.com/aFarkas/html5shiv,3.7.3,IE6-8 shim
csshover.htc,3.11,peterned.home.xs4all.nl/csshover.html,3.11,IE6 shim
Expand Down
24 changes: 12 additions & 12 deletions framework/core/controllers/expController.php
Expand Up @@ -139,7 +139,7 @@ public function __construct($src = null, $params = array()) {
* @return string
*/
public function name() {
return $this->displayname();
return static::displayname();
}

/**
Expand Down Expand Up @@ -263,13 +263,13 @@ public function showall() {

$page = new expPaginator(array(
'model' => $this->basemodel_name,
'where' => $this->hasSources() ? $this->aggregateWhereClause() : null,
'where' => static::hasSources() ? $this->aggregateWhereClause() : null,
'limit' => (isset($this->params['limit']) && $this->params['limit'] != '') ? $this->params['limit'] : 10,
'order' => isset($this->params['order']) ? $this->params['order'] : null,
'page' => (isset($this->params['page']) ? $this->params['page'] : 1),
'controller' => $this->baseclassname,
'action' => $this->params['action'],
'src' => $this->hasSources() == true ? $this->loc->src : null,
'src' => static::hasSources() == true ? $this->loc->src : null,
'columns' => array(
gt('ID#') => 'id',
gt('Title') => 'title',
Expand Down Expand Up @@ -501,7 +501,7 @@ public function showByTitle() {
*/
public function showRandom() {
expHistory::set('viewable', $this->params);
$where = $this->hasSources() ? $this->aggregateWhereClause() : null;
$where = static::hasSources() ? $this->aggregateWhereClause() : null;
$limit = isset($this->params['limit']) ? $this->params['limit'] : 1;
$order = 'RAND()';
assign_to_template(array(
Expand Down Expand Up @@ -734,13 +734,13 @@ public function manage() {

$page = new expPaginator(array(
'model' => $this->basemodel_name,
'where' => $this->hasSources() ? $this->aggregateWhereClause() : null,
'where' => static::hasSources() ? $this->aggregateWhereClause() : null,
'limit' => isset($this->params['limit']) ? $this->params['limit'] : 10,
'order' => isset($this->params['order']) ? $this->params['order'] : null,
'page' => (isset($this->params['page']) ? $this->params['page'] : 1),
'controller' => $this->baseclassname,
'action' => $this->params['action'],
'src' => $this->hasSources() == true ? $this->loc->src : null,
'src' => static::hasSources() == true ? $this->loc->src : null,
'columns' => array(
gt('ID#') => 'id',
gt('Title') => 'title',
Expand Down Expand Up @@ -873,7 +873,7 @@ public function configure() {
// 'config' => $this->config, //FIXME already assigned in controllertemplate?
'page' => $page, // needed for aggregation list
'views' => $views,
'title' => $this->displayname(),
'title' =>static::displayname(),
'current_section' => expSession::get('last_section'),
// 'classname' => $this->classname, //FIXME $controller already assigned baseclassname (short vs long) in controllertemplate?
'viewpath' => $this->viewpath,
Expand Down Expand Up @@ -1170,7 +1170,7 @@ public function getModels() {
* @return string
*/
public function searchName() {
return $this->displayname();
return static::displayname();
}

/**
Expand Down Expand Up @@ -1275,7 +1275,7 @@ public function delete_In($loc) {
public function delete_instance($loc = false) {
$model = new $this->basemodel_name();
$where = 1;
if ($loc || $this->hasSources())
if ($loc || static::hasSources())
$where = "location_data='" . serialize($this->loc) . "'";
$items = $model->find('all',$where);
foreach ($items as $item) {
Expand All @@ -1302,7 +1302,7 @@ public function metainfo() {

switch ($action) {
case 'showall':
$metainfo['title'] = gt("Showing") . " " . $this->displayname() . ' - ' . SITE_TITLE;
$metainfo['title'] = gt("Showing") . " " . static::displayname() . ' - ' . SITE_TITLE;
$metainfo['keywords'] = SITE_KEYWORDS;
$metainfo['description'] = SITE_DESCRIPTION;
break;
Expand Down Expand Up @@ -1347,7 +1347,7 @@ public function metainfo() {
if (method_exists($mod, $functionName)) {
$metainfo = $mod->$functionName($router->params);
} else {
$metainfo['title'] = $this->displayname() . " - " . SITE_TITLE;
$metainfo['title'] = static::displayname() . " - " . SITE_TITLE;
$metainfo['keywords'] = SITE_KEYWORDS;
$metainfo['description'] = SITE_DESCRIPTION;
// $metainfo['canonical'] = URL_FULL.substr($router->sefPath, 1);
Expand Down Expand Up @@ -1461,7 +1461,7 @@ public function aggregateWhereClause($type='') {

$sql = '';

if (empty($this->config['add_source']) && !$this->hasSources()) {
if (empty($this->config['add_source']) && !static::hasSources()) {
return $sql;
}

Expand Down
2 changes: 1 addition & 1 deletion framework/modules/banners/controllers/bannerController.php
Expand Up @@ -124,7 +124,7 @@ public function configure() {
$banners = $this->banner->find('all', null, 'companies_id');
assign_to_template(array(
'banners'=>$banners,
'title'=>$this->displayname()
'title'=>static::displayname()
));
}

Expand Down
4 changes: 2 additions & 2 deletions framework/modules/core/controllers/expCatController.php
Expand Up @@ -70,7 +70,7 @@ function manage() {
'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),
'controller'=>$this->params['model'],
// 'action'=>$this->params['action'],
// 'src'=>$this->hasSources() == true ? $this->loc->src : null,
// 'src'=>static::hasSources() == true ? $this->loc->src : null,
// 'columns'=>array(gt('ID#')=>'id',gt('Title')=>'title',gt('Body')=>'body'),
));
if ($this->params['model'] == 'faq') {
Expand All @@ -91,7 +91,7 @@ function manage() {
'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),
'controller'=>$this->baseclassname,
'action'=>$this->params['action'],
'src'=>$this->hasSources() == true ? $this->loc->src : null,
'src'=>static::hasSources() == true ? $this->loc->src : null,
'columns'=>array(
gt('ID#')=>'id',
gt('Title')=>'title',
Expand Down
10 changes: 5 additions & 5 deletions framework/modules/core/controllers/expTagController.php
Expand Up @@ -92,13 +92,13 @@ function manage() {
expHistory::set('manageable', $this->params);
$page = new expPaginator(array(
'model'=>$this->basemodel_name,
'where'=>$this->hasSources() ? $this->aggregateWhereClause() : null,
'where'=>static::hasSources() ? $this->aggregateWhereClause() : null,
'limit'=>10,
'order'=>"title",
'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),
'controller'=>$this->baseclassname,
'action'=>$this->params['action'],
'src'=>$this->hasSources() == true ? $this->loc->src : null,
'src'=>static::hasSources() == true ? $this->loc->src : null,
'columns'=>array(
gt('ID#')=>'id',
gt('Title')=>'title',
Expand Down Expand Up @@ -147,7 +147,7 @@ function manage_module() {
'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),
'controller'=>$this->params['model'],
// 'action'=>$this->params['action'],
// 'src'=>$this->hasSources() == true ? $this->loc->src : null,
// 'src'=>static::hasSources() == true ? $this->loc->src : null,
// 'columns'=>array(gt('ID#')=>'id',gt('Title')=>'title',gt('Body')=>'body'),
));
if ($this->params['model'] == 'faq') {
Expand All @@ -158,13 +158,13 @@ function manage_module() {

// $page = new expPaginator(array(
// 'model'=>$this->basemodel_name,
// 'where'=>$this->hasSources() ? $this->aggregateWhereClause() : null,
// 'where'=>static::hasSources() ? $this->aggregateWhereClause() : null,
// 'limit'=>50,
// 'order'=>"title",
// 'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),
// 'controller'=>$this->baseclassname,
// 'action'=>$this->params['action'],
// 'src'=>$this->hasSources() == true ? $this->loc->src : null,
// 'src'=>static::hasSources() == true ? $this->loc->src : null,
// 'columns'=>array(gt('ID#')=>'id',gt('Title')=>'title',gt('Body')=>'body'),
// ));
//
Expand Down
Expand Up @@ -118,7 +118,7 @@ public function configure() {
$calc = new billingcalculator($this->params['id']);
assign_to_template(array(
'calculator'=>$calc,
'title'=>$this->displayname()
'title'=>static::displayname()
));
}

Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/controllers/cartController.php
Expand Up @@ -1134,7 +1134,7 @@ function isDiscountInCart($discountId) {
// $this->config = $config->config;
// assign_to_template(array(
// 'config'=> $this->config,
// 'title' => $this->displayname()
// 'title' => static::displayname()
// ));
// }

Expand Down
Expand Up @@ -70,7 +70,7 @@ function metainfo() {
$metainfo['description'] = gt("Make a donation");
break;
default:
$metainfo['title'] = $this->displayname()." - ".$storename;
$metainfo['title'] = static::displayname()." - ".$storename;
$metainfo['keywords'] = SITE_KEYWORDS;
$metainfo['description'] = SITE_DESCRIPTION;
}
Expand Down
Expand Up @@ -332,7 +332,7 @@ function configure() {
'views'=>$views,
'countries'=>$countries,
'regions'=>$regions,
'title'=>$this->displayname()
'title'=>static::displayname()
));
}

Expand Down
Expand Up @@ -219,7 +219,7 @@ public function configure() {
$calc = new $calcname($this->params['id']);
assign_to_template(array(
'calculator'=>$calc,
'title'=>$this->displayname()
'title'=>static::displayname()
));
}

Expand Down
Expand Up @@ -138,7 +138,7 @@ function configure() {
'config' => $this->config,
// 'pullable_modules' => $pullable_modules,
'views' => $views,
// 'title'=>$this->displayname()
// 'title'=>static::displayname()
'title' => gt('Store Category named') . ' ' . $cat->title
));
}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/links/controllers/linksController.php
Expand Up @@ -46,7 +46,7 @@ static function isSearchable() { return true; }
function showall() {
expHistory::set('viewable', $this->params);
$modelname = $this->basemodel_name;
$where = $this->hasSources() ? $this->aggregateWhereClause() : null;
$where = static::hasSources() ? $this->aggregateWhereClause() : null;
$limit = isset($this->config['limit']) ? $this->config['limit'] : null;
$order = isset($this->config['order']) ? $this->config['order'] : "rank";
$links = $this->$modelname->find('all', $where, $order, $limit);
Expand Down

0 comments on commit 9fdce9e

Please sign in to comment.