Commit 8531e9d9 authored by metzlerd's avatar metzlerd
Browse files

Code review cosmetic fixes.

parent 841b4e04
......@@ -86,7 +86,7 @@ class Frx {
return $o;
}
else {
drupal_set_message(t('Unsupported document type:') . $type, 'error');
drupal_set_message(t('Unsupported document type: &s'), array('%s' => $type), 'error');
}
}
......@@ -102,7 +102,7 @@ class Frx {
$doc_types = module_invoke_all('forena_document_types');
if (!$all) unset($doc_types['web']);
$supported_doctypes = array();
foreach ($doc_types as $type=>$doc) {
foreach ($doc_types as $type => $doc) {
$supported_doctypes[$type] = $type;
}
}
......
......@@ -45,7 +45,7 @@ class FrxData {
// Get attributes
$data = get_object_vars($data);
if (method_exists($data, 'attributes')) {
foreach ($data->attributes() as $key=>$value) {
foreach ($data->attributes() as $key => $value) {
$data[$key] = (string)$value;
}
}
......@@ -136,7 +136,7 @@ class FrxData {
}
public function dumpContext() {
drupal_set_message('cur_context ' . $this->id . '<br/>Stack<br/><pre>' . print_r($this->cur_context,1) . '</pre>');
drupal_set_message(filter_xss('cur_context ' . $this->id . '<br/>Stack<br/><pre>' . print_r($this->cur_context, 1) . '</pre>'));
}
}
\ No newline at end of file
......@@ -208,7 +208,7 @@ class FrxDataSource{
require_once $file_name;
$class = str_replace($this->block_path . '/', '', $block_name);
$methods = get_class_methods($class);
if ($methods) foreach($methods as $method) {
if ($methods) foreach ($methods as $method) {
if ($method != 'tokens') {
$block_list[] = $class . '.' . $method;
}
......@@ -352,7 +352,7 @@ class FrxDataSource{
}
$tokens = array_merge($tokens, $this->tokens($contents));
$block = array( 'source' => $data, 'file' => trim($file, " \n"),
'tokens' => $tokens);
'tokens' => $tokens);
if ($access) $block['access'] = $access;
return $block;
}
......@@ -456,9 +456,9 @@ class FrxDataSource{
$clause = '';
$op = $data['op'];
$i=0;
if ($data['filter']) foreach($data['filter'] as $cond) {
if ($data['filter']) foreach ($data['filter'] as $cond) {
$i++;
$conj = ($i==1) ? '' : $op. ' ';
$conj = ($i==1) ? '' : $op . ' ';
if (isset($cond['filter'])) {
$clause .= $conj . ' (' . $this->buildFilterSQL($cond) . " )\n";
}
......@@ -470,7 +470,7 @@ class FrxDataSource{
$expr = $cond['field'] . ' ' . $cond['op'];
break;
default:
$expr = $cond['field'] . ' ' . $cond['op'] . ' ' . $this->format($cond['value'], $cond['field'], array());
$expr = $cond['field'] . ' ' . $cond['op'] . ' ' . $this->format($cond['value'], $cond['field'], array());
}
$clause .= ' ' . $conj . $expr;
}
......
......@@ -68,7 +68,7 @@ class FrxDocument {
header('Cache-Control:');
header('Pragma:');
$file_name = basename($_GET['q']);
header('Content-Disposition: attachment; filename="'. $file_name . '"');
header('Content-Disposition: attachment; filename="' . $file_name . '"');
header('Cache-Control: must-revalidate');
print $output;
return TRUE;
......
......@@ -70,10 +70,10 @@ class FrxRenderer {
public function replacedAttributes() {
$attributes = array();
if (isset($this->frxAttributes)) foreach ($this->frxAttributes as $key => $data) {
$attributes[$key] = $this->teng->replace((string)$data,TRUE);
$attributes[$key] = $this->teng->replace((string)$data, TRUE);
}
if (isset($this->htmlAttributes)) foreach ($this->htmlAttributes as $key => $data) {
$attributes[$key] = $this->teng->replace((string)$data,TRUE);
$attributes[$key] = $this->teng->replace((string)$data, TRUE);
}
return $attributes;
}
......
......@@ -584,7 +584,7 @@ class FrxReport {
foreach ($nodes as $node) {
$parm_def=array();
$parm_def['default'] = (string)$node;
foreach ($node->attributes() as $key=>$value) {
foreach ($node->attributes() as $key => $value) {
$parm_def[$key] = (string)$value;
}
$id = @$parm_def['id'];
......
......@@ -45,7 +45,7 @@ class FrxMPDF extends FrxDocument {
case 'print':
case 'screen':
case 'pdf':
$mpdf->WriteHTML(file_get_contents($sheet),1);
$mpdf->WriteHTML(file_get_contents($sheet), 1);
//echo $sheet;
break;
}
......@@ -75,7 +75,7 @@ class FrxMPDF extends FrxDocument {
// 'Content-Disposition' => 'attachment; filename="a_report_name.pdf"',
);
foreach ($http_headers as $name=>$value) {
foreach ($http_headers as $name => $value) {
$value = preg_replace('/\r?\n(?!\t| )/', '', $value);
drupal_add_http_header($name, $value);
}
......
......@@ -66,7 +66,7 @@ function forena_delete_report($report_name, $delete_file = TRUE) {
->execute();
}
else {
drupal_set_message('Unable to delete file ' . $info['basename'], 'error');
drupal_set_message(t('Unable to delete file %s', array('%s' => $info['basename'])), 'error');
}
}
......@@ -185,7 +185,7 @@ function forena_settings() {
);
$form['forena_input_format'] = forena_filter_element(variable_get('forena_input_format',''));
$form['forena_input_format'] = forena_filter_element(variable_get('forena_input_format', ''));
$form['forena_default_form'] = array(
'#type' => 'select',
......@@ -193,7 +193,7 @@ function forena_settings() {
'#options' => $skins,
'#description' => t('Specify the default skin to be used. New skins can be created by creating .skinfo files in your reports directory.'
. ' Skins are basically css and javascript libraries added to your report.'),
'#default_value' => variable_get('forena_default_form',''),
'#default_value' => variable_get('forena_default_form', ''),
);
$form = system_settings_form($form);
......@@ -265,7 +265,7 @@ function forena_format_form($formid, $form_state, $report_name) {
'#title' => t('Skin'),
'#options' => $skins,
'#default_value' => $report_form,
'#description' => t('The page style of your report. The {skin}.skinfo file specifies css and js file in your report. ')
'#description' => t('The page style of your report. The {skin}.skinfo file specifies css and js file in your report.')
);
//begin checking doc generation options
......@@ -319,7 +319,7 @@ function forena_format_form_submit($form, &$form_state) {
// Doc gen settings.
if (isset($form['docgen'])) {
$docgen = array();
if($selected = array_filter(@$values['docgen']['docs'])) {
if ($selected = array_filter(@$values['docgen']['docs'])) {
if ($selected) foreach ($selected as $key => $value) {
if ($value) $docgen[] = array('type' => $key);
}
......@@ -451,7 +451,7 @@ function forena_layout_form($form, $form_state, $report_name) {
$form['menu']['title'] = array(
'#type' => 'textfield',
'#title' => t('Menu Title'),
'#description' => t('Title of menu item. Leave blank to use the report title as the menu title. '),
'#description' => t('Title of menu item. Leave blank to use the report title as the menu title.'),
);
$menu_options = array(
......@@ -551,7 +551,7 @@ function forena_layout_form_submit($form, &$form_state) {
$filename = $report_path . '/' . $report_name . '.frx';
if (forena_save_report($report_name, $r->asXML(), TRUE) == 1) {
drupal_set_message(t('Your report, %s has been saved.', array('%s'=>$report_name)));
drupal_set_message(t('Your report, %s has been saved.', array('%s' => $report_name)));
}
// If we changed the menu we need to rebuild it.
if ($rebuild_menu) {
......@@ -631,7 +631,7 @@ function forena_add_report_form($formid, $form_state, $report_name='') {
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $title,
'#required' => true,
'#required' => TRUE,
);
$form['category'] = array(
......@@ -699,7 +699,7 @@ function forena_add_report_form_submit($form, &$form_state) {
$filename = $desc['filename'];
if (forena_save_report($report_name, $r->asXML(), TRUE) == 1) {
drupal_set_message(t('Your report, %s has been saved.', array('%s'=>$report_name)));
drupal_set_message(t('Your report, %s has been saved.', array('%s' => $report_name)));
//if this is a new report then redirect to data blocks
if ($values['report_name']) {
$edit = '/edit';
......@@ -707,7 +707,7 @@ function forena_add_report_form_submit($form, &$form_state) {
else {
$edit = '/edit/data/add';
}
$form_state['redirect']= $desc['i_link'] . $edit;
$form_state['redirect']= $desc['i_link'] . $edit;
}
}
......@@ -740,7 +740,7 @@ function forena_create_trans_form($formid, $form_state, $report_name) {
'#value' => $name,
);
foreach ($languages as $key=>$obj) {
foreach ($languages as $key => $obj) {
$languages[$key] = $obj->native;
}
$form['report_lang'] = array(
......@@ -760,7 +760,7 @@ function forena_create_trans_form($formid, $form_state, $report_name) {
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $title,
'#required' => true,
'#required' => TRUE,
);
......@@ -775,7 +775,7 @@ function forena_create_trans_form($formid, $form_state, $report_name) {
function forena_create_trans_form_submit($form, &$form_state) {
$values = $form_state['values'];
$base_name = $values['base_name'];
$new_name = $values['save_report_language']. '/' . $base_name;
$new_name = $values['save_report_language'] . '/' . $base_name;
$desc = Frx::Menu()->parseURL($new_name);
$filename = $desc['filename'];
......@@ -794,10 +794,9 @@ function forena_create_trans_form_submit($form, &$form_state) {
}
if (forena_save_report($report_name, $r->asXML(), TRUE) == 1) {
drupal_set_message(t('Translation, %s has been created. Switch languages to translate ', array('%s'=>$values['title'])));
drupal_set_message(t('Translation, %s has been created. Switch languages to translate.', array('%s' => $values['title'])));
//if this is a new report then redirect to data blocks
$form_state['redirect']= array( $desc['i_link'] . '/edit/layout');
}
}
......@@ -829,10 +828,10 @@ function forena_doc_formats_settings() {
$form['forena_email_override'] = array(
'#type' => 'checkbox',
'#title' => 'Run email merges in test mode' ,
'#default_value' => variable_get('forena_email_override',FALSE),
'#default_value' => variable_get('forena_email_override', FALSE),
'#description' => t('When this box is checked emails are sent to the currently logged in user. Useful for testing environments.'),
);
$form['forena_email_input_format'] = forena_filter_element(variable_get('forena_email_input_format',''));
$form['forena_email_input_format'] = forena_filter_element(variable_get('forena_email_input_format', 'full_text'));
$form['forena_email_input_format']['#title'] = t('Email Input Format');
return system_settings_form($form);
......@@ -844,19 +843,19 @@ function forena_doc_formats_settings() {
function forena_data_settings() {
$repos = Frx::RepoMan()->repositories;
$r_list = array();
$headers = array(t('Name'),t('Description'), t('Path'), t('Operation'));
foreach ($repos as $name=>$r) {
$headers = array(t('Name'), t('Description'), t('Path'), t('Operation'));
foreach ($repos as $name => $r) {
$r_list[] = array(
$name,
$r['title'],
$r['path'],
l('configure', 'admin/config/content/forena/data/configure/'. $name)
l(t('configure'), 'admin/config/content/forena/data/configure/' . $name)
);
}
$output = '<ul class="action-links"><li>' . l('Add data source', 'admin/config/content/forena/data/add') . '</li></ul>';
$output .= theme_table(array('header' => $headers, 'rows' => $r_list, 'attributes' => array(), 'caption' => '', 'sticky' => true, 'colgroups' => array(), 'empty' => ''));
$output = '<ul class="action-links"><li>' . l(t('Add data source'), 'admin/config/content/forena/data/add') . '</li></ul>';
$output .= theme_table(array('header' => $headers, 'rows' => $r_list, 'attributes' => array(), 'caption' => '', 'sticky' => TRUE, 'colgroups' => array(), 'empty' => ''));
return $output;
}
......@@ -957,7 +956,7 @@ function forena_data_settings_edit($form, &$form_state, $source=-1) {
// Access method list
$access = array(
'callback' => t('Use drupal permissions'),
'block' => t('Match values provided by a data block. '),
'block' => t('Match values provided by a data block.'),
);
$form['access_method'] = array(
......@@ -966,7 +965,7 @@ function forena_data_settings_edit($form, &$form_state, $source=-1) {
'#disabled' => $locked,
'#title' => t('Data security method'),
'#default_value' => empty($config['access block']) ? 'callback' : 'block',
'#description' => t('Specify how the ACCESS defined for a data block is to be interpreted. '),
'#description' => t('Specify how the ACCESS defined for a data block is to be interpreted.'),
'#ajax' => array(
'callback' => 'forena_access_info_callback',
'wrapper' => 'access-details',
......@@ -1006,7 +1005,7 @@ function forena_data_settings_edit($form, &$form_state, $source=-1) {
$drivers = array(
'FrxDrupal' => t('Drupal'),
'FrxOracle' => t('Oracle Database'),
'FrxPDO' => t('PDO other than Drupal '),
'FrxPDO' => t('PDO other than Drupal'),
'FrxPostgres' => t('Postgres Database'),
'FrxMSSQL' => t('MSSQL Database'),
'FrxFiles' => t('XML Files'),
......@@ -1407,7 +1406,7 @@ function forena_add_data_block_form($formid, &$form_state, $report_name) {
$format = isset($desc['format']) ? $desc['format'] : '';
$r = forena_get_report_editor($desc['name']);
$form_state['storage']['title'] = $r->title;
if(!@$desc['exists']) {
if (!@$desc['exists']) {
drupal_not_found();
return;
}
......@@ -1751,7 +1750,7 @@ function forena_data_block_form($formid, &$form_state, $report_name) {
'#value' => $name,
);
$links = array();
$links[] = array('href' => $desc['link']. '/edit/data/add', 'title' => 'Add Data' );
$links[] = array('href' => $desc['link'] . '/edit/data/add', 'title' => 'Add Data' );
$form['add_link'] = array(
'#type' => 'markup',
'#markup' => theme('links',
......@@ -1790,7 +1789,7 @@ function forena_data_block_form($formid, &$form_state, $report_name) {
$parameters = (string)$attrs['parameters'];
$block_info = Frx::RepoMan()->loadBlock($block);
$access = @$block_info['access'];
$data_block_array[$id] = $block . ": <i>" . ' security "' . $access . '"</i>';
$data_block_array[$id] = $block . ": <i>" . ' security "' . $access . '"</i>';
$ctl = array(
'#type' => 'fieldset',
......@@ -1905,25 +1904,25 @@ function forena_report_translations($name_in='') {
$headers = array(t('Language'), t('Title'), t('Last Modified'), t('Operation'));
// Generate list of all existing tranlsations and their status.
$report_path = FrxReportGenerator::instance()->report_path();
foreach ($languages as $key=>$language) {
foreach ($languages as $key => $language) {
$i_name = ($key=='en') ? $name : $key . '/' . $name;
$i_link = $key . '.' . $name;
if (file_exists($report_path . '/' . $i_name . '.frx')) {
$modified = format_date(filemtime($report_path . '/' . $i_name . '.frx'));
$r = forena_get_report_editor($i_name);
$title = $r->title;
$edit = l(t('Edit'), 'reports/' . str_replace('/', '.', $i_link) . '/edit',array('query' => array('language' => $key)));
$edit = l(t('Edit'), 'reports/' . str_replace('/', '.', $i_link) . '/edit', array('query' => array('language' => $key)));
}
else {
$modified = '';
$title ='';
$edit = l(t('Add'), 'reports/' .$name_in. '/translate', array('query' => array('language' => $key)));
$edit = l(t('Add'), 'reports/' . $name_in . '/translate', array('query' => array('language' => $key)));
}
$data[] = array($language->native, $title, $modified, $edit);
}
return theme_table(array('header' => $headers, 'rows' => $data, 'attributes' => array(), 'caption' => '', 'sticky' => true, 'colgroups' => array(), 'empty' => ''));
return theme_table(array('header' => $headers, 'rows' => $data, 'attributes' => array(), 'caption' => '', 'sticky' => TRUE, 'colgroups' => array(), 'empty' => ''));
}
/**
......@@ -2000,7 +1999,7 @@ function forena_delete_form_submit($form, &$form_state) {
$values = $form_state['values'];
$report_name = $values['report_name'];
if (isset($values['delete_all_languages']) && $values['delete_all_languages']=='all') {
foreach(language_list() as $language) {
foreach (language_list() as $language) {
$report_name = $language->language . '/' . $values['base_name'];
$desc = Frx::Menu()->parseURL($report_name);
forena_delete_report($desc['name']);
......@@ -2134,7 +2133,7 @@ function forena_admin_params_form($formid, $form_state, $report_name) {
);
$links = array();
$links[] = array('href' => $desc['link']. '/edit/params/add', 'title' => 'Add Parameter' );
$links[] = array('href' => $desc['link'] . '/edit/params/add', 'title' => 'Add Parameter' );
$form['add_link'] = array(
'#type' => 'markup',
'#markup' => theme('links',
......
......@@ -444,7 +444,7 @@ function theme_forena_inline_form($variables) {
function _forena_render_form_template($fields, $template) {
static $teng = '';
if (!$teng) $teng = new FrxSyntaxEngine(FRX_TOKEN_EXP,'{}');
if (!$teng) $teng = new FrxSyntaxEngine(FRX_TOKEN_EXP, '{}');
$o = Frx::Data()->push($fields, 'form-fields');
$build = $teng->replace($template, TRUE);
$o = Frx::Data()->pop();
......@@ -453,7 +453,7 @@ function _forena_render_form_template($fields, $template) {
}
function _forena_set_inline_theme(&$elements) {
foreach ($elements as $key => $value) if (strpos($key,'#')===FALSE) {
foreach ($elements as $key => $value) if (strpos($key, '#')===FALSE) {
$type = @$value['#type'];
// Set theme functions for specific types to be inline forms.
switch ($type) {
......@@ -547,7 +547,7 @@ function theme_forena_fieldset_template(&$variables) {
$output = '';
$fields = array();
foreach($element as $key => $value ) if (strpos($key, '#') ===FALSE) {
foreach ($element as $key => $value ) if (strpos($key, '#') ===FALSE) {
$fields[$key] = drupal_render($value);
}
......
/**
* @file
* Legacy forena behaviors. These are deprecated.
*/
(function ($) {
Drupal.behaviors.forenaCallback = {
......
<?php
/**
* @file
* Forena pdf generation module
* @author metzlerd
*/
/**
* Implementation of hook_menu
......@@ -21,9 +26,9 @@ function forena_pdf_menu() {
function forena_pdf_forena_document_types() {
//require_once 'docformats/FrxPrincePDF.inc';
$items = array();
$pdf_generator = variable_get('forena_pdf_generator','');
$pdf_generator = variable_get('forena_pdf_generator', '');
if ($pdf_generator) {
include_once ('docformats/' . $pdf_generator . '.inc');
include_once('docformats/' . $pdf_generator . '.inc');
$items['pdf'] = array(
'class' => $pdf_generator,
'title' => t('PDF Document'),
......@@ -41,7 +46,7 @@ function forena_pdf_configure($formid, &$form_state) {
$path = variable_get('forena_pdf_prince_path', '/usr/local/bin/prince');
$disable_links = variable_get('forena_pdf_disable_links', TRUE);
$pdf_options = array('' => t('None') , 'FrxPrincePDF' => t('Prince XML'), 'FrxMPDF' => t('MPDF'));
$pdf_generator = variable_get('forena_pdf_generator','');
$pdf_generator = variable_get('forena_pdf_generator', '');
$mpdf_path = t('MDPF Libarary not found. Please install so sites/all/libraries/mpdf/mpdf.php exists.');
if (file_exists('sites/all/libraries/mpdf/mpdf.php')) {
......@@ -59,7 +64,7 @@ function forena_pdf_configure($formid, &$form_state) {
}
$form['forena_pdf_generator'] = array(
'#type' => 'select',
'#type' => 'select',
'#title' => t('PDF Generation Method'),
'#options' => $pdf_options,
'#default_value' => $pdf_generator,
......
......@@ -82,7 +82,7 @@ function forena_query_builder_form($formid, &$form_state) {
if (@$form_state['storage']['delete']) {
$form['question'] = array(
'#type' => 'markup',
'#markup' => '<p>Are you sure you want to delete '. $data['block_name'] . '?</p>',
'#markup' => '<p>Are you sure you want to delete ' . $data['block_name'] . '?</p>',
);
$form['confirm'] = array(
......@@ -181,7 +181,7 @@ function forena_query_load_block($form, &$form_state) {
$form_state['rebuild'] = TRUE;
$form_state['storage']['new'] = FALSE;
$form_state['storage']['block'] = $block_def = Frx::RepoMan()->loadBlock($form_state['values']['block']);
list($provider, $block) = @explode('/',$form_state['values']['block'],2);
list($provider, $block) = @explode('/', $form_state['values']['block'], 2);
$form_state['storage']['provider'] = $provider;
$form_state['storage']['block_name'] = $form_state['values']['block'];
if (@$block_def['builder']) {
......@@ -203,7 +203,7 @@ function forena_query_load_include($form, &$form_state) {
$form_state['rebuild'] = TRUE;
$form_state['storage']['block'] = Frx::RepoMan()->loadBlock($form_state['values']['block']);
$form_state['storage']['block']['locked'] = FALSE;
list($provider, $block) = @explode('/',$form_state['values']['block'],2);
list($provider, $block) = @explode('/', $form_state['values']['block'], 2);
$form_state['storage']['provider'] = $provider;
$form_state['storage']['builder']['block_name'] = $block;
$form_state['storage']['block_name'] = $form_state['values']['block'];
......@@ -291,7 +291,7 @@ function forena_query_delete_block($form, &$form_state) {
$block_name = $form_state['storage']['block_name'];
Frx::RepoMan()->deleteBlock($block_name);
$form_state['rebuild'] = FALSE;
drupal_set_message('Deleted '. $block_name);
drupal_set_message(t('Deleted %s', array('%s' => $block_name)));
}
function forena_query_close($form, &$form_state) {
......@@ -325,7 +325,7 @@ function forena_query_try_delete($form, &$form_state) {
* @param $values
*/
function _forena_query_clean_values(&$values, &$elements) {
foreach($elements as $key=>$value) if (strpos($key, '#')!==0) {
foreach ($elements as $key => $value) if (strpos($key, '#')!==0) {
if (@$value['#type']=='submit') {
unset($values[$key]);
}
......@@ -373,7 +373,7 @@ function _forena_query_filter_ctl(&$data, &$ctl, $fields) {
'#weight' => 1);
$i++;
foreach ($data['filter'] as $k=>$crit) {
foreach ($data['filter'] as $k => $crit) {
$i++;
if (isset($crit['filter'])) {
$cnd = array();
......@@ -453,7 +453,7 @@ function forena_query_add_filter($form, &$form_state) {
$parents = $form_state['triggering_element']['#parents'];
array_shift($parents);
array_pop($parents);
$field = array_fill_keys(array('field', 'op', 'value'),'');
$field = array_fill_keys(array('field', 'op', 'value'), '');
_forena_query_add_parent_data($where, $parents, $field);
$form_state['storage']['builder']['where'] = $where;
$form_state['rebuild'] = TRUE;
......@@ -513,7 +513,7 @@ function forena_query_remove_group($form, &$form_state) {
array_pop($parents);
_forena_query_remove_parent_data($where, $parents);
if (!$where['filter']) {
$where['filter'][] = array_fill_keys(array('field', 'op', 'value'),'');
$where['filter'][] = array_fill_keys(array('field', 'op', 'value'), '');
}
$form_state['storage']['builder']['where'] = $where;
$form_state['rebuild'] = TRUE;
......
<?php
/**
* @file
* paramter form
* Use to customize report parameters form.
* @author metzlerd
*
*/
class FrxParameterForm extends FrxRenderer {
public $form_id;
public function render() {
$variables = $this->replacedAttributes();
$variables['template'] = $this->innerXML();
$form = $this->frxReport->parametersForm($variables);
$output = $this->drupalRender($form);
return $output;
$variables = $this->replacedAttributes();
$variables['template'] = $this->innerXML();
$form = $this->frxReport->parametersForm($variables);
$output = $this->drupalRender($form);
return $output;
}
}
\ No newline at end of file
<?php
/**
* @file
* Returns configuration data as XML for reporting.
* @author metzlerd
*
*/
class FrxConfigData {
public $access = 'access content';
/**
......@@ -7,7 +13,7 @@ class FrxConfigData {
public function sources() {
$data = Frx::RepoMan()->repositories;
$node = new SimpleXMLElement('<repos/>');
foreach ($data as $key=>$config) {
foreach ($data as $key => $config) {
$row = $node->addChild('row');
$row->name = $key;
$row->title = @$config['title'];
......
......@@ -87,13 +87,13 @@ class FrxGraphTemplate extends FrxTemplate {
if ($xvalues) {
$form_ctl['seriesx'][$i] = array(
'#type' => 'textfield',
'#title' => (string)($i + 1) ,
'#title' => check_plain((string)($i + 1)),
'#default_value' => $config['seriesx'][$i]
);
}
$form_ctl['series'][$i] = array(
'#type' => 'textfield',
'#title' => (string)($i + 1),
'#title' => check_plain((string)($i + 1)),
'#default_value' => $config['series'][$i],
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment