diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php index 3145b6b5d..a9dcab735 100644 --- a/e107_admin/eurl.php +++ b/e107_admin/eurl.php @@ -359,7 +359,7 @@ class eurl_admin_ui extends e_admin_controller_ui $admin = $obj->admin(); $labels = vartrue($admin['labels'], array()); - $this->prefs['url_main_module']['writeParms'][$module] = vartrue($section['name'], eHelper::labelize($module)); + $this->prefs['url_main_module']['writeParms'][$module] = eHelper::labelize($module); // vartrue($section['name'], eHelper::labelize($module)); } ksort($this->prefs['url_main_module']['writeParms']); @@ -882,7 +882,7 @@ class eurl_admin_form_ui extends e_admin_form_ui } */ $selected = varset($obj->current[$module]) == $location ? "selected='selected'" : ''; - $opt .= ""; + $opt .= ""; $info .= "".$label." @@ -909,10 +909,10 @@ class eurl_admin_form_ui extends e_admin_form_ui "; - $bTable = ($admin['generate']['table']); - $bInput = $admin['generate']['input']; - $bOutput = $admin['generate']['output']; - $bPrimary = $admin['generate']['primary']; + $bTable = varset($admin['generate']['table']); + $bInput = varset($admin['generate']['input']); + $bOutput = varset($admin['generate']['output']); + $bPrimary = varset($admin['generate']['primary']); $text .= (is_array($admin['generate'])) ? $frm->admin_button('rebuild['.$bTable.']', $bPrimary."::".$bInput."::".$bOutput,'delete', LAN_EURL_REBUILD) : ""; diff --git a/e107_admin/frontpage.php b/e107_admin/frontpage.php index 30c1a115e..75d12b515 100644 --- a/e107_admin/frontpage.php +++ b/e107_admin/frontpage.php @@ -147,7 +147,7 @@ elseif(isset($_POST['fp_dec'])) } */ -if (isset($_POST)) +if (!empty($_POST)) { // avoid endless loop. diff --git a/e107_admin/meta.php b/e107_admin/meta.php index a9655dba8..12b056c57 100644 --- a/e107_admin/meta.php +++ b/e107_admin/meta.php @@ -73,6 +73,7 @@ $meta_copyright = vartrue($pref['meta_copyright'], array()); $meta_author = vartrue($pref['meta_author'], array()); + $text = "
@@ -86,32 +87,32 @@ $text = " ".LAN_DESCRIPTION." "; - $text .= $frm->textarea('meta_description',$tp->toForm($meta_diz[e_LANGUAGE]),3,80, array('size'=>'xxlarge')); + $text .= $frm->textarea('meta_description',$tp->toForm(varset($meta_diz[e_LANGUAGE])),3,80, array('size'=>'xxlarge')); // $text .= ""; $text .= " ".LAN_KEYWORDS." "; - $text .= $frm->tags('meta_keywords',$tp->toForm($meta_keywords[e_LANGUAGE])); + $text .= $frm->tags('meta_keywords',$tp->toForm(varset($meta_keywords[e_LANGUAGE]))); // $text .= ""; $text .= " ".LAN_COPYRIGHT." - + ".LAN_AUTHOR." - + ".METLAN_1." "; - $text .= $frm->textarea('meta',str_replace("<","<",$tp->toForm($meta[e_LANGUAGE])),5,100,'size=block-level'); + $text .= $frm->textarea('meta',str_replace("<","<",$tp->toForm(varset($meta[e_LANGUAGE]))),5,100,'size=block-level'); $text .= "".METLAN_2.""; @@ -141,4 +142,3 @@ $ns->tablerender(METLAN_00." (".e_LANGUAGE.")", $mes->render().$text); require_once("footer.php"); -?> \ No newline at end of file diff --git a/e107_admin/theme.php b/e107_admin/theme.php index abf151d46..753295be9 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -831,7 +831,7 @@ class theme_admin_online_tree_model extends e_tree_model 'thumbnail' => $r['thumbnail'], 'url' => $r['urlView'], 'author' => $r['author'], - 'website' => $r['authorUrl'], + 'website' => varset($r['authorUrl']), 'compatibility' => $r['compatibility'], 'description' => $r['description'], 'price' => $r['price'], @@ -958,6 +958,8 @@ class theme_admin_form_ui extends e_admin_form_ui $version = $tp->filter(e_VERSION,'version'); $compat = $tp->filter($theme['compatibility'], 'version'); + + $disabled = ''; $mainTitle = TPVLAN_10; @@ -1066,8 +1068,10 @@ class theme_builder extends e_admin_ui e107::getMessage()->addDebug("Disable debug to save generated files. "); - - $this->themeName = $tp->filter($_GET['newtheme'],'w'); + if(!empty($_GET['newtheme'])) + { + $this->themeName = $tp->filter($_GET['newtheme'],'w'); + } if(!empty($_GET['src'])) { diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index d814d8d33..e9718a8a3 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -7079,7 +7079,7 @@ var_dump($select_options);*/ { $key = strtoupper($k); $fields[$v]['grid'] = true; - $vars[$key] = $this->renderValue($v,$data[$v],$fields[$v],$id); + $vars[$key] = $this->renderValue($v, varset($data[$v]), $fields[$v], $id); } $cells[] = "
". $tp->simpleParse($template,$vars). '
'; diff --git a/e107_handlers/library_manager.php b/e107_handlers/library_manager.php index c99b15cad..d39bda06a 100755 --- a/e107_handlers/library_manager.php +++ b/e107_handlers/library_manager.php @@ -984,17 +984,18 @@ class e_library_manager $library['installed'] = false; // Check whether the library exists. - if(!isset($library['library_path'])) + if(!isset($library['library_path']) && !empty($library['machine_name'])) { $library['library_path'] = $this->detectPath($library['machine_name']); } - $libraryPath = e107::getParser()->replaceConstants($library['library_path']); - if($library['library_path'] === false || (!file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http')) + $libraryPath = !empty($library['library_path']) ? e107::getParser()->replaceConstants($library['library_path']) : ''; + + if(empty($library['library_path']) || (!empty($libraryPath) && !file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http')) { $library['error'] = LAN_NOT_FOUND; - $replace_with = array($library['name']); + $replace_with = array($name); $library['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_03, $replace_with, true); return $library; diff --git a/e107_handlers/mailout_admin_class.php b/e107_handlers/mailout_admin_class.php index a6481c65f..54aff8cee 100644 --- a/e107_handlers/mailout_admin_class.php +++ b/e107_handlers/mailout_admin_class.php @@ -2248,7 +2248,7 @@ class mailoutAdminClass extends e107MailManager $text .= " \n"; - $text .= $frm->radio_switch('smtp_keepalive', $pref['smtp_keepalive']) . " + $text .= $frm->radio_switch('smtp_keepalive', varset($pref['smtp_keepalive'])) . " "; diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index 4f57fef0b..a88e46cca 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1397,7 +1397,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; } //XXX && !is_numeric($act) ??? if (($active_page == (string) $act) || (str_replace("?", "", e_PAGE.e_QUERY) == str_replace("?", "", $act)) - || e_REQUEST_HTTP === $e107_vars[$act]['link'] + || e_REQUEST_HTTP === varset($e107_vars[$act]['link']) ) { $temp = $tmpl['button_active'.$kpost]; diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index c32a6540b..f85ea7558 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -830,6 +830,7 @@ class e_theme // print_a($lays); $themeArray['legacy'] = true; $themeArray['html'] = false; + $themeArray['compatibility'] = '1'; return $themeArray; } diff --git a/e107_handlers/user_extended_class.php b/e107_handlers/user_extended_class.php index 52df39fd6..ab452791a 100644 --- a/e107_handlers/user_extended_class.php +++ b/e107_handlers/user_extended_class.php @@ -47,6 +47,33 @@ class e107_user_extended public function __construct() { + $constants = array( + 'EUF_CATEGORY' => 0, + 'EUF_TEXT' => 1, + 'EUF_RADIO' => 2, + 'EUF_DROPDOWN' => 3, + 'EUF_DB_FIELD' => 4, + 'EUF_TEXTAREA' => 5, + 'EUF_INTEGER' => 6, + 'EUF_DATE' => 7, + 'EUF_LANGUAGE' => 8, + 'EUF_PREDEFINED' => 9, // should be EUF_LIST IMO + 'EUF_CHECKBOX' => 10, + 'EUF_PREFIELD' => 11, // should be EUF_PREDEFINED => useful when creating fields from e.g. plugin XML + 'EUF_ADDON' => 12, // defined within e_user.php addon @todo + 'EUF_COUNTRY' => 13, // $frm->country() + 'EUF_RICHTEXTAREA' => 14, // $frm->bbarea() + ); + + foreach($constants as $def => $val) + { + if(!defined($def)) + { + define($def, $val); + } + } + +/* @define('EUF_CATEGORY', 0); @define('EUF_TEXT',1); @define('EUF_RADIO',2); @@ -61,7 +88,7 @@ class e107_user_extended @define('EUF_PREFIELD',11); // should be EUF_PREDEFINED, useful when creating fields from e.g. plugin XML @define('EUF_ADDON', 12); // defined within e_user.php addon @todo @define('EUF_COUNTRY', 13); // $frm->country() - @define('EUF_RICHTEXTAREA', 14); // $frm->bbarea() + @define('EUF_RICHTEXTAREA', 14); // $frm->bbarea()*/ $this->typeArray = array( 'text' => EUF_TEXT, diff --git a/e107_handlers/userclass_class.php b/e107_handlers/userclass_class.php index 6f5958fb9..6ef7437c4 100644 --- a/e107_handlers/userclass_class.php +++ b/e107_handlers/userclass_class.php @@ -469,7 +469,8 @@ class user_class if(is_array($extra_js)) { $options = $extra_js; - unset($extra_js); + $extra_js = ''; + } $class = "tbox form-control"; diff --git a/e107_plugins/news/e_sitelink.php b/e107_plugins/news/e_sitelink.php index f2669c10b..c91b7d966 100644 --- a/e107_plugins/news/e_sitelink.php +++ b/e107_plugins/news/e_sitelink.php @@ -150,7 +150,7 @@ class news_sitelink // include plugin-folder in the name. 'link_order' => '', 'link_parent' => '', 'link_open' => '', - 'link_class' => intval($row['news_class']) + 'link_class' => 0 ); diff --git a/e107_plugins/social/admin_config.php b/e107_plugins/social/admin_config.php index b37a80aa6..9ad5e9819 100644 --- a/e107_plugins/social/admin_config.php +++ b/e107_plugins/social/admin_config.php @@ -419,7 +419,7 @@ class social_ui extends e_admin_ui - ".$frm->text($keypref, $pref['xurl'][$k], false, $opts)." + ".$frm->text($keypref, varset($pref['xurl'][$k]), false, $opts)."
".LAN_SOCIAL_ADMIN_13." ".$var['label']." ".LAN_SOCIAL_ADMIN_12." (".$def.")