Index: trunk/admin/install.php =================================================================== diff -u -r547 -r553 --- trunk/admin/install.php (.../install.php) (revision 547) +++ trunk/admin/install.php (.../install.php) (revision 553) @@ -1,7 +1,8 @@ MetaTables(); + + foreach($tables as $tab_name) { + if (strstr($tab_name, $g_TablePrefix."ses_")) { + $sql = "DROP TABLE IF EXISTS $tab_name"; + $ado->Execute($sql); + } + } + /* run install again */ $state="license"; break; Index: trunk/admin/modules/upgrade_lic.php =================================================================== diff -u --- trunk/admin/modules/upgrade_lic.php (revision 0) +++ trunk/admin/modules/upgrade_lic.php (revision 553) @@ -0,0 +1,165 @@ +Get("Site_Path"); +$admin = $objConfig->Get("AdminDirectory"); +if(!strlen($admin)) + $admin = "admin"; +$adminURL = $rootURL.$admin; +$localURL=$rootURL."kernel/"; +$imagesURL = $rootURL."admin/images"; +//admin only util +$pathtolocal = $pathtoroot."kernel/"; +require_once ($pathtoroot."admin/include/elements.php"); +require_once ($pathtoroot."kernel/admin/include/navmenu.php"); +require_once ($pathtolocal."admin/include/navmenu.php"); +require_once($pathtoroot."admin/toolbar.php"); +//Set Section +$section = "in-portal:addmodule"; +//Set Environment Variable +$envar = "env=" . BuildEnv(); +global $tables; +unset($tables); + + +if($_POST["Action"]=="update") +{ + $newpath= $_POST["backup_path"]; + $newpath = str_replace('\\\\','\\',$newpath); + $objConfig->Set("Backup_Path",$newpath); + $objConfig->Save(); + +} +$filepath=$objConfig->Get("Backup_Path"); + +$limit = 100; +$success =0; + +$objSession->SetVariable("restore_filepath",$filepath); +$objSession->SetVariable("restore_success",0); +$objSession->SetVariable("restore_todo",""); + +$sec = $objSections->GetSection($section); +$objCatToolBar = new clsToolBar(); + +$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY"); + +if (true) +{ + + $MouseOver=""; + $MouseOut=""; + $onClick=""; + $link="#"; + $objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif"); + + if(true) + { + $MouseOver="swap('moveright','toolbar/tool_next_f2.gif');"; + $MouseOut="swap('moveright', 'toolbar/tool_next.gif');"; + + + $var="?env=".BuildEnv()."&en=$en_next"; + $link2=$rootURL."admin/install.php".$var; + $onClick="document.location= '$link2';"; + $onClick="document.restore1.submit();"; + + + $link="#"; + $objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,$onClick,"tool_next.gif"); + } + + $title = admin_language("la_tab_upgrade_license"); + + int_header($objCatToolBar,NULL,$title); +} + +$SubmitUrl = $adminURL."/install.php"; +//$SubmitUrl = $adminURL."/install.php"; +?> + + + + + > + + + + > + + + + + + + + + +
+ +
+ +
+ Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r534 -r553 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 534) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 553) @@ -482,8 +482,8 @@ { $html = $text; $search = "TagPrefix; - $next_tag = strpos($html,""; print_r($element); echo ""; - + //echo "Tag Prefix: ".$this->TagPrefix." Element: ".$element->name."
"; if (strtolower($element->name) == 'touser') { $this->TagPrefix = "touser"; } @@ -597,12 +597,16 @@ if(!strlen($ret)) $ret = $this->GetCustomFieldValue($field,$default); break; + default: + $ret = "Undefined:".$element->name; + break; } } else { $ret = $this->parsetag($element->name); } + return $ret; } Index: trunk/admin/category/addcategory_custom.php =================================================================== diff -u -r374 -r553 --- trunk/admin/category/addcategory_custom.php (.../addcategory_custom.php) (revision 374) +++ trunk/admin/category/addcategory_custom.php (.../addcategory_custom.php) (revision 553) @@ -189,12 +189,14 @@ { $val_field = "Get("Value")."\" name=\"$fieldname\">"; $field->Set("Value", $val_field); + $field->Set("FieldLabel", admin_language($field->Get('Prompt'))); $field->Set("DataId",$f->Get("CustomDataId")); } else { $val_field = ""; $field->Set("Value", $val_field); + $field->Set("FieldLabel", admin_language($field->Get('Prompt'))); $field->Set("DataId",0); } } Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -r537 -r553 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 537) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 553) @@ -205,7 +205,7 @@ function SendToUser($UserId) { global $objUsers, $objEmailQueue, $objConfig; - + $conn = &GetADODBConnection(); //echo "Handling Event ".$this->Get("Event")." for user $UserId
\n"; $this->recipient = new clsPortalUser($UserId); // $objUsers->GetItem($UserId); @@ -217,10 +217,10 @@ $To = trim($this->recipient->Get("FirstName")." ".$this->recipient->Get("LastName")); $this->ReadTemplate(); - + $subject = $this->ParseSection($this->subject, $this->recipient); $body = $this->ParseSection($this->body); - + if(!is_object($this->fromuser)) { $this->fromuser = $objUsers->GetItem($this->Get("FromUserId")); @@ -307,9 +307,10 @@ function ParseTemplateText($text) { $html = $text; - $search = "TagPrefix; - $next_tag = strpos($html,"TagPrefix; + //$next_tag = strpos($html,"$status"; - $data["Name"] = $mod; + $status= admin_language("la_text_ready_to_install"); + + $mod_tmp_name_arr = explode('-', $mod); + + $mod_tmp_name = ''; + foreach ($mod_tmp_name_arr as $names) { + $mod_tmp_name .= ucfirst($names)."-"; + } + + $mod_tmp_name = substr($mod_tmp_name, 0, strlen($mod_tmp_name) - 1); + + if (_ModuleLicensed($mod_tmp_name)) { + $data["Url"] = "$status"; + } + else { + $data["Url"] = ''.admin_language("la_module_not_licensed").''; + } + + $data["Name"] = $mod_tmp_name; $objModList->AddItemFromArray($data); } Index: trunk/kernel/include/modules.php =================================================================== diff -u -r540 -r553 --- trunk/kernel/include/modules.php (.../modules.php) (revision 540) +++ trunk/kernel/include/modules.php (.../modules.php) (revision 553) @@ -546,7 +546,8 @@ //echo "ok
"; $modules = explode(",",$key["mod"]); } - } + } + //print_pre($modules); if(in_array($name,$modules)) { //echo "ok
"; return TRUE;