Skip to content

Commit

Permalink
Other changes to help with asset reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Jul 4, 2011
1 parent 5c4c719 commit dfd1328
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 102 deletions.
2 changes: 1 addition & 1 deletion framework/core/database/definitions/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

##################################################
#
# Copyright (c) 2004-2011 OIC Group, Inc.
# Copyright (c) 2004-2009 OIC Group, Inc.
# Written and Designed by Adam Kessler
#
# This file is part of Exponent
Expand Down
2 changes: 1 addition & 1 deletion framework/core/database/definitions/help_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

##################################################
#
# Copyright (c) 2004-2011 OIC Group, Inc.
# Copyright (c) 2004-2009 OIC Group, Inc.
# Written and Designed by Adam Kessler
#
# This file is part of Exponent
Expand Down
33 changes: 0 additions & 33 deletions framework/datatypes/groups.php

This file was deleted.

56 changes: 27 additions & 29 deletions framework/datatypes/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,44 @@ public function __construct($params=array()) {
parent::__construct($params);
$this->loc = expUnserialize($this->location_data);
}


// public function beforeSave($params=array()) {
// eDebug($this,1);
// //$this->save(true);
// }

public function save() {
global $db;

// manipulate section & location_data to correct values
$hlpsection = $db->selectObject('sectionref','module = "helpController" AND source = "'.$_POST['section'].'"');
$this->section = $hlpsection->section;
$loc = null;
$loc->mod = help;
$loc->src = $_POST['section'];
$loc->int = '';
$this->location_data = serialize($loc);
if (isset($_POST['section'])) {
// manipulate section & location_data to correct values
$hlpsection = $db->selectObject('sectionref','module = "helpController" AND source = "'.$_POST['section'].'"');
$this->section = $hlpsection->section;
$loc = null;
$loc->mod = help;
$loc->src = $_POST['section'];
$loc->int = '';
$this->location_data = serialize($loc);
}

parent::save();
parent::save(true);
}

public function makeSefUrl() {
global $router, $db;

$sef_params = '';
if (isset($this->title)) {
$sef_params .= $this->title;
} else {
$sef_params .= 'Untitled';
}

if (isset($this->help_version_id)) {
$version = $db->selectValue('help_version', 'version', 'id='.$this->help_version_id);
$sef_params .= " Version ".$version;
}
public function makeSefUrl() {
global $router, $db;

$this->sef_url = $router->encode($sef_params);

$dupe = $db->selectValue($this->tablename, 'sef_url', 'sef_url="'.$this->sef_url.'"');
if (isset($this->title)) {
$this->sef_url = $router->encode($this->title);
} else {
$this->sef_url = $router->encode('Untitled');
}
$dupe = $db->selectValue($this->tablename, 'sef_url', 'sef_url="'.$this->sef_url.' AND help_version_id = '.$this->help_version_id.'"');
if (!empty($dupe)) {
list($u, $s) = explode(' ',microtime());
$this->sef_url .= '-'.$s.'-'.$u;
}
}
}
public static function makeHelpLink($module) {
// make sure the module name is in the right format.
$module = getControllerName($module);
Expand Down
37 changes: 0 additions & 37 deletions framework/modules/core/assets/comments.css

This file was deleted.

2 changes: 1 addition & 1 deletion framework/modules/core/views/expComment/getComments.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
*}

{css unique="blog-comments" link="`$smarty.const.PATH_RELATIVE`framework/modules/core/assets/comments.css"}
{css unique="blog-comments" link="`$smarty.const.PATH_RELATIVE`framework/modules/core/assets/css/comments.css"}

{/css}

Expand Down
File renamed without changes.

0 comments on commit dfd1328

Please sign in to comment.