- Timestamp:
- 09/01/2010 11:43:44 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/w/extensions/DataDrivenLinks/DataDrivenLinks.php
r1820 r1836 66 66 $page = $this->dbr->tableName( 'page' ); 67 67 // Get all possible articles and categories 68 $res = $this->dbr->query("SELECT * FROM $om_categorylinks WHERE cl_to in (SELECT cl_to FROM $om_categorylinks WHERE cl_sortkey = '" . $this->articleOBJ->mTextform . "') AND cl_sortkey <> '" . $this->articleOBJ->mTextform. "' ORDER BY cl_sortkey");68 $res = $this->dbr->query("SELECT * FROM $om_categorylinks WHERE cl_to in (SELECT cl_to FROM $om_categorylinks WHERE cl_sortkey = '" . mysql_real_escape_string($this->articleOBJ->mTextform) . "') AND cl_sortkey <> '" . mysql_real_escape_string($this->articleOBJ->mTextform) . "' ORDER BY cl_sortkey"); 69 69 //echo "SELECT * FROM $om_categorylinks WHERE cl_to in (SELECT cl_to FROM $om_categorylinks WHERE cl_sortkey = '" . $this->articleOBJ->mTextform . "') AND cl_sortkey > '" . $this->articleOBJ->mTextform . "' ORDER BY cl_sortkey"; 70 70 while( $row = $this->dbr->fetchObject( $res ) ) { // Filter to extract only articles 71 $temp = str_replace(" ", "_", strtolower($row->cl_sortkey)); // temp string to make the string to page_title style71 $temp = mysql_real_escape_string(str_replace(" ", "_", strtolower($row->cl_sortkey))); // temp string to make the string to page_title style 72 72 73 73 // Get data from page table by using $temp to know if it is a category or article
Note: See TracChangeset
for help on using the changeset viewer.
