+ Fixed sql problems with Maria DB. Any_value is not supported there
+ Fixed some query and data loading brain fucks..
+ + Fixed #10. URL is now considered when building search information.
+ Update search index from stats view to update all the exiting information
+ Updated third party information in readme
+ Fixed xml import xsd
+ Added translation support. More information in translation.txt
TODO / Feature list
+ adapt new php 7
++ http://php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op
-
++ view table really still needed?
+ stats cleanup. Management functions should be standalone
+ theme support
+ more "secure" user authentication
++ multiple user accounts and stuff
+ combine cat and tag class into one.
-+ view really still needed?
+ Update config file with the new language setting. See config.default and
translation.txt for more information
++ Run update search index to use the URL within the search index for your existing data.
## version 2.5 - Winnowing Hall
$newdata['title'] = '';
$newdata['image'] = '';
$newdata['status'] = '3'; # moderation required
- $newdata['search'] = '';
$newdata['tagArr'] = array();
$newdata['catArr'] = array();
$newdata['hash'] = '';
continue;
}
- $newdata['search'] = $newdata['title'];
- $newdata['search'] .= ' '.$newdata['description'];
- $newdata['search'] .= ' '.implode(" ",$newdata['tagArr']);
- $newdata['search'] .= ' '.implode(" ",$newdata['catArr']);
- $newdata['search'] = trim($newdata['search']);
- $newdata['search'] = strtolower($newdata['search']);
-
if(DEBUG === true) var_dump($newdata);
$linkObj = new Link($DB);
try {
$linkID = $linkObj->create(array(
'hash' => $newdata['hash'],
- 'search' => $newdata['search'],
'link' => $newdata['link'],
'status' => $newdata['status'],
'description' => $newdata['description'],
'title' => $newdata['title'],
- 'image' => $newdata['image']
+ 'image' => $newdata['image'],
+ 'tagArr' => $newdata['tagArr'],
+ 'catArr' => $newdata['catArr']
), true);
} catch (Exception $e) {
$_m = "WARN Can not create new link into DB." . $e->getMessage();
if (!isset($data['hash']) || empty($data['hash'])) return false;
if (!isset($data['title']) || empty($data['title'])) return false;
+ $_t = parse_url($data['link']);
+ $data['search'] = $data['title'];
+ $data['search'] .= ' '.$data['description'];
+ $data['search'] .= ' '.implode(" ",$data['tagArr']);
+ $data['search'] .= ' '.implode(" ",$data['catArr']);
+ $data['search'] .= ' '.$_t['host'];
+ $data['search'] .= ' '.implode(' ',explode('/',$_t['path']));
+ $data['search'] = trim($data['search']);
+ $data['search'] = strtolower($data['search']);
+
$queryStr = "INSERT INTO `" . DB_PREFIX . "_link` SET
`link` = '" . $this->DB->real_escape_string($data['link']) . "',
`created` = NOW(),
/**
* update the current loaded link with the given data
+ *
* @param array $data
* @return boolean|int
*/
$catArr = Summoner::prepareTagOrCategoryStr($data['category']);
$tagArr = Summoner::prepareTagOrCategoryStr($data['tag']);
+ $_t = parse_url($this->_data['link']);
$search = $data['title'];
$search .= ' '.$data['description'];
$search .= ' '.implode(" ", $tagArr);
$search .= ' '.implode(" ", $catArr);
+ $search .= ' '.$_t['host'];
+ $search .= ' '.implode(' ',explode('/',$_t['path']));
$search = trim($search);
$search = strtolower($search);
$LinkObj = new Link($this->DB);
$l = $LinkObj->load($link['hash']);
+ $_t = parse_url($l['link']);
$searchStr = $l['title'];
$searchStr .= ' '.$l['description'];
$searchStr .= ' '.implode(' ',$l['tags']);
$searchStr .= ' '.implode(' ',$l['categories']);
+ $searchStr .= ' '.$_t['host'];
+ $searchStr .= ' '.implode(' ',explode('/',$_t['path']));
$searchStr = trim($searchStr);
$searchStr = strtolower($searchStr);
'status' => $linkToImport['private'],
'description' => $linkToImport['description'],
'title' => $linkToImport['title'],
- 'search' => '',
'image' => $linkToImport['image']
), true);
} catch (Exception $e) {
$catArr = Summoner::prepareTagOrCategoryStr($formData['category']);
$tagArr = Summoner::prepareTagOrCategoryStr($formData['tag']);
- $search = $formData['title'];
- $search .= ' '.$formData['description'];
- $search .= ' '.implode(" ",$tagArr);
- $search .= ' '.implode(" ",$catArr);
- $search .= trim($search);
- $search = strtolower($search);
-
$DB->begin_transaction(MYSQLI_TRANS_START_READ_WRITE);
$linkObj = new Link($DB);
$linkID = $linkObj->create(array(
'hash' => $hash,
- 'search' => $search,
'link' => $formData['url'],
'status' => $formData['private'],
'description' => $formData['description'],
'title' => $formData['title'],
- 'image' => $formData['image']
+ 'image' => $formData['image'],
+ 'tagArr' => $tagArr,
+ 'catArr' => $catArr
),true);
if(!empty($linkID)) {