Line 104... |
Line 104... |
104 |
// ignore if there is a permission and it is false
|
104 |
// ignore if there is a permission and it is false
|
105 |
if ( isset( $permissions[$value['shortname']] ) && ! $permissions[$value['shortname']] ) {
|
105 |
if ( isset( $permissions[$value['shortname']] ) && ! $permissions[$value['shortname']] ) {
|
106 |
continue;
|
106 |
continue;
|
107 |
}
|
107 |
}
|
108 |
if ($value[$this->urlName]) { // this is a link, so it is a live menu option
|
108 |
if ($value[$this->urlName]) { // this is a link, so it is a live menu option
|
109 |
$result .= insertValuesIntoQuery( $this->menuItemString, array( 'url' => $rootDir . $value[$this->urlName], 'caption' => $value[$this->captionName], 'level' => $level) );
|
109 |
$result .= $this->dbConnection->insertValuesIntoQuery( $this->menuItemString, array( 'url' => $rootDir . $value[$this->urlName], 'caption' => $value[$this->captionName], 'level' => $level) );
|
110 |
} else { // not a link, so just create the text
|
110 |
} else { // not a link, so just create the text
|
111 |
$result .= insertValuesIntoQuery( $this->menuHeaderString, array( 'caption' => $value[$this->captionName], 'level' => $level) );
|
111 |
$result .= insertValuesIntoQuery( $this->menuHeaderString, array( 'caption' => $value[$this->captionName], 'level' => $level) );
|
112 |
}
|
112 |
}
|
113 |
if ( isset($value['children'])) { // if it has children, process them
|
113 |
if ( isset($value['children'])) { // if it has children, process them
|
114 |
$result .= $this->htmlMenu($value['children'], $level+1, $rootDir, $permissions);
|
114 |
$result .= $this->htmlMenu($value['children'], $level+1, $rootDir, $permissions);
|
Line 119... |
Line 119... |
119 |
foreach ( $toAdd as $key => $value ) {
|
119 |
foreach ( $toAdd as $key => $value ) {
|
120 |
$result .= insertValuesIntoQuery( $this->menuItemString, array( 'url' => $value, 'caption' =>$key ) );
|
120 |
$result .= insertValuesIntoQuery( $this->menuItemString, array( 'url' => $value, 'caption' =>$key ) );
|
121 |
}
|
121 |
}
|
122 |
*/
|
122 |
*/
|
123 |
// place the block code around the menu, and return the result
|
123 |
// place the block code around the menu, and return the result
|
124 |
return insertValuesIntoQuery( $this->menuBlockString, array( 'menublock' => $result, 'level' => $level ) );
|
124 |
return $this->dbConnection->insertValuesIntoQuery( $this->menuBlockString, array( 'menublock' => $result, 'level' => $level ) );
|
125 |
}
|
125 |
}
|
126 |
|
126 |
|
127 |
} // class DBMenu
|
127 |
} // class DBMenu
|
128 |
|
128 |
|
129 |
/* following block is for testing. comment out for production */
|
129 |
/* following block is for testing. comment out for production */
|