diff --git a/PEAR.php b/PEAR.php index a94a3de419d274af59b22b90c85fd723c6de87f2..be09432e118527112e384613c38da4de9e0efd61 100644 --- a/PEAR.php +++ b/PEAR.php @@ -156,7 +156,7 @@ class PEAR // }}} // {{{ constructor - + /** * Constructor. Registers this object in * $_PEAR_destructor_object_list for destructor emulation if a @@ -167,7 +167,7 @@ class PEAR * @access public * @return void */ - function PEAR($error_class = null) + function __construct($error_class = null) { $classname = strtolower(get_class($this)); if ($this->_debug) { @@ -191,6 +191,13 @@ class PEAR } } } + function PEAR($error_class = null) + { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($error_class); + } // }}} // {{{ destructor @@ -842,7 +849,7 @@ class PEAR_Error * @access public * */ - function PEAR_Error($message = 'unknown error', $code = null, + function __construct($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null) { if ($mode === null) { @@ -900,6 +907,15 @@ class PEAR_Error eval('$e = new Exception($this->message, $this->code);throw($e);'); } } + function PEAR_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($message, $code,$mode, $options, $userinfo); + + } // }}} // {{{ getMode() diff --git a/config.php b/config.php index e835cce53fec0800deece75922c04a445fbaf1ec..f7c45f4369a9d84543468217fb2f70f2ff6d0cd6 100644 --- a/config.php +++ b/config.php @@ -30,15 +30,15 @@ class VtigerConfig { static function get($key, $defvalue='') { if (self::has($key)) { - global $$key; - return $$key; + global ${$key}; + return ${$key}; } return $defvalue; } static function has($key) { - global $$key; - return (isset($$key)); + global ${$key}; + return (isset(${$key})); } static function getOD($key, $defvalue='') { diff --git a/config.template.php b/config.template.php index 41abe8efc1a5b8039d470defa584ebbc138f3e47..fe88d5134b748dc385685ab7803d28d303380bd3 100644 --- a/config.template.php +++ b/config.template.php @@ -119,9 +119,6 @@ $list_max_entries_per_page = '20'; // history_max_viewed default value = 5 $history_max_viewed = '5'; -// default_module default value = Home -$default_module = 'Home'; - // default_action default value = index $default_action = 'index'; @@ -178,5 +175,8 @@ if(isset($default_timezone) && function_exists('date_default_timezone_set')) { //Set the default layout $default_layout = 'v7'; +//Maximiun scheduled workflows default value set to 10 +$max_scheduled_workflows = 10; + include_once 'config.security.php'; ?> diff --git a/cron/.htaccess b/cron/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..8d2f25636ddd2da5618493bc74e617b0f59bdfc3 --- /dev/null +++ b/cron/.htaccess @@ -0,0 +1 @@ +deny from all diff --git a/cron/class.phpmailer.php b/cron/class.phpmailer.php index 12a95875702e04a663daf65433161c74204e2f1f..fba70242a465b0feb5fd5238f1fdb3143d41f766 100755 --- a/cron/class.phpmailer.php +++ b/cron/class.phpmailer.php @@ -45,7 +45,7 @@ class PHPMailer * The character set of the message. * @var string */ - public $CharSet = 'iso-8859-1'; + public $CharSet = 'UTF-8'; /** * The MIME Content-type of the message. diff --git a/data/CRMEntity.php b/data/CRMEntity.php index b0c7008f400735858e39442fb04d6804c94e6a7e..be109258929dfc0abbf8ce33fb9c93dedcd9a674 100644 --- a/data/CRMEntity.php +++ b/data/CRMEntity.php @@ -112,7 +112,7 @@ class CRMEntity { } // added to support files transformation for file upload fields like uitype 69, - if(count($_FILES)) { + if(!empty($_FILES) && count($_FILES)) { $_FILES = Vtiger_Util_Helper::transformUploadedFiles($_FILES, true); } @@ -522,7 +522,7 @@ class CRMEntity { } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23) { //Added to avoid function call getDBInsertDateValue in ajax save if (isset($current_user->date_format) && !$ajaxSave) { - $fldvalue = getValidDBInsertDateValue($this->column_fields[$fieldname]); + $fldvalue = getValidDBInsertDateTimeValue($this->column_fields[$fieldname]); } else { $fldvalue = $this->column_fields[$fieldname]; } @@ -945,7 +945,7 @@ class CRMEntity { $em->triggerEvent("vtiger.entity.beforesave.modifiable", $entityData); $em->triggerEvent("vtiger.entity.beforesave", $entityData); $em->triggerEvent("vtiger.entity.beforesave.final", $entityData); - } + } //Event triggering code ends //GS Save entity being called with the modulename as parameter @@ -1605,7 +1605,7 @@ class CRMEntity { while ($recordinfo = $adb->fetch_array($records)) { $value = "$prefix" . "$cur_id"; $adb->pquery("UPDATE $fld_table SET $fld_column = ? WHERE $this->table_index = ?", Array($value, $recordinfo['recordid'])); - $cur_id += 1; + $cur_id = $this->getSequnceNumber($cur_id); $returninfo['updatedrecords'] = $returninfo['updatedrecords'] + 1; } if ($old_cur_id != $cur_id) { @@ -1618,6 +1618,15 @@ class CRMEntity { } return $returninfo; } + + function getSequnceNumber($curid){ + $strip = strlen($curid) - strlen($curid + 1); + if ($strip < 0) + $strip = 0; + $temp = str_repeat("0", $strip); + $req_no = $temp . ($curid + 1); + return $req_no; + } /* Generic function to get attachments in the related list of a given module */ diff --git a/data/Tracker.php b/data/Tracker.php index cc2e9623e49be668432b0e60cf308b492bb076c5..706dbc300b307a763cd47aef592ae5128fae7ee4 100755 --- a/data/Tracker.php +++ b/data/Tracker.php @@ -44,14 +44,21 @@ class Tracker { "item_id", "item_summary" ); - - function Tracker() + function __construct() { $this->log = LoggerManager::getLogger('Tracker'); - // $this->db = PearDatabase::getInstance(); - global $adb; + // $this->db = PearDatabase::getInstance(); + global $adb; $this->db = $adb; } + function Tracker() + { + + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); + } /** * Add this new item to the vtiger_tracker vtiger_table. If there are too many items (global config for now) diff --git a/include/ListView/ListViewSession.php b/include/ListView/ListViewSession.php index 4d4c17c7b78ce2bbafb2ea46b639b0caa5da0030..22830e0c7249d645fcc5fd94198d4066622d1688 100644 --- a/include/ListView/ListViewSession.php +++ b/include/ListView/ListViewSession.php @@ -25,18 +25,24 @@ class ListViewSession { * Portions created by vtigerCRM are Copyright (C) vtigerCRM. * All Rights Reserved. */ - - function ListViewSession() - { - global $log,$currentModule; + function __construct() + { + global $log,$currentModule; $log->debug("Entering ListViewSession() method ..."); $this->module = $currentModule; $this->sortby = 'ASC'; $this->start =1; + } + function ListViewSession() + { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); } - function getCurrentPage($currentModule,$viewId){ + public static function getCurrentPage($currentModule,$viewId){ if(!empty($_SESSION['lvs'][$currentModule][$viewId]['start'])){ return $_SESSION['lvs'][$currentModule][$viewId]['start']; } @@ -55,7 +61,7 @@ class ListViewSession { return $start; } - function getListViewNavigation($currentRecordId){ + public static function getListViewNavigation($currentRecordId){ global $currentModule,$current_user,$adb,$log,$list_max_entries_per_page; Zend_Json::$useBuiltinEncoderDecoder = true; $reUseData = false; @@ -206,7 +212,7 @@ class ListViewSession { return $start; } - function setSessionQuery($currentModule,$query,$viewid){ + public static function setSessionQuery($currentModule,$query,$viewid){ if(isset($_SESSION[$currentModule.'_listquery'])){ if($_SESSION[$currentModule.'_listquery'] != $query){ unset($_SESSION[$currentModule.'_DetailView_Navigation'.$viewid]); diff --git a/include/ListView/RelatedListViewSession.php b/include/ListView/RelatedListViewSession.php index 4fc135e449e97d097d0505f1f8632bb685cbda3a..2aea4153630a5d4a247b90a9300543f8fa4067ec 100644 --- a/include/ListView/RelatedListViewSession.php +++ b/include/ListView/RelatedListViewSession.php @@ -23,13 +23,20 @@ class RelatedListViewSession { var $sorder = null; var $sortby = null; var $page_view = null; - - function RelatedListViewSession() { - global $log,$currentModule; + + function __construct() + { + global $log,$currentModule; $log->debug("Entering RelatedListViewSession() method ..."); $this->module = $currentModule; $this->start =1; + } + function RelatedListViewSession() { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); } public static function addRelatedModuleToSession($relationId, $header) { diff --git a/include/Webservices/DataTransform.php b/include/Webservices/DataTransform.php index 36c66b535d4e96f8715f92807cd65f30ebe4c4ac..832c69b9cf85a7e56e7392a5acc627ce4e0de29e 100644 --- a/include/Webservices/DataTransform.php +++ b/include/Webservices/DataTransform.php @@ -52,6 +52,7 @@ $newRow = DataTransform::sanitizeReferences($newRow,$meta); $newRow = DataTransform::sanitizeOwnerFields($newRow,$meta,$t); + $newRow = DataTransform::sanitizeFileFieldsForIds($newRow, $meta); $newRow = DataTransform::sanitizeFields($newRow,$meta); return $newRow; } @@ -255,6 +256,37 @@ } return $row; } + + /** + * Function to attach the image/file ids in retrieve/query operations + * @param type $row + * @param type $meta + * @return <array> + */ + static function sanitizeFileFieldsForIds($row, $meta) { + $moduleFields = $meta->getModuleFields(); + $supportedUITypes = array(61, 69, 28); //file and image uitypes + $attachmentIds = array(); + foreach ($moduleFields as $fieldName => $fieldObj) { + if (in_array($fieldObj->getUIType(), $supportedUITypes)) { + //while doing retrieve operation we have record_id and on query operation we have id. + $id = $row['record_id'] ? $row['record_id'] : $row['id']; + $ids = Vtiger_Functions::getAttachmentIds($id, $meta->getEntityId()); + if($ids) { + foreach($ids as $id){ + array_push($attachmentIds, $id); + } + } + break; + } + } + + if (!empty($attachmentIds)){ + $row['imageattachmentids'] = implode(',', $attachmentIds); + } + + return $row; + } function sanitizeDateFieldsForInsert($row,$meta){ global $current_user; diff --git a/include/Webservices/EntityMeta.php b/include/Webservices/EntityMeta.php index 3a4e9e70211f31a69ebd3a46d68f3b2945152f5c..831eb69b533edd238ec5947c7fd4f5ae52ca4ccc 100644 --- a/include/Webservices/EntityMeta.php +++ b/include/Webservices/EntityMeta.php @@ -34,12 +34,19 @@ abstract class EntityMeta{ protected $ownerFields; protected $moduleFields = null; - protected function EntityMeta($webserviceObject,$user){ - $this->webserviceObject = $webserviceObject; + protected function __construct($webserviceObject,$user) + { + $this->webserviceObject = $webserviceObject; $this->objectName = $this->webserviceObject->getEntityName(); $this->objectId = $this->webserviceObject->getEntityId(); $this->user = $user; + } + protected function EntityMeta($webserviceObject,$user){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($webserviceObject,$user); } public function getEmailFields(){ diff --git a/include/Webservices/FileRetrieve.php b/include/Webservices/FileRetrieve.php new file mode 100644 index 0000000000000000000000000000000000000000..93bc822b113d091e6f34e7ad3e2e4845c6aee71d --- /dev/null +++ b/include/Webservices/FileRetrieve.php @@ -0,0 +1,52 @@ +<?php +/*+*********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + *************************************************************************************/ + +function vtws_file_retrieve($file_id, $user) { + + global $log, $adb; + + $idComponents = vtws_getIdComponents($file_id); + $attachmentId = $idComponents[1]; + + $id = vtws_getAttachmentRecordId($attachmentId); + if(!$id || !$attachmentId) { + throw new WebServiceException(WebServiceErrorCode::$RECORDNOTFOUND, "Record you are trying to access is not found"); + } else { + $id = vtws_getId($idComponents[0], $id); + } + + $webserviceObject = VtigerWebserviceObject::fromId($adb, $id); + $handlerPath = $webserviceObject->getHandlerPath(); + $handlerClass = $webserviceObject->getHandlerClass(); + + require_once $handlerPath; + $handler = new $handlerClass($webserviceObject, $user, $adb, $log); + + // If setype of the record is not equal to webservice entity + $meta = $handler->getMeta(); + $elementType = $meta->getObjectEntityName($id); + if ($elementType !== $webserviceObject->getEntityName()) { + throw new WebServiceException(WebServiceErrorCode::$INVALIDID, "Id specified is incorrect"); + } + + // If User don't have access to the module (OR) View is not allowed + $types = vtws_listtypes(null, $user); + $viewPermission = Users_Privileges_Model::isPermitted($elementType, 'DetailView', $recordId); + if (!$viewPermission || !in_array($elementType, $types['types'])) { + throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED, "Permission to perform the operation is denied"); + } + + $response = $handler->file_retrieve($id, $elementType, $attachmentId); + VTWS_PreserveGlobal::flush(); + + return $response; +} + +?> diff --git a/include/Webservices/OperationManager.php b/include/Webservices/OperationManager.php index 63e8d5a79099dfe845eee28a889ca5fdb1c1bbd9..4c9f217d8095e2f560ba0007fe93b3a2e4537d45 100644 --- a/include/Webservices/OperationManager.php +++ b/include/Webservices/OperationManager.php @@ -35,9 +35,8 @@ private $preLogin; private $operationId; private $operationParams; - - function OperationManager($adb,$operationName,$format, $sessionManager){ - + function __construct($adb,$operationName,$format, $sessionManager) + { $this->format = strtolower($format); $this->sessionManager = $sessionManager; $this->formatObjects = array(); @@ -58,6 +57,13 @@ $this->inParamProcess["encoded"] = &$this->formatObjects[$this->format]["decode"]; $this->fillOperationDetails($operationName); } + function OperationManager($adb,$operationName,$format, $sessionManager){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($adb,$operationName,$format, $sessionManager); + + } function isPreLoginOperation(){ return $this->preLogin == 1; @@ -154,8 +160,23 @@ $webserviceObject = VtigerWebserviceObject::fromName($adb,"Users"); $userId = vtws_getId($webserviceObject->getEntityId(),$userDetails->id); $vtigerVersion = vtws_getVtigerVersion(); - $resp = array("sessionName"=>$this->sessionManager->getSessionId(),"userId"=>$userId,"version"=>$API_VERSION,"vtigerVersion"=>$vtigerVersion); - return $resp; + $userInfo = array( + 'username' => $userDetails->user_name, + 'first_name' => $userDetails->first_name, + 'last_name' => $userDetails->last_name, + 'email' => $userDetails->email1, + 'time_zone' => $userDetails->time_zone, + 'hour_format' => $userDetails->hour_format, + 'date_format' => $userDetails->date_format, + 'is_admin' => $userDetails->is_admin, + 'call_duration' => $userDetails->callduration, + 'other_event_duration' => $userDetails->othereventduration, + 'sessionName'=>$this->sessionManager->getSessionId(), + 'userId'=>$userId, + 'version'=>$API_VERSION, + 'vtigerVersion'=>$vtigerVersion + ); + return $userInfo; } } } catch (DuplicateException $e) { diff --git a/include/Webservices/PreserveGlobal.php b/include/Webservices/PreserveGlobal.php index ade32710210ba4912ee6f18e8ec0c6eb5bc15723..b0c9d7a70fbd1e731dfb74e4d74788e04f0ba2b3 100644 --- a/include/Webservices/PreserveGlobal.php +++ b/include/Webservices/PreserveGlobal.php @@ -14,42 +14,42 @@ class VTWS_PreserveGlobal{ static function preserveGlobal($name,$value){ //$name store the name of the global. - global $$name; + global ${$name}; //To not push null value . Ideally we should not push null value for any name //But current user null is dangerous so we are checking for only current user - if(!empty($$name) || $name != 'current_user') { + if(!empty(${$name}) || $name != 'current_user') { if(!is_array(VTWS_PreserveGlobal::$globalData[$name])){ VTWS_PreserveGlobal::$globalData[$name] = array(); } - VTWS_PreserveGlobal::$globalData[$name][] = $$name; + VTWS_PreserveGlobal::$globalData[$name][] = ${$name}; } - $$name = $value; - return $$name; + ${$name} = $value; + return ${$name}; } static function restore($name){ //$name store the name of the global. - global $$name; + global ${$name}; if(is_array(VTWS_PreserveGlobal::$globalData[$name]) && count(VTWS_PreserveGlobal::$globalData[$name]) > 0){ - $$name = array_pop(VTWS_PreserveGlobal::$globalData[$name]); + ${$name} = array_pop(VTWS_PreserveGlobal::$globalData[$name]); } - $$name; + ${$name}; } static function getGlobal($name){ - global $$name; - return VTWS_PreserveGlobal::preserveGlobal($name,$$name); + global ${$name}; + return VTWS_PreserveGlobal::preserveGlobal($name,${$name}); } static function flush(){ foreach (VTWS_PreserveGlobal::$globalData as $name => $detail) { //$name store the name of the global. - global $$name; + global ${$name}; if(is_array(VTWS_PreserveGlobal::$globalData[$name]) && count(VTWS_PreserveGlobal::$globalData[$name]) > 0) { - $$name = array_pop(VTWS_PreserveGlobal::$globalData[$name]); + ${$name} = array_pop(VTWS_PreserveGlobal::$globalData[$name]); } } } diff --git a/include/Webservices/QueryParser.php b/include/Webservices/QueryParser.php index 1cbca970e7212710a7438ed0943edeacdbb6e3f7..7333463d42bfce5bad6c8ca264552db916ac7ea2 100644 --- a/include/Webservices/QueryParser.php +++ b/include/Webservices/QueryParser.php @@ -19,11 +19,19 @@ private $hasError ; private $error ; private $user; - function Parser($user, $q){ + function __construct($user, $q) + { $this->query = $q; $this->out = array(); $this->hasError = false; - $this->user = $user; + $this->user = $user; + } + + function Parser($user, $q){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($user, $q); } function parse(){ diff --git a/include/Webservices/SessionManager.php b/include/Webservices/SessionManager.php index fff4e25cb30f034aa4f993f633b2e90309bd005c..e325d9914464ef0f641bdf28c49f8765aff4a642 100644 --- a/include/Webservices/SessionManager.php +++ b/include/Webservices/SessionManager.php @@ -26,8 +26,8 @@ private $sessionVar = "__SessionExists"; private $error ; - function SessionManager(){ - + function __construct() + { global $maxWebServiceSessionLifeSpan, $maxWebServiceSessionIdleTime; $now = time(); @@ -42,6 +42,13 @@ //otherwise it subtracts the time from previous time HTTP_Session2::setIdle($this->idleLife, true); } + function SessionManager(){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); + + } function isValid(){ diff --git a/include/Webservices/State.php b/include/Webservices/State.php index c5c162174bf6ecd460edabbe347dba7551efab17..a91c952182348bce94a82d47dac2d1f93b45b550 100644 --- a/include/Webservices/State.php +++ b/include/Webservices/State.php @@ -14,11 +14,18 @@ var $result ; var $error; - function State(){ + function __construct() + { $this->success = false; $this->result = array(); $this->error = array(); } + function State(){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); + } } diff --git a/include/Webservices/Utils.php b/include/Webservices/Utils.php index 3939b5a5e7b01e3a29f41d977d5c37a022cab6a1..cd0d3cc580fb82ddfbdda0142725bf43e4b57692 100644 --- a/include/Webservices/Utils.php +++ b/include/Webservices/Utils.php @@ -1285,4 +1285,36 @@ function vtws_isDuplicatesAllowed($webserviceObject){ return $allowed; } +function vtws_filedetails($fileData){ + $fileDetails = array(); + if(!empty($fileData)) { + $fileName = $fileData['name']; + $fileType = $fileData['type']; + $fileName = html_entity_decode($fileName, ENT_QUOTES, vglobal('default_charset')); + $filenamewithpath = $fileData['path'].'_'.$fileData['encName']; + $filesize = filesize($filenamewithpath); + $fileDetails['fileid'] = $fileData['attachmentsid']; + $fileDetails['filename'] = $fileName; + $fileDetails['filetype'] = $fileType; + $fileDetails['filesize'] = $filesize; + $fileDetails['filecontents'] = base64_encode(file_get_contents($filenamewithpath)); + } + return $fileDetails; +} + +function vtws_getAttachmentRecordId($attachmentId) { + $db = PearDatabase::getInstance(); + $crmid = false; + if(!empty($attachmentId)) { + $query = "SELECT vtiger_seattachmentsrel.crmid FROM vtiger_seattachmentsrel " + . "INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_seattachmentsrel.crmid" + . " WHERE vtiger_seattachmentsrel.attachmentsid = ? AND vtiger_crmentity.deleted = ?"; + $result = $db->pquery($query, array($attachmentId, 0)); + + if ($db->num_rows($result) > 0) { + $crmid = $db->query_result($result, 0, 'crmid'); + } + } + return $crmid; +} ?> \ No newline at end of file diff --git a/include/Webservices/VTQL_Parser.php b/include/Webservices/VTQL_Parser.php index 6db3b61fc32408eb36695f84802e8c1f507a1ad5..8c508df1e67523677702077c1ffbdda0bc2937af 100644 --- a/include/Webservices/VTQL_Parser.php +++ b/include/Webservices/VTQL_Parser.php @@ -1160,9 +1160,9 @@ $this->out['select'] = $this->yystack[$this->yyidx + -7]->minor; if($this->yystack[$this->yyidx + -5]->minor){ $this->out['from'] = $this->yystack[$this->yyidx + -5]->minor ; } -if(SEMI){ -$this->out['semi_colon'] = SEMI; -} +//if(SEMI){ +//$this->out['semi_colon'] = SEMI; +//} if($this->out['select']){ $this->buildSelectStmt($this->out); } @@ -1185,7 +1185,7 @@ $this->out['column_list'][] = 'count(*)'; #line 1191 "e:\workspace\nonadmin\pkg\vtiger\extensions\Webservices\VTQL_parser.php" #line 30 "e:\workspace\nonadmin\pkg\vtiger\extensions\Webservices\VTQL_parser.y" function yy_r7(){ -if(!in_array("*", $this->out["column_list"]) && !in_array("count(*)", array_map(strtolower, $this->out["column_list"]))){ +if(!in_array("*", $this->out["column_list"]) && !in_array("count(*)", array_map('strtolower', $this->out["column_list"]))){ if(!in_array("id",$this->out["column_list"])){ $this->out["column_list"][] = "id"; } @@ -1234,7 +1234,7 @@ $this->out['where_condition']['column_values'][sizeof($this->out['where_conditio #line 1240 "e:\workspace\nonadmin\pkg\vtiger\extensions\Webservices\VTQL_parser.php" #line 82 "e:\workspace\nonadmin\pkg\vtiger\extensions\Webservices\VTQL_parser.y" function yy_r17(){ -$length = sizeof($this->out['where_condition']['column_values']); +$length = ($this->out['where_condition']['column_values'])? sizeof($this->out['where_condition']['column_values']):0; $pos = $length - 1; if($pos < 0){ $pos = 0; @@ -1332,7 +1332,7 @@ $fieldcol = $meta->getFieldColumnMapping(); $columns = array(); if(in_array('*', $this->out['column_list'])){ $columns = array_values($fieldcol); -}elseif( !in_array('count(*)', array_map(strtolower, $this->out['column_list']))){ +}elseif( !in_array('count(*)', array_map('strtolower', $this->out['column_list']))){ foreach($this->out['column_list'] as $ind=>$field){ $columns[] = $fieldcol[$field]; } diff --git a/include/Webservices/VtigerCRMActorMeta.php b/include/Webservices/VtigerCRMActorMeta.php index cab7a7c92adce777c40efba01214b59b86b266f6..962af7092013fdc6ed65838183ad9e0c29fa09eb 100644 --- a/include/Webservices/VtigerCRMActorMeta.php +++ b/include/Webservices/VtigerCRMActorMeta.php @@ -13,7 +13,8 @@ class VtigerCRMActorMeta extends EntityMeta { protected static $fieldTypeMapping = array(); protected static $referenceTypeMapping = array(); - function VtigerCRMActorMeta($tableName,$webserviceObject,$adb,$user){ + function __construct($tableName,$webserviceObject,$adb,$user) + { parent::__construct($webserviceObject,$user); $this->baseTable = $tableName; $this->idColumn = null; @@ -23,6 +24,12 @@ class VtigerCRMActorMeta extends EntityMeta { $this->tableIndexList = null; $this->defaultTableList = array(); } + function VtigerCRMActorMeta($tableName,$webserviceObject,$adb,$user){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($tableName,$webserviceObject,$adb,$user); + } public function getIdColumn() { if($this->idColumn === null) { diff --git a/include/Webservices/VtigerCRMObject.php b/include/Webservices/VtigerCRMObject.php index 033ffd683accbab464093150b96c9931286d6d76..45f472ca0812f228239619f40c41cba2274aa98c 100644 --- a/include/Webservices/VtigerCRMObject.php +++ b/include/Webservices/VtigerCRMObject.php @@ -13,8 +13,8 @@ class VtigerCRMObject{ private $moduleName ; private $moduleId ; private $instance ; - - function VtigerCRMObject($moduleCredential, $isId=false){ + function __construct($moduleCredential, $isId=false) + { if($isId){ $this->moduleId = $moduleCredential; @@ -26,6 +26,12 @@ class VtigerCRMObject{ $this->instance = null; $this->getInstance(); } + function VtigerCRMObject($moduleCredential, $isId=false){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($moduleCredential, $isId); + } public function getModuleName(){ return $this->moduleName; diff --git a/include/Webservices/VtigerCRMObjectMeta.php b/include/Webservices/VtigerCRMObjectMeta.php index dc4afcb3d7a82c5dbb933f3793f5c8f463897841..d0941fd818888942d47cee4bafd78bb3dcd6296d 100644 --- a/include/Webservices/VtigerCRMObjectMeta.php +++ b/include/Webservices/VtigerCRMObjectMeta.php @@ -21,7 +21,8 @@ class VtigerCRMObjectMeta extends EntityMeta { private $hasDeleteAccess; private $assignUsers; - function VtigerCRMObjectMeta($webserviceObject,$user){ + function __construct($webserviceObject,$user) + { parent::__construct($webserviceObject,$user); @@ -50,6 +51,12 @@ class VtigerCRMObjectMeta extends EntityMeta { } $this->tabId = null; } + function VtigerCRMObjectMeta($webserviceObject,$user){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($webserviceObject,$user); + } /** * returns tabid of the current object. diff --git a/include/Webservices/VtigerModuleOperation.php b/include/Webservices/VtigerModuleOperation.php index 5cbd5d810fd5074e5c9b0af9d51c198f4cf05723..780eb7902d353f7620a04dfcb113358099cff901 100644 --- a/include/Webservices/VtigerModuleOperation.php +++ b/include/Webservices/VtigerModuleOperation.php @@ -13,11 +13,18 @@ class VtigerModuleOperation extends WebserviceEntityOperation { protected $isEntity = true; protected $partialDescribeFields = null; - public function VtigerModuleOperation($webserviceObject,$user,$adb,$log){ + public function __construct($webserviceObject,$user,$adb,$log) + { parent::__construct($webserviceObject,$user,$adb,$log); $this->meta = $this->getMetaInstance(); $this->tabId = $this->meta->getTabId(); } + public function VtigerModuleOperation($webserviceObject,$user,$adb,$log){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($webserviceObject,$user,$adb,$log); + } protected function getMetaInstance(){ if(empty(WebserviceEntityOperation::$metaCache[$this->webserviceObject->getEntityName()][$this->user->id])){ @@ -174,6 +181,7 @@ class VtigerModuleOperation extends WebserviceEntityOperation { $meta = $parser->getObjectMetaData(); $this->pearDB->startTransaction(); $result = $this->pearDB->pquery($mysql_query, array()); + $tableIdColumn = $meta->getIdColumn(); $error = $this->pearDB->hasFailedTransaction(); $this->pearDB->completeTransaction(); @@ -187,10 +195,10 @@ class VtigerModuleOperation extends WebserviceEntityOperation { $output = array(); for($i=0; $i<$noofrows; $i++){ $row = $this->pearDB->fetchByAssoc($result,$i); - if(!$meta->hasPermission(EntityMeta::$RETRIEVE,$row["crmid"])){ + if(!$meta->hasPermission(EntityMeta::$RETRIEVE,$row[$tableIdColumn])){ continue; } - $output[] = DataTransform::sanitizeDataWithColumn($row,$meta); + $output[$row[$tableIdColumn]] = DataTransform::sanitizeDataWithColumn($row,$meta); } $newOutput = array(); @@ -200,7 +208,7 @@ class VtigerModuleOperation extends WebserviceEntityOperation { foreach($output as $id => $row1) { if(!empty($tags[$id])) $output[$id]['tags'] = $tags[$id]; $newOutput[] = $output[$id]; - } + } } return $newOutput; } @@ -291,6 +299,34 @@ class VtigerModuleOperation extends WebserviceEntityOperation { $moduleFields = $this->meta->getModuleFields(); return $this->getDescribeFieldArray($moduleFields[$fieldName]); } + + /** + * Function to get the file content + * @param type $id + * @return type + * @throws WebServiceException + */ + public function file_retrieve($crmid, $elementType, $attachmentId=false){ + $ids = vtws_getIdComponents($crmid); + $crmid = $ids[1]; + $recordModel = Vtiger_Record_Model::getInstanceById($crmid, $elementType); + if($attachmentId) { + $attachmentDetails = $recordModel->getFileDetails($attachmentId); + } else { + $attachmentDetails = $recordModel->getFileDetails(); + } + $fileDetails = array(); + if (!empty ($attachmentDetails)) { + if(is_array(current(($attachmentDetails)))) { + foreach ($attachmentDetails as $key => $attachment) { + $fileDetails[$key] = vtws_filedetails($attachment); + } + } else if(is_array($attachmentDetails)){ + $fileDetails[] = vtws_filedetails($attachmentDetails); + } + } + return $fileDetails; + } } ?> diff --git a/include/Webservices/VtigerWebserviceObject.php b/include/Webservices/VtigerWebserviceObject.php index 23783a98f5beaff4330c88ce7228d5d8d11a5ae4..73581148ac4feb15bf858a7166eef112d39ddae3 100644 --- a/include/Webservices/VtigerWebserviceObject.php +++ b/include/Webservices/VtigerWebserviceObject.php @@ -15,7 +15,8 @@ class VtigerWebserviceObject{ private $handlerPath; private $handlerClass; - private function VtigerWebserviceObject($entityId,$entityName,$handler_path,$handler_class){ + private function __construct($entityId,$entityName,$handler_path,$handler_class) + { $this->id = $entityId; $this->name = $entityName; // Quick Fix to override default Actor class & path (good to update DB itself) @@ -28,6 +29,13 @@ class VtigerWebserviceObject{ $this->handlerClass = $handler_class; } + private function VtigerWebserviceObject($entityId,$entityName,$handler_path,$handler_class){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($entityId,$entityName,$handler_path,$handler_class); + } + // Cache variables to enable result re-use private static $_fromNameCache = array(); diff --git a/include/Webservices/WebServiceError.php b/include/Webservices/WebServiceError.php index 13725b7b366d4088bbd0d7c345f11ca698cf3395..9f8009aba4621429c45f74f1e54a2804a83bff5c 100644 --- a/include/Webservices/WebServiceError.php +++ b/include/Webservices/WebServiceError.php @@ -13,11 +13,17 @@ public $code; public $message; - - function WebServiceException($errCode,$msg){ + function __construct($errCode,$msg) + { $this->code = $errCode; $this->message = $msg; } + function WebServiceException($errCode,$msg){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($errCode,$msg); + } } diff --git a/include/Webservices/WebserviceEntityOperation.php b/include/Webservices/WebserviceEntityOperation.php index d53176a5da3d52f797a2d3434ffa1d43a81defea..876d2d45d8e158ddf39baeb0995b047aab1dc0f8 100644 --- a/include/Webservices/WebserviceEntityOperation.php +++ b/include/Webservices/WebserviceEntityOperation.php @@ -21,12 +21,19 @@ abstract class WebserviceEntityOperation{ protected static $metaCache = array(); - protected function WebserviceEntityOperation($webserviceObject,$user,$adb,$log){ + protected function __construct($webserviceObject,$user,$adb,$log) + { $this->user = $user; $this->log = $log; $this->webserviceObject = $webserviceObject; $this->pearDB = $adb; } + protected function WebserviceEntityOperation($webserviceObject,$user,$adb,$log){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($webserviceObject,$user,$adb,$log); + } public function create($elementType,$element){ throw new WebServiceException(WebServiceErrorCode::$OPERATIONNOTSUPPORTED, diff --git a/include/Webservices/WebserviceField.php b/include/Webservices/WebserviceField.php index 3499c3a190dcbd489e480914b9c7ec8a3fe7570a..57be736e2405e7d4c1535e4d79f212e6188fb1b7 100644 --- a/include/Webservices/WebserviceField.php +++ b/include/Webservices/WebserviceField.php @@ -336,6 +336,7 @@ class WebserviceField{ function getPicklistDetails(){ $cache = Vtiger_Cache::getInstance(); + $fieldName = $this->getFieldName(); if($cache->getPicklistDetails($this->getTabId(),$this->getFieldName())){ return $cache->getPicklistDetails($this->getTabId(),$this->getFieldName()); } else { @@ -346,7 +347,26 @@ class WebserviceField{ foreach ($allRegions as $regionId => $regionDetails) { $picklistDetails[] = array('value' => $regionId, 'label' => $regionDetails['name']); } - } else { + }elseif ($fieldName == 'defaultlandingpage') { + $picklistDetails = array(); + $presence = array(0); + $restrictedModules = array('Webmails', 'Emails', 'Integration', 'Dashboard','ModComments'); + $query = 'SELECT name, tablabel, tabid FROM vtiger_tab WHERE presence IN (' . generateQuestionMarks($presence) . ') AND isentitytype = ? AND name NOT IN (' . generateQuestionMarks($restrictedModules) . ')'; + + $result = $this->pearDB->pquery($query, array($presence, '1', $restrictedModules)); + $numOfRows = $this->pearDB->num_rows($result); + + $picklistDetails[] = array('value' => 'Home', 'label' => vtranslate('Home', 'Home')); + for ($i = 0; $i < $numOfRows; $i++) { + $moduleName = $this->pearDB->query_result($result, $i, 'name'); + + // check the module access permission, if user has permission then show it in default module list + if (vtlib_isModuleActive($moduleName)) { + $moduleLabel = $this->pearDB->query_result($result, $i, 'tablabel'); + $picklistDetails[] = array('value' => $moduleName, 'label' => vtranslate($moduleLabel, $moduleName)); + } + } + } else { $hardCodedPickListNames = array('hdntaxtype','email_flag'); $hardCodedPickListValues = array('hdntaxtype'=> array( array('label' => 'Individual', 'value' => 'individual'), array('label' => 'Group', 'value' => 'group')), diff --git a/include/database/PearDatabase.php b/include/database/PearDatabase.php index 0b7646c23a4a23199c6fbe0d3f9033d68211b73c..fa41139bee6793849e055f7d2b0b9dc662bd7446 100644 --- a/include/database/PearDatabase.php +++ b/include/database/PearDatabase.php @@ -961,10 +961,12 @@ class PearDatabase{ $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); $i=0; - foreach($adoflds as $fld) { - $colNames[$i] = $fld->name; - $i++; - } + if(!empty($adoflds)){ + foreach($adoflds as $fld) { + $colNames[$i] = $fld->name; + $i++; + } + } return $colNames; } diff --git a/include/fields/CurrencyField.php b/include/fields/CurrencyField.php index 5f475df09df174d77c7888d72fdfcd338bddb9f0..44e9a735f9fa38e49a041ba153f3266cf317836b 100644 --- a/include/fields/CurrencyField.php +++ b/include/fields/CurrencyField.php @@ -410,7 +410,7 @@ class CurrencyField { public static function convertToDollar($amount, $conversionRate) { if ($conversionRate == 0) return 0; - return $amount / $conversionRate; + return (float)$amount / (float)$conversionRate; } public static function convertFromDollar($amount, $conversionRate) { diff --git a/include/fields/DateTimeField.php b/include/fields/DateTimeField.php index de2d15fcf64baf70bbb1be5e35858c857b13cfdb..db58cbeab3b289015722a768a9fcd1365169136c 100644 --- a/include/fields/DateTimeField.php +++ b/include/fields/DateTimeField.php @@ -68,15 +68,18 @@ class DateTimeField { public function getFullcalenderDateTimevalue ($user = null) { return $this->getDisplayDate($user) . ' ' . $this->getFullcalenderTime($user); } - /** - * - * @global Users $current_user - * @param type $date - * @param Users $user - * @return type - */ - public static function convertToDBFormat($date, $user = null) { - global $current_user; + + /** + * + * @param string $date + * @param Users $user + * + * @return string + * @global Users $current_user + */ + public static function convertToDBFormat($date, $user = null) + { + global $current_user; if(empty($user)) { $user = $current_user; } @@ -87,21 +90,23 @@ class DateTimeField { } return self::__convertToDBFormat($date, $format); - } - - /** - * - * @param type $date - * @param string $format - * @return string - */ - public static function __convertToDBFormat($date, $format) { - - if ($format == '') { + } + + /** + * + * @param string $date + * @param string $format + * + * @return string + */ + public static function __convertToDBFormat($date, $format) + { + if ($format == '') { $format = 'dd-mm-yyyy'; } $dbDate = ''; - if ($format == 'dd-mm-yyyy') { + $dateFormats = ['dd-mm-yyyy', 'dd/mm/yyyy', 'dd.mm.yyyy']; + if (in_array($format, $dateFormats)) { list($d, $m, $y) = explode('-', $date); } elseif ($format == 'mm-dd-yyyy') { list($m, $d, $y) = explode('-', $date); @@ -115,7 +120,7 @@ class DateTimeField { $dbDate = $y . '-' . $m . '-' . $d; } return $dbDate; - } + } /** * @@ -148,30 +153,56 @@ class DateTimeField { return self::__convertToUserFormat($date, $format); } - /** - * - * @param type $date - * @param type $format - * @return type - */ - public static function __convertToUserFormat($date, $format) { - $date = self::convertToInternalFormat($date); - list($y, $m, $d) = explode('-', $date[0]); - - if ($format == 'dd-mm-yyyy') { - $date[0] = $d . '-' . $m . '-' . $y; - } elseif ($format == 'mm-dd-yyyy') { - $date[0] = $m . '-' . $d . '-' . $y; - } elseif ($format == 'yyyy-mm-dd') { - $date[0] = $y . '-' . $m . '-' . $d; - } - if ($date[1] != '') { - $userDate = $date[0] . ' ' . $date[1]; - } else { - $userDate = $date[0]; - } - return $userDate; - } + /** + * + * @param type $date + * @param type $format + * + * @return string + */ + public static function __convertToUserFormat($date, $format) + { + $date = self::convertToInternalFormat($date); + list($y, $m, $d) = explode('-', $date[0]); + + switch ($format) { + case 'dd.mm.yyyy': + $date[0] = $d . '.' . $m . '.' . $y; + break; + case 'mm.dd.yyyy': + $date[0] = $m . '.' . $d . '.' . $y; + break; + case 'yyyy.mm.dd': + $date[0] = $y . '.' . $m . '.' . $d; + break; + case 'dd/mm/yyyy': + $date[0] = $d . '/' . $m . '/' . $y; + break; + case 'mm/dd/yyyy': + $date[0] = $m . '/' . $d . '/' . $y; + break; + case 'yyyy/mm/dd': + $date[0] = $y . '/' . $m . '/' . $d; + break; + case 'dd-mm-yyyy': + $date[0] = $d . '-' . $m . '-' . $y; + break; + case 'mm-dd-yyyy': + $date[0] = $m . '-' . $d . '-' . $y; + break; + case 'yyyy-mm-dd': + $date[0] = $y . '-' . $m . '-' . $d; + break; + } + + if ($date[1] != '') { + $userDate = $date[0] . ' ' . $date[1]; + } else { + $userDate = $date[0]; + } + + return $userDate; + } /** * @@ -305,18 +336,29 @@ class DateTimeField { $user = $current_user; } - if($user->date_format == 'mm-dd-yyyy') { + $y = false; + $m = false; + $d = false; + $time = false; + + if($user->date_format) { list($date, $time) = explode(' ', $value); if(!empty($date)) { - list($m, $d, $y) = explode('-', $date); - if(strlen($m) < 3) { - $time = ' '.$time; - $value = "$y-$m-$d".rtrim($time); + switch ($user->date_format) { + case 'mm.dd.yyyy': list($m, $d, $y) = explode('.', $date); break; + case 'dd.mm.yyyy': list($d, $m, $y) = explode('.', $date); break; + case 'dd/mm/yyyy': list($d, $m, $y) = explode('/', $date); break; + case 'mm/dd/yyyy': list($d, $m, $y) = explode('/', $date); break; + case 'mm-dd-yyyy': list($m, $d, $y) = explode('-', $date); break; + case 'dd-mm-yyyy': list($d, $m, $y) = explode('-', $date); break; } } + if ($y) { + $value = "$y-$m-$d ".rtrim($time); + } } return $value; } -} +} \ No newline at end of file diff --git a/include/utils/CommonUtils.php b/include/utils/CommonUtils.php index 1ef02a99ab153c2e3632fad41934308ff7ee8733..bc741db18238384d257b0e664dba528293b89b1c 100755 --- a/include/utils/CommonUtils.php +++ b/include/utils/CommonUtils.php @@ -32,8 +32,8 @@ function is_admin($user) { return Vtiger_Functions::userIsAdministrator($user); } -function parse_calendardate($local_format) { - return Vtiger_Functions::currentUserJSDateFormat($local_format); +function parse_calendardate() { + return Vtiger_Functions::currentUserJSDateFormat(); } function from_html($string, $encode = true) { diff --git a/include/utils/EmailTemplate.php b/include/utils/EmailTemplate.php index 4c4b1790c362264deb80ca742fbc2fd23d48bd9d..634ac239feea4535f6999a095ad470953d35ef62 100644 --- a/include/utils/EmailTemplate.php +++ b/include/utils/EmailTemplate.php @@ -66,6 +66,7 @@ class EmailTemplate { public function process($params) { $module = $this->module; $recordId = $this->recordId; + $variableList = array(); $variableList = $this->getTemplateVariableListForModule($module); $handler = vtws_getModuleHandlerFromName($module, $this->user); $meta = $handler->getMeta(); @@ -98,7 +99,7 @@ class EmailTemplate { $baseTable = $meta->getEntityBaseTable(); $tableList[$baseTable] = $baseTable; - if (count($variableList) > 0) { + if (!empty($variableList) && (count($variableList) > 0)) { foreach ($variableList as $column) { if (in_array($column, $allColumnList)) { $fieldList[] = array_search($column, $fieldColumnMapping); diff --git a/include/utils/RecurringType.php b/include/utils/RecurringType.php index 0d2d56a5805ea86c4367298d81ec7a4dab365acf..f7ce0af3c823f62d4d861ca42e931e305c8c90d7 100644 --- a/include/utils/RecurringType.php +++ b/include/utils/RecurringType.php @@ -31,8 +31,9 @@ class RecurringType { * Constructor for class RecurringType * @param array $repeat_arr - array contains recurring info */ - function RecurringType($repeat_arr) { - + function __construct($repeat_arr) + { + $st_date = explode("-", $repeat_arr["startdate"]); $st_time = explode(":", $repeat_arr["starttime"]); $end_date = explode("-", $repeat_arr["enddate"]); @@ -75,6 +76,12 @@ class RecurringType { $this->recurringdates = $this->_getRecurringDates(); } + function RecurringType($repeat_arr) { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($repeat_arr); + } public static function fromUserRequest($requestArray) { // All the information from the user is received in User Time zone diff --git a/include/utils/VtlibUtils.php b/include/utils/VtlibUtils.php index 9f8ba17d2438ffd50425cb69d18190a35aad40c5..94e9b94c233c1b0f57c79050482c7d23fbee3a28 100644 --- a/include/utils/VtlibUtils.php +++ b/include/utils/VtlibUtils.php @@ -158,6 +158,8 @@ function vtlib_toggleModuleAccess($modules, $enable_disable) { } else if($enable_disable === false) { $enable_disable = 1; $event_type = Vtiger_Module::EVENT_MODULE_DISABLED; + //Update default landing page to dashboard if module is disabled. + $adb->pquery('UPDATE vtiger_users SET defaultlandingpage = ? WHERE defaultlandingpage IN(' . generateQuestionMarks($modules) . ')', array_merge(array('Home'), $modules)); } $checkResult = $adb->pquery('SELECT name FROM vtiger_tab WHERE name IN ('. generateQuestionMarks($modules) .')', array($modules)); @@ -657,54 +659,69 @@ $__htmlpurifier_instance = false; * @param Boolean $ignore Skip cleaning of the input * @return String */ -function vtlib_purify($input, $ignore=false) { - global $__htmlpurifier_instance, $root_directory, $default_charset; - - static $purified_cache = array(); - $value = $input; - - if(!is_array($input)) { - $md5OfInput = md5($input); - if (array_key_exists($md5OfInput, $purified_cache)) { - $value = $purified_cache[$md5OfInput]; - //to escape cleaning up again - $ignore = true; - } - } - $use_charset = $default_charset; - $use_root_directory = $root_directory; - - - if(!$ignore) { - // Initialize the instance if it has not yet done - if($__htmlpurifier_instance == false) { - if(empty($use_charset)) $use_charset = 'UTF-8'; - if(empty($use_root_directory)) $use_root_directory = dirname(__FILE__) . '/../..'; - - include_once ('libraries/htmlpurifier/library/HTMLPurifier.auto.php'); - - $config = HTMLPurifier_Config::createDefault(); - $config->set('Core', 'Encoding', $use_charset); - $config->set('Cache', 'SerializerPath', "$use_root_directory/test/vtlib"); - - $__htmlpurifier_instance = new HTMLPurifier($config); - } - if($__htmlpurifier_instance) { - // Composite type - if (is_array($input)) { - $value = array(); - foreach ($input as $k => $v) { - $value[$k] = vtlib_purify($v, $ignore); - } - } else { // Simple type - $value = $__htmlpurifier_instance->purify($input); - $value = purifyHtmlEventAttributes($value); - } - } - $purified_cache[$md5OfInput] = $value; - } - $value = str_replace('&','&',$value); - return $value; +function vtlib_purify($input, $ignore = false) { + global $__htmlpurifier_instance, $root_directory, $default_charset; + + static $purified_cache = array(); + $value = $input; + + if (!is_array($input)) { + $md5OfInput = md5($input); + if (array_key_exists($md5OfInput, $purified_cache)) { + $value = $purified_cache[$md5OfInput]; + //to escape cleaning up again + $ignore = true; + } + } + $use_charset = $default_charset; + $use_root_directory = $root_directory; + + + if (!$ignore) { + // Initialize the instance if it has not yet done + if ($__htmlpurifier_instance == false) { + if (empty($use_charset)) + $use_charset = 'UTF-8'; + if (empty($use_root_directory)) + $use_root_directory = dirname(__FILE__) . '/../..'; + + $allowedSchemes = array( + 'http' => true, + 'https' => true, + 'mailto' => true, + 'ftp' => true, + 'nntp' => true, + 'news' => true, + 'data' => true + ); + + include_once ('libraries/htmlpurifier410/library/HTMLPurifier.auto.php'); + + $config = HTMLPurifier_Config::createDefault(); + $config->set('Core.Encoding', $use_charset); + $config->set('Cache.SerializerPath', "$use_root_directory/test/vtlib"); + $config->set('CSS.AllowTricky', true); + $config->set('URI.AllowedSchemes', $allowedSchemes); + $config->set('Attr.EnableID', true); + + $__htmlpurifier_instance = new HTMLPurifier($config); + } + if ($__htmlpurifier_instance) { + // Composite type + if (is_array($input)) { + $value = array(); + foreach ($input as $k => $v) { + $value[$k] = vtlib_purify($v, $ignore); + } + } else { // Simple type + $value = $__htmlpurifier_instance->purify($input); + $value = purifyHtmlEventAttributes($value, true); + } + } + $purified_cache[$md5OfInput] = $value; + } + $value = str_replace('&', '&', $value); + return $value; } /** @@ -712,16 +729,36 @@ function vtlib_purify($input, $ignore=false) { * @param <String> $value * @return <String> */ -function purifyHtmlEventAttributes($value){ - $htmlEventAttributes = "onerror|onblur|onchange|oncontextmenu|onfocus|oninput|oninvalid|". - "onreset|onsearch|onselect|onsubmit|onkeydown|onkeypress|onkeyup|". - "onclick|ondblclick|ondrag|ondragend|ondragenter|ondragleave|ondragover|". - "ondragstart|ondrop|onmousedown|onmousemove|onmouseout|onmouseover|". - "onmouseup|onmousewheel|onscroll|onwheel|oncopy|oncut|onpaste"; - if(preg_match("/\s*(".$htmlEventAttributes.")\s*=/i", $value)) { - $value = str_replace("=", "=", $value); - } - return $value; +function purifyHtmlEventAttributes($value, $replaceAll = false) { + $htmlEventAttributes = "onerror|onblur|onchange|oncontextmenu|onfocus|oninput|oninvalid|onresize|onauxclick|oncancel|oncanplay|oncanplaythrough|" . + "onreset|onsearch|onselect|onsubmit|onkeydown|onkeypress|onkeyup|onclose|oncuechange|ondurationchange|onemptied|onended|" . + "onclick|ondblclick|ondrag|ondragend|ondragenter|ondragleave|ondragover|ondragexit|onformdata|onloadeddata|onloadedmetadata|" . + "ondragstart|ondrop|onmousedown|onmousemove|onmouseout|onmouseover|onmouseenter|onmouseleave|onpause|onplay|onplaying|" . + "onmouseup|onmousewheel|onscroll|onwheel|oncopy|oncut|onpaste|onload|onprogress|onratechange|onsecuritypolicyviolation|" . + "onselectionchange|onabort|onselectstart|onstart|onfinish|onloadstart|onshow|onreadystatechange|onseeked|onslotchange|" . + "onseeking|onstalled|onsubmit|onsuspend|ontimeupdate|ontoggle|onvolumechange|onwaiting|onwebkitanimationend|onstorage|" . + "onwebkitanimationiteration|onwebkitanimationstart|onwebkittransitionend|onafterprint|onbeforeprint|onbeforeunload|" . + "onhashchange|onlanguagechange|onmessage|onmessageerror|onoffline|ononline|onpagehide|onpageshow|onpopstate|onunload" . + "onrejectionhandled|onunhandledrejection|onloadend"; + + // remove malicious html attributes with its value. + if ($replaceAll) { + $regex = '\s*[=&%#]\s*(?:"[^"]*"[\'"]*|\'[^\']*\'[\'"]*|[^]*[\s\/>])*/i'; + $value = preg_replace("/\s*(" . $htmlEventAttributes . ")" . $regex, '', $value); + + /** + * If anchor tag having 'javascript:' string then remove the tag contents. + * Right now, we fixed this for anchor tag as we don't see any other such things right now. + * All other event attributes are already handled above. Need to update this if any thing new found + */ + $javaScriptRegex = '/<a [^>]*(j[\s]?a[\s]?v[\s]?a[\s]?s[\s]?c[\s]?r[\s]?i[\s]?p[\s]?t[\s]*[=&%#:])[^>]*?>/i'; + $value = preg_replace($javaScriptRegex, '<a>', $value); + } else { + if (preg_match("/\s*(" . $htmlEventAttributes . ")\s*=/i", $value)) { + $value = str_replace("=", "=", $value); + } + } + return $value; } /** diff --git a/include/utils/export.php b/include/utils/export.php index 41720fbd11fadaf66df762a3dd9a84a848a75edd..0fb897570e82686e5bff15106e77a6a89f4442b9 100755 --- a/include/utils/export.php +++ b/include/utils/export.php @@ -276,9 +276,16 @@ class ExportUtils{ var $fieldsArr = array(); var $picklistValues = array(); - function ExportUtils($module, $fields_array){ + function __construct($module, $fields_array) + { self::__init($module, $fields_array); } + function ExportUtils($module, $fields_array){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($module, $fields_array); + } function __init($module, $fields_array){ diff --git a/include/utils/utils.php b/include/utils/utils.php index 1ccbf5d6d7f4088c32daee7ab7625e7dbf7ac127..a5a4e1b4afc5a9cae97a69f0c1d846f638b11bab 100755 --- a/include/utils/utils.php +++ b/include/utils/utils.php @@ -214,7 +214,7 @@ function get_group_array($add_blank=true, $status="Active", $assigned_user="",$p $query .= " WHERE groupid=?"; $params = array( $current_user->id); - if(count($current_user_groups) != 0) { + if(!empty($current_user_groups) && (count($current_user_groups) != 0)) { $query .= " OR vtiger_groups.groupid in (".generateQuestionMarks($current_user_groups).")"; array_push($params, $current_user_groups); } @@ -222,7 +222,7 @@ function get_group_array($add_blank=true, $status="Active", $assigned_user="",$p $query .= " union select vtiger_group2role.groupid as groupid,vtiger_groups.groupname as groupname from vtiger_group2role inner join vtiger_groups on vtiger_groups.groupid=vtiger_group2role.groupid inner join vtiger_role on vtiger_role.roleid=vtiger_group2role.roleid where vtiger_role.parentrole like ?"; array_push($params, $current_user_parent_role_seq."::%"); - if(count($current_user_groups) != 0) { + if(!empty($current_user_groups) && (count($current_user_groups) != 0)) { $query .= " union select vtiger_groups.groupid as groupid,vtiger_groups.groupname as groupname from vtiger_groups inner join vtiger_group2rs on vtiger_groups.groupid=vtiger_group2rs.groupid where vtiger_group2rs.roleandsubid in (".generateQuestionMarks($parent_roles).")"; array_push($params, $parent_roles); } @@ -1217,7 +1217,7 @@ function getAccessPickListValues($module) $roleid = $current_user->roleid; $subrole = getRoleSubordinates($roleid); - if(count($subrole)> 0) + if(!empty($subrole) && (count($subrole)> 0)) { $roleids = $subrole; array_push($roleids, $roleid); @@ -1238,7 +1238,7 @@ function getAccessPickListValues($module) $keyvalue = $columnname; $fieldvalues = Array(); - if (count($roleids) > 1) + if (!empty($roleids) && (count($roleids) > 1)) { $mulsel="select distinct $fieldname from vtiger_$fieldname inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_$fieldname.picklist_valueid where roleid in (\"". implode($roleids,"\",\"") ."\") and picklistid in (select picklistid from vtiger_$fieldname) order by sortid asc"; } @@ -1376,7 +1376,7 @@ function transferProductCurrency($old_cur, $new_cur) { for($i=0;$i<$numRows;$i++) { $prod_ids[] = $adb->query_result($prod_res,$i,'productid'); } - if(count($prod_ids) > 0) { + if(!empty($prod_ids) && (count($prod_ids) > 0)) { $prod_price_list = getPricesForProducts($new_cur,$prod_ids); for($i=0;$i<count($prod_ids);$i++) { @@ -1402,7 +1402,7 @@ function transferPriceBookCurrency($old_cur, $new_cur) { $pb_ids[] = $adb->query_result($pb_res,$i,'pricebookid'); } - if(count($pb_ids) > 0) { + if(!empty($pb_ids) && (count($pb_ids) > 0)) { require_once('modules/PriceBooks/PriceBooks.php'); for($i=0;$i<count($pb_ids);$i++) { @@ -1429,7 +1429,7 @@ function transferServicesCurrency($old_cur, $new_cur) { for ($i = 0; $i < $numRows; $i++) { $ser_ids[] = $adb->query_result($ser_res, $i, 'serviceid'); } - if (count($ser_ids) > 0) { + if (!empty($ser_ids) && (count($ser_ids) > 0)) { $ser_price_list = getPricesForProducts($new_cur, $ser_ids, 'Services'); for ($i = 0; $i < count($ser_ids); $i++) { $service_id = $ser_ids[$i]; @@ -1597,7 +1597,7 @@ function getRelationTables($module,$secmodule){ } } }else { - if(method_exists($primary_obj,setRelationTables)){ + if(method_exists($primary_obj,'setRelationTables')){ $reltables = $primary_obj->setRelationTables($secmodule); } else { $reltables = ''; @@ -1632,11 +1632,18 @@ function DeleteEntity($module,$return_module,$focus,$record,$return_id) { * Function to related two records of different entity types */ function relateEntities($focus, $sourceModule, $sourceRecordId, $destinationModule, $destinationRecordIds) { + $db = PearDatabase::getInstance(); + $em = new VTEventsManager($db); + $data = array('sourceModule'=>$sourceModule, 'sourceRecordId'=>$sourceRecordId, + 'destinationModule'=>$destinationModule,'destinationRecordIds'=>$destinationRecordIds); + $em->triggerEvent("vtiger.entity.beforerelate", $data); if(!is_array($destinationRecordIds)) $destinationRecordIds = Array($destinationRecordIds); foreach($destinationRecordIds as $destinationRecordId) { $focus->save_related_module($sourceModule, $sourceRecordId, $destinationModule, $destinationRecordId); $focus->trackLinkedInfo($sourceModule, $sourceRecordId, $destinationModule, $destinationRecordId); } + + $em->triggerEvent("vtiger.entity.afterrelate", $data); } /** @@ -1819,7 +1826,8 @@ function getValidDBInsertDateValue($value) { function getValidDBInsertDateTimeValue($value) { $value = trim($value); $valueList = explode(' ',$value); - if(count($valueList) == 2) { + //checking array count = 3 if datatime format is 12hr. + if(is_array($valueList) && (count($valueList) == 2 || count($valueList) == 3)) { $dbDateValue = getValidDBInsertDateValue($valueList[0]); $dbTimeValue = $valueList[1]; if(!empty($dbTimeValue) && strpos($dbTimeValue, ':') === false) { @@ -1835,7 +1843,7 @@ function getValidDBInsertDateTimeValue($value) { } catch (Exception $ex) { return ''; } - } elseif(count($valueList == 1)) { + } elseif(is_array($valueList) && count($valueList) == 1) { return getValidDBInsertDateValue($value); } } @@ -2422,7 +2430,7 @@ function getRecordGroupId($record) { */ function deleteRecordFromDetailViewNavigationRecords($recordId, $cvId, $moduleName) { $recordNavigationInfo = Zend_Json::decode($_SESSION[$moduleName . '_DetailView_Navigation' . $cvId]); - if (count($recordNavigationInfo) != 0) { + if (!empty($recordNavigationInfo) && (count($recordNavigationInfo) != 0)) { foreach ($recordNavigationInfo as $key => $recordIdList) { $recordIdList = array_diff($recordIdList, array($recordId)); $recordNavigationInfo[$key] = $recordIdList; diff --git a/includes/main/WebUI.php b/includes/main/WebUI.php index bbc6e0aaf928ea146af2104af3158c365e7d1823..96ba9788ff8f6d16ef97ced54008bdfc2335f521 100644 --- a/includes/main/WebUI.php +++ b/includes/main/WebUI.php @@ -151,7 +151,7 @@ class Vtiger_WebUI extends Vtiger_EntryPoint { if(empty($module)) { if ($this->hasLogin()) { - $defaultModule = vglobal('default_module'); + $defaultModule = $currentUser->defaultlandingpage; $moduleModel = Vtiger_Module_Model::getInstance($defaultModule); if(!empty($defaultModule) && $defaultModule != 'Home' && $moduleModel && $moduleModel->isActive()) { $module = $defaultModule; $qualifiedModuleName = $defaultModule; $view = 'List'; diff --git a/includes/runtime/Controller.php b/includes/runtime/Controller.php index dee9aa491115a833b9a97920753e170bd26f84f3..4d55354afd24b28b9230e1617a0db0aa9e6d9b8c 100644 --- a/includes/runtime/Controller.php +++ b/includes/runtime/Controller.php @@ -111,27 +111,38 @@ abstract class Vtiger_Action_Controller extends Vtiger_Controller { function requiresPermission(Vtiger_Request $request) { return array(); } - - function checkPermission(Vtiger_Request $request) { - $permissions = $this->requiresPermission($request); - foreach($permissions as $permission) { - if(array_key_exists('module_parameter', $permission)){ - $moduleParameter = $request->get($permission['module_parameter']); - }else{ - $moduleParameter = 'module'; - } - if(array_key_exists('record_parameter', $permission)){ - $recordParameter = $request->get($permission['record_parameter']); - }else{ - $recordParameter = ''; - } - if(!Users_Privileges_Model::isPermitted($moduleParameter, $permission['action'], $recordParameter)) { - throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); - } - if(Vtiger_Runtime::isRestricted('modules',$moduleParameter)){} - } - return true; - } + + /** + * @param Vtiger_Request $request + * + * @return bool + * @throws AppException + */ + function checkPermission(Vtiger_Request $request) + { + $permissions = $this->requiresPermission($request); + foreach ($permissions as $permission) { + if (array_key_exists('module_parameter', $permission)) { + if ($request->has($permission['module_parameter']) && !empty($request->get($permission['module_parameter']))) { + $moduleParameter = $request->get($permission['module_parameter']); + } elseif ($request->has('record') && !empty($request->get('record'))) { + $moduleParameter = getSalesEntityType($request->get('record')); + } + } else { + $moduleParameter = 'module'; + } + if (array_key_exists('record_parameter', $permission)) { + $recordParameter = $request->get($permission['record_parameter']); + } else { + $recordParameter = ''; + } + if (!Users_Privileges_Model::isPermitted($moduleParameter, $permission['action'], $recordParameter)) { + throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); + } + } + + return true; + } } /** diff --git a/includes/runtime/LanguageHandler.php b/includes/runtime/LanguageHandler.php index e2a993f87b5dd57bf395da113e720df44770c41e..d55734f3422649c5e8ddc2b4fd0b3e9445f39383 100644 --- a/includes/runtime/LanguageHandler.php +++ b/includes/runtime/LanguageHandler.php @@ -133,6 +133,16 @@ class Vtiger_Language_Handler { self::$languageContainer[$language][$module]['jsLanguageStrings'] = $jsLanguageStrings; } } + // add custom translation for module from language/custom/$language/$module.php file + $qualifiedCustomName = 'languages.custom.'.$language.'.'.$module; + $file = Vtiger_Loader::resolveNameToPath($qualifiedCustomName); + + $languageStrings = $jsLanguageStrings = array(); + if(file_exists($file)){ + require $file; + self::$languageContainer[$language][$module]['languageStrings'] = array_merge(self::$languageContainer[$language][$module]['languageStrings'],$languageStrings); + self::$languageContainer[$language][$module]['jsLanguageStrings'] = array_merge(self::$languageContainer[$language][$module]['jsLanguageStrings'],$jsLanguageStrings); + } $return = array(); if(isset(self::$languageContainer[$language][$module])){ $return = self::$languageContainer[$language][$module]; @@ -233,11 +243,30 @@ class Vtiger_Language_Handler { } function vtranslate($key, $moduleName = '') { - $args = func_get_args(); + $unformattedArgs = func_get_args(); + if(count($unformattedArgs) > 2){ + // slice an array by taking first 2 values into another array. + $formattedArgs = array_slice($unformattedArgs,0,2); + // Make third value as empty + $formattedArgs['2'] = ''; + $sliced_part = array_slice($unformattedArgs,2); + foreach ($sliced_part as $key => $value) { + array_push($formattedArgs,$value); + } + $args = $formattedArgs; + } else { + $args = $unformattedArgs; + } $formattedString = call_user_func_array(array('Vtiger_Language_Handler', 'getTranslatedString'), $args); - array_shift($args); - array_shift($args); - if (is_array($args) && !empty($args)) { + + if(count($unformattedArgs) > 2){ + // Remove first three values from an array (key,modulename,languagecode) + array_shift($args); array_shift($args);array_shift($args); + } else { + // Remove first two values from an array (key,modulename) + array_shift($args); array_shift($args); + } + if(is_array($args) && !empty($args)) { $formattedString = call_user_func_array('vsprintf', array($formattedString, $args)); } return $formattedString; diff --git a/includes/runtime/Viewer.php b/includes/runtime/Viewer.php index 73d43351d50d99e21d2870cd96cc7ad912aaa55d..00dd62d0ed09d6dd7403a2434aecad12eff18b2a 100644 --- a/includes/runtime/Viewer.php +++ b/includes/runtime/Viewer.php @@ -144,7 +144,7 @@ class Vtiger_Viewer extends SmartyBC { public function assign($tpl_var, $value = null, $nocache = false) { // Reject unexpected value assignments. if ($tpl_var == 'SELECTED_MENU_CATEGORY') { - if ($val && preg_match("/[^a-zA-Z0-9_-]/", $val, $m)) { + if ($value && preg_match("/[^a-zA-Z0-9_-]/", $value, $m)) { return; } } diff --git a/kcfinder/core/browser.php b/kcfinder/core/browser.php index f429fd9c43a28917429fe40506c645ec4ac662cb..e292bf842cfc872c261cd9d67861a0f91257c8b0 100644 --- a/kcfinder/core/browser.php +++ b/kcfinder/core/browser.php @@ -262,7 +262,8 @@ class browser extends uploader { $this->errorMsg($message); } - $target = "$dir/" . file::getInexistantFilename($this->file['name'], $dir); + $sanitizedFilename = file::sanitizeFileName($this->file['name']); + $target = "$dir/" . file::getInexistantFilename($sanitizedFilename, $dir); if (!@move_uploaded_file($this->file['tmp_name'], $target) && !@rename($this->file['tmp_name'], $target) && diff --git a/kcfinder/core/uploader.php b/kcfinder/core/uploader.php index 736708aec6e2dae71c4b59d70b62c2d38f894bcd..510033569bdb45338981cf86642af983af8641f8 100644 --- a/kcfinder/core/uploader.php +++ b/kcfinder/core/uploader.php @@ -45,9 +45,20 @@ class uploader { // INPUT INIT $input = new input(); - $this->get = &$input->get; - $this->post = &$input->post; - $this->cookie = &$input->cookie; + $inputGet = &$input->get ; + foreach ($inputGet as $key => $value) { + $this->get[$key] = vtlib_purify($value); + } + + $inputPost= &$input->post; + foreach ($inputPost as $key => $value) { + $this->post[$key] = vtlib_purify($value); + } + + $inputCookie= &$input->cookie; + foreach ($inputCookie as $key => $value) { + $this->cookie[$key] = vtlib_purify($value); + } // LINKING UPLOADED FILE if (count($_FILES)) @@ -86,6 +97,7 @@ class uploader { $this->types = &$this->config['types']; $firstType = array_keys($this->types); $firstType = $firstType[0]; + $this->get['type'] = "images"; // to allow images upload only $this->type = ( isset($this->get['type']) && isset($this->types[$this->get['type']]) @@ -202,7 +214,8 @@ class uploader { if (!is_dir(path::normalize($dir))) @mkdir(path::normalize($dir), $this->config['dirPerms'], true); - $target = file::getInexistantFilename("$dir{$file['name']}"); + $sanitizedFilename = file::sanitizeFileName($file['name']); + $target = file::getInexistantFilename("$dir{$sanitizedFilename}"); if (!@move_uploaded_file($file['tmp_name'], $target) && !@rename($file['tmp_name'], $target) && @@ -290,6 +303,14 @@ class uploader { if (!$gd->init_error && !$this->imageResize($gd, $file['tmp_name'])) return $this->label("The image is too big and/or cannot be resized."); + //sanitization as per Vtiger standard + $isValidImage = Vtiger_Functions::validateImage($file); + if (is_string($isValidImage)) + $isValidImage = ($isValidImage == 'false') ? false : true; + if (!$isValidImage) { + return $this->label("Denied file extension."); + } + return true; } @@ -448,6 +469,10 @@ class uploader { $CKfuncNum = isset($this->opener['CKEditor']['funcNum']) ? $this->opener['CKEditor']['funcNum'] : 0; if (!$CKfuncNum) $CKfuncNum = 0; + if(!is_numeric($CKfuncNum)){ + $CKfuncNum = 0; // to prevent xss + } + $url = addcslashes($url, "'"); header("Content-Type: text/html; charset={$this->charset}"); ?><html> diff --git a/kcfinder/js/browser/files.js b/kcfinder/js/browser/files.js index 3d85061029dc6fe3b954769b4523f2415400c1d6..dfcac7efd1a2d7ba7508ac2b02b1d86e859c28a4 100644 --- a/kcfinder/js/browser/files.js +++ b/kcfinder/js/browser/files.js @@ -137,14 +137,14 @@ browser.selectFile = function(file, e) { $('#fileinfo').html(files.length + ' ' + this.label("selected files") + ' (' + size + ')'); else { var data = $(files[0]).data(); - $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); + $('#fileinfo').text(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); } } } else { var data = file.data(); $('.file').removeClass('selected'); file.addClass('selected'); - $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); + $('#fileinfo').text(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); } }; @@ -378,7 +378,7 @@ browser.menuFile = function(file, e) { html += '<div class="menu">'; $('.file').removeClass('selected'); file.addClass('selected'); - $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); + $('#fileinfo').text(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')'); if (this.opener.callBack || this.opener.callBackMultiple) { html += '<a href="kcact:pick">' + this.label("Select") + '</a>'; if (data.thumb) html += diff --git a/kcfinder/lib/helper_file.php b/kcfinder/lib/helper_file.php index 7facb100bcc9e66af02d0d97216f94910fdc7fb5..54ea6955e8ec10221810b1def5027a15a54c144c 100644 --- a/kcfinder/lib/helper_file.php +++ b/kcfinder/lib/helper_file.php @@ -196,7 +196,17 @@ class file { ? "$fdir/" . basename($file) : basename($file)); } - + + static function sanitizeFileName($filename){ + $sanitizedFilename = vtlib_purify($filename); + $sanitizedFilename = str_replace('/', "", $sanitizedFilename); + $sanitizedFilename = str_replace('"', "", $sanitizedFilename); + $sanitizedFilename = str_replace("'", "", $sanitizedFilename); + $sanitizedFilename = str_replace(' ', "", $sanitizedFilename); + $sanitizedFilename = str_replace('=', "", $sanitizedFilename); + $sanitizedFilename = str_replace('<', "", $sanitizedFilename); + $sanitizedFilename = str_replace('>', "", $sanitizedFilename); + return $sanitizedFilename; + } } - ?> \ No newline at end of file diff --git a/languages/en_us/Settings/Workflows.php b/languages/en_us/Settings/Workflows.php index 4c7af094339bcd6ee353a695fd460dfe3c3e0c7c..953e5a35a9edd3965f93ec0452004aab28fd10c1 100644 --- a/languages/en_us/Settings/Workflows.php +++ b/languages/en_us/Settings/Workflows.php @@ -151,6 +151,48 @@ $languageStrings = array( 'LBL_VTPushNotificationTask' => 'Mobile Notification', 'LBL_VTCreateEntityTask' => 'Create Record', 'LBL_MAX_SCHEDULED_WORKFLOWS_EXCEEDED' => 'Maximum number(%s) of scheduled workflows has been exceeded', + + 'is' => 'is %s', + 'contains' => 'contains %s', + 'does not contain' => 'does not contain %s', + 'starts with' => 'starts with %s', + 'ends with' => 'ends with %s', + 'has changed' => 'has changed', + 'is empty' => 'is empty', + 'is not empty' => 'is not empty', + 'equal to' => 'equal to %s', + 'less than' => 'less than %s', + 'greater than' => 'greater than %s', + 'does not equal' => 'does not equal %s', + 'less than or equal to' => 'less than or equal to %s', + 'greater than or equal to' => 'greater than or equal to %s', + 'is not' => 'is not %s', + 'has changed to' => 'has changed to %s', + 'has changed from' => 'has changed from %s', + 'before' => 'before %s', + 'after' => 'after %s', + 'is today' => 'is today', + 'is tomorrow' => 'is tomorrow', + 'is yesterday' => 'is yesterday', + 'previous month' => 'previous month', + 'current month' => 'current month', + 'next month' => 'next month', + 'less than days ago' => 'less than %s days ago', + 'less than days later' => 'less than %s days later', + 'more than days ago' => 'more than %s days ago', + 'more than days later' => 'more than %s days later', + 'days ago' => '%s days ago', + 'days later' => '%s days later', + 'between' => 'between %s', + 'in less than' => 'in less than %s', + 'in more than' => 'in more than %s', + 'is added' => 'is added', + 'week days later' => '%s week days later', + 'more than week days later' => 'more than %s week days later', + 'less than week days later' => 'less than %s week days later', + 'week days ago' => '%s week days ago', + 'more than week days ago' => 'more than %s week days ago', + 'less than week days ago' => 'less than %s week days ago', ); $jsLanguageStrings = array( diff --git a/languages/en_us/Vtiger.php b/languages/en_us/Vtiger.php index 147fcf73f122f87e6c8ee308fe1176819e23061d..6d0caecee296a588c379b49ebdba50049328d54f 100644 --- a/languages/en_us/Vtiger.php +++ b/languages/en_us/Vtiger.php @@ -1937,4 +1937,7 @@ $jsLanguageStrings = array( 'LBL_LIST_DELETE_CONFIRMATION' => 'Are you sure you want to delete?', 'JS_WIDGET_RESIZING_WAIT_MSG' => 'Widget contents will load after resizing.', 'JS_COPIED_SUCCESSFULLY' => 'Copied successfully', + 'JS_ATLEAST_SELECT_ONE_FIELD' => 'At least one field should be selected', + 'JS_RELATED_ACCOUNT_IS_NOT_AVAILABLE' => 'Related Organization record is not available', + 'JS_RELATED_CONTACT_IS_NOT_AVAILABLE' => 'Related Contact record is not available', ); diff --git a/layouts/v7/lib/jquery/Lightweight-jQuery-In-page-Filtering-Plugin-instaFilta/demo.html b/layouts/v7/lib/jquery/Lightweight-jQuery-In-page-Filtering-Plugin-instaFilta/demo.html deleted file mode 100644 index 214e7fe9447fa38847ccf29440d60aac738fc8bf..0000000000000000000000000000000000000000 --- a/layouts/v7/lib/jquery/Lightweight-jQuery-In-page-Filtering-Plugin-instaFilta/demo.html +++ /dev/null @@ -1,515 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width"> - <title>instaFilta in-page filtering plugin</title> - <link rel="stylesheet" type="text/css" href="demo.css"> -</head> -<body> - - <header class="header padded-content"> - <h1 class="site-title">instaFilta</h1> - <em class="header-description">instaFilta is a fast and highly customizable in-page filtering jQuery plugin.</em> - </header> - - <main class="main"> - - <section class="section"> - - <div class="padded-content-h"> - <h2 class="section-title">Introduction</h2> - </div> - - <div class="l-1-2"> - <div class="padded-content-h"> - <p>Imagine that you are developing a page that has a huge list or table of data that is being generated by the server. Now imagine that you are an end-user that needs to scroll through all that data in order to find what is needed. This is where instaFilta can greatly improve that experience by filtering out unwanted items in real-time as the user types in a text field.<br>That's pretty much it.</p> - <p>Oh, and it has a whole bunch of options available for you to customize that experince to your liking.</p> - </div> - </div> - <div class="box l-1-2"> - <p>This demo page is meant to give you a quick idea if instaFilta is the right plugin for your project. Have you already decided? Great! Then you might want to get into the nitty gritty details. You will find everything you need on the instaFilta GitHub page.</p> - <a class="btn btn-prominent" href="https://github.com/chromawoods/instaFilta/" target="_blank">Technical documentation and download</a> - </div> - </section> - - <section class="section"> - <div class="padded-content-h"> - <h2 class="section-title">Table of contents</h2> - <ol> - <li><a href="#s1">A simple example</a></li> - <li><a href="#s2">Target ALL the things!</a></li> - <li><a href="#s3">Character casing and custom target classes</a></li> - <li><a href="#s4">Highlighting matching characters</li> - <li><a href="#s5">Only match the beginning of a word</a></li> - <li><a href="#s6">Using sections of lists</a></li> - <li><a href="#s7">onFilterComplete returns matched hits</a></li> - <li><a href="#s8">Categorize/tag items</a></li> - <li><a href="#s9">Yes, checkboxes!!</a></li> - <li><a href="#s10">All or nothing</a></li> - </ol> - </div> - </section> - - <section class="section" id="s1"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">A simple example</h2> - <p>The following shows an example of using instaFilta's default options. You simply apply the instaFilta function on a text field.</p> - <p>Try it out by entering some text in the input field above the target list. The plugin will bind to any elements having the CSS class <em>instafilta-target</em> and it will ignore character casing. As we will see in other examples, all of this can be customized through the plugin's options.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex1"> - <fieldset class="controls"> - <input type="text" id="ex1f" placeholder="Type here to filter"> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Carbon</span></li> - <li><span class="instafilta-target">Cobalt</span></li> - <li><span class="instafilta-target">Copper</span></li> - <li><span class="instafilta-target">Gallium</span></li> - <li><span class="instafilta-target">Gold</span></li> - <li><span class="instafilta-target">Hafnium</span></li> - <li><span class="instafilta-target">Iridium</span></li> - <li><span class="instafilta-target">Xenon</span></li> - </ul> - </div> - <pre class="box box-code"> -$('#my-input-field').instaFilta();</pre> - </div> - </section> - - <section class="section" id="s2"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Target ALL the things!</h2> - <p>The plugin will look for <em>any</em> text inside an element having the instafilta-target class. In this example, not only can you filter on these important people's names, you can also filter on the year they were born.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex2"> - <fieldset class="controls"> - <input type="text" id="ex2f" placeholder="Type here to filter"> - </fieldset> - <table> - <thead> - <tr> - <th>Name</th><th>Born</th> - </tr> - </thead> - <tbody> - <tr class="instafilta-target"> - <td>Albert Einstein</td> - <td>1879</td> - </tr> - <tr class="instafilta-target"> - <td>Marie Curie</td> - <td>1867</td> - </tr> - <tr class="instafilta-target"> - <td>Isaac Newton</td> - <td>1643</td> - </tr> - <tr class="instafilta-target"> - <td>Henry Cavendish</td> - <td>1731</td> - </tr> - <tr class="instafilta-target"> - <td>Edwin Hubble</td> - <td>1889</td> - </tr> - </tbody> - </table> - </div> - <pre class="box box-code"> -<tr class="instafilta-target"> - <td>Albert Einstein</td> - <td>1879</td> -</tr></pre> - </div> - </section> - - <section class="section" id="s3"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Character casing and custom target classes</h2> - <p>In this example, the filtering term must match the character casing of the target elements. The plugin will not match "mars" but it will match "Mars".</p> - <p>Also note that we can use a custom CSS class for our targets, if you need to adhere to naming conventions.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex3"> - <fieldset class="controls"> - <input type="text" id="ex3f" placeholder="Type here to filter"> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="planet-name">Mercury</span></li> - <li><span class="planet-name">Venus</span></li> - <li><span class="planet-name">Tellus</span></li> - <li><span class="planet-name">Mars</span></li> - <li><span class="planet-name">Jupiter</span></li> - <li><span class="planet-name">Saturn</span></li> - <li><span class="planet-name">Uranus</span></li> - <li><span class="planet-name">Neptune</span></li> - </ul> - </div> - <pre class="box box-code"> -$('#my-input-field').instaFilta({ - targets: '.planet-name', - caseSensitive: true -});</pre> - </div> - </section> - - <section class="section" id="s4"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Highlighting matching characters</h2> - <p>By setting the <em>markMatches</em> option to <em>true</em>, you can highlight the matching text within the matching items in the list. The matching characters will get wrapped in a <em>span</em> element that has the <em>instafilta-match</em> CSS class. You can change this class by setting the <em>matchCssClass</em> option.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex4"> - <fieldset class="controls"> - <input type="text" id="ex4f" placeholder="Type here to filter"> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Superman</span></li> - <li><span class="instafilta-target">Wonderwoman</span></li> - <li><span class="instafilta-target">Batman</span></li> - <li><span class="instafilta-target">Spiderman</span></li> - <li><span class="instafilta-target">The Hulk</span></li> - <li><span class="instafilta-target">The Green Lantern</span></li> - <li><span class="instafilta-target">Elektra</span></li> - <li><span class="instafilta-target">Ant Man</span></li> - </ul> - </div> - <pre class="box box-code"> -$('#my-input-field').instaFilta({ - markMatches: true -});</pre> - </div> - </section> - - <section class="section" id="s5"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Only match the beginning of a word</h2> - <p>Easy! Just set the <em>beginsWith</em> option to <em>true</em>.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex5"> - <fieldset class="controls"> - <input type="text" id="ex5f" placeholder="Type here to filter"> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Bald Bull</span></li> - <li><span class="instafilta-target">Soda Popinski</span></li> - <li><span class="instafilta-target">Don Flamenco</span></li> - <li><span class="instafilta-target">Mike</span></li> - </ul> - </div> - <pre class="box box-code"> -$('#my-input-field').instaFilta({ - beginsWith: true -});</pre> - </div> - </section> - - <section class="section" id="s6"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Using sections of lists</h2> - <p>Many times, a large list of data will be grouped in some way. A group will typically contain a heading and perhaps more stuff. This example of animals is grouped by <a href="http://en.wikipedia.org/wiki/Class_(biology)" target="_blank">class</a>, which is the heading for each group.</p> - <p>When filtering such a list, you probably want to hide the entire section, including heading etc. Just set the <em>instafilta-section</em> CSS class on the containing section element. That's it! And, you can of course customize that class name using the <em>sections</em> option.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex6"> - <fieldset class="controls"> - <input type="text" id="ex6f" placeholder="Type here to filter"> - </fieldset> - <div class="instafilta-section"> - <span class="example-section-title">Mammals</span> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Bear</span></li> - <li><span class="instafilta-target">Badger</span></li> - <li><span class="instafilta-target">Moose</span></li> - <li><span class="instafilta-target">Hedgehog</span></li> - <li><span class="instafilta-target">Tiger</span></li> - <li><span class="instafilta-target">Orangutan</span></li> - <li><span class="instafilta-target">Wombat</span></li> - <li><span class="instafilta-target">Blue Whale</span></li> - </ul> - </div> - <div class="instafilta-section"> - <span class="example-section-title">Reptiles</span> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Snapping Turtle</span></li> - <li><span class="instafilta-target">Nile Crocodile</span></li> - <li><span class="instafilta-target">Tiger Snake</span></li> - <li><span class="instafilta-target">Green Iguana</span></li> - <li><span class="instafilta-target">Alligator</span></li> - <li><span class="instafilta-target">Chameleon</span></li> - <li><span class="instafilta-target">Gekko</span></li> - <li><span class="instafilta-target">Black Mamba</span></li> - </ul> - </div> - <div class="instafilta-section"> - <span class="example-section-title">Birds</span> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Ostrich</span></li> - <li><span class="instafilta-target">Atlantic Puffin</span></li> - <li><span class="instafilta-target">Flamingo</span></li> - <li><span class="instafilta-target">Hummingbird</span></li> - <li><span class="instafilta-target">Penguin</span></li> - <li><span class="instafilta-target">Albatross</span></li> - <li><span class="instafilta-target">Toucan</span></li> - <li><span class="instafilta-target">Mandarin Duck</span></li> - </ul> - </div> - </div> - <pre class="box box-code"> -<div class="instafilta-section"> - <h2>Birds</h2> - <ul class="example-list"> - <li><span class="instafilta-target">Ostrich</span></li> - <li><span class="instafilta-target">Atlantic Puffin</span></li> - <li><span class="instafilta-target">Flamingo</span></li> - <li><span class="instafilta-target">Hummingbird</span></li> - <li><span class="instafilta-target">Penguin</span></li> - <li><span class="instafilta-target">Albatross</span></li> - <li><span class="instafilta-target">Toucan</span></li> - <li><span class="instafilta-target">Mandarin Duck</span></li> - </ul> -</div></pre> - </div> - </section> - - <section class="section" id="s7"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">onFilterComplete returns matched hits</h2> - <p>After the filtering process is done, you might want to report just how many hits were found and perhaps show some message if no hits were found. This example shows you how.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex7"> - <fieldset class="controls"> - <input type="text" id="ex7f" placeholder="Type here to filter"> - <span class="result-message" id="some-result-message"></span> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target">Peter</span></li> - <li><span class="instafilta-target">Lois</span></li> - <li><span class="instafilta-target">Stewie</span></li> - <li><span class="instafilta-target">Chris</span></li> - </ul> - <pre class="box box-code"> -var $myMessage = $('#some-result-message'); - -$('#my-input-field').instaFilta({ - onFilterComplete: function(matchedItems) { - - var message = (matchedItems.length > 0) - ? "I found " + matchedItems.length + " matches!" - : "I couldn't find a thing.."; - - $myMessage.text(message); - } -});</pre> - </div> - </section> - - <section class="section" id="s8"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Categorize/tag items</h2> - <p>This is a bit similar to using sections, but it has some important differences. You can tag individual target items with several categories. Do this by defining one or more (comma separated string or array) categories in a data-attribute associated with the <em>categoryDataAttr</em> option. You can then use the <em>filterCategory</em> method to perform filtering based on those categories.</p> - <p>In this example, a select box is used to filter out humans and machines. Note that "RoboCop" exists in both the <em>machine</em> category and the <em>human</em> category.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex8"> - <fieldset class="controls"> - <input type="text" id="ex8f" placeholder="Type here to filter"> - <select id="ex8s"> - <option value="">Show all</option> - <option value="machine">Machines</option> - <option value="human">Humans</option> - <option value="non-fictional">Non-fictional</option> - </select> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target" data-instafilta-category="machine">R2-D2</span></li> - <li><span class="instafilta-target" data-instafilta-category="machine">Terminator</span></li> - <li><span class="instafilta-target" data-instafilta-category="human">John Connor</span></li> - <li><span class="instafilta-target" data-instafilta-category="human,non-fictional">Andreas Larsson</span></li> - <li><span class="instafilta-target" data-instafilta-category="machine">Johnny 5</span></li> - <li><span class="instafilta-target" data-instafilta-category="human">Gordon Freeman</span></li> - <li><span class="instafilta-target" data-instafilta-category="machine">Wall-E</span></li> - <li><span class="instafilta-target" data-instafilta-category="human,machine">RoboCop</span></li> - </ul> - <h3 class="lesser-title">If the HTML looks like this..</h3> - <pre class="box box-code"> -<span class="instafilta-target" data-instafilta-category="human">Gordon Freeman</span> -<span class="instafilta-target" data-instafilta-category="machine">Wall-E</span> -<span class="instafilta-target" data-instafilta-category="human,machine,both">RoboCop</span></pre> - <h3 class="lesser-title">..then we can filter it by category like this</h3> - <pre class="box box-code"> -var insta = $('#filtering').instaFilta(); - -/* This will show "Gordon Freeman" and "RoboCop" */ -insta.filterCategory('human'); - -/* This will show "Wall-E" and "RoboCop" */ -insta.filterCategory('machine'); - -/* This will only show "RoboCop" */ -insta.filterCategory('both');</pre> - </div> - </section> - - <section class="section" id="s9"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">Yes, checkboxes!!</h2> - <p>Given that we can feed several categories to the <em>filterCategories</em> method, we can create an interface that scoops up the values of checked checkboxes and use them for this pupose. Have a go at this example!</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex9"> - <fieldset class="controls"> - <input type="text" id="ex9f" placeholder="Type here to filter"> - <label for="ex9-cat1"><input type="checkbox" id="ex9-cat1" value="europe">Europe</label> - <label for="ex9-cat2"><input type="checkbox" id="ex9-cat2" value="asia">Asia</label> - <label for="ex9-cat3"><input type="checkbox" id="ex9-cat3" value="africa">Africa</label> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target" data-instafilta-category="europe">Sweden</span></li> - <li><span class="instafilta-target" data-instafilta-category="asia">India</span></li> - <li><span class="instafilta-target" data-instafilta-category="africa">Angola</span></li> - <li><span class="instafilta-target" data-instafilta-category="europe">Germany</span></li> - <li><span class="instafilta-target" data-instafilta-category="asia">Japan</span></li> - <li><span class="instafilta-target" data-instafilta-category="africa">Chad</span></li> - <li><span class="instafilta-target" data-instafilta-category="europe">Belgium</span></li> - <li><span class="instafilta-target" data-instafilta-category="asia">China</span></li> - <li><span class="instafilta-target" data-instafilta-category="africa">Ghana</span></li> - <li><span class="instafilta-target" data-instafilta-category="europe">Finland</span></li> - <li><span class="instafilta-target" data-instafilta-category="asia">Thailand</span></li> - <li><span class="instafilta-target" data-instafilta-category="africa">Kenya</span></li> - <li><span class="instafilta-target" data-instafilta-category="europe">Croatia</span></li> - <li><span class="instafilta-target" data-instafilta-category="asia">Vietnam</span></li> - <li><span class="instafilta-target" data-instafilta-category="africa">Madagascar</span></li> - <li><span class="instafilta-target" data-instafilta-category="europe">Belarus</span></li> - </ul> - <h3 class="lesser-title">The checkboxes look like this..</h3> - <pre class="box box-code"> -<input type="checkbox" value="europe"></pre> - <h3 class="lesser-title">..and the JavaScript looks like this:</h3> - <pre class="box box-code"> -var instaFilta = $('.continents').instaFilta(); - -var $myCheckboxes = $('.continent-check'); - -$myCheckboxes.on('change', function() { - - var checkedCategories = []; - - $myCheckboxes.each(function() { - if ($(this).prop('checked')) { - checkedCategories.push($(this).val()); - } - }); - - instaFilta.filterCategory(checkedCategories); -});</pre> - </div> - </section> - - <section class="section" id="s10"> - <div class="l-1-2"> - <div class="padded-content-h"> - <h2 class="section-title">All or nothing</h2> - <p>When applying multiple categories at once, instaFilta will match <em>any</em> matching categories. In some cases however, like this following example, you want to make sure that items only match if they belong to <em>all</em> categories.</p> - </div> - </div> - <div class="box l-1-2"> - <div class="example" id="ex10"> - <fieldset class="controls"> - <input type="text" id="ex10f" placeholder="Type here to filter"> - <label for="ex10-cat1"><input type="checkbox" id="ex10-cat1" value="swims">Swims</label> - <label for="ex10-cat2"><input type="checkbox" id="ex10-cat2" value="walks">Walks</label> - <label for="ex10-cat3"><input type="checkbox" id="ex10-cat3" value="flies">Flies</label> - <label for="ex10-cat4"><input type="checkbox" id="ex10-cat4" value="trots">Trots</label> - </fieldset> - <ul class="example-list example-list-quad"> - <li><span class="instafilta-target" data-instafilta-category="walks,flies">Ladybug</span></li> - <li><span class="instafilta-target" data-instafilta-category="walks">Porcupine</span></li> - <li><span class="instafilta-target" data-instafilta-category="swims">Bullshark</span></li> - <li><span class="instafilta-target" data-instafilta-category="swims,walks">Crocodile</span></li> - <li><span class="instafilta-target" data-instafilta-category="walks">Camel</span></li> - <li><span class="instafilta-target" data-instafilta-category="swims,walks">Iguana</span></li> - <li><span class="instafilta-target" data-instafilta-category="swims,walks,flies,trots">Unicorn</span></li> - <li><span class="instafilta-target" data-instafilta-category="swims,flies">Flying Fish</span></li> - </ul> - <h3 class="lesser-title">Example markup</h3> - <pre class="box box-code"> -<input type="checkbox" value="walks"> -<input type="checkbox" value="flies"> - -<span class="instafilta-target" data-instafilta-category="walks,flies">Ladybug</span></pre> - <h3 class="lesser-title">Example JavaScript (notice the second parameter, which is set to true)</h3> - <pre class="box box-code"> -var instaFilta = $('.animals').instaFilta(); - -var $myCheckboxes = $('.ability-check'); - -$myCheckboxes.on('change', function() { - - var checkedCategories = []; - - $myCheckboxes.each(function() { - if ($(this).prop('checked')) { - checkedCategories.push($(this).val()); - } - }); - - instaFilta.filterCategory(checkedCategories, true); -});</pre> - </div> - </section> - - </main> - - <a href="https://github.com/chromawoods/instaFilta"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a> - - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> - <link href="http://fonts.googleapis.com/css?family=Lily+Script+One" rel="stylesheet" type="text/css"> - <link href="http://fonts.googleapis.com/css?family=Roboto:400,300,700" rel="stylesheet" type="text/css"> - <script src="instafilta.min.js"></script> - <script src="demo.js"></script> - - <footer class="footer padded-content"> - Built and designed by <a href="http://chromawoods.com/">Andreas Larsson</a> - </footer> - - <script> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-23289011-1']); - _gaq.push(['_trackPageview']); - (function () { - var ga = document.createElement('script'); - ga.type = 'text/javascript'; - ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(ga, s); - })(); - </script> - -</body> -</html> \ No newline at end of file diff --git a/layouts/v7/lib/jquery/daterangepicker/index.html b/layouts/v7/lib/jquery/daterangepicker/index.html deleted file mode 100644 index f78dbaed42e56af53635a13987da849e05a0bb26..0000000000000000000000000000000000000000 --- a/layouts/v7/lib/jquery/daterangepicker/index.html +++ /dev/null @@ -1,631 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title>Date Picker Demo</title> - <link rel="stylesheet" href="daterangepicker.css" /> - <script src="jquery-1.11.2.min.js"></script> - <script src="moment.min.js"></script> - <script src="jquery.daterangepicker.js"></script> - <script src="demo.js"></script> - <style> - #wrapper - { - width:800px; - margin:0 auto; - color:#333; - font-family:Tahoma; - line-height:1.5; - font-size:14px; - } - .demo { margin:30px 0;} - .date-picker-wrapper .month-wrapper table .day.lalala { background-color:orange; } - .options { display:none; border-left:6px solid #8ae; padding:10px; font-size:12px; line-height:1.4; background-color:#eee; border-radius:4px;} - </style> - </head> - <body> - - <div id="wrapper"> - <h1>jQuery Date Range Picker</h1> - - <p> - jQuery Date Range Picker is a jQuery plugin that allows user to select a date range. - </p> - <p> - Requires <a href="http://jquery.com/" target=_blank>jQuery</a> 1.3.2+ (MIT LICENSE), <a href="http://momentjs.com/" target=_blank>Moment</a> 2.2.0+ (MIT LICENSE) - </p> - <p> - Supports IE6+, Firefox, Chrome, Safari and other standard HTML5 browsers. - </p> - <p> - Supports multi-language, you can choose a defined language or set it to auto-detect mode. <br> - You can also define new languages for it. - </p> - <p> - The HTML DOMs generated is fully CSS styled, you can change the skin by editting the CSS file easily. - <p> - - <p> - I accept further customization job if you require more functions. My personal blog is <a href="http://jszen.com" target=_blank>http://jszen.com</a> - </p> - - <p>Fork me on Github <a href="https://github.com/longbill/jquery-date-range-picker">https://github.com/longbill/jquery-date-range-picker</a></p> - - - <h2>Installation</h2> - - <pre><link rel="stylesheet" href="daterangepicker.css" /> -<script src="moment.min.js"></script> -<script src="jquery.daterangepicker.js"></script> - </pre> - - - <h2>Demonstrations</h2> - - <div class="demo"> - Default settings: <input id="date-range0" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{}</pre> - </div> - - <div> - Default settings with time enabled: <input id="date-range1" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - startOfWeek: 'monday', - separator : ' ~ ', - format: 'DD.MM.YYYY HH:mm', - autoClose: false, - time: { - enabled: true - } -}</pre> - </div> - - <div class="demo"> - Default settings with default value: <input id="date-range2" size="40" value="2013-10-01 to 2013-11-04"> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{}</pre> - </div> - - <div class="demo"> - Force to Chinese: <input id="date-range3" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - language:'cn' -}</pre> - </div> - - <div class="demo"> - Force to English: <input id="date-range4" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - language:'en' -} </pre> - </div> - - <div class="demo"> - Use custom language: <input id="date-range4-1" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - language: 'custom' -} </pre> - </div> - - <div class="demo"> - Select a date range after 2014-11-20: <input id="date-range5" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - startDate: '2014-11-20' -} </pre> - </div> - - <div class="demo"> - Select a date range between 2013-01-10 to 2013-02-10: <input id="date-range6" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - startDate: '2013-01-10', - endDate: '2013-02-10' -} </pre> - </div> - - <div class="demo"> - Select a date range between 3 days and 7 days: <input id="date-range7" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - minDays: 3, - maxDays: 7 -} </pre> - </div> - - <div class="demo"> - Set start of week to Monday: <input id="date-range8" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - startOfWeek: 'monday' -} </pre> - </div> - - <div class="demo"> - Use SPAN instead of INPUT: <span id="date-range9" style="background-color:#49e; color:white;padding:3px; cursor:pointer; border-radius:4px;">select</span> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - getValue: function() - { - return this.innerHTML; - }, - setValue: function(s) - { - this.innerHTML = s; - } -} </pre> - </div> - - <div class="demo"> - Use two inputs: <span id="two-inputs"><input id="date-range200" size="20" value=""> to <input id="date-range201" size="20" value=""></span> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - separator : ' to ', - getValue: function() - { - if ($('#date-range200').val() && $('#date-range201').val() ) - return $('#date-range200').val() + ' to ' + $('#date-range201').val(); - else - return ''; - }, - setValue: function(s,s1,s2) - { - $('#date-range200').val(s1); - $('#date-range201').val(s2); - } -} </pre> - </div> - - <div class="demo"> - Use another date format: <input id="date-range10" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - format: 'dddd MMM Do, YYYY' //more formats at http://momentjs.com/docs/#/displaying/format/ -} </pre> - </div> - - <div class="demo"> - Use future date shortcuts: <input id="date-range101" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - shortcuts : - { - 'next-days': [3,5,7], - 'next': ['week','month','year'] - } -} </pre> - </div> - - <div class="demo"> - Use past date shortcuts: <input id="date-range102" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - shortcuts : - { - 'prev-days': [3,5,7], - 'prev': ['week','month','year'], - 'next-days':null, - 'next':null - } -} </pre> - </div> - - <div class="demo"> - Use custom shortcuts: <input id="date-range100" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - shortcuts : null, - startOfWeek: 'sunday', - language:'en', - customShortcuts: - [ - //if return an array of two dates, it will select the date range between the two dates - { - name: 'this week', - dates : function() - { - var start = moment().day(0).toDate(); - var end = moment().day(6).toDate(); - return [start,end]; - } - }, - //if only return an array of one date, it will display the month which containing the date. and it will not select any date range - { - name: 'Oct 2014', - dates : function() - { - //move calendars to show this date's month and next month - var movetodate = moment('2014-10','YYYY-MM').toDate(); - return [movetodate]; - } - } - ] -} </pre> - </div> - - <div class="demo"> - Use custom values: <input id="date-range105" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - language:'en', - customValueLabel: 'Dynamic Ranges', - showCustomValues: true, - customValues: - //if return an array of two dates, it will select the date range between the two dates - [ - { - name: 'MTD', - value: 'Month To Date' - }, - { - name: 'YTD', - value: 'Year To Date' - } - ] -} </pre> - </div> - - - <div class="demo"> - Hide shortcuts: <input id="date-range104" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - showShortcuts:false -} </pre> - </div> - - <div class="demo"> - Auto-close after selection: <input id="date-range103" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - autoClose: true -} </pre> - </div> - - <div class="demo"> - Change the separator between date strings: <input id="date-range11" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - separator : ' ~ ' -} </pre> - </div> - - <div class="demo"> - In-line mode: <input id="date-range12" size="40" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - inline:true, - container: '#date-range12-container', - alwaysOpen:true -} </pre> - <div id="date-range12-container"></div> - </div> - - <div class="demo"> - Single Date mode: <input id="date-range13" size="40" value="2015-03-01"> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - autoClose: true, - singleDate : true, - showShortcuts: false -} </pre> - </div> - - <div class="demo"> - Batch mode ( week ): <input id="date-range14" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - batchMode: 'week', - showShortcuts: false -} </pre> - </div> - - <div class="demo"> - Batch mode ( week-range ): <input id="date-range14-2" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - batchMode: 'week-range', - showShortcuts: false -} </pre> - </div> - - - <div class="demo"> - Disable some dates: <input id="date-range15" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - showShortcuts: false, - beforeShowDay: function(t) - { - var valid = !(t.getDay() == 0 || t.getDay() == 6); //disable saturday and sunday - var _class = ''; - var _tooltip = valid ? '' : 'weekends are disabled'; - return [valid,_class,_tooltip]; - } -} </pre> - </div> - - <div class="demo"> - Control by script: - <button id="date-range16-open">Open</button> - <button id="date-range16-close">Close</button> - <button id="date-range16-set">Set Date Range</button> - <button id="date-range16-set-silent">Set Date Range (no event / silent: true)</button> - <button id="date-range16-clear">Clear Selection</button> - <button id="date-range16-destroy">Destroy</button> - <br> - <input id="date-range16" size="60" value=""> - - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -$('#date-range16').dateRangePicker( -{ - showShortcuts: false, - format: 'YYYY-MM-DD' -}).bind('datepicker-change', function(evt, obj) { - alert('date1: ' + obj.date1 + ' / date2: ' + obj.date2); -}); - -$('#date-range16-open').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').open(); -}); - -$('#date-range16-close').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').close(); -}); - -$('#date-range16-set').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').setDateRange('2013-11-20','2014-08-25'); -}); - -$('#date-range16-set-silent').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').setDateRange('2014-11-03','2015-02-12', true); -}); - -$('#date-range16-clear').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').clear(); -}); - -$('#date-range16-destroy').click(function(evt) -{ - evt.stopPropagation(); - $('#date-range16').data('dateRangePicker').destroy(); -}); </pre> - </div> - - <div class="demo"> - Sticky months: <input id="date-range17" size="60" value=""> - <a href="#" class="show-option">Show Config</a> - <pre class="options"> -{ - stickyMonths: true, - startDate: '2013-01-10', - endDate: '2013-05-10' -} </pre> - </div> - - - <h2>Configuration</h2> - <pre><b>Usage:</b> $('#dom-id').dateRangePicker(configObject);</pre> - <p> - The default configuration object is:<br> - <pre>{ - format: 'YYYY-MM-DD', - separator: ' to ', - language: 'auto', - startOfWeek: 'sunday',// or sunday - getValue: function() - { - return this.value; - }, - setValue: function(s) - { - this.value = s; - }, - startDate: false, - endDate: false, - minDays: 0, - maxDays: 0, - showShortcuts: true, - time: { - enabled: false - }, - shortcuts: - { - //'prev-days': [1,3,5,7], - 'next-days': [3,5,7], - //'prev' : ['week','month','year'], - 'next' : ['week','month','year'] - }, - customShortcuts : [], - inline:false, - container: 'body', - alwaysOpen:false, - singleDate:false, - batchMode:false, - beforeShowDay: [function], - stickyMonths: false -}</pre> - </p> - <h3>You can use the following keys in the configObject to overwrite the default configuration:</h3> - -<pre> -<b>format (String)</b> - <i>The date format string used for Moment. - click <a href="http://momentjs.com/docs/#/displaying/format/" target=_blank>here</a> to see Moment documentation</i> - -<b>separator (String)</b> - <i>The separator string used between date strings</i> - -<b>language (String)</b> - <i>pre-defined languages are "en" and "cn", you can define your own - language then set this to the name of new language. - You can also set this to "auto" to make it auto detect browser language.</i> - -<b>startOfWeek (String)</b> - <i>"sunday" or "monday"</i> - -<b>getValue (Function)</b> - <i>This function is called when get date range string from DOM - When it is called, the context of this function is set to the datepicker DOM</i> - -<b>setValue (Function)</b> - <i>This function is called when set date range string to DOM</i> - -<b>startDate (String or false)</b> - <i>This string defines the earliest date which is allowed for the user, same format as `format`</i> - -<b>endDate (String or false)</b> - <i>This string defines the latest date which is allowed for the user, same format as `format`</i> - -<b>minDays (Number)</b> - <i>This number defines the minimum days of the selected range - if this is 0, means do not limit minimum days</i> - -<b>maxDays (Number)</b> - <i>This number defines the maximum days of the selected range - if this is 0, means do not limit maximum days</i> - -<b>showShortcuts (Boolean)</b> - <i>hide or show shortcuts area</i> - -<b>shortcuts (Object)</b> - <i>define the shortcuts buttons. there are some built in shortcuts, see source code</i> - -<b>time (Object)</b> - <i>If enabled adds time selection controls.</i> - -<b>customShortcuts (Array)</b> - <i>define custom shortcut buttons. see demo.js</i> - -<b>inline (Boolean)</b> - <i>whether to render the date range picker dom in inline mode instead of overlay mode, - if set to true, please set `container` too</i> - -<b>container (String, css selector || DOM Object)</b> - <i>where should the date range picker dom should be renderred to</i> - -<b>alwaysOpen (Boolean)</b> - <i>if you use inline mode, you may want the date range picker widget to be renderred when the page loads - set this to true will also hide the "close" button - </i> - -<b>singleDate (Boolean)</b> - <i>choose a single date instead of a date range. - </i> - -<b>batchMode (false / 'week' / 'month')</b> - <i> auto batch select mode </i> - <i> false (default), week, month, week-range, month-range</i> - -<b>beforeShowDay (Function)</b> - <i>A function that takes a date as a parameter and must return an array with: - [0]: true/false indicating whether or not this date is selectable - [1]: a CSS class name to add to the date's cell or "" for the default presentation - [2]: an optional popup tooltip for this date - The function is called for each day in the datepicker before it is displayed.</i> - -<b>stickyMonths (Boolean)</b> - <i>If true, there will only be one previous and one next button. Clicking them will change - both the months. This setting will have no effect if singleDate option is set to true</i> - -</pre> - - <h2>Events</h2> - <p>3 events will be triggerred on the date range picker DOM</p> -<pre>$('#dom-id') -.dateRangePicker() -.bind('datepicker-change',function(event,obj) -{ - console.log(obj); - // obj will be something like this: - // { - // date1: (Date object of the earlier date), - // date2: (Date object of the later date), - // value: "2013-06-05 to 2013-06-07" - // } -}) -.bind('datepicker-apply',function(event,obj) -{ - console.log(obj); -}) -.bind('datepicker-close',function() -{ - console.log('close'); -}); -</pre> - -<br> - - <h2>APIs</h2> - <p></p> -<pre>//after you called $(dom).dateRangePicker(); - -$(dom).data('dateRangePicker') - .setDateRange('2013-11-20','2013-11-25'); //set date range, two date strings should follow the `format` in config object, set the third argument to be `true` if you don't want this method to trigger a `datepicker-change` event. - .clear(); // clear date range - .close(); // close date range picker overlay - .open(); // open date range picker overlay - .destroy(); // destroy all date range picker related things -</pre> - - <h2>License</h2> - <pre> -This date range picker plugin is under MIT LICENSE - </pre> - - - - <script> - $(function() - { - $('a.show-option').click(function(evt) - { - evt.preventDefault(); - $(this).siblings('.options').slideToggle(); - }); - }) - </script> - - </body> -</html> diff --git a/layouts/v7/lib/jquery/floatThead/jquery.floatThead.js b/layouts/v7/lib/jquery/floatThead/jquery.floatThead.js index dabe6219b011a8acbb85adcedb138d595a792291..cb945130383434771a589612e7d073adc580d1a8 100644 --- a/layouts/v7/lib/jquery/floatThead/jquery.floatThead.js +++ b/layouts/v7/lib/jquery/floatThead/jquery.floatThead.js @@ -326,6 +326,7 @@ $floatContainer.css({ position: useAbsolutePositioning ? 'absolute' : 'fixed', marginTop: 0, + marginLeft: 1, top: useAbsolutePositioning ? 0 : 'auto', zIndex: opts.zIndex }); @@ -361,7 +362,7 @@ function setFloatWidth(){ var tw = tableWidth($table, $fthCells, true); var width = $scrollContainer.width() || tw; - var floatContainerWidth = $scrollContainer.css("overflow-y") != 'hidden' ? width - scrollbarOffset.vertical : width; + var floatContainerWidth = $scrollContainer.css("overflow-y") != 'hidden' ? width - scrollbarOffset.vertical - 1: width; $floatContainer.width(floatContainerWidth); if(locked){ var percent = 100 * tw / (floatContainerWidth); diff --git a/layouts/v7/lib/jquery/jquery-ui-1.11.3.custom/index.html b/layouts/v7/lib/jquery/jquery-ui-1.11.3.custom/index.html deleted file mode 100644 index b878272bca58383378db3eedada7efcb6033545c..0000000000000000000000000000000000000000 --- a/layouts/v7/lib/jquery/jquery-ui-1.11.3.custom/index.html +++ /dev/null @@ -1,513 +0,0 @@ -<!doctype html> -<html lang="us"> -<head> - <meta charset="utf-8"> - <title>jQuery UI Example Page</title> - <link href="jquery-ui.css" rel="stylesheet"> - <style> - body{ - font: 62.5% "Trebuchet MS", sans-serif; - margin: 50px; - } - .demoHeaders { - margin-top: 2em; - } - #dialog-link { - padding: .4em 1em .4em 20px; - text-decoration: none; - position: relative; - } - #dialog-link span.ui-icon { - margin: 0 5px 0 0; - position: absolute; - left: .2em; - top: 50%; - margin-top: -8px; - } - #icons { - margin: 0; - padding: 0; - } - #icons li { - margin: 2px; - position: relative; - padding: 4px 0; - cursor: pointer; - float: left; - list-style: none; - } - #icons span.ui-icon { - float: left; - margin: 0 4px; - } - .fakewindowcontain .ui-widget-overlay { - position: absolute; - } - select { - width: 200px; - } - </style> -</head> -<body> - -<h1>Welcome to jQuery UI!</h1> - -<div class="ui-widget"> - <p>This page demonstrates the widgets and theme you selected in Download Builder. Please make sure you are using them with a compatible jQuery version.</p> -</div> - -<h1>YOUR COMPONENTS:</h1> - - -<!-- Accordion --> -<h2 class="demoHeaders">Accordion</h2> -<div id="accordion"> - <h3>First</h3> - <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div> - <h3>Second</h3> - <div>Phasellus mattis tincidunt nibh.</div> - <h3>Third</h3> - <div>Nam dui erat, auctor a, dignissim quis.</div> -</div> - - - -<!-- Autocomplete --> -<h2 class="demoHeaders">Autocomplete</h2> -<div> - <input id="autocomplete" title="type "a""> -</div> - - - -<!-- Button --> -<h2 class="demoHeaders">Button</h2> -<button id="button">A button element</button> -<form style="margin-top: 1em;"> - <div id="radioset"> - <input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label> - <input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label> - <input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label> - </div> -</form> - - - -<!-- Tabs --> -<h2 class="demoHeaders">Tabs</h2> -<div id="tabs"> - <ul> - <li><a href="#tabs-1">First</a></li> - <li><a href="#tabs-2">Second</a></li> - <li><a href="#tabs-3">Third</a></li> - </ul> - <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div> - <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div> - <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div> -</div> - - - -<!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller--> -<h2 class="demoHeaders">Dialog</h2> -<p><a href="#" id="dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p> - -<h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2> -<div style="position: relative; width: 96%; height: 200px; padding:1% 2%; overflow:hidden;" class="fakewindowcontain"> - <p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p> - - <!-- ui-dialog --> - <div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div> - <div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all"> - <div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;"> - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> - </div> - </div> - -</div> - -<!-- ui-dialog --> -<div id="dialog" title="Dialog Title"> - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> -</div> - - - -<h2 class="demoHeaders">Framework Icons (content color preview)</h2> -<ul id="icons" class="ui-widget ui-helper-clearfix"> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li> - <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li> -</ul> - - -<!-- Slider --> -<h2 class="demoHeaders">Slider</h2> -<div id="slider"></div> - - - -<!-- Datepicker --> -<h2 class="demoHeaders">Datepicker</h2> -<div id="datepicker"></div> - - - -<!-- Progressbar --> -<h2 class="demoHeaders">Progressbar</h2> -<div id="progressbar"></div> - - - -<!-- Progressbar --> -<h2 class="demoHeaders">Selectmenu</h2> -<select id="selectmenu"> - <option>Slower</option> - <option>Slow</option> - <option selected="selected">Medium</option> - <option>Fast</option> - <option>Faster</option> -</select> - - - -<!-- Spinner --> -<h2 class="demoHeaders">Spinner</h2> -<input id="spinner"> - - - -<!-- Menu --> -<h2 class="demoHeaders">Menu</h2> -<ul style="width:100px;" id="menu"> - <li>Item 1</li> - <li>Item 2</li> - <li>Item 3 - <ul> - <li>Item 3-1</li> - <li>Item 3-2</li> - <li>Item 3-3</li> - <li>Item 3-4</li> - <li>Item 3-5</li> - </ul> - </li> - <li>Item 4</li> - <li>Item 5</li> -</ul> - - - -<!-- Tooltip --> -<h2 class="demoHeaders">Tooltip</h2> -<p id="tooltip"> - <a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover -the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip. -</p> - - -<!-- Highlight / Error --> -<h2 class="demoHeaders">Highlight / Error</h2> -<div class="ui-widget"> - <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> - <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> - <strong>Hey!</strong> Sample ui-state-highlight style.</p> - </div> -</div> -<br> -<div class="ui-widget"> - <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> - <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> - <strong>Alert:</strong> Sample ui-state-error style.</p> - </div> -</div> - -<script src="external/jquery/jquery.js"></script> -<script src="jquery-ui.js"></script> -<script> - -$( "#accordion" ).accordion(); - - - -var availableTags = [ - "ActionScript", - "AppleScript", - "Asp", - "BASIC", - "C", - "C++", - "Clojure", - "COBOL", - "ColdFusion", - "Erlang", - "Fortran", - "Groovy", - "Haskell", - "Java", - "JavaScript", - "Lisp", - "Perl", - "PHP", - "Python", - "Ruby", - "Scala", - "Scheme" -]; -$( "#autocomplete" ).autocomplete({ - source: availableTags -}); - - - -$( "#button" ).button(); -$( "#radioset" ).buttonset(); - - - -$( "#tabs" ).tabs(); - - - -$( "#dialog" ).dialog({ - autoOpen: false, - width: 400, - buttons: [ - { - text: "Ok", - click: function() { - $( this ).dialog( "close" ); - } - }, - { - text: "Cancel", - click: function() { - $( this ).dialog( "close" ); - } - } - ] -}); - -// Link to open the dialog -$( "#dialog-link" ).click(function( event ) { - $( "#dialog" ).dialog( "open" ); - event.preventDefault(); -}); - - - -$( "#datepicker" ).datepicker({ - inline: true -}); - - - -$( "#slider" ).slider({ - range: true, - values: [ 17, 67 ] -}); - - - -$( "#progressbar" ).progressbar({ - value: 20 -}); - - - -$( "#spinner" ).spinner(); - - - -$( "#menu" ).menu(); - - - -$( "#tooltip" ).tooltip(); - - - -$( "#selectmenu" ).selectmenu(); - - -// Hover states on the static widgets -$( "#dialog-link, #icons li" ).hover( - function() { - $( this ).addClass( "ui-state-hover" ); - }, - function() { - $( this ).removeClass( "ui-state-hover" ); - } -); -</script> -</body> -</html> diff --git a/layouts/v7/lib/jquery/timepicker/index.html b/layouts/v7/lib/jquery/timepicker/index.html deleted file mode 100644 index 153716d825e62eeafb1c6ff2e656d145bc5518c1..0000000000000000000000000000000000000000 --- a/layouts/v7/lib/jquery/timepicker/index.html +++ /dev/null @@ -1,392 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset='utf-8'> - - <title>Timepicker for jQuery – Demos and Documentation</title> - <meta name="description" content="A lightweight, customizable jQuery timepicker plugin inspired by Google Calendar. Add a user-friendly javascript timepicker dropdown to your app in minutes." /> - <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> - - <script type="text/javascript" src="jquery.timepicker.js"></script> - <link rel="stylesheet" type="text/css" href="jquery.timepicker.css" /> - - <script type="text/javascript" src="lib/bootstrap-datepicker.js"></script> - <link rel="stylesheet" type="text/css" href="lib/bootstrap-datepicker.css" /> - - <script type="text/javascript" src="lib/site.js"></script> - <link rel="stylesheet" type="text/css" href="lib/site.css" /> - -</head> - -<body> - <header> - - <h1><a href="https://github.com/jonthornton/jquery-timepicker">jquery.timepicker</a></h1> - <p class="body-text"> - A lightweight, customizable javascript timepicker plugin for jQuery inspired by Google Calendar. - </p> - - <ul id="header-links"> - <li><a href="https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery">Documentation</a></li> - <li><a href="https://github.com/jonthornton/jquery-timepicker">Source code on GitHub</a></li> - <li><a href="https://github.com/jonthornton/jquery-timepicker/zipball/master">Download (zip)</a></li> - <li><a href="https://github.com/jonthornton/jquery-timepicker/issues?state=open">Help</a></li> - </ul> - </header> - - <section> - <p class="body-text">Use this plugin to unobtrusively add a timepicker dropdown to your forms. It's lightweight (2.7kb minified and gzipped) and easy to customize.</p> - </section> - - <section id="examples"> - <article> - <div class="demo"> - <h2>Basic Example</h2> - <p><input id="basicExample" type="text" class="time" data-scroll-default="6:00am" /></p> - </div> - - <script> - $(function() { - $('#basicExample').timepicker(); - }); - </script> - - <pre class="code" data-language="javascript">$('#basicExample').timepicker();</pre> - </article> - - - <article> - <div class="demo"> - <h2>Scroll Default Example</h2> - <p>Set the scroll position to local time if no value selected.</p> - <p><input id="scrollDefaultExample" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' }); - }); - </script> - - <pre class="code" data-language="javascript">$('#scrollDefaultExample').timepicker({ 'scrollDefault': 'now' });</pre> - </article> - - <article> - <div class="demo"> - <h2>Set Time Example</h2> - <p>Dynamically set the time using a Javascript Date object.</p> - <p> - <input id="setTimeExample" type="text" class="time" /> - <button id="setTimeButton">Set current time</button> - </p> - </div> - - <script> - $(function() { - $('#setTimeExample').timepicker(); - $('#setTimeButton').on('click', function (){ - $('#setTimeExample').timepicker('setTime', new Date()); - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#setTimeExample').timepicker(); -$('#setTimeButton').on('click', function (){ - $('#setTimeExample').timepicker('setTime', new Date()); -});</pre> - </article> - - <article> - <div class="demo"> - <h2>Duration Example</h2> - <p>Set a starting time and see duration from that starting time. You can optionally set an maxTime as well.</p> - <p><input id="durationExample" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#durationExample').timepicker({ - 'minTime': '2:00pm', - 'maxTime': '11:30pm', - 'showDuration': true - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#durationExample').timepicker({ - 'minTime': '2:00pm', - 'maxTime': '11:30pm', - 'showDuration': true -});</pre> - </article> - - <article> - <div class="demo"> - <h2>Event Example</h2> - <p>Trigger an event after selecting a value. Fires before the input onchange event.</p> - <p> - <input id="onselectExample" type="text" class="time" /> - <span id="onselectTarget" style="margin-left: 30px;"></span> - </p> - </div> - - <script> - $(function() { - $('#onselectExample').timepicker(); - $('#onselectExample').on('changeTime', function() { - $('#onselectTarget').text($(this).val()); - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#onselectExample').timepicker(); -$('#onselectExample').on('changeTime', function() { - $('#onselectTarget').text($(this).val()); -});</pre> - </article> - - <article> - <div class="demo"> - <h2>DisableTimeRanges Example</h2> - <p>Prevent selection of certain time values.</p> - <p><input id="disableTimeRangesExample" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#disableTimeRangesExample').timepicker({ 'disableTimeRanges': [['1am', '2am'], ['3am', '4:01am']] }); - }); - </script> - - <pre class="code" data-language="javascript">$('#disableTimeRangesExample').timepicker({ - 'disableTimeRanges': [ - ['1am', '2am'], - ['3am', '4:01am'] - ] -});</pre> - </article> - - <article> - <div class="demo"> - <h2>noneOption Example</h2> - <p>Custom options can be added to the dropdown menu.</p> - <p><input id="noneOptionExample" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#noneOptionExample').timepicker({ - 'noneOption': [ - { - 'label': 'Foobar', - 'className': 'shibby', - 'value': '42' - }, - 'Foobar2' - ] - }); - }); - </script> - - <pre class="code" data-language="javascript"> -$('#noneOptionExample').timepicker({ - 'noneOption': [ - { - 'label': 'Foobar', - 'className': 'shibby', - 'value': '42' - }, - 'Foobar2' - ] -}); - </pre> - </article> - - <article> - <div class="demo"> - <h2>timeFormat Example</h2> - <p>timepicker.jquery uses the time portion of <a href="http://php.net/manual/en/function.date.php">PHP's date formatting commands</a>.</p> - <p><input id="timeformatExample1" type="text" class="time" /> <input id="timeformatExample2" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' }); - $('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' }); - }); - </script> - - <pre class="code" data-language="javascript">$('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' }); -$('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' });</pre> - </article> - - <article> - <div class="demo"> - <h2>Step Example</h2> - <p>Generate drop-down options with varying levels of precision.</p> - <p><input id="stepExample1" type="text" class="time" /> <input id="stepExample2" type="text" class="time" /></p> - </div> - - <script> - $(function() { - $('#stepExample1').timepicker({ 'step': 15 }); - $('#stepExample2').timepicker({ - 'step': function(i) { - return (i%2) ? 15 : 45; - } - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#stepExample1').timepicker({ 'step': 15 }); -$('#stepExample2').timepicker({ - 'step': function(i) { - return (i%2) ? 15 : 45; - } -});</pre> - </article> - - <article> - <div class="demo"> - <h2>forceRoundTime Example</h2> - <p>jquery-timepicker allows entering times via the keyboard. Setting forceRoundTime to true will - round the entered time to the nearest option on the dropdown list.</p> - <p><input id="roundTimeExample" type="text" class="time" /> </p> - </div> - - <script> - $(function() { - $('#roundTimeExample').timepicker({ 'forceRoundTime': true }); - }); - </script> - - <pre class="code" data-language="javascript">$('#roundTimeExample').timepicker({ 'forceRoundTime': true });</pre> - </article> - - <article> - <div class="demo"> - <h2>Select Example</h2> - <p>jquery-timepicker can render itself as a select element too.</p> - <p><input id="selectExample" class="time" /> <button id="selectButton">Toggle</button></p> - </div> - - <script> - $(function() { - $('#selectExample').timepicker(); - $('#selectButton').click(function(e) { - $('#selectExample').timepicker('option', { useSelect: true }); - $(this).hide(); - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#selectExample').timepicker(); -$('#selectButton').click(function(e) { - $('#selectExample').timepicker('option', { useSelect: true }); - $(this).hide(); -});</pre> - </article> - - <article> - <div class="demo"> - <h2>Non-input Example</h2> - <p>jquery-timepicker can be bound to any visibile DOM element, such as spans or divs.</p> - <p><span id="spanExample" style="background:#f00; padding:0 10px; margin-right:100px;"></span> <button id="openSpanExample">Pick Time</button> </p> - </div> - - <script> - $(function() { - $('#spanExample').timepicker(); - $('#openSpanExample').on('click', function(){ - $('#spanExample').timepicker('show'); - }); - }); - </script> - - <pre class="code" data-language="javascript">$('#spanExample').timepicker(); - $('#openSpanExample').on('click', function(){ - $('#spanExample').timepicker('show'); -});</pre> - </article> - - <article> - <div class="demo"> - <h2>Datepair Plugin Example</h2> - - <p>jquery-timepicker is designed to work with the <a href="http://jonthornton.github.com/Datepair.js">jquery-datepair plugin</a>. - - <p id="datepairExample"> - <input type="text" class="date start" /> - <input type="text" class="time start" /> to - <input type="text" class="time end" /> - <input type="text" class="date end" /> - </p> - </div> - - <script src="http://jonthornton.github.io/Datepair.js/dist/datepair.js"></script> - <script src="http://jonthornton.github.io/Datepair.js/dist/jquery.datepair.js"></script> - <script> - $('#datepairExample .time').timepicker({ - 'showDuration': true, - 'timeFormat': 'g:ia' - }); - - $('#datepairExample .date').datepicker({ - 'format': 'm/d/yyyy', - 'autoclose': true - }); - - $('#datepairExample').datepair(); - </script> - - <pre class="code" data-language="javascript"> -<p id="datepairExample"> - <input type="text" class="date start" /> - <input type="text" class="time start" /> to - <input type="text" class="time end" /> - <input type="text" class="date end" /> -</p> - -<script type="text/javascript" src="datepair.js"></script> -<script type="text/javascript" src="jquery.datepair.js"></script> -<script> - // initialize input widgets first - $('#datepairExample .time').timepicker({ - 'showDuration': true, - 'timeFormat': 'g:ia' - }); - - $('#datepairExample .date').datepicker({ - 'format': 'yyyy-m-d', - 'autoclose': true - }); - - // initialize datepair - $('#datepairExample').datepair(); -</script></pre> - - </article> - </section> - - <section> - <h2>Need Help?</h2> - <p>Check <a href="https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery">the documentation</a> or <a href="https://github.com/jonthornton/jquery-timepicker/issues?state=open">submit an issue</a> on GitHub.</p> - </section> - - <footer> - <p>© 2014 <a href="http://jonthornton.com">Jon Thornton</a></p> - </footer> - - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-15605525-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - </script> -</div></body> -</html> diff --git a/layouts/v7/lib/vt-icons/demo.html b/layouts/v7/lib/vt-icons/demo.html deleted file mode 100644 index b171500ae629a5b9ce497657ee36815990b293b2..0000000000000000000000000000000000000000 --- a/layouts/v7/lib/vt-icons/demo.html +++ /dev/null @@ -1,1947 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - <title>IcoMoon Demo</title> - <meta name="description" content="An Icon Font Generated By IcoMoon.io"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="demo-files/demo.css"> - <link rel="stylesheet" href="style.css"> - <!--[if lt IE 8]><!--> - <link rel="stylesheet" href="ie7/ie7.css"> - <!--<![endif]--> -</head> -<body> - <div class="bgc1 clearfix"> - <h1 class="mhmm mvm"><span class="fgc1">Font Name:</span> Vtiger-icons <small class="fgc1">(Glyphs: 137)</small></h1> - </div> - <div class="clearfix mhl ptl"> - <h1 class="mvm mtn fgc1">Grid Size: Unknown</h1> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-accounts"> - - </span> - <span class="mls"> vicon-accounts</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e600" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-add"> - - </span> - <span class="mls"> vicon-add</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e601" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-alert"> - - </span> - <span class="mls"> vicon-alert</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e602" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-assets"> - - </span> - <span class="mls"> vicon-assets</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e603" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-attachment"> - - </span> - <span class="mls"> vicon-attachment</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e604" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-bell"> - - </span> - <span class="mls"> vicon-bell</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e606" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-bulb"> - - </span> - <span class="mls"> vicon-bulb</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e607" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-calendar"> - - </span> - <span class="mls"> vicon-calendar</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e608" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-calendaragenda"> - - </span> - <span class="mls"> vicon-calendaragenda</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e609" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-calendarlist"> - - </span> - <span class="mls"> vicon-calendarlist</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e60a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-call"> - - </span> - <span class="mls"> vicon-call</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e60b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-camera"> - - </span> - <span class="mls"> vicon-camera</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e60c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-campaigns"> - - </span> - <span class="mls"> vicon-campaigns</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e60d" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-chat"> - - </span> - <span class="mls"> vicon-chat</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e60f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-close"> - - </span> - <span class="mls"> vicon-close</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e610" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-code"> - - </span> - <span class="mls"> vicon-code</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e611" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-codebraces"> - - </span> - <span class="mls"> vicon-codebraces</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e612" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-cog"> - - </span> - <span class="mls"> vicon-cog</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e613" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-columns"> - - </span> - <span class="mls"> vicon-columns</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e614" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-compose"> - - </span> - <span class="mls"> vicon-compose</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e615" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-contacts"> - - </span> - <span class="mls"> vicon-contacts</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e616" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-customerportal"> - - </span> - <span class="mls"> vicon-customerportal</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e617" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-default"> - - </span> - <span class="mls"> vicon-default</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e618" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-detailreport"> - - </span> - <span class="mls"> vicon-detailreport</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e619" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-documents"> - - </span> - <span class="mls"> vicon-documents</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e61a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-duplicaterecords"> - - </span> - <span class="mls"> vicon-duplicaterecords</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e61b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-edit"> - - </span> - <span class="mls"> vicon-edit</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e61c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-emails"> - - </span> - <span class="mls"> vicon-emails</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e61e" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-emailtemplates"> - - </span> - <span class="mls"> vicon-emailtemplates</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e61f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-equalizer"> - - </span> - <span class="mls"> vicon-equalizer</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e621" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-exit"> - - </span> - <span class="mls"> vicon-exit</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e623" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-export"> - - </span> - <span class="mls"> vicon-export</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e624" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-eyeclose"> - - </span> - <span class="mls"> vicon-eyeclose</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e625" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-eyeopen"> - - </span> - <span class="mls"> vicon-eyeopen</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e626" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-faq"> - - </span> - <span class="mls"> vicon-faq</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e627" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-fb"> - - </span> - <span class="mls"> vicon-fb</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e628" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-folderclose"> - - </span> - <span class="mls"> vicon-folderclose</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e629" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-foldermove"> - - </span> - <span class="mls"> vicon-foldermove</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e62a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-folderopen"> - - </span> - <span class="mls"> vicon-folderopen</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e62b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-forward"> - - </span> - <span class="mls"> vicon-forward</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e62d" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-googleplus"> - - </span> - <span class="mls"> vicon-googleplus</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e62e" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-graphview"> - - </span> - <span class="mls"> vicon-graphview</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e62f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-grid"> - - </span> - <span class="mls"> vicon-grid</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e630" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-help"> - - </span> - <span class="mls"> vicon-help</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e631" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-helpdesk"> - - </span> - <span class="mls"> vicon-helpdesk</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e632" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-home"> - - </span> - <span class="mls"> vicon-home</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e633" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-image"> - - </span> - <span class="mls"> vicon-image</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e634" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-import"> - - </span> - <span class="mls"> vicon-import</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e635" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-inventory"> - - </span> - <span class="mls"> vicon-inventory</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e637" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-inventory2"> - - </span> - <span class="mls"> vicon-inventory2</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e638" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-inventory3"> - - </span> - <span class="mls"> vicon-inventory3</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e639" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-invoice"> - - </span> - <span class="mls"> vicon-invoice</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-invoicerecurring"> - - </span> - <span class="mls"> vicon-invoicerecurring</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-leads"> - - </span> - <span class="mls"> vicon-leads</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-link"> - - </span> - <span class="mls"> vicon-link</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63d" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-linkopen"> - - </span> - <span class="mls"> vicon-linkopen</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63e" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-list"> - - </span> - <span class="mls"> vicon-list</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e63f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-lock"> - - </span> - <span class="mls"> vicon-lock</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e640" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-lockopen"> - - </span> - <span class="mls"> vicon-lockopen</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e641" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-logout"> - - </span> - <span class="mls"> vicon-logout</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e642" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-mailmanager"> - - </span> - <span class="mls"> vicon-mailmanager</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e643" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-mandatory"> - - </span> - <span class="mls"> vicon-mandatory</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e644" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-massedit"> - - </span> - <span class="mls"> vicon-massedit</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e646" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-meeting"> - - </span> - <span class="mls"> vicon-meeting</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e647" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-move"> - - </span> - <span class="mls"> vicon-move</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e648" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-mycalendar"> - - </span> - <span class="mls"> vicon-mycalendar</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e649" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-olark2"> - - </span> - <span class="mls"> vicon-olark2</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e64b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-oursites"> - - </span> - <span class="mls"> vicon-oursites</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e64c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-pagecount"> - - </span> - <span class="mls"> vicon-pagecount</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e64d" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-pbxmanager"> - - </span> - <span class="mls"> vicon-pbxmanager</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e64f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-pin"> - - </span> - <span class="mls"> vicon-pin</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e651" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-pivots"> - - </span> - <span class="mls"> vicon-pivots</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e652" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-play"> - - </span> - <span class="mls"> vicon-play</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e653" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-potentials"> - - </span> - <span class="mls"> vicon-potentials</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e654" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-pricebooks"> - - </span> - <span class="mls"> vicon-pricebooks</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e655" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-products"> - - </span> - <span class="mls"> vicon-products</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e657" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-project"> - - </span> - <span class="mls"> vicon-project</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e658" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-projectmilestone"> - - </span> - <span class="mls"> vicon-projectmilestone</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e659" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-projecttask"> - - </span> - <span class="mls"> vicon-projecttask</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e65a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-purchaseorder"> - - </span> - <span class="mls"> vicon-purchaseorder</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e65b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-puzzle"> - - </span> - <span class="mls"> vicon-puzzle</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e65c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-quotes"> - - </span> - <span class="mls"> vicon-quotes</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e65e" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-recyclebin"> - - </span> - <span class="mls"> vicon-recyclebin</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e65f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-refresh"> - - </span> - <span class="mls"> vicon-refresh</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e660" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-replytoall"> - - </span> - <span class="mls"> vicon-replytoall</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e661" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-reports"> - - </span> - <span class="mls"> vicon-reports</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e662" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-restorerecyclebin"> - - </span> - <span class="mls"> vicon-restorerecyclebin</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e663" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-retweet"> - - </span> - <span class="mls"> vicon-retweet</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e664" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-road"> - - </span> - <span class="mls"> vicon-road</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e665" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-rss"> - - </span> - <span class="mls"> vicon-rss</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e666" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-salesorder"> - - </span> - <span class="mls"> vicon-salesorder</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e667" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-search"> - - </span> - <span class="mls"> vicon-search</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e668" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-selectcolumn"> - - </span> - <span class="mls"> vicon-selectcolumn</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e669" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-servicecontracts"> - - </span> - <span class="mls"> vicon-servicecontracts</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e66a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-services"> - - </span> - <span class="mls"> vicon-services</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e66b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-share"> - - </span> - <span class="mls"> vicon-share</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e66c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-sharedcalendar"> - - </span> - <span class="mls"> vicon-sharedcalendar</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e66d" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-smiley1"> - - </span> - <span class="mls"> vicon-smiley1</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e66f" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-smiley2"> - - </span> - <span class="mls"> vicon-smiley2</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e670" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-smiley3"> - - </span> - <span class="mls"> vicon-smiley3</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e671" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-smsnotifier"> - - </span> - <span class="mls"> vicon-smsnotifier</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e672" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-starempty"> - - </span> - <span class="mls"> vicon-starempty</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e674" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-starfull"> - - </span> - <span class="mls"> vicon-starfull</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e675" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-starhalf"> - - </span> - <span class="mls"> vicon-starhalf</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e676" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-subscription"> - - </span> - <span class="mls"> vicon-subscription</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e677" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-tag"> - - </span> - <span class="mls"> vicon-tag</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e678" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-task"> - - </span> - <span class="mls"> vicon-task</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e679" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-taxes"> - - </span> - <span class="mls"> vicon-taxes</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e67a" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-timeline"> - - </span> - <span class="mls"> vicon-timeline</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e67b" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-toggle"> - - </span> - <span class="mls"> vicon-toggle</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e67c" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-unpin"> - - </span> - <span class="mls"> vicon-unpin</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e680" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-unplug"> - - </span> - <span class="mls"> vicon-unplug</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e681" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-vendors"> - - </span> - <span class="mls"> vicon-vendors</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e682" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-vendors3"> - - </span> - <span class="mls"> vicon-vendors3</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e683" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-video"> - - </span> - <span class="mls"> vicon-video</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e684" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-volumeoff"> - - </span> - <span class="mls"> vicon-volumeoff</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e685" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-volumeon"> - - </span> - <span class="mls"> vicon-volumeon</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e686" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-vtigeruser"> - - </span> - <span class="mls"> vicon-vtigeruser</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e687" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - <div class="glyph fs1"> - <div class="clearfix bshadow0 pbs"> - <span class="vicon-vtigeruser2"> - - </span> - <span class="mls"> vicon-vtigeruser2</span> - </div> - <fieldset class="fs0 size1of1 clearfix hidden-true"> - <input type="text" readonly value="e688" class="unit size1of2" /> - <input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" /> - </fieldset> - <div class="fs0 bshadow0 clearfix hidden-true"> - <span class="unit pvs fgc1">liga: </span> - <input type="text" readonly value="" class="liga unitRight" /> - </div> - </div> - </div> - - <!--[if gt IE 8]><!--> - <div class="mhl clearfix mbl"> - <h1>Font Test Drive</h1> - <label> - Font Size: <input id="fontSize" type="number" class="textbox0 mbm" - min="8" value="48" /> - px - </label> - <input id="testText" type="text" class="phl size1of1 mvl" - placeholder="Type some text to test..." value=""/> - </label> - <div id="testDrive" class="vicon-"> - </div> - </div> - <!--<![endif]--> - <div class="bgc1 clearfix"> - <p class="mhl">Generated by <a href="https://icomoon.io/app">IcoMoon</a></p> - </div> - - <script src="demo-files/demo.js"></script> -</body> -</html> \ No newline at end of file diff --git a/layouts/v7/modules/Accounts/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Accounts/DetailViewHeaderTitle.tpl index eedc4447e3facfdb15c17b197fa736256750844c..87dedc996703d573bf32efb6dba8999ec35d22b2 100644 --- a/layouts/v7/modules/Accounts/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Accounts/DetailViewHeaderTitle.tpl @@ -12,10 +12,10 @@ {strip} <div class="col-sm-6"> <div class="clearfix record-header "> - <div class="hidden-sm hidden-xs recordImage bgAccounts app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgAccounts app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100%" align="left"><br> {else} <img src="{vimage_path('summary_organizations.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Calendar/ModuleHeader.tpl b/layouts/v7/modules/Calendar/ModuleHeader.tpl index 5161c6cb2294564bec7d923ff0cf684a1d9fd9a2..7a33c402cabe62234d9c83993aef7fd97eeed87a 100644 --- a/layouts/v7/modules/Calendar/ModuleHeader.tpl +++ b/layouts/v7/modules/Calendar/ModuleHeader.tpl @@ -24,7 +24,7 @@ {/if} {/if} <a title="{vtranslate($MODULE, $MODULE)}" href='{$DEFAULT_FILTER_URL}&app={$SELECTED_MENU_CATEGORY}'><h4 class="module-title pull-left text-uppercase"> {vtranslate($MODULE, $MODULE)} </h4></a> - {if $smarty.session.lvs.$MODULE.viewname} + {if $smarty.session.lvs.$MODULE.viewname} {assign var=VIEWID value=$smarty.session.lvs.$MODULE.viewname} {/if} {if $VIEWID} @@ -38,7 +38,6 @@ {/foreach} <p class="current-filter-name filter-name pull-left cursorPointer" title="{$CVNAME}"> <span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a href='{$MODULE_MODEL->getListViewUrl()}&viewname={$VIEWID}&app={$SELECTED_MENU_CATEGORY}'> {$CVNAME} </a></p> {/if} - {assign var=SINGLE_MODULE_NAME value='SINGLE_'|cat:$MODULE} {if $RECORD and $smarty.request.view eq 'Edit'} <p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {vtranslate('LBL_EDITING', $MODULE)} : {$RECORD->get('label')} </a></p> diff --git a/layouts/v7/modules/Calendar/QuickCreate.tpl b/layouts/v7/modules/Calendar/QuickCreate.tpl index 9387164cc2059cd53efe8993d92da0679a974ac0..ba10c3b71dce452b67ac53c12e7fec22014ef6c2 100644 --- a/layouts/v7/modules/Calendar/QuickCreate.tpl +++ b/layouts/v7/modules/Calendar/QuickCreate.tpl @@ -11,8 +11,8 @@ {foreach key=index item=jsModel from=$SCRIPTS} <script type="{$jsModel->getType()}" src="{$jsModel->getSrc()}"></script> {/foreach} - <div class="modal-dialog modal-lg"> - <div class="modal-content" style='width: 525px;left:23%;'> + <div class="modal-dialog modal-md"> + <div class="modal-content"> <form class="form-horizontal recordEditView" id="QuickCreate" name="QuickCreate" method="post" action="index.php"> {if $MODE eq 'edit' && !empty($RECORD_ID)} {assign var=HEADER_TITLE value={vtranslate('LBL_EDITING', $MODULE)}|cat:" "|cat:{vtranslate('SINGLE_'|cat:$MODULE, $MODULE)}} @@ -83,25 +83,25 @@ </div> </div> </div> - - <table class="massEditTable table no-border"> - <tr> - {foreach key=FIELD_NAME item=FIELD_MODEL from=$RECORD_STRUCTURE name=blockfields} + <div class="container-fluid paddingTop15"> + <table class="massEditTable table no-border"> + <tr> + {foreach key=FIELD_NAME item=FIELD_MODEL from=$RECORD_STRUCTURE name=blockfields} {if $FIELD_NAME eq 'subject' || $FIELD_NAME eq 'date_start' || $FIELD_NAME eq 'due_date'} - </tr>{continue} + </tr>{continue} {/if} {assign var="isReferenceField" value=$FIELD_MODEL->getFieldDataType()} {assign var="referenceList" value=$FIELD_MODEL->getReferenceList()} {assign var="referenceListCount" value=count($referenceList)} {if $FIELD_MODEL->get('uitype') eq "19"} - {if $COUNTER eq '1'} - <td></td><td></td></tr><tr> - {assign var=COUNTER value=0} - {/if} + {if $COUNTER eq '1'} + <td></td><td></td></tr><tr> + {assign var=COUNTER value=0} + {/if} {/if} </tr><tr> <td class='fieldLabel col-lg-3'> - {if $isReferenceField neq "reference"}<label class="muted pull-right">{/if} + {if $isReferenceField neq "reference"}<label class="muted">{/if} {if $isReferenceField eq "reference"} {if $referenceListCount > 1} {assign var="DISPLAYID" value=$FIELD_MODEL->get('fieldvalue')} @@ -109,7 +109,7 @@ {if !empty($REFERENCED_MODULE_STRUCT)} {assign var="REFERENCED_MODULE_NAME" value=$REFERENCED_MODULE_STRUCT->get('name')} {/if} - <span class="pull-right"> + <span class=""> <select style="width: 150px;" class="select2 referenceModulesList"> {foreach key=index item=value from=$referenceList} <option value="{$value}" {if $value eq $REFERENCED_MODULE_NAME} selected {/if} >{vtranslate($value, $value)}</option> @@ -117,7 +117,7 @@ </select> </span> {else} - <label class="muted pull-right">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> + <label class="muted">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> {/if} {else} {vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if} @@ -127,9 +127,10 @@ <td class="fieldValue col-lg-9" {if $FIELD_MODEL->get('uitype') eq '19'} colspan="3" {assign var=COUNTER value=$COUNTER+1} {/if}> {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} </td> - {/foreach} - </tr> - </table> + {/foreach} + </tr> + </table> + </div> </div> </div> <div class="modal-footer"> diff --git a/layouts/v7/modules/Calendar/partials/SidebarEssentials.tpl b/layouts/v7/modules/Calendar/partials/SidebarEssentials.tpl index 43462ffb80e9eff7bb111379e9e9d52ebac56be3..90847f8e8f572691d2054f1ef387c8bcc8227e06 100644 --- a/layouts/v7/modules/Calendar/partials/SidebarEssentials.tpl +++ b/layouts/v7/modules/Calendar/partials/SidebarEssentials.tpl @@ -26,7 +26,7 @@ </div> <hr style="margin: 5px 0;"> <div class="list-menu-content"> - <div id="{$SIDEBARWIDGET->get('linklabel')}" class="sidebar-widget-body activitytypes" style="max-height: 500px;"> + <div id="{$SIDEBARWIDGET->get('linklabel')}" class="sidebar-widget-body activitytypes"> <div style="text-align:center;"><img src="layouts/v7/skins/images/loading.gif"></div> </div> </div> diff --git a/layouts/v7/modules/Calendar/resources/Calendar.js b/layouts/v7/modules/Calendar/resources/Calendar.js index 0b938b775ac4a70758f3f6c50927d3d0f8d16aaf..e3926669f34b55c477b6773e68d6d8dad34ffa34 100644 --- a/layouts/v7/modules/Calendar/resources/Calendar.js +++ b/layouts/v7/modules/Calendar/resources/Calendar.js @@ -952,6 +952,8 @@ Vtiger.Class("Calendar_Calendar_Js", { app.request.post({data: dataParams}).then(function (e, data) { if (!e) { widgetBody.html(data); + let fullCalendarViewHeight = $('.fc-view-container').height(); + widgetBody.css('max-height', (fullCalendarViewHeight - 10) + 'px'); app.helper.showVerticalScroll( widgetBody, { diff --git a/layouts/v7/modules/Calendar/uitypes/OwnerFieldTaskSearchView.tpl b/layouts/v7/modules/Calendar/uitypes/OwnerFieldTaskSearchView.tpl index 9176b0b16d95ca69838eea2061c92cc9e83fc382..f5f44a78bd861caea6760d5e3b328d7520de5abe 100644 --- a/layouts/v7/modules/Calendar/uitypes/OwnerFieldTaskSearchView.tpl +++ b/layouts/v7/modules/Calendar/uitypes/OwnerFieldTaskSearchView.tpl @@ -12,14 +12,15 @@ {strip} <div class=""> {assign var=ASSIGNED_USER_ID value=$FIELD_MODEL->get('name')} - {assign var=ALL_ACTIVEUSER_LIST value=$USER_MODEL->getAccessibleUsers()} + {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()} + {assign var=ALL_ACTIVEUSER_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_USERS')]} {assign var=SEARCH_VALUES value=explode(',',$SEARCH_INFO['searchValue'])} {assign var=SEARCH_VALUES value=array_map("trim",$SEARCH_VALUES)} {if $FIELD_MODEL->get('uitype') eq '52' || $FIELD_MODEL->get('uitype') eq '77'} {assign var=ALL_ACTIVEGROUP_LIST value=array()} {else} - {assign var=ALL_ACTIVEGROUP_LIST value=$USER_MODEL->getAccessibleGroups()} + {assign var=ALL_ACTIVEGROUP_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_GROUPS')]} {/if} {assign var=ACCESSIBLE_USER_LIST value=$USER_MODEL->getAccessibleUsersForModule($MODULE)} diff --git a/layouts/v7/modules/Contacts/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Contacts/DetailViewHeaderTitle.tpl index be2ec45526400c100509927cc7d06e39735d4c63..49af673726cef49d4e45dc72a3e0367e35352999 100644 --- a/layouts/v7/modules/Contacts/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Contacts/DetailViewHeaderTitle.tpl @@ -12,7 +12,7 @@ {strip} <div class="col-lg-6 col-md-6 col-sm-6"> <div class="record-header clearfix "> - <div class="hidden-sm hidden-xs recordImage bgcontacts app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgcontacts app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} {if !empty($IMAGE_INFO.url)} diff --git a/layouts/v7/modules/Contacts/resources/Detail.js b/layouts/v7/modules/Contacts/resources/Detail.js index 9fc987c721fcf3c396041c50c02eb91853c68272..cb2a98abe5b7cea438ce314c9f242bad97bcc10a 100644 --- a/layouts/v7/modules/Contacts/resources/Detail.js +++ b/layouts/v7/modules/Contacts/resources/Detail.js @@ -22,13 +22,16 @@ Vtiger_Detail_Js("Contacts_Detail_Js", {}, { checkForPortalUser: function (form) { var element = jQuery('[name="portal"]', form); var response = element.is(':checked'); - var primaryEmailField = jQuery('[data-name="email"]'); - var primaryEmailValue = primaryEmailField["0"].attributes["data-value"].value; + if (response) { + var primaryEmailField = jQuery('[data-name="email"]'); + if (primaryEmailField.length == 0) { app.helper.showErrorNotification({message: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS')}); return false; } + + var primaryEmailValue = primaryEmailField["0"].data("value"); if (primaryEmailValue == "") { app.helper.showErrorNotification({message: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER')}); return false; diff --git a/layouts/v7/modules/Documents/ModuleHeader.tpl b/layouts/v7/modules/Documents/ModuleHeader.tpl index c22873917a2fae87bddb6aaee19b63de95c5f16d..5d0cb4859af94ca03519e42c2e1e3c3015d2e599 100644 --- a/layouts/v7/modules/Documents/ModuleHeader.tpl +++ b/layouts/v7/modules/Documents/ModuleHeader.tpl @@ -26,7 +26,7 @@ {/if} {/if} <a title="{vtranslate($MODULE, $MODULE)}" href='{$DEFAULT_FILTER_URL}&app={$SELECTED_MENU_CATEGORY}'><h4 class="module-title pull-left textOverflowEllipsis text-uppercase"> {vtranslate($MODULE, $MODULE)} </h4></a> - {if $smarty.session.lvs.$MODULE.viewname} + {if $smarty.session.lvs.$MODULE.viewname} {assign var=VIEWID value=$smarty.session.lvs.$MODULE.viewname} {/if} {if $VIEWID} diff --git a/layouts/v7/modules/Documents/partials/SidebarEssentials.tpl b/layouts/v7/modules/Documents/partials/SidebarEssentials.tpl index c0b2c0c8bf3f46b1b90241fcbf2dd37f67484906..bb5a89c1af116210d6da252ce81069b564d3aa2a 100644 --- a/layouts/v7/modules/Documents/partials/SidebarEssentials.tpl +++ b/layouts/v7/modules/Documents/partials/SidebarEssentials.tpl @@ -19,9 +19,7 @@ <div> <input class="search-list" type="text" placeholder="Search for List"> </div> - <div class="menu-scroller mCustomScrollBox" data-mcs-theme="dark"> - <div class="mCustomScrollBox mCS-light-2 mCSB_inside" tabindex="0"> - <div class="mCSB_container" style="position:relative; top:0; left:0;"> + <div class="menu-scroller scrollContainer" style="position:relative; top:0; left:0;"> <div class="list-menu-content"> {if $CUSTOM_VIEWS && count($CUSTOM_VIEWS) > 0} {foreach key=GROUP_LABEL item=GROUP_CUSTOM_VIEWS from=$CUSTOM_VIEWS} @@ -36,12 +34,12 @@ {vtranslate('LBL_SHARED_LIST',$MODULE)} {/if} </h6> - <input type="hidden" name="allCvId" value="{CustomView_Record_Model::getAllFilterByModule($MODULE)->get('cvid')}" /> + <input type="hidden" name="allCvId" value="{CustomView_Record_Model::getAllFilterByModule($MODULE)->get('cvid')}" /> <ul class="lists-menu"> {foreach item="CUSTOM_VIEW" from=$GROUP_CUSTOM_VIEWS name="customView"} <li style="font-size:12px;" class='listViewFilter {if $VIEWID eq $CUSTOM_VIEW->getId() && ($CURRENT_TAG eq '') && !$FOLDER_VALUE} active{/if} {if $smarty.foreach.customView.iteration gt 5} filterHidden hide{/if} '> {assign var=VIEWNAME value={vtranslate($CUSTOM_VIEW->get('viewname'), $MODULE)}} - <a class="filterName" href="javascript:;" data-filter-id="{$CUSTOM_VIEW->getId()}">{if {$VIEWNAME|strlen > 40} } {$VIEWNAME|substr:0:40|@escape:'html'}..{else}{$VIEWNAME|@escape:'html'}{/if}</a> + <a class="filterName" href="javascript:;" data-filter-id="{$CUSTOM_VIEW->getId()}">{if {$VIEWNAME|strlen} > 40 } {$VIEWNAME|substr:0:40|@escape:'html'}..{else}{$VIEWNAME|@escape:'html'}{/if}</a> <div class=" pull-right"> <span class="js-popover-container"> <span class="fa fa-angle-down" rel="popover" data-toggle="popover" aria-expanded="true" @@ -91,13 +89,7 @@ <h6 class="lists-header"><center> {vtranslate('LBL_NO')} {vtranslate('Lists')} {vtranslate('LBL_FOUND')} ... </center></h6> </div> </div> - </div> - </div> - </div> - - <div class="list-menu-content"> - <div class="list-group"> - <div class="sidebar-header clearfix"> + </div><div class="sidebar-header clearfix"> <h5 class="pull-left">{vtranslate('LBL_FOLDERS',$MODULE)}</h5> <button id="createFolder" class="btn btn-default pull-right sidebar-btn"> <span class="fa fa-plus" aria-hidden="true"></span> @@ -107,43 +99,47 @@ <div> <input class="search-folders" type="text" placeholder="Search for Folders"> </div> - <div class="menu-scroller mCustomScrollBox" data-mcs-theme="dark"> - <div class="mCustomScrollBox mCS-light-2 mCSB_inside" tabindex="0"> - <div class="mCSB_container" style="position:relative; top:0; left:0;"> - <ul id="folders-list" class="lists-menu"> - {foreach item="FOLDER" from=$FOLDERS} - {assign var=FOLDERNAME value={vtranslate($FOLDER->get('foldername'), $MODULE)}} - <li style="font-size:12px;" class='documentFolder {if $FOLDER_VALUE eq $FOLDER->getName()} active{/if}'> - <a class="filterName" href="javascript:void(0);" data-filter-id="{$FOLDER->get('folderid')}" data-folder-name="{$FOLDER->get('foldername')}" title="{$FOLDERNAME}"> - <i class="fa {if $FOLDER_VALUE eq $FOLDER->getName()}fa-folder-open{else}fa-folder{/if}"></i> - <span class="foldername">{if {$FOLDERNAME|strlen > 40} } {$FOLDERNAME|substr:0:40|@escape:'html'}..{else}{$FOLDERNAME|@escape:'html'}{/if}</span> - </a> - {if $FOLDER->getName() neq 'Default' && $FOLDER->getName() neq 'Google Drive' && $FOLDER->getName() neq 'Dropbox'} - <div class="dropdown pull-right"> - <span class="fa fa-caret-down dropdown-toggle" data-toggle="dropdown" aria-expanded="true"></span> - <ul class="dropdown-menu dropdown-menu-right vtDropDown" role="menu"> - <li class="editFolder " data-folder-id="{$FOLDER->get('folderid')}"> - <a role="menuitem" ><i class="fa fa-pencil-square-o"></i> Edit</a> - </li> - <li class="deleteFolder " data-deletable="{!$FOLDER->hasDocuments()}" data-folder-id="{$FOLDER->get('folderid')}"> - <a role="menuitem" ><i class="fa fa-trash"></i> Delete</a> - </li> - </ul> - </div> - {/if} - </li> - {/foreach} - <li class="noFolderText" style="display: none;"> - <h6 class="lists-header"><center> - {vtranslate('LBL_NO')} {vtranslate('LBL_FOLDERS', $MODULE)} {vtranslate('LBL_FOUND')} ... - </center></h6> - </li> - </ul> - </div> - </div> - </div> + <div class="menu-scroller scrollContainer" style="position:relative; top:0; left:0;"> + <div class="list-menu-content"> + <div class="list-group"> + <ul id="folders-list" class="lists-menu"> + {foreach item="FOLDER" from=$FOLDERS name="folderView"} + {assign var=FOLDERNAME value={vtranslate($FOLDER->get('foldername'), $MODULE)}} + <li style="font-size:12px;" class='documentFolder {if $FOLDER_VALUE eq $FOLDER->getName()} active{/if} {if $smarty.foreach.folderView.iteration gt 5} filterHidden hide{/if}'> + <a class="filterName" href="javascript:void(0);" data-filter-id="{$FOLDER->get('folderid')}" data-folder-name="{$FOLDER->get('foldername')}" title="{$FOLDERNAME}"> + <i class="fa {if $FOLDER_VALUE eq $FOLDER->getName()}fa-folder-open{else}fa-folder{/if}"></i> + <span class="foldername">{if {$FOLDERNAME|strlen} > 40 } {$FOLDERNAME|substr:0:40|@escape:'html'}..{else}{$FOLDERNAME|@escape:'html'}{/if}</span> + </a> + {if $FOLDER->getName() neq 'Default' && $FOLDER->getName() neq 'Google Drive' && $FOLDER->getName() neq 'Dropbox'} + <div class="dropdown pull-right"> + <span class="fa fa-caret-down dropdown-toggle" data-toggle="dropdown" aria-expanded="true"></span> + <ul class="dropdown-menu dropdown-menu-right vtDropDown" role="menu"> + <li class="editFolder " data-folder-id="{$FOLDER->get('folderid')}"> + <a role="menuitem" ><i class="fa fa-pencil-square-o"></i> Edit</a> + </li> + <li class="deleteFolder " data-deletable="{!$FOLDER->hasDocuments()}" data-folder-id="{$FOLDER->get('folderid')}"> + <a role="menuitem" ><i class="fa fa-trash"></i> Delete</a> + </li> + </ul> + </div> + {/if} + </li> + {/foreach} + <li class="noFolderText" style="display: none;"> + <h6 class="lists-header"><center> + {vtranslate('LBL_NO')} {vtranslate('LBL_FOLDERS', $MODULE)} {vtranslate('LBL_FOUND')} ... + </center></h6> + </li> + </ul> + <div class='clearfix'> + <a class="toggleFilterSize" data-more-text="Show more" data-less-text="Show less"> + {if $smarty.foreach.folderView.iteration gt 5} + {vtranslate('LBL_SHOW_MORE',Vtiger)} + {/if} + </a> + </div> </div> - </div> + </div></div> </div> </div> @@ -153,9 +149,7 @@ {vtranslate('LBL_TAGS', $MODULE)} </h4> <hr> - <div class="menu-scroller mCustomScrollBox"> - <div class="mCustomScrollBox mCS-light-2 mCSB_inside" tabindex="0"> - <div class="mCSB_container" style="position:relative; top:0; left:0;"> + <div class="menu-scroller scrollContainer" style="position:relative; top:0; left:0;"> <div class="list-menu-content"> <div id="listViewTagContainer" class="multiLevelTagList" {if $ALL_CUSTOMVIEW_MODEL} data-view-id="{$ALL_CUSTOMVIEW_MODEL->getId()}" {/if} @@ -214,9 +208,9 @@ </button> </div> </div> - </div> - </div> </div> </div> </div> -</div> \ No newline at end of file +</div> + + diff --git a/layouts/v7/modules/Documents/resources/Documents.js b/layouts/v7/modules/Documents/resources/Documents.js index 2421d6bb34ae0e152c61e1cd22ff5c9531d527d5..7d04c8e3424537418b913e8bc58573619896fa4f 100644 --- a/layouts/v7/modules/Documents/resources/Documents.js +++ b/layouts/v7/modules/Documents/resources/Documents.js @@ -198,7 +198,10 @@ Vtiger.Class('Documents_Index_Js', { container.find('.fileDetails').text(fileName + ' (' + fileSize + ')'); var fileParts = fileName.split('.'); var fileType = fileParts[fileParts.length - 1]; - container.find('[name="notes_title"]').val(fileName.replace('.'+fileType, '')); + let notesTitle = container.find('[name="notes_title"]').val(); + if (!notesTitle.trim()) { + container.find('[name="notes_title"]').val(fileName.replace('.' + fileType, '')); + } } }, diff --git a/layouts/v7/modules/Emails/resources/MassEdit.js b/layouts/v7/modules/Emails/resources/MassEdit.js index e6ef4460198976e50292b48032a941d5313572b6..830481f6ddb567d1d789f6ecb93a2c9efa6eb95d 100644 --- a/layouts/v7/modules/Emails/resources/MassEdit.js +++ b/layouts/v7/modules/Emails/resources/MassEdit.js @@ -281,6 +281,11 @@ jQuery.Class("Emails_MassEdit_Js",{},{ return { id: term, text: term }; } }, + escapeMarkup: function(m) { + // Do not escape HTML in the select options text + m = vtUtils.stripTags(String(m),'<i><b>'); + return m; + } }).on("change", function (selectedData) { var addedElement = selectedData.added; @@ -367,7 +372,7 @@ jQuery.Class("Emails_MassEdit_Js",{},{ var emailInfo = { 'recordId' : key, 'id' : emailId, - 'text' : toEmailNamesList[key][i].label+' <b>('+emailId+')</b>' + 'text' : toEmailNamesList[key][i].label+' ('+emailId+')' } preloadData.push(emailInfo); if (jQuery.inArray(emailId, toFieldValues) != -1) { @@ -586,7 +591,7 @@ jQuery.Class("Emails_MassEdit_Js",{},{ var emailInfo = { 'recordId' : object.id, 'id' : object.emailid, - 'text' : object.name+' <b>('+object.emailid+')</b>' + 'text' : object.name+' ('+object.emailid+')' } preloadData.push(emailInfo); thisInstance.setPreloadData(preloadData); diff --git a/layouts/v7/modules/HelpDesk/DetailViewHeaderTitle.tpl b/layouts/v7/modules/HelpDesk/DetailViewHeaderTitle.tpl index 918af0b4535e35c5725dfd4bfb31a3acca86a24c..188008a7696c6b7f2a0302a22c6a854e36cf8b24 100644 --- a/layouts/v7/modules/HelpDesk/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/HelpDesk/DetailViewHeaderTitle.tpl @@ -12,7 +12,7 @@ {strip} <div class="col-sm-6 col-lg-6 col-md-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bghelpdesk app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bghelpdesk app-{$SELECTED_MENU_CATEGORY}"> <div class="name"><span><strong>{$MODULE_MODEL->getModuleIcon()}</strong></span></div> </div> <div class="recordBasicInfo"> diff --git a/layouts/v7/modules/Inventory/partials/LineItemsEdit.tpl b/layouts/v7/modules/Inventory/partials/LineItemsEdit.tpl index ebaa0c37711f5af3cd5cebed2baa554bc3691eab..c848e3de61ca669a056b2c003d475e17fce0887d 100644 --- a/layouts/v7/modules/Inventory/partials/LineItemsEdit.tpl +++ b/layouts/v7/modules/Inventory/partials/LineItemsEdit.tpl @@ -75,12 +75,12 @@ {if $BLOCK_FIELDS|@count gt 0} <div class='fieldBlockContainer'> <div class="row"> - <div class="col-lg-5 col-md-5 col-sm-5"> + <div class="col-sm-3"> + <h4 class='fieldBlockHeader' style="margin-top:5px;">{vtranslate($BLOCK_LABEL, $MODULE)}</h4> + </div> + <div class="col-sm-9 well"> <div class="row"> - <div class="col-lg-4 col-md-4 col-sm-4"> - <h4 class='fieldBlockHeader' style="margin-top:5px;">{vtranslate($BLOCK_LABEL, $MODULE)}</h4> - </div> - <div class="col-lg-8 col-md-8 col-sm-8" style="top: 3px;"> + <div class="col-sm-4"> {if $LINEITEM_FIELDS['region_id'] && $LINEITEM_FIELDS['region_id']->isEditable()} <span class="pull-right"> <i class="fa fa-info-circle"></i> @@ -92,54 +92,54 @@ {/foreach} </select> <input type="hidden" id="prevRegionId" value="{$RECORD->get('region_id')}" /> - <a class="fa fa-wrench" href="index.php?module=Vtiger&parent=Settings&view=TaxIndex" target="_blank" style="vertical-align:middle;"></a> - </span> + <a class="fa fa-wrench hidden-xs" href="index.php?module=Vtiger&parent=Settings&view=TaxIndex" target="_blank" style="vertical-align:middle;"></a> + </span> {/if} </div> - </div> - </div> - <div class="col-lg-3 col-md-3 col-sm-3" style="top: 3px;"> - <center> - <i class="fa fa-info-circle"></i> - <label>{vtranslate('LBL_CURRENCY',$MODULE)}</label> - {assign var=SELECTED_CURRENCY value=$CURRENCINFO} - {* Lookup the currency information if not yet set - create mode *} - {if $SELECTED_CURRENCY eq ''} - {assign var=USER_CURRENCY_ID value=$USER_MODEL->get('currency_id')} - {foreach item=currency_details from=$CURRENCIES} - {if $currency_details.curid eq $USER_CURRENCY_ID} - {assign var=SELECTED_CURRENCY value=$currency_details} + <div class="col-sm-4"> + <div class="pull-right"> + <i class="fa fa-info-circle"></i> + <label>{vtranslate('LBL_CURRENCY',$MODULE)}</label> + {assign var=SELECTED_CURRENCY value=$CURRENCINFO} + {* Lookup the currency information if not yet set - create mode *} + {if $SELECTED_CURRENCY eq ''} + {assign var=USER_CURRENCY_ID value=$USER_MODEL->get('currency_id')} + {foreach item=currency_details from=$CURRENCIES} + {if $currency_details.curid eq $USER_CURRENCY_ID} + {assign var=SELECTED_CURRENCY value=$currency_details} + {/if} + {/foreach} {/if} - {/foreach} - {/if} - <select class="select2" id="currency_id" name="currency_id" style="width: 150px;"> - {foreach item=currency_details key=count from=$CURRENCIES} - <option value="{$currency_details.curid}" class="textShadowNone" data-conversion-rate="{$currency_details.conversionrate}" {if $SELECTED_CURRENCY.currency_id eq $currency_details.curid} selected {/if}> - {$currency_details.currencylabel|@getTranslatedCurrencyString} ({$currency_details.currencysymbol}) - </option> - {/foreach} - </select> + <select class="select2" id="currency_id" name="currency_id" style="width: 150px;"> + {foreach item=currency_details key=count from=$CURRENCIES} + <option value="{$currency_details.curid}" class="textShadowNone" data-conversion-rate="{$currency_details.conversionrate}" {if $SELECTED_CURRENCY.currency_id eq $currency_details.curid} selected {/if}> + {$currency_details.currencylabel|@getTranslatedCurrencyString} ({$currency_details.currencysymbol}) + </option> + {/foreach} + </select> - {assign var="RECORD_CURRENCY_RATE" value=$RECORD_STRUCTURE_MODEL->getRecord()->get('conversion_rate')} - {if $RECORD_CURRENCY_RATE eq ''} - {assign var="RECORD_CURRENCY_RATE" value=$SELECTED_CURRENCY.conversionrate} - {/if} - <input type="hidden" name="conversion_rate" id="conversion_rate" value="{$RECORD_CURRENCY_RATE}" /> - <input type="hidden" value="{$SELECTED_CURRENCY.currency_id}" id="prev_selected_currency_id" /> - <!-- TODO : To get default currency in even better way than depending on first element --> - <input type="hidden" id="default_currency_id" value="{$CURRENCIES.0.curid}" /> - <input type="hidden" value="{$SELECTED_CURRENCY.currency_id}" id="selectedCurrencyId" /> - </center> - </div> - <div class="col-lg-4 col-md-4 col-sm-4" style="top: 3px;"> - <div style="float: right;"> - <i class="fa fa-info-circle"></i> - <label>{vtranslate('LBL_TAX_MODE',$MODULE)}</label> - <select class="select2 lineItemTax" id="taxtype" name="taxtype" style="width: 150px;"> - <option value="individual" {if $IS_INDIVIDUAL_TAX_TYPE}selected{/if}>{vtranslate('LBL_INDIVIDUAL', $MODULE)}</option> - <option value="group" {if $IS_GROUP_TAX_TYPE}selected{/if}>{vtranslate('LBL_GROUP', $MODULE)}</option> - </select> + {assign var="RECORD_CURRENCY_RATE" value=$RECORD_STRUCTURE_MODEL->getRecord()->get('conversion_rate')} + {if $RECORD_CURRENCY_RATE eq ''} + {assign var="RECORD_CURRENCY_RATE" value=$SELECTED_CURRENCY.conversionrate} + {/if} + <input type="hidden" name="conversion_rate" id="conversion_rate" value="{$RECORD_CURRENCY_RATE}" /> + <input type="hidden" value="{$SELECTED_CURRENCY.currency_id}" id="prev_selected_currency_id" /> + <!-- TODO : To get default currency in even better way than depending on first element --> + <input type="hidden" id="default_currency_id" value="{$CURRENCIES.0.curid}" /> + <input type="hidden" value="{$SELECTED_CURRENCY.currency_id}" id="selectedCurrencyId" /> + </div> + </div> + <div class="col-sm-4"> + <div class="pull-right"> + <i class="fa fa-info-circle"></i> + <label>{vtranslate('LBL_TAX_MODE',$MODULE)}</label> + <select class="select2 lineItemTax" id="taxtype" name="taxtype" style="width: 150px;"> + <option value="individual" {if $IS_INDIVIDUAL_TAX_TYPE}selected{/if}>{vtranslate('LBL_INDIVIDUAL', $MODULE)}</option> + <option value="group" {if $IS_GROUP_TAX_TYPE}selected{/if}>{vtranslate('LBL_GROUP', $MODULE)}</option> + </select> + </div> + </div> </div> </div> </div> diff --git a/layouts/v7/modules/Inventory/resources/Edit.js b/layouts/v7/modules/Inventory/resources/Edit.js index 1f1f5abdb35bf1ffd22d54d136f2038ed063132d..d4952e72ad1f15f570f482677c0158a764142a58 100644 --- a/layouts/v7/modules/Inventory/resources/Edit.js +++ b/layouts/v7/modules/Inventory/resources/Edit.js @@ -2576,6 +2576,10 @@ Vtiger_Edit_Js("Inventory_Edit_Js", { var objectToMapAddress; if(elementClass == "accountAddress"){ var recordRelativeAccountId = jQuery('[name="account_id"]').val(); + if(typeof recordRelativeAccountId == 'undefined'){ + app.helper.showErrorNotification({'message':app.vtranslate('JS_RELATED_ACCOUNT_IS_NOT_AVAILABLE')}); + return; + } if(recordRelativeAccountId == "" || recordRelativeAccountId == "0"){ app.helper.showErrorNotification({'message':app.vtranslate('JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS')}); } else { @@ -2595,8 +2599,12 @@ Vtiger_Edit_Js("Inventory_Edit_Js", { } }else if(elementClass == "contactAddress"){ var recordRelativeContactId = jQuery('[name="contact_id"]').val(); + if(typeof recordRelativeContactId == 'undefined'){ + app.helper.showErrorNotification({'message':app.vtranslate('JS_RELATED_CONTACT_IS_NOT_AVAILABLE')}); + return; + } if(recordRelativeContactId == "" || recordRelativeContactId == "0"){ - app.helper.showErrorNotification({'message':app.vtranslate('JS_PLEASE_SELECT_AN_RELATED_TO_COPY_ADDRESS')}); + app.helper.showErrorNotification({'message':app.vtranslate('JS_PLEASE_SELECT_AN_RELATED_TO_COPY_ADDRESS')}); } else { var recordRelativeContactName = jQuery('#contact_id_display').val(); var editViewLabel = jQuery('#contact_id_display').closest('td'); diff --git a/layouts/v7/modules/Invoice/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Invoice/DetailViewHeaderTitle.tpl index 00976a9bd48ceff7a4af2736211add6a0b8b6c6e..fa8eb319215e452f9f12e31510de8caddcf45b6c 100644 --- a/layouts/v7/modules/Invoice/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Invoice/DetailViewHeaderTitle.tpl @@ -12,10 +12,10 @@ {strip} <div class="col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bginvoice app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bginvoice app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100%" align="left"><br> {else} <img src="{vimage_path('summary_organizations.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Leads/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Leads/DetailViewHeaderTitle.tpl index cf005265fd4fe6db065d42f6ee6e5422b2cf443b..37eafff2013d3b96f1299046cb31587ce71d7b18 100644 --- a/layouts/v7/modules/Leads/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Leads/DetailViewHeaderTitle.tpl @@ -15,7 +15,7 @@ <div class="hidden-sm hidden-xs recordImage bgleads app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100px" align="left"><br> {else} <img src="{vimage_path('summary_Leads.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/README.md b/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/README.md deleted file mode 100644 index 05416236720b0db3fbe82971c90541d98df7613c..0000000000000000000000000000000000000000 --- a/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# MaterialDesign-Webfont -Bower Dist for Material Design Webfont. This includes the Stock and Community icons in a single webfont collection. - -## Learn More - -https://github.com/Templarian/MaterialDesign diff --git a/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/preview.html b/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/preview.html deleted file mode 100644 index 00f8113de32298d3126ecf0961f710d8c3b32c0c..0000000000000000000000000000000000000000 --- a/layouts/v7/modules/Mobile/simple/resources/libs/md-icons/preview.html +++ /dev/null @@ -1,151 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8" /> - <title>Material Design Icons</title> - <style> - * { - margin: 0; - padding: 0; - } - - body { - margin: 0; - padding: 0; - background: #fff; - color: #222; - } - - h1, h2, div, footer { - font-family: "Helvetica Neue", Arial, sans-serif; - } - - h1 { - padding: 20px 20px 16px 20px; - font-size: 26px; - line-height: 26px; - font-weight: normal; - color: #FFF; - background-color: #2196F3; - } - - h1 svg { - vertical-align: middle; - width: 26px; - height: 26px; - margin: 0 6px 4px 0; - } - - h1 svg path { - fill: #FFF; - } - - h1 .version { - font-size: 14px; - background: #FFF; - padding: 4px 10px; - float: right; - border-radius: 2px; - margin: -3px 0 0 0; - color: #666; - font-weight: bold; - } - - h1 .version::before { - content: 'v'; - } - - h2 { - font-size: 18px; - padding: 20px; - } - - .icons { - padding: 0 20px 10px 20px; - -webkit-column-count: 5; - -moz-column-count: 5; - column-count: 5; - -webkit-column-gap: 20px; - -moz-column-gap: 20px; - column-gap: 20px; - } - - .icons div { - line-height: 2em; - cursor: pointer; - } - - .icons div:hover { - color: #3c90be; - } - - .icons div i { - display: inline-block; - width: 32px; - text-align: center; - } - - .mdi::before { - font-size: 24px; - } - - pre { - margin: 0 20px; - font-family: Consolas, monospace; - padding: 10px; - border: 1px solid #DDD; - background: #F1F1F1; - } - - footer { - padding: 20px; - color: #666; - border-top: 1px solid #DDD; - background: #F1F1F1; - } - - footer a { - color: #e91e63; - text-decoration: none; - } - </style> - <link href="css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" /> -</head> -<body> - <h1> - <svg> - <path d="M0,0H8V3H18V0H26V8H23V18H26V26H18V23H8V21H18V18H21V8H18V5H8V8H5V18H8V26H0V18H3V8H0V0M2,2V6H6V2H2M2,20V24H6V20H2M20,2V6H24V2H20M20,20V24H24V20H20Z"></path> - </svg> - Material Design Icons - <span class="version">1.2.64</span> - </h1> - - <h2>Usage</h2> - <pre><code><i class="mdi mdi-<span id="name">name</span>"></i></code></pre> - - <h2>Icons</h2> - <div class="icons" id="icons"></div> - - <footer>Generated with <a href="https://github.com/sapegin/grunt-webfont">grunt-webfont</a> at <a href="http://materialdesignicons.com/">MaterialDesignIcons.com</a>.</footer> - - <script type="text/javascript"> - (function () { - var icons = ['account', 'account-alert', 'account-box', 'account-box-outline', 'account-check', 'account-circle', 'account-key', 'account-location', 'account-minus', 'account-multiple', 'account-multiple-outline', 'account-multiple-plus', 'account-network', 'account-outline', 'account-plus', 'account-remove', 'account-search', 'account-star', 'account-star-variant', 'account-switch', 'airballoon', 'airplane', 'airplane-off', 'alarm', 'alarm-check', 'alarm-multiple', 'alarm-off', 'alarm-plus', 'album', 'alert', 'alert-box', 'alert-circle', 'alert-octagon', 'alpha', 'alphabetical', 'amazon', 'amazon-clouddrive', 'ambulance', 'android', 'android-debug-bridge', 'android-studio', 'apple', 'apple-finder', 'apple-ios', 'apple-mobileme', 'apple-safari', 'appnet', 'apps', 'archive', 'arrange-bring-forward', 'arrange-bring-to-front', 'arrange-send-backward', 'arrange-send-to-back', 'arrow-all', 'arrow-bottom-left', 'arrow-bottom-right', 'arrow-collapse', 'arrow-down', 'arrow-down-bold', 'arrow-down-bold-circle', 'arrow-down-bold-circle-outline', 'arrow-down-bold-hexagon-outline', 'arrow-expand', 'arrow-left', 'arrow-left-bold', 'arrow-left-bold-circle', 'arrow-left-bold-circle-outline', 'arrow-left-bold-hexagon-outline', 'arrow-right', 'arrow-right-bold', 'arrow-right-bold-circle', 'arrow-right-bold-circle-outline', 'arrow-right-bold-hexagon-outline', 'arrow-top-left', 'arrow-top-right', 'arrow-up', 'arrow-up-bold', 'arrow-up-bold-circle', 'arrow-up-bold-circle-outline', 'arrow-up-bold-hexagon-outline', 'at', 'attachment', 'audiobook', 'auto-fix', 'auto-upload', 'baby', 'backburger', 'backup-restore', 'bank', 'barcode', 'barley', 'barrel', 'basecamp', 'basket', 'basket-fill', 'basket-unfill', 'battery', 'battery-10', 'battery-20', 'battery-30', 'battery-40', 'battery-50', 'battery-60', 'battery-70', 'battery-80', 'battery-90', 'battery-alert', 'battery-charging-100', 'battery-charging-20', 'battery-charging-30', 'battery-charging-40', 'battery-charging-60', 'battery-charging-80', 'battery-charging-90', 'battery-minus', 'battery-negative', 'battery-outline', 'battery-plus', 'battery-positive', 'battery-unknown', 'beach', 'beaker', 'beaker-empty', 'beaker-empty-outline', 'beaker-outline', 'beats', 'beer', 'behance', 'bell', 'bell-off', 'bell-outline', 'bell-ring', 'bell-ring-outline', 'bell-sleep', 'beta', 'bike', 'bing', 'binoculars', 'bio', 'biohazard', 'bitbucket', 'black-mesa', 'blackberry', 'blinds', 'block-helper', 'blogger', 'bluetooth', 'bluetooth-audio', 'bluetooth-connect', 'bluetooth-settings', 'bluetooth-transfer', 'blur', 'blur-linear', 'blur-off', 'blur-radial', 'bone', 'book', 'book-multiple', 'book-multiple-variant', 'book-open', 'book-variant', 'bookmark', 'bookmark-check', 'bookmark-music', 'bookmark-outline', 'bookmark-outline-plus', 'bookmark-plus', 'bookmark-remove', 'border-all', 'border-bottom', 'border-color', 'border-horizontal', 'border-inside', 'border-left', 'border-none', 'border-outside', 'border-right', 'border-top', 'border-vertical', 'bowling', 'box', 'briefcase', 'briefcase-check', 'briefcase-download', 'briefcase-upload', 'brightness-1', 'brightness-2', 'brightness-3', 'brightness-4', 'brightness-5', 'brightness-6', 'brightness-7', 'brightness-auto', 'broom', 'brush', 'bug', 'bulletin-board', 'bullhorn', 'bus', 'cake', 'cake-variant', 'calculator', 'calendar', 'calendar-blank', 'calendar-check', 'calendar-clock', 'calendar-multiple', 'calendar-multiple-check', 'calendar-plus', 'calendar-remove', 'calendar-text', 'calendar-today', 'camcorder', 'camcorder-box', 'camcorder-box-off', 'camcorder-off', 'camera', 'camera-front', 'camera-front-variant', 'camera-iris', 'camera-party-mode', 'camera-rear', 'camera-rear-variant', 'camera-switch', 'camera-timer', 'candycane', 'car', 'car-wash', 'carrot', 'cart', 'cart-outline', 'cash', 'cash-100', 'cash-multiple', 'cash-usd', 'cast', 'cast-connected', 'castle', 'cat', 'cellphone', 'cellphone-android', 'cellphone-dock', 'cellphone-iphone', 'cellphone-link', 'cellphone-link-off', 'cellphone-settings', 'chair-school', 'chart-arc', 'chart-areaspline', 'chart-bar', 'chart-histogram', 'chart-line', 'chart-pie', 'check', 'check-all', 'checkbox-blank', 'checkbox-blank-circle', 'checkbox-blank-circle-outline', 'checkbox-blank-outline', 'checkbox-marked', 'checkbox-marked-circle', 'checkbox-marked-circle-outline', 'checkbox-marked-outline', 'checkbox-multiple-blank', 'checkbox-multiple-blank-outline', 'checkbox-multiple-marked', 'checkbox-multiple-marked-outline', 'checkerboard', 'chevron-double-down', 'chevron-double-left', 'chevron-double-right', 'chevron-double-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'church', 'cisco-webex', 'city', 'clipboard', 'clipboard-account', 'clipboard-alert', 'clipboard-arrow-down', 'clipboard-arrow-left', 'clipboard-check', 'clipboard-outline', 'clipboard-text', 'clippy', 'clock', 'clock-fast', 'close', 'close-box', 'close-box-outline', 'close-circle', 'close-circle-outline', 'close-network', 'closed-caption', 'cloud', 'cloud-check', 'cloud-circle', 'cloud-download', 'cloud-outline', 'cloud-outline-off', 'cloud-upload', 'code-array', 'code-braces', 'code-equal', 'code-greater-than', 'code-less-than', 'code-less-than-or-equal', 'code-not-equal', 'code-not-equal-variant', 'code-string', 'code-tags', 'codepen', 'coffee', 'coffee-to-go', 'coin', 'color-helper', 'comment', 'comment-account', 'comment-account-outline', 'comment-alert', 'comment-alert-outline', 'comment-check', 'comment-check-outline', 'comment-multiple-outline', 'comment-outline', 'comment-plus-outline', 'comment-processing', 'comment-processing-outline', 'comment-remove-outline', 'comment-text', 'comment-text-outline', 'compare', 'compass', 'compass-outline', 'console', 'content-copy', 'content-cut', 'content-duplicate', 'content-paste', 'content-save', 'content-save-all', 'contrast', 'contrast-box', 'contrast-circle', 'cow', 'credit-card', 'credit-card-multiple', 'crop', 'crop-free', 'crop-landscape', 'crop-portrait', 'crop-square', 'crosshairs', 'crosshairs-gps', 'crown', 'cube', 'cube-outline', 'cube-unfolded', 'cup', 'cup-water', 'currency-btc', 'currency-eur', 'currency-gbp', 'currency-inr', 'currency-rub', 'currency-try', 'currency-usd', 'cursor-default', 'cursor-default-outline', 'cursor-move', 'cursor-pointer', 'database', 'database-minus', 'database-outline', 'database-plus', 'debug-step-into', 'debug-step-out', 'debug-step-over', 'decimal-decrease', 'decimal-increase', 'delete', 'delete-variant', 'deskphone', 'desktop-mac', 'desktop-tower', 'details', 'deviantart', 'diamond', 'dice', 'dice-1', 'dice-2', 'dice-3', 'dice-4', 'dice-5', 'dice-6', 'directions', 'disk-alert', 'disqus', 'disqus-outline', 'division', 'division-box', 'dns', 'domain', 'dots-horizontal', 'dots-vertical', 'download', 'drag', 'drag-horizontal', 'drag-vertical', 'drawing', 'drawing-box', 'dribbble', 'dribbble-box', 'drone', 'dropbox', 'drupal', 'duck', 'dumbbell', 'earth', 'earth-off', 'edge', 'eject', 'elevation-decline', 'elevation-rise', 'elevator', 'email', 'email-open', 'email-outline', 'email-secure', 'emoticon', 'emoticon-cool', 'emoticon-devil', 'emoticon-happy', 'emoticon-neutral', 'emoticon-poop', 'emoticon-sad', 'emoticon-tongue', 'engine', 'engine-outline', 'equal', 'equal-box', 'eraser', 'escalator', 'etsy', 'evernote', 'exclamation', 'exit-to-app', 'export', 'eye', 'eye-off', 'eyedropper', 'eyedropper-variant', 'facebook', 'facebook-box', 'facebook-messenger', 'factory', 'fan', 'fast-forward', 'ferry', 'file', 'file-cloud', 'file-delimited', 'file-document', 'file-document-box', 'file-excel', 'file-excel-box', 'file-find', 'file-image', 'file-image-box', 'file-multiple', 'file-music', 'file-outline', 'file-pdf', 'file-pdf-box', 'file-powerpoint', 'file-powerpoint-box', 'file-presentation-box', 'file-video', 'file-word', 'file-word-box', 'file-xml', 'film', 'filmstrip', 'filmstrip-off', 'filter', 'filter-outline', 'filter-remove', 'filter-remove-outline', 'filter-variant', 'fire', 'firefox', 'fish', 'flag', 'flag-checkered', 'flag-outline', 'flag-outline-variant', 'flag-triangle', 'flag-variant', 'flash', 'flash-auto', 'flash-off', 'flashlight', 'flashlight-off', 'flattr', 'flip-to-back', 'flip-to-front', 'floppy', 'flower', 'folder', 'folder-account', 'folder-download', 'folder-google-drive', 'folder-image', 'folder-lock', 'folder-lock-open', 'folder-move', 'folder-multiple', 'folder-multiple-image', 'folder-multiple-outline', 'folder-outline', 'folder-plus', 'folder-remove', 'folder-upload', 'food', 'food-apple', 'food-variant', 'football', 'football-helmet', 'format-align-center', 'format-align-justify', 'format-align-left', 'format-align-right', 'format-bold', 'format-clear', 'format-color-fill', 'format-float-center', 'format-float-left', 'format-float-none', 'format-float-right', 'format-header-1', 'format-header-2', 'format-header-3', 'format-header-4', 'format-header-5', 'format-header-6', 'format-header-decrease', 'format-header-equal', 'format-header-increase', 'format-header-pound', 'format-indent-decrease', 'format-indent-increase', 'format-italic', 'format-line-spacing', 'format-list-bulleted', 'format-list-numbers', 'format-paint', 'format-paragraph', 'format-quote', 'format-size', 'format-strikethrough', 'format-subscript', 'format-superscript', 'format-text', 'format-textdirection-l-to-r', 'format-textdirection-r-to-l', 'format-underline', 'format-wrap-inline', 'format-wrap-square', 'format-wrap-tight', 'format-wrap-top-bottom', 'forum', 'forward', 'foursquare', 'fridge', 'fullscreen', 'fullscreen-exit', 'function', 'gamepad', 'gamepad-variant', 'gas-station', 'gavel', 'gender-female', 'gender-male', 'gender-male-female', 'gender-transgender', 'gift', 'git', 'github-box', 'github-circle', 'glass-flute', 'glass-mug', 'glass-stange', 'glass-tulip', 'glasses', 'gmail', 'google', 'google-chrome', 'google-circles', 'google-circles-communities', 'google-circles-extended', 'google-circles-group', 'google-controller', 'google-controller-off', 'google-drive', 'google-earth', 'google-glass', 'google-maps', 'google-pages', 'google-play', 'google-plus', 'google-plus-box', 'grid', 'grid-off', 'group', 'guitar', 'guitar-pick', 'guitar-pick-outline', 'hand-pointing-right', 'hanger', 'hangouts', 'harddisk', 'headphones', 'headphones-box', 'headphones-settings', 'headset', 'headset-dock', 'headset-off', 'heart', 'heart-box', 'heart-box-outline', 'heart-broken', 'heart-outline', 'help', 'help-circle', 'hexagon', 'hexagon-outline', 'history', 'hololens', 'home', 'home-modern', 'home-variant', 'hops', 'hospital', 'hospital-building', 'hospital-marker', 'hotel', 'houzz', 'houzz-box', 'human', 'human-child', 'human-male-female', 'image-album', 'image-area', 'image-area-close', 'image-broken', 'image-filter', 'image-filter-black-white', 'image-filter-center-focus', 'image-filter-drama', 'image-filter-frames', 'image-filter-hdr', 'image-filter-none', 'image-filter-tilt-shift', 'image-filter-vintage', 'import', 'inbox', 'information', 'information-outline', 'instagram', 'instapaper', 'internet-explorer', 'invert-colors', 'jira', 'jsfiddle', 'keg', 'key', 'key-change', 'key-minus', 'key-plus', 'key-remove', 'key-variant', 'keyboard', 'keyboard-backspace', 'keyboard-caps', 'keyboard-close', 'keyboard-off', 'keyboard-return', 'keyboard-tab', 'keyboard-variant', 'label', 'label-outline', 'language-csharp', 'language-css3', 'language-html5', 'language-javascript', 'language-python', 'language-python-text', 'laptop', 'laptop-chromebook', 'laptop-mac', 'laptop-windows', 'lastfm', 'launch', 'layers', 'layers-off', 'leaf', 'library', 'library-books', 'library-music', 'library-plus', 'lightbulb', 'lightbulb-outline', 'link', 'link-off', 'link-variant', 'link-variant-off', 'linkedin', 'linkedin-box', 'linux', 'lock', 'lock-open', 'lock-open-outline', 'lock-outline', 'login', 'logout', 'looks', 'loupe', 'lumx', 'magnet', 'magnet-on', 'magnify', 'magnify-minus', 'magnify-plus', 'mail-ru', 'map', 'map-marker', 'map-marker-circle', 'map-marker-multiple', 'map-marker-off', 'map-marker-radius', 'margin', 'markdown', 'marker-check', 'martini', 'material-ui', 'math-compass', 'maxcdn', 'medium', 'memory', 'menu', 'menu-down', 'menu-left', 'menu-right', 'menu-up', 'message', 'message-alert', 'message-draw', 'message-image', 'message-processing', 'message-reply', 'message-text', 'message-text-outline', 'message-video', 'microphone', 'microphone-off', 'microphone-outline', 'microphone-settings', 'microphone-variant', 'microphone-variant-off', 'minus', 'minus-box', 'minus-circle', 'minus-circle-outline', 'minus-network', 'monitor', 'monitor-multiple', 'more', 'motorbike', 'mouse', 'mouse-off', 'mouse-variant', 'mouse-variant-off', 'movie', 'multiplication', 'multiplication-box', 'music-box', 'music-box-outline', 'music-circle', 'music-note', 'music-note-eighth', 'music-note-half', 'music-note-off', 'music-note-quarter', 'music-note-sixteenth', 'music-note-whole', 'nature', 'nature-people', 'navigation', 'needle', 'nest-protect', 'nest-thermostat', 'newspaper', 'nfc', 'nfc-tap', 'nfc-variant', 'note', 'note-outline', 'note-text', 'numeric', 'numeric-0-box', 'numeric-0-box-multiple-outline', 'numeric-0-box-outline', 'numeric-1-box', 'numeric-1-box-multiple-outline', 'numeric-1-box-outline', 'numeric-2-box', 'numeric-2-box-multiple-outline', 'numeric-2-box-outline', 'numeric-3-box', 'numeric-3-box-multiple-outline', 'numeric-3-box-outline', 'numeric-4-box', 'numeric-4-box-multiple-outline', 'numeric-4-box-outline', 'numeric-5-box', 'numeric-5-box-multiple-outline', 'numeric-5-box-outline', 'numeric-6-box', 'numeric-6-box-multiple-outline', 'numeric-6-box-outline', 'numeric-7-box', 'numeric-7-box-multiple-outline', 'numeric-7-box-outline', 'numeric-8-box', 'numeric-8-box-multiple-outline', 'numeric-8-box-outline', 'numeric-9-box', 'numeric-9-box-multiple-outline', 'numeric-9-box-outline', 'numeric-9-plus-box', 'numeric-9-plus-box-multiple-outline', 'numeric-9-plus-box-outline', 'nutriton', 'odnoklassniki', 'office', 'oil', 'omega', 'onedrive', 'open-in-app', 'open-in-new', 'ornament', 'ornament-variant', 'outbox', 'owl', 'package', 'package-down', 'package-up', 'package-variant', 'package-variant-closed', 'palette', 'palette-advanced', 'panda', 'pandora', 'panorama', 'panorama-fisheye', 'panorama-horizontal', 'panorama-vertical', 'panorama-wide-angle', 'paper-cut-vertical', 'paperclip', 'parking', 'pause', 'pause-circle', 'pause-circle-outline', 'pause-octagon', 'pause-octagon-outline', 'paw', 'pen', 'pencil', 'pencil-box', 'pencil-box-outline', 'percent', 'pharmacy', 'phone', 'phone-bluetooth', 'phone-forward', 'phone-hangup', 'phone-in-talk', 'phone-incoming', 'phone-locked', 'phone-log', 'phone-missed', 'phone-outgoing', 'phone-paused', 'phone-settings', 'pig', 'pill', 'pin', 'pin-off', 'pine-tree', 'pine-tree-box', 'pinterest', 'pinterest-box', 'pizza', 'play', 'play-box-outline', 'play-circle', 'play-circle-outline', 'playlist-minus', 'playlist-plus', 'playstation', 'plus', 'plus-box', 'plus-circle', 'plus-circle-outline', 'plus-network', 'plus-one', 'pocket', 'poll', 'poll-box', 'polymer', 'popcorn', 'pound', 'pound-box', 'power', 'power-settings', 'power-socket', 'presentation', 'presentation-play', 'printer', 'printer-3d', 'pulse', 'puzzle', 'qrcode', 'quadcopter', 'quality-high', 'quicktime', 'radiator', 'radio', 'radio-tower', 'radioactive', 'radiobox-blank', 'radiobox-marked', 'raspberrypi', 'rdio', 'read', 'readability', 'receipt', 'recycle', 'redo', 'redo-variant', 'refresh', 'relative-scale', 'reload', 'remote', 'rename-box', 'repeat', 'repeat-off', 'repeat-once', 'replay', 'reply', 'reply-all', 'reproduction', 'resize-bottom-right', 'responsive', 'rewind', 'ribbon', 'road', 'rocket', 'rotate-3d', 'rotate-left', 'rotate-left-variant', 'rotate-right', 'rotate-right-variant', 'routes', 'rss', 'rss-box', 'ruler', 'run', 'sale', 'satellite', 'satellite-variant', 'scale', 'scale-bathroom', 'school', 'screen-rotation', 'screen-rotation-lock', 'script', 'sd', 'security', 'security-network', 'select', 'select-all', 'select-inverse', 'select-off', 'send', 'server', 'server-minus', 'server-network', 'server-network-off', 'server-off', 'server-plus', 'server-remove', 'server-security', 'settings', 'settings-box', 'shape-plus', 'share', 'share-variant', 'shield', 'shield-outline', 'shopping', 'shopping-music', 'shuffle', 'sigma', 'sign-caution', 'signal', 'silverware', 'silverware-fork', 'silverware-spoon', 'silverware-variant', 'sim-alert', 'sitemap', 'skip-next', 'skip-previous', 'skype', 'skype-business', 'sleep', 'sleep-off', 'smoking', 'smoking-off', 'snapchat', 'snowman', 'sofa', 'sort', 'sort-alphabetical', 'sort-ascending', 'sort-descending', 'sort-numeric', 'sort-variant', 'soundcloud', 'source-fork', 'source-pull', 'speaker', 'speaker-off', 'speedometer', 'spellcheck', 'spotify', 'spotlight', 'spotlight-beam', 'square-inc', 'square-inc-cash', 'stackoverflow', 'star', 'star-circle', 'star-half', 'star-outline', 'steam', 'stethoscope', 'stocking', 'stop', 'store', 'store-24-hour', 'stove', 'subway', 'sunglasses', 'swap-horizontal', 'swap-vertical', 'swim', 'sword', 'sync', 'sync-alert', 'sync-off', 'tab', 'tab-unselected', 'table', 'table-column-plus-after', 'table-column-plus-before', 'table-column-remove', 'table-column-width', 'table-edit', 'table-large', 'table-row-height', 'table-row-plus-after', 'table-row-plus-before', 'table-row-remove', 'tablet', 'tablet-android', 'tablet-ipad', 'tag', 'tag-faces', 'tag-multiple', 'tag-outline', 'tag-text-outline', 'taxi', 'teamviewer', 'telegram', 'television', 'television-guide', 'temperature-celsius', 'temperature-fahrenheit', 'temperature-kelvin', 'tennis', 'tent', 'terrain', 'text-to-speech', 'text-to-speech-off', 'texture', 'theater', 'theme-light-dark', 'thermometer', 'thermometer-lines', 'thumb-down', 'thumb-down-outline', 'thumb-up', 'thumb-up-outline', 'thumbs-up-down', 'ticket', 'ticket-account', 'tie', 'timelapse', 'timer', 'timer-10', 'timer-3', 'timer-off', 'timer-sand', 'timetable', 'toggle-switch', 'toggle-switch-off', 'tooltip', 'tooltip-edit', 'tooltip-image', 'tooltip-outline', 'tooltip-outline-plus', 'tooltip-text', 'tor', 'traffic-light', 'train', 'tram', 'transcribe', 'transcribe-close', 'transfer', 'tree', 'trello', 'trending-down', 'trending-neutral', 'trending-up', 'trophy', 'trophy-award', 'trophy-variant', 'truck', 'tshirt-crew', 'tshirt-v', 'tumblr', 'tumblr-reblog', 'twitch', 'twitter', 'twitter-box', 'twitter-circle', 'twitter-retweet', 'ubuntu', 'umbrella', 'umbrella-outline', 'undo', 'undo-variant', 'unfold-less', 'unfold-more', 'ungroup', 'untappd', 'upload', 'usb', 'vector-curve', 'vector-point', 'vector-square', 'verified', 'vibrate', 'video', 'video-off', 'video-switch', 'view-agenda', 'view-array', 'view-carousel', 'view-column', 'view-dashboard', 'view-day', 'view-grid', 'view-headline', 'view-list', 'view-module', 'view-quilt', 'view-stream', 'view-week', 'vimeo', 'vine', 'vk', 'vk-box', 'vk-circle', 'voicemail', 'volume-high', 'volume-low', 'volume-medium', 'volume-off', 'vpn', 'walk', 'wallet', 'wallet-giftcard', 'wallet-membership', 'wallet-travel', 'watch', 'watch-export', 'watch-import', 'water', 'water-off', 'water-pump', 'weather-cloudy', 'weather-fog', 'weather-hail', 'weather-lightning', 'weather-night', 'weather-partlycloudy', 'weather-pouring', 'weather-rainy', 'weather-snowy', 'weather-sunny', 'weather-sunset', 'weather-sunset-down', 'weather-sunset-up', 'weather-windy', 'weather-windy-variant', 'web', 'webcam', 'weight', 'weight-kilogram', 'whatsapp', 'wheelchair-accessibility', 'white-balance-auto', 'white-balance-incandescent', 'white-balance-irradescent', 'white-balance-sunny', 'wifi', 'wii', 'wikipedia', 'window-close', 'window-closed', 'window-maximize', 'window-minimize', 'window-open', 'window-restore', 'windows', 'wordpress', 'worker', 'wunderlist', 'xbox', 'xbox-controller', 'xbox-controller-off', 'xda', 'xml', 'yeast', 'yelp', 'youtube-play', 'zip-box']; - for (var j = 0; j < icons.length; j++) { - var div = document.createElement('div'), - i = document.createElement('i'); - i.className = 'mdi mdi-' + icons[j]; - div.appendChild(i); - div.appendChild(document.createTextNode(' mdi-' + icons[j])); - div.onclick = (function (name) { - return function () { - document.getElementById('name').innerHTML = name; - }; - })(icons[j]); - document.getElementById('icons').appendChild(div); - } - })(); - </script> - -</body> -</html> diff --git a/layouts/v7/modules/Potentials/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Potentials/DetailViewHeaderTitle.tpl index 7aba6fb1329954b12619ebdd0ae83f6c0a5d7b79..d82019cad99e30e780acb4a0e0b9abd4fac0008f 100644 --- a/layouts/v7/modules/Potentials/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Potentials/DetailViewHeaderTitle.tpl @@ -12,7 +12,7 @@ {strip} <div class="col-sm-6 col-lg-6 col-md-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgpotentials app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgpotentials app-{$SELECTED_MENU_CATEGORY}"> <div class="name"><span><strong>{$MODULE_MODEL->getModuleIcon()}</strong></span></div> </div> diff --git a/layouts/v7/modules/Products/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Products/DetailViewHeaderTitle.tpl index 0dc6610d4b1e84fee68875293ac4dafe254c3c5c..e61ac96177bafcfc9f9af1ebd705853f7bdf876c 100644 --- a/layouts/v7/modules/Products/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Products/DetailViewHeaderTitle.tpl @@ -13,7 +13,7 @@ <div class="col-sm-6 col-lg-6 col-md-6"> <div class="record-header clearfix"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} - <div class="hidden-sm hidden-xs recordImage bgproducts app-{$SELECTED_MENU_CATEGORY}" {if $IMAGE_DETAILS|@count gt 1}style = "display:block"{/if}> + <div class="recordImage bgproducts app-{$SELECTED_MENU_CATEGORY}" {if $IMAGE_DETAILS|@count gt 1}style = "display:block"{/if}> {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} {if !empty($IMAGE_INFO.url)} {if $IMAGE_DETAILS|@count eq 1} diff --git a/layouts/v7/modules/PurchaseOrder/DetailViewHeaderTitle.tpl b/layouts/v7/modules/PurchaseOrder/DetailViewHeaderTitle.tpl index 88b5d62e016dd256766057290609f0be9a07107e..32f1128bd5fbc87695c02881a56a200395a85c95 100644 --- a/layouts/v7/modules/PurchaseOrder/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/PurchaseOrder/DetailViewHeaderTitle.tpl @@ -12,10 +12,10 @@ {strip} <div class="col-lg-6 col-md-6 col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgpurchaseorder app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgpurchaseorder app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100%" align="left"><br> {else} <img src="{vimage_path('summary_organizations.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Quotes/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Quotes/DetailViewHeaderTitle.tpl index 3ec010d240a67a648af04ce941fde90123e1d96b..d6e47f8a760a9e9f88f6c05d8f888ad71709e445 100644 --- a/layouts/v7/modules/Quotes/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Quotes/DetailViewHeaderTitle.tpl @@ -12,10 +12,10 @@ {strip} <div class="col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgquotes app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgquotes app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100%" align="left"><br> {else} <img src="{vimage_path('summary_organizations.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Reports/ListViewContents.tpl b/layouts/v7/modules/Reports/ListViewContents.tpl index 40718d5d7ddac995353c8bbf9598d1f79c8af3b7..54c098541333e9d492e54cb293880ae75f0133ce 100644 --- a/layouts/v7/modules/Reports/ListViewContents.tpl +++ b/layouts/v7/modules/Reports/ListViewContents.tpl @@ -73,12 +73,16 @@ </tr> {if $MODULE_MODEL->isQuickSearchEnabled() && !$SEARCH_MODE_RESULTS} - <tr class="searchRow"> - <th class="inline-search-btn"> - <div class="table-actions"> - <button class="btn btn-success btn-sm" data-trigger="listSearch">{vtranslate("LBL_SEARCH",$MODULE)}</button> - </div> - </th> + <tr class="searchRow listViewSearchContainer"> + <th class="inline-search-btn"> + <div class="table-actions"> + <button class="btn-sm btn btn-success {if count($SEARCH_DETAILS) gt 0}hide{/if}" data-trigger="listSearch"> + <i class="fa fa-search"></i> + <span class="s2-btn-text">{vtranslate("LBL_SEARCH",$MODULE)}</span> + </button> + <button class="searchAndClearButton btn-sm btn btn-danger {if count($SEARCH_DETAILS) eq 0}hide{/if}" data-trigger="clearListSearch"><i class="fa fa-close"></i> {vtranslate("LBL_CLEAR",$MODULE)}</button> + </div> + </th> {foreach item=LISTVIEW_HEADER key=LISTVIEW_HEADER_KEY from=$LISTVIEW_HEADERS} <th> {assign var="DATA_TYPE" value=$LISTVIEW_HEADER['type']} diff --git a/layouts/v7/modules/Reports/Step1.tpl b/layouts/v7/modules/Reports/Step1.tpl index d581273400c78b22bac25fef6a574bbcb11c8e87..f58aa9cf40b84c78d8828e4038a15aa53072305f 100644 --- a/layouts/v7/modules/Reports/Step1.tpl +++ b/layouts/v7/modules/Reports/Step1.tpl @@ -104,10 +104,18 @@ <label class='col-lg-3 control-label textAlignLeft'>{vtranslate('LBL_SHARE_REPORT',$MODULE)}</label> <div class='col-lg-4'> <select id="memberList" class="col-lg-12 select2-container select2 members " multiple="true" name="members[]" data-placeholder="{vtranslate('LBL_ADD_USERS_ROLES', $MODULE)}"> + <optgroup label="{vtranslate('LBL_ALL',$MODULE)}"> + <option value="All::Users" data-member-type="{vtranslate('LBL_ALL',$MODULE)}" + {if ($REPORT_MODEL->get('sharingtype') == 'Public')} selected="selected"{/if}> + {vtranslate('LBL_ALL_USERS',$MODULE)} + </option> + </optgroup> {foreach from=$MEMBER_GROUPS key=GROUP_LABEL item=ALL_GROUP_MEMBERS} <optgroup label="{$GROUP_LABEL}"> {foreach from=$ALL_GROUP_MEMBERS item=MEMBER} - <option value="{$MEMBER->getId()}" data-member-type="{$GROUP_LABEL}" {if isset($SELECTED_MEMBERS_GROUP[$GROUP_LABEL][$MEMBER->getId()])}selected="true"{/if}>{$MEMBER->getName()}</option> + {if $GROUP_LABEL neq 'Users' || $MEMBER->getId() neq 'Users:'|cat:$CURRENT_USER->getId()} + <option value="{$MEMBER->getId()}" data-member-type="{$GROUP_LABEL}" {if isset($SELECTED_MEMBERS_GROUP[$GROUP_LABEL][$MEMBER->getId()])}selected="true"{/if}>{$MEMBER->getName()}</option> + {/if} {/foreach} </optgroup> {/foreach} diff --git a/layouts/v7/modules/Reports/partials/SidebarEssentials.tpl b/layouts/v7/modules/Reports/partials/SidebarEssentials.tpl index 28ae2784418bed924079568ced1bba0809703ebd..c7193f77f2ab3cec9dc4624a7278c492aba86cf4 100644 --- a/layouts/v7/modules/Reports/partials/SidebarEssentials.tpl +++ b/layouts/v7/modules/Reports/partials/SidebarEssentials.tpl @@ -33,7 +33,7 @@ {foreach item=FOLDER from=$FOLDERS name="folderview"} <li style="font-size:12px;" class="listViewFilter {if $smarty.foreach.folderview.iteration gt 5} filterHidden hide{/if}" > {assign var=VIEWNAME value={vtranslate($FOLDER->getName(),$MODULE)}} - <a href="#" class='filterName' data-filter-id={$FOLDER->getId()}><i class="fa fa-folder foldericon"></i> {if {$VIEWNAME|strlen > 50} }{$VIEWNAME|substr:0:45}..{else}{$VIEWNAME}{/if}</a> + <a href="#" class='filterName' data-filter-id={$FOLDER->getId()}><i class="fa fa-folder foldericon"></i> {if {$VIEWNAME|strlen} > 50 }{$VIEWNAME|substr:0:45}..{else}{$VIEWNAME}{/if}</a> <div class="pull-right"> {assign var="FOLDERID" value=$FOLDER->get('folderid')} <span class="js-popover-container"> @@ -70,4 +70,4 @@ </div> </div> </div> -{/strip} \ No newline at end of file +{/strip} diff --git a/layouts/v7/modules/Reports/resources/Detail.js b/layouts/v7/modules/Reports/resources/Detail.js index 411ccf11e1d0857dc4d3ed45db55399c515bdde0..5792f5776a740b29500cc077a3b3be45cdb4ec1b 100644 --- a/layouts/v7/modules/Reports/resources/Detail.js +++ b/layouts/v7/modules/Reports/resources/Detail.js @@ -162,6 +162,25 @@ Vtiger_Detail_Js("Reports_Detail_Js",{},{ }); }, + registerOnlyAllUsersInSharedList : function(){ + var self = this; + jQuery('#memberList').on('change',function(e){ + var element = jQuery(e.currentTarget); + if(self.isAllUsersSelected()){ + element.find('option').not('[value="All::Users"]').prop('disabled',true); + element.select2('val',['All::Users']); + element.select2('close'); + }else{ + element.find('option').removeProp('disabled'); + } + }); + }, + + isAllUsersSelected : function() { + var memberList = jQuery('#memberList').val(); + return (memberList != null && (memberList.indexOf('All::Users') != -1)) ? true : false + }, + registerEvents : function(){ this.registerSaveOrGenerateReportEvent(); this.registerEventsForActions(); @@ -170,5 +189,6 @@ Vtiger_Detail_Js("Reports_Detail_Js",{},{ this.generateReportCount(parseInt(jQuery("#countValue").text())); this.registerConditionBlockChangeEvent(); this.registerEventForModifyCondition(); + this.registerOnlyAllUsersInSharedList(); } }); \ No newline at end of file diff --git a/layouts/v7/modules/Reports/resources/Edit.js b/layouts/v7/modules/Reports/resources/Edit.js index ae9d06696b993c464ade16cedae61a4ed77af706..1b7670878a5e6ed158e8cda43607431f85ddaf3a 100644 --- a/layouts/v7/modules/Reports/resources/Edit.js +++ b/layouts/v7/modules/Reports/resources/Edit.js @@ -157,6 +157,24 @@ Vtiger_Edit_Js("Reports_Edit_Js",{ }, registerPageLeaveEvents : function() { }, + registerOnlyAllUsersInSharedList : function(){ + var self = this; + jQuery('#memberList').on('change',function(e){ + var element = jQuery(e.currentTarget); + if(self.isAllUsersSelected()){ + element.find('option').not('[value="All::Users"]').prop('disabled',true); + element.select2('val',['All::Users']); + element.select2('close'); + }else{ + element.find('option').removeProp('disabled'); + } + }); + }, + + isAllUsersSelected : function() { + var memberList = jQuery('#memberList').val(); + return (memberList != null && (memberList.indexOf('All::Users') != -1)) ? true : false + }, registerEvents : function(){ this._super(); var statusToProceed = this.proceedRegisterEvents(); @@ -166,6 +184,7 @@ Vtiger_Edit_Js("Reports_Edit_Js",{ var form = this.currentInstance.getContainer(); this.registerFormSubmitEvent(form); this.registerBackStepClickEvent(); + this.registerOnlyAllUsersInSharedList(); } }); diff --git a/layouts/v7/modules/Rss/resources/List.js b/layouts/v7/modules/Rss/resources/List.js index c34408ffbaf2c567c9816d170c9649ef529962b0..76fb94e43445e756eb140dc9ed21c76888601aab 100644 --- a/layouts/v7/modules/Rss/resources/List.js +++ b/layouts/v7/modules/Rss/resources/List.js @@ -321,7 +321,8 @@ Vtiger_List_Js("Rss_List_Js",{},{ var container = this.getListViewContainer(); this.registerRssAddButtonClickEvent(); this.registerRssUrlClickEvent(); - this.registerFeedClickEvent(container); + //Avoiding this call as file_get_contents is not fetching data successfully. + //this.registerFeedClickEvent(container); this.registerMakeDefaultClickEvent(container); this.setFeedContainerHeight(container); } diff --git a/layouts/v7/modules/SalesOrder/DetailViewHeaderTitle.tpl b/layouts/v7/modules/SalesOrder/DetailViewHeaderTitle.tpl index 6095458f1a3665cb5529303914392b76d86b3aee..c8a3135ec7bdaa28d63fdaba3f5a7ad069801781 100644 --- a/layouts/v7/modules/SalesOrder/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/SalesOrder/DetailViewHeaderTitle.tpl @@ -12,10 +12,10 @@ {strip} <div class="col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgsalesorder app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgsalesorder app-{$SELECTED_MENU_CATEGORY}"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.path)} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" width="100%" height="100%" align="left"><br> {else} <img src="{vimage_path('summary_organizations.png')}" class="summaryImg"/> diff --git a/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js b/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js index 0b70ee7040abee94271120d73d55b8a5df93c3bf..603295ad483fb289926f00a407a999790458ae88 100644 --- a/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js +++ b/layouts/v7/modules/Settings/LayoutEditor/resources/LayoutEditor.js @@ -537,6 +537,12 @@ Vtiger.Class('Settings_LayoutEditor_Js', { for (var i in fieldOptions) { var fieldValue = fieldOptions[i]; + var specialChars = /[<\>\"\,\[\]\{\}]/; + if (specialChars.test(fieldValue)) { + var message = app.vtranslate('JS_SPECIAL_CHARACTERS') + " < > \" , [ ] { } " + app.vtranslate('JS_NOT_ALLOWED'); + vtUtils.showValidationMessage(element, message, {container:data}); + return false; + } var fieldValueOption = defaultOptions.filter('[value="'+fieldValue+'"]'); if (fieldValueOption.length <= 0) { newOptions += ' <option value="'+fieldValue+'">'+fieldValue+'</option> '; diff --git a/layouts/v7/modules/Settings/Profiles/DetailView.tpl b/layouts/v7/modules/Settings/Profiles/DetailView.tpl index 552bee433865965947e96e052996ccfa67977792..f0aa84866c6edbfeed022e42559eff0f1a5ebc93 100644 --- a/layouts/v7/modules/Settings/Profiles/DetailView.tpl +++ b/layouts/v7/modules/Settings/Profiles/DetailView.tpl @@ -91,7 +91,6 @@ </thead> <tbody> {foreach from=$RECORD_MODEL->getModulePermissions() key=TABID item=PROFILE_MODULE} - {assign var=IS_RESTRICTED_MODULE value=$RECORD_MODEL->isRestrictedModule($PROFILE_MODULE->getName())} <tr> {assign var=MODULE_PERMISSION value=$RECORD_MODEL->hasModulePermission($PROFILE_MODULE)} <td data-module-name='{$PROFILE_MODULE->getName()}' data-module-status='{$MODULE_PERMISSION}'> @@ -102,7 +101,7 @@ {assign var="ACTION_MODEL" value=$ALL_BASIC_ACTIONS[$ACTION_ID]} {assign var=MODULE_ACTION_PERMISSION value=$RECORD_MODEL->hasModuleActionPermission($PROFILE_MODULE, $ACTION_MODEL)} <td data-action-state='{$ACTION_MODEL->getName()}' data-moduleaction-status='{$MODULE_ACTION_PERMISSION}' style="text-align: center;"> - {if !$IS_RESTRICTED_MODULE && $ACTION_MODEL->isModuleEnabled($PROFILE_MODULE)} + {if $ACTION_MODEL->isModuleEnabled($PROFILE_MODULE)} <img src="{if $MODULE_ACTION_PERMISSION}{$ENABLE_IMAGE_PATH}{else}{$DISABLE_IMAGE_PATH}{/if}" /> {/if} </td> @@ -220,4 +219,4 @@ </div> </div> </div> -{/strip} \ No newline at end of file +{/strip} diff --git a/layouts/v7/modules/Settings/Profiles/EditViewContents.tpl b/layouts/v7/modules/Settings/Profiles/EditViewContents.tpl index 0ebabbe0724bbed1cbba9587d25cd81eb6d16e94..e6267c44c851423289f8b7a0b87f3fd8a178d41b 100644 --- a/layouts/v7/modules/Settings/Profiles/EditViewContents.tpl +++ b/layouts/v7/modules/Settings/Profiles/EditViewContents.tpl @@ -114,7 +114,6 @@ {foreach from=$PROFILE_MODULES key=TABID item=PROFILE_MODULE} {assign var=MODULE_NAME value=$PROFILE_MODULE->getName()} {if $MODULE_NAME neq 'Events'} - {assign var=IS_RESTRICTED_MODULE value=$RECORD_MODEL->isRestrictedModule($MODULE_NAME)} <tr> <td class="verticalAlignMiddleImp"> <input class="modulesCheckBox" type="checkbox" name="permissions[{$TABID}][is_permitted]" data-value="{$TABID}" data-module-state="" {if $RECORD_MODEL->hasModulePermission($PROFILE_MODULE)}checked="true"{else} data-module-unchecked="true" {/if}> {$PROFILE_MODULE->get('label')|vtranslate:$PROFILE_MODULE->getName()} @@ -124,7 +123,7 @@ <td class="textAlignCenter verticalAlignMiddleImp"> {assign var="ACTION_MODEL" value=$ALL_BASIC_ACTIONS[$ORDERID]} {assign var=ACTION_ID value=$ACTION_MODEL->get('actionid')} - {if !$IS_RESTRICTED_MODULE && $ACTION_MODEL->isModuleEnabled($PROFILE_MODULE)} + {if $ACTION_MODEL->isModuleEnabled($PROFILE_MODULE)} <input class="action{$ACTION_ID}CheckBox" type="checkbox" name="permissions[{$TABID}][actions][{$ACTION_ID}]" data-action-state="{$ACTION_MODEL->getName()}" {if $RECORD_MODEL->hasModuleActionPermission($PROFILE_MODULE, $ACTION_MODEL)}checked="true"{elseif empty($RECORD_ID) && empty($IS_DUPLICATE_RECORD)} checked="true" {else} data-action{$ACTION_ID}-unchecked="true"{/if}></td> {/if} </td> diff --git a/layouts/v7/modules/Settings/Vtiger/ConfigEditorDetail.tpl b/layouts/v7/modules/Settings/Vtiger/ConfigEditorDetail.tpl index 859f3bec58004f9a3a02facf5033d7410de8dac2..bc17c893ba064d5d9df8c204dcf7ebdd5b028117 100644 --- a/layouts/v7/modules/Settings/Vtiger/ConfigEditorDetail.tpl +++ b/layouts/v7/modules/Settings/Vtiger/ConfigEditorDetail.tpl @@ -28,20 +28,18 @@ <div class="row form-group"><div class="col-lg-4 col-md-4 col-sm-4 fieldLabel"><label>{if $FIELD_NAME == 'upload_maxsize'}{if $FIELD_DATA[$FIELD_NAME] gt 5}{vtranslate($FIELD_DETAILS['label'], $QUALIFIED_MODULE,$FIELD_DATA[$FIELD_NAME])}{else}{vtranslate($FIELD_DETAILS['label'], $QUALIFIED_MODULE,5)}{/if}{else}{vtranslate($FIELD_DETAILS['label'], $QUALIFIED_MODULE)}{/if}</label></div> <div class="col-lg-8 col-md-8 col-sm-8 fieldValue break-word"> <div> - {if $FIELD_NAME == 'default_module'} - {vtranslate($FIELD_DATA[$FIELD_NAME], $FIELD_DATA[$FIELD_NAME])} - {else if $FIELD_DETAILS['fieldType'] == 'checkbox'} + {if $FIELD_DETAILS['fieldType'] == 'checkbox'} {vtranslate($FIELD_DATA[$FIELD_NAME], $QUALIFIED_MODULE)} {if $FIELD_NAME == 'email_tracking'} <div class="input-info-addon"><a class="fa fa-question-circle" data-toggle="tooltip" data-placement="right" title="{vtranslate('LBL_PERSONAL_EMAIL_TRACKING_INFO',$QUALIFIED_MODULE)}"></a></div> - {/if} - {else if $FIELD_NAME == 'default_reply_to'} + {/if} + {else if $FIELD_NAME == 'default_reply_to'} {vtranslate($FIELD_DATA[$FIELD_NAME])} <div class="input-info-addon"><a class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="{vtranslate('LBL_DEFAULT_REPLY_TO_INFO',$QUALIFIED_MODULE)}"></a></div> - {else} + {else} {$FIELD_DATA[$FIELD_NAME]} - {/if} - {if $FIELD_NAME == 'upload_maxsize'} + {/if} + {if $FIELD_NAME == 'upload_maxsize'} {vtranslate('LBL_MB', $QUALIFIED_MODULE)} {/if} </div> diff --git a/layouts/v7/modules/Settings/Vtiger/ConfigEditorEdit.tpl b/layouts/v7/modules/Settings/Vtiger/ConfigEditorEdit.tpl index 084309c97eeff789645e4811ccf32e049ca08f3e..aaf21c73bcb8b85f289ad8b25fe99ca0f58d7be6 100644 --- a/layouts/v7/modules/Settings/Vtiger/ConfigEditorEdit.tpl +++ b/layouts/v7/modules/Settings/Vtiger/ConfigEditorEdit.tpl @@ -35,7 +35,7 @@ <select class="select2-container inputElement select2 col-lg-11" name="{$FIELD_NAME}" > {foreach key=optionName item=optionLabel from=$MODEL->getPicklistValues($FIELD_NAME)} - {if $FIELD_NAME != 'default_module' && $FIELD_NAME != 'default_reply_to'} + {if $FIELD_NAME != 'default_reply_to'} <option {if $optionLabel == $FIELD_DATA[$FIELD_NAME]} selected {/if}>{vtranslate($optionLabel, $QUALIFIED_MODULE)}</option> {else if $FIELD_NAME == 'default_reply_to'} <option value="{$optionName}" {if $optionName == $FIELD_DATA[$FIELD_NAME]} selected {/if}>{vtranslate($optionName)}</option> diff --git a/layouts/v7/modules/Settings/Vtiger/ModuleHeader.tpl b/layouts/v7/modules/Settings/Vtiger/ModuleHeader.tpl index 85c86156b3b95dd58c2d0964de13aea94d922a3b..4057fd09be55172f1ccd9c4661c0e9c990c3bfbc 100644 --- a/layouts/v7/modules/Settings/Vtiger/ModuleHeader.tpl +++ b/layouts/v7/modules/Settings/Vtiger/ModuleHeader.tpl @@ -133,7 +133,7 @@ {/if} </li> {/foreach} - {if $LISTVIEW_LINKS['LISTVIEWSETTING']|@count gt 0} + {if !empty($LISTVIEW_LINKS['LISTVIEWSETTING']) && ($LISTVIEW_LINKS['LISTVIEWSETTING']|@count gt 0)} {if empty($QUALIFIEDMODULE)} {assign var=QUALIFIEDMODULE value=$MODULE} {/if} @@ -159,7 +159,7 @@ {/if} {assign var=RESTRICTED_MODULE_LIST value=['Users', 'EmailTemplates']} - {if $LISTVIEW_LINKS['LISTVIEWBASIC']|@count gt 0 and !in_array($MODULE, $RESTRICTED_MODULE_LIST)} + {if !empty($LISTVIEW_LINKS['LISTVIEWBASIC']) and ($LISTVIEW_LINKS['LISTVIEWBASIC']|@count gt 0) and (!in_array($MODULE, $RESTRICTED_MODULE_LIST))} {if empty($QUALIFIED_MODULE)} {assign var=QUALIFIED_MODULE value='Settings:'|cat:$MODULE} {/if} diff --git a/layouts/v7/modules/Settings/Workflows/AdvanceFilterCondition.tpl b/layouts/v7/modules/Settings/Workflows/AdvanceFilterCondition.tpl index eaaf653d63b3187100dd6e36d99d74efc6f02c60..a018f960af5a1201d91dbcfae4ab70d6c9f9afae 100644 --- a/layouts/v7/modules/Settings/Workflows/AdvanceFilterCondition.tpl +++ b/layouts/v7/modules/Settings/Workflows/AdvanceFilterCondition.tpl @@ -70,9 +70,11 @@ <option value="none">{vtranslate('LBL_NONE',$MODULE)}</option> {assign var=ADVANCE_FILTER_OPTIONS value=$ADVANCED_FILTER_OPTIONS_BY_TYPE[$FIELD_TYPE]} {foreach item=ADVANCE_FILTER_OPTION from=$ADVANCE_FILTER_OPTIONS} - <option value="{$ADVANCE_FILTER_OPTION}" {if $ADVANCE_FILTER_OPTION eq $CONDITION_INFO['comparator']} selected {/if}> - {vtranslate($ADVANCED_FILTER_OPTIONS[$ADVANCE_FILTER_OPTION])} - </option> + <option value="{$ADVANCE_FILTER_OPTION}" + {if $ADVANCE_FILTER_OPTION === $CONDITION_INFO['comparator']} + selected + {/if} + >{vtranslate($ADVANCED_FILTER_OPTIONS[$ADVANCE_FILTER_OPTION])}</option> {/foreach} </select> </span> diff --git a/layouts/v7/modules/Settings/Workflows/ListViewContents.tpl b/layouts/v7/modules/Settings/Workflows/ListViewContents.tpl index 53b5d355113503890e0fe0c7c73180850d13ff98..b292f67efbe55423b02c64529923ac818d55aeb0 100644 --- a/layouts/v7/modules/Settings/Workflows/ListViewContents.tpl +++ b/layouts/v7/modules/Settings/Workflows/ListViewContents.tpl @@ -41,7 +41,7 @@ <div class="col-md-4"> <div class="search-link hidden-xs" style="margin-top: 0px;"> <span aria-hidden="true" class="fa fa-search"></span> - <input class="searchWorkflows" type="text" type="text" value="{$SEARCH_VALUE}" placeholder="{vtranslate('LBL_WORKFLOW_SEARCH', $QUALIFIED_MODULE)}"> + <input class="searchWorkflows" type="text" value="{decode_html($SEARCH_VALUE)|htmlentities}" placeholder="{vtranslate('LBL_WORKFLOW_SEARCH', $QUALIFIED_MODULE)}"> </div> </div> <div class="col-md-3"> diff --git a/layouts/v7/modules/Settings/Workflows/resources/AdvanceFilter.js b/layouts/v7/modules/Settings/Workflows/resources/AdvanceFilter.js index cf26d355efd552bb8a9a431ea95033af64272670..d1559a86a1dbf47ccce49d3606ac791d6c4cd16f 100644 --- a/layouts/v7/modules/Settings/Workflows/resources/AdvanceFilter.js +++ b/layouts/v7/modules/Settings/Workflows/resources/AdvanceFilter.js @@ -22,12 +22,18 @@ Vtiger_AdvanceFilter_Js('Workflows_AdvanceFilter_Js',{},{ getFieldSpecificType : function(fieldSelected) { var fieldInfo = fieldSelected.data('fieldinfo'); var type = fieldInfo.type; - var workflowModule = jQuery('#advanceFilterContainer').find('[name="module_name"]').val(); + var workflowModule = jQuery('[name="module_name"]').val(); + var calendarModules = ["Calendar", "Events"]; if(workflowModule == 'Calendar') { if(fieldInfo.name == 'due_date') { type = 'date'; } } + if(calendarModules.includes(workflowModule)){ + if(fieldInfo.name == 'reminder_time'){ + type = 'integer'; + } + } return type; }, @@ -479,7 +485,7 @@ Vtiger_Owner_Field_Js('Workflows_Ownergroup_Field_Js',{},{ } }); -Vtiger_Picklist_Field_Js('Workflows_Picklist_Field_Js',{},{ +AdvanceFilter_Picklist_Field_Js('Workflows_Picklist_Field_Js',{},{ getUi : function(){ var selectedOption = app.htmlDecode(this.getValue()); diff --git a/layouts/v7/modules/Users/CalendarSettingsDetailView.tpl b/layouts/v7/modules/Users/CalendarSettingsDetailView.tpl index cb37e45d80a938eaae1868c82ece75e8b2c17fb9..f268a505c8b8e63594eab5e8c8453c8d142edd64 100644 --- a/layouts/v7/modules/Users/CalendarSettingsDetailView.tpl +++ b/layouts/v7/modules/Users/CalendarSettingsDetailView.tpl @@ -72,7 +72,7 @@ <td class="fieldValue {$WIDTHTYPE}"> <div id="imageContainer" width="300" height="200"> {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty({$IMAGE_INFO.orgname})} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" width="300" height="200"> {/if} {/foreach} diff --git a/layouts/v7/modules/Users/DetailViewBlockView.tpl b/layouts/v7/modules/Users/DetailViewBlockView.tpl index 50b41e2dca2647b40e7a9684e7e37bc072c1e06e..33ba6ff0023b9b68204654283e635585ab0e7bab 100644 --- a/layouts/v7/modules/Users/DetailViewBlockView.tpl +++ b/layouts/v7/modules/Users/DetailViewBlockView.tpl @@ -65,7 +65,7 @@ <td class="fieldValue {$WIDTHTYPE}"> <div id="imageContainer" width="300" height="200"> {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty({$IMAGE_INFO.orgname})} + {if !empty($IMAGE_INFO.url)} <img src="{$IMAGE_INFO.url}" width="300" height="200"> {/if} {/foreach} @@ -107,7 +107,11 @@ {/if} <span class="value textOverflowEllipsis" data-field-type="{$FIELD_MODEL->getFieldDataType()}" {if $FIELD_MODEL->get('uitype') eq '19' or $FIELD_MODEL->get('uitype') eq '20' or $FIELD_MODEL->get('uitype') eq '21'} style="white-space:normal;" {/if} {if $fieldDataType eq 'email'}title='{$FIELD_MODEL->get('fieldvalue')}'{/if} > + {if $FIELD_MODEL->getName() neq 'defaultlandingpage'} {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getDetailViewTemplateName(),$MODULE_NAME) FIELD_MODEL=$FIELD_MODEL USER_MODEL=$USER_MODEL MODULE=$MODULE_NAME RECORD=$RECORD} + {else} + {vtranslate($FIELD_MODEL->get('fieldvalue'),$FIELD_MODEL->get('fieldvalue'))} + {/if} </span> {if $IS_AJAX_ENABLED && $FIELD_MODEL->isEditable() eq 'true' && $FIELD_MODEL->isAjaxEditable() eq 'true'} <span class="hide edit pull-left"> diff --git a/layouts/v7/modules/Users/ListViewContents.tpl b/layouts/v7/modules/Users/ListViewContents.tpl index 4c505bde7f3a3c0c407c8a010aefb4f421f89609..6a1e33cd4873aebbaa21daf5195405a43326eda0 100644 --- a/layouts/v7/modules/Users/ListViewContents.tpl +++ b/layouts/v7/modules/Users/ListViewContents.tpl @@ -63,12 +63,20 @@ </thead> <tbody class="overflow-y"> {if $MODULE_MODEL->isQuickSearchEnabled() && !$SEARCH_MODE_RESULTS} - <tr class="searchRow"> - <th class="inline-search-btn"> - <div class="table-actions"> - <button class="btn btn-success btn-sm" data-trigger="listSearch">{vtranslate("LBL_SEARCH",$MODULE)}</button> - </div> - </th> + <tr class="searchRow listViewSearchContainer"> + <th class="user-inline-search-btn"> + <div class="table-actions"> + {assign var=HIDE_CLEAR_SEARCH value=false} + {if count($SEARCH_DETAILS) eq 0 || (is_array($SEARCH_DETAILS[0]) && count($SEARCH_DETAILS[0]) eq 0 && count($SEARCH_DETAILS) eq 1)} + {assign var=HIDE_CLEAR_SEARCH value=true} + {/if} + <button class="btn btn-sm btn-success {if !$HIDE_CLEAR_SEARCH}hide{/if}" data-trigger="listSearch"> + <i class="fa fa-search"></i> + <span class="s2-btn-text">{vtranslate("LBL_SEARCH",$MODULE)}</span> + </button> + <button class="searchAndClearButton btn btn-danger btn-sm {if $HIDE_CLEAR_SEARCH}hide{/if}" data-trigger="clearListSearch"><i class="fa fa-close"></i> {vtranslate("LBL_CLEAR",$MODULE)}</button> + </div> + </th> {foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS} {if $LISTVIEW_HEADER->getName() eq 'last_name' or $LISTVIEW_HEADER->getName() eq 'email1' or $LISTVIEW_HEADER->getName() eq 'status'} {continue} @@ -97,7 +105,7 @@ <div style="margin-left: -13px;"> {assign var=IMAGE_DETAILS value=$LISTVIEW_ENTRY->getImageDetails()} {foreach item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty({$IMAGE_INFO.orgname})} + {if !empty($IMAGE_INFO.url)} <div class='col-lg-2'> <img height="25px" width="25px" src="{$IMAGE_INFO.url}"> </div> diff --git a/layouts/v7/modules/Users/Login.tpl b/layouts/v7/modules/Users/Login.tpl index 9f87211f7e92c2c9453ee52880f9f37f3f174f2f..d023a15b4bb0e01c89f9d14af6cf3dafeaadcfef 100644 --- a/layouts/v7/modules/Users/Login.tpl +++ b/layouts/v7/modules/Users/Login.tpl @@ -15,7 +15,6 @@ background-position: center; background-size: cover; width: 100%; - height: 96%; background-repeat: no-repeat; } hr { @@ -64,14 +63,14 @@ width: 50%; } #page { - padding-top: 6%; + padding-top: 86px; } .widgetHeight { height: 410px; margin-top: 20px !important; } .loginDiv { - width: 380px; + max-width: 380px; margin: 0 auto; border-radius: 4px; box-shadow: 0 0 10px gray; @@ -204,8 +203,8 @@ </style> <span class="app-nav"></span> - <div class="col-lg-12"> - <div class="col-lg-5"> + <div class="container-fluid loginPageContainer"> + <div class="col-lg-5 col-md-12 col-sm-12 col-xs-12"> <div class="loginDiv widgetHeight"> <img class="img-responsive user-logo" src="layouts/v7/resources/Images/vtiger.png"> <div> @@ -255,11 +254,11 @@ </div> </div> - <div class="col-lg-1"> + <div class="col-lg-1 hidden-xs hidden-sm hidden-md"> <div class="separatorDiv"></div> </div> - <div class="col-lg-5"> + <div class="col-lg-5 hidden-xs hidden-sm hidden-md"> <div class="marketingDiv widgetHeight"> {if $JSON_DATA} <div class="scrollContainer"> diff --git a/layouts/v7/modules/Users/PreferenceDetailViewHeader.tpl b/layouts/v7/modules/Users/PreferenceDetailViewHeader.tpl index 3c6173ce5b42be83a27864c0577e201d58fee7d2..d9a79561b345437dd841da6058fa4e8d76b3696f 100644 --- a/layouts/v7/modules/Users/PreferenceDetailViewHeader.tpl +++ b/layouts/v7/modules/Users/PreferenceDetailViewHeader.tpl @@ -18,7 +18,7 @@ <div class="col-xs-8"> {assign var=IMAGE_DETAILS value=$RECORD->getImageDetails()} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.orgname)} + {if !empty($IMAGE_INFO.url)} <span class="logo col-xs-2"> <img height="75px" width="75px" src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" data-image-id="{$IMAGE_INFO.id}"> </span> diff --git a/layouts/v7/modules/Users/UserViewHeader.tpl b/layouts/v7/modules/Users/UserViewHeader.tpl index 0e4b6266523a7f5aeb39bce42caec5758232e6fe..754487eb3507f85796fa72369cc331f19a1383f1 100644 --- a/layouts/v7/modules/Users/UserViewHeader.tpl +++ b/layouts/v7/modules/Users/UserViewHeader.tpl @@ -18,7 +18,7 @@ <div class="col-md-5 recordImage" style="height: 50px;width: 50px;"> {assign var=NOIMAGE value=0} {foreach key=ITER item=IMAGE_INFO from=$RECORD->getImageDetails()} - {if !empty($IMAGE_INFO.url) && !empty($IMAGE_INFO.orgname)} + {if !empty($IMAGE_INFO.url)} <img height="100%" width="100%" src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" data-image-id="{$IMAGE_INFO.id}"> {else} {assign var=NOIMAGE value=1} diff --git a/layouts/v7/modules/Vendors/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Vendors/DetailViewHeaderTitle.tpl index dcde0e2a3632b192b937025bc7f1615ec990078f..b41b06588725e106642dbc63d81874722ea05f5c 100644 --- a/layouts/v7/modules/Vendors/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Vendors/DetailViewHeaderTitle.tpl @@ -12,7 +12,7 @@ {strip} <div class="col-lg-6 col-md-6 col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgvendors app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgvendors app-{$SELECTED_MENU_CATEGORY}"> <div class="name"><span><strong>{$MODULE_MODEL->getModuleIcon()}</strong></span></div> </div> <div class="recordBasicInfo"> diff --git a/layouts/v7/modules/Vtiger/AdvanceSearch.tpl b/layouts/v7/modules/Vtiger/AdvanceSearch.tpl index e2f4655f819f512e18c0028161f4a7b945f71633..26cab2d675f0f0b601c893bdcb8ece4505b9a396 100644 --- a/layouts/v7/modules/Vtiger/AdvanceSearch.tpl +++ b/layouts/v7/modules/Vtiger/AdvanceSearch.tpl @@ -77,4 +77,6 @@ </div> <div class="searchResults"> </div> -</div> \ No newline at end of file +</div> +{/strip} + diff --git a/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl b/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl index 5d3bc7c27739d78e63f9f8c466474de95edd4371..99f57dee328a2e270a41b6af98b26a5cf984e17b 100644 --- a/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl +++ b/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl @@ -43,7 +43,7 @@ <div class="row toEmailField"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_TO',$MODULE)} <span class="redColor">*</span></span> + <span class="">{vtranslate('LBL_TO',$MODULE)} <span class="redColor">*</span></span> </div> <div class="col-lg-6"> {if !empty($TO)} @@ -52,7 +52,7 @@ <input id="emailField" style="width:100%" name="toEmail" type="text" class="autoComplete sourceField select2" data-rule-required="true" data-rule-multiEmails="true" value="{$TO_EMAILS}" placeholder="{vtranslate('LBL_TYPE_AND_SEARCH',$MODULE)}"> </div> <div class="col-lg-4 input-group"> - <select style="width: 140px;" class="select2 emailModulesList pull-right"> + <select style="width: 140px;" class="select2 emailModulesList"> {foreach item=MODULE_NAME from=$RELATED_MODULES} <option value="{$MODULE_NAME}" {if $MODULE_NAME eq $FIELD_MODULE} selected {/if}>{vtranslate($MODULE_NAME,$MODULE_NAME)}</option> {/foreach} @@ -71,7 +71,7 @@ <div class="row {if empty($CC)} hide {/if} ccContainer"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_CC',$MODULE)}</span> + <span class="">{vtranslate('LBL_CC',$MODULE)}</span> </div> <div class="col-lg-6"> <input type="text" name="cc" data-rule-multiEmails="true" value="{if !empty($CC)}{$CC}{/if}"/> @@ -83,7 +83,7 @@ <div class="row {if empty($BCC)} hide {/if} bccContainer"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_BCC',$MODULE)}</span> + <span class="">{vtranslate('LBL_BCC',$MODULE)}</span> </div> <div class="col-lg-6"> <input type="text" name="bcc" data-rule-multiEmails="true" value="{if !empty($BCC)}{$BCC}{/if}"/> @@ -107,7 +107,7 @@ <div class="row subjectField"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_SUBJECT',$MODULE)} <span class="redColor">*</span></span> + <span class="">{vtranslate('LBL_SUBJECT',$MODULE)} <span class="redColor">*</span></span> </div> <div class="col-lg-6"> <input type="text" name="subject" value="{$SUBJECT}" data-rule-required="true" id="subject" spellcheck="true" class="inputElement"/> @@ -119,7 +119,7 @@ <div class="row attachment"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_ATTACHMENT',$MODULE)}</span> + <span class="">{vtranslate('LBL_ATTACHMENT',$MODULE)}</span> </div> <div class="col-lg-9"> <div class="row"> @@ -130,7 +130,7 @@ <button type="button" class="btn btn-small btn-default" id="browseCrm" data-url="{$DOCUMENTS_URL}" title="{vtranslate('LBL_BROWSE_CRM',$MODULE)}">{vtranslate('LBL_BROWSE_CRM',$MODULE)}</button> </div> <div class="col-lg-4 insertTemplate"> - <button id="selectEmailTemplate" class="btn btn-success pull-right" data-url="module=EmailTemplates&view=Popup">{vtranslate('LBL_SELECT_EMAIL_TEMPLATE',$MODULE)}</button> + <button id="selectEmailTemplate" class="btn btn-success" data-url="module=EmailTemplates&view=Popup">{vtranslate('LBL_SELECT_EMAIL_TEMPLATE',$MODULE)}</button> </div> </div> <div id="attachments"> @@ -156,7 +156,7 @@ <div class="row"> <div class="col-lg-12"> <div class="col-lg-2"> - <span class="pull-right">{vtranslate('LBL_INCLUDE_SIGNATURE',$MODULE)}</span> + <span class="">{vtranslate('LBL_INCLUDE_SIGNATURE',$MODULE)}</span> </div> <div class="item col-lg-9"> <input class="" type="checkbox" name="signature" value="Yes" checked="checked" id="signature"> diff --git a/layouts/v7/modules/Vtiger/DetailViewActions.tpl b/layouts/v7/modules/Vtiger/DetailViewActions.tpl index 3a1c788d95ba0093c7a91abd477debcebfc4a6e1..b1b0c59422fc22d393e748565a85b9a7220842f2 100644 --- a/layouts/v7/modules/Vtiger/DetailViewActions.tpl +++ b/layouts/v7/modules/Vtiger/DetailViewActions.tpl @@ -42,7 +42,7 @@ {vtranslate($DETAIL_VIEW_BASIC_LINK->getLabel(), $MODULE_NAME)} </button> {/foreach} - {if $DETAILVIEW_LINKS['DETAILVIEW']|@count gt 0} + {if !empty($DETAILVIEW_LINKS['DETAILVIEW']) && ($DETAILVIEW_LINKS['DETAILVIEW']|@count gt 0)} <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"> {vtranslate('LBL_MORE', $MODULE_NAME)} <i class="caret"></i> </button> diff --git a/layouts/v7/modules/Vtiger/DetailViewHeaderTitle.tpl b/layouts/v7/modules/Vtiger/DetailViewHeaderTitle.tpl index 66ac8a4e45ac8d518fa6abd694a8ea5055ff3c28..a2777bdfaa470ae182aafdca2767daa5685e32b9 100644 --- a/layouts/v7/modules/Vtiger/DetailViewHeaderTitle.tpl +++ b/layouts/v7/modules/Vtiger/DetailViewHeaderTitle.tpl @@ -13,7 +13,7 @@ {if !$MODULE} {assign var=MODULE value=$MODULE_NAME} {/if} - <div class="hidden-sm hidden-xs recordImage bg_{$MODULE} app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bg_{$MODULE} app-{$SELECTED_MENU_CATEGORY}"> <div class="name"><span><strong>{$MODULE_MODEL->getModuleIcon()}</strong></span></div> </div> diff --git a/layouts/v7/modules/Vtiger/ListViewContents.tpl b/layouts/v7/modules/Vtiger/ListViewContents.tpl index f2df599ab72fac2f7a585196fb0aaefedfc24261..61425fe545bb60645787e641e2efe08637f95e60 100644 --- a/layouts/v7/modules/Vtiger/ListViewContents.tpl +++ b/layouts/v7/modules/Vtiger/ListViewContents.tpl @@ -31,7 +31,7 @@ <input type='hidden' name="pageLimit" value="{$PAGING_MODEL->getPageLimit()}" id='pageLimit'> <input type="hidden" name="noOfEntries" value="{$LISTVIEW_ENTRIES_COUNT}" id="noOfEntries"> <input type="hidden" name="currentSearchParams" value="{Vtiger_Util_Helper::toSafeHTML(Zend_JSON::encode($SEARCH_DETAILS))}" id="currentSearchParams" /> - <input type="hidden" name="currentTagParams" value="{Vtiger_Util_Helper::toSafeHTML(Zend_JSON::encode($TAG_DETAILS))}" id="currentTagParams" /> + <input type="hidden" name="currentTagParams" value="{Vtiger_Util_Helper::toSafeHTML(Zend_JSON::encode($TAG_DETAILS))}" id="currentTagParams" /> <input type="hidden" name="noFilterCache" value="{$NO_SEARCH_PARAMS_CACHE}" id="noFilterCache" > <input type="hidden" name="orderBy" value="{$ORDER_BY}" id="orderBy"> <input type="hidden" name="sortOrder" value="{$SORT_ORDER}" id="sortOrder"> @@ -114,13 +114,17 @@ </tr> {if $MODULE_MODEL->isQuickSearchEnabled() && !$SEARCH_MODE_RESULTS} - <tr class="searchRow"> - <th class="inline-search-btn"> - <div class="table-actions"> - <button class="btn btn-success btn-sm" data-trigger="listSearch">{vtranslate("LBL_SEARCH",$MODULE)}</button> - </div> - </th> - {foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS} + <tr class="searchRow listViewSearchContainer"> + <th class="inline-search-btn"> + <div class="table-actions"> + <button class="btn btn-success btn-sm {if count($SEARCH_DETAILS) gt 0}hide{/if}" data-trigger="listSearch"> + <i class="fa fa-search"></i> + <span class="s2-btn-text">{vtranslate("LBL_SEARCH",$MODULE)}</span> + </button> + <button class="searchAndClearButton t-btn-sm btn btn-danger {if count($SEARCH_DETAILS) eq 0}hide{/if}" data-trigger="clearListSearch"><i class="fa fa-close"></i> {vtranslate("LBL_CLEAR",$MODULE)}</button> + </div> + </th> + {foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS} <th> {assign var=FIELD_UI_TYPE_MODEL value=$LISTVIEW_HEADER->getUITypeModel()} {include file=vtemplate_path($FIELD_UI_TYPE_MODEL->getListSearchTemplateName(),$MODULE) FIELD_MODEL= $LISTVIEW_HEADER SEARCH_INFO=$SEARCH_DETAILS[$LISTVIEW_HEADER->getName()] USER_MODEL=$CURRENT_USER_MODEL} diff --git a/layouts/v7/modules/Vtiger/ModuleHeader.tpl b/layouts/v7/modules/Vtiger/ModuleHeader.tpl index 808a48899ccd93936ecc7249a1474b4e39d5d1a6..963978fd80850d70768a315c413d52e7f99aabfb 100644 --- a/layouts/v7/modules/Vtiger/ModuleHeader.tpl +++ b/layouts/v7/modules/Vtiger/ModuleHeader.tpl @@ -8,9 +8,9 @@ *************************************************************************************} {strip} - <div class="col-sm-12 col-xs-12 module-action-bar clearfix coloredBorderTop"> + <div class="col-sm-11 col-xs-10 padding0 module-action-bar clearfix coloredBorderTop"> <div class="module-action-content clearfix {$MODULE}-module-action-content"> - <div class="col-lg-7 col-md-7 module-breadcrumb module-breadcrumb-{$smarty.request.view} transitionsAllHalfSecond"> + <div class="col-lg-7 col-md-6 col-sm-5 col-xs-11 padding0 module-breadcrumb module-breadcrumb-{$smarty.request.view} transitionsAllHalfSecond"> {assign var=MODULE_MODEL value=Vtiger_Module_Model::getInstance($MODULE)} {if $MODULE_MODEL->getDefaultViewName() neq 'List'} {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getDefaultUrl()} @@ -24,7 +24,7 @@ {/if} {/if} <a title="{vtranslate($MODULE, $MODULE)}" href='{$DEFAULT_FILTER_URL}&app={$SELECTED_MENU_CATEGORY}'><h4 class="module-title pull-left text-uppercase"> {vtranslate($MODULE, $MODULE)} </h4> </a> - {if $smarty.session.lvs.$MODULE.viewname} + {if $smarty.session.lvs.$MODULE.viewname} {assign var=VIEWID value=$smarty.session.lvs.$MODULE.viewname} {/if} {if $VIEWID} @@ -48,51 +48,66 @@ <p class="current-filter-name filter-name pull-left"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {$RECORD->get('label')} </a></p> {/if} </div> - <div class="col-lg-5 col-md-5 pull-right"> + <div class="col-lg-5 col-md-6 col-sm-7 col-xs-1 padding0 pull-right"> <div id="appnav" class="navbar-right"> - <ul class="nav navbar-nav"> - {foreach item=BASIC_ACTION from=$MODULE_BASIC_ACTIONS} - {if $BASIC_ACTION->getLabel() == 'LBL_IMPORT'} - <li> - <button id="{$MODULE}_basicAction_{Vtiger_Util_Helper::replaceSpaceWithUnderScores($BASIC_ACTION->getLabel())}" type="button" class="btn addButton btn-default module-buttons" - {if stripos($BASIC_ACTION->getUrl(), 'javascript:')===0} - onclick='{$BASIC_ACTION->getUrl()|substr:strlen("javascript:")};' - {else} - onclick="Vtiger_Import_Js.triggerImportAction('{$BASIC_ACTION->getUrl()}')" - {/if}> - <div class="fa {$BASIC_ACTION->getIcon()}" aria-hidden="true"></div> - {vtranslate($BASIC_ACTION->getLabel(), $MODULE)} - </button> - </li> - {else} - <li> - <button id="{$MODULE}_listView_basicAction_{Vtiger_Util_Helper::replaceSpaceWithUnderScores($BASIC_ACTION->getLabel())}" type="button" class="btn addButton btn-default module-buttons" - {if stripos($BASIC_ACTION->getUrl(), 'javascript:')===0} - onclick='{$BASIC_ACTION->getUrl()|substr:strlen("javascript:")};' - {else} - onclick='window.location.href = "{$BASIC_ACTION->getUrl()}&app={$SELECTED_MENU_CATEGORY}"' - {/if}> - <div class="fa {$BASIC_ACTION->getIcon()}" aria-hidden="true"></div> - {vtranslate($BASIC_ACTION->getLabel(), $MODULE)} - </button> - </li> - {/if} - {/foreach} - {if $MODULE_SETTING_ACTIONS|@count gt 0} - <li> - <div class="settingsIcon"> - <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="{vtranslate('LBL_SETTINGS', $MODULE)}"> - <span class="fa fa-wrench" aria-hidden="true"></span> {vtranslate('LBL_CUSTOMIZE', 'Reports')} <span class="caret"></span> - </button> - <ul class="detailViewSetting dropdown-menu"> - {foreach item=SETTING from=$MODULE_SETTING_ACTIONS} - <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME ,vtranslate($MODULE_NAME, $MODULE_NAME))}</a></li> - {/foreach} - </ul> - </div> - </li> + <nav class="navbar navbar-inverse border0 margin0"> + {if $MODULE_BASIC_ACTIONS|@count gt 0} + <div class="container-fluid"> + <div class="navbar-header bg-white marginTop5px"> + <button type="button" class="navbar-toggle collapsed margin0" data-toggle="collapse" data-target="#appnavcontent" aria-expanded="false"> + <i class="fa fa-ellipsis-v"></i> + </button> + </div> + + <div class="navbar-collapse collapse" id="appnavcontent" aria-expanded="false" style="height: 1px;"> + <ul class="nav navbar-nav"> + {foreach item=BASIC_ACTION from=$MODULE_BASIC_ACTIONS} + {if $BASIC_ACTION->getLabel() == 'LBL_IMPORT'} + <li> + <button id="{$MODULE}_basicAction_{Vtiger_Util_Helper::replaceSpaceWithUnderScores($BASIC_ACTION->getLabel())}" type="button" class="btn addButton btn-default module-buttons" + {if stripos($BASIC_ACTION->getUrl(), 'javascript:')===0} + onclick='{$BASIC_ACTION->getUrl()|substr:strlen("javascript:")};' + {else} + onclick="Vtiger_Import_Js.triggerImportAction('{$BASIC_ACTION->getUrl()}')" + {/if}> + <div class="fa {$BASIC_ACTION->getIcon()}" aria-hidden="true"></div> + {vtranslate($BASIC_ACTION->getLabel(), $MODULE)} + </button> + </li> + {else} + <li> + <button id="{$MODULE}_listView_basicAction_{Vtiger_Util_Helper::replaceSpaceWithUnderScores($BASIC_ACTION->getLabel())}" type="button" class="btn addButton btn-default module-buttons" + {if stripos($BASIC_ACTION->getUrl(), 'javascript:')===0} + onclick='{$BASIC_ACTION->getUrl()|substr:strlen("javascript:")};' + {else} + onclick='window.location.href = "{$BASIC_ACTION->getUrl()}&app={$SELECTED_MENU_CATEGORY}"' + {/if}> + <div class="fa {$BASIC_ACTION->getIcon()}" aria-hidden="true"></div> + {vtranslate($BASIC_ACTION->getLabel(), $MODULE)} + </button> + </li> + {/if} + {/foreach} + {if $MODULE_SETTING_ACTIONS|@count gt 0} + <li> + <div class="settingsIcon"> + <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="{vtranslate('LBL_SETTINGS', $MODULE)}"> + <span class="fa fa-wrench" aria-hidden="true"></span> {vtranslate('LBL_CUSTOMIZE', 'Reports')} <span class="caret"></span> + </button> + <ul class="detailViewSetting dropdown-menu"> + {foreach item=SETTING from=$MODULE_SETTING_ACTIONS} + <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME ,vtranslate($MODULE_NAME, $MODULE_NAME))}</a></li> + {/foreach} + </ul> + </div> + </li> + {/if} + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> {/if} - </ul> + </nav> </div> </div> </div> diff --git a/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl b/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl index 82a649b70fab6e51a5959257b899b178d7658287..fd74ac5f823c996ec30fc227fa509a7f4cdb5e25 100644 --- a/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl +++ b/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl @@ -9,108 +9,120 @@ {strip} <div class='related-tabs row'> - <ul class="nav nav-tabs"> - {foreach item=RELATED_LINK from=$DETAILVIEW_LINKS['DETAILVIEWTAB']} - {assign var=RELATEDLINK_URL value=$RELATED_LINK->getUrl()} - {assign var=RELATEDLINK_LABEL value=$RELATED_LINK->getLabel()} - {assign var=RELATED_TAB_LABEL value={vtranslate('SINGLE_'|cat:$MODULE_NAME, $MODULE_NAME)}|cat:" "|cat:$RELATEDLINK_LABEL} - <li class="tab-item {if $RELATED_TAB_LABEL==$SELECTED_TAB_LABEL}active{/if}" data-url="{$RELATEDLINK_URL}&tab_label={$RELATED_TAB_LABEL}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATEDLINK_LABEL}" data-link-key="{$RELATED_LINK->get('linkKey')}" > - <a href="{$RELATEDLINK_URL}&tab_label={$RELATEDLINK_LABEL}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis"> - <span class="tab-label"><strong>{vtranslate($RELATEDLINK_LABEL,{$MODULE_NAME})}</strong></span> - </a> - </li> - {/foreach} + <nav class="navbar margin0" role="navigation"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle btn-group-justified collapsed border0" data-toggle="collapse" data-target="#nav-tabs" aria-expanded="false"> + <i class="fa fa-ellipsis-h"></i> + </button> + </div> - {assign var=RELATEDTABS value=$DETAILVIEW_LINKS['DETAILVIEWRELATED']} - {assign var=COUNT value=$RELATEDTABS|@count} - - {assign var=LIMIT value = 10} - {if $COUNT gt 10} - {assign var=COUNT1 value = $LIMIT} - {else} - {assign var=COUNT1 value=$COUNT} - {/if} - - {for $i = 0 to $COUNT1-1} - {assign var=RELATED_LINK value=$RELATEDTABS[$i]} - {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} - {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} - {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} - <li class="tab-item {if (trim($RELATED_LINK->getLabel())== trim($SELECTED_TAB_LABEL)) && ($RELATED_LINK->getId() == $SELECTED_RELATION_ID)}active{/if}" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" - data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> - <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" > - {if $RELATEDMODULENAME eq "ModComments"} - <i class="fa fa-comment"></i> <span class="tab-label"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span> - {else} - <span class="tab-icon"> - {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} - {$RELATED_MODULE_MODEL->getModuleIcon()} - </span> - {/if} - <span class="numberCircle hide">0</span> - </a> - </li> - {if ($RELATED_LINK->getId() == {$smarty.request.relationId})} - {assign var=MORE_TAB_ACTIVE value='true'} - {/if} - {/for} - {if $MORE_TAB_ACTIVE neq 'true'} - {for $i = 0 to $COUNT-1} - {assign var=RELATED_LINK value=$RELATEDTABS[$i]} - {if ($RELATED_LINK->getId() == {$smarty.request.relationId})} - {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} - {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} - {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} - <li class="more-tab moreTabElement active" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" - data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> - <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" > - {if $RELATEDMODULENAME eq "ModComments"} - <i class="fa fa-comment"></i> <span class="tab-label"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span> - {else} - <span class="tab-icon"> - {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} - {$RELATED_MODULE_MODEL->getModuleIcon()} - </span> - {/if} - <span class="numberCircle hide">0</span> + <div class="collapse navbar-collapse" id="nav-tabs"> + <ul class="nav nav-tabs"> + {foreach item=RELATED_LINK from=$DETAILVIEW_LINKS['DETAILVIEWTAB']} + {assign var=RELATEDLINK_URL value=$RELATED_LINK->getUrl()} + {assign var=RELATEDLINK_LABEL value=$RELATED_LINK->getLabel()} + {assign var=RELATED_TAB_LABEL value={vtranslate('SINGLE_'|cat:$MODULE_NAME, $MODULE_NAME)}|cat:" "|cat:$RELATEDLINK_LABEL} + <li class="tab-item {if $RELATED_TAB_LABEL==$SELECTED_TAB_LABEL}active{/if}" data-url="{$RELATEDLINK_URL}&tab_label={$RELATED_TAB_LABEL}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATEDLINK_LABEL}" data-link-key="{$RELATED_LINK->get('linkKey')}" > + <a href="{$RELATEDLINK_URL}&tab_label={$RELATEDLINK_LABEL}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis"> + <span class="tab-label"><strong>{vtranslate($RELATEDLINK_LABEL,{$MODULE_NAME})}</strong></span> </a> </li> - {break} - {/if} - {/for} - {/if} - {if $COUNT gt $LIMIT} - <li class="dropdown related-tab-more-element"> - <a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle"> - <span class="tab-label"> - <strong>{vtranslate("LBL_MORE",$MODULE_NAME)}</strong> <b class="fa fa-caret-down"></b> - </span> - </a> - <ul class="dropdown-menu pull-right" id="relatedmenuList"> - {for $j = $COUNT1 to $COUNT-1} - {assign var=RELATED_LINK value=$RELATEDTABS[$j]} - {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} - {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} - {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} - <li class="more-tab {if (trim($RELATED_LINK->getLabel())== trim($SELECTED_TAB_LABEL)) && ($RELATED_LINK->getId() == $SELECTED_RELATION_ID)}active{/if}" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" - data-module="{$RELATEDMODULENAME}" title="" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> - <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount=""> - {if $RELATEDMODULENAME eq "ModComments"} - <i class="fa fa-comment"></i> <span class="tab-label">{$DETAILVIEWRELATEDLINKLBL}</span> - {else} - {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} - <span class="tab-icon textOverflowEllipsis"> - {$RELATED_MODULE_MODEL->getModuleIcon()} - <span class="content"> {$DETAILVIEWRELATEDLINKLBL}</span> - </span> - {/if} - <span class="numberCircle hide">0</span> - </a> - </li> - {/for} - </ul> - </li> - {/if} - </ul> + {/foreach} + + {assign var=RELATEDTABS value=$DETAILVIEW_LINKS['DETAILVIEWRELATED']} + {if !empty($RELATEDTABS)} + {assign var=COUNT value=$RELATEDTABS|@count} + + {assign var=LIMIT value = 10} + {if $COUNT gt 10} + {assign var=COUNT1 value = $LIMIT} + {else} + {assign var=COUNT1 value=$COUNT} + {/if} + + {for $i = 0 to $COUNT1-1} + {assign var=RELATED_LINK value=$RELATEDTABS[$i]} + {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} + {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} + {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} + <li class="tab-item {if (trim($RELATED_LINK->getLabel())== trim($SELECTED_TAB_LABEL)) && ($RELATED_LINK->getId() == $SELECTED_RELATION_ID)}active{/if}" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" + data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> + <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" > + {if $RELATEDMODULENAME eq "ModComments"} + <span class="tab-icon"><i class="fa fa-comment" style="font-size: 24px"></i></span> + {else} + <span class="tab-icon"> + {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} + {$RELATED_MODULE_MODEL->getModuleIcon()} + </span> + {/if} + <span class="numberCircle hide">0</span> + </a> + </li> + {if ($RELATED_LINK->getId() == {$smarty.request.relationId})} + {assign var=MORE_TAB_ACTIVE value='true'} + {/if} + {/for} + {if $MORE_TAB_ACTIVE neq 'true'} + {for $i = 0 to $COUNT-1} + {assign var=RELATED_LINK value=$RELATEDTABS[$i]} + {if ($RELATED_LINK->getId() == {$smarty.request.relationId})} + {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} + {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} + {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} + <li class="more-tab moreTabElement active" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" + data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> + <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" > + {if $RELATEDMODULENAME eq "ModComments"} + <i class="fa fa-comment"></i> <span class="tab-label"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span> + {else} + <span class="tab-icon"> + {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} + {$RELATED_MODULE_MODEL->getModuleIcon()} + </span> + {/if} + <span class="numberCircle hide">0</span> + </a> + </li> + {break} + {/if} + {/for} + {/if} + {if $COUNT gt $LIMIT} + <li class="dropdown related-tab-more-element"> + <a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle"> + <span class="tab-label"> + <strong>{vtranslate("LBL_MORE",$MODULE_NAME)}</strong> <b class="fa fa-caret-down"></b> + </span> + </a> + <ul class="dropdown-menu pull-right" id="relatedmenuList"> + {for $j = $COUNT1 to $COUNT-1} + {assign var=RELATED_LINK value=$RELATEDTABS[$j]} + {assign var=RELATEDMODULENAME value=$RELATED_LINK->getRelatedModuleName()} + {assign var=RELATEDFIELDNAME value=$RELATED_LINK->get('linkFieldName')} + {assign var="DETAILVIEWRELATEDLINKLBL" value= vtranslate($RELATED_LINK->getLabel(),$RELATEDMODULENAME)} + <li class="more-tab {if (trim($RELATED_LINK->getLabel())== trim($SELECTED_TAB_LABEL)) && ($RELATED_LINK->getId() == $SELECTED_RELATION_ID)}active{/if}" data-url="{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" data-label-key="{$RELATED_LINK->getLabel()}" + data-module="{$RELATEDMODULENAME}" title="" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}> + <a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount=""> + {if $RELATEDMODULENAME eq "ModComments"} + <i class="fa fa-comment"></i> <span class="tab-label">{$DETAILVIEWRELATEDLINKLBL}</span> + {else} + {assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)} + <span class="tab-icon textOverflowEllipsis"> + {$RELATED_MODULE_MODEL->getModuleIcon()} + <span class="content"> {$DETAILVIEWRELATEDLINKLBL}</span> + </span> + {/if} + <span class="numberCircle hide">0</span> + </a> + </li> + {/for} + </ul> + </li> + {/if} + {/if} + </ul> + </div> + </nav> </div> {strip} \ No newline at end of file diff --git a/layouts/v7/modules/Vtiger/QuickCreate.tpl b/layouts/v7/modules/Vtiger/QuickCreate.tpl index cae856119138bd8d0ea6b73455631dfe36be0ab8..1793b932949a0da70d9a0b6e53c42925ecda06b7 100644 --- a/layouts/v7/modules/Vtiger/QuickCreate.tpl +++ b/layouts/v7/modules/Vtiger/QuickCreate.tpl @@ -12,7 +12,7 @@ {foreach key=index item=jsModel from=$SCRIPTS} <script type="{$jsModel->getType()}" src="{$jsModel->getSrc()}"></script> {/foreach} - + <div class="modal-dialog modal-lg"> <div class="modal-content"> <form class="form-horizontal recordEditView" id="QuickCreate" name="QuickCreate" method="post" action="index.php"> @@ -56,7 +56,7 @@ {assign var=COUNTER value=$COUNTER+1} {/if} <td class='fieldLabel col-lg-2'> - {if $isReferenceField neq "reference"}<label class="muted pull-right">{/if} + {if $isReferenceField neq "reference"}<label class="muted">{/if} {if $isReferenceField eq "reference"} {if $referenceListCount > 1} {assign var="DISPLAYID" value=$FIELD_MODEL->get('fieldvalue')} @@ -72,7 +72,7 @@ </select> </span> {else} - <label class="muted pull-right">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> + <label class="muted">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> {/if} {else if $FIELD_MODEL->get('uitype') eq '83'} {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE) COUNTER=$COUNTER MODULE=$MODULE PULL_RIGHT=true} diff --git a/layouts/v7/modules/Vtiger/RecentActivities.tpl b/layouts/v7/modules/Vtiger/RecentActivities.tpl index 0da6885c3a69677aadd46d28da47fb2e75db8761..1aaf9ecc49c3ef7a23cf8d42737c6b8ce73278e2 100644 --- a/layouts/v7/modules/Vtiger/RecentActivities.tpl +++ b/layouts/v7/modules/Vtiger/RecentActivities.tpl @@ -31,15 +31,15 @@ </time> {assign var=USER_MODEL value=$RECENT_ACTIVITY->getModifiedBy()} {assign var=IMAGE_DETAILS value=$USER_MODEL->getImageDetails()} - {if $IMAGE_DETAILS neq '' && $IMAGE_DETAILS[0] neq '' && $IMAGE_DETAILS[0].path eq ''} + {if $IMAGE_DETAILS neq '' && $IMAGE_DETAILS[0] neq '' && $IMAGE_DETAILS[0].url eq ''} <div class="update_icon bg-info"> <i class='update_image vicon-vtigeruser'></i> </div> {else} {foreach item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.path) && !empty({$IMAGE_INFO.orgname})} + {if !empty($IMAGE_INFO.url)} <div class="update_icon"> - <img class="update_image" src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" > + <img class="update_image" src="{$IMAGE_INFO.url}" > </div> {/if} {/foreach} @@ -59,15 +59,15 @@ </time> {assign var=USER_MODEL value=$RECENT_ACTIVITY->getModifiedBy()} {assign var=IMAGE_DETAILS value=$USER_MODEL->getImageDetails()} - {if $IMAGE_DETAILS neq '' && $IMAGE_DETAILS[0] neq '' && $IMAGE_DETAILS[0].path eq ''} + {if $IMAGE_DETAILS neq '' && $IMAGE_DETAILS[0] neq '' && $IMAGE_DETAILS[0].url eq ''} <div class="update_icon bg-info"> <i class='update_image vicon-vtigeruser'></i> </div> {else} {foreach item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.path) && !empty({$IMAGE_INFO.orgname})} + {if !empty($IMAGE_INFO.url)} <div class="update_icon"> - <img class="update_image" src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" > + <img class="update_image" src="{$IMAGE_INFO.url}" > </div> {/if} {/foreach} diff --git a/layouts/v7/modules/Vtiger/RecentComments.tpl b/layouts/v7/modules/Vtiger/RecentComments.tpl index 5ec4bdb7f9d45364753eaf73a1eb446b94339c4f..86c1f803eecf1d27add84eb8bb55d48d8856b0c6 100644 --- a/layouts/v7/modules/Vtiger/RecentComments.tpl +++ b/layouts/v7/modules/Vtiger/RecentComments.tpl @@ -25,7 +25,7 @@ </div> </div> <div class='row'> - <div class="col-xs-6 pull-right paddingTop5 paddingLeft0"> + <div class="col-xs-6 pull-right paddingTop10 paddingLeft0"> <div style="text-align: right;"> {if in_array($MODULE_NAME, $PRIVATE_COMMENT_MODULES)} <div class="" style="margin: 7px 0;"> @@ -38,11 +38,11 @@ <button class="btn btn-success btn-sm detailViewSaveComment" type="button" data-mode="add">{vtranslate('LBL_POST', $MODULE_NAME)}</button> </div> </div> - {if $FIELD_MODEL->getProfileReadWritePermission()} - <div class="col-xs-6 pull-left"> - {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE_NAME) MODULE="ModComments"} - </div> - {/if} + {if $FIELD_MODEL->getProfileReadWritePermission()} + <div class="col-xs-6 paddingTop10 pull-left"> + {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE_NAME) MODULE="ModComments"} + </div> + {/if} </div> </div> {/if} @@ -82,7 +82,7 @@ <div class="col-lg-2 recordImage commentInfoHeader" data-commentid="{$COMMENT->getId()}" data-parentcommentid="{$COMMENT->get('parent_comments')}" data-relatedto = "{$COMMENT->get('related_to')}"> {assign var=IMAGE_PATH value=$COMMENT->getImagePath()} {if !empty($IMAGE_PATH)} - <img src="{$IMAGE_PATH}" width="40px" height="40px" align="left"> + <img src="{$IMAGE_PATH}" width="100%" height="100%" align="left"> {else} <div class="name"><span><strong> {$CREATOR_NAME|mb_substr:0:2|escape:"html"} </strong></span></div> {/if} diff --git a/layouts/v7/modules/Vtiger/SummaryViewContents.tpl b/layouts/v7/modules/Vtiger/SummaryViewContents.tpl index 2d1581c024e44cf162a9ad7eb3f41e7452ae919a..ea4643e40046e3018d0a30f1cc9c9ca14ad9411c 100644 --- a/layouts/v7/modules/Vtiger/SummaryViewContents.tpl +++ b/layouts/v7/modules/Vtiger/SummaryViewContents.tpl @@ -17,7 +17,6 @@ <tbody> {foreach item=FIELD_MODEL key=FIELD_NAME from=$SUMMARY_RECORD_STRUCTURE['SUMMARY_FIELDS']} {assign var=fieldDataType value=$FIELD_MODEL->getFieldDataType()} - {if $FIELD_MODEL->get('name') neq 'modifiedtime' && $FIELD_MODEL->get('name') neq 'createdtime'} <tr class="summaryViewEntries"> <td class="fieldLabel" > <label class="muted textOverflowEllipsis" title="{vtranslate($FIELD_MODEL->get('label'),$MODULE_NAME)}"> @@ -29,7 +28,7 @@ </label> </td> <td class="fieldValue"> - <div class="row"> + <div class=""> {assign var=DISPLAY_VALUE value="{$FIELD_MODEL->getDisplayValue($FIELD_MODEL->get("fieldvalue"))}"} <span class="value textOverflowEllipsis" title="{strip_tags($DISPLAY_VALUE)}" {if $FIELD_MODEL->get('uitype') eq '19' or $FIELD_MODEL->get('uitype') eq '20' or $FIELD_MODEL->get('uitype') eq '21'}style="word-wrap: break-word;"{/if}> {include file=$FIELD_MODEL->getUITypeModel()->getDetailViewTemplateName()|@vtemplate_path:$MODULE_NAME FIELD_MODEL=$FIELD_MODEL USER_MODEL=$USER_MODEL MODULE=$MODULE_NAME RECORD=$RECORD} @@ -47,7 +46,6 @@ </div> </td> </tr> - {/if} {/foreach} </tbody> </table> diff --git a/layouts/v7/modules/Vtiger/partials/RelatedListHeader.tpl b/layouts/v7/modules/Vtiger/partials/RelatedListHeader.tpl index f31d656475edd26e0b60ff41164088db4533ce74..a1c4d57bdf1ea4403d87f6b4f73b76c441983316 100644 --- a/layouts/v7/modules/Vtiger/partials/RelatedListHeader.tpl +++ b/layouts/v7/modules/Vtiger/partials/RelatedListHeader.tpl @@ -14,7 +14,7 @@ {foreach item=RELATED_LINK from=$RELATED_LIST_LINKS['LISTVIEWBASIC']} <div class="btn-group"> {assign var=DROPDOWNS value=$RELATED_LINK->get('linkdropdowns')} - {if count($DROPDOWNS) gt 0} + {if !empty($DROPDOWNS) && (count($DROPDOWNS) gt 0)} <a class="btn dropdown-toggle" href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="200" data-close-others="false" style="width:20px;height:18px;"> <img title="{$RELATED_LINK->getLabel()}" alt="{$RELATED_LINK->getLabel()}" src="{vimage_path("{$RELATED_LINK->getIcon()}")}"> </a> diff --git a/layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl b/layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl index fbe89b8218ffa9685bda1603e74e8764e0b0592e..34ae7308690018b709d3d850b1ba161d9b1b641b 100644 --- a/layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl +++ b/layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl @@ -32,7 +32,7 @@ {assign var=APP_LIST value=Vtiger_MenuStructure_Model::getAppMenuList()} {foreach item=APP_NAME from=$APP_LIST} {if $APP_NAME eq 'ANALYTICS'} {continue}{/if} - {if count($APP_GROUPED_MENU.$APP_NAME) gt 0} + {if !empty($APP_GROUPED_MENU.$APP_NAME)} <div class="dropdown app-modules-dropdown-container"> {foreach item=APP_MENU_MODEL from=$APP_GROUPED_MENU.$APP_NAME} {assign var=FIRST_MENU_MODEL value=$APP_MENU_MODEL} @@ -40,7 +40,8 @@ {break} {/if} {/foreach} - <div class="menu-item app-item dropdown-toggle app-item-color-{$APP_NAME}" data-app-name="{$APP_NAME}" id="{$APP_NAME}_modules_dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-default-url="{$FIRST_MENU_MODEL->getDefaultUrl()}&app={$APP_NAME}"> + {* Fix for Responsive Layout Menu - Changed data-default-url to # *} + <div class="menu-item app-item dropdown-toggle app-item-color-{$APP_NAME}" data-app-name="{$APP_NAME}" id="{$APP_NAME}_modules_dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-default-url="#"> <div class="menu-items-wrapper app-menu-items-wrapper"> <span class="app-icon-list fa {$APP_IMAGE_MAP.$APP_NAME}"></span> <span class="app-name textOverflowEllipsis"> {vtranslate("LBL_$APP_NAME")}</span> @@ -92,7 +93,7 @@ {/if} {if $USER_MODEL->isAdminUser()} <div class="dropdown app-modules-dropdown-container dropdown-compact"> - <div class="menu-item app-item dropdown-toggle app-item-misc" data-app-name="TOOLS" id="TOOLS_modules_dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-default-url="{if $USER_MODEL->isAdminUser()}index.php?module=Vtiger&parent=Settings&view=Index{else}index.php?module=Users&view=Settings{/if}"> + <div class="menu-item app-item dropdown-toggle app-item-misc" data-app-name="TOOLS" id="TOOLS_modules_dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-default-url="#"> <div class="menu-items-wrapper app-menu-items-wrapper"> <span class="app-icon-list fa fa-cog"></span> <span class="app-name textOverflowEllipsis"> {vtranslate('LBL_SETTINGS', 'Settings:Vtiger')}</span> diff --git a/layouts/v7/modules/Vtiger/partials/SidebarHeader.tpl b/layouts/v7/modules/Vtiger/partials/SidebarHeader.tpl index fd90692f530aa5b347d138f2f3aab0c3b50a7c3c..50f073aedb792d24d9276cebb3fbf87cc0cfac8d 100644 --- a/layouts/v7/modules/Vtiger/partials/SidebarHeader.tpl +++ b/layouts/v7/modules/Vtiger/partials/SidebarHeader.tpl @@ -9,7 +9,7 @@ {assign var=APP_IMAGE_MAP value=Vtiger_MenuStructure_Model::getAppIcons()} -<div class="col-sm-12 col-xs-12 app-indicator-icon-container app-{$SELECTED_MENU_CATEGORY}"> +<div class="col-sm-1 col-xs-2 app-indicator-icon-container app-{$SELECTED_MENU_CATEGORY}"> <div class="row" title="{if $MODULE eq 'Home' || !$MODULE} {vtranslate('LBL_DASHBOARD')} {else}{$SELECTED_MENU_CATEGORY}{/if}"> <span class="app-indicator-icon fa {if $MODULE eq 'Home' || !$MODULE}fa-dashboard{else}{$APP_IMAGE_MAP[$SELECTED_MENU_CATEGORY]}{/if}"></span> </div> diff --git a/layouts/v7/modules/Vtiger/partials/Topbar.tpl b/layouts/v7/modules/Vtiger/partials/Topbar.tpl index 70d81920063d9abd5c985a07ac92efbb13e69b8f..febd704847fcaed929f67a796629e7018ad2c70f 100644 --- a/layouts/v7/modules/Vtiger/partials/Topbar.tpl +++ b/layouts/v7/modules/Vtiger/partials/Topbar.tpl @@ -11,17 +11,17 @@ {include file="modules/Vtiger/Header.tpl"} {assign var=APP_IMAGE_MAP value=Vtiger_MenuStructure_Model::getAppIcons()} - <nav class="navbar navbar-default navbar-fixed-top app-fixed-navbar"> + <nav class="navbar navbar-inverse navbar-fixed-top app-fixed-navbar"> <div class="container-fluid global-nav"> <div class="row"> - <div class="col-lg-3 col-md-3 col-sm-3 app-navigator-container"> + <div class="col-lg-3 col-md-3 col-sm-4 col-xs-8 app-navigator-container"> <div class="row"> <div id="appnavigator" class="col-sm-2 col-xs-2 cursorPointer app-switcher-container" data-app-class="{if $MODULE eq 'Home' || !$MODULE}fa-dashboard{else}{$APP_IMAGE_MAP[$SELECTED_MENU_CATEGORY]}{/if}"> <div class="row app-navigator"> <span class="app-icon fa fa-bars"></span> </div> </div> - <div class="logo-container col-lg-9 col-md-9 col-sm-9 col-xs-9"> + <div class="logo-container col-sm-3 col-xs-9"> <div class="row"> <a href="index.php" class="company-logo"> <img src="{$COMPANY_LOGO->get('imagepath')}" alt="{$COMPANY_LOGO->get('alt')}"/> @@ -30,17 +30,27 @@ </div> </div> </div> - <div class="search-links-container col-md-3 col-lg-3 col-sm-3"> - <div class="search-link hidden-xs"> - <span class="fa fa-search" aria-hidden="true"></span> - <input class="keyword-input" type="text" placeholder="{vtranslate('LBL_TYPE_SEARCH')}" value="{$GLOBAL_SEARCH_VALUE}"> - <span id="adv-search" class="adv-search fa fa-chevron-circle-down pull-right cursorPointer" aria-hidden="true"></span> + <div class="navbar-header paddingTop5"> + <button type="button" class="navbar-toggle collapsed border0" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> + <i class="fa fa-th"></i> + </button> + <button type="button" class="navbar-toggle collapsed border0" data-toggle="collapse" data-target="#search-links-container" aria-expanded="false"> + <i class="fa fa-search"></i> + </button> + </div> + <div class="col-sm-3"> + <div id="search-links-container" class="search-links-container collapse navbar-collapse"> + <div class="search-link"> + <span class="fa fa-search" aria-hidden="true"></span> + <input class="keyword-input" type="text" placeholder="{vtranslate('LBL_TYPE_SEARCH')}" value="{$GLOBAL_SEARCH_VALUE}"> + <span id="adv-search" class="adv-search fa fa-chevron-circle-down pull-right cursorPointer" aria-hidden="true"></span> + </div> </div> </div> - <div id="navbar" class="col-sm-6 col-md-3 col-lg-3 collapse navbar-collapse navbar-right global-actions"> + <div id="navbar" class="col-sm-6 col-xs-12 collapse navbar-collapse navbar-right global-actions"> <ul class="nav navbar-nav"> <li> - <div class="dropdown"> + <div class="dropdown pull-left"> <div class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true"> <a href="#" id="menubar_quickCreate" class="qc-button fa fa-plus-circle" title="{vtranslate('LBL_QUICK_CREATE',$MODULE)}" aria-hidden="true"></a> </div> @@ -63,7 +73,7 @@ {* Adding two links,Event and Task if module is Calendar *} {if $singularLabel == 'SINGLE_Calendar'} {assign var='singularLabel' value='LBL_TASK'} - <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4{/if}"> + <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4 col-xs-4{/if}"> <a id="menubar_quickCreate_Events" class="quickCreateModule" data-name="Events" data-url="index.php?module=Events&view=QuickCreateAjax" href="javascript:void(0)">{$moduleModel->getModuleIcon('Event')}<span class="quick-create-module">{vtranslate('LBL_EVENT',$moduleName)}</span></a> </div> @@ -72,7 +82,7 @@ <br> <div class="row"> {/if} - <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4{/if}"> + <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4 col-xs-4{/if}"> <a id="menubar_quickCreate_{$moduleModel->getName()}" class="quickCreateModule" data-name="{$moduleModel->getName()}" data-url="{$moduleModel->getQuickCreateUrl()}" href="javascript:void(0)">{$moduleModel->getModuleIcon('Task')}<span class="quick-create-module">{vtranslate($singularLabel,$moduleName)}</span></a> </div> @@ -80,7 +90,7 @@ {assign var='count' value=$count+1} {/if} {else if $singularLabel == 'SINGLE_Documents'} - <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4{/if} dropdown"> + <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4 col-xs-4{/if} dropdown"> <a id="menubar_quickCreate_{$moduleModel->getName()}" class="quickCreateModuleSubmenu dropdown-toggle" data-name="{$moduleModel->getName()}" data-toggle="dropdown" data-url="{$moduleModel->getQuickCreateUrl()}" href="javascript:void(0)"> {$moduleModel->getModuleIcon()} @@ -104,7 +114,7 @@ </ul> </div> {else} - <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4{/if}"> + <div class="{if $hideDiv}create_restricted_{$moduleModel->getName()} hide{else}col-lg-4 col-xs-4{/if}"> <a id="menubar_quickCreate_{$moduleModel->getName()}" class="quickCreateModule" data-name="{$moduleModel->getName()}" data-url="{$moduleModel->getQuickCreateUrl()}" href="javascript:void(0)"> {$moduleModel->getModuleIcon()} @@ -140,8 +150,8 @@ <li><div><a href="#" class="taskManagement vicon vicon-task" title="{vtranslate('Tasks','Vtiger')}" aria-hidden="true"></a></div></li> {/if} <li class="dropdown"> - <div style="margin-top: 15px;"> - <a href="#" class="userName dropdown-toggle" data-toggle="dropdown" role="button"> + <div> + <a href="#" class="userName dropdown-toggle pull-right" data-toggle="dropdown" role="button"> <span class="fa fa-user" aria-hidden="true" title="{$USER_MODEL->get('first_name')} {$USER_MODEL->get('last_name')} ({$USER_MODEL->get('user_name')})"></span> <span class="link-text-xs-only hidden-lg hidden-md hidden-sm">{$USER_MODEL->getName()}</span> @@ -155,8 +165,8 @@ <i class='vicon-vtigeruser' style="font-size:90px"></i> {else} {foreach item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.path) && !empty({$IMAGE_INFO.orgname})} - <img src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" width="100px" height="100px"> + {if !empty($IMAGE_INFO.url)} + <img src="{$IMAGE_INFO.url}" width="100px" height="100px"> {/if} {/foreach} {/if} @@ -170,7 +180,7 @@ </div> </div> </div> - <div class="logout-footer clearfix"> + <div id="logout-footer" class="logout-footer clearfix"> <hr style="margin: 10px 0 !important"> <div class=""> <span class="pull-left"> diff --git a/layouts/v7/modules/Vtiger/resources/DashBoard.js b/layouts/v7/modules/Vtiger/resources/DashBoard.js index 63c90b567e12d262b4489bf30d71f89733f88a8b..b611e7877c49a9708638a64b9fc4ae236de674ec 100644 --- a/layouts/v7/modules/Vtiger/resources/DashBoard.js +++ b/layouts/v7/modules/Vtiger/resources/DashBoard.js @@ -302,7 +302,7 @@ Vtiger.Class("Vtiger_DashBoard_Js",{ // Constructing the grid based on window width var cols = this.getgridColumns(); $(".mainContainer").css('min-width', "500px"); - var col_width = (cols === 1)?(Math.floor(($(".mainContainer").width()-41)/cols) - (2*widgetMargin)):(Math.floor(($(window).width()-41)/cols) - (2*widgetMargin)); + var col_width = (Math.floor(($(window).width()-30)/cols) - (2*widgetMargin)); Vtiger_DashBoard_Js.gridster = this.getContainer().gridster({ diff --git a/layouts/v7/modules/Vtiger/resources/Field.js b/layouts/v7/modules/Vtiger/resources/Field.js index a8891ac7b8d05304be0ba5c260ed02de813e9f09..5bbed20b1ddbf429bb41cfa295fe2f08c5620dee 100644 --- a/layouts/v7/modules/Vtiger/resources/Field.js +++ b/layouts/v7/modules/Vtiger/resources/Field.js @@ -636,7 +636,7 @@ Vtiger_Field_Js('Vtiger_Email_Field_Js',{},{ * return <String or Jquery> it can return either plain html or jquery object */ getUi : function() { - var html = '<input class="inputElement" type="text" name="'+ this.getName() +'" data-label="'+this.get('label')+'" data-rule-email="true" data-rule-illegal="true"/>'; + var html = '<input class="getPopupUi inputElement" type="text" name="'+ this.getName() +'" data-label="'+this.get('label')+'" data-rule-email="true" data-rule-illegal="true"/>'; html = jQuery(html).val(app.htmlDecode(this.getValue())); this.addValidationToElement(html); return jQuery(html); diff --git a/layouts/v7/modules/Vtiger/resources/List.js b/layouts/v7/modules/Vtiger/resources/List.js index 42b72964126caa19d5071705bbda28458b586efd..d6928a66c82539b8238c5b05b74786257f3991d0 100644 --- a/layouts/v7/modules/Vtiger/resources/List.js +++ b/layouts/v7/modules/Vtiger/resources/List.js @@ -1258,48 +1258,104 @@ Vtiger.Class("Vtiger_List_Js", { }); }); }, - /** - * Function to register the list view row search event - */ - registerListViewSearch: function () { - var listViewPageDiv = this.getListViewContainer(); - var thisInstance = this; - listViewPageDiv.on('click', '[data-trigger="listSearch"]', function (e) { - e.preventDefault(); - var params = { - 'page': '1' - } - thisInstance.loadListViewRecords(params).then( - function (data) { - //To unmark the all the selected ids - jQuery('#deSelectAllMsgDiv').trigger('click'); - }, - function (textStatus, errorThrown) { + prevSearchValues : [], + + /** + * Function to register the list view row search event + */ + registerListViewSearch : function() { + var listViewPageDiv = this.getListViewContainer(); + var thisInstance = this; + listViewPageDiv.on('click','[data-trigger="listSearch"]',function(e){ + e.preventDefault(); + var params = { + 'page': '1' + } + var searchButton = jQuery(this); + searchButton.addClass('hide'); + listViewPageDiv.find('[data-trigger="clearListSearch"]').removeClass('hide'); + + thisInstance.loadListViewRecords(params).then( + function(data){ + //To unmark the all the selected ids + jQuery('#deSelectAllMsgDiv').trigger('click'); + }, + + function(textStatus, errorThrown){ + } + ); + }); + + var clearSearchContributor = function(contributor) { + if(contributor.is('input')) { + contributor.val(''); + } else if(contributor.is('select')) { + contributor.select2("val", ""); + contributor.val(''); + } else { + console.log("contributor clearing now handled : ", contributor); + } + }; + + //register clear search event + listViewPageDiv.on('click', '[data-trigger="clearListSearch"]', function(e) { + e.preventDefault(); + listViewPageDiv.find('.listSearchContributor:not(".select2-container")').each(function(i, contributor) { + contributor = jQuery(contributor); + clearSearchContributor(contributor); + }); + var clearButton = jQuery(this); + clearButton.addClass('hide'); + thisInstance.prevSearchValues = []; + jQuery('#currentSearchParams').val(''); + listViewPageDiv.find('[data-trigger="listSearch"]').removeClass('hide').trigger('click'); + }); + + + //floatThead change event object has undefined keyCode, using keyup instead + var listSearchContributorChangeHandler = function(e){ + var element = jQuery(e.currentTarget); + var fieldName = element.attr('name'); + var searchValue = element.val(); + if(element.hasClass('select2')){ + var currentElementContainer = element.closest('.select2_search_div').find('div.listSearchContributor').find('ul'); + var desireHeight = 150; + if(currentElementContainer.height() > desireHeight){ + currentElementContainer.css({'cssText':'height:'+desireHeight+'px !important;'+'padding:0'}); + }else if(currentElementContainer.find('.mCSB_container').height() < desireHeight){ + currentElementContainer.removeAttr('style'); } - ); - }); - - //floatThead change event object has undefined keyCode, using keyup instead - var prevSearchValues = []; - listViewPageDiv.on('keyup', '.listSearchContributor', function (e) { - var element = jQuery(e.currentTarget); - var fieldName = element.attr('name'); - var searchValue = element.val(); - if (e.keyCode == 13 && prevSearchValues[fieldName] !== searchValue) { - e.preventDefault(); - var element = jQuery(e.currentTarget); - var parentElement = element.closest('tr'); - var searchTriggerElement = parentElement.find('[data-trigger="listSearch"]'); - searchTriggerElement.trigger('click'); - prevSearchValues[fieldName] = searchValue; - } - }); - - listViewPageDiv.on('datepicker-change', '.dateField', function (e) { - var element = jQuery(e.currentTarget); - element.trigger('change'); - }); - }, + currentElementContainer.mCustomScrollbar("update"); + } + + if(e.keyCode == 13 && thisInstance.prevSearchValues[fieldName] !== searchValue && !element.hasClass('select2')){ + e.preventDefault(); + var element = jQuery(e.currentTarget); + var parentElement = element.closest('tr'); + var searchTriggerElement = parentElement.find('[data-trigger="listSearch"]'); + searchTriggerElement.trigger('click'); + thisInstance.prevSearchValues[fieldName] = searchValue; + } + if(e.keyCode !== 13) { + listViewPageDiv.find('[data-trigger="clearListSearch"]').addClass('hide'); + setTimeout(function(){ + listViewPageDiv.find('[data-trigger="listSearch"]').removeClass('hide'); + }, 10); + } + }; + listViewPageDiv.find('.searchRow div.listSearchContributor.select2').each(function(i,elem){ + var currentSearchInput = jQuery(elem); + app.helper.showVerticalScroll(currentSearchInput.find('ul'),{'height': 150}); + }); + listViewPageDiv.on('keyup','.listSearchContributor', listSearchContributorChangeHandler); + listViewPageDiv.on('change','select', listSearchContributorChangeHandler); + listViewPageDiv.on('datepicker-change', '.dateField', function(e){ + var element = jQuery(e.currentTarget); + element.trigger('change'); + listSearchContributorChangeHandler(e); + }); + }, + saveMassedit: function (event, form_original_data, isOwnerChanged) { event.preventDefault(); var form = $('#massEdit'); @@ -2336,7 +2392,7 @@ Vtiger.Class("Vtiger_List_Js", { selectedFieldsList.on('click', '.removeField', function (e) { var selectedFieldsEles = selectedFieldsList.find('.item'); if (selectedFieldsEles.length <= 1) { - app.helper.showErrorNotification({message: app.vtranslate('Atleast one field should be selected')}); + app.helper.showErrorNotification({message: app.vtranslate('JS_ATLEAST_SELECT_ONE_FIELD')}); return false; } var ele = jQuery(e.currentTarget); diff --git a/layouts/v7/modules/Vtiger/resources/Utils.js b/layouts/v7/modules/Vtiger/resources/Utils.js index 455e205cd91d419dc756de58e1f148c87db0ca92..c51009b48d412c9d050e8d58079915bbaa794d2e 100644 --- a/layouts/v7/modules/Vtiger/resources/Utils.js +++ b/layouts/v7/modules/Vtiger/resources/Utils.js @@ -366,6 +366,14 @@ var vtUtils = { jQuery(function () { jQuery('[data-toggle="tooltip"]').tooltip(options); }); + }, + + stripTags : function(string,allowed) { + //https://stackoverflow.com/questions/5601903/jquery-almost-equivalent-of-phps-strip-tags#answer-46483672 + allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); + var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi; + return string.replace(tags, function ($0, $1) { + return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''; + }); } - } diff --git a/layouts/v7/modules/Vtiger/resources/Vtiger.js b/layouts/v7/modules/Vtiger/resources/Vtiger.js index 9efa3deda60902ddf82c110683b8c1e4bdbb32cd..f3712ecb5000508550f336f7c08859bec8453607 100644 --- a/layouts/v7/modules/Vtiger/resources/Vtiger.js +++ b/layouts/v7/modules/Vtiger/resources/Vtiger.js @@ -29,14 +29,8 @@ Vtiger.Class('Vtiger_Index_Js', { record: recordId, attachmentid: attachmentId }; - var modalParams = { - cb: function (modalContainer) { - modalContainer.find('.viewer').zoomer(); - }, - 'ignoreScroll' : true - }; app.request.post({data: params}).then(function (err, res) { - app.helper.showModal(res, modalParams); + app.helper.showModal(res); }); } }, @@ -109,10 +103,10 @@ Vtiger.Class('Vtiger_Index_Js', { if(saveRecipientPref) { var params = form.serializeFormData(); emailEditInstance.showComposeEmailForm(params).then(function(response) { - jQuery(document).on('shown.bs.modal', function() { - if (typeof cb === 'function') cb(response); + jQuery(document).on('shown.bs.modal', function() { + if (typeof cb === 'function') cb(response); + }); }); - }); }else { app.helper.hideProgress(); app.helper.showModal(data); @@ -276,22 +270,22 @@ Vtiger.Class('Vtiger_Index_Js', { showReminderPopup : function(record) { var notifyParams = { 'title' : record.activitytype + ' - ' + - '<a target="_blank" href="index.php?module=Calendar&view=Detail&record='+record.id+'">'+record.subject+'</a> '+ - '<i id="reminder-postpone-'+record.id+'" title="'+app.vtranslate('JS_POSTPONE')+'" class="cursorPointer fa fa-clock-o"></i>', + '<a target="_blank" href="index.php?module=Calendar&view=Detail&record='+record.id+'">'+record.subject+'</a> '+ + '<i id="reminder-postpone-'+record.id+'" title="'+app.vtranslate('JS_POSTPONE')+'" class="cursorPointer fa fa-clock-o"></i>', 'message' : '<div class="col-sm-12">'+ - '<div class="row">'+ - '<div class="col-sm-12 font13px">'+ - app.vtranslate('JS_START_DATE_TIME') + ' : ' + record.date_start+ - '</div>'+ - '<div class="col-sm-12 font13px">'+ - app.vtranslate('JS_END_DATE_TIME') + ' : ' + record.due_date+ - '</div>'+ - '</div>'+ - '</div>' + '<div class="row">'+ + '<div class="col-sm-12 font13px">'+ + app.vtranslate('JS_START_DATE_TIME') + ' : ' + record.date_start+ + '</div>'+ + '<div class="col-sm-12 font13px">'+ + app.vtranslate('JS_END_DATE_TIME') + ' : ' + record.due_date+ + '</div>'+ + '</div>'+ + '</div>' }; var settings = { - 'element' : 'body', - 'type' : 'danger', + 'element' : 'body', + 'type' : 'danger', 'delay' : 0 }; @@ -311,7 +305,7 @@ Vtiger.Class('Vtiger_Index_Js', { } }, { - _SearchIntiatedEventName : 'VT_SEARCH_INTIATED', + _SearchIntiatedEventName : 'VT_SEARCH_INTIATED', usernames : [], userList : {}, autoFillElement : false, @@ -337,10 +331,10 @@ Vtiger.Class('Vtiger_Index_Js', { app.request.post({data: params}); if(jQuery('.sidebar-essentials').hasClass('hide')) { jQuery('.essentials-toggle-marker').removeClass('fa-chevron-left') - .addClass('fa-chevron-right'); + .addClass('fa-chevron-right'); } else { jQuery('.essentials-toggle-marker').removeClass('fa-chevron-right') - .addClass('fa-chevron-left'); + .addClass('fa-chevron-left'); } app.event.trigger("Vtiger.Post.MenuToggle"); }); @@ -391,18 +385,18 @@ Vtiger.Class('Vtiger_Index_Js', { addBodyScroll: function () { app.helper.showVerticalScroll( - $("body"), - { - setHeight: $(window).height() - 92, - theme: "inset-dark", - alwaysShowScrollbar: 2, - autoExpandScrollbar: true, - live: "on", - setTop: 0, - scrollInertia: 70, - mouseWheel:{ preventDefault: true } + $("body"), + { + setHeight: $(window).height() - 92, + theme: "inset-dark", + alwaysShowScrollbar: 2, + autoExpandScrollbar: true, + live: "on", + setTop: 0, + scrollInertia: 70, + mouseWheel:{ preventDefault: true } - } + } ); }, registerEventForTaskManagement : function(){ @@ -499,8 +493,8 @@ Vtiger.Class('Vtiger_Index_Js', { var parentModule=app.getModuleName(); var viewname=app.view(); if(((quickCreateModuleName == parentModule) || (quickCreateModuleName == 'Events' && parentModule == 'Calendar')) && (viewname=="List")){ - var listinstance = app.controller(); - listinstance.loadListViewRecords(); + var listinstance = app.controller(); + listinstance.loadListViewRecords(); } }; } @@ -516,16 +510,16 @@ Vtiger.Class('Vtiger_Index_Js', { }, backdrop : 'static', keyboard : false - } + } app.helper.showModal(data, callbackparams); var form = jQuery('form[name="QuickCreate"]'); var moduleName = form.find('[name="module"]').val(); - var Options= { - scrollInertia: 200, - autoHideScrollbar: true, - setHeight:(jQuery(window).height() - jQuery('form[name="QuickCreate"] .modal-body').find('.modal-header').height() - jQuery('form[name="QuickCreate"] .modal-body').find('.modal-footer').height()- 135), - } + var Options= { + scrollInertia: 200, + autoHideScrollbar: true, + setHeight:(jQuery(window).height() - jQuery('form[name="QuickCreate"] .modal-body').find('.modal-header').height() - jQuery('form[name="QuickCreate"] .modal-body').find('.modal-footer').height()- 135), + } app.helper.showVerticalScroll(jQuery('form[name="QuickCreate"] .modal-body'), Options); var targetInstance = thisInstance; @@ -670,7 +664,10 @@ Vtiger.Class('Vtiger_Index_Js', { appMenu.appendTo('#page'); appMenu.css({ 'top' : appNav.offset().top + appNav.height(), - 'left' : 0 + 'left' : 0, + //Fix for Responsive layout Sub Menu in mobile devices + 'width' : '50%', + 'max-width' : '230px' }); if(typeof type === 'undefined') { type = appMenu.is(':hidden') ? 'show' : 'hide'; @@ -703,11 +700,14 @@ Vtiger.Class('Vtiger_Index_Js', { var dropdownContainer = jQuery(e.currentTarget); jQuery('.dropdown').removeClass('open'); if(dropdownContainer.length) { + //Fix for Responsive layout Sub Menu in mobile devices + var appModulesDropdown = dropdownContainer.find('.app-modules-dropdown'); if(dropdownContainer.hasClass('dropdown-compact')) { - dropdownContainer.find('.app-modules-dropdown').css('top', dropdownContainer.position().top - 8); + appModulesDropdown.css('top', dropdownContainer.position().top - 8); } else { - dropdownContainer.find('.app-modules-dropdown').css('top', ''); + appModulesDropdown.css('top', ''); } + appModulesDropdown.css('left', appModulesDropdown.parent().width() - 8); dropdownContainer.addClass('open').find('.app-item').addClass('active-app-item'); } }, function(e) { @@ -721,10 +721,13 @@ Vtiger.Class('Vtiger_Index_Js', { }); - jQuery('.app-item').on('click', function() { + //Fix for Responsive layout Sub Menu in mobile devices + jQuery('.app-item').on('click', function(e) { var url = jQuery(this).data('defaultUrl'); - if(url) { + if(url && url!=='#') { window.location.href = url; + } else { + e.stopPropagation(); } }); @@ -808,15 +811,15 @@ Vtiger.Class('Vtiger_Index_Js', { var reponseDataList = new Array(); var serverDataFormat = data; if(serverDataFormat.length <= 0) { - jQuery(inputElement).val(''); - serverDataFormat = new Array({ - 'label' : 'No Results Found', - 'type' : 'no results' - }); + jQuery(inputElement).val(''); + serverDataFormat = new Array({ + 'label' : 'No Results Found', + 'type' : 'no results' + }); } for(var id in serverDataFormat){ - var responseData = serverDataFormat[id]; - reponseDataList.push(responseData); + var responseData = serverDataFormat[id]; + reponseDataList.push(responseData); } response(reponseDataList); }); @@ -833,7 +836,7 @@ Vtiger.Class('Vtiger_Index_Js', { var selectedItemData = ui.item; //To stop selection if no results is selected if(typeof selectedItemData.type != 'undefined' && selectedItemData.type=="no results"){ - return false; + return false; } var element = jQuery(this); var parent = element.closest('td'); @@ -913,14 +916,14 @@ Vtiger.Class('Vtiger_Index_Js', { var element = jQuery(e.currentTarget); var closestTD = thisInstance.getParentElement(element).next(); var popupReferenceModule = element.val(); - var referenceModuleElement = jQuery('input[name="popupReferenceModule"]', closestTD).length ? - jQuery('input[name="popupReferenceModule"]', closestTD) : jQuery('input.popupReferenceModule', closestTD); + var referenceModuleElement = jQuery('input[name="popupReferenceModule"]', closestTD).length ? + jQuery('input[name="popupReferenceModule"]', closestTD) : jQuery('input.popupReferenceModule', closestTD); var prevSelectedReferenceModule = referenceModuleElement.val(); referenceModuleElement.val(popupReferenceModule); //If Reference module is changed then we should clear the previous value if(prevSelectedReferenceModule != popupReferenceModule) { - closestTD.find('.clearReferenceSelection').trigger('click'); + closestTD.find('.clearReferenceSelection').trigger('click'); } }); }, @@ -937,7 +940,7 @@ Vtiger.Class('Vtiger_Index_Js', { var isMultiple = false; if(params.multi_select) { - isMultiple = true; + isMultiple = true; } var sourceFieldElement = jQuery('input[class="sourceField"]',parentElem); @@ -946,7 +949,7 @@ Vtiger.Class('Vtiger_Index_Js', { sourceFieldElement.trigger(prePopupOpenEvent); if(prePopupOpenEvent.isDefaultPrevented()) { - return ; + return ; } var popupInstance = Vtiger_Popup_Js.getInstance(); @@ -964,7 +967,7 @@ Vtiger.Class('Vtiger_Index_Js', { // referenceModule = value.module; // } // if(parentElem.find('[name="popupReferenceModule"]').val() != referenceModule) continue; -// +// var data = { 'name' : value.name, 'id' : key @@ -1018,40 +1021,40 @@ Vtiger.Class('Vtiger_Index_Js', { * @returns {undefined} */ registerFileChangeEvent: function () { - var thisInstance = this; - var container = jQuery('body'); - Vtiger_Index_Js.files = ''; - container.on('change', 'input[name="filename[]"],input[name="imagename[]"]', function(e){ - if(e.target.type == "text") return false; - - var files_uploaded=[]; - var fileSize = 0; - jQuery.each(e.target.files,function(key,element){ - files_uploaded[key] = element; - fileSize += Number(element['size']); - }); + var thisInstance = this; + var container = jQuery('body'); + Vtiger_Index_Js.files = ''; + container.on('change', 'input[name="filename[]"],input[name="imagename[]"]', function(e){ + if(e.target.type == "text") return false; + + var files_uploaded=[]; + var fileSize = 0; + jQuery.each(e.target.files,function(key,element){ + files_uploaded[key] = element; + fileSize += Number(element['size']); + }); - Vtiger_Index_Js.files = files_uploaded; - var element = container.find('input[name="filename[]"],input[name="imagename[]"]'); - //ignore all other types than file - if(element.attr('type') != 'file'){ - return ; - } - var uploadFileSizeHolder = element.closest('.fileUploadContainer').find('.uploadedFileSize'); - var maxFileSize = thisInstance.getMaxiumFileUploadingSize(container); - if(fileSize > maxFileSize) { - alert(app.vtranslate('JS_EXCEEDS_MAX_UPLOAD_SIZE')); - var removeFileLinks = jQuery('.MultiFile-remove'); - jQuery(removeFileLinks[removeFileLinks.length - 1]).click(); + Vtiger_Index_Js.files = files_uploaded; + var element = container.find('input[name="filename[]"],input[name="imagename[]"]'); + //ignore all other types than file + if(element.attr('type') != 'file'){ + return ; + } + var uploadFileSizeHolder = element.closest('.fileUploadContainer').find('.uploadedFileSize'); + var maxFileSize = thisInstance.getMaxiumFileUploadingSize(container); + if(fileSize > maxFileSize) { + alert(app.vtranslate('JS_EXCEEDS_MAX_UPLOAD_SIZE')); + var removeFileLinks = jQuery('.MultiFile-remove'); + jQuery(removeFileLinks[removeFileLinks.length - 1]).click(); + } else { + if(container.length > 1){ + jQuery('div.fieldsContainer').find('form#I_form').find('input[name="filename"]').css('width','80px'); + jQuery('div.fieldsContainer').find('form#W_form').find('input[name="filename"]').css('width','80px'); } else { - if(container.length > 1){ - jQuery('div.fieldsContainer').find('form#I_form').find('input[name="filename"]').css('width','80px'); - jQuery('div.fieldsContainer').find('form#W_form').find('input[name="filename"]').css('width','80px'); - } else { - container.find('input[name="filename[]"]').css('width','80px'); - } + container.find('input[name="filename[]"]').css('width','80px'); } + } }); }, @@ -1092,18 +1095,18 @@ Vtiger.Class('Vtiger_Index_Js', { var sourceModule = app.getModuleName(); var editTaskContainer = jQuery('[name="editTask"]'); if(editTaskContainer.length > 0){ - sourceModule = editTaskContainer.find('#sourceModule').val(); + sourceModule = editTaskContainer.find('#sourceModule').val(); } var quickCreateConatiner = jQuery('[name="QuickCreate"]'); if(quickCreateConatiner.length!=0){ - sourceModule = quickCreateConatiner.find('input[name="module"]').val(); + sourceModule = quickCreateConatiner.find('input[name="module"]').val(); } var searchResultContainer = jQuery('#searchResults-container'); if(searchResultContainer.length) { sourceModule = jQuery('select#searchModuleList').val(); } - var popupReferenceModuleElement = jQuery('input[name="popupReferenceModule"]',container).length ? - jQuery('input[name="popupReferenceModule"]',container) : jQuery('input.popupReferenceModule',container); + var popupReferenceModuleElement = jQuery('input[name="popupReferenceModule"]',container).length ? + jQuery('input[name="popupReferenceModule"]',container) : jQuery('input.popupReferenceModule',container); var popupReferenceModule = popupReferenceModuleElement.val(); var sourceFieldElement = jQuery('input[class="sourceField"]',container); if(!sourceFieldElement.length) { @@ -1195,8 +1198,8 @@ Vtiger.Class('Vtiger_Index_Js', { * Function to get referenced module name */ getReferencedModuleName : function(parentElement) { - var referenceModuleElement = jQuery('input[name="popupReferenceModule"]',parentElement).length ? - jQuery('input[name="popupReferenceModule"]',parentElement) : jQuery('input.popupReferenceModule',parentElement); + var referenceModuleElement = jQuery('input[name="popupReferenceModule"]',parentElement).length ? + jQuery('input[name="popupReferenceModule"]',parentElement) : jQuery('input.popupReferenceModule',parentElement); return referenceModuleElement.val(); }, @@ -1234,13 +1237,13 @@ Vtiger.Class('Vtiger_Index_Js', { }, /** - * Function to get reference search params - */ + * Function to get reference search params + */ getReferenceSearchParams : function(element){ var tdElement = this.getParentElement(element); var params = {}; - var referenceModuleElement = jQuery('input[name="popupReferenceModule"]',tdElement).length ? - jQuery('input[name="popupReferenceModule"]',tdElement) : jQuery('input.popupReferenceModule',tdElement); + var referenceModuleElement = jQuery('input[name="popupReferenceModule"]',tdElement).length ? + jQuery('input[name="popupReferenceModule"]',tdElement) : jQuery('input.popupReferenceModule',tdElement); var searchModule = referenceModuleElement.val(); params.search_module = searchModule; return params; @@ -1290,8 +1293,8 @@ Vtiger.Class('Vtiger_Index_Js', { var parent = element.closest('td'); // added to support from all views which may not be table format if(parent.length === 0) { - parent = element.closest('.td').length ? - element.closest('.td') : element.closest('.fieldValue'); + parent = element.closest('.td').length ? + element.closest('.td') : element.closest('.fieldValue'); } return parent; }, @@ -1380,7 +1383,7 @@ Vtiger.Class('Vtiger_Index_Js', { params['navigation'] = 'false'; } else{ - params['navigation'] = 'true'; + params['navigation'] = 'true'; } if (templateId) { @@ -1493,9 +1496,9 @@ Vtiger.Class('Vtiger_Index_Js', { //perform show preview only after 500ms in list view to support double click edit action if (!currentTarget.data('preview-timer') && typeof href != 'undefined') { currentTarget.data('preview-timer', setTimeout(function () { - var data = app.convertUrlToDataParams(href); - self.showQuickPreviewForId(data.record, data.module, app.getAppName(),'',true); - currentTarget.data('preview-timer',null); + var data = app.convertUrlToDataParams(href); + self.showQuickPreviewForId(data.record, data.module, app.getAppName(),'',true); + currentTarget.data('preview-timer',null); }, 500)); } } else { @@ -1506,7 +1509,7 @@ Vtiger.Class('Vtiger_Index_Js', { if(view === 'List') { /* - * when reference display value is double clicked in list view, + * when reference display value is double clicked in list view, * should initiate inline edit instead of showing preview */ jQuery('body').on('dblclick', '.js-reference-display-value', function(e) { @@ -1564,35 +1567,35 @@ Vtiger.Class('Vtiger_Index_Js', { var completedValues = []; for(var index in autoFillData){ var value = autoFillData[index]; - var referenceContainer = thisInstance.getRelatedFieldElements(container, value); + var referenceContainer = thisInstance.getRelatedFieldElements(container, value); jQuery.each(data, function(datakey, datavalue){ for(var name in datavalue){ if(typeof datavalue[name] == 'object'){ var key = name; var dataList = { - 'name': datavalue[key].name, - 'id' : datavalue[key].id + 'name': datavalue[key].name, + 'id' : datavalue[key].id } if(value.module == datavalue[key].module){ - var autoFillElement = thisInstance.autoFillElement; - var autoFillData = value; - var popupReferenceModuleElement = autoFillElement.parent().parent().find('[name=popupReferenceModule]').length ? - autoFillElement.parent().parent().find('[name=popupReferenceModule]') : autoFillElement.parent().parent().find('.popupReferenceModule'); - var module = popupReferenceModuleElement.val(); - var elementName = autoFillElement.attr('name'); - var selectedName = container.find('#'+elementName+'_display').val(); - var message = app.vtranslate('JS_OVERWRITE_AUTOFILL_MSG1')+' '+app.vtranslate('SINGLE_'+autoFillData.module)+" "+app.vtranslate('JS_OVERWRITE_AUTOFILL_MSG2')+" "+app.vtranslate('SINGLE_'+module)+' ('+selectedName+') '+app.vtranslate('SINGLE_'+autoFillData.module)+" ?"; - var parentId = container.find('[name='+autoFillData.fieldname+']').val(); - - if(parentId != dataList.id && parentId) { - if(jQuery.inArray(datavalue[key].module, completedValues) === -1) { - completedValues.push(datavalue[key].module); - thisInstance.confirmAndFillDetails(referenceContainer[key], dataList, message); - } - } else { - thisInstance.setReferenceFieldValue(referenceContainer[key], dataList); + var autoFillElement = thisInstance.autoFillElement; + var autoFillData = value; + var popupReferenceModuleElement = autoFillElement.parent().parent().find('[name=popupReferenceModule]').length ? + autoFillElement.parent().parent().find('[name=popupReferenceModule]') : autoFillElement.parent().parent().find('.popupReferenceModule'); + var module = popupReferenceModuleElement.val(); + var elementName = autoFillElement.attr('name'); + var selectedName = container.find('#'+elementName+'_display').val(); + var message = app.vtranslate('JS_OVERWRITE_AUTOFILL_MSG1')+' '+app.vtranslate('SINGLE_'+autoFillData.module)+" "+app.vtranslate('JS_OVERWRITE_AUTOFILL_MSG2')+" "+app.vtranslate('SINGLE_'+module)+' ('+selectedName+') '+app.vtranslate('SINGLE_'+autoFillData.module)+" ?"; + var parentId = container.find('[name='+autoFillData.fieldname+']').val(); + + if(parentId != dataList.id && parentId) { + if(jQuery.inArray(datavalue[key].module, completedValues) === -1) { + completedValues.push(datavalue[key].module); + thisInstance.confirmAndFillDetails(referenceContainer[key], dataList, message); } + } else { + thisInstance.setReferenceFieldValue(referenceContainer[key], dataList); + } } } } @@ -1603,11 +1606,11 @@ Vtiger.Class('Vtiger_Index_Js', { confirmAndFillDetails : function(container, data, message) { var thisInstance = this; app.helper.showConfirmationBox({'message' : message}).then( - function(e) { - thisInstance.setReferenceFieldValue(container, data); - }, - function(error, err){ - } + function(e) { + thisInstance.setReferenceFieldValue(container, data); + }, + function(error, err){ + } ); }, @@ -1635,7 +1638,7 @@ Vtiger.Class('Vtiger_Index_Js', { var module; if(!resultData.module) { var autoFillElement = this.autoFillElement; - var popupReferenceModuleElement = autoFillElement.parent().parent().find('[name=popupReferenceModule]').length ? + var popupReferenceModuleElement = autoFillElement.parent().parent().find('[name=popupReferenceModule]').length ? autoFillElement.parent().parent().find('[name=popupReferenceModule]') : autoFillElement.parent().parent().find('.popupReferenceModule'); module = popupReferenceModuleElement.val(); }else { @@ -1645,11 +1648,11 @@ Vtiger.Class('Vtiger_Index_Js', { return; var params = { - module: module, - action: 'RelationAjax', - mode: 'getRelatedRecordInfo', - id: resultData.id - }; + module: module, + action: 'RelationAjax', + mode: 'getRelatedRecordInfo', + id: resultData.id + }; app.request.post({'data' : params}).then(function(err, data){ if(err == null){ diff --git a/layouts/v7/modules/Vtiger/resources/dashboards/Widget.js b/layouts/v7/modules/Vtiger/resources/dashboards/Widget.js index 600bb3e8aadb4b33dc79a85c40c5b8af0ebc169f..58b15c06d5ecbb1ae88e6ed2159f8fbe785e26db 100644 --- a/layouts/v7/modules/Vtiger/resources/dashboards/Widget.js +++ b/layouts/v7/modules/Vtiger/resources/dashboards/Widget.js @@ -86,11 +86,23 @@ Vtiger.Class('Vtiger_Widget_Js',{ }, convertToDateRangePicketFormat : function(userDateFormat) { - if(userDateFormat == 'yyyy-mm-dd') { + if ('dd.mm.yyyy' === userDateFormat) { + return 'dd.MM.yyyy'; + } else if ('mm.dd.yyyy' === userDateFormat) { + return 'MM.dd.yyyy' + } else if ('yyyy.mm.dd' === userDateFormat) { + return 'yyyy.MM.dd'; + } else if ('dd/mm/yyyy' === userDateFormat) { + return 'dd/MM/yyyy'; + } else if ('mm/dd/yyyy' === userDateFormat) { + return 'MM/dd/yyyy' + } else if ('yyyy/mm/dd' === userDateFormat) { + return 'yyyy/MM/dd'; + } else if ('yyyy-mm-dd' === userDateFormat) { return 'yyyy-MM-dd'; - }else if( userDateFormat == 'mm-dd-yyyy') { + } else if ('mm-dd-yyyy' === userDateFormat) { return 'MM-dd-yyyy'; - }else if(userDateFormat == 'dd-mm-yyyy') { + } else if ('dd-mm-yyyy' === userDateFormat) { return 'dd-MM-yyyy'; } }, diff --git a/layouts/v7/modules/Vtiger/resources/validation.js b/layouts/v7/modules/Vtiger/resources/validation.js index e870d8cbe1991076dceec7c148ba512038c0c96c..0f8bc5dfb226cce93e01e9da6d8bae3647a369cd 100644 --- a/layouts/v7/modules/Vtiger/resources/validation.js +++ b/layouts/v7/modules/Vtiger/resources/validation.js @@ -714,7 +714,7 @@ jQuery.validator.addMethod("RepeatMonthDate", function(value, element, params) { jQuery.validator.addMethod("reference_required", function (value, element, params) { var referenceValue = jQuery(element).parent().parent().find('input.sourceField').val(); if (isNaN(referenceValue)) { - referenceValue = jQuery(element).parent().parent().find('input.sourceField').attr('value'); + referenceValue = jQuery(element).parent().parent().find('input.sourceField').data('value'); } if (referenceValue && parseInt(referenceValue) > 0) { return true; diff --git a/layouts/v7/modules/Vtiger/uitypes/Image.tpl b/layouts/v7/modules/Vtiger/uitypes/Image.tpl index b2f0665c86341a19f46844a5cda8af43473b8394..6e9afa7f8c570fe0dbe73408e3ab271fe9ffa0f2 100644 --- a/layouts/v7/modules/Vtiger/uitypes/Image.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/Image.tpl @@ -49,8 +49,8 @@ {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} <div class="row" style="margin-top:5px;"> - {if !empty($IMAGE_INFO.path) && !empty({$IMAGE_INFO.orgname})} - <span class="col-lg-6" name="existingImages"><img src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" data-image-id="{$IMAGE_INFO.id}" width="400" height="250" ></span> + {if !empty($IMAGE_INFO.url)} + <span class="col-lg-6" name="existingImages"><img src="{$IMAGE_INFO.url}" data-image-id="{$IMAGE_INFO.id}" width="400" height="250" ></span> <span class="col-lg-3"> <span class="row"> <span class="col-lg-11">[{$IMAGE_INFO.name}]</span> @@ -61,4 +61,4 @@ </div> {/foreach} {/if} -{/strip} \ No newline at end of file +{/strip} diff --git a/layouts/v7/modules/Vtiger/uitypes/ImageDetailView.tpl b/layouts/v7/modules/Vtiger/uitypes/ImageDetailView.tpl index 9fc6de202c9615d44325d8309782d03f0e878acb..a5ca411b80d1a63e0bf5a0b7da4241b6fd0795cf 100644 --- a/layouts/v7/modules/Vtiger/uitypes/ImageDetailView.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/ImageDetailView.tpl @@ -10,7 +10,7 @@ ********************************************************************************/ -->*} {foreach key=ITER item=IMAGE_INFO from=$RECORD->getImageDetails()} - {if !empty($IMAGE_INFO.path) && !empty({$IMAGE_INFO.orgname})} - <img src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" width="150" height="80"> + {if !empty($IMAGE_INFO.url)} + <img src="{$IMAGE_INFO.url}" width="150" height="80"> {/if} {/foreach} \ No newline at end of file diff --git a/layouts/v7/modules/Vtiger/uitypes/Owner.tpl b/layouts/v7/modules/Vtiger/uitypes/Owner.tpl index 2b3905b9bb5a5eb58ad3a40d73af14a4122db92b..2af89d6b86ed5531f718c46c900cf6b892148003 100644 --- a/layouts/v7/modules/Vtiger/uitypes/Owner.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/Owner.tpl @@ -13,10 +13,10 @@ {assign var="SPECIAL_VALIDATOR" value=$FIELD_MODEL->getValidator()} {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()} {if $FIELD_MODEL->get('uitype') eq '53'} - {assign var=ALL_ACTIVEUSER_LIST value=$USER_MODEL->getAccessibleUsers()} - {assign var=ALL_ACTIVEGROUP_LIST value=$USER_MODEL->getAccessibleGroups()} + {assign var=ALL_ACTIVEUSER_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_USERS')]} + {assign var=ALL_ACTIVEGROUP_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_GROUPS')]} {assign var=ASSIGNED_USER_ID value=$FIELD_MODEL->get('name')} - {assign var=CURRENT_USER_ID value=$USER_MODEL->get('id')} + {assign var=CURRENT_USER_ID value=$USER_MODEL->get('id')} {assign var=FIELD_VALUE value=$FIELD_MODEL->get('fieldvalue')} {assign var=ACCESSIBLE_USER_LIST value=$USER_MODEL->getAccessibleUsersForModule($MODULE)} diff --git a/layouts/v7/modules/Vtiger/uitypes/OwnerFieldSearchView.tpl b/layouts/v7/modules/Vtiger/uitypes/OwnerFieldSearchView.tpl index 9b01991cc70f724fc00a0acb62f701964cdd8cf0..4fdd538d585da954607ce22c4d4277fcec339812 100644 --- a/layouts/v7/modules/Vtiger/uitypes/OwnerFieldSearchView.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/OwnerFieldSearchView.tpl @@ -10,24 +10,24 @@ ********************************************************************************/ -->*} {strip} - {assign var="FIELD_INFO" value=Zend_Json::encode($FIELD_MODEL->getFieldInfo())} + {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()} <div class="select2_search_div"> {assign var=ASSIGNED_USER_ID value=$FIELD_MODEL->get('name')} - {assign var=ALL_ACTIVEUSER_LIST value=$USER_MODEL->getAccessibleUsers()} + {assign var=ALL_ACTIVEUSER_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_USERS')]} {assign var=SEARCH_VALUES value=explode(',',$SEARCH_INFO['searchValue'])} {assign var=SEARCH_VALUES value=array_map("trim",$SEARCH_VALUES)} {if $FIELD_MODEL->get('uitype') eq '52' || $FIELD_MODEL->get('uitype') eq '77'} {assign var=ALL_ACTIVEGROUP_LIST value=array()} {else} - {assign var=ALL_ACTIVEGROUP_LIST value=$USER_MODEL->getAccessibleGroups()} + {assign var=ALL_ACTIVEGROUP_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_GROUPS')]} {/if} {assign var=ACCESSIBLE_USER_LIST value=$USER_MODEL->getAccessibleUsersForModule($MODULE)} {assign var=ACCESSIBLE_GROUP_LIST value=$USER_MODEL->getAccessibleGroupForModule($MODULE)} <input type="text" class="listSearchContributor inputElement select2_input_element"/> - <select class="select2 listSearchContributor {$ASSIGNED_USER_ID}" name="{$ASSIGNED_USER_ID}" multiple data-fieldinfo='{$FIELD_INFO|escape}' style="display:none"> + <select class="select2 listSearchContributor {$ASSIGNED_USER_ID}" name="{$ASSIGNED_USER_ID}" multiple data-fieldinfo='{Zend_Json::encode($FIELD_INFO)|escape}' style="display:none"> <optgroup label="{vtranslate('LBL_USERS')}"> {foreach key=OWNER_ID item=OWNER_NAME from=$ALL_ACTIVEUSER_LIST} <option value="{$OWNER_NAME}" data-picklistvalue= '{$OWNER_NAME}' {if in_array(trim(decode_html($OWNER_NAME)),$SEARCH_VALUES)} selected {/if} diff --git a/layouts/v7/modules/Vtiger/uitypes/OwnerGroup.tpl b/layouts/v7/modules/Vtiger/uitypes/OwnerGroup.tpl index 7584b5402b9539dd27c62716936f4931ed880a73..7968de1c9571c04b9d527a3042fec98fc4494ad5 100644 --- a/layouts/v7/modules/Vtiger/uitypes/OwnerGroup.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/OwnerGroup.tpl @@ -10,7 +10,7 @@ {strip} {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()} {assign var="SPECIAL_VALIDATOR" value=$FIELD_MODEL->getValidator()} - {assign var=ALL_ACTIVEGROUP_LIST value=$USER_MODEL->getAccessibleGroups()} + {assign var=ALL_ACTIVEGROUP_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_GROUPS')]} {assign var=ASSIGNED_GROUP_ID value=$FIELD_MODEL->get('name')} {assign var=CURRENT_USER_ID value=$USER_MODEL->get('id')} {assign var=FIELD_VALUE value=$FIELD_MODEL->get('fieldvalue')} diff --git a/layouts/v7/modules/Vtiger/uitypes/OwnerGroupFieldSearchView.tpl b/layouts/v7/modules/Vtiger/uitypes/OwnerGroupFieldSearchView.tpl index 0daeaafb853640958a2fd198e4f85b23b489203a..51edb7f9ee6784a66ddf3d9b1a1a8726dc84bf45 100644 --- a/layouts/v7/modules/Vtiger/uitypes/OwnerGroupFieldSearchView.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/OwnerGroupFieldSearchView.tpl @@ -8,6 +8,7 @@ *************************************************************************************} {strip} + {assign var="FIELD_INFO" value=$FIELD_MODEL->getFieldInfo()} {assign var=ASSIGNED_USER_ID value=$FIELD_MODEL->get('name')} {assign var=SEARCH_VALUES value=explode(',',$SEARCH_INFO['searchValue'])} {assign var=SEARCH_VALUES value=array_map("trim",$SEARCH_VALUES)} @@ -15,7 +16,7 @@ {if $FIELD_MODEL->get('uitype') eq '52' || $FIELD_MODEL->get('uitype') eq '77'} {assign var=ALL_ACTIVEGROUP_LIST value=array()} {else} - {assign var=ALL_ACTIVEGROUP_LIST value=$USER_MODEL->getAccessibleGroups()} + {assign var=ALL_ACTIVEGROUP_LIST value=$FIELD_INFO['picklistvalues'][vtranslate('LBL_GROUPS')]} {/if} {assign var=ACCESSIBLE_GROUP_LIST value=$USER_MODEL->getAccessibleGroupForModule($MODULE)} diff --git a/layouts/v7/modules/Vtiger/uitypes/Reference.tpl b/layouts/v7/modules/Vtiger/uitypes/Reference.tpl index 460d1c9fef7ffa9d14fa885cd3203589884c42db..6a9b519d67c3e5b734e7493d1d69ac957445161a 100644 --- a/layouts/v7/modules/Vtiger/uitypes/Reference.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/Reference.tpl @@ -51,11 +51,12 @@ <span class="input-group-addon relatedPopup cursorPointer" title="{vtranslate('LBL_SELECT', $MODULE)}"> <i id="{$MODULE}_editView_fieldName_{$FIELD_NAME}_select" class="fa fa-search"></i> </span> + {if (($smarty.request.view eq 'Edit') or ($MODULE_NAME eq 'Webforms')) && !in_array($REFERENCE_LIST[0],$QUICKCREATE_RESTRICTED_MODULES)} + <span class="input-group-addon createReferenceRecord cursorPointer clearfix" title="{vtranslate('LBL_CREATE', $MODULE)}"> + <i id="{$MODULE}_editView_fieldName_{$FIELD_NAME}_create" class="fa fa-plus"></i> + </span> + {/if} </div> - {if (($smarty.request.view eq 'Edit') or ($MODULE_NAME eq 'Webforms')) && !in_array($REFERENCE_LIST[0],$QUICKCREATE_RESTRICTED_MODULES)} - <span class="createReferenceRecord cursorPointer clearfix" title="{vtranslate('LBL_CREATE', $MODULE)}"> - <i id="{$MODULE}_editView_fieldName_{$FIELD_NAME}_create" class="fa fa-plus"></i> - </span> - {/if} + </div> {/strip} \ No newline at end of file diff --git a/layouts/v7/modules/Vtiger/uitypes/String.tpl b/layouts/v7/modules/Vtiger/uitypes/String.tpl index d5446d56576dc3f0b6b7b2ff7f916f93006964d8..00ec549f4208b9fc32266f91d059df3358108c72 100644 --- a/layouts/v7/modules/Vtiger/uitypes/String.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/String.tpl @@ -26,7 +26,7 @@ {/if} {if !empty($SPECIAL_VALIDATOR)}data-validator="{Zend_Json::encode($SPECIAL_VALIDATOR)}"{/if} {if $FIELD_INFO["mandatory"] eq true} data-rule-required="true" {/if} - {if count($FIELD_INFO['validator'])} + {if !empty($FIELD_INFO['validator']) && (count($FIELD_INFO['validator']))} data-specific-rules='{ZEND_JSON::encode($FIELD_INFO["validator"])}' {/if} /> diff --git a/layouts/v7/modules/Vtiger/uitypes/Text.tpl b/layouts/v7/modules/Vtiger/uitypes/Text.tpl index 1c75e18b9b443b2a74b412da06538a59608f8e06..53b1d0f055ffe7744cad12e1de8954405d0271b2 100644 --- a/layouts/v7/modules/Vtiger/uitypes/Text.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/Text.tpl @@ -22,7 +22,8 @@ data-specific-rules='{ZEND_JSON::encode($FIELD_INFO["validator"])}' {/if} > - {$FIELD_MODEL->get('fieldvalue')}</textarea> + {purifyHtmlEventAttributes($FIELD_MODEL->get('fieldvalue'),true)|regex_replace:"/(?!\w)\ (?=\w)/":" "} + </textarea> {else} <textarea rows="5" id="{$MODULE}_editView_fieldName_{$FIELD_NAME}" class="inputElement {if $FIELD_MODEL->isNameField()}nameField{/if}" name="{$FIELD_NAME}" {if !empty($SPECIAL_VALIDATOR)}data-validator='{Zend_Json::encode($SPECIAL_VALIDATOR)}'{/if} {if $FIELD_INFO["mandatory"] eq true} data-rule-required="true" {/if} @@ -30,6 +31,7 @@ data-specific-rules='{ZEND_JSON::encode($FIELD_INFO["validator"])}' {/if} > - {$FIELD_MODEL->get('fieldvalue')}</textarea> + {purifyHtmlEventAttributes($FIELD_MODEL->get('fieldvalue'),true)|regex_replace:"/(?!\w)\ (?=\w)/":" "} + </textarea> {/if} {/strip} diff --git a/layouts/v7/resources/application.js b/layouts/v7/resources/application.js index e3117227d7e28964474e53dda879f909218194e1..834d54ae8456456f644e41e835d054d0b669427c 100644 --- a/layouts/v7/resources/application.js +++ b/layouts/v7/resources/application.js @@ -40,7 +40,7 @@ window.app = (function () { if (!data['success'] && data['error']['message']) { aDeferred.resolve(new VtError(data['error'])); return; - } else if (data['result']) { + } else if (data['result'] && data['result'] !== null) { data = data['result']; } } @@ -73,7 +73,7 @@ window.app = (function () { if (!response['success'] && response['error']['message']) { aDeferred.resolve(new VtError(response['error'])); return; - } else if (response['result']) { + } else if (response['result'] && response['result'] !== null) { response = response['result']; } } @@ -206,7 +206,8 @@ window.app = (function () { for (var index = 0; index < queryParameters.length; index++) { var queryParam = queryParameters[index]; var queryParamComponents = queryParam.split('='); - params[queryParamComponents[0]] = queryParamComponents[1]; + if (queryParamComponents[0] in params) params[queryParamComponents[0]] += '&' + queryParamComponents[0] + '=' + queryParamComponents[1]; + else params[queryParamComponents[0]] = queryParamComponents[1]; } return params; }, @@ -536,4 +537,4 @@ jQuery(function () { modal_this.$element.focus() } })}; -}); +}); \ No newline at end of file diff --git a/layouts/v7/resources/helper.js b/layouts/v7/resources/helper.js index 58ffff39b002260e530783ee645da137ddce2f03..79b3564f922a4c71abb2fb106d294dfaa1e91664 100644 --- a/layouts/v7/resources/helper.js +++ b/layouts/v7/resources/helper.js @@ -87,12 +87,30 @@ jQuery.Class("Vtiger_Helper_Js",{ var timeComponent = dateTimeComponents[1]; var seconds = '00'; - var splittedDate = dateComponent.split("-"); + var splittedDate = ''; + var splittedDateFormat = ''; + + if (dateFormat.indexOf('.') !== -1) { + splittedDate = dateComponent.split('.'); + } else if (dateFormat.indexOf('/') !== -1) { + splittedDate = dateComponent.split('/'); + } else { + splittedDate = dateComponent.split('-'); + } + if(splittedDate.length > 3) { var errorMsg = app.vtranslate("JS_INVALID_DATE"); throw errorMsg; } - var splittedDateFormat = dateFormat.split("-"); + + if (dateFormat.indexOf('.') !== -1) { + splittedDateFormat = dateFormat.split('.'); + } else if (dateFormat.indexOf('/') !== -1) { + splittedDateFormat = dateFormat.split('/'); + } else { + splittedDateFormat = dateFormat.split('-'); + } + var year = splittedDate[splittedDateFormat.indexOf("yyyy")]; var month = splittedDate[splittedDateFormat.indexOf("mm")]; var date = splittedDate[splittedDateFormat.indexOf("dd")]; @@ -453,6 +471,7 @@ jQuery.Class("Vtiger_Helper_Js",{ aDeferred.resolve(); }) $('.myModal').modal('hide'); + $('.myModal').data('bs.modal',null); // clear any options previously set return aDeferred.promise(); }, diff --git a/layouts/v7/skins/contact/style.css b/layouts/v7/skins/contact/style.css index 29768f13bae7644df01e5ba205313683ec5f6105..9bcf7abccdd7d69d237c4a75280bae71bdf73bdd 100644 --- a/layouts/v7/skins/contact/style.css +++ b/layouts/v7/skins/contact/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,3 +7554,174 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/contact/style.css.map b/layouts/v7/skins/contact/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..75f016c84e06bb5d7ab6b2b28e8f3a43440cb999 --- /dev/null +++ b/layouts/v7/skins/contact/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,OAAO,MAJ/E;;;AAOJ;EACI,aAAa,qBAAb;EACA,SAAS,uDAAwD,OAAO,iBAChE,wDAAwD,OAAO,0CAC/D,8DAA8D,OAAO,oBAF7E;;;EAIA,kBAAA;EACA,mBAAA;EACA,kCAAA;;AAEJ;EACI,aAAa,sBAAb;EACA,SAAS,wDAAyD,OAAO,4CACjE,yDAAyD,OAAO,0CAChE,+DAA+D,OAAO,oBAF9E;;EAGA,kBAAA;EACA,mBAAA;EACA,kCAAA;;;;;AAMJ;EACI,SAAA;EACA,UAAA;EACA,gBAAA;EACA,gBAAA;;AAEJ;EACI,SAAA;EACA,UAAA;EACA,aAAa,8BAAb;EACA,eAAA;EACA,mBAAA;EACA,kBAAA;EACA,oBAAA;EACA,eAAA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AoB,QAAM,MAAM,IAAI,iBAAkB,GAAE,WAAY;EACpE,oBAAoB,QAAM,MAAM,IAAI,iBAAkB,GAAE,WAAY;IAChE,WAAA;IACA,sBAAA;;EAEJ,WAAY,GAAE;IACV,iBAAA;;EAEJ,WAAY,GAAE;IACV,6BAAA;IACA,oBAAA;;EAEJ,WAAY,GAAE,WAAW,OAAK;IAC1B,SAAA;IACA,8BAAA;;EAGJ;IACI,SAAA;;EAEJ,KAAK,MAAI;IACL,6BAAA;;EAEJ;IAEI,cAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,iBAAA;;EACA,mBAAC;IACG,gBAAA;;EAGR,cAAe;IACX,kBAAA;;EAEJ,YAAa;IACT,eAAA;;EAEJ;IACI,aAAA;;EAEJ;IACI,WAAA;;EAEJ;IACI,uBAAA;;EAEJ,iBAAkB;IACd,iBAAA;;EAEJ,mBAAoB;IAChB,iBAAA;;EAEJ;IACI,gBAAA;IACA,gBAAA;;EAEJ,gBAAiB;IACb,2BAAA;;EAEJ;IACI,sBAAA;IACA,mBAAA;IACA,kBAAA;IACA,aAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/inventory/style.css b/layouts/v7/skins/inventory/style.css index 6114bc0b513577b9d23f4082d60e170b6017decb..e8abef3601f38aa3f2acbc0a43903f334de8b483 100644 --- a/layouts/v7/skins/inventory/style.css +++ b/layouts/v7/skins/inventory/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,7 +7554,178 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #F1C40F; opacity: 1; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/inventory/style.css.map b/layouts/v7/skins/inventory/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..a985a55d0d4aab5b2925c08719b6fd1872f3d9ba --- /dev/null +++ b/layouts/v7/skins/inventory/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,O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UAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/marketing/style.css b/layouts/v7/skins/marketing/style.css index cad71bd87bf916a0450a30a90b7e38297c97fb35..bc22ed7708861c2891516271aa2d156fc4de8ff5 100644 --- a/layouts/v7/skins/marketing/style.css +++ b/layouts/v7/skins/marketing/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,6 +7554,176 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #EF5E29; opacity: 1; @@ -7732,19 +7933,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7789,3 +7990,4 @@ a.btnReport:hover { height: 450px; overflow: auto; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/marketing/style.css.map b/layouts/v7/skins/marketing/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..984efbfb96c90d7329fff7f7dfd0d33bf6163775 --- /dev/null +++ b/layouts/v7/skins/marketing/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,OAAO,MAJ/E;;;AAOJ;EACI,aAAa,qBAAb;EACA,SAAS,uDAAwD,OAAO,iBAChE,wDAAwD,OAAO,0CAC/D,8DAA8D,OAAO,oBAF7E;;;EAIA,kBAAA;EACA,mBAAA;EACA,kCAAA;;AAEJ;EACI,aAAa,sBAAb;EACA,SAAS,wDAAyD,OAAO,4CACjE,yDAAyD,OAAO,0CAChE,+DAA+D,OAAO,oBAF9E;;EAGA,kBAAA;EACA,mBAAA;EACA,kCAAA;;;;;AAMJ;EACI,SAAA;EACA,UAAA;EACA,gBAAA;EACA,gBAAA;;AAEJ;EACI,SAAA;EACA,UAAA;EACA,aAAa,8BAAb;EACA,eAAA;EACA,mBAA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;EACJ,SAAS,GAAT;EACA,qBAAA;EACA,YAAA;EACA,WAAA;EACA,mBAAA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,mBAAA;EACA,sBAAA;;AAEJ,YAAa;EACT,SAAS,GAAT;EACA,qBAAA;EACA,YAAA;EACA,WAAA;EACA,mBAAA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,UAAA;EACA,UAAA;;AAEJ,YAAY,QAAS;EACjB,UAAA;EACA,UAAA;;AAEJ;EACI,YAAA;EACA,WAAA;EACA,WAAA;EACA,sBAAA;EACA,UAAA;EACA,UAAA;;AAIJ,CAAC;AAAY,CAAC,UAAU;EACpB,YAAA;;AAGJ;EACI,WAAA;EACA,qBAAA;EACA,eAAA;EACA,sBAAA;;AAEJ,OAAO;EACH,kBAAA;;AAEJ,OAAO;EACH,kBAAA;;AAEJ,OAAO;EACH,YAAA;;AAEJ,OAAO;EACH,mBAAA;;AAEJ,OAAO;EACH,mBAAA;;AAEJ,OAAO;EACH,YAAA;;AAEJ;EACI,4BAAA;;AAEJ;EACI,UAAA;EACA,kBAAA;;AAEJ;AAAe;EACX,qBAAA;EACA,sBAAA;EACA,WAAA;EACA,eAAA;;AAEJ;EACI,kBAAA;;AAEJ,aAAc,sBAAqB;EAC/B,SAAS,EAAT;EACA,gBAAA;EACA,sBAAA;EACA,qBAAA;EACA,sBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,kBAAA;EACA,kBAAA;;AAEJ,aAAc,sBAAqB;EAC/B,kBAAA;;AAEJ,aAAa,QAAS,sBAAqB;EACvC,gBAAA;EACA,sCAAA;;AAEJ;EACE,aAAA;EACA,cAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/marketing_and_sales/style.css b/layouts/v7/skins/marketing_and_sales/style.css index 8f8f0cb16db4aa6b46f0535ccbcab077a835db7d..5f05cb876f175a5d1c871d95a39cb32d8febd979 100644 --- a/layouts/v7/skins/marketing_and_sales/style.css +++ b/layouts/v7/skins/marketing_and_sales/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,7 +7554,178 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #3CB878; opacity: 1; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/marketing_and_sales/style.css.map b/layouts/v7/skins/marketing_and_sales/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..a985a55d0d4aab5b2925c08719b6fd1872f3d9ba --- /dev/null +++ b/layouts/v7/skins/marketing_and_sales/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AA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I,iBAAA;;EACA,mBAAC;IACG,gBAAA;;EAGR,cAAe;IACX,kBAAA;;EAEJ,YAAa;IACT,eAAA;;EAEJ;IACI,aAAA;;EAEJ;IACI,WAAA;;EAEJ;IACI,uBAAA;;EAEJ,iBAAkB;IACd,iBAAA;;EAEJ,mBAAoB;IAChB,iBAAA;;EAEJ;IACI,gBAAA;IACA,gBAAA;;EAEJ,gBAAiB;IACb,2BAAA;;EAEJ;IACI,sBAAA;IACA,mBAAA;IACA,kBAAA;IACA,aAAA;;;AC78QR,aAAc,GAAG,GAAE,OAAQ;EACvB,8BAAA;EACA,UAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/project/style.css b/layouts/v7/skins/project/style.css index 8daed4526dc06a3eafd28f9d233626a26b9fe7f1..505b879cd90d7faa6c2111b6dc0200bed9cb6da4 100644 --- a/layouts/v7/skins/project/style.css +++ b/layouts/v7/skins/project/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,7 +7554,178 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #8E44AD; opacity: 1; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/project/style.css.map b/layouts/v7/skins/project/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..f2e71d91c4809477ab12569174531c6c3d441cab --- /dev/null +++ b/layouts/v7/skins/project/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,OAAO,MAJ/E;;;AAOJ;EACI,aAAa,qBAAb;EACA,SAAS,uDAAwD,OAAO,iBAChE,wDAAwD,OAAO,0CAC/D,8DAA8D,OAAO,oBAF7E;;;EAIA,kBAAA;EACA,mBAAA;EACA,kCAAA;;AAEJ;EACI,aAAa,sBAAb;EACA,SAAS,wDAAyD,OAAO,4CACjE,yDAAyD,OAAO,0CAChE,+DAA+D,OAAO,oBAF9E;;EAGA,kBAAA;EACA,mBAAA;EACA,kCAAA;;;;;AAMJ;EACI,SAAA;EACA,UAAA;EACA,gBAAA;EACA,g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AAA;IACA,sBAAA;IACA,qBAAA;;EAEJ,KAAK,cAAe,GAAE,WAAY;EAClC,mBAAmB,QAAM,MAAO,GAAE,WAAY;EAC9C,oBAAoB,QAAM,MAAM,IAAI,iBAAkB,GAAE,WAAY;EACpE,oBAAoB,QAAM,MAAM,IAAI,iBAAkB,GAAE,WAAY;IAChE,WAAA;IACA,sBAAA;;EAEJ,WAAY,GAAE;IACV,iBAAA;;EAEJ,WAAY,GAAE;IACV,6BAAA;IACA,oBAAA;;EAEJ,WAAY,GAAE,WAAW,OAAK;IAC1B,SAAA;IACA,8BAAA;;EAGJ;IACI,SAAA;;EAEJ,KAAK,MAAI;IACL,6BAAA;;EAEJ;IAEI,cAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,eAAA;;EAEJ;IACI,iBAAA;;EACA,mBAAC;IACG,gBAAA;;EAGR,cAAe;IACX,kBAAA;;EAEJ,YAAa;IACT,eAAA;;EAEJ;IACI,aAAA;;EAEJ;IACI,WAAA;;EAEJ;IACI,uBAAA;;EAEJ,iBAAkB;IACd,iBAAA;;EAEJ,mBAAoB;IAChB,iBAAA;;EAEJ;IACI,gBAAA;IACA,gBAAA;;EAEJ,gBAAiB;IACb,2BAAA;;EAEJ;IACI,sBAAA;IACA,mBAAA;IACA,kBAAA;IACA,aAAA;;;AC98QR,aAAc,GAAG,GAAE,OAAQ;EACvB,8BAAA;EACA,UAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/sales/style.css b/layouts/v7/skins/sales/style.css index 8f8f0cb16db4aa6b46f0535ccbcab077a835db7d..5f05cb876f175a5d1c871d95a39cb32d8febd979 100644 --- a/layouts/v7/skins/sales/style.css +++ b/layouts/v7/skins/sales/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,7 +7554,178 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #3CB878; opacity: 1; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/sales/style.css.map b/layouts/v7/skins/sales/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..f2e71d91c4809477ab12569174531c6c3d441cab --- /dev/null +++ b/layouts/v7/skins/sales/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E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ACI,gBAAA;IACA,gBAAA;;EAEJ,gBAAiB;IACb,2BAAA;;EAEJ;IACI,sBAAA;IACA,mBAAA;IACA,kBAAA;IACA,aAAA;;;AC98QR,aAAc,GAAG,GAAE,OAAQ;EACvB,8BAAA;EACA,UAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/support/style.css b/layouts/v7/skins/support/style.css index 221c9e500a4cf9352e4e466de43c196e4055d34b..9d3d704d78b58c1d4eb80fcd9c110da60530bce5 100644 --- a/layouts/v7/skins/support/style.css +++ b/layouts/v7/skins/support/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,6 +7554,176 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} .modules-menu ul li.active a { border-left: 3px solid #6297C3; opacity: 1; @@ -7661,3 +7862,4 @@ div.flip { .caseRelatedRecords { margin-bottom: 0px !important; } +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/support/style.css.map b/layouts/v7/skins/support/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..5b80b58966e03258bf9d19b0509fdb1de9840a36 --- /dev/null +++ b/layouts/v7/skins/support/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less","style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,OAAO,MAJ/E;;;AAOJ;EACI,aAAa,qBAAb;EACA,SAAS,uDAAwD,OAAO,iBAChE,wDAAwD,OAAO,0CAC/D,8DAA8D,OAAO,oBAF7E;;;EAIA,kBAAA;EACA,mBAAA;EACA,kCAAA;;AAEJ;EACI,aAAa,sBAAb;EACA,SAAS,wDAAyD,OAAO,4CACjE,yDAAyD,OAAO,0CAChE,+DAA+D,OAAO,oBAF9E;;EAGA,kBAAA;EACA,mBAAA;EACA,kCAAA;;;;;AAMJ;EACI,SAAA;EACA,UAAA;EACA,gBAAA;EACA,gBAAA;;AAEJ;EACI,SAAA;EACA,UAAA;EACA,aAAa,8BAAb;EACA,eAAA;EACA,mBAAA;EACA,kBAAA;EACA,oBAAA;EACA,eAAA;;AAEJ,IAAK,eAAe;EAChB,kBAAA;;AAEJ;EACI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ACA,eAAA;EACA,iBAAA;EACA,cAAA;;AAGD;EACa,kCAAA;EACC,+BAAA;EACA,6BAAA;EACA,8BAAA;EACA,0BAAA;EACA,eAAA;;AAGd,iBAAiB;EAChB,mBAAmB,cAAnB;EACA,gBAAgB,cAAhB;EACA,eAAe,cAAf;EACA,cAAc,cAAd;EACA,WAAW,cAAX;;AAGD;EACC,eAAA;EACA,kBAAA;EACA,kBAAA;EACA,YAAA;EAAY,gBAAA;EACZ,mBAAA;;AAED;EACC,gCAAA;EACA,WAAA;;AAGD;EACC,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;;AAED;EACC,kBAAA;EACA,qBAAA;EACA,kBAAA;EACA,kBAAA;EACA,SAAA;EAAU,UAAA;EACV,QAAA;EAAS,WAAA;EACT,YAAA;EACA,YAAA;;AAGD;EACC,wBAAA;EACA,iBAAA;;AAGD;EACC,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;;AAGD;EACC,wBAAA;EACA,mBAAA;;AAED;EACC,gBAAA;EACA,mBAAA;EACA,iBAAA;;AAED;EACC,6BAAA;;AAGD;EACC,eAAA;EACA,gBAAA;;AAGD;EACC,6BAAA","file":"style.css"} \ No newline at end of file diff --git a/layouts/v7/skins/tools/style.css b/layouts/v7/skins/tools/style.css index cd939c86dc0940b5819bf767966d6a86caf69b45..543d2ef72230165133a7e72b2a615023071aa968 100644 --- a/layouts/v7/skins/tools/style.css +++ b/layouts/v7/skins/tools/style.css @@ -49,32 +49,31 @@ a:active { /************ Layout **************/ /**********************************/ html { - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body { - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container { margin-right: 15px; } #page { - min-height: 100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice { font-family: 'OpenSans-Regular', sans-serif; } -body { - font-family: 'OpenSans-Regular', sans-serif; - font-size: 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar { background: #fff; border-bottom: 0; @@ -86,7 +85,6 @@ body { } .global-nav .global-actions { padding-right: 15px; - height: 42px !important; } .app-nav { position: relative; @@ -97,11 +95,12 @@ body { background: #FBFBFB; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid #DDDDDD; + border-top: 1px solid #ccc; + border-width: thin; } .main-container { position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after { @@ -109,6 +108,9 @@ body { display: block; clear: both; } +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container { display: inline-block; @@ -123,9 +125,7 @@ body { padding-right: 0; position: absolute; width: 100%; - height: 42px; - /* border-top:1px solid #ddd;*/ - border-bottom: 1px solid #ddd; + height: 43px; } .app-nav .module-action-bar .module-action-content { background: #FBFBFB; @@ -138,7 +138,7 @@ body { .main-container .module-nav { display: inline-block; width: 42px; - z-index: 10; + z-index: 1093; position: absolute; bottom: 0; top: 0; @@ -158,15 +158,14 @@ body { min-height: 100%; background: #FFFFFF; border-right: 1px solid #DDDDDD; + overflow: auto; + border-width: thin; } .main-container .content-area { width: 100%; padding-left: 283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv { - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -235,7 +234,13 @@ body { padding-top:5px; }*/ .global-nav .navbar-nav > li div a { - padding: 15px; + padding: 13px; +} +#navbar > ul > li > div > div > a { + float: left; +} +#navbar > ul > li > div > a { + float: left; } .global-nav > ul { margin-right: 20px; @@ -257,11 +262,12 @@ body { height: 100%; width: 100%; color: #AAAAAA; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid #DDDDDD; + border-width: thin; } .search-link .adv-search { margin-top: 9px; @@ -390,9 +396,7 @@ body { height: 42px; text-align: center; line-height: 42px; - /* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ } .app-nav .app-indicator-icon-container .app-indicator-icon { font-size: 24px; @@ -764,6 +768,9 @@ a.menu-item:hover { .logout-footer hr { margin: 10px 0; } +#logout-footer > div > span > a { + float: none; +} .app-home { background: #C5EFF7; } @@ -788,8 +795,11 @@ a.menu-item:hover { /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area { - padding-left: 50px; + padding-left: 3%; } .viewContent .content-area.full-width { padding-left: 15px; @@ -854,6 +864,7 @@ a { border-radius: 1px; box-shadow: none; border: 1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement { @@ -862,9 +873,10 @@ input[type="password"].inputElement { .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position: initial; z-index: 3; + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input { height: 29px; @@ -880,6 +892,7 @@ input[type="password"].inputElement { .inputElement.select2-container .select2-choice { border-radius: 0 2px 2px 0; height: 28px; + border-width: thin; } .inputElement.select2-container { border: 0; @@ -1340,6 +1353,7 @@ ul.unstyled { border-radius: 0px; font-weight: 100; cursor: pointer; + border-width: thin; } .btn:hover { cursor: pointer; @@ -1355,6 +1369,7 @@ ul.unstyled { border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1405,6 +1420,7 @@ ul.unstyled { .listview-actions-container { position: relative; background: #fff; + padding-top: 10px; } .listview-pagination i { font-size: 20px; @@ -1434,6 +1450,8 @@ ul.unstyled { width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table { margin-bottom: 0; @@ -1456,7 +1474,7 @@ ul.unstyled { .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td { vertical-align: middle; - padding: 3px; + padding: 8px 3px; } .listview-table > tbody > tr > td .value, .listview-table > tfoot > tr > td .value { @@ -1473,6 +1491,7 @@ ul.unstyled { vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } .listViewEntries .relatedListEntryValues .value { vertical-align: middle; @@ -1724,7 +1743,7 @@ input[type=checkbox]:checked { padding-top: 5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row { margin-bottom: 4px; @@ -1770,7 +1789,7 @@ th { color: inherit; } #detailView td.fieldValue .edit { - width: 90%; + width: 100%; } .overlayDetailHeader .recordBasicInfo .fieldLabel .action, .detailview-header .recordBasicInfo .fieldLabel .action { @@ -1809,16 +1828,6 @@ th { .overlayDetailHeader button.btn { margin: 0px 1px !important; } -.referencefield-wrapper .createReferenceRecord { - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid #DDDDDD; - padding: 3px 7px; - text-align: center; - color: #666; - background: #F3F3F3; -} .input-save-wrap { float: left; display: table-cell; @@ -1827,7 +1836,7 @@ th { color: #FFFFFF; } .summaryView .referencefield-wrapper { - max-width: 150px; + width: 80%; display: table-cell; } .summaryView .referencefield-wrapper .input-group.time, @@ -1836,6 +1845,8 @@ th { } .referencefield-wrapper { display: table-cell; + width: 80%; + max-width: 325px; } .record-header { min-height: 80px; @@ -1981,18 +1992,23 @@ th { .quickPreviewModuleHeader .recordImage [class^="vicon-"] { font-size: 35px; } +.detailViewContainer { + background: #f9f9f9; + min-height: inherit; +} .detailViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; + border-width: thin; } .detailViewContainer .block hr { margin: 10px 0; } .editViewContainer .block { background: #FFFFFF; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding-left: 15px; padding-right: 15px; } @@ -2018,7 +2034,7 @@ th { border: 0 !important; } #overlayPage { - top: 43px; + top: 86px; position: fixed; width: 100%; z-index: 1030; @@ -2184,10 +2200,11 @@ th { .editViewContents .fieldBlockContainer, .summaryView { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryView .fieldLabel { padding-left: 0px; @@ -2217,10 +2234,11 @@ th { } .summaryWidgetContainer { position: relative; - border: 1px solid #F3F3F3; + border: 1px solid #eee; padding: 15px; margin-bottom: 10px; background: #FFFFFF; + border-width: thin; } .summaryWidgetContainer .widget_header { margin-bottom: 6px; @@ -2229,8 +2247,7 @@ th { font-size: 16px; } .summaryWidgetContainer .commentTitle { - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName { color: blue; @@ -2240,7 +2257,7 @@ th { } .summaryWidgetContainer .commentContainer { background: white; - border-color: #F3F3F3; + border-color: #eee; } .summaryWidgetContainer .commentContainertextarea { width: 100%; @@ -2248,7 +2265,8 @@ th { } .noCommentsMsgContainer, .quick-preview-modal .noContent { - border: 1px solid #CCC; + border: 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name { display: table-cell; @@ -2367,7 +2385,8 @@ th { } .fieldBlockContainer .inputElement { height: 30px; - width: 200px; + width: 100%; + max-width: 325px; } .editViewContents .input.form-control:focus, .editViewContents .input.form-control:hover, @@ -2379,7 +2398,6 @@ th { width: 100%; } .editViewContents .input-group { - width: 208px; float: left; } .editViewContents .fieldLabel { @@ -3321,7 +3339,7 @@ th { font-size: 20px; font-weight: bold; line-height: 18px; - opacity: .2; + opacity: 0.2; } #settingsShortCutsContainer .col-lg-3.moduleBlock:hover .unpin { display: inline-block; @@ -3830,6 +3848,7 @@ th { } .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { font-size: 14px; @@ -4975,7 +4994,7 @@ hr { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; - z-index: 6; + z-index: 1090; } .modal-footer-overwrite-style { position: initial; @@ -5061,7 +5080,9 @@ hr { } .related-tabs.row .nav > li { padding: 0 10px; - margin: 0 2px; + margin: 0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav > li { padding: 0 10px; @@ -5077,6 +5098,7 @@ hr { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; + margin-bottom: 1px; } .row .nav > li > a:hover { border-bottom-color: #555; @@ -5102,6 +5124,7 @@ TN-34230 .row .nav > li > a:hover { .contents.tabbable .nav-tabs > li.active:focus { border: none; border-bottom: 3px solid #555; + margin-bottom: 0; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, @@ -6010,6 +6033,9 @@ div.tooltip-inner { .detailview-header-block { background: white; padding: 15px; + padding-top: 25px; + border: 1px solid #eee; + border-width: thin; } .detailViewContainer .content-area, .editViewPageDiv .content-area, @@ -6025,13 +6051,15 @@ div.tooltip-inner { padding: 15px; } .detailview-content .details.row .relatedHeader { - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .detailview-content .details.row .relatedContents { background: white; padding: 0; margin-top: 0; - border: 1px solid #F3F3F3; + border: 1px solid #eee; + border-width: thin; } .related-tabs.row { background: #FFFFFF; @@ -6040,7 +6068,7 @@ div.tooltip-inner { .detailViewContainer .commentContainer .commentTitle.row, .detailViewContainer .commentContainer .showcomments { background: #FFFFFF; - border-color: #F3F3F3; + border-color: #eee; } .detailViewTwitterImage { position: absolute; @@ -6108,11 +6136,12 @@ div.tooltip-inner { border-left: 0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon { - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group { float: left; @@ -6124,11 +6153,13 @@ div.tooltip-inner { } .listViewEntries .input-group, .referencefield-wrapper .input-group { - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control { - width: 70%; + width: 80%; + max-width: 300px; } .detailview-table input[type="checkbox"] { width: 13px !important; @@ -6136,7 +6167,8 @@ div.tooltip-inner { } .detailview-table .input-group-addon + .inputElement.form-control, .detailview-table .inputElement.form-control.input-medium { - width: 100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, .detailview-table .referencefield-wrapper .inputElement, @@ -6318,7 +6350,6 @@ div.tooltip-inner { } .dashBoardContainer .tab-pane .dashBoardTabContents ul { position: relative; - height: 960px; width: 1260px; } .nav-tabs > li { @@ -6679,7 +6710,7 @@ li.select2-search-choice div { padding: 3px; } .floatThead-table { - border-left: 1px solid #DDDDDD; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -6891,19 +6922,19 @@ a.btnReport:hover { box-sizing: border-box; } .column.l1 { - width: 4.166666666667%; + width: 4.16666667%; } .column.l2 { - width: 8.333333333333%; + width: 8.33333333%; } .column.l3 { width: 12.5%; } .column.l5 { - width: 20.83333333333%; + width: 20.83333333%; } .column.l8 { - width: 33.33333333333%; + width: 33.33333333%; } .column.l9 { width: 37.5%; @@ -7523,3 +7554,174 @@ input:focus:-ms-input-placeholder { .moduleIcon .custom-module { font-weight: bold; } +.navbar-fixed-top { + z-index: 1095 !important; +} +body .fc { + overflow: auto; +} +.margin0 { + margin: 0; +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, +.loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width: 0px) and (max-width: 830px) { + table.summary-table > tbody > tr > td, + table.summary-table > tbody > tr > th, + table.summary-table > tfoot > tr > td, + table.summary-table > tfoot > tr > th, + table.summary-table > thead > tr > td, + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > tbody > tr > td, + .quickCreateContent > table.table > tbody > tr > th, + .quickCreateContent > table.table > tfoot > tr > td, + .quickCreateContent > table.table > tfoot > tr > th, + .quickCreateContent > table.table > thead > tr > td, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tbody > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > tfoot > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > td, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > tbody > tr > td, + .detailview-table > tbody > tr > th, + .detailview-table > tfoot > tr > td, + .detailview-table > tfoot > tr > th, + .detailview-table > thead > tr > td, + .detailview-table > thead > tr > th { + display: block; + min-width: 100%!important; + } + table.summary-table > thead > tr > th, + .quickCreateContent > table.table > thead > tr > th, + .fieldBlockContainer > table.table:not(#lineItemResult) > thead > tr > th, + .detailview-table > thead > tr > th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent > table.table td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer > table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue > span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + .search-link { + border: 0; + } + #page > nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60 { + margin-left: 0 ; + } + .overlayPageContent { + padding-bottom: 0; + } + .overlayPageContent.fade { + overflow: scroll; + } + .overlayDetail .modal-content { + position: relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } +} +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layouts/v7/skins/tools/style.css.map b/layouts/v7/skins/tools/style.css.map new file mode 100644 index 0000000000000000000000000000000000000000..75f016c84e06bb5d7ab6b2b28e8f3a43440cb999 --- /dev/null +++ b/layouts/v7/skins/tools/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["C:/xampp/htdocs/vtigercrmcode/layouts/v7/skins/vtiger/style.less"],"names":[],"mappings":"AAEA;EACI,aAAa,QAAb;EACA,SAAQ,oDAAR;;EACA,SAAQ,4DAA4D,OAAO,wCACnE,sDAAsD,OAAO,0CAC7D,qDAAsD,OAAO,4CAC7D,4DAA4D,OAAO,MAH3E;;EAIA,mBAAA;EACA,kBAAA;EACA,kCAAA;;AAGJ,CAAC;AAAO,CAAC;AACT,CAAC;AAAO,CAAC;EACL,aAAA;;AAGJ;EACI,aAAa,kBAAb;EACA,SAAS,iDAAT;;EACA,SAAQ,kDAAmD,OAAO,4CAC1D,yDAAyD,OAAO,wCAChE,oDAAoD,OAAO,0CAC3D,mDAAmD,OAAO,0CAC1D,8DAA8D,OAAO,MAJ7E;;;AAMJ;EACI,aAAa,mBAAb;EACA,SAAS,mDAAT;;EACA,SAAQ,oDAAqD,OAAO,4CAC5D,2DAA2D,OAAO,wCAClE,sDAAsD,OAAO,0CAC7D,qDAAqD,OAAO,0CAC5D,gEAAgE,OAAO,MAJ/E;;;AAOJ;EACI,aAAa,qBAAb;EACA,SA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bf59e186053d..1bfa986476c57b1df475fc9ffe112f8e9804d586 100644 --- a/layouts/v7/skins/vtiger/style.less +++ b/layouts/v7/skins/vtiger/style.less @@ -60,32 +60,31 @@ a:focus,a:active{ /************ Layout **************/ /**********************************/ html{ - height: 100%; + margin: 0; + padding: 0; overflow-y: auto; + min-height: 100%; } body{ - width: 100%; margin: 0; padding: 0; - height: 100%; + font-family: 'OpenSans-Regular', sans-serif; + font-size : 12px; + font-weight: normal; + font-style: normal; + font-kerning: normal; + height: inherit; } body > .mCSB_inside > .mCSB_container{ margin-right: 15px; } #page{ - min-height:100%; padding-top: 84px; + height: inherit; } .select2-container .select2-choice{ font-family: 'OpenSans-Regular', sans-serif; } -body{ - font-family: 'OpenSans-Regular', sans-serif; - font-size : 12px; - font-weight: normal; - font-style: normal; - font-kerning: normal; -} .app-fixed-navbar{ background: #fff; border-bottom: 0; @@ -97,7 +96,6 @@ body{ } .global-nav .global-actions{ padding-right:15px; - height: 42px !important; } .app-nav{ position: relative; @@ -108,11 +106,12 @@ body{ background: @blockBackground; margin-bottom: 0; padding: 4px 0; - border-top: 1px solid @lightColorBorder; + border-top: 1px solid #ccc; + border-width: thin; } .main-container{ position: relative; - min-height: 100%; + min-height: calc(100vh - 108px); } .main-container:before, .main-container:after{ @@ -120,7 +119,9 @@ body{ display: block; clear:both; } - +.main-container .row { + min-height: inherit; +} @media (min-width: 992px) { .global-nav .logo-container{ display: inline-block; @@ -135,9 +136,7 @@ body{ padding-right: 0; position: absolute; width: 100%; - height: 42px; -/* border-top:1px solid #ddd;*/ - border-bottom:1px solid #ddd + height: 43px; } .app-nav .module-action-bar .module-action-content{ background: @blockBackground; @@ -158,7 +157,6 @@ body{ min-height: 100%; background-color: @moduleNav; background: @moduleNav; - } .main-container .sidebar-essentials { display: inline-block; @@ -171,15 +169,14 @@ body{ min-height: 100%; background: @white; border-right: 1px solid @lightColorBorder; + overflow: auto; + border-width: thin; } .main-container .content-area{ width: 100%; padding-left:283px; - padding-top: 15px; - min-height: 768px; } .main-container .settingsPageDiv{ - min-height: 768px; padding-left: 230px; } .main-container .settingsNav { @@ -254,8 +251,16 @@ body{ padding-top:5px; }*/ .global-nav .navbar-nav > li div a{ - padding : 15px; + padding : 13px; +} +#navbar > ul > li > div > div > a{ + float: left; } + +#navbar > ul > li > div > a{ + float: left; +} + .global-nav>ul{ margin-right: 20px; } @@ -278,11 +283,12 @@ body{ height: 100%; width: 100%; color: @search-link-color; - margin-top: 4px; + margin: 4px; padding: 0px 10px; text-decoration: none; vertical-align: top; border: 1px solid @lightColorBorder; + border-width: thin; .adv-search { margin-top:9px; } @@ -418,9 +424,7 @@ body{ height: 42px; text-align: center; line-height: 42px; -/* background-color: #2c3b49;*/ color: #ffffff; - /*border-bottom: 1px solid #272B46;*/ .app-indicator-icon { font-size: 24px; line-height: 40px; @@ -817,6 +821,10 @@ a.menu-item:hover{ margin: 10px 0; } +#logout-footer > div > span > a { + float : none; +} + .app-home { background: @app_home; } @@ -848,10 +856,12 @@ a.menu-item:hover{ /*************************************************/ /******** View styles (List/Edit/Detail..) *******/ /*************************************************/ +.viewContent { + height: inherit; +} .viewContent .content-area{ - padding-left : 50px; + padding-left : 3%; } - .viewContent .content-area.full-width{ padding-left : 15px; } @@ -926,6 +936,7 @@ a{ border-radius: 1px; box-shadow: none; border:1px solid #cccccc; + border-width: thin; } input[type="text"].inputElement, input[type="password"].inputElement{ @@ -934,10 +945,10 @@ input[type="password"].inputElement{ .select2-container-multi .select2-choices { min-height: 28px; border-radius: 1px; - border-color: #aaa; + border-color: #ccc; position:initial; z-index : 3; - + border-width: thin; } .select2-container-multi .select2-choices .select2-search-field input{ height: 29px; @@ -956,6 +967,7 @@ input[type="password"].inputElement{ .inputElement.select2-container .select2-choice{ border-radius: 0 2px 2px 0; height : 28px; + border-width: thin; } .inputElement.select2-container { @@ -1474,6 +1486,7 @@ ul.unstyled{ border-radius: 0px; font-weight: 100; cursor:pointer; + border-width: thin; } .module-buttons#ClearDemoData{ @@ -1488,6 +1501,7 @@ ul.unstyled{ border: 1px solid #ddd; color: #666; background: #fff; + border-width: thin; } .module-buttons:hover, .module-buttons:focus, @@ -1550,6 +1564,7 @@ ul.unstyled{ .listview-actions-container { position: relative; background: #fff; + padding-top:10px; } .listview-pagination i{ @@ -1591,6 +1606,8 @@ ul.unstyled{ width: 100%; border: 1px solid #ddd; margin-top: 10px; + overflow: scroll; + border-width: thin; } .listview-table{ @@ -1615,7 +1632,7 @@ ul.unstyled{ .listview-table > tbody > tr > td, .listview-table > tfoot > tr > td{ vertical-align: middle; - padding: 3px; + padding: 8px 3px; .value{ padding: 0 5px; } @@ -1633,6 +1650,7 @@ ul.unstyled{ vertical-align: middle; width: 100%; display: inline-block; + word-break: normal; } } .listViewEntries .relatedListEntryValues .value{ @@ -1927,7 +1945,7 @@ input[type=checkbox]:checked{ padding-top:5px; } .detailViewButtoncontainer button.btn { - margin: 0px 1px !important; + margin: 1px !important; } .detailview-header .recordBasicInfo > .info-row{ margin-bottom: 4px; @@ -1981,7 +1999,7 @@ strong, b, th{ } #detailView td.fieldValue .edit{ - width:90%; + width:100%; } //detail view header edit @@ -2032,17 +2050,6 @@ strong, b, th{ //detail view header edit end //detailview reference style removed - -.referencefield-wrapper .createReferenceRecord{ - float: left; - margin-left: 5px; - margin-top: 3px; - border: 1px solid @lightColorBorder; - padding: 3px 7px; - text-align: center; - color: #666; - background: @referencefieldBackground; -} .input-save-wrap{ float:left; display: table-cell; @@ -2051,7 +2058,7 @@ strong, b, th{ } } .summaryView .referencefield-wrapper{ - max-width: 150px; + width: 80%; display: table-cell; .input-group.time, .input-group.date{ @@ -2061,6 +2068,8 @@ strong, b, th{ .referencefield-wrapper{ display: table-cell; + width: 80%; + max-width: 325px; } //removed styles for reference field @@ -2181,6 +2190,10 @@ strong, b, th{ font-size: 35px; } //ends +.detailViewContainer { + background:@detailViewbackground; + min-height: inherit; +} .detailViewContainer .block{ background:@white; border:1px solid @detailViewContainerBorderColor; @@ -2189,6 +2202,7 @@ strong, b, th{ hr{ margin: 10px 0; } + border-width: thin; } .editViewContainer .block{ @@ -2221,7 +2235,7 @@ strong, b, th{ border: 0 !important; } #overlayPage { - top:43px; + top:86px; position:fixed; width:100%; z-index: 1030; @@ -2409,6 +2423,7 @@ strong, b, th{ padding : 15px; margin-bottom : 10px; background: @white; + border-width: thin; } .summaryView .fieldLabel{ @@ -2448,6 +2463,7 @@ strong, b, th{ padding : 15px; margin-bottom : 10px; background: @white; + border-width: thin; } .summaryWidgetContainer .widget_header{ @@ -2459,8 +2475,7 @@ strong, b, th{ } .summaryWidgetContainer .commentTitle{ - padding-left: 15px; - padding-right: 15px; + margin-bottom: 25px; } .summaryWidgetContainer .creatorName{ @@ -2483,7 +2498,8 @@ strong, b, th{ .noCommentsMsgContainer, .quick-preview-modal .noContent{ - border : 1px solid #CCC; + border : 1px solid #eee; + border-width: thin; } .summaryWidgetContainer .recordImage .name{ display: table-cell; @@ -2621,7 +2637,8 @@ strong, b, th{ .fieldBlockContainer .inputElement{ height : 30px; - width : 200px; + width: 100%; + max-width: 325px; } //editview input-group styles .editViewContents { @@ -2635,7 +2652,6 @@ strong, b, th{ width:100%; } .input-group{ - width:208px; float:left; } .fieldLabel { @@ -4282,6 +4298,7 @@ font-family: 'OpenSans-Semibold', sans-serif; .calendarview { width: 100%; + padding-top: 15px; } .calendar-sidebar-tabs { @@ -5692,7 +5709,9 @@ hr{ //related tabs css .related-tabs.row .nav>li{ padding:0 10px; - margin:0 2px; + margin:0 2px 3px 2px; + width: 90px; + text-align: center; } .massEditTabs.nav>li{ @@ -5709,6 +5728,7 @@ hr{ -moz-box-sizing:border-box; -webkit-box-sizing:border-box; -o-box-sizing:border-box; + margin-bottom: 1px; } .row .nav>li>a:hover{ border-bottom-color:@relatedtabsborderbottomcolor; @@ -5730,6 +5750,7 @@ hr{ .nav-tabs>li.active,.nav-tabs>li:hover,.nav-tabs>li.active:focus { border: none; border-bottom: 3px solid @relatedtabsborderbottomcolor; + margin-bottom: 0; } } @@ -6755,7 +6776,10 @@ div.tooltip-inner{ //Detailview and edit view Changes .detailview-header-block{ background: white; - padding: 15px; + padding: 15px; + padding-top: 25px; + border:1px solid @detailViewContainerBorderColor; + border-width: thin; } .detailViewContainer .content-area, @@ -6773,12 +6797,14 @@ div.tooltip-inner{ } .detailview-content .details.row .relatedHeader{ border:1px solid @detailViewContainerBorderColor; + border-width: thin; } .detailview-content .details.row .relatedContents{ background: white; padding: 0; margin-top: 0; border:1px solid @detailViewContainerBorderColor; + border-width: thin; } .related-tabs.row{ background: @white; @@ -6858,11 +6884,12 @@ div.tooltip-inner{ border-left:0; } .editViewContents .fieldValue .referencefield-wrapper { - width: 300px; + width: 100%; display: inline-block; } .input-group-addon{ - line-height: 1.4; + line-height: 1.5; + border-width: thin; } .input-group{ float:left; @@ -6874,11 +6901,13 @@ div.tooltip-inner{ } .listViewEntries .input-group, .referencefield-wrapper .input-group{ - min-width: 120px; + width: 100%; + max-width: 325px; } .summaryViewEntries .inputElement.form-control, .detailview-table .inputElement.form-control{ - width:70%; + width:80%; + max-width: 300px; } .detailview-table input[type="checkbox"]{ //TN-#34172 width:13px !important; @@ -6886,7 +6915,8 @@ div.tooltip-inner{ } .detailview-table .input-group-addon+.inputElement.form-control, .detailview-table .inputElement.form-control.input-medium{ - width:100%; + min-width: 80%; + max-width: 300px; } .summaryViewEntries .referencefield-wrapper .inputElement, @@ -7099,7 +7129,6 @@ margin-right: 5px; min-height:100%; .dashBoardTabContents ul{ position:relative; - height: 960px; width: 1260px; } } @@ -7512,7 +7541,7 @@ li.select2-search-choice div{ } .floatThead-table { - border-left: 1px solid @lightColorBorder; + background: #fbfbfb; } .main-container-Documents .module-nav, .main-container-Reports .module-nav { @@ -8460,5 +8489,173 @@ input:focus:-ms-input-placeholder { color:transparent; } /* IE 10+ */ z-index: 1095 !important; } body .fc { -overflow:auto; + overflow:auto; +} +.margin0 { + margin : 0 +} +.border0 { + border: 0; +} +.padding0 { + padding: 0; +} +.rounded0 { + border-radius: 0; +} +.bg-white { + background: #FFFFFF; +} +.nav-tabs { + border-bottom: 0; +} +.commentcontent { + border: 1px solid #ddd; + border-width: thin; + background: #fcfcfc; +} +.editViewHeader { + padding-top: 20px; +} +.listview-table > thead > tr > th { + border-bottom: 0; + font-size: 13px; +} +.floatThead-floatContainer { + margin-left: 1px; +} +.navbar { + border: 0; + border-width: thin; +} +#appnav .navbar { + border: 0; + background: none; +} +.dashBoardContainer, .loginPageContainer { + min-height: calc(100vh - 110px); +} +@media all and (min-width:0px) and (max-width: 830px) { + //Responsive Table + table.summary-table>tbody>tr>td, + table.summary-table>tbody>tr>th, + table.summary-table>tfoot>tr>td, + table.summary-table>tfoot>tr>th, + table.summary-table>thead>tr>td, + table.summary-table>thead>tr>th, + .quickCreateContent>table.table>tbody>tr>td, + .quickCreateContent>table.table>tbody>tr>th, + .quickCreateContent>table.table>tfoot>tr>td, + .quickCreateContent>table.table>tfoot>tr>th, + .quickCreateContent>table.table>thead>tr>td, + .quickCreateContent>table.table>thead>tr>th, + .fieldBlockContainer>table.table:not(#lineItemResult)>tbody>tr>td, + .fieldBlockContainer>table.table:not(#lineItemResult)>tbody>tr>th, + .fieldBlockContainer>table.table:not(#lineItemResult)>tfoot>tr>td, + .fieldBlockContainer>table.table:not(#lineItemResult)>tfoot>tr>th, + .fieldBlockContainer>table.table:not(#lineItemResult)>thead>tr>td, + .fieldBlockContainer>table.table:not(#lineItemResult)>thead>tr>th, + .detailview-table>tbody>tr>td, + .detailview-table>tbody>tr>th, + .detailview-table>tfoot>tr>td, + .detailview-table>tfoot>tr>th, + .detailview-table>thead>tr>td, + .detailview-table>thead>tr>th { + display: block; + min-width: 100%!important; + } + + table.summary-table>thead>tr>th, + .quickCreateContent>table.table>thead>tr>th, + .fieldBlockContainer>table.table:not(#lineItemResult)>thead>tr>th, + .detailview-table>thead>tr>th { + display: none; + } + .editElement div { + float: left; + } + #detailView td.fieldValue .edit { + width: 100%; + float: none !important; + display: inline-block; + } + table.summary-table td.fieldValue .inputElement, + .quickCreateContent>table.table td.fieldValue .inputElement, + .fieldBlockContainer>table.table:not(#lineItemResult) td.fieldValue .inputElement, + .fieldBlockContainer>table.table:not(#lineItemResult) td.fieldValue .input-group { + width: 100%; + float: none !important; + } + #detailView td.fieldLabel { + padding-top: 20px; + } + #detailView td.fieldValue { + border-bottom: 1px solid #eee; + padding-bottom: 20px; + } + #detailView td.fieldValue>span:first-child { + border: 0; + border-bottom: 1px dashed #aaa; + } + //Search bar + .search-link { + border:0; + } + #page>nav.navbar { + border-bottom: 1px solid #eee; + } + .modal-overlay-footer + { + border-left: 0; + } + .app-footer { + font-size: 11px; + } + body { + font-size: 13px; + } + .overlay-container-60{ + margin-left:0 ; + } + .overlayPageContent { + padding-bottom: 0; + &.fade{ + overflow: scroll; + } + } + .overlayDetail .modal-content{ + position:relative; + } + .mCSB_inside > .mCSB_container { + margin-right: 0; + } + #mCSB_9_scrollbar_vertical { + display: none; + } + .lineItemInputBox { + width: 100%; + } + #comment1 { + border-left-color: #ccc; + } + .editViewContents .fieldLabel { + padding-top: 20px; + } + .quickCreateContent .fieldLabel { + padding-top: 20px; + } + .floatThead-floatContainer { + margin-left: 1px; + padding-top: 1px; + } + .listViewPageDiv #table-content { + overflow: scroll !important; + } + #appnavcontent { + border: 1px solid #ccc; + background: #f0f0f0; + border-width: thin; + padding: 30px; + } } + diff --git a/layouts/v7/skins/vtiger/variables.less b/layouts/v7/skins/vtiger/variables.less index 44816d2ecd0f29b9eb4c52f21e1553ab61fb8825..bd23650595375ed4fe6a304838220549186a912c 100644 --- a/layouts/v7/skins/vtiger/variables.less +++ b/layouts/v7/skins/vtiger/variables.less @@ -137,8 +137,8 @@ @layoutEditorAddBtnBorder : @blockBorder; //Detail view background color -@detailViewContainerBorderColor: @timeiconbackgroundcolor; -@detailViewbackground: @layoutAddButtonHover; +@detailViewContainerBorderColor: #eee; +@detailViewbackground: #f9f9f9; @referencefieldBackground:@timeiconbackgroundcolor; //relative activities images diff --git a/layouts/vlayout/modules/Vtiger/AdvanceSearch.tpl b/layouts/vlayout/modules/Vtiger/AdvanceSearch.tpl index 962ae5f0382a3ce7f555cd8efe7c361d7f54f1da..0e72020d411bc414cfb0880c6a1d3f863a232eba 100644 --- a/layouts/vlayout/modules/Vtiger/AdvanceSearch.tpl +++ b/layouts/vlayout/modules/Vtiger/AdvanceSearch.tpl @@ -50,4 +50,5 @@ </div> </div> </div> -</div> \ No newline at end of file +</div> +{/strip} diff --git a/layouts/vlayout/modules/Vtiger/resources/dashboards/Widget.js b/layouts/vlayout/modules/Vtiger/resources/dashboards/Widget.js index 7947ac249a5eea4ae27b5def449286d4208bfb66..e8d50d206c6f0557d396bac9ce5bab1e03bd14d1 100644 --- a/layouts/vlayout/modules/Vtiger/resources/dashboards/Widget.js +++ b/layouts/vlayout/modules/Vtiger/resources/dashboards/Widget.js @@ -84,11 +84,23 @@ jQuery.Class('Vtiger_Widget_Js',{ }, convertToDateRangePicketFormat : function(userDateFormat) { - if(userDateFormat == 'yyyy-mm-dd') { + if ('dd.mm.yyyy' === userDateFormat) { + return 'dd.MM.yyyy'; + } else if ('mm.dd.yyyy' === userDateFormat) { + return 'MM.dd.yyyy' + } else if ('yyyy.mm.dd' === userDateFormat) { + return 'yyyy.MM.dd'; + } else if ('dd/mm/yyyy' === userDateFormat) { + return 'dd/MM/yyyy'; + } else if ('mm/dd/yyyy' === userDateFormat) { + return 'MM/dd/yyyy' + } else if ('yyyy/mm/dd' === userDateFormat) { + return 'yyyy/MM/dd'; + } else if ('yyyy-mm-dd' === userDateFormat) { return 'yyyy-MM-dd'; - }else if( userDateFormat == 'mm-dd-yyyy') { + } else if ('mm-dd-yyyy' === userDateFormat) { return 'MM-dd-yyyy'; - }else if(userDateFormat == 'dd-mm-yyyy') { + } else if ('dd-mm-yyyy' === userDateFormat) { return 'dd-MM-yyyy'; } }, diff --git a/libraries/Smarty/libs/debug.tpl b/libraries/Smarty/libs/debug.tpl index 12eef0ffdbf046fb9daf2b6189ed35f2148b654f..7ba49116d2d6fb3e6e4c8bcde7b3e326bd698263 100644 --- a/libraries/Smarty/libs/debug.tpl +++ b/libraries/Smarty/libs/debug.tpl @@ -127,7 +127,7 @@ td { {/capture} <script type="text/javascript"> {$id = $template_name|default:''|md5} - _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes"); + var _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes"); _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}"); _smarty_console.document.close(); </script> diff --git a/libraries/bootstrap/js/tests/index.html b/libraries/bootstrap/js/tests/index.html deleted file mode 100644 index 8c710de3666c4ee32e80e436c59c416cf59da6a7..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/index.html +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Bootstrap Plugin Test Suite</title> - - <!-- jquery --> - <!--<script src="http://code.jquery.com/jquery-1.7.min.js"></script>--> - <script src="vendor/jquery.js"></script> - - <!-- qunit --> - <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" /> - <script src="vendor/qunit.js"></script> - - <!-- plugin sources --> - <script src="../../js/bootstrap-transition.js"></script> - <script src="../../js/bootstrap-alert.js"></script> - <script src="../../js/bootstrap-button.js"></script> - <script src="../../js/bootstrap-collapse.js"></script> - <script src="../../js/bootstrap-dropdown.js"></script> - <script src="../../js/bootstrap-modal.js"></script> - <script src="../../js/bootstrap-scrollspy.js"></script> - <script src="../../js/bootstrap-tab.js"></script> - <script src="../../js/bootstrap-tooltip.js"></script> - <script src="../../js/bootstrap-popover.js"></script> - <script src="../../js/bootstrap-typeahead.js"></script> - - <!-- unit tests --> - <script src="unit/bootstrap-transition.js"></script> - <script src="unit/bootstrap-alert.js"></script> - <script src="unit/bootstrap-button.js"></script> - <script src="unit/bootstrap-collapse.js"></script> - <script src="unit/bootstrap-dropdown.js"></script> - <script src="unit/bootstrap-modal.js"></script> - <script src="unit/bootstrap-scrollspy.js"></script> - <script src="unit/bootstrap-tab.js"></script> - <script src="unit/bootstrap-tooltip.js"></script> - <script src="unit/bootstrap-popover.js"></script> - <script src="unit/bootstrap-typeahead.js"></script> - -<body> - <div> - <h1 id="qunit-header">Bootstrap Plugin Test Suite</h1> - <h2 id="qunit-banner"></h2> - <h2 id="qunit-userAgent"></h2> - <ol id="qunit-tests"></ol> - <div id="qunit-fixture"></div> - </div> -</body> -</html> \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-alert.js b/libraries/bootstrap/js/tests/unit/bootstrap-alert.js deleted file mode 100644 index e607f43402fe48aa32351a5ff59da27ab6b0bc57..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-alert.js +++ /dev/null @@ -1,41 +0,0 @@ -$(function () { - - module("bootstrap-alerts") - - test("should be defined on jquery object", function () { - ok($(document.body).alert, 'alert method is defined') - }) - - test("should return element", function () { - ok($(document.body).alert()[0] == document.body, 'document.body returned') - }) - - test("should fade element out on clicking .close", function () { - var alertHTML = '<div class="alert-message warning fade in">' - + '<a class="close" href="#" data-dismiss="alert">×</a>' - + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' - + '</div>' - , alert = $(alertHTML).alert() - - alert.find('.close').click() - - ok(!alert.hasClass('in'), 'remove .in class on .close click') - }) - - test("should remove element when clicking .close", function () { - $.support.transition = false - - var alertHTML = '<div class="alert-message warning fade in">' - + '<a class="close" href="#" data-dismiss="alert">×</a>' - + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' - + '</div>' - , alert = $(alertHTML).appendTo('#qunit-fixture').alert() - - ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom') - - alert.find('.close').click() - - ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom') - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-button.js b/libraries/bootstrap/js/tests/unit/bootstrap-button.js deleted file mode 100644 index 8aed857e11acaff6c248336bd20ecca8ec28315e..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-button.js +++ /dev/null @@ -1,54 +0,0 @@ -$(function () { - - module("bootstrap-buttons") - - test("should be defined on jquery object", function () { - ok($(document.body).button, 'button method is defined') - }) - - test("should return element", function () { - ok($(document.body).button()[0] == document.body, 'document.body returned') - }) - - test("should return set state to loading", function () { - var btn = $('<button class="btn" data-loading-text="fat">mdo</button>') - equals(btn.html(), 'mdo', 'btn text equals mdo') - btn.button('loading') - equals(btn.html(), 'fat', 'btn text equals fat') - stop() - setTimeout(function () { - ok(btn.attr('disabled'), 'btn is disabled') - ok(btn.hasClass('disabled'), 'btn has disabled class') - start() - }, 0) - }) - - test("should return reset state", function () { - var btn = $('<button class="btn" data-loading-text="fat">mdo</button>') - equals(btn.html(), 'mdo', 'btn text equals mdo') - btn.button('loading') - equals(btn.html(), 'fat', 'btn text equals fat') - stop() - setTimeout(function () { - ok(btn.attr('disabled'), 'btn is disabled') - ok(btn.hasClass('disabled'), 'btn has disabled class') - start() - stop() - }, 0) - btn.button('reset') - equals(btn.html(), 'mdo', 'btn text equals mdo') - setTimeout(function () { - ok(!btn.attr('disabled'), 'btn is not disabled') - ok(!btn.hasClass('disabled'), 'btn does not have disabled class') - start() - }, 0) - }) - - test("should toggle active", function () { - var btn = $('<button class="btn" data-loading-text="fat">mdo</button>') - ok(!btn.hasClass('active'), 'btn does not have active class') - btn.button('toggle') - ok(btn.hasClass('active'), 'btn has class active') - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-collapse.js b/libraries/bootstrap/js/tests/unit/bootstrap-collapse.js deleted file mode 100644 index 698238d96b0718ae0553b33f10861f2a1204a43c..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-collapse.js +++ /dev/null @@ -1,25 +0,0 @@ -$(function () { - - module("bootstrap-collapse") - - test("should be defined on jquery object", function () { - ok($(document.body).collapse, 'collapse method is defined') - }) - - test("should return element", function () { - ok($(document.body).collapse()[0] == document.body, 'document.body returned') - }) - - test("should show a collapsed element", function () { - var el = $('<div class="collapse"></div>').collapse('show') - ok(el.hasClass('in'), 'has class in') - ok(/height/.test(el.attr('style')), 'has height set') - }) - - test("should hide a collapsed element", function () { - var el = $('<div class="collapse"></div>').collapse('hide') - ok(!el.hasClass('in'), 'does not have class in') - ok(/height/.test(el.attr('style')), 'has height set') - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-dropdown.js b/libraries/bootstrap/js/tests/unit/bootstrap-dropdown.js deleted file mode 100644 index 368ced2a5ae70b0635437a6675d93b4fabda1987..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-dropdown.js +++ /dev/null @@ -1,53 +0,0 @@ -$(function () { - - module("bootstrap-dropdowns") - - test("should be defined on jquery object", function () { - ok($(document.body).dropdown, 'dropdown method is defined') - }) - - test("should return element", function () { - ok($(document.body).dropdown()[0] == document.body, 'document.body returned') - }) - - test("should add class open to menu if clicked", function () { - var dropdownHTML = '<ul class="tabs">' - + '<li class="dropdown">' - + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' - + '<ul class="dropdown-menu">' - + '<li><a href="#">Secondary link</a></li>' - + '<li><a href="#">Something else here</a></li>' - + '<li class="divider"></li>' - + '<li><a href="#">Another link</a></li>' - + '</ul>' - + '</li>' - + '</ul>' - , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click() - - ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') - }) - - test("should remove open class if body clicked", function () { - var dropdownHTML = '<ul class="tabs">' - + '<li class="dropdown">' - + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' - + '<ul class="dropdown-menu">' - + '<li><a href="#">Secondary link</a></li>' - + '<li><a href="#">Something else here</a></li>' - + '<li class="divider"></li>' - + '<li><a href="#">Another link</a></li>' - + '</ul>' - + '</li>' - + '</ul>' - , dropdown = $(dropdownHTML) - .appendTo('#qunit-fixture') - .find('[data-toggle="dropdown"]') - .dropdown() - .click() - ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') - $('body').click() - ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed') - dropdown.remove() - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-modal.js b/libraries/bootstrap/js/tests/unit/bootstrap-modal.js deleted file mode 100644 index 22f5781ea6528c4b76891ea9fdea06be22723276..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-modal.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function () { - - module("bootstrap-modal") - - test("should be defined on jquery object", function () { - var div = $("<div id='modal-test'></div>") - ok(div.modal, 'modal method is defined') - }) - - test("should return element", function () { - var div = $("<div id='modal-test'></div>") - ok(div.modal() == div, 'document.body returned') - $('#modal-test').remove() - }) - - test("should expose defaults var for settings", function () { - ok($.fn.modal.defaults, 'default object exposed') - }) - - test("should insert into dom when show method is called", function () { - stop() - $.support.transition = false - $("<div id='modal-test'></div>") - .bind("shown", function () { - ok($('#modal-test').length, 'modal insterted into dom') - $(this).remove() - start() - }) - .modal("show") - }) - - test("should hide modal when hide is called", function () { - stop() - $.support.transition = false - - $("<div id='modal-test'></div>") - .bind("shown", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal insterted into dom') - $(this).modal("hide") - }) - .bind("hidden", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - $('#modal-test').remove() - start() - }) - .modal("show") - }) - - test("should toggle when toggle is called", function () { - stop() - $.support.transition = false - var div = $("<div id='modal-test'></div>") - div - .bind("shown", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal insterted into dom') - div.modal("toggle") - }) - .bind("hidden", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("toggle") - }) - - test("should remove from dom when click [data-dismiss=modal]", function () { - stop() - $.support.transition = false - var div = $("<div id='modal-test'><span class='close' data-dismiss='modal'></span></div>") - div - .bind("shown", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal insterted into dom') - div.find('.close').click() - }) - .bind("hidden", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("toggle") - }) -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-popover.js b/libraries/bootstrap/js/tests/unit/bootstrap-popover.js deleted file mode 100644 index afd6b170b43e4530bf54864855043e3065f0dcd8..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-popover.js +++ /dev/null @@ -1,93 +0,0 @@ -$(function () { - - module("bootstrap-popover") - - test("should be defined on jquery object", function () { - var div = $('<div></div>') - ok(div.popover, 'popover method is defined') - }) - - test("should return element", function () { - var div = $('<div></div>') - ok(div.popover() == div, 'document.body returned') - }) - - test("should render popover element", function () { - $.support.transition = false - var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>') - .appendTo('#qunit-fixture') - .popover('show') - - ok($('.popover').length, 'popover was inserted') - popover.popover('hide') - ok(!$(".popover").length, 'popover removed') - }) - - test("should store popover instance in popover data object", function () { - $.support.transition = false - var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>') - .popover() - - ok(!!popover.data('popover'), 'popover instance exists') - }) - - test("should get title and content from options", function () { - $.support.transition = false - var popover = $('<a href="#">@fat</a>') - .appendTo('#qunit-fixture') - .popover({ - title: function () { - return '@fat' - } - , content: function () { - return 'loves writing tests (╯°□°)╯︵ â”»â”â”»' - } - }) - - popover.popover('show') - - ok($('.popover').length, 'popover was inserted') - equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted') - equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ â”»â”â”»', 'content correctly inserted') - - popover.popover('hide') - ok(!$('.popover').length, 'popover was removed') - $('#qunit-fixture').empty() - }) - - test("should get title and content from attributes", function () { - $.support.transition = false - var popover = $('<a href="#" title="@mdo" data-content="loves data attributes (ã¥ï½¡â—•‿‿◕。)㥠︵ â”»â”â”»" >@mdo</a>') - .appendTo('#qunit-fixture') - .popover() - .popover('show') - - ok($('.popover').length, 'popover was inserted') - equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') - equals($('.popover .popover-content').text(), "loves data attributes (ã¥ï½¡â—•‿‿◕。)㥠︵ â”»â”â”»", 'content correctly inserted') - - popover.popover('hide') - ok(!$('.popover').length, 'popover was removed') - $('#qunit-fixture').empty() - }) - - test("should respect custom classes", function() { - $.support.transition = false - var popover = $('<a href="#">@fat</a>') - .appendTo('#qunit-fixture') - .popover({ - title: 'Test' - , content: 'Test' - , template: '<div class="popover foobar"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>' - }) - - popover.popover('show') - - ok($('.popover').length, 'popover was inserted') - ok($('.popover').hasClass('foobar'), 'custom class is present') - - popover.popover('hide') - ok(!$('.popover').length, 'popover was removed') - $('#qunit-fixture').empty() - }) -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-scrollspy.js b/libraries/bootstrap/js/tests/unit/bootstrap-scrollspy.js deleted file mode 100644 index bee46a925ec0dd35eeca7223a7c624025e689152..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-scrollspy.js +++ /dev/null @@ -1,31 +0,0 @@ -$(function () { - - module("bootstrap-scrollspy") - - test("should be defined on jquery object", function () { - ok($(document.body).scrollspy, 'scrollspy method is defined') - }) - - test("should return element", function () { - ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') - }) - - test("should switch active class on scroll", function () { - var sectionHTML = '<div id="masthead"></div>' - , $section = $(sectionHTML).append('#qunit-fixture') - , topbarHTML ='<div class="topbar">' - + '<div class="topbar-inner">' - + '<div class="container">' - + '<h3><a href="#">Bootstrap</a></h3>' - + '<ul class="nav">' - + '<li><a href="#masthead">Overview</a></li>' - + '</ul>' - + '</div>' - + '</div>' - + '</div>' - , $topbar = $(topbarHTML).scrollspy() - - ok($topbar.find('.active', true)) - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-tab.js b/libraries/bootstrap/js/tests/unit/bootstrap-tab.js deleted file mode 100644 index 18f490fa5e454500b1137dc934ddb720c5250e31..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-tab.js +++ /dev/null @@ -1,45 +0,0 @@ -$(function () { - - module("bootstrap-tabs") - - test("should be defined on jquery object", function () { - ok($(document.body).tab, 'tabs method is defined') - }) - - test("should return element", function () { - ok($(document.body).tab()[0] == document.body, 'document.body returned') - }) - - test("should activate element by tab id", function () { - var tabsHTML = - '<ul class="tabs">' - + '<li><a href="#home">Home</a></li>' - + '<li><a href="#profile">Profile</a></li>' - + '</ul>' - - $('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture") - - $(tabsHTML).find('li:last a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "profile") - - $(tabsHTML).find('li:first a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "home") - }) - - test("should activate element by tab id", function () { - var pillsHTML = - '<ul class="pills">' - + '<li><a href="#home">Home</a></li>' - + '<li><a href="#profile">Profile</a></li>' - + '</ul>' - - $('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo("#qunit-fixture") - - $(pillsHTML).find('li:last a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "profile") - - $(pillsHTML).find('li:first a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "home") - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-tooltip.js b/libraries/bootstrap/js/tests/unit/bootstrap-tooltip.js deleted file mode 100644 index 8543162c6a3ff1188b7c692989fe8bd14a8fa9ac..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-tooltip.js +++ /dev/null @@ -1,62 +0,0 @@ -$(function () { - - module("bootstrap-tooltip") - - test("should be defined on jquery object", function () { - var div = $("<div></div>") - ok(div.tooltip, 'popover method is defined') - }) - - test("should return element", function () { - var div = $("<div></div>") - ok(div.tooltip() == div, 'document.body returned') - }) - - test("should expose default settings", function () { - ok(!!$.fn.tooltip.defaults, 'defaults is defined') - }) - - test("should remove title attribute", function () { - var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip() - ok(!tooltip.attr('title'), 'title tag was removed') - }) - - test("should add data attribute for referencing original title", function () { - var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip() - equals(tooltip.attr('data-original-title'), 'Another tooltip', 'original title preserved in data attribute') - }) - - test("should place tooltips relative to placement option", function () { - $.support.transition = false - var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>') - .appendTo('#qunit-fixture') - .tooltip({placement: 'bottom'}) - .tooltip('show') - - ok($(".tooltip").hasClass('fade bottom in'), 'has correct classes applied') - tooltip.tooltip('hide') - }) - - test("should always allow html entities", function () { - $.support.transition = false - var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>') - .appendTo('#qunit-fixture') - .tooltip('show') - - ok($('.tooltip b').length, 'b tag was inserted') - tooltip.tooltip('hide') - ok(!$(".tooltip").length, 'tooltip removed') - }) - - test("should respect custom classes", function () { - var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>') - .appendTo('#qunit-fixture') - .tooltip({ template: '<div class="tooltip some-class"><div class="tooltip-arrow"/><div class="tooltip-inner"/></div>'}) - .tooltip('show') - - ok($('.tooltip').hasClass('some-class'), 'custom class is present') - tooltip.tooltip('hide') - ok(!$(".tooltip").length, 'tooltip removed') - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-transition.js b/libraries/bootstrap/js/tests/unit/bootstrap-transition.js deleted file mode 100644 index 3f28d2676ddd02d44df11a50b02ba39841d5b807..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-transition.js +++ /dev/null @@ -1,13 +0,0 @@ -$(function () { - - module("bootstrap-transition") - - test("should be defined on jquery support object", function () { - ok($.support.transition != undefined, 'transition object is defined') - }) - - test("should provide an end object", function () { - ok($.support.transition ? $.support.transition.end : true, 'end string is defined') - }) - -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/unit/bootstrap-typeahead.js b/libraries/bootstrap/js/tests/unit/bootstrap-typeahead.js deleted file mode 100644 index 455ed415b7821a726057e4319fb22148e0348405..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/unit/bootstrap-typeahead.js +++ /dev/null @@ -1,128 +0,0 @@ -$(function () { - - module("bootstrap-typeahead") - - test("should be defined on jquery object", function () { - ok($(document.body).typeahead, 'alert method is defined') - }) - - test("should return element", function () { - ok($(document.body).typeahead()[0] == document.body, 'document.body returned') - }) - - test("should listen to an input", function () { - var $input = $('<input />') - $input.typeahead() - ok($input.data('events').blur, 'has a blur event') - ok($input.data('events').keypress, 'has a keypress event') - ok($input.data('events').keyup, 'has a keyup event') - if ($.browser.webkit || $.browser.msie) { - ok($input.data('events').keydown, 'has a keydown event') - } else { - ok($input.data('events').keydown, 'does not have a keydown event') - } - }) - - test("should create a menu", function () { - var $input = $('<input />') - ok($input.typeahead().data('typeahead').$menu, 'has a menu') - }) - - test("should listen to the menu", function () { - var $input = $('<input />') - , $menu = $input.typeahead().data('typeahead').$menu - - ok($menu.data('events').mouseover, 'has a mouseover(pseudo: mouseenter)') - ok($menu.data('events').click, 'has a click') - }) - - test("should show menu when query entered", function () { - var $input = $('<input />').typeahead({ - source: ['aa', 'ab', 'ac'] - }) - , typeahead = $input.data('typeahead') - - $input.val('a') - typeahead.lookup() - - ok(typeahead.$menu.is(":visible"), 'typeahead is visible') - equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu') - equals(typeahead.$menu.find('.active').length, 1, 'one item is active') - - typeahead.$menu.remove() - }) - - test("should hide menu when query entered", function () { - stop() - var $input = $('<input />').typeahead({ - source: ['aa', 'ab', 'ac'] - }) - , typeahead = $input.data('typeahead') - - $input.val('a') - typeahead.lookup() - - ok(typeahead.$menu.is(":visible"), 'typeahead is visible') - equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu') - equals(typeahead.$menu.find('.active').length, 1, 'one item is active') - - $input.blur() - - setTimeout(function () { - ok(!typeahead.$menu.is(":visible"), "typeahead is no longer visible") - start() - }, 200) - - typeahead.$menu.remove() - }) - - test("should set next item when down arrow is pressed", function () { - var $input = $('<input />').typeahead({ - source: ['aa', 'ab', 'ac'] - }) - , typeahead = $input.data('typeahead') - - $input.val('a') - typeahead.lookup() - - ok(typeahead.$menu.is(":visible"), 'typeahead is visible') - equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu') - equals(typeahead.$menu.find('.active').length, 1, 'one item is active') - ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active") - - $input.trigger({ - type: 'keypress' - , keyCode: 40 - }) - - ok(typeahead.$menu.find('li').first().next().hasClass('active'), "second item is active") - - - $input.trigger({ - type: 'keypress' - , keyCode: 38 - }) - - ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active") - - typeahead.$menu.remove() - }) - - - test("should set input value to selected item", function () { - var $input = $('<input />').typeahead({ - source: ['aa', 'ab', 'ac'] - }) - , typeahead = $input.data('typeahead') - - $input.val('a') - typeahead.lookup() - - $(typeahead.$menu.find('li')[2]).mouseover().click() - - equals($input.val(), 'ac', 'input value was correctly set') - ok(!typeahead.$menu.is(':visible'), 'the menu was hidden') - - typeahead.$menu.remove() - }) -}) \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/vendor/jquery.js b/libraries/bootstrap/js/tests/vendor/jquery.js deleted file mode 100644 index 00c4e23a27b15f6158ea46a016beb0ae95c6596d..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/vendor/jquery.js +++ /dev/null @@ -1,9252 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, - navigator = window.navigator, - location = window.location; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context ? context.ownerDocument || context : document ); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.7.1", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.add( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.fireWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).off( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery.Callbacks( "once memory" ); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array, i ) { - var len; - - if ( array ) { - if ( indexOf ) { - return indexOf.call( array, elem, i ); - } - - len = array.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in array && array[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -// String to Object flags format cache -var flagsCache = {}; - -// Convert String-formatted flags into Object-formatted ones and store in cache -function createFlags( flags ) { - var object = flagsCache[ flags ] = {}, - i, length; - flags = flags.split( /\s+/ ); - for ( i = 0, length = flags.length; i < length; i++ ) { - object[ flags[i] ] = true; - } - return object; -} - -/* - * Create a callback list using the following parameters: - * - * flags: an optional list of space-separated flags that will change how - * the callback list behaves - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible flags: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( flags ) { - - // Convert flags from String-formatted to Object-formatted - // (we check in cache first) - flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; - - var // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = [], - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Add one or several callbacks to the list - add = function( args ) { - var i, - length, - elem, - type, - actual; - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - // Inspect recursively - add( elem ); - } else if ( type === "function" ) { - // Add if not in unique mode and callback is not in - if ( !flags.unique || !self.has( elem ) ) { - list.push( elem ); - } - } - } - }, - // Fire callbacks - fire = function( context, args ) { - args = args || []; - memory = !flags.memory || [ context, args ]; - firing = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { - memory = true; // Mark as halted - break; - } - } - firing = false; - if ( list ) { - if ( !flags.once ) { - if ( stack && stack.length ) { - memory = stack.shift(); - self.fireWith( memory[ 0 ], memory[ 1 ] ); - } - } else if ( memory === true ) { - self.disable(); - } else { - list = []; - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - var length = list.length; - add( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away, unless previous - // firing was halted (stopOnFalse) - } else if ( memory && memory !== true ) { - firingStart = length; - fire( memory[ 0 ], memory[ 1 ] ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - var args = arguments, - argIndex = 0, - argLength = args.length; - for ( ; argIndex < argLength ; argIndex++ ) { - for ( var i = 0; i < list.length; i++ ) { - if ( args[ argIndex ] === list[ i ] ) { - // Handle firingIndex and firingLength - if ( firing ) { - if ( i <= firingLength ) { - firingLength--; - if ( i <= firingIndex ) { - firingIndex--; - } - } - } - // Remove the element - list.splice( i--, 1 ); - // If we have some unicity property then - // we only need to do this once - if ( flags.unique ) { - break; - } - } - } - } - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - if ( list ) { - var i = 0, - length = list.length; - for ( ; i < length; i++ ) { - if ( fn === list[ i ] ) { - return true; - } - } - } - return false; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory || memory === true ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( stack ) { - if ( firing ) { - if ( !flags.once ) { - stack.push( [ context, args ] ); - } - } else if ( !( flags.once && memory ) ) { - fire( context, args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!memory; - } - }; - - return self; -}; - - - - -var // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - - Deferred: function( func ) { - var doneList = jQuery.Callbacks( "once memory" ), - failList = jQuery.Callbacks( "once memory" ), - progressList = jQuery.Callbacks( "memory" ), - state = "pending", - lists = { - resolve: doneList, - reject: failList, - notify: progressList - }, - promise = { - done: doneList.add, - fail: failList.add, - progress: progressList.add, - - state: function() { - return state; - }, - - // Deprecated - isResolved: doneList.fired, - isRejected: failList.fired, - - then: function( doneCallbacks, failCallbacks, progressCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); - return this; - }, - always: function() { - deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); - return this; - }, - pipe: function( fnDone, fnFail, fnProgress ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ], - progress: [ fnProgress, "notify" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - obj = promise; - } else { - for ( var key in promise ) { - obj[ key ] = promise[ key ]; - } - } - return obj; - } - }, - deferred = promise.promise({}), - key; - - for ( key in lists ) { - deferred[ key ] = lists[ key ].fire; - deferred[ key + "With" ] = lists[ key ].fireWith; - } - - // Handle state - deferred.done( function() { - state = "resolved"; - }, failList.disable, progressList.lock ).fail( function() { - state = "rejected"; - }, doneList.disable, progressList.lock ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = sliceDeferred.call( arguments, 0 ), - i = 0, - length = args.length, - pValues = new Array( length ), - count = length, - pCount = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(), - promise = deferred.promise(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - deferred.resolveWith( deferred, args ); - } - }; - } - function progressFunc( i ) { - return function( value ) { - pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - deferred.notifyWith( promise, pValues ); - }; - } - if ( length > 1 ) { - for ( ; i < length; i++ ) { - if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return promise; - } -}); - - - - -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - marginDiv, - fragment, - tds, - events, - eventName, - i, - isSupported, - div = document.createElement( "div" ), - documentElement = document.documentElement; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( window.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.style.width = "2px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - fragment.removeChild( div ); - - // Null elements to avoid leaks in IE - fragment = select = opt = marginDiv = div = input = null; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, outer, inner, table, td, offsetSupport, - conMarginTop, ptlm, vb, style, html, - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - conMarginTop = 1; - ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; - vb = "visibility:hidden;border:0;"; - style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; - html = "<div " + style + "><div></div></div>" + - "<table " + style + " cellpadding='0' cellspacing='0'>" + - "<tr><td></td></tr></table>"; - - container = document.createElement("div"); - container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName( "td" ); - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Figure out if the W3C box model works as expected - div.innerHTML = ""; - div.style.width = div.style.paddingLeft = "1px"; - jQuery.boxModel = support.boxModel = div.offsetWidth === 2; - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "<div style='width:4px;'></div>"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.style.cssText = ptlm + vb; - div.innerHTML = html; - - outer = div.firstChild; - inner = outer.firstChild; - td = outer.nextSibling.firstChild.firstChild; - - offsetSupport = { - doesNotAddBorder: ( inner.offsetTop !== 5 ), - doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) - }; - - inner.style.position = "fixed"; - inner.style.top = "20px"; - - // safari subtracts parent border width here which is 5px - offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); - inner.style.position = inner.style.top = ""; - - outer.style.overflow = "hidden"; - outer.style.position = "relative"; - - offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); - offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); - - body.removeChild( container ); - div = container = null; - - jQuery.extend( support, offsetSupport ); - }); - - return support; -})(); - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var privateCache, thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, - isEvents = name === "events"; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - privateCache = thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Users should not attempt to inspect the internal events object using jQuery.data, - // it is undocumented and subject to change. But does anyone listen? No. - if ( isEvents && !thisCache[ name ] ) { - return privateCache.events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ internalKey ] : internalKey; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split( " " ); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the cache and need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ internalKey ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - } else { - elem[ internalKey ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, attr, name, - data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { - attr = this[0].attributes; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - jQuery._data( this[0], "parsedAttrs", true ); - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var self = jQuery( this ), - args = [ parts[0], value ]; - - self.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - jQuery.isNumeric( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery._data( elem, deferDataKey ); - if ( defer && - ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && - ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery._data( elem, queueDataKey ) && - !jQuery._data( elem, markDataKey ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.fire(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = ( type || "fx" ) + "mark"; - jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); - if ( count ) { - jQuery._data( elem, key, count ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - var q; - if ( elem ) { - type = ( type || "fx" ) + "queue"; - q = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = {}; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - jQuery._data( elem, type + ".run", hooks ); - fn.call( elem, function() { - jQuery.dequeue( elem, type ); - }, hooks ); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue " + type + ".run", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { - count++; - tmp.add( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - nodeHook, boolHook, fixSpecified; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = ( value || "" ).split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, l, - i = 0; - - if ( value && elem.nodeType === 1 ) { - attrNames = value.toLowerCase().split( rspace ); - l = attrNames.length; - - for ( ; i < l; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - - // See #9699 for explanation of this approach (setting first, then removal) - jQuery.attr( elem, name, "" ); - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) -jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.nodeValue = value + "" ); - } - }; - - // Apply the nodeHook to tabindex - jQuery.attrHooks.tabindex.set = nodeHook.set; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); - - - - -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, - rhoverHack = /\bhover(\.\S+)?\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, - quickParse = function( selector ) { - var quick = rquickIs.exec( selector ); - if ( quick ) { - // 0 1 2 3 - // [ _, tag, id, class ] - quick[1] = ( quick[1] || "" ).toLowerCase(); - quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); - } - return quick; - }, - quickIs = function( elem, m ) { - var attrs = elem.attributes || {}; - return ( - (!m[1] || elem.nodeName.toLowerCase() === m[1]) && - (!m[2] || (attrs.id || {}).value === m[2]) && - (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) - ); - }, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, quick, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - quick: quickParse( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - t, tns, type, origType, namespaces, origCount, - j, events, special, handle, eventType, handleObj; - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, [ "events", "handle" ], true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var type = event.type || event, - namespaces = [], - cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - old = null; - for ( ; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old && old === elem.ownerDocument ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments, 0 ), - run_all = !event.exclusive && !event.namespace, - handlerQueue = [], - i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Determine handlers that should run if there are delegated events - // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this.ownerDocument || this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = ( - handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) - ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) - if ( event.metaKey === undefined ) { - event.metaKey = event.ctrlKey; - } - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector, - ret; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !form._submit_attached ) { - jQuery.event.add( form, "submit._submit", function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - }); - form._submit_attached = true; - } - }); - // return undefined since we don't need an event listener - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - jQuery.event.simulate( "change", this, event, true ); - } - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - elem._change_attached = true; - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on.call( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - var handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( var type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2012, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - expando = "sizcache" + (Math.random() + '').replace('.', ''), - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rReturn = /\r\n/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context, seed ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set, seed ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set, i, len, match, type, left; - - if ( !expr ) { - return []; - } - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - type, found, item, filter, left, - i, pass, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - filter = Expr.filter[ type ]; - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - pass = not ^ found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Utility function for retreiving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var i, node, - nodeType = elem.nodeType, - ret = ""; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 ) { - // Use textContent || innerText for elements - if ( typeof elem.textContent === 'string' ) { - return elem.textContent; - } else if ( typeof elem.innerText === 'string' ) { - // Replace IE's carriage returns - return elem.innerText.replace( rReturn, '' ); - } else { - // Traverse it's children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - } else { - - // If no nodeType, this is expected to be an array - for ( i = 0; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - if ( node.nodeType !== 8 ) { - ret += getText( node ); - } - } - } - return ret; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var first, last, - doneName, parent, cache, - count, diff, - type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - first = match[2]; - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - doneName = match[0]; - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { - count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent[ expando ] = doneName; - } - - diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Sizzle.attr ? - Sizzle.attr( elem, name ) : - Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - !type && Sizzle.attr ? - result != null : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - - var cur = a.nextSibling; - } - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = "<a name='" + id + "'/>"; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = "<a href='#'></a>"; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "<p class='TEST'></p>"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "<div class='test e'></div><div class='test'></div>"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context, seed ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet, seed ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -Sizzle.selectors.attrMap = {}; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - POS.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array (deprecated as of jQuery 1.7) - if ( jQuery.isArray( selectors ) ) { - var level = 1; - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( i = 0; i < selectors.length; i++ ) { - - if ( jQuery( cur ).is( selectors[ i ] ) ) { - ret.push({ selector: selectors[ i ], elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} - - - - -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style)/i, - rnocache = /<(?:script|object|embed|option|style)/i, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"), - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - area: [ 1, "<map>", "</map>" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize <link> and <script> tags normally -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "div<div>", "</div>" ]; -} - -jQuery.fn.extend({ - text: function( text ) { - if ( jQuery.isFunction(text) ) { - return this.each(function(i) { - var self = jQuery( this ); - - self.text( text.call(this, i, self.text()) ); - }); - } - - if ( typeof text !== "object" && text !== undefined ) { - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - } - - return jQuery.text( this ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( this[0] && this[0].parentNode ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } else if ( arguments.length ) { - var set = jQuery.clean( arguments ); - set.push.apply( set, this.toArray() ); - return this.pushStack( set, "before", arguments ); - } - }, - - after: function() { - if ( this[0] && this[0].parentNode ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } else if ( arguments.length ) { - var set = this.pushStack( this, "after", arguments ); - set.push.apply( set, jQuery.clean(arguments) ); - return set; - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - if ( value === undefined ) { - return this[0] && this[0].nodeType === 1 ? - this[0].innerHTML.replace(rinlinejQuery, "") : - null; - - // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && - !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { - - value = value.replace(rxhtmlTag, "<$1></$2>"); - - try { - for ( var i = 0, l = this.length; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - if ( this[i].nodeType === 1 ) { - jQuery.cleanData( this[i].getElementsByTagName("*") ); - this[i].innerHTML = value; - } - } - - // If using innerHTML throws an exception, use the fallback method - } catch(e) { - this.empty().append( value ); - } - - } else if ( jQuery.isFunction( value ) ) { - this.each(function(i){ - var self = jQuery( this ); - - self.html( value.call(this, i, self.html()) ); - }); - - } else { - this.empty().append( value ); - } - - return this; - }, - - replaceWith: function( value ) { - if ( this[0] && this[0].parentNode ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } else { - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - } - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - var results, first, fragment, parent, - value = args[0], - scripts = []; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback, true ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call(this, i, table ? self.html() : undefined); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - parent = value && value.parentNode; - - // If we're in a fragment, just use that instead of building a new one - if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { - results = { fragment: parent }; - - } else { - results = jQuery.buildFragment( args, this, scripts ); - } - - fragment = results.fragment; - - if ( fragment.childNodes.length === 1 ) { - first = fragment = fragment.firstChild; - } else { - first = fragment.firstChild; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { - callback.call( - table ? - root(this[i], first) : - this[i], - // Make sure that we do not leak memory by inadvertently discarding - // the original fragment (which might have attached data) instead of - // using it; in addition, use the original fragment object for the last - // item instead of first because it can end up being emptied incorrectly - // in certain situations (Bug #8070). - // Fragments from the fragment cache must always be cloned and never used - // in place. - results.cacheable || ( l > 1 && i < lastIndex ) ? - jQuery.clone( fragment, true, true ) : - fragment - ); - } - } - - if ( scripts.length ) { - jQuery.each( scripts, evalScript ); - } - } - - return this; - } -}); - -function root( elem, cur ) { - return jQuery.nodeName(elem, "table") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 fail to clone children inside object elements that use - // the proprietary classid attribute value (rather than the type - // attribute) to identify the type of content to display - if ( nodeName === "object" ) { - dest.outerHTML = src.outerHTML; - - } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - if ( src.checked ) { - dest.defaultChecked = dest.checked = src.checked; - } - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, nodes, scripts ) { - var fragment, cacheable, cacheresults, doc, - first = args[ 0 ]; - - // nodes may contain either an explicit document object, - // a jQuery collection or context object. - // If nodes[0] contains a valid object to assign to doc - if ( nodes && nodes[0] ) { - doc = nodes[0].ownerDocument || nodes[0]; - } - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( !doc.createDocumentFragment ) { - doc = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - cacheable = true; - - cacheresults = jQuery.fragments[ first ]; - if ( cacheresults && cacheresults !== 1 ) { - fragment = cacheresults; - } - } - - if ( !fragment ) { - fragment = doc.createDocumentFragment(); - jQuery.clean( args, doc, fragment, scripts ); - } - - if ( cacheable ) { - jQuery.fragments[ first ] = cacheresults ? fragment : 1; - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var ret = [], - insert = jQuery( selector ), - parent = this.length === 1 && this[0].parentNode; - - if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { - insert[ original ]( this[0] ); - return this; - - } else { - for ( var i = 0, l = insert.length; i < l; i++ ) { - var elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( elem.type === "checkbox" || elem.type === "radio" ) { - elem.defaultChecked = elem.checked; - } -} -// Finds all inputs and passes them to fixDefaultChecked -function findInputs( elem ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "input" ) { - fixDefaultChecked( elem ); - // Skip scripts, get other children - } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } -} - -// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js -function shimCloneNode( elem ) { - var div = document.createElement( "div" ); - safeFragment.appendChild( div ); - - div.innerHTML = elem.outerHTML; - return div.firstChild; -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - // IE<=8 does not properly clone detached, unknown element nodes - clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ? - elem.cloneNode( true ) : - shimCloneNode( elem ); - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var checkScriptType; - - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) { - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - } - - var ret = [], j; - - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1></$2>"); - - // Trim whitespace, otherwise indexOf won't work as expected - var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(), - wrap = wrapMap[ tag ] || wrapMap._default, - depth = wrap[0], - div = context.createElement("div"); - - // Append wrapper element to unknown element safe doc fragment - if ( context === document ) { - // Use the fragment we've already created for this document - safeFragment.appendChild( div ); - } else { - // Use a fragment created with the owner document - createSafeFragment( context ).appendChild( div ); - } - - // Go to html and back, then peel off extra wrappers - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - var hasBody = rtbody.test(elem), - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - } - } - - // Resets defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - var len; - if ( !jQuery.support.appendChecked ) { - if ( elem[0] && typeof (len = elem.length) === "number" ) { - for ( j = 0; j < len; j++ ) { - findInputs( elem[j] ); - } - } else { - findInputs( elem ); - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - if ( fragment ) { - checkScriptType = function( elem ) { - return !elem.type || rscriptType.test( elem.type ); - }; - for ( i = 0; ret[i]; i++ ) { - if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { - scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); - - } else { - if ( ret[i].nodeType === 1 ) { - var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType ); - - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - } - fragment.appendChild( ret[i] ); - } - } - } - - return ret; - }, - - cleanData: function( elems ) { - var data, id, - cache = jQuery.cache, - special = jQuery.event.special, - deleteExpando = jQuery.support.deleteExpando; - - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { - continue; - } - - id = elem[ jQuery.expando ]; - - if ( id ) { - data = cache[ id ]; - - if ( data && data.events ) { - for ( var type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - - // Null the DOM reference to avoid IE6/7/8 leak (#7054) - if ( data.handle ) { - data.handle.elem = null; - } - } - - if ( deleteExpando ) { - delete elem[ jQuery.expando ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } - - delete cache[ id ]; - } - } - } -}); - -function evalScript( i, elem ) { - if ( elem.src ) { - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } -} - - - - -var ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - // fixed for IE9, see #8346 - rupper = /([A-Z]|^ms)/g, - rnumpx = /^-?\d+(?:px)?$/i, - rnum = /^-?\d/, - rrelNum = /^([\-+])=([\-+.\de]+)/, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssWidth = [ "Left", "Right" ], - cssHeight = [ "Top", "Bottom" ], - curCSS, - - getComputedStyle, - currentStyle; - -jQuery.fn.css = function( name, value ) { - // Setting 'undefined' is a no-op - if ( arguments.length === 2 && value === undefined ) { - return this; - } - - return jQuery.access( this, name, value, true, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }); -}; - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity", "opacity" ); - return ret === "" ? "1" : ret; - - } else { - return elem.style.opacity; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, origName = jQuery.camelCase( name ), - style = elem.style, hooks = jQuery.cssHooks[ origName ]; - - name = jQuery.cssProps[ origName ] || origName; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra ) { - var ret, hooks; - - // Make sure that we're working with the right name - name = jQuery.camelCase( name ); - hooks = jQuery.cssHooks[ name ]; - name = jQuery.cssProps[ name ] || name; - - // cssFloat needs a special treatment - if ( name === "cssFloat" ) { - name = "float"; - } - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { - return ret; - - // Otherwise, if a way to get the computed value exists, use that - } else if ( curCSS ) { - return curCSS( elem, name ); - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - } -}); - -// DEPRECATED, Use jQuery.css() instead -jQuery.curCSS = jQuery.css; - -jQuery.each(["height", "width"], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - var val; - - if ( computed ) { - if ( elem.offsetWidth !== 0 ) { - return getWH( elem, name, extra ); - } else { - jQuery.swap( elem, cssShow, function() { - val = getWH( elem, name, extra ); - }); - } - - return val; - } - }, - - set: function( elem, value ) { - if ( rnumpx.test( value ) ) { - // ignore negative width and height values #1599 - value = parseFloat( value ); - - if ( value >= 0 ) { - return value + "px"; - } - - } else { - return value; - } - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( parseFloat( RegExp.$1 ) / 100 ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -jQuery(function() { - // This hook cannot be added until DOM ready because the support test - // for it is not run until after DOM ready - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - var ret; - jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - ret = curCSS( elem, "margin-right", "marginRight" ); - } else { - ret = elem.style.marginRight; - } - }); - return ret; - } - }; - } -}); - -if ( document.defaultView && document.defaultView.getComputedStyle ) { - getComputedStyle = function( elem, name ) { - var ret, defaultView, computedStyle; - - name = name.replace( rupper, "-$1" ).toLowerCase(); - - if ( (defaultView = elem.ownerDocument.defaultView) && - (computedStyle = defaultView.getComputedStyle( elem, null )) ) { - ret = computedStyle.getPropertyValue( name ); - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - } - - return ret; - }; -} - -if ( document.documentElement.currentStyle ) { - currentStyle = function( elem, name ) { - var left, rsLeft, uncomputed, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret === null && style && (uncomputed = style[ name ]) ) { - ret = uncomputed; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ( ret || 0 ); - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -curCSS = getComputedStyle || currentStyle; - -function getWH( elem, name, extra ) { - - // Start with offset property - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - which = name === "width" ? cssWidth : cssHeight, - i = 0, - len = which.length; - - if ( val > 0 ) { - if ( extra !== "border" ) { - for ( ; i < len; i++ ) { - if ( !extra ) { - val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; - } - if ( extra === "margin" ) { - val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; - } else { - val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; - } - } - } - - return val + "px"; - } - - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ] || 0; - } - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - - // Add padding, border, margin - if ( extra ) { - for ( ; i < len; i++ ) { - val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; - if ( extra !== "padding" ) { - val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; - } - if ( extra === "margin" ) { - val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; - } - } - } - - return val + "px"; -} - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - var width = elem.offsetWidth, - height = elem.offsetHeight; - - return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - - - - -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, - rselectTextarea = /^(?:select|textarea)/i, - rspacesAjax = /\s+/, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Document location - ajaxLocation, - - // Document location segments - ajaxLocParts, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - if ( jQuery.isFunction( func ) ) { - var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), - i = 0, - length = dataTypes.length, - dataType, - list, - placeBefore; - - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ), - selection; - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.extend({ - load: function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - - // Don't do a request if no elements are being requested - } else if ( !this.length ) { - return this; - } - - var off = url.indexOf( " " ); - if ( off >= 0 ) { - var selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // Default to a GET request - var type = "GET"; - - // If the second parameter was provided - if ( params ) { - // If it's a function - if ( jQuery.isFunction( params ) ) { - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - params = jQuery.param( params, jQuery.ajaxSettings.traditional ); - type = "POST"; - } - } - - var self = this; - - // Request the remote document - jQuery.ajax({ - url: url, - type: type, - dataType: "html", - data: params, - // Complete callback (responseText is used internally) - complete: function( jqXHR, status, responseText ) { - // Store the response as specified by the jqXHR object - responseText = jqXHR.responseText; - // If successful, inject the HTML into all the matched elements - if ( jqXHR.isResolved() ) { - // #4825: Get the actual response in case - // a dataFilter is present in ajaxSettings - jqXHR.done(function( r ) { - responseText = r; - }); - // See if a selector was specified - self.html( selector ? - // Create a dummy div to hold the results - jQuery("<div>") - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append(responseText.replace(rscript, "")) - - // Locate the specified elements - .find(selector) : - - // If not, just inject the full result - responseText ); - } - - if ( callback ) { - self.each( callback, [ responseText, status, jqXHR ] ); - } - } - }); - - return this; - }, - - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // ifModified key - ifModifiedKey, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // The jqXHR state - state = 0, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || "abort"; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - var isSuccess, - success, - error, - statusText = nativeStatusText, - response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, - lastModified, - etag; - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { - jQuery.lastModified[ ifModifiedKey ] = lastModified; - } - if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { - jQuery.etag[ ifModifiedKey ] = etag; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - try { - success = ajaxConvert( s, response ); - statusText = "success"; - isSuccess = true; - } catch(e) { - // We have a parsererror - statusText = "parsererror"; - error = e; - } - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.then( tmp, tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefiler, stop there - if ( state === 2 ) { - return false; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already - jqXHR.abort(); - return false; - - } - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Serialize an array of form elements or a set of - // key/values into a query string - param: function( a, traditional ) { - var s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : value; - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( var prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); - } -}); - -function buildParams( prefix, obj, traditional, add ) { - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && obj != null && typeof obj === "object" ) { - // Serialize object item. - for ( var name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} - -// This is still on the jQuery object... for now -// Want to move this to jQuery.ajax some day -jQuery.extend({ - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields, - ct, - type, - finalDataType, - firstDataType; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - var dataTypes = s.dataTypes, - converters = {}, - i, - key, - length = dataTypes.length, - tmp, - // Current and previous dataTypes - current = dataTypes[ 0 ], - prev, - // Conversion expression - conversion, - // Conversion function - conv, - // Conversion functions (transitive conversion) - conv1, - conv2; - - // For each dataType in the chain - for ( i = 1; i < length; i++ ) { - - // Create converters map - // with lowercased keys - if ( i === 1 ) { - for ( key in s.converters ) { - if ( typeof key === "string" ) { - converters[ key.toLowerCase() ] = s.converters[ key ]; - } - } - } - - // Get the dataTypes - prev = current; - current = dataTypes[ i ]; - - // If current is auto dataType, update it to prev - if ( current === "*" ) { - current = prev; - // If no auto and dataTypes are actually different - } else if ( prev !== "*" && prev !== current ) { - - // Get the converter - conversion = prev + " " + current; - conv = converters[ conversion ] || converters[ "* " + current ]; - - // If there is no direct converter, search transitively - if ( !conv ) { - conv2 = undefined; - for ( conv1 in converters ) { - tmp = conv1.split( " " ); - if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { - conv2 = converters[ tmp[1] + " " + current ]; - if ( conv2 ) { - conv1 = converters[ conv1 ]; - if ( conv1 === true ) { - conv = conv2; - } else if ( conv2 === true ) { - conv = conv1; - } - break; - } - } - } - } - // If we found no converter, dispatch an error - if ( !( conv || conv2 ) ) { - jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); - } - // If found converter is not an equivalence - if ( conv !== true ) { - // Convert with 1 or 2 converters accordingly - response = conv ? conv( response ) : conv2( conv1(response) ); - } - } - } - return response; -} - - - - -var jsc = jQuery.now(), - jsre = /(\=)\?(&|$)|\?\?/i; - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - return jQuery.expando + "_" + ( jsc++ ); - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var inspectData = s.contentType === "application/x-www-form-urlencoded" && - ( typeof s.data === "string" ); - - if ( s.dataTypes[ 0 ] === "jsonp" || - s.jsonp !== false && ( jsre.test( s.url ) || - inspectData && jsre.test( s.data ) ) ) { - - var responseContainer, - jsonpCallback = s.jsonpCallback = - jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, - previous = window[ jsonpCallback ], - url = s.url, - data = s.data, - replace = "$1" + jsonpCallback + "$2"; - - if ( s.jsonp !== false ) { - url = url.replace( jsre, replace ); - if ( s.url === url ) { - if ( inspectData ) { - data = data.replace( jsre, replace ); - } - if ( s.data === data ) { - // Add callback manually - url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; - } - } - } - - s.url = url; - s.data = data; - - // Install callback - window[ jsonpCallback ] = function( response ) { - responseContainer = [ response ]; - }; - - // Clean-up function - jqXHR.always(function() { - // Set callback back to previous value - window[ jsonpCallback ] = previous; - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( previous ) ) { - window[ jsonpCallback ]( responseContainer[ 0 ] ); - } - }); - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( jsonpCallback + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Delegate to script - return "script"; - } -}); - - - - -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); - - - - -var // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0, - xhrCallbacks; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var xhr = s.xhr(), - handle, - i; - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occured - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - responses.text = xhr.responseText; - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - // if we're in sync mode or it's in cache - // and has been retrieved directly (IE6 & IE7) - // we need to manually fire the callback - if ( !s.async || xhr.readyState === 4 ) { - callback(); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} - - - - -var elemdisplay = {}, - iframe, iframeDoc, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, - timerId, - fxAttrs = [ - // height animations - [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], - // width animations - [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], - // opacity animations - [ "opacity" ] - ], - fxNow; - -jQuery.fn.extend({ - show: function( speed, easing, callback ) { - var elem, display; - - if ( speed || speed === 0 ) { - return this.animate( genFx("show", 3), speed, easing, callback ); - - } else { - for ( var i = 0, j = this.length; i < j; i++ ) { - elem = this[ i ]; - - if ( elem.style ) { - display = elem.style.display; - - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { - display = elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( display === "" && jQuery.css(elem, "display") === "none" ) { - jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( i = 0; i < j; i++ ) { - elem = this[ i ]; - - if ( elem.style ) { - display = elem.style.display; - - if ( display === "" || display === "none" ) { - elem.style.display = jQuery._data( elem, "olddisplay" ) || ""; - } - } - } - - return this; - } - }, - - hide: function( speed, easing, callback ) { - if ( speed || speed === 0 ) { - return this.animate( genFx("hide", 3), speed, easing, callback); - - } else { - var elem, display, - i = 0, - j = this.length; - - for ( ; i < j; i++ ) { - elem = this[i]; - if ( elem.style ) { - display = jQuery.css( elem, "display" ); - - if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of the elements in a second loop - // to avoid the constant reflow - for ( i = 0; i < j; i++ ) { - if ( this[i].style ) { - this[i].style.display = "none"; - } - } - - return this; - } - }, - - // Save the old toggle function - _toggle: jQuery.fn.toggle, - - toggle: function( fn, fn2, callback ) { - var bool = typeof fn === "boolean"; - - if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { - this._toggle.apply( this, arguments ); - - } else if ( fn == null || bool ) { - this.each(function() { - var state = bool ? fn : jQuery(this).is(":hidden"); - jQuery(this)[ state ? "show" : "hide" ](); - }); - - } else { - this.animate(genFx("toggle", 3), fn, fn2, callback); - } - - return this; - }, - - fadeTo: function( speed, to, easing, callback ) { - return this.filter(":hidden").css("opacity", 0).show().end() - .animate({opacity: to}, speed, easing, callback); - }, - - animate: function( prop, speed, easing, callback ) { - var optall = jQuery.speed( speed, easing, callback ); - - if ( jQuery.isEmptyObject( prop ) ) { - return this.each( optall.complete, [ false ] ); - } - - // Do not change referenced properties as per-property easing will be lost - prop = jQuery.extend( {}, prop ); - - function doAnimation() { - // XXX 'this' does not always have a nodeName when running the - // test suite - - if ( optall.queue === false ) { - jQuery._mark( this ); - } - - var opt = jQuery.extend( {}, optall ), - isElement = this.nodeType === 1, - hidden = isElement && jQuery(this).is(":hidden"), - name, val, p, e, - parts, start, end, unit, - method; - - // will store per property easing and be used to determine when an animation is complete - opt.animatedProperties = {}; - - for ( p in prop ) { - - // property name normalization - name = jQuery.camelCase( p ); - if ( p !== name ) { - prop[ name ] = prop[ p ]; - delete prop[ p ]; - } - - val = prop[ name ]; - - // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) - if ( jQuery.isArray( val ) ) { - opt.animatedProperties[ name ] = val[ 1 ]; - val = prop[ name ] = val[ 0 ]; - } else { - opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; - } - - if ( val === "hide" && hidden || val === "show" && !hidden ) { - return opt.complete.call( this ); - } - - if ( isElement && ( name === "height" || name === "width" ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( this, "display" ) === "inline" && - jQuery.css( this, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) { - this.style.display = "inline-block"; - - } else { - this.style.zoom = 1; - } - } - } - } - - if ( opt.overflow != null ) { - this.style.overflow = "hidden"; - } - - for ( p in prop ) { - e = new jQuery.fx( this, opt, p ); - val = prop[ p ]; - - if ( rfxtypes.test( val ) ) { - - // Tracks whether to show or hide based on private - // data attached to the element - method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 ); - if ( method ) { - jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); - e[ method ](); - } else { - e[ val ](); - } - - } else { - parts = rfxnum.exec( val ); - start = e.cur(); - - if ( parts ) { - end = parseFloat( parts[2] ); - unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" ) { - jQuery.style( this, p, (end || 1) + unit); - start = ( (end || 1) / e.cur() ) * start; - jQuery.style( this, p, start + unit); - } - - // If a +=/-= token was provided, we're doing a relative animation - if ( parts[1] ) { - end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; - } - - e.custom( start, end, unit ); - - } else { - e.custom( start, val, "" ); - } - } - } - - // For JS strict compliance - return true; - } - - return optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - - stop: function( type, clearQueue, gotoEnd ) { - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var index, - hadTimers = false, - timers = jQuery.timers, - data = jQuery._data( this ); - - // clear marker counters if we know they won't be - if ( !gotoEnd ) { - jQuery._unmark( true, this ); - } - - function stopQueue( elem, data, index ) { - var hooks = data[ index ]; - jQuery.removeData( elem, index, true ); - hooks.stop( gotoEnd ); - } - - if ( type == null ) { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) { - stopQueue( this, data, index ); - } - } - } else if ( data[ index = type + ".run" ] && data[ index ].stop ){ - stopQueue( this, data, index ); - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - if ( gotoEnd ) { - - // force the next step to be the last - timers[ index ]( true ); - } else { - timers[ index ].saveState(); - } - hadTimers = true; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( !( gotoEnd && hadTimers ) ) { - jQuery.dequeue( this, type ); - } - }); - } - -}); - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout( clearFxNow, 0 ); - return ( fxNow = jQuery.now() ); -} - -function clearFxNow() { - fxNow = undefined; -} - -// Generate parameters to create a standard animation -function genFx( type, num ) { - var obj = {}; - - jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() { - obj[ this ] = type; - }); - - return obj; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx( "show", 1 ), - slideUp: genFx( "hide", 1 ), - slideToggle: genFx( "toggle", 1 ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.extend({ - speed: function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function( noUnmark ) { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } else if ( noUnmark !== false ) { - jQuery._unmark( this ); - } - }; - - return opt; - }, - - easing: { - linear: function( p, n, firstNum, diff ) { - return firstNum + diff * p; - }, - swing: function( p, n, firstNum, diff ) { - return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum; - } - }, - - timers: [], - - fx: function( elem, options, prop ) { - this.options = options; - this.elem = elem; - this.prop = prop; - - options.orig = options.orig || {}; - } - -}); - -jQuery.fx.prototype = { - // Simple function for setting a style value - update: function() { - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this ); - }, - - // Get the current size - cur: function() { - if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { - return this.elem[ this.prop ]; - } - - var parsed, - r = jQuery.css( this.elem, this.prop ); - // Empty strings, null, undefined and "auto" are converted to 0, - // complex values such as "rotate(1rad)" are returned as is, - // simple values such as "10px" are parsed to Float. - return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; - }, - - // Start an animation from one number to another - custom: function( from, to, unit ) { - var self = this, - fx = jQuery.fx; - - this.startTime = fxNow || createFxNow(); - this.end = to; - this.now = this.start = from; - this.pos = this.state = 0; - this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); - - function t( gotoEnd ) { - return self.step( gotoEnd ); - } - - t.queue = this.options.queue; - t.elem = this.elem; - t.saveState = function() { - if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { - jQuery._data( self.elem, "fxshow" + self.prop, self.start ); - } - }; - - if ( t() && jQuery.timers.push(t) && !timerId ) { - timerId = setInterval( fx.tick, fx.interval ); - } - }, - - // Simple 'show' function - show: function() { - var dataShow = jQuery._data( this.elem, "fxshow" + this.prop ); - - // Remember where we started, so that we can go back to it later - this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop ); - this.options.show = true; - - // Begin the animation - // Make sure that we start at a small width/height to avoid any flash of content - if ( dataShow !== undefined ) { - // This show is picking up where a previous hide or show left off - this.custom( this.cur(), dataShow ); - } else { - this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); - } - - // Start by showing the element - jQuery( this.elem ).show(); - }, - - // Simple 'hide' function - hide: function() { - // Remember where we started, so that we can go back to it later - this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop ); - this.options.hide = true; - - // Begin the animation - this.custom( this.cur(), 0 ); - }, - - // Each step of an animation - step: function( gotoEnd ) { - var p, n, complete, - t = fxNow || createFxNow(), - done = true, - elem = this.elem, - options = this.options; - - if ( gotoEnd || t >= options.duration + this.startTime ) { - this.now = this.end; - this.pos = this.state = 1; - this.update(); - - options.animatedProperties[ this.prop ] = true; - - for ( p in options.animatedProperties ) { - if ( options.animatedProperties[ p ] !== true ) { - done = false; - } - } - - if ( done ) { - // Reset the overflow - if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { - - jQuery.each( [ "", "X", "Y" ], function( index, value ) { - elem.style[ "overflow" + value ] = options.overflow[ index ]; - }); - } - - // Hide the element if the "hide" operation was done - if ( options.hide ) { - jQuery( elem ).hide(); - } - - // Reset the properties, if the item has been hidden or shown - if ( options.hide || options.show ) { - for ( p in options.animatedProperties ) { - jQuery.style( elem, p, options.orig[ p ] ); - jQuery.removeData( elem, "fxshow" + p, true ); - // Toggle data is no longer needed - jQuery.removeData( elem, "toggle" + p, true ); - } - } - - // Execute the complete function - // in the event that the complete function throws an exception - // we must ensure it won't be called twice. #5684 - - complete = options.complete; - if ( complete ) { - - options.complete = false; - complete.call( elem ); - } - } - - return false; - - } else { - // classical easing cannot be used with an Infinity duration - if ( options.duration == Infinity ) { - this.now = t; - } else { - n = t - this.startTime; - this.state = n / options.duration; - - // Perform the easing function, defaults to swing - this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration ); - this.now = this.start + ( (this.end - this.start) * this.pos ); - } - // Perform the next step of the animation - this.update(); - } - - return true; - } -}; - -jQuery.extend( jQuery.fx, { - tick: function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - }, - - interval: 13, - - stop: function() { - clearInterval( timerId ); - timerId = null; - }, - - speeds: { - slow: 600, - fast: 200, - // Default speed - _default: 400 - }, - - step: { - opacity: function( fx ) { - jQuery.style( fx.elem, "opacity", fx.now ); - }, - - _default: function( fx ) { - if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { - fx.elem.style[ fx.prop ] = fx.now + fx.unit; - } else { - fx.elem[ fx.prop ] = fx.now; - } - } - } -}); - -// Adds width/height step functions -// Do not set anything below 0 -jQuery.each([ "width", "height" ], function( i, prop ) { - jQuery.fx.step[ prop ] = function( fx ) { - jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit ); - }; -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} - -// Try to restore the default display value of an element -function defaultDisplay( nodeName ) { - - if ( !elemdisplay[ nodeName ] ) { - - var body = document.body, - elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), - display = elem.css( "display" ); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // No iframe to use yet, so create it - if ( !iframe ) { - iframe = document.createElement( "iframe" ); - iframe.frameBorder = iframe.width = iframe.height = 0; - } - - body.appendChild( iframe ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" ); - iframeDoc.close(); - } - - elem = iframeDoc.createElement( nodeName ); - - iframeDoc.body.appendChild( elem ); - - display = jQuery.css( elem, "display" ); - body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return elemdisplay[ nodeName ]; -} - - - - -var rtable = /^t(?:able|d|h)$/i, - rroot = /^(?:body|html)$/i; - -if ( "getBoundingClientRect" in document.documentElement ) { - jQuery.fn.offset = function( options ) { - var elem = this[0], box; - - if ( options ) { - return this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - if ( !elem || !elem.ownerDocument ) { - return null; - } - - if ( elem === elem.ownerDocument.body ) { - return jQuery.offset.bodyOffset( elem ); - } - - try { - box = elem.getBoundingClientRect(); - } catch(e) {} - - var doc = elem.ownerDocument, - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !box || !jQuery.contains( docElem, elem ) ) { - return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; - } - - var body = doc.body, - win = getWindow(doc), - clientTop = docElem.clientTop || body.clientTop || 0, - clientLeft = docElem.clientLeft || body.clientLeft || 0, - scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, - scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, - top = box.top + scrollTop - clientTop, - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; - }; - -} else { - jQuery.fn.offset = function( options ) { - var elem = this[0]; - - if ( options ) { - return this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - if ( !elem || !elem.ownerDocument ) { - return null; - } - - if ( elem === elem.ownerDocument.body ) { - return jQuery.offset.bodyOffset( elem ); - } - - var computedStyle, - offsetParent = elem.offsetParent, - prevOffsetParent = elem, - doc = elem.ownerDocument, - docElem = doc.documentElement, - body = doc.body, - defaultView = doc.defaultView, - prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, - top = elem.offsetTop, - left = elem.offsetLeft; - - while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { - if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { - break; - } - - computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; - top -= elem.scrollTop; - left -= elem.scrollLeft; - - if ( elem === offsetParent ) { - top += elem.offsetTop; - left += elem.offsetLeft; - - if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { - top += parseFloat( computedStyle.borderTopWidth ) || 0; - left += parseFloat( computedStyle.borderLeftWidth ) || 0; - } - - prevOffsetParent = offsetParent; - offsetParent = elem.offsetParent; - } - - if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { - top += parseFloat( computedStyle.borderTopWidth ) || 0; - left += parseFloat( computedStyle.borderLeftWidth ) || 0; - } - - prevComputedStyle = computedStyle; - } - - if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { - top += body.offsetTop; - left += body.offsetLeft; - } - - if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { - top += Math.max( docElem.scrollTop, body.scrollTop ); - left += Math.max( docElem.scrollLeft, body.scrollLeft ); - } - - return { top: top, left: left }; - }; -} - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return null; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( ["Left", "Top"], function( i, name ) { - var method = "scroll" + name; - - jQuery.fn[ method ] = function( val ) { - var elem, win; - - if ( val === undefined ) { - elem = this[ 0 ]; - - if ( !elem ) { - return null; - } - - win = getWindow( elem ); - - // Return the scroll offset - return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : - jQuery.support.boxModel && win.document.documentElement[ method ] || - win.document.body[ method ] : - elem[ method ]; - } - - // Set the scroll offset - return this.each(function() { - win = getWindow( this ); - - if ( win ) { - win.scrollTo( - !i ? val : jQuery( win ).scrollLeft(), - i ? val : jQuery( win ).scrollTop() - ); - - } else { - this[ method ] = val; - } - }); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} - - - - -// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods -jQuery.each([ "Height", "Width" ], function( i, name ) { - - var type = name.toLowerCase(); - - // innerHeight and innerWidth - jQuery.fn[ "inner" + name ] = function() { - var elem = this[0]; - return elem ? - elem.style ? - parseFloat( jQuery.css( elem, type, "padding" ) ) : - this[ type ]() : - null; - }; - - // outerHeight and outerWidth - jQuery.fn[ "outer" + name ] = function( margin ) { - var elem = this[0]; - return elem ? - elem.style ? - parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : - this[ type ]() : - null; - }; - - jQuery.fn[ type ] = function( size ) { - // Get window width or height - var elem = this[0]; - if ( !elem ) { - return size == null ? null : this; - } - - if ( jQuery.isFunction( size ) ) { - return this.each(function( i ) { - var self = jQuery( this ); - self[ type ]( size.call( this, i, self[ type ]() ) ); - }); - } - - if ( jQuery.isWindow( elem ) ) { - // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode - // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat - var docElemProp = elem.document.documentElement[ "client" + name ], - body = elem.document.body; - return elem.document.compatMode === "CSS1Compat" && docElemProp || - body && body[ "client" + name ] || docElemProp; - - // Get document width or height - } else if ( elem.nodeType === 9 ) { - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater - return Math.max( - elem.documentElement["client" + name], - elem.body["scroll" + name], elem.documentElement["scroll" + name], - elem.body["offset" + name], elem.documentElement["offset" + name] - ); - - // Get or set width or height on the element - } else if ( size === undefined ) { - var orig = jQuery.css( elem, type ), - ret = parseFloat( orig ); - - return jQuery.isNumeric( ret ) ? ret : orig; - - // Set the width or height on the element (default to pixels if value is unitless) - } else { - return this.css( type, typeof size === "string" ? size : size + "px" ); - } - }; - -}); - - - - -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - - - -})( window ); diff --git a/libraries/bootstrap/js/tests/vendor/qunit.css b/libraries/bootstrap/js/tests/vendor/qunit.css deleted file mode 100644 index b3e3d002d784e7a6b7efd9c264a0fe74db2b9b38..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/vendor/qunit.css +++ /dev/null @@ -1,232 +0,0 @@ -/** - * QUnit - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2012 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * or GPL (GPL-LICENSE.txt) licenses. - */ - -/** Font Family and Sizes */ - -#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; -} - -#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } -#qunit-tests { font-size: smaller; } - - -/** Resets */ - -#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { - margin: 0; - padding: 0; -} - - -/** Header */ - -#qunit-header { - padding: 0.5em 0 0.5em 1em; - - color: #8699a4; - background-color: #0d3349; - - font-size: 1.5em; - line-height: 1em; - font-weight: normal; - - border-radius: 15px 15px 0 0; - -moz-border-radius: 15px 15px 0 0; - -webkit-border-top-right-radius: 15px; - -webkit-border-top-left-radius: 15px; -} - -#qunit-header a { - text-decoration: none; - color: #c2ccd1; -} - -#qunit-header a:hover, -#qunit-header a:focus { - color: #fff; -} - -#qunit-banner { - height: 5px; -} - -#qunit-testrunner-toolbar { - padding: 0.5em 0 0.5em 2em; - color: #5E740B; - background-color: #eee; -} - -#qunit-userAgent { - padding: 0.5em 0 0.5em 2.5em; - background-color: #2b81af; - color: #fff; - text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; -} - - -/** Tests: Pass/Fail */ - -#qunit-tests { - list-style-position: inside; -} - -#qunit-tests li { - padding: 0.4em 0.5em 0.4em 2.5em; - border-bottom: 1px solid #fff; - list-style-position: inside; -} - -#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { - display: none; -} - -#qunit-tests li strong { - cursor: pointer; -} - -#qunit-tests li a { - padding: 0.5em; - color: #c2ccd1; - text-decoration: none; -} -#qunit-tests li a:hover, -#qunit-tests li a:focus { - color: #000; -} - -#qunit-tests ol { - margin-top: 0.5em; - padding: 0.5em; - - background-color: #fff; - - border-radius: 15px; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - - box-shadow: inset 0px 2px 13px #999; - -moz-box-shadow: inset 0px 2px 13px #999; - -webkit-box-shadow: inset 0px 2px 13px #999; -} - -#qunit-tests table { - border-collapse: collapse; - margin-top: .2em; -} - -#qunit-tests th { - text-align: right; - vertical-align: top; - padding: 0 .5em 0 0; -} - -#qunit-tests td { - vertical-align: top; -} - -#qunit-tests pre { - margin: 0; - white-space: pre-wrap; - word-wrap: break-word; -} - -#qunit-tests del { - background-color: #e0f2be; - color: #374e0c; - text-decoration: none; -} - -#qunit-tests ins { - background-color: #ffcaca; - color: #500; - text-decoration: none; -} - -/*** Test Counts */ - -#qunit-tests b.counts { color: black; } -#qunit-tests b.passed { color: #5E740B; } -#qunit-tests b.failed { color: #710909; } - -#qunit-tests li li { - margin: 0.5em; - padding: 0.4em 0.5em 0.4em 0.5em; - background-color: #fff; - border-bottom: none; - list-style-position: inside; -} - -/*** Passing Styles */ - -#qunit-tests li li.pass { - color: #5E740B; - background-color: #fff; - border-left: 26px solid #C6E746; -} - -#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } -#qunit-tests .pass .test-name { color: #366097; } - -#qunit-tests .pass .test-actual, -#qunit-tests .pass .test-expected { color: #999999; } - -#qunit-banner.qunit-pass { background-color: #C6E746; } - -/*** Failing Styles */ - -#qunit-tests li li.fail { - color: #710909; - background-color: #fff; - border-left: 26px solid #EE5757; - white-space: pre; -} - -#qunit-tests > li:last-child { - border-radius: 0 0 15px 15px; - -moz-border-radius: 0 0 15px 15px; - -webkit-border-bottom-right-radius: 15px; - -webkit-border-bottom-left-radius: 15px; -} - -#qunit-tests .fail { color: #000000; background-color: #EE5757; } -#qunit-tests .fail .test-name, -#qunit-tests .fail .module-name { color: #000000; } - -#qunit-tests .fail .test-actual { color: #EE5757; } -#qunit-tests .fail .test-expected { color: green; } - -#qunit-banner.qunit-fail { background-color: #EE5757; } - - -/** Result */ - -#qunit-testresult { - padding: 0.5em 0.5em 0.5em 2.5em; - - color: #2b81af; - background-color: #D2E0E6; - - border-bottom: 1px solid white; -} - -/** Fixture */ - -#qunit-fixture { - position: absolute; - top: -10000px; - left: -10000px; -} - -/** Runoff */ - -#qunit-fixture { - display:none; -} \ No newline at end of file diff --git a/libraries/bootstrap/js/tests/vendor/qunit.js b/libraries/bootstrap/js/tests/vendor/qunit.js deleted file mode 100644 index 46c95b298e8c8e498d5c112c0de1f75c3bb4c017..0000000000000000000000000000000000000000 --- a/libraries/bootstrap/js/tests/vendor/qunit.js +++ /dev/null @@ -1,1510 +0,0 @@ -/** - * QUnit - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2012 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * or GPL (GPL-LICENSE.txt) licenses. - */ - -(function(window) { - -var defined = { - setTimeout: typeof window.setTimeout !== "undefined", - sessionStorage: (function() { - try { - return !!sessionStorage.getItem; - } catch(e) { - return false; - } - })() -}; - -var testId = 0; - -var Test = function(name, testName, expected, testEnvironmentArg, async, callback) { - this.name = name; - this.testName = testName; - this.expected = expected; - this.testEnvironmentArg = testEnvironmentArg; - this.async = async; - this.callback = callback; - this.assertions = []; -}; -Test.prototype = { - init: function() { - var tests = id("qunit-tests"); - if (tests) { - var b = document.createElement("strong"); - b.innerHTML = "Running " + this.name; - var li = document.createElement("li"); - li.appendChild( b ); - li.className = "running"; - li.id = this.id = "test-output" + testId++; - tests.appendChild( li ); - } - }, - setup: function() { - if (this.module != config.previousModule) { - if ( config.previousModule ) { - QUnit.moduleDone( { - name: config.previousModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - config.previousModule = this.module; - config.moduleStats = { all: 0, bad: 0 }; - QUnit.moduleStart( { - name: this.module - } ); - } - - config.current = this; - this.testEnvironment = extend({ - setup: function() {}, - teardown: function() {} - }, this.moduleTestEnvironment); - if (this.testEnvironmentArg) { - extend(this.testEnvironment, this.testEnvironmentArg); - } - - QUnit.testStart( { - name: this.testName - } ); - - // allow utility functions to access the current test environment - // TODO why?? - QUnit.current_testEnvironment = this.testEnvironment; - - try { - if ( !config.pollution ) { - saveGlobal(); - } - - this.testEnvironment.setup.call(this.testEnvironment); - } catch(e) { - QUnit.ok( false, "Setup failed on " + this.testName + ": " + e.message ); - } - }, - run: function() { - if ( this.async ) { - QUnit.stop(); - } - - if ( config.notrycatch ) { - this.callback.call(this.testEnvironment); - return; - } - try { - this.callback.call(this.testEnvironment); - } catch(e) { - fail("Test " + this.testName + " died, exception and test follows", e, this.callback); - QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) ); - // else next test will carry the responsibility - saveGlobal(); - - // Restart the tests if they're blocking - if ( config.blocking ) { - start(); - } - } - }, - teardown: function() { - try { - this.testEnvironment.teardown.call(this.testEnvironment); - checkPollution(); - } catch(e) { - QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message ); - } - }, - finish: function() { - if ( this.expected && this.expected != this.assertions.length ) { - QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); - } - - var good = 0, bad = 0, - tests = id("qunit-tests"); - - config.stats.all += this.assertions.length; - config.moduleStats.all += this.assertions.length; - - if ( tests ) { - var ol = document.createElement("ol"); - - for ( var i = 0; i < this.assertions.length; i++ ) { - var assertion = this.assertions[i]; - - var li = document.createElement("li"); - li.className = assertion.result ? "pass" : "fail"; - li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); - ol.appendChild( li ); - - if ( assertion.result ) { - good++; - } else { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - - // store result when possible - if ( QUnit.config.reorder && defined.sessionStorage ) { - if (bad) { - sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad); - } else { - sessionStorage.removeItem("qunit-" + this.module + "-" + this.testName); - } - } - - if (bad == 0) { - ol.style.display = "none"; - } - - var b = document.createElement("strong"); - b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>"; - - var a = document.createElement("a"); - a.innerHTML = "Rerun"; - a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - - addEvent(b, "click", function() { - var next = b.nextSibling.nextSibling, - display = next.style.display; - next.style.display = display === "none" ? "block" : "none"; - }); - - addEvent(b, "dblclick", function(e) { - var target = e && e.target ? e.target : window.event.srcElement; - if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { - target = target.parentNode; - } - if ( window.location && target.nodeName.toLowerCase() === "strong" ) { - window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - } - }); - - var li = id(this.id); - li.className = bad ? "fail" : "pass"; - li.removeChild( li.firstChild ); - li.appendChild( b ); - li.appendChild( a ); - li.appendChild( ol ); - - } else { - for ( var i = 0; i < this.assertions.length; i++ ) { - if ( !this.assertions[i].result ) { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - } - - try { - QUnit.reset(); - } catch(e) { - fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset); - } - - QUnit.testDone( { - name: this.testName, - failed: bad, - passed: this.assertions.length - bad, - total: this.assertions.length - } ); - }, - - queue: function() { - var test = this; - synchronize(function() { - test.init(); - }); - function run() { - // each of these can by async - synchronize(function() { - test.setup(); - }); - synchronize(function() { - test.run(); - }); - synchronize(function() { - test.teardown(); - }); - synchronize(function() { - test.finish(); - }); - } - // defer when previous test run passed, if storage is available - var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName); - if (bad) { - run(); - } else { - synchronize(run); - }; - } - -}; - -var QUnit = { - - // call on start of module test to prepend name to all tests - module: function(name, testEnvironment) { - config.currentModule = name; - config.currentModuleTestEnviroment = testEnvironment; - }, - - asyncTest: function(testName, expected, callback) { - if ( arguments.length === 2 ) { - callback = expected; - expected = 0; - } - - QUnit.test(testName, expected, callback, true); - }, - - test: function(testName, expected, callback, async) { - var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg; - - if ( arguments.length === 2 ) { - callback = expected; - expected = null; - } - // is 2nd argument a testEnvironment? - if ( expected && typeof expected === 'object') { - testEnvironmentArg = expected; - expected = null; - } - - if ( config.currentModule ) { - name = '<span class="module-name">' + config.currentModule + "</span>: " + name; - } - - if ( !validTest(config.currentModule + ": " + testName) ) { - return; - } - - var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); - test.module = config.currentModule; - test.moduleTestEnvironment = config.currentModuleTestEnviroment; - test.queue(); - }, - - /** - * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. - */ - expect: function(asserts) { - config.current.expected = asserts; - }, - - /** - * Asserts true. - * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); - */ - ok: function(a, msg) { - a = !!a; - var details = { - result: a, - message: msg - }; - msg = escapeHtml(msg); - QUnit.log(details); - config.current.assertions.push({ - result: a, - message: msg - }); - }, - - /** - * Checks that the first two arguments are equal, with an optional message. - * Prints out both actual and expected values. - * - * Prefered to ok( actual == expected, message ) - * - * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); - * - * @param Object actual - * @param Object expected - * @param String message (optional) - */ - equal: function(actual, expected, message) { - QUnit.push(expected == actual, actual, expected, message); - }, - - notEqual: function(actual, expected, message) { - QUnit.push(expected != actual, actual, expected, message); - }, - - deepEqual: function(actual, expected, message) { - QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); - }, - - notDeepEqual: function(actual, expected, message) { - QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); - }, - - strictEqual: function(actual, expected, message) { - QUnit.push(expected === actual, actual, expected, message); - }, - - notStrictEqual: function(actual, expected, message) { - QUnit.push(expected !== actual, actual, expected, message); - }, - - raises: function(block, expected, message) { - var actual, ok = false; - - if (typeof expected === 'string') { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - if (actual) { - // we don't want to validate thrown error - if (!expected) { - ok = true; - // expected is a regexp - } else if (QUnit.objectType(expected) === "regexp") { - ok = expected.test(actual); - // expected is a constructor - } else if (actual instanceof expected) { - ok = true; - // expected is a validation function which returns true is validation passed - } else if (expected.call({}, actual) === true) { - ok = true; - } - } - - QUnit.ok(ok, message); - }, - - start: function() { - config.semaphore--; - if (config.semaphore > 0) { - // don't start until equal number of stop-calls - return; - } - if (config.semaphore < 0) { - // ignore if start is called more often then stop - config.semaphore = 0; - } - // A slight delay, to avoid any current callbacks - if ( defined.setTimeout ) { - window.setTimeout(function() { - if (config.semaphore > 0) { - return; - } - if ( config.timeout ) { - clearTimeout(config.timeout); - } - - config.blocking = false; - process(); - }, 13); - } else { - config.blocking = false; - process(); - } - }, - - stop: function(timeout) { - config.semaphore++; - config.blocking = true; - - if ( timeout && defined.setTimeout ) { - clearTimeout(config.timeout); - config.timeout = window.setTimeout(function() { - QUnit.ok( false, "Test timed out" ); - QUnit.start(); - }, timeout); - } - } -}; - -// Backwards compatibility, deprecated -QUnit.equals = QUnit.equal; -QUnit.same = QUnit.deepEqual; - -// Maintain internal state -var config = { - // The queue of tests to run - queue: [], - - // block until document ready - blocking: true, - - // when enabled, show only failing tests - // gets persisted through sessionStorage and can be changed in UI via checkbox - hidepassed: false, - - // by default, run previously failed tests first - // very useful in combination with "Hide passed tests" checked - reorder: true, - - // by default, modify document.title when suite is done - altertitle: true, - - urlConfig: ['noglobals', 'notrycatch'] -}; - -// Load paramaters -(function() { - var location = window.location || { search: "", protocol: "file:" }, - params = location.search.slice( 1 ).split( "&" ), - length = params.length, - urlParams = {}, - current; - - if ( params[ 0 ] ) { - for ( var i = 0; i < length; i++ ) { - current = params[ i ].split( "=" ); - current[ 0 ] = decodeURIComponent( current[ 0 ] ); - // allow just a key to turn on a flag, e.g., test.html?noglobals - current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; - urlParams[ current[ 0 ] ] = current[ 1 ]; - } - } - - QUnit.urlParams = urlParams; - config.filter = urlParams.filter; - - // Figure out if we're running the tests from a server or not - QUnit.isLocal = !!(location.protocol === 'file:'); -})(); - -// Expose the API as global variables, unless an 'exports' -// object exists, in that case we assume we're in CommonJS -if ( typeof exports === "undefined" || typeof require === "undefined" ) { - extend(window, QUnit); - window.QUnit = QUnit; -} else { - extend(exports, QUnit); - exports.QUnit = QUnit; -} - -// define these after exposing globals to keep them in these QUnit namespace only -extend(QUnit, { - config: config, - - // Initialize the configuration options - init: function() { - extend(config, { - stats: { all: 0, bad: 0 }, - moduleStats: { all: 0, bad: 0 }, - started: +new Date, - updateRate: 1000, - blocking: false, - autostart: true, - autorun: false, - filter: "", - queue: [], - semaphore: 0 - }); - - var tests = id( "qunit-tests" ), - banner = id( "qunit-banner" ), - result = id( "qunit-testresult" ); - - if ( tests ) { - tests.innerHTML = ""; - } - - if ( banner ) { - banner.className = ""; - } - - if ( result ) { - result.parentNode.removeChild( result ); - } - - if ( tests ) { - result = document.createElement( "p" ); - result.id = "qunit-testresult"; - result.className = "result"; - tests.parentNode.insertBefore( result, tests ); - result.innerHTML = 'Running...<br/> '; - } - }, - - /** - * Resets the test setup. Useful for tests that modify the DOM. - * - * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. - */ - reset: function() { - if ( window.jQuery ) { - jQuery( "#qunit-fixture" ).html( config.fixture ); - } else { - var main = id( 'qunit-fixture' ); - if ( main ) { - main.innerHTML = config.fixture; - } - } - }, - - /** - * Trigger an event on an element. - * - * @example triggerEvent( document.body, "click" ); - * - * @param DOMElement elem - * @param String type - */ - triggerEvent: function( elem, type, event ) { - if ( document.createEvent ) { - event = document.createEvent("MouseEvents"); - event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - elem.dispatchEvent( event ); - - } else if ( elem.fireEvent ) { - elem.fireEvent("on"+type); - } - }, - - // Safe object type checking - is: function( type, obj ) { - return QUnit.objectType( obj ) == type; - }, - - objectType: function( obj ) { - if (typeof obj === "undefined") { - return "undefined"; - - // consider: typeof null === object - } - if (obj === null) { - return "null"; - } - - var type = Object.prototype.toString.call( obj ) - .match(/^\[object\s(.*)\]$/)[1] || ''; - - switch (type) { - case 'Number': - if (isNaN(obj)) { - return "nan"; - } else { - return "number"; - } - case 'String': - case 'Boolean': - case 'Array': - case 'Date': - case 'RegExp': - case 'Function': - return type.toLowerCase(); - } - if (typeof obj === "object") { - return "object"; - } - return undefined; - }, - - push: function(result, actual, expected, message) { - var details = { - result: result, - message: message, - actual: actual, - expected: expected - }; - - message = escapeHtml(message) || (result ? "okay" : "failed"); - message = '<span class="test-message">' + message + "</span>"; - expected = escapeHtml(QUnit.jsDump.parse(expected)); - actual = escapeHtml(QUnit.jsDump.parse(actual)); - var output = message + '<table><tr class="test-expected"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>'; - if (actual != expected) { - output += '<tr class="test-actual"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>'; - output += '<tr class="test-diff"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>'; - } - if (!result) { - var source = sourceFromStacktrace(); - if (source) { - details.source = source; - output += '<tr class="test-source"><th>Source: </th><td><pre>' + escapeHtml(source) + '</pre></td></tr>'; - } - } - output += "</table>"; - - QUnit.log(details); - - config.current.assertions.push({ - result: !!result, - message: output - }); - }, - - url: function( params ) { - params = extend( extend( {}, QUnit.urlParams ), params ); - var querystring = "?", - key; - for ( key in params ) { - querystring += encodeURIComponent( key ) + "=" + - encodeURIComponent( params[ key ] ) + "&"; - } - return window.location.pathname + querystring.slice( 0, -1 ); - }, - - extend: extend, - id: id, - addEvent: addEvent, - - // Logging callbacks; all receive a single argument with the listed properties - // run test/logs.html for any related changes - begin: function() {}, - // done: { failed, passed, total, runtime } - done: function() {}, - // log: { result, actual, expected, message } - log: function() {}, - // testStart: { name } - testStart: function() {}, - // testDone: { name, failed, passed, total } - testDone: function() {}, - // moduleStart: { name } - moduleStart: function() {}, - // moduleDone: { name, failed, passed, total } - moduleDone: function() {} -}); - -if ( typeof document === "undefined" || document.readyState === "complete" ) { - config.autorun = true; -} - -QUnit.load = function() { - QUnit.begin({}); - - // Initialize the config, saving the execution queue - var oldconfig = extend({}, config); - QUnit.init(); - extend(config, oldconfig); - - config.blocking = false; - - var urlConfigHtml = '', len = config.urlConfig.length; - for ( var i = 0, val; i < len, val = config.urlConfig[i]; i++ ) { - config[val] = QUnit.urlParams[val]; - urlConfigHtml += '<label><input name="' + val + '" type="checkbox"' + ( config[val] ? ' checked="checked"' : '' ) + '>' + val + '</label>'; - } - - var userAgent = id("qunit-userAgent"); - if ( userAgent ) { - userAgent.innerHTML = navigator.userAgent; - } - var banner = id("qunit-header"); - if ( banner ) { - banner.innerHTML = '<a href="' + QUnit.url({ filter: undefined }) + '"> ' + banner.innerHTML + '</a> ' + urlConfigHtml; - addEvent( banner, "change", function( event ) { - var params = {}; - params[ event.target.name ] = event.target.checked ? true : undefined; - window.location = QUnit.url( params ); - }); - } - - var toolbar = id("qunit-testrunner-toolbar"); - if ( toolbar ) { - var filter = document.createElement("input"); - filter.type = "checkbox"; - filter.id = "qunit-filter-pass"; - addEvent( filter, "click", function() { - var ol = document.getElementById("qunit-tests"); - if ( filter.checked ) { - ol.className = ol.className + " hidepass"; - } else { - var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; - ol.className = tmp.replace(/ hidepass /, " "); - } - if ( defined.sessionStorage ) { - if (filter.checked) { - sessionStorage.setItem("qunit-filter-passed-tests", "true"); - } else { - sessionStorage.removeItem("qunit-filter-passed-tests"); - } - } - }); - if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { - filter.checked = true; - var ol = document.getElementById("qunit-tests"); - ol.className = ol.className + " hidepass"; - } - toolbar.appendChild( filter ); - - var label = document.createElement("label"); - label.setAttribute("for", "qunit-filter-pass"); - label.innerHTML = "Hide passed tests"; - toolbar.appendChild( label ); - } - - var main = id('qunit-fixture'); - if ( main ) { - config.fixture = main.innerHTML; - } - - if (config.autostart) { - QUnit.start(); - } -}; - -addEvent(window, "load", QUnit.load); - -function done() { - config.autorun = true; - - // Log the last module results - if ( config.currentModule ) { - QUnit.moduleDone( { - name: config.currentModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - - var banner = id("qunit-banner"), - tests = id("qunit-tests"), - runtime = +new Date - config.started, - passed = config.stats.all - config.stats.bad, - html = [ - 'Tests completed in ', - runtime, - ' milliseconds.<br/>', - '<span class="passed">', - passed, - '</span> tests of <span class="total">', - config.stats.all, - '</span> passed, <span class="failed">', - config.stats.bad, - '</span> failed.' - ].join(''); - - if ( banner ) { - banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); - } - - if ( tests ) { - id( "qunit-testresult" ).innerHTML = html; - } - - if ( config.altertitle && typeof document !== "undefined" && document.title ) { - // show ✖ for good, ✔ for bad suite result in title - // use escape sequences in case file gets loaded with non-utf-8-charset - document.title = [ - (config.stats.bad ? "\u2716" : "\u2714"), - document.title.replace(/^[\u2714\u2716] /i, "") - ].join(" "); - } - - QUnit.done( { - failed: config.stats.bad, - passed: passed, - total: config.stats.all, - runtime: runtime - } ); -} - -function validTest( name ) { - var filter = config.filter, - run = false; - - if ( !filter ) { - return true; - } - - var not = filter.charAt( 0 ) === "!"; - if ( not ) { - filter = filter.slice( 1 ); - } - - if ( name.indexOf( filter ) !== -1 ) { - return !not; - } - - if ( not ) { - run = true; - } - - return run; -} - -// so far supports only Firefox, Chrome and Opera (buggy) -// could be extended in the future to use something like https://github.com/csnover/TraceKit -function sourceFromStacktrace() { - try { - throw new Error(); - } catch ( e ) { - if (e.stacktrace) { - // Opera - return e.stacktrace.split("\n")[6]; - } else if (e.stack) { - // Firefox, Chrome - return e.stack.split("\n")[4]; - } else if (e.sourceURL) { - // Safari, PhantomJS - // TODO sourceURL points at the 'throw new Error' line above, useless - //return e.sourceURL + ":" + e.line; - } - } -} - -function escapeHtml(s) { - if (!s) { - return ""; - } - s = s + ""; - return s.replace(/[\&"<>\\]/g, function(s) { - switch(s) { - case "&": return "&"; - case "\\": return "\\\\"; - case '"': return '\"'; - case "<": return "<"; - case ">": return ">"; - default: return s; - } - }); -} - -function synchronize( callback ) { - config.queue.push( callback ); - - if ( config.autorun && !config.blocking ) { - process(); - } -} - -function process() { - var start = (new Date()).getTime(); - - while ( config.queue.length && !config.blocking ) { - if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { - config.queue.shift()(); - } else { - window.setTimeout( process, 13 ); - break; - } - } - if (!config.blocking && !config.queue.length) { - done(); - } -} - -function saveGlobal() { - config.pollution = []; - - if ( config.noglobals ) { - for ( var key in window ) { - config.pollution.push( key ); - } - } -} - -function checkPollution( name ) { - var old = config.pollution; - saveGlobal(); - - var newGlobals = diff( config.pollution, old ); - if ( newGlobals.length > 0 ) { - ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); - } - - var deletedGlobals = diff( old, config.pollution ); - if ( deletedGlobals.length > 0 ) { - ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); - } -} - -// returns a new Array with the elements that are in a but not in b -function diff( a, b ) { - var result = a.slice(); - for ( var i = 0; i < result.length; i++ ) { - for ( var j = 0; j < b.length; j++ ) { - if ( result[i] === b[j] ) { - result.splice(i, 1); - i--; - break; - } - } - } - return result; -} - -function fail(message, exception, callback) { - if ( typeof console !== "undefined" && console.error && console.warn ) { - console.error(message); - console.error(exception); - console.warn(callback.toString()); - - } else if ( window.opera && opera.postError ) { - opera.postError(message, exception, callback.toString); - } -} - -function extend(a, b) { - for ( var prop in b ) { - if ( b[prop] === undefined ) { - delete a[prop]; - } else { - a[prop] = b[prop]; - } - } - - return a; -} - -function addEvent(elem, type, fn) { - if ( elem.addEventListener ) { - elem.addEventListener( type, fn, false ); - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, fn ); - } else { - fn(); - } -} - -function id(name) { - return !!(typeof document !== "undefined" && document && document.getElementById) && - document.getElementById( name ); -} - -// Test for equality any JavaScript type. -// Discussions and reference: http://philrathe.com/articles/equiv -// Test suites: http://philrathe.com/tests/equiv -// Author: Philippe Rathé <prathe@gmail.com> -QUnit.equiv = function () { - - var innerEquiv; // the real equiv function - var callers = []; // stack to decide between skip/abort functions - var parents = []; // stack to avoiding loops from circular referencing - - // Call the o related callback with the given arguments. - function bindCallbacks(o, callbacks, args) { - var prop = QUnit.objectType(o); - if (prop) { - if (QUnit.objectType(callbacks[prop]) === "function") { - return callbacks[prop].apply(callbacks, args); - } else { - return callbacks[prop]; // or undefined - } - } - } - - var callbacks = function () { - - // for string, boolean, number and null - function useStrictEquality(b, a) { - if (b instanceof a.constructor || a instanceof b.constructor) { - // to catch short annotaion VS 'new' annotation of a - // declaration - // e.g. var i = 1; - // var j = new Number(1); - return a == b; - } else { - return a === b; - } - } - - return { - "string" : useStrictEquality, - "boolean" : useStrictEquality, - "number" : useStrictEquality, - "null" : useStrictEquality, - "undefined" : useStrictEquality, - - "nan" : function(b) { - return isNaN(b); - }, - - "date" : function(b, a) { - return QUnit.objectType(b) === "date" - && a.valueOf() === b.valueOf(); - }, - - "regexp" : function(b, a) { - return QUnit.objectType(b) === "regexp" - && a.source === b.source && // the regex itself - a.global === b.global && // and its modifers - // (gmi) ... - a.ignoreCase === b.ignoreCase - && a.multiline === b.multiline; - }, - - // - skip when the property is a method of an instance (OOP) - // - abort otherwise, - // initial === would have catch identical references anyway - "function" : function() { - var caller = callers[callers.length - 1]; - return caller !== Object && typeof caller !== "undefined"; - }, - - "array" : function(b, a) { - var i, j, loop; - var len; - - // b could be an object literal here - if (!(QUnit.objectType(b) === "array")) { - return false; - } - - len = a.length; - if (len !== b.length) { // safe and faster - return false; - } - - // track reference to avoid circular references - parents.push(a); - for (i = 0; i < len; i++) { - loop = false; - for (j = 0; j < parents.length; j++) { - if (parents[j] === a[i]) { - loop = true;// dont rewalk array - } - } - if (!loop && !innerEquiv(a[i], b[i])) { - parents.pop(); - return false; - } - } - parents.pop(); - return true; - }, - - "object" : function(b, a) { - var i, j, loop; - var eq = true; // unless we can proove it - var aProperties = [], bProperties = []; // collection of - // strings - - // comparing constructors is more strict than using - // instanceof - if (a.constructor !== b.constructor) { - return false; - } - - // stack constructor before traversing properties - callers.push(a.constructor); - // track reference to avoid circular references - parents.push(a); - - for (i in a) { // be strict: don't ensures hasOwnProperty - // and go deep - loop = false; - for (j = 0; j < parents.length; j++) { - if (parents[j] === a[i]) - loop = true; // don't go down the same path - // twice - } - aProperties.push(i); // collect a's properties - - if (!loop && !innerEquiv(a[i], b[i])) { - eq = false; - break; - } - } - - callers.pop(); // unstack, we are done - parents.pop(); - - for (i in b) { - bProperties.push(i); // collect b's properties - } - - // Ensures identical properties name - return eq - && innerEquiv(aProperties.sort(), bProperties - .sort()); - } - }; - }(); - - innerEquiv = function() { // can take multiple arguments - var args = Array.prototype.slice.apply(arguments); - if (args.length < 2) { - return true; // end transition - } - - return (function(a, b) { - if (a === b) { - return true; // catch the most you can - } else if (a === null || b === null || typeof a === "undefined" - || typeof b === "undefined" - || QUnit.objectType(a) !== QUnit.objectType(b)) { - return false; // don't lose time with error prone cases - } else { - return bindCallbacks(a, callbacks, [ b, a ]); - } - - // apply transition with (1..n) arguments - })(args[0], args[1]) - && arguments.callee.apply(this, args.splice(1, - args.length - 1)); - }; - - return innerEquiv; - -}(); - -/** - * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | - * http://flesler.blogspot.com Licensed under BSD - * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 - * - * @projectDescription Advanced and extensible data dumping for Javascript. - * @version 1.0.0 - * @author Ariel Flesler - * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} - */ -QUnit.jsDump = (function() { - function quote( str ) { - return '"' + str.toString().replace(/"/g, '\\"') + '"'; - }; - function literal( o ) { - return o + ''; - }; - function join( pre, arr, post ) { - var s = jsDump.separator(), - base = jsDump.indent(), - inner = jsDump.indent(1); - if ( arr.join ) - arr = arr.join( ',' + s + inner ); - if ( !arr ) - return pre + post; - return [ pre, inner + arr, base + post ].join(s); - }; - function array( arr, stack ) { - var i = arr.length, ret = Array(i); - this.up(); - while ( i-- ) - ret[i] = this.parse( arr[i] , undefined , stack); - this.down(); - return join( '[', ret, ']' ); - }; - - var reName = /^function (\w+)/; - - var jsDump = { - parse:function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance - stack = stack || [ ]; - var parser = this.parsers[ type || this.typeOf(obj) ]; - type = typeof parser; - var inStack = inArray(obj, stack); - if (inStack != -1) { - return 'recursion('+(inStack - stack.length)+')'; - } - //else - if (type == 'function') { - stack.push(obj); - var res = parser.call( this, obj, stack ); - stack.pop(); - return res; - } - // else - return (type == 'string') ? parser : this.parsers.error; - }, - typeOf:function( obj ) { - var type; - if ( obj === null ) { - type = "null"; - } else if (typeof obj === "undefined") { - type = "undefined"; - } else if (QUnit.is("RegExp", obj)) { - type = "regexp"; - } else if (QUnit.is("Date", obj)) { - type = "date"; - } else if (QUnit.is("Function", obj)) { - type = "function"; - } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { - type = "window"; - } else if (obj.nodeType === 9) { - type = "document"; - } else if (obj.nodeType) { - type = "node"; - } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) { - type = "array"; - } else { - type = typeof obj; - } - return type; - }, - separator:function() { - return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' '; - }, - indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing - if ( !this.multiline ) - return ''; - var chr = this.indentChar; - if ( this.HTML ) - chr = chr.replace(/\t/g,' ').replace(/ /g,' '); - return Array( this._depth_ + (extra||0) ).join(chr); - }, - up:function( a ) { - this._depth_ += a || 1; - }, - down:function( a ) { - this._depth_ -= a || 1; - }, - setParser:function( name, parser ) { - this.parsers[name] = parser; - }, - // The next 3 are exposed so you can use them - quote:quote, - literal:literal, - join:join, - // - _depth_: 1, - // This is the list of parsers, to modify them, use jsDump.setParser - parsers:{ - window: '[Window]', - document: '[Document]', - error:'[ERROR]', //when no parser is found, shouldn't happen - unknown: '[Unknown]', - 'null':'null', - 'undefined':'undefined', - 'function':function( fn ) { - var ret = 'function', - name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE - if ( name ) - ret += ' ' + name; - ret += '('; - - ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); - return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); - }, - array: array, - nodelist: array, - arguments: array, - object:function( map, stack ) { - var ret = [ ]; - QUnit.jsDump.up(); - for ( var key in map ) { - var val = map[key]; - ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(val, undefined, stack)); - } - QUnit.jsDump.down(); - return join( '{', ret, '}' ); - }, - node:function( node ) { - var open = QUnit.jsDump.HTML ? '<' : '<', - close = QUnit.jsDump.HTML ? '>' : '>'; - - var tag = node.nodeName.toLowerCase(), - ret = open + tag; - - for ( var a in QUnit.jsDump.DOMAttrs ) { - var val = node[QUnit.jsDump.DOMAttrs[a]]; - if ( val ) - ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); - } - return ret + close + open + '/' + tag + close; - }, - functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function - var l = fn.length; - if ( !l ) return ''; - - var args = Array(l); - while ( l-- ) - args[l] = String.fromCharCode(97+l);//97 is 'a' - return ' ' + args.join(', ') + ' '; - }, - key:quote, //object calls it internally, the key part of an item in a map - functionCode:'[code]', //function calls it internally, it's the content of the function - attribute:quote, //node calls it internally, it's an html attribute value - string:quote, - date:quote, - regexp:literal, //regex - number:literal, - 'boolean':literal - }, - DOMAttrs:{//attributes to dump from nodes, name=>realName - id:'id', - name:'name', - 'class':'className' - }, - HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) - indentChar:' ',//indentation unit - multiline:true //if true, items in a collection, are separated by a \n, else just a space. - }; - - return jsDump; -})(); - -// from Sizzle.js -function getText( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += getText( elem.childNodes ); - } - } - - return ret; -}; - -//from jquery.js -function inArray( elem, array ) { - if ( array.indexOf ) { - return array.indexOf( elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; -} - -/* - * Javascript Diff Algorithm - * By John Resig (http://ejohn.org/) - * Modified by Chu Alan "sprite" - * - * Released under the MIT license. - * - * More Info: - * http://ejohn.org/projects/javascript-diff-algorithm/ - * - * Usage: QUnit.diff(expected, actual) - * - * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over" - */ -QUnit.diff = (function() { - function diff(o, n) { - var ns = {}; - var os = {}; - - for (var i = 0; i < n.length; i++) { - if (ns[n[i]] == null) - ns[n[i]] = { - rows: [], - o: null - }; - ns[n[i]].rows.push(i); - } - - for (var i = 0; i < o.length; i++) { - if (os[o[i]] == null) - os[o[i]] = { - rows: [], - n: null - }; - os[o[i]].rows.push(i); - } - - for (var i in ns) { - if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { - n[ns[i].rows[0]] = { - text: n[ns[i].rows[0]], - row: os[i].rows[0] - }; - o[os[i].rows[0]] = { - text: o[os[i].rows[0]], - row: ns[i].rows[0] - }; - } - } - - for (var i = 0; i < n.length - 1; i++) { - if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && - n[i + 1] == o[n[i].row + 1]) { - n[i + 1] = { - text: n[i + 1], - row: n[i].row + 1 - }; - o[n[i].row + 1] = { - text: o[n[i].row + 1], - row: i + 1 - }; - } - } - - for (var i = n.length - 1; i > 0; i--) { - if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && - n[i - 1] == o[n[i].row - 1]) { - n[i - 1] = { - text: n[i - 1], - row: n[i].row - 1 - }; - o[n[i].row - 1] = { - text: o[n[i].row - 1], - row: i - 1 - }; - } - } - - return { - o: o, - n: n - }; - } - - return function(o, n) { - o = o.replace(/\s+$/, ''); - n = n.replace(/\s+$/, ''); - var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); - - var str = ""; - - var oSpace = o.match(/\s+/g); - if (oSpace == null) { - oSpace = [" "]; - } - else { - oSpace.push(" "); - } - var nSpace = n.match(/\s+/g); - if (nSpace == null) { - nSpace = [" "]; - } - else { - nSpace.push(" "); - } - - if (out.n.length == 0) { - for (var i = 0; i < out.o.length; i++) { - str += '<del>' + out.o[i] + oSpace[i] + "</del>"; - } - } - else { - if (out.n[0].text == null) { - for (n = 0; n < out.o.length && out.o[n].text == null; n++) { - str += '<del>' + out.o[n] + oSpace[n] + "</del>"; - } - } - - for (var i = 0; i < out.n.length; i++) { - if (out.n[i].text == null) { - str += '<ins>' + out.n[i] + nSpace[i] + "</ins>"; - } - else { - var pre = ""; - - for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { - pre += '<del>' + out.o[n] + oSpace[n] + "</del>"; - } - str += " " + out.n[i].text + nSpace[i] + pre; - } - } - } - - return str; - }; -})(); - -})(this); \ No newline at end of file diff --git a/libraries/htmlpurifier/NEWS b/libraries/htmlpurifier/NEWS deleted file mode 100644 index 5509f41723303a423f78b0f6784f4e9559c5c176..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/NEWS +++ /dev/null @@ -1,842 +0,0 @@ -NEWS ( CHANGELOG and HISTORY ) HTMLPurifier -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - -= KEY ==================== - # Breaks back-compat - ! Feature - - Bugfix - + Sub-comment - . Internal change -========================== - -3.3.0, released 2009-02-16 -! Implement CSS property 'overflow' when %CSS.AllowTricky is true. -! Implement generic property list classess -- Fix bug with testEncodingSupportsASCII() algorithm when iconv() implementation - does not do the "right thing" with characters not supported in the output - set. -- Spellcheck UTF-8: The Secret To Character Encoding -- Fix improper removal of the contents of elements with only whitespace. Thanks - Eric Wald for reporting. -- Fix broken test suite in versions of PHP without spl_autoload_register() -- Fix degenerate case with YouTube filter involving double hyphens. - Thanks Pierre Attar for reporting. -- Fix YouTube rendering problem on certain versions of Firefox. -- Fix CSSDefinition Printer problems with decorators -- Add text parameter to unit tests, forces text output -. Add verbose mode to command line test runner, use (--verbose) -. Turn on unit tests for UnitConverter -. Fix missing version number in configuration %Attr.DefaultImageAlt (added 3.2.0) -. Fix newline errors that caused spurious failures when CRLF HTML Purifier was - tested on Linux. -. Removed trailing whitespace from all text files, see - remote-trailing-whitespace.php maintenance script. -. Convert configuration to use property list backend. - -3.2.0, released 2008-10-31 -# Using %Core.CollectErrors forces line number/column tracking on, whereas - previously you could theoretically turn it off. -# HTMLPurifier_Injector->notifyEnd() is formally deprecated. Please - use handleEnd() instead. -! %Output.AttrSort for when you need your attributes in alphabetical order to - deal with a bug in FCKEditor. Requested by frank farmer. -! Enable HTML comments when %HTML.Trusted is on. Requested by Waldo Jaquith. -! Proper support for name attribute. It is now allowed and equivalent to the id - attribute in a and img tags, and is only converted to id when %HTML.TidyLevel - is heavy (for all doctypes). -! %AutoFormat.RemoveEmpty to remove some empty tags from documents. Please don't - use on hand-written HTML. -! Add error-cases for unsupported elements in MakeWellFormed. This enables - the strategy to be used, standalone, on untrusted input. -! %Core.AggressivelyFixLt is on by default. This causes more sensible - processing of left angled brackets in smileys and other whatnot. -! Test scripts now have a 'type' parameter, which lets you say 'htmlpurifier', - 'phpt', 'vtest', etc. in order to only execute those tests. This supercedes - the --only-phpt parameter, although for backwards-compatibility the flag - will still work. -! AutoParagraph auto-formatter will now preserve double-newlines upon output. - Users who are not performing inbound filtering, this may seem a little - useless, but as a bonus, the test suite and handling of edge cases is also - improved. -! Experimental implementation of forms for %HTML.Trusted -! Track column numbers when maintain line numbers is on -! Proprietary 'background' attribute on table-related elements converted into - corresponding CSS. Thanks Fusemail for sponsoring this feature! -! Add forward(), forwardUntilEndToken(), backward() and current() to Injector - supertype. -! HTMLPurifier_Injector->handleEnd() permits modification to end tokens. The - time of operation varies slightly from notifyEnd() as *all* end tokens are - processed by the injector before they are subject to the well-formedness rules. -! %Attr.DefaultImageAlt allows overriding default behavior of setting alt to - basename of image when not present. -! %AutoFormat.DisplayLinkURI neuters <a> tags into plain text URLs. -- Fix two bugs in %URI.MakeAbsolute; one involving empty paths in base URLs, - the other involving an undefined $is_folder error. -- Throw error when %Core.Encoding is set to a spurious value. Previously, - this errored silently and returned false. -- Redirected stderr to stdout for flush error output. -- %URI.DisableExternal will now use the host in %URI.Base if %URI.Host is not - available. -- Do not re-munge URL if the output URL has the same host as the input URL. - Requested by Chris. -- Fix error in documentation regarding %Filter.ExtractStyleBlocks -- Prevent <![CDATA[<body></body>]]> from triggering %Core.ConvertDocumentToFragment -- Fix bug with inline elements in blockquotes conflicting with strict doctype -- Detect if HTML support is disabled for DOM by checking for loadHTML() method. -- Fix bug where dots and double-dots in absolute URLs without hostname were - not collapsed by URIFilter_MakeAbsolute. -- Fix bug with anonymous modules operating on SafeEmbed or SafeObject elements - by reordering their addition. -- Will now throw exception on many error conditions during lexer creation; also - throw an exception when MaintainLineNumbers is true, but a non-tracksLineNumbers - is being used. -- Detect if domxml extension is loaded, and use DirectLEx accordingly. -- Improve handling of big numbers with floating point arithmetic in UnitConverter. - Reported by David Morton. -. Strategy_MakeWellFormed now operates in-place, saving memory and allowing - for more interesting filter-backtracking -. New HTMLPurifier_Injector->rewind() functionality, allows injectors to rewind - index to reprocess tokens. -. StringHashParser now allows for multiline sections with "empty" content; - previously the section would remain undefined. -. Added --quick option to multitest.php, which tests only the most recent - release for each series. -. Added --distro option to multitest.php, which accepts either 'normal' or - 'standalone'. This supercedes --exclude-normal and --exclude-standalone - -3.1.1, released 2008-06-19 -# %URI.Munge now, by default, does not munge resources (for example, <img src="">) - In order to enable this again, please set %URI.MungeResources to true. -! More robust imagecrash protection with height/width CSS with %CSS.MaxImgLength, - and height/width HTML with %HTML.MaxImgLength. -! %URI.MungeSecretKey for secure URI munging. Thanks Chris - for sponsoring this feature. Check out the corresponding documentation - for details. (Att Nightly testers: The API for this feature changed before - the general release. Namely, rename your directives %URI.SecureMungeSecretKey => - %URI.MungeSecretKey and and %URI.SecureMunge => %URI.Munge) -! Implemented post URI filtering. Set member variable $post to true to set - a URIFilter as such. -! Allow modules to define injectors via $info_injector. Injectors are - automatically disabled if injector's needed elements are not found. -! Support for "safe" objects added, use %HTML.SafeObject and %HTML.SafeEmbed. - Thanks Chris for sponsoring. If you've been using ad hoc code from the - forums, PLEASE use this instead. -! Added substitutions for %e, %n, %a and %p in %URI.Munge (in order, - embedded, tag name, attribute name, CSS property name). See %URI.Munge - for more details. Requested by Jochem Blok. -- Disable percent height/width attributes for img. -- AttrValidator operations are now atomic; updates to attributes are not - manifest in token until end of operations. This prevents naughty internal - code from directly modifying CurrentToken when they're not supposed to. - This semantics change was requested by frank farmer. -- Percent encoding checks enabled for URI query and fragment -- Fix stray backslashes in font-family; CSS Unicode character escapes are - now properly resolved (although *only* in font-family). Thanks Takeshi Terada - for reporting. -- Improve parseCDATA algorithm to take into account newline normalization -- Account for browser confusion between Yen character and backslash in - Shift_JIS encoding. This fix generalizes to any other encoding which is not - a strict superset of printable ASCII. Thanks Takeshi Terada for reporting. -- Fix missing configuration parameter in Generator calls. Thanks vs for the - partial patch. -- Improved adherence to Unicode by checking for non-character codepoints. - Thanks Geoffrey Sneddon for reporting. This may result in degraded - performance for extremely large inputs. -- Allow CSS property-value pair ''text-decoration: none''. Thanks Jochem Blok - for reporting. -. Added HTMLPurifier_UnitConverter and HTMLPurifier_Length for convenient - handling of CSS-style lengths. HTMLPurifier_AttrDef_CSS_Length now uses - this class. -. API of HTMLPurifier_AttrDef_CSS_Length changed from __construct($disable_negative) - to __construct($min, $max). __construct(true) is equivalent to - __construct('0'). -. Added HTMLPurifier_AttrDef_Switch class -. Rename HTMLPurifier_HTMLModule_Tidy->construct() to setup() and bubble method - up inheritance hierarchy to HTMLPurifier_HTMLModule. All HTMLModules - get this called with the configuration object. All modules now - use this rather than __construct(), although legacy code using constructors - will still work--the new format, however, lets modules access the - configuration object for HTML namespace dependant tweaks. -. AttrDef_HTML_Pixels now takes a single construction parameter, pixels. -. ConfigSchema data-structure heavily optimized; on average it uses a third - the memory it did previously. The interface has changed accordingly, - consult changes to HTMLPurifier_Config for details. -. Variable parsing types now are magic integers instead of strings -. Added benchmark for ConfigSchema -. HTMLPurifier_Generator requires $config and $context parameters. If you - don't know what they should be, use HTMLPurifier_Config::createDefault() - and new HTMLPurifier_Context(). -. Printers now properly distinguish between output configuration, and - target configuration. This is not applicable to scripts using - the Printers for HTML Purifier related tasks. -. HTML/CSS Printers must be primed with prepareGenerator($gen_config), otherwise - fatal errors will ensue. -. URIFilter->prepare can return false in order to abort loading of the filter -. Factory for AttrDef_URI implemented, URI#embedded to indicate URI that embeds - an external resource. -. %URI.Munge functionality factored out into a post-filter class. -. Added CurrentCSSProperty context variable during CSS validation - -3.1.0, released 2008-05-18 -# Unnecessary references to objects (vestiges of PHP4) removed from method - signatures. The following methods do not need references when assigning from - them and will result in E_STRICT errors if you try: - + HTMLPurifier_Config->get*Definition() [* = HTML, CSS] - + HTMLPurifier_ConfigSchema::instance() - + HTMLPurifier_DefinitionCacheFactory::instance() - + HTMLPurifier_DefinitionCacheFactory->create() - + HTMLPurifier_DoctypeRegistry->register() - + HTMLPurifier_DoctypeRegistry->get() - + HTMLPurifier_HTMLModule->addElement() - + HTMLPurifier_HTMLModule->addBlankElement() - + HTMLPurifier_LanguageFactory::instance() -# Printer_ConfigForm's get*() functions were static-ified -# %HTML.ForbiddenAttributes requires attribute declarations to be in the - form of tag@attr, NOT tag.attr (which will throw an error and won't do - anything). This is for forwards compatibility with XML; you'd do best - to migrate an %HTML.AllowedAttributes directives to this syntax too. -! Allow index to be false for config from form creation -! Added HTMLPurifier::VERSION constant -! Commas, not dashes, used for serializer IDs. This change is forwards-compatible - and allows for version numbers like "3.1.0-dev". -! %HTML.Allowed deals gracefully with whitespace anywhere, anytime! -! HTML Purifier's URI handling is a lot more robust, with much stricter - validation checks and better percent encoding handling. Thanks Gareth Heyes - for indicating security vulnerabilities from lax percent encoding. -! Bootstrap autoloader deals more robustly with classes that don't exist, - preventing class_exists($class, true) from barfing. -- InterchangeBuilder now alphabetizes its lists -- Validation error in configdoc output fixed -- Iconv and other encoding errors muted even with custom error handlers that - do not honor error_reporting -- Add protection against imagecrash attack with CSS height/width -- HTMLPurifier::instance() created for consistency, is equivalent to getInstance() -- Fixed and revamped broken ConfigForm smoketest -- Bug with bool/null fields in Printer_ConfigForm fixed -- Bug with global forbidden attributes fixed -- Improved error messages for allowed and forbidden HTML elements and attributes -- Missing (or null) in configdoc documentation restored -- If DOM throws and exception during parsing with PH5P (occurs in newer versions - of DOM), HTML Purifier punts to DirectLex -- Fatal error with unserialization of ScriptRequired -- Created directories are now chmod'ed properly -- Fixed bug with fallback languages in LanguageFactory -- Standalone testing setup properly with autoload -. Out-of-date documentation revised -. UTF-8 encoding check optimization as suggested by Diego -. HTMLPurifier_Error removed in favor of exceptions -. More copy() function removed; should use clone instead -. More extensive unit tests for HTMLDefinition -. assertPurification moved to central harness -. HTMLPurifier_Generator accepts $config and $context parameters during - instantiation, not runtime -. Double-quotes outside of attribute values are now unescaped - -3.1.0rc1, released 2008-04-22 -# Autoload support added. Internal require_once's removed in favor of an - explicit require list or autoloading. To use HTML Purifier, - you must now either use HTMLPurifier.auto.php - or HTMLPurifier.includes.php; setting the include path and including - HTMLPurifier.php is insufficient--in such cases include HTMLPurifier.autoload.php - as well to register our autoload handler (or modify your autoload function - to check HTMLPurifier_Bootstrap::getPath($class)). You can also use - HTMLPurifier.safe-includes.php for a less performance friendly but more - user-friendly library load. -# HTMLPurifier_ConfigSchema static functions are officially deprecated. Schema - information is stored in the ConfigSchema directory, and the - maintenance/generate-schema-cache.php generates the schema.ser file, which - is now instantiated. Support for userland schema changes coming soon! -# HTMLPurifier_Config will now throw E_USER_NOTICE when you use a directive - alias; to get rid of these errors just modify your configuration to use - the new directive name. -# HTMLPurifier->addFilter is deprecated; built-in filters can now be - enabled using %Filter.$filter_name or by setting your own filters using - %Filter.Custom -# Directive-level safety properties superceded in favor of module-level - safety. Internal method HTMLModule->addElement() has changed, although - the externally visible HTMLDefinition->addElement has *not* changed. -! Extra utility classes for testing and non-library operations can - be found in extras/. Specifically, these are FSTools and ConfigDoc. - You may find a use for these in your own project, but right now they - are highly experimental and volatile. -! Integration with PHPT allows for automated smoketests -! Limited support for proprietary HTML elements, namely <marquee>, sponsored - by Chris. You can enable them with %HTML.Proprietary if your client - demands them. -! Support for !important CSS cascade modifier. By default, this will be stripped - from CSS, but you can enable it using %CSS.AllowImportant -! Support for display and visibility CSS properties added, set %CSS.AllowTricky - to true to use them. -! HTML Purifier now has its own Exception hierarchy under HTMLPurifier_Exception. - Developer error (not enduser error) can cause these to be triggered. -! Experimental kses() wrapper introduced with HTMLPurifier.kses.php -! Finally %CSS.AllowedProperties for tweaking allowed CSS properties without - mucking around with HTMLPurifier_CSSDefinition -! ConfigDoc output has been enhanced with version and deprecation info. -! %HTML.ForbiddenAttributes and %HTML.ForbiddenElements implemented. -- Autoclose now operates iteratively, i.e. <span><span><div> now has - both span tags closed. -- Various HTMLPurifier_Config convenience functions now accept another parameter - $schema which defines what HTMLPurifier_ConfigSchema to use besides the - global default. -- Fix bug with trusted script handling in libxml versions later than 2.6.28. -- Fix bug in ExtractStyleBlocks with comments in style tags -- Fix bug in comment parsing for DirectLex -- Flush output now displayed when in command line mode for unit tester -- Fix bug with rgb(0, 1, 2) color syntax with spaces inside shorthand syntax -- HTMLPurifier_HTMLDefinition->addAttribute can now be called multiple times - on the same element without emitting errors. -- Fixed fatal error in PH5P lexer with invalid tag names -. Plugins now get their own changelogs according to project conventions. -. Convert tokens to use instanceof, reducing memory footprint and - improving comparison speed. -. Dry runs now supported in SimpleTest; testing facilities improved -. Bootstrap class added for handling autoloading functionality -. Implemented recursive glob at FSTools->globr -. ConfigSchema now has instance methods for all corresponding define* - static methods. -. A couple of new historical maintenance scripts were added. -. HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php split into two files -. tests/index.php can now be run from any directory. -. HTMLPurifier_Token subclasses split into seperate files -. HTMLPURIFIER_PREFIX now is defined in Bootstrap.php, NOT HTMLPurifier.php -. HTMLPURIFIER_PREFIX can now be defined outside of HTML Purifier -. New --php=php flag added, allows PHP executable to be specified (command - line only!) -. htmlpurifier_add_test() preferred method to translate test files in to - classes, because it handles PHPT files too. -. Debugger class is deprecated and will be removed soon. -. Command line argument parsing for testing scripts revamped, now --opt value - format is supported. -. Smoketests now cleanup after magic quotes -. Generator now can output comments (however, comments are still stripped - from HTML Purifier output) -. HTMLPurifier_ConfigSchema->validate() deprecated in favor of - HTMLPurifier_VarParser->parse() -. Integers auto-cast into float type by VarParser. -. HTMLPURIFIER_STRICT removed; no validation is performed on runtime, only - during cache generation -. Reordered script calls in maintenance/flush.php -. Command line scripts now honor exit codes -. When --flush fails in unit testers, abort tests and print message -. Improved documentation in docs/dev-flush.html about the maintenance scripts -. copy() methods removed in favor of clone keyword - -3.0.0, released 2008-01-06 -# HTML Purifier is PHP 5 only! The 2.1.x branch will be maintained - until PHP 4 is completely deprecated, but no new features will be added - to it. - + Visibility declarations added - + Constructor methods renamed to __construct() - + PHP4 reference cruft removed (in progress) -! CSS properties are now case-insensitive -! DefinitionCacheFactory now can register new implementations -! New HTMLPurifier_Filter_ExtractStyleBlocks for extracting <style> from - documents and cleaning their contents up. Requires the CSSTidy library - <http://csstidy.sourceforge.net/>. You can access the blocks with the - 'StyleBlocks' Context variable ($purifier->context->get('StyleBlocks')). - The output CSS can also be "scoped" for a specific element, use: - %Filter.ExtractStyleBlocksScope -! Experimental support for some proprietary CSS attributes allowed: - opacity (and all of the browser-specific equivalents) and scrollbar colors. - Enable by setting %CSS.Proprietary to true. -- Colors missing # but in hex form will be corrected -- CSS Number algorithm improved -- Unit testing and multi-testing now on steroids: command lines, - XML output, and other goodies now added. -. Unit tests for Injector improved -. New classes: - + HTMLPurifier_AttrDef_CSS_AlphaValue - + HTMLPurifier_AttrDef_CSS_Filter -. Multitest now has a file docblock - -2.1.3, released 2007-11-05 -! tests/multitest.php allows you to test multiple versions by running - tests/index.php through multiple interpreters using `phpv` shell - script (you must provide this script!) -- Fixed poor include ordering for Email URI AttrDefs, causes fatal errors - on some systems. -- Injector algorithm further refined: off-by-one error regarding skip - counts for dormant injectors fixed -- Corrective blockquote definition now enabled for HTML 4.01 Strict -- Fatal error when <img> tag (or any other element with required attributes) - has 'id' attribute fixed, thanks NykO18 for reporting -- Fix warning emitted when a non-supported URI scheme is passed to the - MakeAbsolute URIFilter, thanks NykO18 (again) -- Further refine AutoParagraph injector. Behavior inside of elements - allowing paragraph tags clarified: only inline content delimeted by - double newlines (not block elements) are paragraphed. -- Buggy treatment of end tags of elements that have required attributes - fixed (does not manifest on default tag-set) -- Spurious internal content reorganization error suppressed -- HTMLDefinition->addElement now returns a reference to the created - element object, as implied by the documentation -- Phorum mod's HTML Purifier help message expanded (unreleased elsewhere) -- Fix a theoretical class of infinite loops from DirectLex reported - by Nate Abele -- Work around unnecessary DOMElement type-cast in PH5P that caused errors - in PHP 5.1 -- Work around PHP 4 SimpleTest lack-of-error complaining for one-time-only - HTMLDefinition errors, this may indicate problems with error-collecting - facilities in PHP 5 -- Make ErrorCollectorEMock work in both PHP 4 and PHP 5 -- Make PH5P work with PHP 5.0 by removing unnecessary array parameter typedef -. %Core.AcceptFullDocuments renamed to %Core.ConvertDocumentToFragment - to better communicate its purpose -. Error unit tests can now specify the expectation of no errors. Future - iterations of the harness will be extremely strict about what errors - are allowed -. Extend Injector hooks to allow for more powerful injector routines -. HTMLDefinition->addBlankElement created, as according to the HTMLModule - method -. Doxygen configuration file updated, with minor improvements -. Test runner now checks for similarly named files in conf/ directory too. -. Minor cosmetic change to flush-definition-cache.php: trailing newline is - outputted -. Maintenance script for generating PH5P patch added, original PH5P source - file also added under version control -. Full unit test runner script title made more descriptive with PHP version -. Updated INSTALL file to state that 4.3.7 is the earliest version we - are actively testing - -2.1.2, released 2007-09-03 -! Implemented Object module for trusted users -! Implemented experimental HTML5 parsing mode using PH5P. To use, add - this to your code: - require_once 'HTMLPurifier/Lexer/PH5P.php'; - $config->set('Core', 'LexerImpl', 'PH5P'); - Note that this Lexer introduces some classes not in the HTMLPurifier - namespace. Also, this is PHP5 only. -! CSS property border-spacing implemented -- Fix non-visible parsing error in DirectLex with empty tags that have - slashes inside attribute values. -- Fix typo in CSS definition: border-collapse:seperate; was incorrectly - accepted as valid CSS. Usually non-visible, because this styling is the - default for tables in most browsers. Thanks Brett Zamir for pointing - this out. -- Fix validation errors in configuration form -- Hammer out a bunch of edge-case bugs in the standalone distribution -- Inclusion reflection removed from URISchemeRegistry; you must manually - include any new schema files you wish to use -- Numerous typo fixes in documentation thanks to Brett Zamir -. Unit test refactoring for one logical test per test function -. Config and context parameters in ComplexHarness deprecated: instead, edit - the $config and $context member variables -. HTML wrapper in DOMLex now takes DTD identifiers into account; doesn't - really make a difference, but is good for completeness sake -. merge-library.php script refactored for greater code reusability and - PHP4 compatibility - -2.1.1, released 2007-08-04 -- Fix show-stopper bug in %URI.MakeAbsolute functionality -- Fix PHP4 syntax error in standalone version -. Add prefix directory to include path for standalone, this prevents - other installations from clobbering the standalone's URI schemes -. Single test methods can be invoked by prefixing with __only - -2.1.0, released 2007-08-02 -# flush-htmldefinition-cache.php superseded in favor of a generic - flush-definition-cache.php script, you can clear a specific cache - by passing its name as a parameter to the script -! Phorum mod implemented for HTML Purifier -! With %Core.AggressivelyFixLt, <3 and similar emoticons no longer - trigger HTML removal in PHP5 (DOMLex). This directive is not necessary - for PHP4 (DirectLex). -! Standalone file now available, which greatly reduces the amount of - includes (although there are still a few files that reside in the - standalone folder) -! Relative URIs can now be transformed into their absolute equivalents - using %URI.Base and %URI.MakeAbsolute -! Ruby implemented for XHTML 1.1 -! You can now define custom URI filtering behavior, see enduser-uri-filter.html - for more details -! UTF-8 font names now supported in CSS -- AutoFormatters emit friendly error messages if tags or attributes they - need are not allowed -- ConfigForm's compactification of directive names is now configurable -- AutoParagraph autoformatter algorithm refined after field-testing -- XHTML 1.1 now applies XHTML 1.0 Strict cleanup routines, namely - blockquote wrapping -- Contents of <style> tags removed by default when tags are removed -. HTMLPurifier_Config->getSerial() implemented, this is extremely useful - for output cache invalidation -. ConfigForm printer now can retrieve CSS and JS files as strings, in - case HTML Purifier's directory is not publically accessible -. Introduce new text/itext configuration directive values: these represent - longer strings that would be more appropriately edited with a textarea -. Allow newlines to act as separators for lists, hashes, lookups and - %HTML.Allowed -. ConfigForm generates textareas instead of text inputs for lists, hashes, - lookups, text and itext fields -. Hidden element content removal genericized: %Core.HiddenElements can - be used to customize this behavior, by default <script> and <style> are - hidden -. Added HTMLPURIFIER_PREFIX constant, should be used instead of dirname(__FILE__) -. Custom ChildDef added to default include list -. URIScheme reflection improved: will not attempt to include file if class - already exists. May clobber autoload, so I need to keep an eye on it -. ConfigSchema heavily optimized, will only collect information and validate - definitions when HTMLPURIFIER_SCHEMA_STRICT is true. -. AttrDef_URI unit tests and implementation refactored -. benchmarks/ directory now protected from public view with .htaccess file; - run the tests via command line -. URI scheme is munged off if there is no authority and the scheme is the - default one -. All unit tests inherit from HTMLPurifier_Harness, not UnitTestCase -. Interface for URIScheme changed -. Generic URI object to hold components of URI added, most systems involved - in URI validation have been migrated to use it -. Custom filtering for URIs factored out to URIDefinition interface for - maximum extensibility - -2.0.1, released 2007-06-27 -! Tag auto-closing now based on a ChildDef heuristic rather than a - manually set auto_close array; some behavior may change -! Experimental AutoFormat functionality added: auto-paragraph and - linkify your HTML input by setting %AutoFormat.AutoParagraph and - %AutoFormat.Linkify to true -! Newlines normalized internally, and then converted back to the - value of PHP_EOL. If this is not desired, set your newline format - using %Output.Newline. -! Beta error collection, messages are implemented for the most generic - cases involving Lexing or Strategies -- Clean up special case code for <script> tags -- Reorder includes for DefinitionCache decorators, fixes a possible - missing class error -- Fixed bug where manually modified definitions were not saved via cache - (mostly harmless, except for the fact that it would be a little slower) -- Configuration objects with different serials do not clobber each - others when revision numbers are unequal -- Improve Serializer DefinitionCache directory permissions checks -- DefinitionCache no longer throws errors when it encounters old - serial files that do not conform to the current style -- Stray xmlns attributes removed from configuration documentation -- configForm.php smoketest no longer has XSS vulnerability due to - unescaped print_r output -- Printer adheres to configuration's directives on output format -- Fix improperly named form field in ConfigForm printer -. Rewire some test-cases to swallow errors rather than expect them -. HTMLDefinition printer updated with some of the new attributes -. DefinitionCache keys reordered to reflect precedence: version number, - hash, then revision number -. %Core.DefinitionCache renamed to %Cache.DefinitionImpl -. Interlinking in configuration documentation added using - Injector_PurifierLinkify -. Directives now keep track of aliases to themselves -. Error collector now requires a severity to be passed, use PHP's internal - error constants for this -. HTMLPurifier_Config::getAllowedDirectivesForForm implemented, allows - much easier selective embedding of configuration values -. Doctype objects now accept public and system DTD identifiers -. %HTML.Doctype is now constrained by specific values, to specify a custom - doctype use new %HTML.CustomDoctype -. ConfigForm truncates long directives to keep the form small, and does - not re-output namespaces - -2.0.0, released 2007-06-20 -# Completely refactored HTMLModuleManager, decentralizing safety - information -# Transform modules changed to Tidy modules, which offer more flexibility - and better modularization -# Configuration object now finalizes itself when a read operation is - performed on it, ensuring that its internal state stays consistent. - To revert this behavior, you can set the $autoFinalize member variable - off, but it's not recommended. -# New compact syntax for AttrDef objects that can be used to instantiate - new objects via make() -# Definitions (esp. HTMLDefinition) are now cached for a significant - performance boost. You can disable caching by setting %Core.DefinitionCache - to null. You CANNOT edit raw definitions without setting the corresponding - DefinitionID directive (%HTML.DefinitionID for HTMLDefinition). -# Contents between <script> tags are now completely removed if <script> - is not allowed -# Prototype-declarations for Lexer removed in favor of configuration - determination of Lexer implementations. -! HTML Purifier now works in PHP 4.3.2. -! Configuration form-editing API makes tweaking HTMLPurifier_Config a - breeze! -! Configuration directives that accept hashes now allow new string - format: key1:value1,key2:value2 -! ConfigDoc now factored into OOP design -! All deprecated elements now natively supported -! Implement TinyMCE styled whitelist specification format in - %HTML.Allowed -! Config object gives more friendly error messages when things go wrong -! Advanced API implemented: easy functions for creating elements (addElement) - and attributes (addAttribute) on HTMLDefinition -! Add native support for required attributes -- Deprecated and removed EnableRedundantUTF8Cleaning. It didn't even work! -- DOMLex will not emit errors when a custom error handler that does not - honor error_reporting is used -- StrictBlockquote child definition refrains from wrapping whitespace - in tags now. -- Bug resulting from tag transforms to non-allowed elements fixed -- ChildDef_Custom's regex generation has been improved, removing several - false positives -. Unit test for ElementDef created, ElementDef behavior modified to - be more flexible -. Added convenience functions for HTMLModule constructors -. AttrTypes now has accessor functions that should be used instead - of directly manipulating info -. TagTransform_Center deprecated in favor of generic TagTransform_Simple -. Add extra protection in AttrDef_URI against phantom Schemes -. Doctype object added to HTMLDefinition which describes certain aspects - of the operational document type -. Lexer is now pre-emptively included, with a conditional include for the - PHP5 only version. -. HTMLDefinition and CSSDefinition have a common parent class: Definition. -. DirectLex can now track line-numbers -. Preliminary error collector is in place, although no code actually reports - errors yet -. Factor out most of ValidateAttributes to new AttrValidator class - -1.6.1, released 2007-05-05 -! Support for more deprecated attributes via transformations: - + hspace and vspace in img - + size and noshade in hr - + nowrap in td - + clear in br - + align in caption, table, img and hr - + type in ul, ol and li -! DirectLex now preserves text in which a < bracket is followed by - a non-alphanumeric character. This means that certain emoticons - are now preserved. -! %Core.RemoveInvalidImg is now operational, when set to false invalid - images will hang around with an empty src -! target attribute in a tag supported, use %Attr.AllowedFrameTargets - to enable -! CSS property white-space now allows nowrap (supported in all modern - browsers) but not others (which have spotty browser implementations) -! XHTML 1.1 mode now sort-of works without any fatal errors, and - lang is now moved over to xml:lang. -! Attribute transformation smoketest available at smoketests/attrTransform.php -! Transformation of font's size attribute now handles super-large numbers -- Possibly fatal bug with __autoload() fixed in module manager -- Invert HTMLModuleManager->addModule() processing order to check - prefixes first and then the literal module -- Empty strings get converted to empty arrays instead of arrays with - an empty string in them. -- Merging in attribute lists now works. -. Demo script removed: it has been added to the website's repository -. Basic.php script modified to work out of the box -. Refactor AttrTransform classes to reduce duplication -. AttrTransform_TextAlign axed in favor of a more general - AttrTransform_EnumToCSS, refer to HTMLModule/TransformToStrict.php to - see how the new equivalent is implemented -. Unit tests now use exclusively assertIdentical - -1.6.0, released 2007-04-01 -! Support for most common deprecated attributes via transformations: - + bgcolor in td, th, tr and table - + border in img - + name in a and img - + width in td, th and hr - + height in td, th -! Support for CSS attribute 'height' added -! Support for rel and rev attributes in a tags added, use %Attr.AllowedRel - and %Attr.AllowedRev to activate -- You can define ID blacklists using regular expressions via - %Attr.IDBlacklistRegexp -- Error messages are emitted when you attempt to "allow" elements or - attributes that HTML Purifier does not support -- Fix segfault in unit test. The problem is not very reproduceable and - I don't know what causes it, but a six line patch fixed it. - -1.5.0, released 2007-03-23 -! Added a rudimentary I18N and L10N system modeled off MediaWiki. It - doesn't actually do anything yet, but keep your eyes peeled. -! docs/enduser-utf8.html explains how to use UTF-8 and HTML Purifier -! Newly structured HTMLDefinition modeled off of XHTML 1.1 modules. - I am loathe to release beta quality APIs, but this is exactly that; - don't use the internal interfaces if you're not willing to do migration - later on. -- Allow 'x' subtag in language codes -- Fixed buggy chameleon-support for ins and del -. Added support for IDREF attributes (i.e. for) -. Renamed HTMLPurifier_AttrDef_Class to HTMLPurifier_AttrDef_Nmtokens -. Removed context variable ParentType, replaced with IsInline, which - is false when you're not inline and an integer of the parent that - caused you to become inline when you are (so possibly zero) -. Removed ElementDef->type in favor of ElementDef->descendants_are_inline - and HTMLDefinition->content_sets -. StrictBlockquote now reports what elements its supposed to allow, - rather than what it does allow -. Removed HTMLDefinition->info_flow_elements in favor of - HTMLDefinition->content_sets['Flow'] -. Removed redundant "exclusionary" definitions from DTD roster -. StrictBlockquote now requires a construction parameter as if it - were an Required ChildDef, this is the "real" set of allowed elements -. AttrDef partitioned into HTML, CSS and URI segments -. Modify Youtube filter regexp to be multiline -. Require both PHP5 and DOM extension in order to use DOMLex, fixes - some edge cases where a DOMDocument class exists in a PHP4 environment - due to DOM XML extension. - -1.4.1, released 2007-01-21 -! docs/enduser-youtube.html updated according to new functionality -- YouTube IDs can have underscores and dashes - -1.4.0, released 2007-01-21 -! Implemented list-style-image, URIs now allowed in list-style -! Implemented background-image, background-repeat, background-attachment - and background-position CSS properties. Shorthand property background - supports all of these properties. -! Configuration documentation looks nicer -! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode - characters while %Core.Encoding is set to a non-UTF-8 encoding. -! Support for configuration directive aliases added -! Config object can now be instantiated from ini files -! YouTube preservation code added to the core, with two lines of code - you can add it as a filter to your code. See smoketests/preserveYouTube.php - for sample code. -! Moved SLOW to docs/enduser-slow.html and added code examples -- Replaced version check with functionality check for DOM (thanks Stephen - Khoo) -. Added smoketest 'all.php', which loads all other smoketests via frames -. Implemented AttrDef_CSSURI for url(http://google.com) style declarations -. Added convenient single test selector form on test runner - -1.3.2, released 2006-12-25 -! HTMLPurifier object now accepts configuration arrays, no need to manually - instantiate a configuration object -! Context object now accessible to outside -! Added enduser-youtube.html, explains how to embed YouTube videos. See - also corresponding smoketest preserveYouTube.php. -! Added purifyArray(), which takes a list of HTML and purifies it all -! Added static member variable $version to HTML Purifier with PHP-compatible - version number string. -- Fixed fatal error thrown by upper-cased language attributes -- printDefinition.php: added labels, added better clarification -. HTMLPurifier_Config::create() added, takes mixed variable and converts into - a HTMLPurifier_Config object. - -1.3.1, released 2006-12-06 -! Added HTMLPurifier.func.php stub for a convenient function to call the library -- Fixed bug in RemoveInvalidImg code that caused all images to be dropped - (thanks to .mario for reporting this) -. Standardized all attribute handling variables to attr, made it plural - -1.3.0, released 2006-11-26 -# Invalid images are now removed, rather than replaced with a dud - <img src="" alt="Invalid image" />. Previous behavior can be restored - with new directive %Core.RemoveInvalidImg set to false. -! (X)HTML Strict now supported - + Transparently handles inline elements in block context (blockquote) -! Added GET method to demo for easier validation, added 50kb max input size -! New directive %HTML.BlockWrapper, for block-ifying inline elements -! New directive %HTML.Parent, allows you to only allow inline content -! New directives %HTML.AllowedElements and %HTML.AllowedAttributes to let - users narrow the set of allowed tags -! <li value="4"> and <ul start="2"> now allowed in loose mode -! New directives %URI.DisableExternalResources and %URI.DisableResources -! New directive %Attr.DisableURI, which eliminates all hyperlinking -! New directive %URI.Munge, munges URI so you can use some sort of redirector - service to avoid PageRank leaks or warn users that they are exiting your site. -! Added spiffy new smoketest printDefinition.php, which lets you twiddle with - the configuration settings and see how the internal rules are affected. -! New directive %URI.HostBlacklist for blocking links to bad hosts. - xssAttacks.php smoketest updated accordingly. -- Added missing type to ChildDef_Chameleon -- Remove Tidy option from demo if there is not Tidy available -. ChildDef_Required guards against empty tags -. Lookup table HTMLDefinition->info_flow_elements added -. Added peace-of-mind variable initialization to Strategy_FixNesting -. Added HTMLPurifier->info_parent_def, parent child processing made special -. Added internal documents briefly summarizing future progression of HTML -. HTMLPurifier_Config->getBatch($namespace) added -. More lenient casting to bool from string in HTMLPurifier_ConfigSchema -. Refactored ChildDef classes into their own files - -1.2.0, released 2006-11-19 -# ID attributes now disabled by default. New directives: - + %HTML.EnableAttrID - restores old behavior by allowing IDs - + %Attr.IDPrefix - %Attr.IDBlacklist alternative that munges all user IDs - so that they don't collide with your IDs - + %Attr.IDPrefixLocal - Same as above, but for when there are multiple - instances of user content on the page - + Profuse documentation on how to use these available in docs/enduser-id.txt -! Added MODx plugin <http://modxcms.com/forums/index.php/topic,6604.0.html> -! Added percent encoding normalization -! XSS attacks smoketest given facelift -! Configuration documentation now has table of contents -! Added %URI.DisableExternal, which prevents links to external websites. You - can also use %URI.Host to permit absolute linking to subdomains -! Non-accessible resources (ex. mailto) blocked from embedded URIs (img src) -- Type variable in HTMLDefinition was not being set properly, fixed -- Documentation updated - + TODO added request Phalanger - + TODO added request Native compression - + TODO added request Remove redundant tags - + TODO added possible plaintext formatter for HTML Purifier documentation - + Updated ConfigDoc TODO - + Improved inline comments in AttrDef/Class.php, AttrDef/CSS.php - and AttrDef/Host.php - + Revamped documentation into HTML, along with misc updates -- HTMLPurifier_Context doesn't throw a variable reference error if you attempt - to retrieve a non-existent variable -. Switched to purify()-wide Context object registry -. Refactored unit tests to minimize duplication -. XSS attack sheet updated -. configdoc.xml now has xml:space attached to default value nodes -. Allow configuration directives to permit null values -. Cleaned up test-cases to remove unnecessary swallowErrors() - -1.1.2, released 2006-09-30 -! Add HTMLPurifier.auto.php stub file that configures include_path -- Documentation updated - + INSTALL document rewritten - + TODO added semi-lossy conversion - + API Doxygen docs' file exclusions updated - + Added notes on HTML versus XML attribute whitespace handling - + Noted that HTMLPurifier_ChildDef_Custom isn't being used - + Noted that config object's definitions are cached versions -- Fixed lack of attribute parsing in HTMLPurifier_Lexer_PEARSax3 -- ftp:// URIs now have their typecodes checked -- Hooked up HTMLPurifier_ChildDef_Custom's unit tests (they weren't being run) -. Line endings standardized throughout project (svn:eol-style standardized) -. Refactored parseData() to general Lexer class -. Tester named "HTML Purifier" not "HTMLPurifier" - -1.1.1, released 2006-09-24 -! Configuration option to optionally Tidy up output for indentation to make up - for dropped whitespace by DOMLex (pretty-printing for the entire application - should be done by a page-wide Tidy) -- Various documentation updates -- Fixed parse error in configuration documentation script -- Fixed fatal error in benchmark scripts, slightly augmented -- As far as possible, whitespace is preserved in-between table children -- Sample test-settings.php file included - -1.1.0, released 2006-09-16 -! Directive documentation generation using XSLT -! XHTML can now be turned off, output becomes <br> -- Made URI validator more forgiving: will ignore leading and trailing - quotes, apostrophes and less than or greater than signs. -- Enforce alphanumeric namespace and directive names for configuration. -- Table child definition made more flexible, will fix up poorly ordered elements -. Renamed ConfigDef to ConfigSchema - -1.0.1, released 2006-09-04 -- Fixed slight bug in DOMLex attribute parsing -- Fixed rejection of case-insensitive configuration values when there is a - set of allowed values. This manifested in %Core.Encoding. -- Fixed rejection of inline style declarations that had lots of extra - space in them. This manifested in TinyMCE. - -1.0.0, released 2006-09-01 -! Shorthand CSS properties implemented: font, border, background, list-style -! Basic color keywords translated into hexadecimal values -! Table CSS properties implemented -! Support for charsets other than UTF-8 (defined by iconv) -! Malformed UTF-8 and non-SGML character detection and cleaning implemented -- Fixed broken numeric entity conversion -- API documentation completed -. (HTML|CSS)Definition de-singleton-ized - -1.0.0beta, released 2006-08-16 -! First public release, most functionality implemented. Notable omissions are: - + Shorthand CSS properties - + Table CSS properties - + Deprecated attribute transformations - - vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef.php deleted file mode 100644 index d32fa62d6ad98b54c5915b3d96e2f1fbf7bb1a9f..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/** - * Base class for all validating attribute definitions. - * - * This family of classes forms the core for not only HTML attribute validation, - * but also any sort of string that needs to be validated or cleaned (which - * means CSS properties and composite definitions are defined here too). - * Besides defining (through code) what precisely makes the string valid, - * subclasses are also responsible for cleaning the code if possible. - */ - -abstract class HTMLPurifier_AttrDef -{ - - /** - * Tells us whether or not an HTML attribute is minimized. Has no - * meaning in other contexts. - */ - public $minimized = false; - - /** - * Tells us whether or not an HTML attribute is required. Has no - * meaning in other contexts - */ - public $required = false; - - /** - * Validates and cleans passed string according to a definition. - * - * @param $string String to be validated and cleaned. - * @param $config Mandatory HTMLPurifier_Config object. - * @param $context Mandatory HTMLPurifier_AttrContext object. - */ - abstract public function validate($string, $config, $context); - - /** - * Convenience method that parses a string as if it were CDATA. - * - * This method process a string in the manner specified at - * <http://www.w3.org/TR/html4/types.html#h-6.2> by removing - * leading and trailing whitespace, ignoring line feeds, and replacing - * carriage returns and tabs with spaces. While most useful for HTML - * attributes specified as CDATA, it can also be applied to most CSS - * values. - * - * @note This method is not entirely standards compliant, as trim() removes - * more types of whitespace than specified in the spec. In practice, - * this is rarely a problem, as those extra characters usually have - * already been removed by HTMLPurifier_Encoder. - * - * @warning This processing is inconsistent with XML's whitespace handling - * as specified by section 3.3.3 and referenced XHTML 1.0 section - * 4.7. However, note that we are NOT necessarily - * parsing XML, thus, this behavior may still be correct. We - * assume that newlines have been normalized. - */ - public function parseCDATA($string) { - $string = trim($string); - $string = str_replace(array("\n", "\t", "\r"), ' ', $string); - return $string; - } - - /** - * Factory method for creating this class from a string. - * @param $string String construction info - * @return Created AttrDef object corresponding to $string - */ - public function make($string) { - // default implementation, return a flyweight of this object. - // If $string has an effect on the returned object (i.e. you - // need to overload this method), it is best - // to clone or instantiate new copies. (Instantiation is safer.) - return $this; - } - - /** - * Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work - * properly. THIS IS A HACK! - */ - protected function mungeRgb($string) { - return preg_replace('/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\)/', 'rgb(\1,\2,\3)', $string); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php deleted file mode 100644 index 292c040d4bd525f708add43159301302eb717ff1..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -class HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_CSS_Number -{ - - public function __construct() { - parent::__construct(false); // opacity is non-negative, but we will clamp it - } - - public function validate($number, $config, $context) { - $result = parent::validate($number, $config, $context); - if ($result === false) return $result; - $float = (float) $result; - if ($float < 0.0) $result = '0'; - if ($float > 1.0) $result = '1'; - return $result; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php deleted file mode 100644 index 14c6594b6069f55fabe38a14805b079be8badb88..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -/** - * Validates Color as defined by CSS. - */ -class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef -{ - - public function validate($color, $config, $context) { - - static $colors = null; - if ($colors === null) $colors = $config->get('Core', 'ColorKeywords'); - - $color = trim($color); - if ($color === '') return false; - - $lower = strtolower($color); - if (isset($colors[$lower])) return $colors[$lower]; - - if (strpos($color, 'rgb(') !== false) { - // rgb literal handling - $length = strlen($color); - if (strpos($color, ')') !== $length - 1) return false; - $triad = substr($color, 4, $length - 4 - 1); - $parts = explode(',', $triad); - if (count($parts) !== 3) return false; - $type = false; // to ensure that they're all the same type - $new_parts = array(); - foreach ($parts as $part) { - $part = trim($part); - if ($part === '') return false; - $length = strlen($part); - if ($part[$length - 1] === '%') { - // handle percents - if (!$type) { - $type = 'percentage'; - } elseif ($type !== 'percentage') { - return false; - } - $num = (float) substr($part, 0, $length - 1); - if ($num < 0) $num = 0; - if ($num > 100) $num = 100; - $new_parts[] = "$num%"; - } else { - // handle integers - if (!$type) { - $type = 'integer'; - } elseif ($type !== 'integer') { - return false; - } - $num = (int) $part; - if ($num < 0) $num = 0; - if ($num > 255) $num = 255; - $new_parts[] = (string) $num; - } - } - $new_triad = implode(',', $new_parts); - $color = "rgb($new_triad)"; - } else { - // hexadecimal handling - if ($color[0] === '#') { - $hex = substr($color, 1); - } else { - $hex = $color; - $color = '#' . $color; - } - $length = strlen($hex); - if ($length !== 3 && $length !== 6) return false; - if (!ctype_xdigit($hex)) return false; - } - - return $color; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php deleted file mode 100644 index 6599c5b2ddcee7afbfb9935027b2559e22845e05..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * Decorator which enables CSS properties to be disabled for specific elements. - */ -class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef -{ - public $def, $element; - - /** - * @param $def Definition to wrap - * @param $element Element to deny - */ - public function __construct($def, $element) { - $this->def = $def; - $this->element = $element; - } - /** - * Checks if CurrentToken is set and equal to $this->element - */ - public function validate($string, $config, $context) { - $token = $context->get('CurrentToken', true); - if ($token && $token->name == $this->element) return false; - return $this->def->validate($string, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php deleted file mode 100644 index 705ac893d1be4ffa6512730a076ada9401c6e2a6..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -/** - * Validates a font family list according to CSS spec - * @todo whitelisting allowed fonts would be nice - */ -class HTMLPurifier_AttrDef_CSS_FontFamily extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - static $generic_names = array( - 'serif' => true, - 'sans-serif' => true, - 'monospace' => true, - 'fantasy' => true, - 'cursive' => true - ); - - // assume that no font names contain commas in them - $fonts = explode(',', $string); - $final = ''; - foreach($fonts as $font) { - $font = trim($font); - if ($font === '') continue; - // match a generic name - if (isset($generic_names[$font])) { - $final .= $font . ', '; - continue; - } - // match a quoted name - if ($font[0] === '"' || $font[0] === "'") { - $length = strlen($font); - if ($length <= 2) continue; - $quote = $font[0]; - if ($font[$length - 1] !== $quote) continue; - $font = substr($font, 1, $length - 2); - - $new_font = ''; - for ($i = 0, $c = strlen($font); $i < $c; $i++) { - if ($font[$i] === '\\') { - $i++; - if ($i >= $c) { - $new_font .= '\\'; - break; - } - if (ctype_xdigit($font[$i])) { - $code = $font[$i]; - for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) { - if (!ctype_xdigit($font[$i])) break; - $code .= $font[$i]; - } - // We have to be extremely careful when adding - // new characters, to make sure we're not breaking - // the encoding. - $char = HTMLPurifier_Encoder::unichr(hexdec($code)); - if (HTMLPurifier_Encoder::cleanUTF8($char) === '') continue; - $new_font .= $char; - if ($i < $c && trim($font[$i]) !== '') $i--; - continue; - } - if ($font[$i] === "\n") continue; - } - $new_font .= $font[$i]; - } - - $font = $new_font; - } - // $font is a pure representation of the font name - - if (ctype_alnum($font) && $font !== '') { - // very simple font, allow it in unharmed - $final .= $font . ', '; - continue; - } - - // complicated font, requires quoting - - // armor single quotes and new lines - $font = str_replace("\\", "\\\\", $font); - $font = str_replace("'", "\\'", $font); - $final .= "'$font', "; - } - $final = rtrim($final, ', '); - if ($final === '') return false; - return $final; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php deleted file mode 100644 index a07ec58135c05525b6a66489574ef2463993d161..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/** - * Represents a Length as defined by CSS. - */ -class HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_AttrDef -{ - - protected $min, $max; - - /** - * @param HTMLPurifier_Length $max Minimum length, or null for no bound. String is also acceptable. - * @param HTMLPurifier_Length $max Maximum length, or null for no bound. String is also acceptable. - */ - public function __construct($min = null, $max = null) { - $this->min = $min !== null ? HTMLPurifier_Length::make($min) : null; - $this->max = $max !== null ? HTMLPurifier_Length::make($max) : null; - } - - public function validate($string, $config, $context) { - $string = $this->parseCDATA($string); - - // Optimizations - if ($string === '') return false; - if ($string === '0') return '0'; - if (strlen($string) === 1) return false; - - $length = HTMLPurifier_Length::make($string); - if (!$length->isValid()) return false; - - if ($this->min) { - $c = $length->compareTo($this->min); - if ($c === false) return false; - if ($c < 0) return false; - } - if ($this->max) { - $c = $length->compareTo($this->max); - if ($c === false) return false; - if ($c > 0) return false; - } - - return $length->toString(); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php deleted file mode 100644 index 4406868c08b0b2d1e497ac4c1cd9694ca996a6b5..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -/** - * Validates shorthand CSS property list-style. - * @warning Does not support url tokens that have internal spaces. - */ -class HTMLPurifier_AttrDef_CSS_ListStyle extends HTMLPurifier_AttrDef -{ - - /** - * Local copy of component validators. - * @note See HTMLPurifier_AttrDef_CSS_Font::$info for a similar impl. - */ - protected $info; - - public function __construct($config) { - $def = $config->getCSSDefinition(); - $this->info['list-style-type'] = $def->info['list-style-type']; - $this->info['list-style-position'] = $def->info['list-style-position']; - $this->info['list-style-image'] = $def->info['list-style-image']; - } - - public function validate($string, $config, $context) { - - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') return false; - - // assumes URI doesn't have spaces in it - $bits = explode(' ', strtolower($string)); // bits to process - - $caught = array(); - $caught['type'] = false; - $caught['position'] = false; - $caught['image'] = false; - - $i = 0; // number of catches - $none = false; - - foreach ($bits as $bit) { - if ($i >= 3) return; // optimization bit - if ($bit === '') continue; - foreach ($caught as $key => $status) { - if ($status !== false) continue; - $r = $this->info['list-style-' . $key]->validate($bit, $config, $context); - if ($r === false) continue; - if ($r === 'none') { - if ($none) continue; - else $none = true; - if ($key == 'image') continue; - } - $caught[$key] = $r; - $i++; - break; - } - } - - if (!$i) return false; - - $ret = array(); - - // construct type - if ($caught['type']) $ret[] = $caught['type']; - - // construct image - if ($caught['image']) $ret[] = $caught['image']; - - // construct position - if ($caught['position']) $ret[] = $caught['position']; - - if (empty($ret)) return false; - return implode(' ', $ret); - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php deleted file mode 100644 index c34b8fc3c392b90fa09652d6af38742937948c41..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** - * Validates a Percentage as defined by the CSS spec. - */ -class HTMLPurifier_AttrDef_CSS_Percentage extends HTMLPurifier_AttrDef -{ - - /** - * Instance of HTMLPurifier_AttrDef_CSS_Number to defer number validation - */ - protected $number_def; - - /** - * @param Bool indicating whether to forbid negative values - */ - public function __construct($non_negative = false) { - $this->number_def = new HTMLPurifier_AttrDef_CSS_Number($non_negative); - } - - public function validate($string, $config, $context) { - - $string = $this->parseCDATA($string); - - if ($string === '') return false; - $length = strlen($string); - if ($length === 1) return false; - if ($string[$length - 1] !== '%') return false; - - $number = substr($string, 0, $length - 1); - $number = $this->number_def->validate($number, $config, $context); - - if ($number === false) return false; - return "$number%"; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php deleted file mode 100644 index 435d7930bb0a378dbf4459806ee01ad34aca4c2c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/** - * Validates a URI in CSS syntax, which uses url('http://example.com') - * @note While theoretically speaking a URI in a CSS document could - * be non-embedded, as of CSS2 there is no such usage so we're - * generalizing it. This may need to be changed in the future. - * @warning Since HTMLPurifier_AttrDef_CSS blindly uses semicolons as - * the separator, you cannot put a literal semicolon in - * in the URI. Try percent encoding it, in that case. - */ -class HTMLPurifier_AttrDef_CSS_URI extends HTMLPurifier_AttrDef_URI -{ - - public function __construct() { - parent::__construct(true); // always embedded - } - - public function validate($uri_string, $config, $context) { - // parse the URI out of the string and then pass it onto - // the parent object - - $uri_string = $this->parseCDATA($uri_string); - if (strpos($uri_string, 'url(') !== 0) return false; - $uri_string = substr($uri_string, 4); - $new_length = strlen($uri_string) - 1; - if ($uri_string[$new_length] != ')') return false; - $uri = trim(substr($uri_string, 0, $new_length)); - - if (!empty($uri) && ($uri[0] == "'" || $uri[0] == '"')) { - $quote = $uri[0]; - $new_length = strlen($uri) - 1; - if ($uri[$new_length] !== $quote) return false; - $uri = substr($uri, 1, $new_length - 1); - } - - $keys = array( '(', ')', ',', ' ', '"', "'"); - $values = array('\\(', '\\)', '\\,', '\\ ', '\\"', "\\'"); - $uri = str_replace($values, $keys, $uri); - - $result = parent::validate($uri, $config, $context); - - if ($result === false) return false; - - // escape necessary characters according to CSS spec - // except for the comma, none of these should appear in the - // URI at all - $result = str_replace($keys, $values, $result); - - return "url($result)"; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php deleted file mode 100644 index e06987eb8dbaf10b64b024495ed992fd83e96b35..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/** - * Validates a boolean attribute - */ -class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef -{ - - protected $name; - public $minimized = true; - - public function __construct($name = false) {$this->name = $name;} - - public function validate($string, $config, $context) { - if (empty($string)) return false; - return $this->name; - } - - /** - * @param $string Name of attribute - */ - public function make($string) { - return new HTMLPurifier_AttrDef_HTML_Bool($string); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php deleted file mode 100644 index 5311a3c6139631ba1fd02dea5e306a624419f5e0..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/** - * Validates a color according to the HTML spec. - */ -class HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - - static $colors = null; - if ($colors === null) $colors = $config->get('Core', 'ColorKeywords'); - - $string = trim($string); - - if (empty($string)) return false; - if (isset($colors[$string])) return $colors[$string]; - if ($string[0] === '#') $hex = substr($string, 1); - else $hex = $string; - - $length = strlen($hex); - if ($length !== 3 && $length !== 6) return false; - if (!ctype_xdigit($hex)) return false; - if ($length === 3) $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; - - return "#$hex"; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php deleted file mode 100644 index bd281a89fb57a06627db011a30e1a46cce71704d..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * Special-case enum attribute definition that lazy loads allowed frame targets - */ -class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef_Enum -{ - - public $valid_values = false; // uninitialized value - protected $case_sensitive = false; - - public function __construct() {} - - public function validate($string, $config, $context) { - if ($this->valid_values === false) $this->valid_values = $config->get('Attr', 'AllowedFrameTargets'); - return parent::validate($string, $config, $context); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php deleted file mode 100644 index 7c5c169c25483dfc6dc93aa6760bf7e56e00dce4..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/** - * Validates the HTML attribute ID. - * @warning Even though this is the id processor, it - * will ignore the directive Attr:IDBlacklist, since it will only - * go according to the ID accumulator. Since the accumulator is - * automatically generated, it will have already absorbed the - * blacklist. If you're hacking around, make sure you use load()! - */ - -class HTMLPurifier_AttrDef_HTML_ID extends HTMLPurifier_AttrDef -{ - - // ref functionality disabled, since we also have to verify - // whether or not the ID it refers to exists - - public function validate($id, $config, $context) { - - if (!$config->get('Attr', 'EnableID')) return false; - - $id = trim($id); // trim it first - - if ($id === '') return false; - - $prefix = $config->get('Attr', 'IDPrefix'); - if ($prefix !== '') { - $prefix .= $config->get('Attr', 'IDPrefixLocal'); - // prevent re-appending the prefix - if (strpos($id, $prefix) !== 0) $id = $prefix . $id; - } elseif ($config->get('Attr', 'IDPrefixLocal') !== '') { - trigger_error('%Attr.IDPrefixLocal cannot be used unless '. - '%Attr.IDPrefix is set', E_USER_WARNING); - } - - //if (!$this->ref) { - $id_accumulator =& $context->get('IDAccumulator'); - if (isset($id_accumulator->ids[$id])) return false; - //} - - // we purposely avoid using regex, hopefully this is faster - - if (ctype_alpha($id)) { - $result = true; - } else { - if (!ctype_alpha(@$id[0])) return false; - $trim = trim( // primitive style of regexps, I suppose - $id, - 'A..Za..z0..9:-._' - ); - $result = ($trim === ''); - } - - $regexp = $config->get('Attr', 'IDBlacklistRegexp'); - if ($regexp && preg_match($regexp, $id)) { - return false; - } - - if (/*!$this->ref && */$result) $id_accumulator->add($id); - - // if no change was made to the ID, return the result - // else, return the new id if stripping whitespace made it - // valid, or return false. - return $result ? $id : false; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php deleted file mode 100644 index a242f9c238ea2108e059598eac16f8b6e5bf6eb0..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * Validates the HTML type length (not to be confused with CSS's length). - * - * This accepts integer pixels or percentages as lengths for certain - * HTML attributes. - */ - -class HTMLPurifier_AttrDef_HTML_Length extends HTMLPurifier_AttrDef_HTML_Pixels -{ - - public function validate($string, $config, $context) { - - $string = trim($string); - if ($string === '') return false; - - $parent_result = parent::validate($string, $config, $context); - if ($parent_result !== false) return $parent_result; - - $length = strlen($string); - $last_char = $string[$length - 1]; - - if ($last_char !== '%') return false; - - $points = substr($string, 0, $length - 1); - - if (!is_numeric($points)) return false; - - $points = (int) $points; - - if ($points < 0) return '0%'; - if ($points > 100) return '100%'; - - return ((string) $points) . '%'; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php deleted file mode 100644 index c72fc76e4d99fab93084d1912753c9d07b64b239..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * Validates a MultiLength as defined by the HTML spec. - * - * A multilength is either a integer (pixel count), a percentage, or - * a relative number. - */ -class HTMLPurifier_AttrDef_HTML_MultiLength extends HTMLPurifier_AttrDef_HTML_Length -{ - - public function validate($string, $config, $context) { - - $string = trim($string); - if ($string === '') return false; - - $parent_result = parent::validate($string, $config, $context); - if ($parent_result !== false) return $parent_result; - - $length = strlen($string); - $last_char = $string[$length - 1]; - - if ($last_char !== '*') return false; - - $int = substr($string, 0, $length - 1); - - if ($int == '') return '*'; - if (!is_numeric($int)) return false; - - $int = (int) $int; - - if ($int < 0) return false; - if ($int == 0) return '0'; - if ($int == 1) return '*'; - return ((string) $int) . '*'; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php deleted file mode 100644 index 55035c4d04f57a9e93028c878c9760e763502e76..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/** - * Validates contents based on NMTOKENS attribute type. - * @note The only current use for this is the class attribute in HTML - * @note Could have some functionality factored out into Nmtoken class - * @warning We cannot assume this class will be used only for 'class' - * attributes. Not sure how to hook in magic behavior, then. - */ -class HTMLPurifier_AttrDef_HTML_Nmtokens extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - - $string = trim($string); - - // early abort: '' and '0' (strings that convert to false) are invalid - if (!$string) return false; - - // OPTIMIZABLE! - // do the preg_match, capture all subpatterns for reformulation - - // we don't support U+00A1 and up codepoints or - // escaping because I don't know how to do that with regexps - // and plus it would complicate optimization efforts (you never - // see that anyway). - $matches = array(); - $pattern = '/(?:(?<=\s)|\A)'. // look behind for space or string start - '((?:--|-?[A-Za-z_])[A-Za-z_\-0-9]*)'. - '(?:(?=\s)|\z)/'; // look ahead for space or string end - preg_match_all($pattern, $string, $matches); - - if (empty($matches[1])) return false; - - // reconstruct string - $new_string = ''; - foreach ($matches[1] as $token) { - $new_string .= $token . ' '; - } - $new_string = rtrim($new_string); - - return $new_string; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php deleted file mode 100644 index 4cb2c1b8579b51cd22ccd140e6f6880fc2627faf..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/** - * Validates an integer representation of pixels according to the HTML spec. - */ -class HTMLPurifier_AttrDef_HTML_Pixels extends HTMLPurifier_AttrDef -{ - - protected $max; - - public function __construct($max = null) { - $this->max = $max; - } - - public function validate($string, $config, $context) { - - $string = trim($string); - if ($string === '0') return $string; - if ($string === '') return false; - $length = strlen($string); - if (substr($string, $length - 2) == 'px') { - $string = substr($string, 0, $length - 2); - } - if (!is_numeric($string)) return false; - $int = (int) $string; - - if ($int < 0) return '0'; - - // upper-bound value, extremely high values can - // crash operating systems, see <http://ha.ckers.org/imagecrash.html> - // WARNING, above link WILL crash you if you're using Windows - - if ($this->max !== null && $int > $this->max) return (string) $this->max; - - return (string) $int; - - } - - public function make($string) { - if ($string === '') $max = null; - else $max = (int) $string; - $class = get_class($this); - return new $class($max); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php deleted file mode 100644 index c6216cc531d4b351799ea7b9764d88f578c9c26a..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -/** - * Validates arbitrary text according to the HTML spec. - */ -class HTMLPurifier_AttrDef_Text extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - return $this->parseCDATA($string); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php deleted file mode 100644 index 2156c10c660e502bbfa8530a3425b9017aadedbd..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/** - * Validates a host according to the IPv4, IPv6 and DNS (future) specifications. - */ -class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef -{ - - /** - * Instance of HTMLPurifier_AttrDef_URI_IPv4 sub-validator - */ - protected $ipv4; - - /** - * Instance of HTMLPurifier_AttrDef_URI_IPv6 sub-validator - */ - protected $ipv6; - - public function __construct() { - $this->ipv4 = new HTMLPurifier_AttrDef_URI_IPv4(); - $this->ipv6 = new HTMLPurifier_AttrDef_URI_IPv6(); - } - - public function validate($string, $config, $context) { - $length = strlen($string); - if ($string === '') return ''; - if ($length > 1 && $string[0] === '[' && $string[$length-1] === ']') { - //IPv6 - $ip = substr($string, 1, $length - 2); - $valid = $this->ipv6->validate($ip, $config, $context); - if ($valid === false) return false; - return '['. $valid . ']'; - } - - // need to do checks on unusual encodings too - $ipv4 = $this->ipv4->validate($string, $config, $context); - if ($ipv4 !== false) return $ipv4; - - // A regular domain name. - - // This breaks I18N domain names, but we don't have proper IRI support, - // so force users to insert Punycode. If there's complaining we'll - // try to fix things into an international friendly form. - - // The productions describing this are: - $a = '[a-z]'; // alpha - $an = '[a-z0-9]'; // alphanum - $and = '[a-z0-9-]'; // alphanum | "-" - // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum - $domainlabel = "$an($and*$an)?"; - // toplabel = alpha | alpha *( alphanum | "-" ) alphanum - $toplabel = "$a($and*$an)?"; - // hostname = *( domainlabel "." ) toplabel [ "." ] - $match = preg_match("/^($domainlabel\.)*$toplabel\.?$/i", $string); - if (!$match) return false; - - return $string; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php deleted file mode 100644 index ec4cf591b82b7d4bcd054d8556707a83a410568e..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * Validates an IPv4 address - * @author Feyd @ forums.devnetwork.net (public domain) - */ -class HTMLPurifier_AttrDef_URI_IPv4 extends HTMLPurifier_AttrDef -{ - - /** - * IPv4 regex, protected so that IPv6 can reuse it - */ - protected $ip4; - - public function validate($aIP, $config, $context) { - - if (!$this->ip4) $this->_loadRegex(); - - if (preg_match('#^' . $this->ip4 . '$#s', $aIP)) - { - return $aIP; - } - - return false; - - } - - /** - * Lazy load function to prevent regex from being stuffed in - * cache. - */ - protected function _loadRegex() { - $oct = '(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])'; // 0-255 - $this->ip4 = "(?:{$oct}\\.{$oct}\\.{$oct}\\.{$oct})"; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php deleted file mode 100644 index 9454e9be50eb96970d1eed77a61fd4976ff60911..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -/** - * Validates an IPv6 address. - * @author Feyd @ forums.devnetwork.net (public domain) - * @note This function requires brackets to have been removed from address - * in URI. - */ -class HTMLPurifier_AttrDef_URI_IPv6 extends HTMLPurifier_AttrDef_URI_IPv4 -{ - - public function validate($aIP, $config, $context) { - - if (!$this->ip4) $this->_loadRegex(); - - $original = $aIP; - - $hex = '[0-9a-fA-F]'; - $blk = '(?:' . $hex . '{1,4})'; - $pre = '(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))'; // /0 - /128 - - // prefix check - if (strpos($aIP, '/') !== false) - { - if (preg_match('#' . $pre . '$#s', $aIP, $find)) - { - $aIP = substr($aIP, 0, 0-strlen($find[0])); - unset($find); - } - else - { - return false; - } - } - - // IPv4-compatiblity check - if (preg_match('#(?<=:'.')' . $this->ip4 . '$#s', $aIP, $find)) - { - $aIP = substr($aIP, 0, 0-strlen($find[0])); - $ip = explode('.', $find[0]); - $ip = array_map('dechex', $ip); - $aIP .= $ip[0] . $ip[1] . ':' . $ip[2] . $ip[3]; - unset($find, $ip); - } - - // compression check - $aIP = explode('::', $aIP); - $c = count($aIP); - if ($c > 2) - { - return false; - } - elseif ($c == 2) - { - list($first, $second) = $aIP; - $first = explode(':', $first); - $second = explode(':', $second); - - if (count($first) + count($second) > 8) - { - return false; - } - - while(count($first) < 8) - { - array_push($first, '0'); - } - - array_splice($first, 8 - count($second), 8, $second); - $aIP = $first; - unset($first,$second); - } - else - { - $aIP = explode(':', $aIP[0]); - } - $c = count($aIP); - - if ($c != 8) - { - return false; - } - - // All the pieces should be 16-bit hex strings. Are they? - foreach ($aIP as $piece) - { - if (!preg_match('#^[0-9a-fA-F]{4}$#s', sprintf('%04s', $piece))) - { - return false; - } - } - - return $original; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php deleted file mode 100644 index 40310b9144efc6f31462bd3f04e8b1db8737f175..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -// this MUST be placed in post, as it assumes that any value in dir is valid - -/** - * Post-trasnform that ensures that bdo tags have the dir attribute set. - */ -class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform -{ - - public function transform($attr, $config, $context) { - if (isset($attr['dir'])) return $attr; - $attr['dir'] = $config->get('Attr', 'DefaultTextDir'); - return $attr; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php deleted file mode 100644 index 51159b67157de07846eb9f0b9af3486817ab5d69..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/** - * Pre-transform that changes converts a boolean attribute to fixed CSS - */ -class HTMLPurifier_AttrTransform_BoolToCSS extends HTMLPurifier_AttrTransform { - - /** - * Name of boolean attribute that is trigger - */ - protected $attr; - - /** - * CSS declarations to add to style, needs trailing semicolon - */ - protected $css; - - /** - * @param $attr string attribute name to convert from - * @param $css string CSS declarations to add to style (needs semicolon) - */ - public function __construct($attr, $css) { - $this->attr = $attr; - $this->css = $css; - } - - public function transform($attr, $config, $context) { - if (!isset($attr[$this->attr])) return $attr; - unset($attr[$this->attr]); - $this->prependCSS($attr, $this->css); - return $attr; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php deleted file mode 100644 index 2a5b4514ab430df6d01a7e1b0bcbb3e26ac9baa5..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * Generic pre-transform that converts an attribute with a fixed number of - * values (enumerated) to CSS. - */ -class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTransform { - - /** - * Name of attribute to transform from - */ - protected $attr; - - /** - * Lookup array of attribute values to CSS - */ - protected $enumToCSS = array(); - - /** - * Case sensitivity of the matching - * @warning Currently can only be guaranteed to work with ASCII - * values. - */ - protected $caseSensitive = false; - - /** - * @param $attr String attribute name to transform from - * @param $enumToCSS Lookup array of attribute values to CSS - * @param $case_sensitive Boolean case sensitivity indicator, default false - */ - public function __construct($attr, $enum_to_css, $case_sensitive = false) { - $this->attr = $attr; - $this->enumToCSS = $enum_to_css; - $this->caseSensitive = (bool) $case_sensitive; - } - - public function transform($attr, $config, $context) { - - if (!isset($attr[$this->attr])) return $attr; - - $value = trim($attr[$this->attr]); - unset($attr[$this->attr]); - - if (!$this->caseSensitive) $value = strtolower($value); - - if (!isset($this->enumToCSS[$value])) { - return $attr; - } - - $this->prependCSS($attr, $this->enumToCSS[$value]); - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php deleted file mode 100644 index ea2f30473d6d14a7e77cff3a16f0fcd80712e3b5..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/** - * Class for handling width/height length attribute transformations to CSS - */ -class HTMLPurifier_AttrTransform_Length extends HTMLPurifier_AttrTransform -{ - - protected $name; - protected $cssName; - - public function __construct($name, $css_name = null) { - $this->name = $name; - $this->cssName = $css_name ? $css_name : $name; - } - - public function transform($attr, $config, $context) { - if (!isset($attr[$this->name])) return $attr; - $length = $this->confiscateAttr($attr, $this->name); - if(ctype_digit($length)) $length .= 'px'; - $this->prependCSS($attr, $this->cssName . ":$length;"); - return $attr; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php deleted file mode 100644 index e6f93aee3bd41526588b611c527224254c708737..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * Pre-transform that changes deprecated name attribute to ID if necessary - */ -class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform -{ - - public function transform($attr, $config, $context) { - if (!isset($attr['name'])) return $attr; - $id = $this->confiscateAttr($attr, 'name'); - if ( isset($attr['id'])) return $attr; - $attr['id'] = $id; - return $attr; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php deleted file mode 100644 index 1ed74898bae41dbe0102ff8065a355fd016227a7..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * Writes default type for all objects. Currently only supports flash. - */ -class HTMLPurifier_AttrTransform_SafeObject extends HTMLPurifier_AttrTransform -{ - public $name = "SafeObject"; - - function transform($attr, $config, $context) { - if (!isset($attr['type'])) $attr['type'] = 'application/x-shockwave-flash'; - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php b/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php deleted file mode 100644 index 81ac3488ba87520621ec1a42131a9cc0131f2027..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * Sets height/width defaults for <textarea> - */ -class HTMLPurifier_AttrTransform_Textarea extends HTMLPurifier_AttrTransform -{ - - public function transform($attr, $config, $context) { - // Calculated from Firefox - if (!isset($attr['cols'])) $attr['cols'] = '22'; - if (!isset($attr['rows'])) $attr['rows'] = '3'; - return $attr; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Bootstrap.php b/libraries/htmlpurifier/library/HTMLPurifier/Bootstrap.php deleted file mode 100644 index 559f61a232024524fbf2b193f081cc93c245b434..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Bootstrap.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php - -// constants are slow, so we use as few as possible -if (!defined('HTMLPURIFIER_PREFIX')) { - define('HTMLPURIFIER_PREFIX', realpath(dirname(__FILE__) . '/..')); -} - -// accomodations for versions earlier than 5.0.2 -// borrowed from PHP_Compat, LGPL licensed, by Aidan Lister <aidan@php.net> -if (!defined('PHP_EOL')) { - switch (strtoupper(substr(PHP_OS, 0, 3))) { - case 'WIN': - define('PHP_EOL', "\r\n"); - break; - case 'DAR': - define('PHP_EOL', "\r"); - break; - default: - define('PHP_EOL', "\n"); - } -} - -/** - * Bootstrap class that contains meta-functionality for HTML Purifier such as - * the autoload function. - * - * @note - * This class may be used without any other files from HTML Purifier. - */ -class HTMLPurifier_Bootstrap -{ - - /** - * Autoload function for HTML Purifier - * @param $class Class to load - */ - public static function autoload($class) { - $file = HTMLPurifier_Bootstrap::getPath($class); - if (!$file) return false; - require HTMLPURIFIER_PREFIX . '/' . $file; - return true; - } - - /** - * Returns the path for a specific class. - */ - public static function getPath($class) { - if (strncmp('HTMLPurifier', $class, 12) !== 0) return false; - // Custom implementations - if (strncmp('HTMLPurifier_Language_', $class, 22) === 0) { - $code = str_replace('_', '-', substr($class, 22)); - $file = 'HTMLPurifier/Language/classes/' . $code . '.php'; - } else { - $file = str_replace('_', '/', $class) . '.php'; - } - if (!file_exists(HTMLPURIFIER_PREFIX . '/' . $file)) return false; - return $file; - } - - /** - * "Pre-registers" our autoloader on the SPL stack. - */ - public static function registerAutoload() { - $autoload = array('HTMLPurifier_Bootstrap', 'autoload'); - if ( ($funcs = spl_autoload_functions()) === false ) { - spl_autoload_register($autoload); - } elseif (function_exists('spl_autoload_unregister')) { - $compat = version_compare(PHP_VERSION, '5.1.2', '<=') && - version_compare(PHP_VERSION, '5.1.0', '>='); - foreach ($funcs as $func) { - if (is_array($func)) { - // :TRICKY: There are some compatibility issues and some - // places where we need to error out - $reflector = new ReflectionMethod($func[0], $func[1]); - if (!$reflector->isStatic()) { - throw new Exception(' - HTML Purifier autoloader registrar is not compatible - with non-static object methods due to PHP Bug #44144; - Please do not use HTMLPurifier.autoload.php (or any - file that includes this file); instead, place the code: - spl_autoload_register(array(\'HTMLPurifier_Bootstrap\', \'autoload\')) - after your own autoloaders. - '); - } - // Suprisingly, spl_autoload_register supports the - // Class::staticMethod callback format, although call_user_func doesn't - if ($compat) $func = implode('::', $func); - } - spl_autoload_unregister($func); - } - spl_autoload_register($autoload); - foreach ($funcs as $func) spl_autoload_register($func); - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/CSSDefinition.php b/libraries/htmlpurifier/library/HTMLPurifier/CSSDefinition.php deleted file mode 100644 index 1a1805733864381d11e99e52463a03eef1dca084..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/CSSDefinition.php +++ /dev/null @@ -1,292 +0,0 @@ -<?php - -/** - * Defines allowed CSS attributes and what their values are. - * @see HTMLPurifier_HTMLDefinition - */ -class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition -{ - - public $type = 'CSS'; - - /** - * Assoc array of attribute name to definition object. - */ - public $info = array(); - - /** - * Constructs the info array. The meat of this class. - */ - protected function doSetup($config) { - - $this->info['text-align'] = new HTMLPurifier_AttrDef_Enum( - array('left', 'right', 'center', 'justify'), false); - - $border_style = - $this->info['border-bottom-style'] = - $this->info['border-right-style'] = - $this->info['border-left-style'] = - $this->info['border-top-style'] = new HTMLPurifier_AttrDef_Enum( - array('none', 'hidden', 'dotted', 'dashed', 'solid', 'double', - 'groove', 'ridge', 'inset', 'outset'), false); - - $this->info['border-style'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_style); - - $this->info['clear'] = new HTMLPurifier_AttrDef_Enum( - array('none', 'left', 'right', 'both'), false); - $this->info['float'] = new HTMLPurifier_AttrDef_Enum( - array('none', 'left', 'right'), false); - $this->info['font-style'] = new HTMLPurifier_AttrDef_Enum( - array('normal', 'italic', 'oblique'), false); - $this->info['font-variant'] = new HTMLPurifier_AttrDef_Enum( - array('normal', 'small-caps'), false); - - $uri_or_none = new HTMLPurifier_AttrDef_CSS_Composite( - array( - new HTMLPurifier_AttrDef_Enum(array('none')), - new HTMLPurifier_AttrDef_CSS_URI() - ) - ); - - $this->info['list-style-position'] = new HTMLPurifier_AttrDef_Enum( - array('inside', 'outside'), false); - $this->info['list-style-type'] = new HTMLPurifier_AttrDef_Enum( - array('disc', 'circle', 'square', 'decimal', 'lower-roman', - 'upper-roman', 'lower-alpha', 'upper-alpha', 'none'), false); - $this->info['list-style-image'] = $uri_or_none; - - $this->info['list-style'] = new HTMLPurifier_AttrDef_CSS_ListStyle($config); - - $this->info['text-transform'] = new HTMLPurifier_AttrDef_Enum( - array('capitalize', 'uppercase', 'lowercase', 'none'), false); - $this->info['color'] = new HTMLPurifier_AttrDef_CSS_Color(); - - $this->info['background-image'] = $uri_or_none; - $this->info['background-repeat'] = new HTMLPurifier_AttrDef_Enum( - array('repeat', 'repeat-x', 'repeat-y', 'no-repeat') - ); - $this->info['background-attachment'] = new HTMLPurifier_AttrDef_Enum( - array('scroll', 'fixed') - ); - $this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition(); - - $border_color = - $this->info['border-top-color'] = - $this->info['border-bottom-color'] = - $this->info['border-left-color'] = - $this->info['border-right-color'] = - $this->info['background-color'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('transparent')), - new HTMLPurifier_AttrDef_CSS_Color() - )); - - $this->info['background'] = new HTMLPurifier_AttrDef_CSS_Background($config); - - $this->info['border-color'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_color); - - $border_width = - $this->info['border-top-width'] = - $this->info['border-bottom-width'] = - $this->info['border-left-width'] = - $this->info['border-right-width'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('thin', 'medium', 'thick')), - new HTMLPurifier_AttrDef_CSS_Length('0') //disallow negative - )); - - $this->info['border-width'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_width); - - $this->info['letter-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('normal')), - new HTMLPurifier_AttrDef_CSS_Length() - )); - - $this->info['word-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('normal')), - new HTMLPurifier_AttrDef_CSS_Length() - )); - - $this->info['font-size'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('xx-small', 'x-small', - 'small', 'medium', 'large', 'x-large', 'xx-large', - 'larger', 'smaller')), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_CSS_Length() - )); - - $this->info['line-height'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('normal')), - new HTMLPurifier_AttrDef_CSS_Number(true), // no negatives - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true) - )); - - $margin = - $this->info['margin-top'] = - $this->info['margin-bottom'] = - $this->info['margin-left'] = - $this->info['margin-right'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_Enum(array('auto')) - )); - - $this->info['margin'] = new HTMLPurifier_AttrDef_CSS_Multiple($margin); - - // non-negative - $padding = - $this->info['padding-top'] = - $this->info['padding-bottom'] = - $this->info['padding-left'] = - $this->info['padding-right'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true) - )); - - $this->info['padding'] = new HTMLPurifier_AttrDef_CSS_Multiple($padding); - - $this->info['text-indent'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage() - )); - - $trusted_wh = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true), - new HTMLPurifier_AttrDef_Enum(array('auto')) - )); - $max = $config->get('CSS', 'MaxImgLength'); - - $this->info['width'] = - $this->info['height'] = - $max === null ? - $trusted_wh : - new HTMLPurifier_AttrDef_Switch('img', - // For img tags: - new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_CSS_Length('0', $max), - new HTMLPurifier_AttrDef_Enum(array('auto')) - )), - // For everyone else: - $trusted_wh - ); - - $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration(); - - $this->info['font-family'] = new HTMLPurifier_AttrDef_CSS_FontFamily(); - - // this could use specialized code - $this->info['font-weight'] = new HTMLPurifier_AttrDef_Enum( - array('normal', 'bold', 'bolder', 'lighter', '100', '200', '300', - '400', '500', '600', '700', '800', '900'), false); - - // MUST be called after other font properties, as it references - // a CSSDefinition object - $this->info['font'] = new HTMLPurifier_AttrDef_CSS_Font($config); - - // same here - $this->info['border'] = - $this->info['border-bottom'] = - $this->info['border-top'] = - $this->info['border-left'] = - $this->info['border-right'] = new HTMLPurifier_AttrDef_CSS_Border($config); - - $this->info['border-collapse'] = new HTMLPurifier_AttrDef_Enum(array( - 'collapse', 'separate')); - - $this->info['caption-side'] = new HTMLPurifier_AttrDef_Enum(array( - 'top', 'bottom')); - - $this->info['table-layout'] = new HTMLPurifier_AttrDef_Enum(array( - 'auto', 'fixed')); - - $this->info['vertical-align'] = new HTMLPurifier_AttrDef_CSS_Composite(array( - new HTMLPurifier_AttrDef_Enum(array('baseline', 'sub', 'super', - 'top', 'text-top', 'middle', 'bottom', 'text-bottom')), - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage() - )); - - $this->info['border-spacing'] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2); - - // partial support - $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum(array('nowrap')); - - if ($config->get('CSS', 'Proprietary')) { - $this->doSetupProprietary($config); - } - - if ($config->get('CSS', 'AllowTricky')) { - $this->doSetupTricky($config); - } - - $allow_important = $config->get('CSS', 'AllowImportant'); - // wrap all attr-defs with decorator that handles !important - foreach ($this->info as $k => $v) { - $this->info[$k] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important); - } - - $this->setupConfigStuff($config); - } - - protected function doSetupProprietary($config) { - // Internet Explorer only scrollbar colors - $this->info['scrollbar-arrow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-base-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-darkshadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-face-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - - // technically not proprietary, but CSS3, and no one supports it - $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - - // only opacity, for now - $this->info['filter'] = new HTMLPurifier_AttrDef_CSS_Filter(); - - } - - protected function doSetupTricky($config) { - $this->info['display'] = new HTMLPurifier_AttrDef_Enum(array( - 'inline', 'block', 'list-item', 'run-in', 'compact', - 'marker', 'table', 'inline-table', 'table-row-group', - 'table-header-group', 'table-footer-group', 'table-row', - 'table-column-group', 'table-column', 'table-cell', 'table-caption', 'none' - )); - $this->info['visibility'] = new HTMLPurifier_AttrDef_Enum(array( - 'visible', 'hidden', 'collapse' - )); - $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll')); - } - - - /** - * Performs extra config-based processing. Based off of - * HTMLPurifier_HTMLDefinition. - * @todo Refactor duplicate elements into common class (probably using - * composition, not inheritance). - */ - protected function setupConfigStuff($config) { - - // setup allowed elements - $support = "(for information on implementing this, see the ". - "support forums) "; - $allowed_attributes = $config->get('CSS', 'AllowedProperties'); - if ($allowed_attributes !== null) { - foreach ($this->info as $name => $d) { - if(!isset($allowed_attributes[$name])) unset($this->info[$name]); - unset($allowed_attributes[$name]); - } - // emit errors - foreach ($allowed_attributes as $name => $d) { - // :TODO: Is this htmlspecialchars() call really necessary? - $name = htmlspecialchars($name); - trigger_error("Style attribute '$name' is not supported $support", E_USER_WARNING); - } - } - - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php b/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php deleted file mode 100644 index 32bcb9898eac9ea6fff386e1617ad332b5c19971..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/** - * Definition that allows a set of elements, and allows no children. - * @note This is a hack to reuse code from HTMLPurifier_ChildDef_Required, - * really, one shouldn't inherit from the other. Only altered behavior - * is to overload a returned false with an array. Thus, it will never - * return false. - */ -class HTMLPurifier_ChildDef_Optional extends HTMLPurifier_ChildDef_Required -{ - public $allow_empty = true; - public $type = 'optional'; - public function validateChildren($tokens_of_children, $config, $context) { - $result = parent::validateChildren($tokens_of_children, $config, $context); - // we assume that $tokens_of_children is not modified - if ($result === false) { - if (empty($tokens_of_children)) return true; - elseif ($this->whitespace) return $tokens_of_children; - else return array(); - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php b/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php deleted file mode 100644 index c3e748b2601038486b2383dd4e9803a0239cdffe..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php - -/** - * Definition that allows a set of elements, but disallows empty children. - */ -class HTMLPurifier_ChildDef_Required extends HTMLPurifier_ChildDef -{ - /** - * Lookup table of allowed elements. - * @public - */ - public $elements = array(); - /** - * Whether or not the last passed node was all whitespace. - */ - protected $whitespace = false; - /** - * @param $elements List of allowed element names (lowercase). - */ - public function __construct($elements) { - if (is_string($elements)) { - $elements = str_replace(' ', '', $elements); - $elements = explode('|', $elements); - } - $keys = array_keys($elements); - if ($keys == array_keys($keys)) { - $elements = array_flip($elements); - foreach ($elements as $i => $x) { - $elements[$i] = true; - if (empty($i)) unset($elements[$i]); // remove blank - } - } - $this->elements = $elements; - } - public $allow_empty = false; - public $type = 'required'; - public function validateChildren($tokens_of_children, $config, $context) { - // Flag for subclasses - $this->whitespace = false; - - // if there are no tokens, delete parent node - if (empty($tokens_of_children)) return false; - - // the new set of children - $result = array(); - - // current depth into the nest - $nesting = 0; - - // whether or not we're deleting a node - $is_deleting = false; - - // whether or not parsed character data is allowed - // this controls whether or not we silently drop a tag - // or generate escaped HTML from it - $pcdata_allowed = isset($this->elements['#PCDATA']); - - // a little sanity check to make sure it's not ALL whitespace - $all_whitespace = true; - - // some configuration - $escape_invalid_children = $config->get('Core', 'EscapeInvalidChildren'); - - // generator - $gen = new HTMLPurifier_Generator($config, $context); - - foreach ($tokens_of_children as $token) { - if (!empty($token->is_whitespace)) { - $result[] = $token; - continue; - } - $all_whitespace = false; // phew, we're not talking about whitespace - - $is_child = ($nesting == 0); - - if ($token instanceof HTMLPurifier_Token_Start) { - $nesting++; - } elseif ($token instanceof HTMLPurifier_Token_End) { - $nesting--; - } - - if ($is_child) { - $is_deleting = false; - if (!isset($this->elements[$token->name])) { - $is_deleting = true; - if ($pcdata_allowed && $token instanceof HTMLPurifier_Token_Text) { - $result[] = $token; - } elseif ($pcdata_allowed && $escape_invalid_children) { - $result[] = new HTMLPurifier_Token_Text( - $gen->generateFromToken($token) - ); - } - continue; - } - } - if (!$is_deleting || ($pcdata_allowed && $token instanceof HTMLPurifier_Token_Text)) { - $result[] = $token; - } elseif ($pcdata_allowed && $escape_invalid_children) { - $result[] = - new HTMLPurifier_Token_Text( - $gen->generateFromToken($token) - ); - } else { - // drop silently - } - } - if (empty($result)) return false; - if ($all_whitespace) { - $this->whitespace = true; - return false; - } - if ($tokens_of_children == $result) return true; - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php b/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php deleted file mode 100644 index dfae8a6e5e1d28f81b7484bcf81d941e4bf6dfab..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/** - * Takes the contents of blockquote when in strict and reformats for validation. - */ -class HTMLPurifier_ChildDef_StrictBlockquote extends HTMLPurifier_ChildDef_Required -{ - protected $real_elements; - protected $fake_elements; - public $allow_empty = true; - public $type = 'strictblockquote'; - protected $init = false; - - /** - * @note We don't want MakeWellFormed to auto-close inline elements since - * they might be allowed. - */ - public function getAllowedElements($config) { - $this->init($config); - return $this->fake_elements; - } - - public function validateChildren($tokens_of_children, $config, $context) { - - $this->init($config); - - // trick the parent class into thinking it allows more - $this->elements = $this->fake_elements; - $result = parent::validateChildren($tokens_of_children, $config, $context); - $this->elements = $this->real_elements; - - if ($result === false) return array(); - if ($result === true) $result = $tokens_of_children; - - $def = $config->getHTMLDefinition(); - $block_wrap_start = new HTMLPurifier_Token_Start($def->info_block_wrapper); - $block_wrap_end = new HTMLPurifier_Token_End( $def->info_block_wrapper); - $is_inline = false; - $depth = 0; - $ret = array(); - - // assuming that there are no comment tokens - foreach ($result as $i => $token) { - $token = $result[$i]; - // ifs are nested for readability - if (!$is_inline) { - if (!$depth) { - if ( - ($token instanceof HTMLPurifier_Token_Text && !$token->is_whitespace) || - (!$token instanceof HTMLPurifier_Token_Text && !isset($this->elements[$token->name])) - ) { - $is_inline = true; - $ret[] = $block_wrap_start; - } - } - } else { - if (!$depth) { - // starting tokens have been inline text / empty - if ($token instanceof HTMLPurifier_Token_Start || $token instanceof HTMLPurifier_Token_Empty) { - if (isset($this->elements[$token->name])) { - // ended - $ret[] = $block_wrap_end; - $is_inline = false; - } - } - } - } - $ret[] = $token; - if ($token instanceof HTMLPurifier_Token_Start) $depth++; - if ($token instanceof HTMLPurifier_Token_End) $depth--; - } - if ($is_inline) $ret[] = $block_wrap_end; - return $ret; - } - - private function init($config) { - if (!$this->init) { - $def = $config->getHTMLDefinition(); - // allow all inline elements - $this->real_elements = $this->elements; - $this->fake_elements = $def->info_content_sets['Flow']; - $this->fake_elements['#PCDATA'] = true; - $this->init = true; - } - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php b/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php deleted file mode 100644 index 34f0227dd2cc549f4dacef4efd9d6ae8b43680d9..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -/** - * Definition for tables - */ -class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef -{ - public $allow_empty = false; - public $type = 'table'; - public $elements = array('tr' => true, 'tbody' => true, 'thead' => true, - 'tfoot' => true, 'caption' => true, 'colgroup' => true, 'col' => true); - public function __construct() {} - public function validateChildren($tokens_of_children, $config, $context) { - if (empty($tokens_of_children)) return false; - - // this ensures that the loop gets run one last time before closing - // up. It's a little bit of a hack, but it works! Just make sure you - // get rid of the token later. - $tokens_of_children[] = false; - - // only one of these elements is allowed in a table - $caption = false; - $thead = false; - $tfoot = false; - - // as many of these as you want - $cols = array(); - $content = array(); - - $nesting = 0; // current depth so we can determine nodes - $is_collecting = false; // are we globbing together tokens to package - // into one of the collectors? - $collection = array(); // collected nodes - $tag_index = 0; // the first node might be whitespace, - // so this tells us where the start tag is - - foreach ($tokens_of_children as $token) { - $is_child = ($nesting == 0); - - if ($token === false) { - // terminating sequence started - } elseif ($token instanceof HTMLPurifier_Token_Start) { - $nesting++; - } elseif ($token instanceof HTMLPurifier_Token_End) { - $nesting--; - } - - // handle node collection - if ($is_collecting) { - if ($is_child) { - // okay, let's stash the tokens away - // first token tells us the type of the collection - switch ($collection[$tag_index]->name) { - case 'tr': - case 'tbody': - $content[] = $collection; - break; - case 'caption': - if ($caption !== false) break; - $caption = $collection; - break; - case 'thead': - case 'tfoot': - // access the appropriate variable, $thead or $tfoot - $var = $collection[$tag_index]->name; - if ($$var === false) { - $$var = $collection; - } else { - // transmutate the first and less entries into - // tbody tags, and then put into content - $collection[$tag_index]->name = 'tbody'; - $collection[count($collection)-1]->name = 'tbody'; - $content[] = $collection; - } - break; - case 'colgroup': - $cols[] = $collection; - break; - } - $collection = array(); - $is_collecting = false; - $tag_index = 0; - } else { - // add the node to the collection - $collection[] = $token; - } - } - - // terminate - if ($token === false) break; - - if ($is_child) { - // determine what we're dealing with - if ($token->name == 'col') { - // the only empty tag in the possie, we can handle it - // immediately - $cols[] = array_merge($collection, array($token)); - $collection = array(); - $tag_index = 0; - continue; - } - switch($token->name) { - case 'caption': - case 'colgroup': - case 'thead': - case 'tfoot': - case 'tbody': - case 'tr': - $is_collecting = true; - $collection[] = $token; - continue; - default: - if (!empty($token->is_whitespace)) { - $collection[] = $token; - $tag_index++; - } - continue; - } - } - } - - if (empty($content)) return false; - - $ret = array(); - if ($caption !== false) $ret = array_merge($ret, $caption); - if ($cols !== false) foreach ($cols as $token_array) $ret = array_merge($ret, $token_array); - if ($thead !== false) $ret = array_merge($ret, $thead); - if ($tfoot !== false) $ret = array_merge($ret, $tfoot); - foreach ($content as $token_array) $ret = array_merge($ret, $token_array); - if (!empty($collection) && $is_collecting == false){ - // grab the trailing space - $ret = array_merge($ret, $collection); - } - - array_pop($tokens_of_children); // remove phantom token - - return ($ret === $tokens_of_children) ? true : $ret; - - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Config.php b/libraries/htmlpurifier/library/HTMLPurifier/Config.php deleted file mode 100644 index f8e1f7804ea688b9976cc3776ca97a361c3ee596..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Config.php +++ /dev/null @@ -1,497 +0,0 @@ -<?php - -/** - * Configuration object that triggers customizable behavior. - * - * @warning This class is strongly defined: that means that the class - * will fail if an undefined directive is retrieved or set. - * - * @note Many classes that could (although many times don't) use the - * configuration object make it a mandatory parameter. This is - * because a configuration object should always be forwarded, - * otherwise, you run the risk of missing a parameter and then - * being stumped when a configuration directive doesn't work. - * - * @todo Reconsider some of the public member variables - */ -class HTMLPurifier_Config -{ - - /** - * HTML Purifier's version - */ - public $version = '3.3.0'; - - /** - * Bool indicator whether or not to automatically finalize - * the object if a read operation is done - */ - public $autoFinalize = true; - - // protected member variables - - /** - * Namespace indexed array of serials for specific namespaces (see - * getSerial() for more info). - */ - protected $serials = array(); - - /** - * Serial for entire configuration object - */ - protected $serial; - - /** - * Parser for variables - */ - protected $parser; - - /** - * Reference HTMLPurifier_ConfigSchema for value checking - * @note This is public for introspective purposes. Please don't - * abuse! - */ - public $def; - - /** - * Indexed array of definitions - */ - protected $definitions; - - /** - * Bool indicator whether or not config is finalized - */ - protected $finalized = false; - - /** - * Property list containing configuration directives. - */ - protected $plist; - - /** - * @param $definition HTMLPurifier_ConfigSchema that defines what directives - * are allowed. - */ - public function __construct($definition) { - $this->plist = new HTMLPurifier_PropertyList($definition->defaultPlist); - $this->def = $definition; // keep a copy around for checking - $this->parser = new HTMLPurifier_VarParser_Flexible(); - } - - /** - * Convenience constructor that creates a config object based on a mixed var - * @param mixed $config Variable that defines the state of the config - * object. Can be: a HTMLPurifier_Config() object, - * an array of directives based on loadArray(), - * or a string filename of an ini file. - * @param HTMLPurifier_ConfigSchema Schema object - * @return Configured HTMLPurifier_Config object - */ - public static function create($config, $schema = null) { - if ($config instanceof HTMLPurifier_Config) { - // pass-through - return $config; - } - if (!$schema) { - $ret = HTMLPurifier_Config::createDefault(); - } else { - $ret = new HTMLPurifier_Config($schema); - } - if (is_string($config)) $ret->loadIni($config); - elseif (is_array($config)) $ret->loadArray($config); - return $ret; - } - - /** - * Convenience constructor that creates a default configuration object. - * @return Default HTMLPurifier_Config object. - */ - public static function createDefault() { - $definition = HTMLPurifier_ConfigSchema::instance(); - $config = new HTMLPurifier_Config($definition); - return $config; - } - - /** - * Retreives a value from the configuration. - * @param $namespace String namespace - * @param $key String key - */ - public function get($namespace, $key) { - if (!$this->finalized) $this->autoFinalize ? $this->finalize() : $this->plist->squash(true); - if (!isset($this->def->info[$namespace][$key])) { - // can't add % due to SimpleTest bug - trigger_error('Cannot retrieve value of undefined directive ' . htmlspecialchars("$namespace.$key"), - E_USER_WARNING); - return; - } - if (isset($this->def->info[$namespace][$key]->isAlias)) { - $d = $this->def->info[$namespace][$key]; - trigger_error('Cannot get value from aliased directive, use real name ' . $d->namespace . '.' . $d->name, - E_USER_ERROR); - return; - } - return $this->plist->get("$namespace.$key"); - } - - /** - * Retreives an array of directives to values from a given namespace - * @param $namespace String namespace - */ - public function getBatch($namespace) { - if (!$this->finalized) $this->autoFinalize ? $this->finalize() : $this->plist->squash(true); - if (!isset($this->def->info[$namespace])) { - trigger_error('Cannot retrieve undefined namespace ' . htmlspecialchars($namespace), - E_USER_WARNING); - return; - } - $full = $this->getAll(); - return $full[$namespace]; - } - - /** - * Returns a md5 signature of a segment of the configuration object - * that uniquely identifies that particular configuration - * @note Revision is handled specially and is removed from the batch - * before processing! - * @param $namespace Namespace to get serial for - */ - public function getBatchSerial($namespace) { - if (empty($this->serials[$namespace])) { - $batch = $this->getBatch($namespace); - unset($batch['DefinitionRev']); - $this->serials[$namespace] = md5(serialize($batch)); - } - return $this->serials[$namespace]; - } - - /** - * Returns a md5 signature for the entire configuration object - * that uniquely identifies that particular configuration - */ - public function getSerial() { - if (empty($this->serial)) { - $this->serial = md5(serialize($this->getAll())); - } - return $this->serial; - } - - /** - * Retrieves all directives, organized by namespace - */ - public function getAll() { - if (!$this->finalized) $this->autoFinalize ? $this->finalize() : $this->plist->squash(true); - $ret = array(); - foreach ($this->plist->squash() as $name => $value) { - list($ns, $key) = explode('.', $name, 2); - $ret[$ns][$key] = $value; - } - return $ret; - } - - /** - * Sets a value to configuration. - * @param $namespace String namespace - * @param $key String key - * @param $value Mixed value - */ - public function set($namespace, $key, $value, $from_alias = false) { - if ($this->isFinalized('Cannot set directive after finalization')) return; - if (!isset($this->def->info[$namespace][$key])) { - trigger_error('Cannot set undefined directive ' . htmlspecialchars("$namespace.$key") . ' to value', - E_USER_WARNING); - return; - } - $def = $this->def->info[$namespace][$key]; - - if (isset($def->isAlias)) { - if ($from_alias) { - trigger_error('Double-aliases not allowed, please fix '. - 'ConfigSchema bug with' . "$namespace.$key", E_USER_ERROR); - return; - } - $this->set($new_ns = $def->namespace, - $new_dir = $def->name, - $value, true); - trigger_error("$namespace.$key is an alias, preferred directive name is $new_ns.$new_dir", E_USER_NOTICE); - return; - } - - // Raw type might be negative when using the fully optimized form - // of stdclass, which indicates allow_null == true - $rtype = is_int($def) ? $def : $def->type; - if ($rtype < 0) { - $type = -$rtype; - $allow_null = true; - } else { - $type = $rtype; - $allow_null = isset($def->allow_null); - } - - try { - $value = $this->parser->parse($value, $type, $allow_null); - } catch (HTMLPurifier_VarParserException $e) { - trigger_error('Value for ' . "$namespace.$key" . ' is of invalid type, should be ' . HTMLPurifier_VarParser::getTypeName($type), E_USER_WARNING); - return; - } - if (is_string($value) && is_object($def)) { - // resolve value alias if defined - if (isset($def->aliases[$value])) { - $value = $def->aliases[$value]; - } - // check to see if the value is allowed - if (isset($def->allowed) && !isset($def->allowed[$value])) { - trigger_error('Value not supported, valid values are: ' . - $this->_listify($def->allowed), E_USER_WARNING); - return; - } - } - $this->plist->set("$namespace.$key", $value); - - // reset definitions if the directives they depend on changed - // this is a very costly process, so it's discouraged - // with finalization - if ($namespace == 'HTML' || $namespace == 'CSS') { - $this->definitions[$namespace] = null; - } - - $this->serials[$namespace] = false; - } - - /** - * Convenience function for error reporting - */ - private function _listify($lookup) { - $list = array(); - foreach ($lookup as $name => $b) $list[] = $name; - return implode(', ', $list); - } - - /** - * Retrieves object reference to the HTML definition. - * @param $raw Return a copy that has not been setup yet. Must be - * called before it's been setup, otherwise won't work. - */ - public function getHTMLDefinition($raw = false) { - return $this->getDefinition('HTML', $raw); - } - - /** - * Retrieves object reference to the CSS definition - * @param $raw Return a copy that has not been setup yet. Must be - * called before it's been setup, otherwise won't work. - */ - public function getCSSDefinition($raw = false) { - return $this->getDefinition('CSS', $raw); - } - - /** - * Retrieves a definition - * @param $type Type of definition: HTML, CSS, etc - * @param $raw Whether or not definition should be returned raw - */ - public function getDefinition($type, $raw = false) { - if (!$this->finalized) $this->autoFinalize ? $this->finalize() : $this->plist->squash(true); - $factory = HTMLPurifier_DefinitionCacheFactory::instance(); - $cache = $factory->create($type, $this); - if (!$raw) { - // see if we can quickly supply a definition - if (!empty($this->definitions[$type])) { - if (!$this->definitions[$type]->setup) { - $this->definitions[$type]->setup($this); - $cache->set($this->definitions[$type], $this); - } - return $this->definitions[$type]; - } - // memory check missed, try cache - $this->definitions[$type] = $cache->get($this); - if ($this->definitions[$type]) { - // definition in cache, return it - return $this->definitions[$type]; - } - } elseif ( - !empty($this->definitions[$type]) && - !$this->definitions[$type]->setup - ) { - // raw requested, raw in memory, quick return - return $this->definitions[$type]; - } - // quick checks failed, let's create the object - if ($type == 'HTML') { - $this->definitions[$type] = new HTMLPurifier_HTMLDefinition(); - } elseif ($type == 'CSS') { - $this->definitions[$type] = new HTMLPurifier_CSSDefinition(); - } elseif ($type == 'URI') { - $this->definitions[$type] = new HTMLPurifier_URIDefinition(); - } else { - throw new HTMLPurifier_Exception("Definition of $type type not supported"); - } - // quick abort if raw - if ($raw) { - if (is_null($this->get($type, 'DefinitionID'))) { - // fatally error out if definition ID not set - throw new HTMLPurifier_Exception("Cannot retrieve raw version without specifying %$type.DefinitionID"); - } - return $this->definitions[$type]; - } - // set it up - $this->definitions[$type]->setup($this); - // save in cache - $cache->set($this->definitions[$type], $this); - return $this->definitions[$type]; - } - - /** - * Loads configuration values from an array with the following structure: - * Namespace.Directive => Value - * @param $config_array Configuration associative array - */ - public function loadArray($config_array) { - if ($this->isFinalized('Cannot load directives after finalization')) return; - foreach ($config_array as $key => $value) { - $key = str_replace('_', '.', $key); - if (strpos($key, '.') !== false) { - // condensed form - list($namespace, $directive) = explode('.', $key); - $this->set($namespace, $directive, $value); - } else { - $namespace = $key; - $namespace_values = $value; - foreach ($namespace_values as $directive => $value) { - $this->set($namespace, $directive, $value); - } - } - } - } - - /** - * Returns a list of array(namespace, directive) for all directives - * that are allowed in a web-form context as per an allowed - * namespaces/directives list. - * @param $allowed List of allowed namespaces/directives - */ - public static function getAllowedDirectivesForForm($allowed, $schema = null) { - if (!$schema) { - $schema = HTMLPurifier_ConfigSchema::instance(); - } - if ($allowed !== true) { - if (is_string($allowed)) $allowed = array($allowed); - $allowed_ns = array(); - $allowed_directives = array(); - $blacklisted_directives = array(); - foreach ($allowed as $ns_or_directive) { - if (strpos($ns_or_directive, '.') !== false) { - // directive - if ($ns_or_directive[0] == '-') { - $blacklisted_directives[substr($ns_or_directive, 1)] = true; - } else { - $allowed_directives[$ns_or_directive] = true; - } - } else { - // namespace - $allowed_ns[$ns_or_directive] = true; - } - } - } - $ret = array(); - foreach ($schema->info as $ns => $keypairs) { - foreach ($keypairs as $directive => $def) { - if ($allowed !== true) { - if (isset($blacklisted_directives["$ns.$directive"])) continue; - if (!isset($allowed_directives["$ns.$directive"]) && !isset($allowed_ns[$ns])) continue; - } - if (isset($def->isAlias)) continue; - if ($directive == 'DefinitionID' || $directive == 'DefinitionRev') continue; - $ret[] = array($ns, $directive); - } - } - return $ret; - } - - /** - * Loads configuration values from $_GET/$_POST that were posted - * via ConfigForm - * @param $array $_GET or $_POST array to import - * @param $index Index/name that the config variables are in - * @param $allowed List of allowed namespaces/directives - * @param $mq_fix Boolean whether or not to enable magic quotes fix - * @param $schema Instance of HTMLPurifier_ConfigSchema to use, if not global copy - */ - public static function loadArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) { - $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $schema); - $config = HTMLPurifier_Config::create($ret, $schema); - return $config; - } - - /** - * Merges in configuration values from $_GET/$_POST to object. NOT STATIC. - * @note Same parameters as loadArrayFromForm - */ - public function mergeArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true) { - $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $this->def); - $this->loadArray($ret); - } - - /** - * Prepares an array from a form into something usable for the more - * strict parts of HTMLPurifier_Config - */ - public static function prepareArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) { - if ($index !== false) $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array(); - $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc(); - - $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema); - $ret = array(); - foreach ($allowed as $key) { - list($ns, $directive) = $key; - $skey = "$ns.$directive"; - if (!empty($array["Null_$skey"])) { - $ret[$ns][$directive] = null; - continue; - } - if (!isset($array[$skey])) continue; - $value = $mq ? stripslashes($array[$skey]) : $array[$skey]; - $ret[$ns][$directive] = $value; - } - return $ret; - } - - /** - * Loads configuration values from an ini file - * @param $filename Name of ini file - */ - public function loadIni($filename) { - if ($this->isFinalized('Cannot load directives after finalization')) return; - $array = parse_ini_file($filename, true); - $this->loadArray($array); - } - - /** - * Checks whether or not the configuration object is finalized. - * @param $error String error message, or false for no error - */ - public function isFinalized($error = false) { - if ($this->finalized && $error) { - trigger_error($error, E_USER_ERROR); - } - return $this->finalized; - } - - /** - * Finalizes configuration only if auto finalize is on and not - * already finalized - */ - public function autoFinalize() { - if (!$this->finalized && $this->autoFinalize) $this->finalize(); - } - - /** - * Finalizes a configuration object, prohibiting further change - */ - public function finalize() { - $this->finalized = true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema.php b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema.php deleted file mode 100644 index 340ed7dbc67bf571767fc3beede44a1ff6b6882c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema.php +++ /dev/null @@ -1,231 +0,0 @@ -<?php - -/** - * Configuration definition, defines directives and their defaults. - */ -class HTMLPurifier_ConfigSchema { - - /** - * Defaults of the directives and namespaces. - * @note This shares the exact same structure as HTMLPurifier_Config::$conf - */ - public $defaults = array(); - - /** - * The default property list. Do not edit this property list. - */ - public $defaultPlist; - - /** - * Definition of the directives. The structure of this is: - * - * array( - * 'Namespace' => array( - * 'Directive' => new stdclass(), - * ) - * ) - * - * The stdclass may have the following properties: - * - * - If isAlias isn't set: - * - type: Integer type of directive, see HTMLPurifier_VarParser for definitions - * - allow_null: If set, this directive allows null values - * - aliases: If set, an associative array of value aliases to real values - * - allowed: If set, a lookup array of allowed (string) values - * - If isAlias is set: - * - namespace: Namespace this directive aliases to - * - name: Directive name this directive aliases to - * - * In certain degenerate cases, stdclass will actually be an integer. In - * that case, the value is equivalent to an stdclass with the type - * property set to the integer. If the integer is negative, type is - * equal to the absolute value of integer, and allow_null is true. - * - * This class is friendly with HTMLPurifier_Config. If you need introspection - * about the schema, you're better of using the ConfigSchema_Interchange, - * which uses more memory but has much richer information. - */ - public $info = array(); - - /** - * Application-wide singleton - */ - static protected $singleton; - - public function __construct() { - $this->defaultPlist = new HTMLPurifier_PropertyList(); - } - - /** - * Unserializes the default ConfigSchema. - */ - public static function makeFromSerial() { - return unserialize(file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema.ser')); - } - - /** - * Retrieves an instance of the application-wide configuration definition. - */ - public static function instance($prototype = null) { - if ($prototype !== null) { - HTMLPurifier_ConfigSchema::$singleton = $prototype; - } elseif (HTMLPurifier_ConfigSchema::$singleton === null || $prototype === true) { - HTMLPurifier_ConfigSchema::$singleton = HTMLPurifier_ConfigSchema::makeFromSerial(); - } - return HTMLPurifier_ConfigSchema::$singleton; - } - - /** - * Defines a directive for configuration - * @warning Will fail of directive's namespace is defined. - * @warning This method's signature is slightly different from the legacy - * define() static method! Beware! - * @param $namespace Namespace the directive is in - * @param $name Key of directive - * @param $default Default value of directive - * @param $type Allowed type of the directive. See - * HTMLPurifier_DirectiveDef::$type for allowed values - * @param $allow_null Whether or not to allow null values - */ - public function add($namespace, $name, $default, $type, $allow_null) { - $obj = new stdclass(); - $obj->type = is_int($type) ? $type : HTMLPurifier_VarParser::$types[$type]; - if ($allow_null) $obj->allow_null = true; - $this->info[$namespace][$name] = $obj; - $this->defaults[$namespace][$name] = $default; - $this->defaultPlist->set("$namespace.$name", $default); - } - - /** - * Defines a namespace for directives to be put into. - * @warning This is slightly different from the corresponding static - * method. - * @param $namespace Namespace's name - */ - public function addNamespace($namespace) { - $this->info[$namespace] = array(); - $this->defaults[$namespace] = array(); - } - - /** - * Defines a directive value alias. - * - * Directive value aliases are convenient for developers because it lets - * them set a directive to several values and get the same result. - * @param $namespace Directive's namespace - * @param $name Name of Directive - * @param $aliases Hash of aliased values to the real alias - */ - public function addValueAliases($namespace, $name, $aliases) { - if (!isset($this->info[$namespace][$name]->aliases)) { - $this->info[$namespace][$name]->aliases = array(); - } - foreach ($aliases as $alias => $real) { - $this->info[$namespace][$name]->aliases[$alias] = $real; - } - } - - /** - * Defines a set of allowed values for a directive. - * @warning This is slightly different from the corresponding static - * method definition. - * @param $namespace Namespace of directive - * @param $name Name of directive - * @param $allowed Lookup array of allowed values - */ - public function addAllowedValues($namespace, $name, $allowed) { - $this->info[$namespace][$name]->allowed = $allowed; - } - - /** - * Defines a directive alias for backwards compatibility - * @param $namespace - * @param $name Directive that will be aliased - * @param $new_namespace - * @param $new_name Directive that the alias will be to - */ - public function addAlias($namespace, $name, $new_namespace, $new_name) { - $obj = new stdclass; - $obj->namespace = $new_namespace; - $obj->name = $new_name; - $obj->isAlias = true; - $this->info[$namespace][$name] = $obj; - } - - /** - * Replaces any stdclass that only has the type property with type integer. - */ - public function postProcess() { - foreach ($this->info as $namespace => $info) { - foreach ($info as $directive => $v) { - if (count((array) $v) == 1) { - $this->info[$namespace][$directive] = $v->type; - } elseif (count((array) $v) == 2 && isset($v->allow_null)) { - $this->info[$namespace][$directive] = -$v->type; - } - } - } - } - - // DEPRECATED METHODS - - /** @see HTMLPurifier_ConfigSchema->set() */ - public static function define($namespace, $name, $default, $type, $description) { - HTMLPurifier_ConfigSchema::deprecated(__METHOD__); - $type_values = explode('/', $type, 2); - $type = $type_values[0]; - $modifier = isset($type_values[1]) ? $type_values[1] : false; - $allow_null = ($modifier === 'null'); - $def = HTMLPurifier_ConfigSchema::instance(); - $def->add($namespace, $name, $default, $type, $allow_null); - } - - /** @see HTMLPurifier_ConfigSchema->addNamespace() */ - public static function defineNamespace($namespace, $description) { - HTMLPurifier_ConfigSchema::deprecated(__METHOD__); - $def = HTMLPurifier_ConfigSchema::instance(); - $def->addNamespace($namespace); - } - - /** @see HTMLPurifier_ConfigSchema->addValueAliases() */ - public static function defineValueAliases($namespace, $name, $aliases) { - HTMLPurifier_ConfigSchema::deprecated(__METHOD__); - $def = HTMLPurifier_ConfigSchema::instance(); - $def->addValueAliases($namespace, $name, $aliases); - } - - /** @see HTMLPurifier_ConfigSchema->addAllowedValues() */ - public static function defineAllowedValues($namespace, $name, $allowed_values) { - HTMLPurifier_ConfigSchema::deprecated(__METHOD__); - $allowed = array(); - foreach ($allowed_values as $value) { - $allowed[$value] = true; - } - $def = HTMLPurifier_ConfigSchema::instance(); - $def->addAllowedValues($namespace, $name, $allowed); - } - - /** @see HTMLPurifier_ConfigSchema->addAlias() */ - public static function defineAlias($namespace, $name, $new_namespace, $new_name) { - HTMLPurifier_ConfigSchema::deprecated(__METHOD__); - $def = HTMLPurifier_ConfigSchema::instance(); - $def->addAlias($namespace, $name, $new_namespace, $new_name); - } - - /** @deprecated, use HTMLPurifier_VarParser->parse() */ - public function validate($a, $b, $c = false) { - trigger_error("HTMLPurifier_ConfigSchema->validate deprecated, use HTMLPurifier_VarParser->parse instead", E_USER_NOTICE); - $parser = new HTMLPurifier_VarParser(); - return $parser->parse($a, $b, $c); - } - - /** - * Throws an E_USER_NOTICE stating that a method is deprecated. - */ - private static function deprecated($method) { - trigger_error("Static HTMLPurifier_ConfigSchema::$method deprecated, use add*() method instead", E_USER_NOTICE); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php deleted file mode 100644 index 51bcab78cc4951e0c63548bd28890447a40b2e4d..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/** - * Converts HTMLPurifier_ConfigSchema_Interchange to an XML format, - * which can be further processed to generate documentation. - */ -class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter -{ - - protected $interchange; - - protected function writeHTMLDiv($html) { - $this->startElement('div'); - - $purifier = HTMLPurifier::getInstance(); - $html = $purifier->purify($html); - $this->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); - $this->writeRaw($html); - - $this->endElement(); // div - } - - protected function export($var) { - if ($var === array()) return 'array()'; - return var_export($var, true); - } - - public function build($interchange) { - // global access, only use as last resort - $this->interchange = $interchange; - - $this->setIndent(true); - $this->startDocument('1.0', 'UTF-8'); - $this->startElement('configdoc'); - $this->writeElement('title', $interchange->name); - - foreach ($interchange->namespaces as $namespace) { - $this->buildNamespace($namespace); - } - - $this->endElement(); // configdoc - $this->flush(); - } - - public function buildNamespace($namespace) { - $this->startElement('namespace'); - $this->writeAttribute('id', $namespace->namespace); - - $this->writeElement('name', $namespace->namespace); - $this->startElement('description'); - $this->writeHTMLDiv($namespace->description); - $this->endElement(); // description - - foreach ($this->interchange->directives as $directive) { - if ($directive->id->namespace !== $namespace->namespace) continue; - $this->buildDirective($directive); - } - - $this->endElement(); // namespace - } - - public function buildDirective($directive) { - $this->startElement('directive'); - $this->writeAttribute('id', $directive->id->toString()); - - $this->writeElement('name', $directive->id->directive); - - $this->startElement('aliases'); - foreach ($directive->aliases as $alias) $this->writeElement('alias', $alias->toString()); - $this->endElement(); // aliases - - $this->startElement('constraints'); - if ($directive->version) $this->writeElement('version', $directive->version); - $this->startElement('type'); - if ($directive->typeAllowsNull) $this->writeAttribute('allow-null', 'yes'); - $this->text($directive->type); - $this->endElement(); // type - if ($directive->allowed) { - $this->startElement('allowed'); - foreach ($directive->allowed as $value => $x) $this->writeElement('value', $value); - $this->endElement(); // allowed - } - $this->writeElement('default', $this->export($directive->default)); - $this->writeAttribute('xml:space', 'preserve'); - if ($directive->external) { - $this->startElement('external'); - foreach ($directive->external as $project) $this->writeElement('project', $project); - $this->endElement(); - } - $this->endElement(); // constraints - - if ($directive->deprecatedVersion) { - $this->startElement('deprecated'); - $this->writeElement('version', $directive->deprecatedVersion); - $this->writeElement('use', $directive->deprecatedUse->toString()); - $this->endElement(); // deprecated - } - - $this->startElement('description'); - $this->writeHTMLDiv($directive->description); - $this->endElement(); // description - - $this->endElement(); // directive - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php deleted file mode 100644 index ec01589b623a1262c28b1b76283873b33d68e8f2..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * Represents a directive ID in the interchange format. - */ -class HTMLPurifier_ConfigSchema_Interchange_Id -{ - - public $namespace, $directive; - - public function __construct($namespace, $directive) { - $this->namespace = $namespace; - $this->directive = $directive; - } - - /** - * @warning This is NOT magic, to ensure that people don't abuse SPL and - * cause problems for PHP 5.0 support. - */ - public function toString() { - return $this->namespace . '.' . $this->directive; - } - - public static function make($id) { - list($namespace, $directive) = explode('.', $id); - return new HTMLPurifier_ConfigSchema_Interchange_Id($namespace, $directive); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Namespace.php b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Namespace.php deleted file mode 100644 index 3ffac0a0f4a766cbaca3551d8df6a84179f25430..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Namespace.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * Interchange component class describing namespaces. - */ -class HTMLPurifier_ConfigSchema_Interchange_Namespace -{ - - /** - * Name of namespace defined. - */ - public $namespace; - - /** - * HTML description. - */ - public $description; - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php deleted file mode 100644 index b95aea18cc72f04f6675b92d66d62c8a67efe8f5..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * Fluent interface for validating the contents of member variables. - * This should be immutable. See HTMLPurifier_ConfigSchema_Validator for - * use-cases. We name this an 'atom' because it's ONLY for validations that - * are independent and usually scalar. - */ -class HTMLPurifier_ConfigSchema_ValidatorAtom -{ - - protected $context, $obj, $member, $contents; - - public function __construct($context, $obj, $member) { - $this->context = $context; - $this->obj = $obj; - $this->member = $member; - $this->contents =& $obj->$member; - } - - public function assertIsString() { - if (!is_string($this->contents)) $this->error('must be a string'); - return $this; - } - - public function assertIsBool() { - if (!is_bool($this->contents)) $this->error('must be a boolean'); - return $this; - } - - public function assertIsArray() { - if (!is_array($this->contents)) $this->error('must be an array'); - return $this; - } - - public function assertNotNull() { - if ($this->contents === null) $this->error('must not be null'); - return $this; - } - - public function assertAlnum() { - $this->assertIsString(); - if (!ctype_alnum($this->contents)) $this->error('must be alphanumeric'); - return $this; - } - - public function assertNotEmpty() { - if (empty($this->contents)) $this->error('must not be empty'); - return $this; - } - - public function assertIsLookup() { - $this->assertIsArray(); - foreach ($this->contents as $v) { - if ($v !== true) $this->error('must be a lookup array'); - } - return $this; - } - - protected function error($msg) { - throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member) . ' in ' . $this->context . ' ' . $msg); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser deleted file mode 100644 index 1eaecd11f856504cde09c1b302c7c1cfd65ec00b..0000000000000000000000000000000000000000 Binary files a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser and /dev/null differ diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.txt deleted file mode 100644 index 2d72049d64f6dc7de6123d5f7417864905fbdc74..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.txt +++ /dev/null @@ -1,3 +0,0 @@ -Attr -DESCRIPTION: Features regarding attribute validation. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.txt deleted file mode 100644 index 161a52ef4820966d024ee94bbe16553bf398dae1..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.txt +++ /dev/null @@ -1,3 +0,0 @@ -AutoFormat -DESCRIPTION: Configuration for activating auto-formatting functionality (also known as <code>Injector</code>s) ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.txt deleted file mode 100644 index 6097a557e784a852df2c56e73300819f729b40e4..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.txt +++ /dev/null @@ -1,3 +0,0 @@ -AutoFormatParam -DESCRIPTION: Configuration for customizing auto-formatting functionality ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.txt deleted file mode 100644 index d14b490933945d411ad1d54fefa468215396d7f5..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.txt +++ /dev/null @@ -1,3 +0,0 @@ -CSS -DESCRIPTION: Configuration regarding allowed CSS. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.txt deleted file mode 100644 index 57f30239a04bbe34082caf09226a26a9e05df353..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.txt +++ /dev/null @@ -1,3 +0,0 @@ -Cache -DESCRIPTION: Configuration for DefinitionCache and related subclasses. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.txt deleted file mode 100644 index 5edfe078635759d2d955cbdc819792bc27bab133..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.txt +++ /dev/null @@ -1,3 +0,0 @@ -Core -DESCRIPTION: Core features that are always available. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.txt deleted file mode 100644 index f2d25a1b26d369695a70a55fbc07e80f18f9b761..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.txt +++ /dev/null @@ -1,3 +0,0 @@ -Filter -DESCRIPTION: Directives for turning filters on and off, or specifying custom filters. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.txt deleted file mode 100644 index dff9784b129ab7f2bb97c8f15cf777f54f8696e6..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.txt +++ /dev/null @@ -1,3 +0,0 @@ -FilterParam -DESCRIPTION: Configuration for filters. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt deleted file mode 100644 index 888d55819690d49ef5d1776b07f44413b185c277..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt +++ /dev/null @@ -1,18 +0,0 @@ -HTML.AllowedElements -TYPE: lookup/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- -<p> - If HTML Purifier's tag set is unsatisfactory for your needs, you - can overload it with your own list of tags to allow. Note that this - method is subtractive: it does its job by taking away from HTML Purifier - usual feature set, so you cannot add a tag that HTML Purifier never - supported in the first place (like embed, form or head). If you - change this, you probably also want to change %HTML.AllowedAttributes. -</p> -<p> - <strong>Warning:</strong> If another directive conflicts with the - elements here, <em>that</em> directive will win and override. -</p> ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt deleted file mode 100644 index 32967b88fb7d34b4c757224c86d1d90386d89ca2..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt +++ /dev/null @@ -1,14 +0,0 @@ -HTML.SafeObject -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -<p> - Whether or not to permit object tags in documents, with a number of extra - security features added to prevent script execution. This is similar to - what websites like MySpace do to object tags. You may also want to - enable %HTML.SafeEmbed for maximum interoperability with Internet Explorer, - although embed tags will cause your website to stop validating. - <strong>Highly experimental.</strong> -</p> ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.txt deleted file mode 100644 index f32ceb5b6e5ed5513c6b3221e973b526a1986f78..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.txt +++ /dev/null @@ -1,3 +0,0 @@ -HTML -DESCRIPTION: Configuration regarding allowed HTML. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.txt deleted file mode 100644 index 7849d60d26f43b4a8d696e9cbe86eb2a4af2d5cd..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.txt +++ /dev/null @@ -1,3 +0,0 @@ -Output -DESCRIPTION: Configuration relating to the generation of (X)HTML. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.txt deleted file mode 100644 index 5025f9d14f107563aacece1ac973b171c9dc87d4..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.txt +++ /dev/null @@ -1,3 +0,0 @@ -Test -DESCRIPTION: Developer testing configuration for our unit tests. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.txt b/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.txt deleted file mode 100644 index a13060f365936599a83317f1c00d10a2e31ed29d..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.txt +++ /dev/null @@ -1,3 +0,0 @@ -URI -DESCRIPTION: Features regarding Uniform Resource Identifiers. ---# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Context.php b/libraries/htmlpurifier/library/HTMLPurifier/Context.php deleted file mode 100644 index 9ddf0c5476a186d9bb694dee319e674f79ad868c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Context.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/** - * Registry object that contains information about the current context. - * @warning Is a bit buggy when variables are set to null: it thinks - * they don't exist! So use false instead, please. - * @note Since the variables Context deals with may not be objects, - * references are very important here! Do not remove! - */ -class HTMLPurifier_Context -{ - - /** - * Private array that stores the references. - */ - private $_storage = array(); - - /** - * Registers a variable into the context. - * @param $name String name - * @param $ref Reference to variable to be registered - */ - public function register($name, &$ref) { - if (isset($this->_storage[$name])) { - trigger_error("Name $name produces collision, cannot re-register", - E_USER_ERROR); - return; - } - $this->_storage[$name] =& $ref; - } - - /** - * Retrieves a variable reference from the context. - * @param $name String name - * @param $ignore_error Boolean whether or not to ignore error - */ - public function &get($name, $ignore_error = false) { - if (!isset($this->_storage[$name])) { - if (!$ignore_error) { - trigger_error("Attempted to retrieve non-existent variable $name", - E_USER_ERROR); - } - $var = null; // so we can return by reference - return $var; - } - return $this->_storage[$name]; - } - - /** - * Destorys a variable in the context. - * @param $name String name - */ - public function destroy($name) { - if (!isset($this->_storage[$name])) { - trigger_error("Attempted to destroy non-existent variable $name", - E_USER_ERROR); - return; - } - unset($this->_storage[$name]); - } - - /** - * Checks whether or not the variable exists. - * @param $name String name - */ - public function exists($name) { - return isset($this->_storage[$name]); - } - - /** - * Loads a series of variables from an associative array - * @param $context_array Assoc array of variables to load - */ - public function loadArray($context_array) { - foreach ($context_array as $key => $discard) { - $this->register($key, $context_array[$key]); - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Definition.php b/libraries/htmlpurifier/library/HTMLPurifier/Definition.php deleted file mode 100644 index a7408c97498eabfa586ca762f82ae102ae88a7c7..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Definition.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * Super-class for definition datatype objects, implements serialization - * functions for the class. - */ -abstract class HTMLPurifier_Definition -{ - - /** - * Has setup() been called yet? - */ - public $setup = false; - - /** - * What type of definition is it? - */ - public $type; - - /** - * Sets up the definition object into the final form, something - * not done by the constructor - * @param $config HTMLPurifier_Config instance - */ - abstract protected function doSetup($config); - - /** - * Setup function that aborts if already setup - * @param $config HTMLPurifier_Config instance - */ - public function setup($config) { - if ($this->setup) return; - $this->setup = true; - $this->doSetup($config); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php deleted file mode 100644 index b0fb6d0cd67a21d6720fb13d3aca3c7aab64ca7f..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache -{ - - /** - * Cache object we are decorating - */ - public $cache; - - public function __construct() {} - - /** - * Lazy decorator function - * @param $cache Reference to cache object to decorate - */ - public function decorate(&$cache) { - $decorator = $this->copy(); - // reference is necessary for mocks in PHP 4 - $decorator->cache =& $cache; - $decorator->type = $cache->type; - return $decorator; - } - - /** - * Cross-compatible clone substitute - */ - public function copy() { - return new HTMLPurifier_DefinitionCache_Decorator(); - } - - public function add($def, $config) { - return $this->cache->add($def, $config); - } - - public function set($def, $config) { - return $this->cache->set($def, $config); - } - - public function replace($def, $config) { - return $this->cache->replace($def, $config); - } - - public function get($config) { - return $this->cache->get($config); - } - - public function remove($config) { - return $this->cache->remove($config); - } - - public function flush($config) { - return $this->cache->flush($config); - } - - public function cleanup($config) { - return $this->cache->cleanup($config); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php deleted file mode 100644 index d4cc35c4bc1cd7e16a94742f03b72b1586c16532..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * Definition cache decorator class that cleans up the cache - * whenever there is a cache miss. - */ -class HTMLPurifier_DefinitionCache_Decorator_Cleanup extends - HTMLPurifier_DefinitionCache_Decorator -{ - - public $name = 'Cleanup'; - - public function copy() { - return new HTMLPurifier_DefinitionCache_Decorator_Cleanup(); - } - - public function add($def, $config) { - $status = parent::add($def, $config); - if (!$status) parent::cleanup($config); - return $status; - } - - public function set($def, $config) { - $status = parent::set($def, $config); - if (!$status) parent::cleanup($config); - return $status; - } - - public function replace($def, $config) { - $status = parent::replace($def, $config); - if (!$status) parent::cleanup($config); - return $status; - } - - public function get($config) { - $ret = parent::get($config); - if (!$ret) parent::cleanup($config); - return $ret; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php deleted file mode 100644 index 18f16d32b6698eed50dbe0d8d3ee81d05ad7c724..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * Definition cache decorator class that saves all cache retrievals - * to PHP's memory; good for unit tests or circumstances where - * there are lots of configuration objects floating around. - */ -class HTMLPurifier_DefinitionCache_Decorator_Memory extends - HTMLPurifier_DefinitionCache_Decorator -{ - - protected $definitions; - public $name = 'Memory'; - - public function copy() { - return new HTMLPurifier_DefinitionCache_Decorator_Memory(); - } - - public function add($def, $config) { - $status = parent::add($def, $config); - if ($status) $this->definitions[$this->generateKey($config)] = $def; - return $status; - } - - public function set($def, $config) { - $status = parent::set($def, $config); - if ($status) $this->definitions[$this->generateKey($config)] = $def; - return $status; - } - - public function replace($def, $config) { - $status = parent::replace($def, $config); - if ($status) $this->definitions[$this->generateKey($config)] = $def; - return $status; - } - - public function get($config) { - $key = $this->generateKey($config); - if (isset($this->definitions[$key])) return $this->definitions[$key]; - $this->definitions[$key] = parent::get($config); - return $this->definitions[$key]; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in deleted file mode 100644 index f33fe37a3971ab400f31253f7f00853d387058f3..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -require_once 'HTMLPurifier/DefinitionCache/Decorator.php'; - -/** - * Definition cache decorator template. - */ -class HTMLPurifier_DefinitionCache_Decorator_Template extends - HTMLPurifier_DefinitionCache_Decorator -{ - - var $name = 'Template'; // replace this - - function copy() { - // replace class name with yours - return new HTMLPurifier_DefinitionCache_Decorator_Template(); - } - - // remove methods you don't need - - function add($def, $config) { - return parent::add($def, $config); - } - - function set($def, $config) { - return parent::set($def, $config); - } - - function replace($def, $config) { - return parent::replace($def, $config); - } - - function get($config) { - return parent::get($config); - } - - function flush() { - return parent::flush(); - } - - function cleanup($config) { - return parent::cleanup($config); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php deleted file mode 100644 index 41d97e734fe068e466c7bfffbc79e95791ba9171..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * Null cache object to use when no caching is on. - */ -class HTMLPurifier_DefinitionCache_Null extends HTMLPurifier_DefinitionCache -{ - - public function add($def, $config) { - return false; - } - - public function set($def, $config) { - return false; - } - - public function replace($def, $config) { - return false; - } - - public function remove($config) { - return false; - } - - public function get($config) { - return false; - } - - public function flush($config) { - return false; - } - - public function cleanup($config) { - return false; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php b/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php deleted file mode 100644 index acbbe2c3b37f5c0766c717513ac59c01bc1680c0..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php - -class HTMLPurifier_DefinitionCache_Serializer extends - HTMLPurifier_DefinitionCache -{ - - public function add($def, $config) { - if (!$this->checkDefType($def)) return; - $file = $this->generateFilePath($config); - if (file_exists($file)) return false; - if (!$this->_prepareDir($config)) return false; - return $this->_write($file, serialize($def)); - } - - public function set($def, $config) { - if (!$this->checkDefType($def)) return; - $file = $this->generateFilePath($config); - if (!$this->_prepareDir($config)) return false; - return $this->_write($file, serialize($def)); - } - - public function replace($def, $config) { - if (!$this->checkDefType($def)) return; - $file = $this->generateFilePath($config); - if (!file_exists($file)) return false; - if (!$this->_prepareDir($config)) return false; - return $this->_write($file, serialize($def)); - } - - public function get($config) { - $file = $this->generateFilePath($config); - if (!file_exists($file)) return false; - return unserialize(file_get_contents($file)); - } - - public function remove($config) { - $file = $this->generateFilePath($config); - if (!file_exists($file)) return false; - return unlink($file); - } - - public function flush($config) { - if (!$this->_prepareDir($config)) return false; - $dir = $this->generateDirectoryPath($config); - $dh = opendir($dir); - while (false !== ($filename = readdir($dh))) { - if (empty($filename)) continue; - if ($filename[0] === '.') continue; - unlink($dir . '/' . $filename); - } - } - - public function cleanup($config) { - if (!$this->_prepareDir($config)) return false; - $dir = $this->generateDirectoryPath($config); - $dh = opendir($dir); - while (false !== ($filename = readdir($dh))) { - if (empty($filename)) continue; - if ($filename[0] === '.') continue; - $key = substr($filename, 0, strlen($filename) - 4); - if ($this->isOld($key, $config)) unlink($dir . '/' . $filename); - } - } - - /** - * Generates the file path to the serial file corresponding to - * the configuration and definition name - * @todo Make protected - */ - public function generateFilePath($config) { - $key = $this->generateKey($config); - return $this->generateDirectoryPath($config) . '/' . $key . '.ser'; - } - - /** - * Generates the path to the directory contain this cache's serial files - * @note No trailing slash - * @todo Make protected - */ - public function generateDirectoryPath($config) { - $base = $this->generateBaseDirectoryPath($config); - return $base . '/' . $this->type; - } - - /** - * Generates path to base directory that contains all definition type - * serials - * @todo Make protected - */ - public function generateBaseDirectoryPath($config) { - $base = $config->get('Cache', 'SerializerPath'); - $base = is_null($base) ? HTMLPURIFIER_PREFIX . '/HTMLPurifier/DefinitionCache/Serializer' : $base; - return $base; - } - - /** - * Convenience wrapper function for file_put_contents - * @param $file File name to write to - * @param $data Data to write into file - * @return Number of bytes written if success, or false if failure. - */ - private function _write($file, $data) { - return file_put_contents($file, $data); - } - - /** - * Prepares the directory that this type stores the serials in - * @return True if successful - */ - private function _prepareDir($config) { - $directory = $this->generateDirectoryPath($config); - if (!is_dir($directory)) { - $base = $this->generateBaseDirectoryPath($config); - if (!is_dir($base)) { - trigger_error('Base directory '.$base.' does not exist, - please create or change using %Cache.SerializerPath', - E_USER_WARNING); - return false; - } elseif (!$this->_testPermissions($base)) { - return false; - } - $old = umask(0022); // disable group and world writes - mkdir($directory); - umask($old); - } elseif (!$this->_testPermissions($directory)) { - return false; - } - return true; - } - - /** - * Tests permissions on a directory and throws out friendly - * error messages and attempts to chmod it itself if possible - */ - private function _testPermissions($dir) { - // early abort, if it is writable, everything is hunky-dory - if (is_writable($dir)) return true; - if (!is_dir($dir)) { - // generally, you'll want to handle this beforehand - // so a more specific error message can be given - trigger_error('Directory '.$dir.' does not exist', - E_USER_WARNING); - return false; - } - if (function_exists('posix_getuid')) { - // POSIX system, we can give more specific advice - if (fileowner($dir) === posix_getuid()) { - // we can chmod it ourselves - chmod($dir, 0755); - return true; - } elseif (filegroup($dir) === posix_getgid()) { - $chmod = '775'; - } else { - // PHP's probably running as nobody, so we'll - // need to give global permissions - $chmod = '777'; - } - trigger_error('Directory '.$dir.' not writable, '. - 'please chmod to ' . $chmod, - E_USER_WARNING); - } else { - // generic error message - trigger_error('Directory '.$dir.' not writable, '. - 'please alter file permissions', - E_USER_WARNING); - } - return false; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php b/libraries/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php deleted file mode 100644 index d6552aa5503ecb2bb05715bdb9acf27b0a45b72f..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -class HTMLPurifier_DoctypeRegistry -{ - - /** - * Hash of doctype names to doctype objects - */ - protected $doctypes; - - /** - * Lookup table of aliases to real doctype names - */ - protected $aliases; - - /** - * Registers a doctype to the registry - * @note Accepts a fully-formed doctype object, or the - * parameters for constructing a doctype object - * @param $doctype Name of doctype or literal doctype object - * @param $modules Modules doctype will load - * @param $modules_for_modes Modules doctype will load for certain modes - * @param $aliases Alias names for doctype - * @return Editable registered doctype - */ - public function register($doctype, $xml = true, $modules = array(), - $tidy_modules = array(), $aliases = array(), $dtd_public = null, $dtd_system = null - ) { - if (!is_array($modules)) $modules = array($modules); - if (!is_array($tidy_modules)) $tidy_modules = array($tidy_modules); - if (!is_array($aliases)) $aliases = array($aliases); - if (!is_object($doctype)) { - $doctype = new HTMLPurifier_Doctype( - $doctype, $xml, $modules, $tidy_modules, $aliases, $dtd_public, $dtd_system - ); - } - $this->doctypes[$doctype->name] = $doctype; - $name = $doctype->name; - // hookup aliases - foreach ($doctype->aliases as $alias) { - if (isset($this->doctypes[$alias])) continue; - $this->aliases[$alias] = $name; - } - // remove old aliases - if (isset($this->aliases[$name])) unset($this->aliases[$name]); - return $doctype; - } - - /** - * Retrieves reference to a doctype of a certain name - * @note This function resolves aliases - * @note When possible, use the more fully-featured make() - * @param $doctype Name of doctype - * @return Editable doctype object - */ - public function get($doctype) { - if (isset($this->aliases[$doctype])) $doctype = $this->aliases[$doctype]; - if (!isset($this->doctypes[$doctype])) { - trigger_error('Doctype ' . htmlspecialchars($doctype) . ' does not exist', E_USER_ERROR); - $anon = new HTMLPurifier_Doctype($doctype); - return $anon; - } - return $this->doctypes[$doctype]; - } - - /** - * Creates a doctype based on a configuration object, - * will perform initialization on the doctype - * @note Use this function to get a copy of doctype that config - * can hold on to (this is necessary in order to tell - * Generator whether or not the current document is XML - * based or not). - */ - public function make($config) { - return clone $this->get($this->getDoctypeFromConfig($config)); - } - - /** - * Retrieves the doctype from the configuration object - */ - public function getDoctypeFromConfig($config) { - // recommended test - $doctype = $config->get('HTML', 'Doctype'); - if (!empty($doctype)) return $doctype; - $doctype = $config->get('HTML', 'CustomDoctype'); - if (!empty($doctype)) return $doctype; - // backwards-compatibility - if ($config->get('HTML', 'XHTML')) { - $doctype = 'XHTML 1.0'; - } else { - $doctype = 'HTML 4.01'; - } - if ($config->get('HTML', 'Strict')) { - $doctype .= ' Strict'; - } else { - $doctype .= ' Transitional'; - } - return $doctype; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser b/libraries/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser deleted file mode 100644 index f2b8b8f2db018a83ba9f03a7bad52b7ec945860d..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser +++ /dev/null @@ -1 +0,0 @@ -a:246:{s:4:"nbsp";s:2:" ";s:5:"iexcl";s:2:"¡";s:4:"cent";s:2:"¢";s:5:"pound";s:2:"£";s:6:"curren";s:2:"¤";s:3:"yen";s:2:"Â¥";s:6:"brvbar";s:2:"¦";s:4:"sect";s:2:"§";s:3:"uml";s:2:"¨";s:4:"copy";s:2:"©";s:4:"ordf";s:2:"ª";s:5:"laquo";s:2:"«";s:3:"not";s:2:"¬";s:3:"shy";s:2:"Â";s:3:"reg";s:2:"®";s:4:"macr";s:2:"¯";s:3:"deg";s:2:"°";s:6:"plusmn";s:2:"±";s:5:"acute";s:2:"´";s:5:"micro";s:2:"µ";s:4:"para";s:2:"¶";s:6:"middot";s:2:"·";s:5:"cedil";s:2:"¸";s:4:"ordm";s:2:"º";s:5:"raquo";s:2:"»";s:6:"iquest";s:2:"¿";s:6:"Agrave";s:2:"À";s:6:"Aacute";s:2:"Ã";s:5:"Acirc";s:2:"Â";s:6:"Atilde";s:2:"Ã";s:4:"Auml";s:2:"Ä";s:5:"Aring";s:2:"Ã…";s:5:"AElig";s:2:"Æ";s:6:"Ccedil";s:2:"Ç";s:6:"Egrave";s:2:"È";s:6:"Eacute";s:2:"É";s:5:"Ecirc";s:2:"Ê";s:4:"Euml";s:2:"Ë";s:6:"Igrave";s:2:"ÃŒ";s:6:"Iacute";s:2:"Ã";s:5:"Icirc";s:2:"ÃŽ";s:4:"Iuml";s:2:"Ã";s:3:"ETH";s:2:"Ã";s:6:"Ntilde";s:2:"Ñ";s:6:"Ograve";s:2:"Ã’";s:6:"Oacute";s:2:"Ó";s:5:"Ocirc";s:2:"Ô";s:6:"Otilde";s:2:"Õ";s:4:"Ouml";s:2:"Ö";s:5:"times";s:2:"×";s:6:"Oslash";s:2:"Ø";s:6:"Ugrave";s:2:"Ù";s:6:"Uacute";s:2:"Ú";s:5:"Ucirc";s:2:"Û";s:4:"Uuml";s:2:"Ü";s:6:"Yacute";s:2:"Ã";s:5:"THORN";s:2:"Þ";s:5:"szlig";s:2:"ß";s:6:"agrave";s:2:"à ";s:6:"aacute";s:2:"á";s:5:"acirc";s:2:"â";s:6:"atilde";s:2:"ã";s:4:"auml";s:2:"ä";s:5:"aring";s:2:"Ã¥";s:5:"aelig";s:2:"æ";s:6:"ccedil";s:2:"ç";s:6:"egrave";s:2:"è";s:6:"eacute";s:2:"é";s:5:"ecirc";s:2:"ê";s:4:"euml";s:2:"ë";s:6:"igrave";s:2:"ì";s:6:"iacute";s:2:"Ã";s:5:"icirc";s:2:"î";s:4:"iuml";s:2:"ï";s:3:"eth";s:2:"ð";s:6:"ntilde";s:2:"ñ";s:6:"ograve";s:2:"ò";s:6:"oacute";s:2:"ó";s:5:"ocirc";s:2:"ô";s:6:"otilde";s:2:"õ";s:4:"ouml";s:2:"ö";s:6:"divide";s:2:"÷";s:6:"oslash";s:2:"ø";s:6:"ugrave";s:2:"ù";s:6:"uacute";s:2:"ú";s:5:"ucirc";s:2:"û";s:4:"uuml";s:2:"ü";s:6:"yacute";s:2:"ý";s:5:"thorn";s:2:"þ";s:4:"yuml";s:2:"ÿ";s:4:"quot";s:1:""";s:3:"amp";s:1:"&";s:2:"lt";s:1:"<";s:2:"gt";s:1:">";s:4:"apos";s:1:"'";s:5:"OElig";s:2:"Å’";s:5:"oelig";s:2:"Å“";s:6:"Scaron";s:2:"Å ";s:6:"scaron";s:2:"Å¡";s:4:"Yuml";s:2:"Ÿ";s:4:"circ";s:2:"ˆ";s:5:"tilde";s:2:"Ëœ";s:4:"ensp";s:3:" ";s:4:"emsp";s:3:" ";s:6:"thinsp";s:3:" ";s:4:"zwnj";s:3:"‌";s:3:"zwj";s:3:"â€";s:3:"lrm";s:3:"‎";s:3:"rlm";s:3:"â€";s:5:"ndash";s:3:"–";s:5:"mdash";s:3:"—";s:5:"lsquo";s:3:"‘";s:5:"rsquo";s:3:"’";s:5:"sbquo";s:3:"‚";s:5:"ldquo";s:3:"“";s:5:"rdquo";s:3:"â€";s:5:"bdquo";s:3:"„";s:6:"dagger";s:3:"†";s:6:"Dagger";s:3:"‡";s:6:"permil";s:3:"‰";s:6:"lsaquo";s:3:"‹";s:6:"rsaquo";s:3:"›";s:4:"euro";s:3:"€";s:4:"fnof";s:2:"Æ’";s:5:"Alpha";s:2:"Α";s:4:"Beta";s:2:"Î’";s:5:"Gamma";s:2:"Γ";s:5:"Delta";s:2:"Δ";s:7:"Epsilon";s:2:"Ε";s:4:"Zeta";s:2:"Ζ";s:3:"Eta";s:2:"Η";s:5:"Theta";s:2:"Θ";s:4:"Iota";s:2:"Ι";s:5:"Kappa";s:2:"Κ";s:6:"Lambda";s:2:"Λ";s:2:"Mu";s:2:"Μ";s:2:"Nu";s:2:"Î";s:2:"Xi";s:2:"Ξ";s:7:"Omicron";s:2:"Ο";s:2:"Pi";s:2:"Î ";s:3:"Rho";s:2:"Ρ";s:5:"Sigma";s:2:"Σ";s:3:"Tau";s:2:"Τ";s:7:"Upsilon";s:2:"Î¥";s:3:"Phi";s:2:"Φ";s:3:"Chi";s:2:"Χ";s:3:"Psi";s:2:"Ψ";s:5:"Omega";s:2:"Ω";s:5:"alpha";s:2:"α";s:4:"beta";s:2:"β";s:5:"gamma";s:2:"γ";s:5:"delta";s:2:"δ";s:7:"epsilon";s:2:"ε";s:4:"zeta";s:2:"ζ";s:3:"eta";s:2:"η";s:5:"theta";s:2:"θ";s:4:"iota";s:2:"ι";s:5:"kappa";s:2:"κ";s:6:"lambda";s:2:"λ";s:2:"mu";s:2:"μ";s:2:"nu";s:2:"ν";s:2:"xi";s:2:"ξ";s:7:"omicron";s:2:"ο";s:2:"pi";s:2:"Ï€";s:3:"rho";s:2:"Ï";s:6:"sigmaf";s:2:"Ï‚";s:5:"sigma";s:2:"σ";s:3:"tau";s:2:"Ï„";s:7:"upsilon";s:2:"Ï…";s:3:"phi";s:2:"φ";s:3:"chi";s:2:"χ";s:3:"psi";s:2:"ψ";s:5:"omega";s:2:"ω";s:8:"thetasym";s:2:"Ï‘";s:5:"upsih";s:2:"Ï’";s:3:"piv";s:2:"Ï–";s:4:"bull";s:3:"•";s:6:"hellip";s:3:"…";s:5:"prime";s:3:"′";s:5:"Prime";s:3:"″";s:5:"oline";s:3:"‾";s:5:"frasl";s:3:"â„";s:6:"weierp";s:3:"℘";s:5:"image";s:3:"â„‘";s:4:"real";s:3:"ℜ";s:5:"trade";s:3:"â„¢";s:7:"alefsym";s:3:"ℵ";s:4:"larr";s:3:"â†";s:4:"uarr";s:3:"↑";s:4:"rarr";s:3:"→";s:4:"darr";s:3:"↓";s:4:"harr";s:3:"↔";s:5:"crarr";s:3:"↵";s:4:"lArr";s:3:"â‡";s:4:"uArr";s:3:"⇑";s:4:"rArr";s:3:"⇒";s:4:"dArr";s:3:"⇓";s:4:"hArr";s:3:"⇔";s:6:"forall";s:3:"∀";s:4:"part";s:3:"∂";s:5:"exist";s:3:"∃";s:5:"empty";s:3:"∅";s:5:"nabla";s:3:"∇";s:4:"isin";s:3:"∈";s:5:"notin";s:3:"∉";s:2:"ni";s:3:"∋";s:4:"prod";s:3:"âˆ";s:3:"sum";s:3:"∑";s:5:"minus";s:3:"−";s:6:"lowast";s:3:"∗";s:5:"radic";s:3:"√";s:4:"prop";s:3:"âˆ";s:5:"infin";s:3:"∞";s:3:"ang";s:3:"∠";s:3:"and";s:3:"∧";s:2:"or";s:3:"∨";s:3:"cap";s:3:"∩";s:3:"cup";s:3:"∪";s:3:"int";s:3:"∫";s:3:"sim";s:3:"∼";s:4:"cong";s:3:"≅";s:5:"asymp";s:3:"≈";s:2:"ne";s:3:"≠";s:5:"equiv";s:3:"≡";s:2:"le";s:3:"≤";s:2:"ge";s:3:"≥";s:3:"sub";s:3:"⊂";s:3:"sup";s:3:"⊃";s:4:"nsub";s:3:"⊄";s:4:"sube";s:3:"⊆";s:4:"supe";s:3:"⊇";s:5:"oplus";s:3:"⊕";s:6:"otimes";s:3:"⊗";s:4:"perp";s:3:"⊥";s:4:"sdot";s:3:"â‹…";s:5:"lceil";s:3:"⌈";s:5:"rceil";s:3:"⌉";s:6:"lfloor";s:3:"⌊";s:6:"rfloor";s:3:"⌋";s:4:"lang";s:3:"〈";s:4:"rang";s:3:"〉";s:3:"loz";s:3:"â—Š";s:6:"spades";s:3:"â™ ";s:5:"clubs";s:3:"♣";s:6:"hearts";s:3:"♥";s:5:"diams";s:3:"♦";} \ No newline at end of file diff --git a/libraries/htmlpurifier/library/HTMLPurifier/EntityParser.php b/libraries/htmlpurifier/library/HTMLPurifier/EntityParser.php deleted file mode 100644 index 8c384472dc6c12ee507c396f12bdf1722c00646a..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/EntityParser.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php - -// if want to implement error collecting here, we'll need to use some sort -// of global data (probably trigger_error) because it's impossible to pass -// $config or $context to the callback functions. - -/** - * Handles referencing and derefencing character entities - */ -class HTMLPurifier_EntityParser -{ - - /** - * Reference to entity lookup table. - */ - protected $_entity_lookup; - - /** - * Callback regex string for parsing entities. - */ - protected $_substituteEntitiesRegex = -'/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/'; -// 1. hex 2. dec 3. string (XML style) - - - /** - * Decimal to parsed string conversion table for special entities. - */ - protected $_special_dec2str = - array( - 34 => '"', - 38 => '&', - 39 => "'", - 60 => '<', - 62 => '>' - ); - - /** - * Stripped entity names to decimal conversion table for special entities. - */ - protected $_special_ent2dec = - array( - 'quot' => 34, - 'amp' => 38, - 'lt' => 60, - 'gt' => 62 - ); - - /** - * Substitutes non-special entities with their parsed equivalents. Since - * running this whenever you have parsed character is t3h 5uck, we run - * it before everything else. - * - * @param $string String to have non-special entities parsed. - * @returns Parsed string. - */ - public function substituteNonSpecialEntities($string) { - // it will try to detect missing semicolons, but don't rely on it - return preg_replace_callback( - $this->_substituteEntitiesRegex, - array($this, 'nonSpecialEntityCallback'), - $string - ); - } - - /** - * Callback function for substituteNonSpecialEntities() that does the work. - * - * @param $matches PCRE matches array, with 0 the entire match, and - * either index 1, 2 or 3 set with a hex value, dec value, - * or string (respectively). - * @returns Replacement string. - */ - - protected function nonSpecialEntityCallback($matches) { - // replaces all but big five - $entity = $matches[0]; - $is_num = (@$matches[0][1] === '#'); - if ($is_num) { - $is_hex = (@$entity[2] === 'x'); - $code = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; - - // abort for special characters - if (isset($this->_special_dec2str[$code])) return $entity; - - return HTMLPurifier_Encoder::unichr($code); - } else { - if (isset($this->_special_ent2dec[$matches[3]])) return $entity; - if (!$this->_entity_lookup) { - $this->_entity_lookup = HTMLPurifier_EntityLookup::instance(); - } - if (isset($this->_entity_lookup->table[$matches[3]])) { - return $this->_entity_lookup->table[$matches[3]]; - } else { - return $entity; - } - } - } - - /** - * Substitutes only special entities with their parsed equivalents. - * - * @notice We try to avoid calling this function because otherwise, it - * would have to be called a lot (for every parsed section). - * - * @param $string String to have non-special entities parsed. - * @returns Parsed string. - */ - public function substituteSpecialEntities($string) { - return preg_replace_callback( - $this->_substituteEntitiesRegex, - array($this, 'specialEntityCallback'), - $string); - } - - /** - * Callback function for substituteSpecialEntities() that does the work. - * - * This callback has same syntax as nonSpecialEntityCallback(). - * - * @param $matches PCRE-style matches array, with 0 the entire match, and - * either index 1, 2 or 3 set with a hex value, dec value, - * or string (respectively). - * @returns Replacement string. - */ - protected function specialEntityCallback($matches) { - $entity = $matches[0]; - $is_num = (@$matches[0][1] === '#'); - if ($is_num) { - $is_hex = (@$entity[2] === 'x'); - $int = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; - return isset($this->_special_dec2str[$int]) ? - $this->_special_dec2str[$int] : - $entity; - } else { - return isset($this->_special_ent2dec[$matches[3]]) ? - $this->_special_ent2dec[$matches[3]] : - $entity; - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php b/libraries/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php deleted file mode 100644 index 970f9e0c9d4589da76b07c75252b12e3fa2e772c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -/** - * This filter extracts <style> blocks from input HTML, cleans them up - * using CSSTidy, and then places them in $purifier->context->get('StyleBlocks') - * so they can be used elsewhere in the document. - * - * @note - * See tests/HTMLPurifier/Filter/ExtractStyleBlocksTest.php for - * sample usage. - * - * @note - * This filter can also be used on stylesheets not included in the - * document--something purists would probably prefer. Just directly - * call HTMLPurifier_Filter_ExtractStyleBlocks->cleanCSS() - */ -class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter -{ - - public $name = 'ExtractStyleBlocks'; - private $_styleMatches = array(); - private $_tidy; - - public function __construct() { - $this->_tidy = new csstidy(); - } - - /** - * Save the contents of CSS blocks to style matches - * @param $matches preg_replace style $matches array - */ - protected function styleCallback($matches) { - $this->_styleMatches[] = $matches[1]; - } - - /** - * Removes inline <style> tags from HTML, saves them for later use - * @todo Extend to indicate non-text/css style blocks - */ - public function preFilter($html, $config, $context) { - $tidy = $config->get('FilterParam', 'ExtractStyleBlocksTidyImpl'); - if ($tidy !== null) $this->_tidy = $tidy; - $html = preg_replace_callback('#<style(?:\s.*)?>(.+)</style>#isU', array($this, 'styleCallback'), $html); - $style_blocks = $this->_styleMatches; - $this->_styleMatches = array(); // reset - $context->register('StyleBlocks', $style_blocks); // $context must not be reused - if ($this->_tidy) { - foreach ($style_blocks as &$style) { - $style = $this->cleanCSS($style, $config, $context); - } - } - return $html; - } - - /** - * Takes CSS (the stuff found in <style>) and cleans it. - * @warning Requires CSSTidy <http://csstidy.sourceforge.net/> - * @param $css CSS styling to clean - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return Cleaned CSS - */ - public function cleanCSS($css, $config, $context) { - // prepare scope - $scope = $config->get('FilterParam', 'ExtractStyleBlocksScope'); - if ($scope !== null) { - $scopes = array_map('trim', explode(',', $scope)); - } else { - $scopes = array(); - } - // remove comments from CSS - $css = trim($css); - if (strncmp('<!--', $css, 4) === 0) { - $css = substr($css, 4); - } - if (strlen($css) > 3 && substr($css, -3) == '-->') { - $css = substr($css, 0, -3); - } - $css = trim($css); - $this->_tidy->parse($css); - $css_definition = $config->getDefinition('CSS'); - foreach ($this->_tidy->css as $k => $decls) { - // $decls are all CSS declarations inside an @ selector - $new_decls = array(); - foreach ($decls as $selector => $style) { - $selector = trim($selector); - if ($selector === '') continue; // should not happen - if ($selector[0] === '+') { - if ($selector !== '' && $selector[0] === '+') continue; - } - if (!empty($scopes)) { - $new_selector = array(); // because multiple ones are possible - $selectors = array_map('trim', explode(',', $selector)); - foreach ($scopes as $s1) { - foreach ($selectors as $s2) { - $new_selector[] = "$s1 $s2"; - } - } - $selector = implode(', ', $new_selector); // now it's a string - } - foreach ($style as $name => $value) { - if (!isset($css_definition->info[$name])) { - unset($style[$name]); - continue; - } - $def = $css_definition->info[$name]; - $ret = $def->validate($value, $config, $context); - if ($ret === false) unset($style[$name]); - else $style[$name] = $ret; - } - $new_decls[$selector] = $style; - } - $this->_tidy->css[$k] = $new_decls; - } - // remove stuff that shouldn't be used, could be reenabled - // after security risks are analyzed - $this->_tidy->import = array(); - $this->_tidy->charset = null; - $this->_tidy->namespace = null; - $css = $this->_tidy->print->plain(); - // we are going to escape any special characters <>& to ensure - // that no funny business occurs (i.e. </style> in a font-family prop). - if ($config->get('FilterParam', 'ExtractStyleBlocksEscaping')) { - $css = str_replace( - array('<', '>', '&'), - array('\3C ', '\3E ', '\26 '), - $css - ); - } - return $css; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php b/libraries/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php deleted file mode 100644 index aca972f6c56fb1f4fcb7b00e6e1a0c4b91aa2033..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter -{ - - public $name = 'YouTube'; - - public function preFilter($html, $config, $context) { - $pre_regex = '#<object[^>]+>.+?'. - 'http://www.youtube.com/v/([A-Za-z0-9\-_]+).+?</object>#s'; - $pre_replace = '<span class="youtube-embed">\1</span>'; - return preg_replace($pre_regex, $pre_replace, $html); - } - - public function postFilter($html, $config, $context) { - $post_regex = '#<span class="youtube-embed">([A-Za-z0-9\-_]+)</span>#'; - return preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html); - } - - protected function armorUrl($url) { - return str_replace('--', '--', $url); - } - - protected function postFilterCallback($matches) { - $url = $this->armorUrl($matches[1]); - return '<object width="425" height="350" type="application/x-shockwave-flash" '. - 'data="http://www.youtube.com/v/'.$url.'">'. - '<param name="movie" value="http://www.youtube.com/v/'.$url.'"></param>'. - '<!--[if IE]>'. - '<embed src="http://www.youtube.com/v/'.$url.'"'. - 'type="application/x-shockwave-flash"'. - 'wmode="transparent" width="425" height="350" />'. - '<![endif]-->'. - '</object>'; - - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Generator.php b/libraries/htmlpurifier/library/HTMLPurifier/Generator.php deleted file mode 100644 index a1b96b9e49e59859daa21360e83b5e7f9a273c2c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Generator.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php - -/** - * Generates HTML from tokens. - * @todo Refactor interface so that configuration/context is determined - * upon instantiation, no need for messy generateFromTokens() calls - * @todo Make some of the more internal functions protected, and have - * unit tests work around that - */ -class HTMLPurifier_Generator -{ - - /** - * Whether or not generator should produce XML output - */ - private $_xhtml = true; - - /** - * :HACK: Whether or not generator should comment the insides of <script> tags - */ - private $_scriptFix = false; - - /** - * Cache of HTMLDefinition during HTML output to determine whether or - * not attributes should be minimized. - */ - private $_def; - - /** - * Cache of %Output.SortAttr - */ - private $_sortAttr; - - /** - * Configuration for the generator - */ - protected $config; - - /** - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - */ - public function __construct($config, $context) { - $this->config = $config; - $this->_scriptFix = $config->get('Output', 'CommentScriptContents'); - $this->_sortAttr = $config->get('Output', 'SortAttr'); - $this->_def = $config->getHTMLDefinition(); - $this->_xhtml = $this->_def->doctype->xml; - } - - /** - * Generates HTML from an array of tokens. - * @param $tokens Array of HTMLPurifier_Token - * @param $config HTMLPurifier_Config object - * @return Generated HTML - */ - public function generateFromTokens($tokens) { - if (!$tokens) return ''; - - // Basic algorithm - $html = ''; - for ($i = 0, $size = count($tokens); $i < $size; $i++) { - if ($this->_scriptFix && $tokens[$i]->name === 'script' - && $i + 2 < $size && $tokens[$i+2] instanceof HTMLPurifier_Token_End) { - // script special case - // the contents of the script block must be ONE token - // for this to work. - $html .= $this->generateFromToken($tokens[$i++]); - $html .= $this->generateScriptFromToken($tokens[$i++]); - } - $html .= $this->generateFromToken($tokens[$i]); - } - - // Tidy cleanup - if (extension_loaded('tidy') && $this->config->get('Output', 'TidyFormat')) { - $tidy = new Tidy; - $tidy->parseString($html, array( - 'indent'=> true, - 'output-xhtml' => $this->_xhtml, - 'show-body-only' => true, - 'indent-spaces' => 2, - 'wrap' => 68, - ), 'utf8'); - $tidy->cleanRepair(); - $html = (string) $tidy; // explicit cast necessary - } - - // Normalize newlines to system defined value - $nl = $this->config->get('Output', 'Newline'); - if ($nl === null) $nl = PHP_EOL; - if ($nl !== "\n") $html = str_replace("\n", $nl, $html); - return $html; - } - - /** - * Generates HTML from a single token. - * @param $token HTMLPurifier_Token object. - * @return Generated HTML - */ - public function generateFromToken($token) { - if (!$token instanceof HTMLPurifier_Token) { - trigger_error('Cannot generate HTML from non-HTMLPurifier_Token object', E_USER_WARNING); - return ''; - - } elseif ($token instanceof HTMLPurifier_Token_Start) { - $attr = $this->generateAttributes($token->attr, $token->name); - return '<' . $token->name . ($attr ? ' ' : '') . $attr . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_End) { - return '</' . $token->name . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - $attr = $this->generateAttributes($token->attr, $token->name); - return '<' . $token->name . ($attr ? ' ' : '') . $attr . - ( $this->_xhtml ? ' /': '' ) // <br /> v. <br> - . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_Text) { - return $this->escape($token->data, ENT_NOQUOTES); - - } elseif ($token instanceof HTMLPurifier_Token_Comment) { - return '<!--' . $token->data . '-->'; - } else { - return ''; - - } - } - - /** - * Special case processor for the contents of script tags - * @warning This runs into problems if there's already a literal - * --> somewhere inside the script contents. - */ - public function generateScriptFromToken($token) { - if (!$token instanceof HTMLPurifier_Token_Text) return $this->generateFromToken($token); - // Thanks <http://lachy.id.au/log/2005/05/script-comments> - $data = preg_replace('#//\s*$#', '', $token->data); - return '<!--//--><![CDATA[//><!--' . "\n" . trim($data) . "\n" . '//--><!]]>'; - } - - /** - * Generates attribute declarations from attribute array. - * @note This does not include the leading or trailing space. - * @param $assoc_array_of_attributes Attribute array - * @param $element Name of element attributes are for, used to check - * attribute minimization. - * @return Generate HTML fragment for insertion. - */ - public function generateAttributes($assoc_array_of_attributes, $element = false) { - $html = ''; - if ($this->_sortAttr) ksort($assoc_array_of_attributes); - foreach ($assoc_array_of_attributes as $key => $value) { - if (!$this->_xhtml) { - // Remove namespaced attributes - if (strpos($key, ':') !== false) continue; - // Check if we should minimize the attribute: val="val" -> val - if ($element && !empty($this->_def->info[$element]->attr[$key]->minimized)) { - $html .= $key . ' '; - continue; - } - } - $html .= $key.'="'.$this->escape($value).'" '; - } - return rtrim($html); - } - - /** - * Escapes raw text data. - * @todo This really ought to be protected, but until we have a facility - * for properly generating HTML here w/o using tokens, it stays - * public. - * @param $string String data to escape for HTML. - * @param $quote Quoting style, like htmlspecialchars. ENT_NOQUOTES is - * permissible for non-attribute output. - * @return String escaped data. - */ - public function escape($string, $quote = ENT_COMPAT) { - return htmlspecialchars($string, $quote, 'UTF-8'); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php b/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php deleted file mode 100644 index 44c22f6f8b53283d5bc2a28608d5b997d9cb2fb1..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/** - * XHTML 1.1 Forms module, defines all form-related elements found in HTML 4. - */ -class HTMLPurifier_HTMLModule_Forms extends HTMLPurifier_HTMLModule -{ - public $name = 'Forms'; - public $safe = false; - - public $content_sets = array( - 'Block' => 'Form', - 'Inline' => 'Formctrl', - ); - - public function setup($config) { - $form = $this->addElement('form', 'Form', - 'Required: Heading | List | Block | fieldset', 'Common', array( - 'accept' => 'ContentTypes', - 'accept-charset' => 'Charsets', - 'action*' => 'URI', - 'method' => 'Enum#get,post', - // really ContentType, but these two are the only ones used today - 'enctype' => 'Enum#application/x-www-form-urlencoded,multipart/form-data', - )); - $form->excludes = array('form' => true); - - $input = $this->addElement('input', 'Formctrl', 'Empty', 'Common', array( - 'accept' => 'ContentTypes', - 'accesskey' => 'Character', - 'alt' => 'Text', - 'checked' => 'Bool#checked', - 'disabled' => 'Bool#disabled', - 'maxlength' => 'Number', - 'name' => 'CDATA', - 'readonly' => 'Bool#readonly', - 'size' => 'Number', - 'src' => 'URI#embeds', - 'tabindex' => 'Number', - 'type' => 'Enum#text,password,checkbox,button,radio,submit,reset,file,hidden,image', - 'value' => 'CDATA', - )); - $input->attr_transform_post[] = new HTMLPurifier_AttrTransform_Input(); - - $this->addElement('select', 'Formctrl', 'Required: optgroup | option', 'Common', array( - 'disabled' => 'Bool#disabled', - 'multiple' => 'Bool#multiple', - 'name' => 'CDATA', - 'size' => 'Number', - 'tabindex' => 'Number', - )); - - $this->addElement('option', false, 'Optional: #PCDATA', 'Common', array( - 'disabled' => 'Bool#disabled', - 'label' => 'Text', - 'selected' => 'Bool#selected', - 'value' => 'CDATA', - )); - // It's illegal for there to be more than one selected, but not - // be multiple. Also, no selected means undefined behavior. This might - // be difficult to implement; perhaps an injector, or a context variable. - - $textarea = $this->addElement('textarea', 'Formctrl', 'Optional: #PCDATA', 'Common', array( - 'accesskey' => 'Character', - 'cols*' => 'Number', - 'disabled' => 'Bool#disabled', - 'name' => 'CDATA', - 'readonly' => 'Bool#readonly', - 'rows*' => 'Number', - 'tabindex' => 'Number', - )); - $textarea->attr_transform_pre[] = new HTMLPurifier_AttrTransform_Textarea(); - - $button = $this->addElement('button', 'Formctrl', 'Optional: #PCDATA | Heading | List | Block | Inline', 'Common', array( - 'accesskey' => 'Character', - 'disabled' => 'Bool#disabled', - 'name' => 'CDATA', - 'tabindex' => 'Number', - 'type' => 'Enum#button,submit,reset', - 'value' => 'CDATA', - )); - - // For exclusions, ideally we'd specify content sets, not literal elements - $button->excludes = $this->makeLookup( - 'form', 'fieldset', // Form - 'input', 'select', 'textarea', 'label', 'button', // Formctrl - 'a' // as per HTML 4.01 spec, this is omitted by modularization - ); - - // Extra exclusion: img usemap="" is not permitted within this element. - // We'll omit this for now, since we don't have any good way of - // indicating it yet. - - // This is HIGHLY user-unfriendly; we need a custom child-def for this - $this->addElement('fieldset', 'Form', 'Custom: (#WS?,legend,(Flow|#PCDATA)*)', 'Common'); - - $label = $this->addElement('label', 'Formctrl', 'Optional: #PCDATA | Inline', 'Common', array( - 'accesskey' => 'Character', - // 'for' => 'IDREF', // IDREF not implemented, cannot allow - )); - $label->excludes = array('label' => true); - - $this->addElement('legend', false, 'Optional: #PCDATA | Inline', 'Common', array( - 'accesskey' => 'Character', - )); - - $this->addElement('optgroup', false, 'Required: option', 'Common', array( - 'disabled' => 'Bool#disabled', - 'label*' => 'Text', - )); - - // Don't forget an injector for <isindex>. This one's a little complex - // because it maps to multiple elements. - - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php b/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php deleted file mode 100644 index d908a0ada6c0a53abd7511ed1cc63f25845be7d6..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule -{ - - public $name = 'Name'; - - public function setup($config) { - $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map'); - foreach ($elements as $name) { - $element = $this->addBlankElement($name); - $element->attr['name'] = 'ID'; - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php b/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php deleted file mode 100644 index c73dc3c4d19a93715f674a0eb7d2acb1185bd258..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 -{ - public $name = 'Tidy_Strict'; - public $defaultLevel = 'light'; - - public function makeFixes() { - $r = parent::makeFixes(); - $r['blockquote#content_model_type'] = 'strictblockquote'; - return $r; - } - - public $defines_child_def = true; - public function getChildDef($def) { - if ($def->content_model_type != 'strictblockquote') return parent::getChildDef($def); - return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model); - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php b/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php deleted file mode 100644 index 02e9438139704f5876fa347afc1725802fdc92ee..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php - -class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule_Tidy -{ - - public function makeFixes() { - - $r = array(); - - // == deprecated tag transforms =================================== - - $r['font'] = new HTMLPurifier_TagTransform_Font(); - $r['menu'] = new HTMLPurifier_TagTransform_Simple('ul'); - $r['dir'] = new HTMLPurifier_TagTransform_Simple('ul'); - $r['center'] = new HTMLPurifier_TagTransform_Simple('div', 'text-align:center;'); - $r['u'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:underline;'); - $r['s'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:line-through;'); - $r['strike'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:line-through;'); - - // == deprecated attribute transforms ============================= - - $r['caption@align'] = - new HTMLPurifier_AttrTransform_EnumToCSS('align', array( - // we're following IE's behavior, not Firefox's, due - // to the fact that no one supports caption-side:right, - // W3C included (with CSS 2.1). This is a slightly - // unreasonable attribute! - 'left' => 'text-align:left;', - 'right' => 'text-align:right;', - 'top' => 'caption-side:top;', - 'bottom' => 'caption-side:bottom;' // not supported by IE - )); - - // @align for img ------------------------------------------------- - $r['img@align'] = - new HTMLPurifier_AttrTransform_EnumToCSS('align', array( - 'left' => 'float:left;', - 'right' => 'float:right;', - 'top' => 'vertical-align:top;', - 'middle' => 'vertical-align:middle;', - 'bottom' => 'vertical-align:baseline;', - )); - - // @align for table ----------------------------------------------- - $r['table@align'] = - new HTMLPurifier_AttrTransform_EnumToCSS('align', array( - 'left' => 'float:left;', - 'center' => 'margin-left:auto;margin-right:auto;', - 'right' => 'float:right;' - )); - - // @align for hr ----------------------------------------------- - $r['hr@align'] = - new HTMLPurifier_AttrTransform_EnumToCSS('align', array( - // we use both text-align and margin because these work - // for different browsers (IE and Firefox, respectively) - // and the melange makes for a pretty cross-compatible - // solution - 'left' => 'margin-left:0;margin-right:auto;text-align:left;', - 'center' => 'margin-left:auto;margin-right:auto;text-align:center;', - 'right' => 'margin-left:auto;margin-right:0;text-align:right;' - )); - - // @align for h1, h2, h3, h4, h5, h6, p, div ---------------------- - // {{{ - $align_lookup = array(); - $align_values = array('left', 'right', 'center', 'justify'); - foreach ($align_values as $v) $align_lookup[$v] = "text-align:$v;"; - // }}} - $r['h1@align'] = - $r['h2@align'] = - $r['h3@align'] = - $r['h4@align'] = - $r['h5@align'] = - $r['h6@align'] = - $r['p@align'] = - $r['div@align'] = - new HTMLPurifier_AttrTransform_EnumToCSS('align', $align_lookup); - - // @bgcolor for table, tr, td, th --------------------------------- - $r['table@bgcolor'] = - $r['td@bgcolor'] = - $r['th@bgcolor'] = - new HTMLPurifier_AttrTransform_BgColor(); - - // @border for img ------------------------------------------------ - $r['img@border'] = new HTMLPurifier_AttrTransform_Border(); - - // @clear for br -------------------------------------------------- - $r['br@clear'] = - new HTMLPurifier_AttrTransform_EnumToCSS('clear', array( - 'left' => 'clear:left;', - 'right' => 'clear:right;', - 'all' => 'clear:both;', - 'none' => 'clear:none;', - )); - - // @height for td, th --------------------------------------------- - $r['td@height'] = - $r['th@height'] = - new HTMLPurifier_AttrTransform_Length('height'); - - // @hspace for img ------------------------------------------------ - $r['img@hspace'] = new HTMLPurifier_AttrTransform_ImgSpace('hspace'); - - // @noshade for hr ------------------------------------------------ - // this transformation is not precise but often good enough. - // different browsers use different styles to designate noshade - $r['hr@noshade'] = - new HTMLPurifier_AttrTransform_BoolToCSS( - 'noshade', - 'color:#808080;background-color:#808080;border:0;' - ); - - // @nowrap for td, th --------------------------------------------- - $r['td@nowrap'] = - $r['th@nowrap'] = - new HTMLPurifier_AttrTransform_BoolToCSS( - 'nowrap', - 'white-space:nowrap;' - ); - - // @size for hr -------------------------------------------------- - $r['hr@size'] = new HTMLPurifier_AttrTransform_Length('size', 'height'); - - // @type for li, ol, ul ------------------------------------------- - // {{{ - $ul_types = array( - 'disc' => 'list-style-type:disc;', - 'square' => 'list-style-type:square;', - 'circle' => 'list-style-type:circle;' - ); - $ol_types = array( - '1' => 'list-style-type:decimal;', - 'i' => 'list-style-type:lower-roman;', - 'I' => 'list-style-type:upper-roman;', - 'a' => 'list-style-type:lower-alpha;', - 'A' => 'list-style-type:upper-alpha;' - ); - $li_types = $ul_types + $ol_types; - // }}} - - $r['ul@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $ul_types); - $r['ol@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $ol_types, true); - $r['li@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $li_types, true); - - // @vspace for img ------------------------------------------------ - $r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace'); - - // @width for hr, td, th ------------------------------------------ - $r['td@width'] = - $r['th@width'] = - $r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width'); - - return $r; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php b/libraries/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php deleted file mode 100644 index d85ca97d92349abb77a6f35719f86169bedd97ba..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector -{ - - private $context, $config; - - public function prepare($config, $context) { - parent::prepare($config, $context); - $this->config = $config; - $this->context = $context; - $this->attrValidator = new HTMLPurifier_AttrValidator(); - } - - public function handleElement(&$token) { - if (!$token instanceof HTMLPurifier_Token_Start) return; - $next = false; - for ($i = $this->inputIndex + 1, $c = count($this->inputTokens); $i < $c; $i++) { - $next = $this->inputTokens[$i]; - if ($next instanceof HTMLPurifier_Token_Text && $next->is_whitespace) continue; - break; - } - if (!$next || ($next instanceof HTMLPurifier_Token_End && $next->name == $token->name)) { - if ($token->name == 'colgroup') return; - $this->attrValidator->validateToken($token, $this->config, $this->context); - $token->armor['ValidateAttributes'] = true; - if (isset($token->attr['id']) || isset($token->attr['name'])) return; - $token = $i - $this->inputIndex + 1; - for ($b = $this->inputIndex - 1; $b > 0; $b--) { - $prev = $this->inputTokens[$b]; - if ($prev instanceof HTMLPurifier_Token_Text && $prev->is_whitespace) continue; - break; - } - // This is safe because we removed the token that triggered this. - $this->rewind($b - 1); - return; - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en.php b/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en.php deleted file mode 100644 index aab2e52ebc823b4cfaf52fa9a2621dd3ee498419..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -$fallback = false; - -$messages = array( - -'HTMLPurifier' => 'HTML Purifier', - -// for unit testing purposes -'LanguageFactoryTest: Pizza' => 'Pizza', -'LanguageTest: List' => '$1', -'LanguageTest: Hash' => '$1.Keys; $1.Values', - -'Item separator' => ', ', -'Item separator last' => ' and ', // non-Harvard style - -'ErrorCollector: No errors' => 'No errors detected. However, because error reporting is still incomplete, there may have been errors that the error collector was not notified of; please inspect the output HTML carefully.', -'ErrorCollector: At line' => ' at line $line', -'ErrorCollector: Incidental errors' => 'Incidental errors', - -'Lexer: Unclosed comment' => 'Unclosed comment', -'Lexer: Unescaped lt' => 'Unescaped less-than sign (<) should be <', -'Lexer: Missing gt' => 'Missing greater-than sign (>), previous less-than sign (<) should be escaped', -'Lexer: Missing attribute key' => 'Attribute declaration has no key', -'Lexer: Missing end quote' => 'Attribute declaration has no end quote', - -'Strategy_RemoveForeignElements: Tag transform' => '<$1> element transformed into $CurrentToken.Serialized', -'Strategy_RemoveForeignElements: Missing required attribute' => '$CurrentToken.Compact element missing required attribute $1', -'Strategy_RemoveForeignElements: Foreign element to text' => 'Unrecognized $CurrentToken.Serialized tag converted to text', -'Strategy_RemoveForeignElements: Foreign element removed' => 'Unrecognized $CurrentToken.Serialized tag removed', -'Strategy_RemoveForeignElements: Comment removed' => 'Comment containing "$CurrentToken.Data" removed', -'Strategy_RemoveForeignElements: Foreign meta element removed' => 'Unrecognized $CurrentToken.Serialized meta tag and all descendants removed', -'Strategy_RemoveForeignElements: Token removed to end' => 'Tags and text starting from $1 element where removed to end', -'Strategy_RemoveForeignElements: Trailing hyphen in comment removed' => 'Trailing hyphen(s) in comment removed', -'Strategy_RemoveForeignElements: Hyphens in comment collapsed' => 'Double hyphens in comments are not allowed, and were collapsed into single hyphens', - -'Strategy_MakeWellFormed: Unnecessary end tag removed' => 'Unnecessary $CurrentToken.Serialized tag removed', -'Strategy_MakeWellFormed: Unnecessary end tag to text' => 'Unnecessary $CurrentToken.Serialized tag converted to text', -'Strategy_MakeWellFormed: Tag auto closed' => '$1.Compact started on line $1.Line auto-closed by $CurrentToken.Compact', -'Strategy_MakeWellFormed: Tag carryover' => '$1.Compact started on line $1.Line auto-continued into $CurrentToken.Compact', -'Strategy_MakeWellFormed: Stray end tag removed' => 'Stray $CurrentToken.Serialized tag removed', -'Strategy_MakeWellFormed: Stray end tag to text' => 'Stray $CurrentToken.Serialized tag converted to text', -'Strategy_MakeWellFormed: Tag closed by element end' => '$1.Compact tag started on line $1.Line closed by end of $CurrentToken.Serialized', -'Strategy_MakeWellFormed: Tag closed by document end' => '$1.Compact tag started on line $1.Line closed by end of document', - -'Strategy_FixNesting: Node removed' => '$CurrentToken.Compact node removed', -'Strategy_FixNesting: Node excluded' => '$CurrentToken.Compact node removed due to descendant exclusion by ancestor element', -'Strategy_FixNesting: Node reorganized' => 'Contents of $CurrentToken.Compact node reorganized to enforce its content model', -'Strategy_FixNesting: Node contents removed' => 'Contents of $CurrentToken.Compact node removed', - -'AttrValidator: Attributes transformed' => 'Attributes on $CurrentToken.Compact transformed from $1.Keys to $2.Keys', -'AttrValidator: Attribute removed' => '$CurrentAttr.Name attribute on $CurrentToken.Compact removed', - -); - -$errorNames = array( - E_ERROR => 'Error', - E_WARNING => 'Warning', - E_NOTICE => 'Notice' -); - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Lexer.php b/libraries/htmlpurifier/library/HTMLPurifier/Lexer.php deleted file mode 100644 index 94588699834d1f6de32508c257a7833f2827b555..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Lexer.php +++ /dev/null @@ -1,298 +0,0 @@ -<?php - -/** - * Forgivingly lexes HTML (SGML-style) markup into tokens. - * - * A lexer parses a string of SGML-style markup and converts them into - * corresponding tokens. It doesn't check for well-formedness, although its - * internal mechanism may make this automatic (such as the case of - * HTMLPurifier_Lexer_DOMLex). There are several implementations to choose - * from. - * - * A lexer is HTML-oriented: it might work with XML, but it's not - * recommended, as we adhere to a subset of the specification for optimization - * reasons. This might change in the future. Also, most tokenizers are not - * expected to handle DTDs or PIs. - * - * This class should not be directly instantiated, but you may use create() to - * retrieve a default copy of the lexer. Being a supertype, this class - * does not actually define any implementation, but offers commonly used - * convenience functions for subclasses. - * - * @note The unit tests will instantiate this class for testing purposes, as - * many of the utility functions require a class to be instantiated. - * This means that, even though this class is not runnable, it will - * not be declared abstract. - * - * @par - * - * @note - * We use tokens rather than create a DOM representation because DOM would: - * - * @par - * -# Require more processing and memory to create, - * -# Is not streamable, and - * -# Has the entire document structure (html and body not needed). - * - * @par - * However, DOM is helpful in that it makes it easy to move around nodes - * without a lot of lookaheads to see when a tag is closed. This is a - * limitation of the token system and some workarounds would be nice. - */ -class HTMLPurifier_Lexer -{ - - /** - * Whether or not this lexer implements line-number/column-number tracking. - * If it does, set to true. - */ - public $tracksLineNumbers = false; - - // -- STATIC ---------------------------------------------------------- - - /** - * Retrieves or sets the default Lexer as a Prototype Factory. - * - * By default HTMLPurifier_Lexer_DOMLex will be returned. There are - * a few exceptions involving special features that only DirectLex - * implements. - * - * @note The behavior of this class has changed, rather than accepting - * a prototype object, it now accepts a configuration object. - * To specify your own prototype, set %Core.LexerImpl to it. - * This change in behavior de-singletonizes the lexer object. - * - * @param $config Instance of HTMLPurifier_Config - * @return Concrete lexer. - */ - public static function create($config) { - - if (!($config instanceof HTMLPurifier_Config)) { - $lexer = $config; - trigger_error("Passing a prototype to - HTMLPurifier_Lexer::create() is deprecated, please instead - use %Core.LexerImpl", E_USER_WARNING); - } else { - $lexer = $config->get('Core', 'LexerImpl'); - } - - $needs_tracking = - $config->get('Core', 'MaintainLineNumbers') || - $config->get('Core', 'CollectErrors'); - - $inst = null; - if (is_object($lexer)) { - $inst = $lexer; - } else { - - if (is_null($lexer)) { do { - // auto-detection algorithm - - if ($needs_tracking) { - $lexer = 'DirectLex'; - break; - } - - if ( - class_exists('DOMDocument') && - method_exists('DOMDocument', 'loadHTML') && - !extension_loaded('domxml') - ) { - // check for DOM support, because while it's part of the - // core, it can be disabled compile time. Also, the PECL - // domxml extension overrides the default DOM, and is evil - // and nasty and we shan't bother to support it - $lexer = 'DOMLex'; - } else { - $lexer = 'DirectLex'; - } - - } while(0); } // do..while so we can break - - // instantiate recognized string names - switch ($lexer) { - case 'DOMLex': - $inst = new HTMLPurifier_Lexer_DOMLex(); - break; - case 'DirectLex': - $inst = new HTMLPurifier_Lexer_DirectLex(); - break; - case 'PH5P': - $inst = new HTMLPurifier_Lexer_PH5P(); - break; - default: - throw new HTMLPurifier_Exception("Cannot instantiate unrecognized Lexer type " . htmlspecialchars($lexer)); - } - } - - if (!$inst) throw new HTMLPurifier_Exception('No lexer was instantiated'); - - // once PHP DOM implements native line numbers, or we - // hack out something using XSLT, remove this stipulation - if ($needs_tracking && !$inst->tracksLineNumbers) { - throw new HTMLPurifier_Exception('Cannot use lexer that does not support line numbers with Core.MaintainLineNumbers or Core.CollectErrors (use DirectLex instead)'); - } - - return $inst; - - } - - // -- CONVENIENCE MEMBERS --------------------------------------------- - - public function __construct() { - $this->_entity_parser = new HTMLPurifier_EntityParser(); - } - - /** - * Most common entity to raw value conversion table for special entities. - */ - protected $_special_entity2str = - array( - '"' => '"', - '&' => '&', - '<' => '<', - '>' => '>', - ''' => "'", - ''' => "'", - ''' => "'" - ); - - /** - * Parses special entities into the proper characters. - * - * This string will translate escaped versions of the special characters - * into the correct ones. - * - * @warning - * You should be able to treat the output of this function as - * completely parsed, but that's only because all other entities should - * have been handled previously in substituteNonSpecialEntities() - * - * @param $string String character data to be parsed. - * @returns Parsed character data. - */ - public function parseData($string) { - - // following functions require at least one character - if ($string === '') return ''; - - // subtracts amps that cannot possibly be escaped - $num_amp = substr_count($string, '&') - substr_count($string, '& ') - - ($string[strlen($string)-1] === '&' ? 1 : 0); - - if (!$num_amp) return $string; // abort if no entities - $num_esc_amp = substr_count($string, '&'); - $string = strtr($string, $this->_special_entity2str); - - // code duplication for sake of optimization, see above - $num_amp_2 = substr_count($string, '&') - substr_count($string, '& ') - - ($string[strlen($string)-1] === '&' ? 1 : 0); - - if ($num_amp_2 <= $num_esc_amp) return $string; - - // hmm... now we have some uncommon entities. Use the callback. - $string = $this->_entity_parser->substituteSpecialEntities($string); - return $string; - } - - /** - * Lexes an HTML string into tokens. - * - * @param $string String HTML. - * @return HTMLPurifier_Token array representation of HTML. - */ - public function tokenizeHTML($string, $config, $context) { - trigger_error('Call to abstract class', E_USER_ERROR); - } - - /** - * Translates CDATA sections into regular sections (through escaping). - * - * @param $string HTML string to process. - * @returns HTML with CDATA sections escaped. - */ - protected static function escapeCDATA($string) { - return preg_replace_callback( - '/<!\[CDATA\[(.+?)\]\]>/s', - array('HTMLPurifier_Lexer', 'CDATACallback'), - $string - ); - } - - /** - * Special CDATA case that is especially convoluted for <script> - */ - protected static function escapeCommentedCDATA($string) { - return preg_replace_callback( - '#<!--//--><!\[CDATA\[//><!--(.+?)//--><!\]\]>#s', - array('HTMLPurifier_Lexer', 'CDATACallback'), - $string - ); - } - - /** - * Callback function for escapeCDATA() that does the work. - * - * @warning Though this is public in order to let the callback happen, - * calling it directly is not recommended. - * @params $matches PCRE matches array, with index 0 the entire match - * and 1 the inside of the CDATA section. - * @returns Escaped internals of the CDATA section. - */ - protected static function CDATACallback($matches) { - // not exactly sure why the character set is needed, but whatever - return htmlspecialchars($matches[1], ENT_COMPAT, 'UTF-8'); - } - - /** - * Takes a piece of HTML and normalizes it by converting entities, fixing - * encoding, extracting bits, and other good stuff. - * @todo Consider making protected - */ - public function normalize($html, $config, $context) { - - // normalize newlines to \n - $html = str_replace("\r\n", "\n", $html); - $html = str_replace("\r", "\n", $html); - - if ($config->get('HTML', 'Trusted')) { - // escape convoluted CDATA - $html = $this->escapeCommentedCDATA($html); - } - - // escape CDATA - $html = $this->escapeCDATA($html); - - // extract body from document if applicable - if ($config->get('Core', 'ConvertDocumentToFragment')) { - $html = $this->extractBody($html); - } - - // expand entities that aren't the big five - $html = $this->_entity_parser->substituteNonSpecialEntities($html); - - // clean into wellformed UTF-8 string for an SGML context: this has - // to be done after entity expansion because the entities sometimes - // represent non-SGML characters (horror, horror!) - $html = HTMLPurifier_Encoder::cleanUTF8($html); - - return $html; - } - - /** - * Takes a string of HTML (fragment or document) and returns the content - * @todo Consider making protected - */ - public function extractBody($html) { - $matches = array(); - $result = preg_match('!<body[^>]*>(.+?)</body>!is', $html, $matches); - if ($result) { - return $matches[1]; - } else { - return $html; - } - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php b/libraries/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php deleted file mode 100644 index 0db3974bfa0f1324459c5aaa71136035e009b415..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php +++ /dev/null @@ -1,213 +0,0 @@ -<?php - -/** - * Parser that uses PHP 5's DOM extension (part of the core). - * - * In PHP 5, the DOM XML extension was revamped into DOM and added to the core. - * It gives us a forgiving HTML parser, which we use to transform the HTML - * into a DOM, and then into the tokens. It is blazingly fast (for large - * documents, it performs twenty times faster than - * HTMLPurifier_Lexer_DirectLex,and is the default choice for PHP 5. - * - * @note Any empty elements will have empty tokens associated with them, even if - * this is prohibited by the spec. This is cannot be fixed until the spec - * comes into play. - * - * @note PHP's DOM extension does not actually parse any entities, we use - * our own function to do that. - * - * @warning DOM tends to drop whitespace, which may wreak havoc on indenting. - * If this is a huge problem, due to the fact that HTML is hand - * edited and you are unable to get a parser cache that caches the - * the output of HTML Purifier while keeping the original HTML lying - * around, you may want to run Tidy on the resulting output or use - * HTMLPurifier_DirectLex - */ - -class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer -{ - - private $factory; - - public function __construct() { - // setup the factory - parent::__construct(); - $this->factory = new HTMLPurifier_TokenFactory(); - } - - public function tokenizeHTML($html, $config, $context) { - - $html = $this->normalize($html, $config, $context); - - // attempt to armor stray angled brackets that cannot possibly - // form tags and thus are probably being used as emoticons - if ($config->get('Core', 'AggressivelyFixLt')) { - $char = '[^a-z!\/]'; - $comment = "/<!--(.*?)(-->|\z)/is"; - $html = preg_replace_callback($comment, array($this, 'callbackArmorCommentEntities'), $html); - do { - $old = $html; - $html = preg_replace("/<($char)/i", '<\\1', $html); - } while ($html !== $old); - $html = preg_replace_callback($comment, array($this, 'callbackUndoCommentSubst'), $html); // fix comments - } - - // preprocess html, essential for UTF-8 - $html = $this->wrapHTML($html, $config, $context); - - $doc = new DOMDocument(); - $doc->encoding = 'UTF-8'; // theoretically, the above has this covered - - set_error_handler(array($this, 'muteErrorHandler')); - $doc->loadHTML($html); - restore_error_handler(); - - $tokens = array(); - $this->tokenizeDOM( - $doc->getElementsByTagName('html')->item(0)-> // <html> - getElementsByTagName('body')->item(0)-> // <body> - getElementsByTagName('div')->item(0) // <div> - , $tokens); - return $tokens; - } - - /** - * Recursive function that tokenizes a node, putting it into an accumulator. - * - * @param $node DOMNode to be tokenized. - * @param $tokens Array-list of already tokenized tokens. - * @param $collect Says whether or start and close are collected, set to - * false at first recursion because it's the implicit DIV - * tag you're dealing with. - * @returns Tokens of node appended to previously passed tokens. - */ - protected function tokenizeDOM($node, &$tokens, $collect = false) { - - // intercept non element nodes. WE MUST catch all of them, - // but we're not getting the character reference nodes because - // those should have been preprocessed - if ($node->nodeType === XML_TEXT_NODE) { - $tokens[] = $this->factory->createText($node->data); - return; - } elseif ($node->nodeType === XML_CDATA_SECTION_NODE) { - // undo libxml's special treatment of <script> and <style> tags - $last = end($tokens); - $data = $node->data; - // (note $node->tagname is already normalized) - if ($last instanceof HTMLPurifier_Token_Start && ($last->name == 'script' || $last->name == 'style')) { - $new_data = trim($data); - if (substr($new_data, 0, 4) === '<!--') { - $data = substr($new_data, 4); - if (substr($data, -3) === '-->') { - $data = substr($data, 0, -3); - } else { - // Highly suspicious! Not sure what to do... - } - } - } - $tokens[] = $this->factory->createText($this->parseData($data)); - return; - } elseif ($node->nodeType === XML_COMMENT_NODE) { - // this is code is only invoked for comments in script/style in versions - // of libxml pre-2.6.28 (regular comments, of course, are still - // handled regularly) - $tokens[] = $this->factory->createComment($node->data); - return; - } elseif ( - // not-well tested: there may be other nodes we have to grab - $node->nodeType !== XML_ELEMENT_NODE - ) { - return; - } - - $attr = $node->hasAttributes() ? - $this->transformAttrToAssoc($node->attributes) : - array(); - - // We still have to make sure that the element actually IS empty - if (!$node->childNodes->length) { - if ($collect) { - $tokens[] = $this->factory->createEmpty($node->tagName, $attr); - } - } else { - if ($collect) { // don't wrap on first iteration - $tokens[] = $this->factory->createStart( - $tag_name = $node->tagName, // somehow, it get's dropped - $attr - ); - } - foreach ($node->childNodes as $node) { - // remember, it's an accumulator. Otherwise, we'd have - // to use array_merge - $this->tokenizeDOM($node, $tokens, true); - } - if ($collect) { - $tokens[] = $this->factory->createEnd($tag_name); - } - } - - } - - /** - * Converts a DOMNamedNodeMap of DOMAttr objects into an assoc array. - * - * @param $attribute_list DOMNamedNodeMap of DOMAttr objects. - * @returns Associative array of attributes. - */ - protected function transformAttrToAssoc($node_map) { - // NamedNodeMap is documented very well, so we're using undocumented - // features, namely, the fact that it implements Iterator and - // has a ->length attribute - if ($node_map->length === 0) return array(); - $array = array(); - foreach ($node_map as $attr) { - $array[$attr->name] = $attr->value; - } - return $array; - } - - /** - * An error handler that mutes all errors - */ - public function muteErrorHandler($errno, $errstr) {} - - /** - * Callback function for undoing escaping of stray angled brackets - * in comments - */ - public function callbackUndoCommentSubst($matches) { - return '<!--' . strtr($matches[1], array('&'=>'&','<'=>'<')) . $matches[2]; - } - - /** - * Callback function that entity-izes ampersands in comments so that - * callbackUndoCommentSubst doesn't clobber them - */ - public function callbackArmorCommentEntities($matches) { - return '<!--' . str_replace('&', '&', $matches[1]) . $matches[2]; - } - - /** - * Wraps an HTML fragment in the necessary HTML - */ - protected function wrapHTML($html, $config, $context) { - $def = $config->getDefinition('HTML'); - $ret = ''; - - if (!empty($def->doctype->dtdPublic) || !empty($def->doctype->dtdSystem)) { - $ret .= '<!DOCTYPE html '; - if (!empty($def->doctype->dtdPublic)) $ret .= 'PUBLIC "' . $def->doctype->dtdPublic . '" '; - if (!empty($def->doctype->dtdSystem)) $ret .= '"' . $def->doctype->dtdSystem . '" '; - $ret .= '>'; - } - - $ret .= '<html><head>'; - $ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; - // No protection if $html contains a stray </div>! - $ret .= '</head><body><div>'.$html.'</div></body></html>'; - return $ret; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PEARSax3.php b/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PEARSax3.php deleted file mode 100644 index 57cffa82ab0488495aeda42725d581cf07ed7e70..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PEARSax3.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php - -/** - * Proof-of-concept lexer that uses the PEAR package XML_HTMLSax3 to parse HTML. - * - * PEAR, not suprisingly, also has a SAX parser for HTML. I don't know - * very much about implementation, but it's fairly well written. However, that - * abstraction comes at a price: performance. You need to have it installed, - * and if the API changes, it might break our adapter. Not sure whether or not - * it's UTF-8 aware, but it has some entity parsing trouble (in all areas, - * text and attributes). - * - * Quite personally, I don't recommend using the PEAR class, and the defaults - * don't use it. The unit tests do perform the tests on the SAX parser too, but - * whatever it does for poorly formed HTML is up to it. - * - * @todo Generalize so that XML_HTMLSax is also supported. - * - * @warning Entity-resolution inside attributes is broken. - */ - -class HTMLPurifier_Lexer_PEARSax3 extends HTMLPurifier_Lexer -{ - - /** - * Internal accumulator array for SAX parsers. - */ - protected $tokens = array(); - - public function tokenizeHTML($string, $config, $context) { - - $this->tokens = array(); - - $string = $this->normalize($string, $config, $context); - - $parser = new XML_HTMLSax3(); - $parser->set_object($this); - $parser->set_element_handler('openHandler','closeHandler'); - $parser->set_data_handler('dataHandler'); - $parser->set_escape_handler('escapeHandler'); - - // doesn't seem to work correctly for attributes - $parser->set_option('XML_OPTION_ENTITIES_PARSED', 1); - - $parser->parse($string); - - return $this->tokens; - - } - - /** - * Open tag event handler, interface is defined by PEAR package. - */ - public function openHandler(&$parser, $name, $attrs, $closed) { - // entities are not resolved in attrs - foreach ($attrs as $key => $attr) { - $attrs[$key] = $this->parseData($attr); - } - if ($closed) { - $this->tokens[] = new HTMLPurifier_Token_Empty($name, $attrs); - } else { - $this->tokens[] = new HTMLPurifier_Token_Start($name, $attrs); - } - return true; - } - - /** - * Close tag event handler, interface is defined by PEAR package. - */ - public function closeHandler(&$parser, $name) { - // HTMLSax3 seems to always send empty tags an extra close tag - // check and ignore if you see it: - // [TESTME] to make sure it doesn't overreach - if ($this->tokens[count($this->tokens)-1] instanceof HTMLPurifier_Token_Empty) { - return true; - } - $this->tokens[] = new HTMLPurifier_Token_End($name); - return true; - } - - /** - * Data event handler, interface is defined by PEAR package. - */ - public function dataHandler(&$parser, $data) { - $this->tokens[] = new HTMLPurifier_Token_Text($data); - return true; - } - - /** - * Escaped text handler, interface is defined by PEAR package. - */ - public function escapeHandler(&$parser, $data) { - if (strpos($data, '--') === 0) { - $this->tokens[] = new HTMLPurifier_Token_Comment($data); - } - // CDATA is handled elsewhere, but if it was handled here: - //if (strpos($data, '[CDATA[') === 0) { - // $this->tokens[] = new HTMLPurifier_Token_Text( - // substr($data, 7, strlen($data) - 9) ); - //} - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php b/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php deleted file mode 100644 index fa1bf973e0b8bac95c00d40789148d90c2f52f51..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php +++ /dev/null @@ -1,3906 +0,0 @@ -<?php - -/** - * Experimental HTML5-based parser using Jeroen van der Meer's PH5P library. - * Occupies space in the HTML5 pseudo-namespace, which may cause conflicts. - * - * @note - * Recent changes to PHP's DOM extension have resulted in some fatal - * error conditions with the original version of PH5P. Pending changes, - * this lexer will punt to DirectLex if DOM throughs an exception. - */ - -class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex { - - public function tokenizeHTML($html, $config, $context) { - $new_html = $this->normalize($html, $config, $context); - $new_html = $this->wrapHTML($new_html, $config, $context); - try { - $parser = new HTML5($new_html); - $doc = $parser->save(); - } catch (DOMException $e) { - // Uh oh, it failed. Punt to DirectLex. - $lexer = new HTMLPurifier_Lexer_DirectLex(); - $context->register('PH5PError', $e); // save the error, so we can detect it - return $lexer->tokenizeHTML($html, $config, $context); // use original HTML - } - $tokens = array(); - $this->tokenizeDOM( - $doc->getElementsByTagName('html')->item(0)-> // <html> - getElementsByTagName('body')->item(0)-> // <body> - getElementsByTagName('div')->item(0) // <div> - , $tokens); - return $tokens; - } - -} - -/* - -Copyright 2007 Jeroen van der Meer <http://jero.net/> - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -class HTML5 { - private $data; - private $char; - private $EOF; - private $state; - private $tree; - private $token; - private $content_model; - private $escape = false; - private $entities = array('AElig;','AElig','AMP;','AMP','Aacute;','Aacute', - 'Acirc;','Acirc','Agrave;','Agrave','Alpha;','Aring;','Aring','Atilde;', - 'Atilde','Auml;','Auml','Beta;','COPY;','COPY','Ccedil;','Ccedil','Chi;', - 'Dagger;','Delta;','ETH;','ETH','Eacute;','Eacute','Ecirc;','Ecirc','Egrave;', - 'Egrave','Epsilon;','Eta;','Euml;','Euml','GT;','GT','Gamma;','Iacute;', - 'Iacute','Icirc;','Icirc','Igrave;','Igrave','Iota;','Iuml;','Iuml','Kappa;', - 'LT;','LT','Lambda;','Mu;','Ntilde;','Ntilde','Nu;','OElig;','Oacute;', - 'Oacute','Ocirc;','Ocirc','Ograve;','Ograve','Omega;','Omicron;','Oslash;', - 'Oslash','Otilde;','Otilde','Ouml;','Ouml','Phi;','Pi;','Prime;','Psi;', - 'QUOT;','QUOT','REG;','REG','Rho;','Scaron;','Sigma;','THORN;','THORN', - 'TRADE;','Tau;','Theta;','Uacute;','Uacute','Ucirc;','Ucirc','Ugrave;', - 'Ugrave','Upsilon;','Uuml;','Uuml','Xi;','Yacute;','Yacute','Yuml;','Zeta;', - 'aacute;','aacute','acirc;','acirc','acute;','acute','aelig;','aelig', - 'agrave;','agrave','alefsym;','alpha;','amp;','amp','and;','ang;','apos;', - 'aring;','aring','asymp;','atilde;','atilde','auml;','auml','bdquo;','beta;', - 'brvbar;','brvbar','bull;','cap;','ccedil;','ccedil','cedil;','cedil', - 'cent;','cent','chi;','circ;','clubs;','cong;','copy;','copy','crarr;', - 'cup;','curren;','curren','dArr;','dagger;','darr;','deg;','deg','delta;', - 'diams;','divide;','divide','eacute;','eacute','ecirc;','ecirc','egrave;', - 'egrave','empty;','emsp;','ensp;','epsilon;','equiv;','eta;','eth;','eth', - 'euml;','euml','euro;','exist;','fnof;','forall;','frac12;','frac12', - 'frac14;','frac14','frac34;','frac34','frasl;','gamma;','ge;','gt;','gt', - 'hArr;','harr;','hearts;','hellip;','iacute;','iacute','icirc;','icirc', - 'iexcl;','iexcl','igrave;','igrave','image;','infin;','int;','iota;', - 'iquest;','iquest','isin;','iuml;','iuml','kappa;','lArr;','lambda;','lang;', - 'laquo;','laquo','larr;','lceil;','ldquo;','le;','lfloor;','lowast;','loz;', - 'lrm;','lsaquo;','lsquo;','lt;','lt','macr;','macr','mdash;','micro;','micro', - 'middot;','middot','minus;','mu;','nabla;','nbsp;','nbsp','ndash;','ne;', - 'ni;','not;','not','notin;','nsub;','ntilde;','ntilde','nu;','oacute;', - 'oacute','ocirc;','ocirc','oelig;','ograve;','ograve','oline;','omega;', - 'omicron;','oplus;','or;','ordf;','ordf','ordm;','ordm','oslash;','oslash', - 'otilde;','otilde','otimes;','ouml;','ouml','para;','para','part;','permil;', - 'perp;','phi;','pi;','piv;','plusmn;','plusmn','pound;','pound','prime;', - 'prod;','prop;','psi;','quot;','quot','rArr;','radic;','rang;','raquo;', - 'raquo','rarr;','rceil;','rdquo;','real;','reg;','reg','rfloor;','rho;', - 'rlm;','rsaquo;','rsquo;','sbquo;','scaron;','sdot;','sect;','sect','shy;', - 'shy','sigma;','sigmaf;','sim;','spades;','sub;','sube;','sum;','sup1;', - 'sup1','sup2;','sup2','sup3;','sup3','sup;','supe;','szlig;','szlig','tau;', - 'there4;','theta;','thetasym;','thinsp;','thorn;','thorn','tilde;','times;', - 'times','trade;','uArr;','uacute;','uacute','uarr;','ucirc;','ucirc', - 'ugrave;','ugrave','uml;','uml','upsih;','upsilon;','uuml;','uuml','weierp;', - 'xi;','yacute;','yacute','yen;','yen','yuml;','yuml','zeta;','zwj;','zwnj;'); - - const PCDATA = 0; - const RCDATA = 1; - const CDATA = 2; - const PLAINTEXT = 3; - - const DOCTYPE = 0; - const STARTTAG = 1; - const ENDTAG = 2; - const COMMENT = 3; - const CHARACTR = 4; - const EOF = 5; - - public function __construct($data) { - $data = str_replace("\r\n", "\n", $data); - $data = str_replace("\r", null, $data); - - $this->data = $data; - $this->char = -1; - $this->EOF = strlen($data); - $this->tree = new HTML5TreeConstructer; - $this->content_model = self::PCDATA; - - $this->state = 'data'; - - while($this->state !== null) { - $this->{$this->state.'State'}(); - } - } - - public function save() { - return $this->tree->save(); - } - - private function char() { - return ($this->char < $this->EOF) - ? $this->data[$this->char] - : false; - } - - private function character($s, $l = 0) { - if($s + $l < $this->EOF) { - if($l === 0) { - return $this->data[$s]; - } else { - return substr($this->data, $s, $l); - } - } - } - - private function characters($char_class, $start) { - return preg_replace('#^(['.$char_class.']+).*#s', '\\1', substr($this->data, $start)); - } - - private function dataState() { - // Consume the next input character - $this->char++; - $char = $this->char(); - - if($char === '&' && ($this->content_model === self::PCDATA || $this->content_model === self::RCDATA)) { - /* U+0026 AMPERSAND (&) - When the content model flag is set to one of the PCDATA or RCDATA - states: switch to the entity data state. Otherwise: treat it as per - the "anything else" entry below. */ - $this->state = 'entityData'; - - } elseif($char === '-') { - /* If the content model flag is set to either the RCDATA state or - the CDATA state, and the escape flag is false, and there are at - least three characters before this one in the input stream, and the - last four characters in the input stream, including this one, are - U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, - and U+002D HYPHEN-MINUS ("<!--"), then set the escape flag to true. */ - if(($this->content_model === self::RCDATA || $this->content_model === - self::CDATA) && $this->escape === false && - $this->char >= 3 && $this->character($this->char - 4, 4) === '<!--') { - $this->escape = true; - } - - /* In any case, emit the input character as a character token. Stay - in the data state. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => $char - )); - - /* U+003C LESS-THAN SIGN (<) */ - } elseif($char === '<' && ($this->content_model === self::PCDATA || - (($this->content_model === self::RCDATA || - $this->content_model === self::CDATA) && $this->escape === false))) { - /* When the content model flag is set to the PCDATA state: switch - to the tag open state. - - When the content model flag is set to either the RCDATA state or - the CDATA state and the escape flag is false: switch to the tag - open state. - - Otherwise: treat it as per the "anything else" entry below. */ - $this->state = 'tagOpen'; - - /* U+003E GREATER-THAN SIGN (>) */ - } elseif($char === '>') { - /* If the content model flag is set to either the RCDATA state or - the CDATA state, and the escape flag is true, and the last three - characters in the input stream including this one are U+002D - HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN ("-->"), - set the escape flag to false. */ - if(($this->content_model === self::RCDATA || - $this->content_model === self::CDATA) && $this->escape === true && - $this->character($this->char, 3) === '-->') { - $this->escape = false; - } - - /* In any case, emit the input character as a character token. - Stay in the data state. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => $char - )); - - } elseif($this->char === $this->EOF) { - /* EOF - Emit an end-of-file token. */ - $this->EOF(); - - } elseif($this->content_model === self::PLAINTEXT) { - /* When the content model flag is set to the PLAINTEXT state - THIS DIFFERS GREATLY FROM THE SPEC: Get the remaining characters of - the text and emit it as a character token. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => substr($this->data, $this->char) - )); - - $this->EOF(); - - } else { - /* Anything else - THIS DIFFERS GREATLY FROM THE SPEC: Get as many character that - otherwise would also be treated as a character token and emit it - as a single character token. Stay in the data state. */ - $len = strcspn($this->data, '<&', $this->char); - $char = substr($this->data, $this->char, $len); - $this->char += $len - 1; - - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => $char - )); - - $this->state = 'data'; - } - } - - private function entityDataState() { - // Attempt to consume an entity. - $entity = $this->entity(); - - // If nothing is returned, emit a U+0026 AMPERSAND character token. - // Otherwise, emit the character token that was returned. - $char = (!$entity) ? '&' : $entity; - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => $char - )); - - // Finally, switch to the data state. - $this->state = 'data'; - } - - private function tagOpenState() { - switch($this->content_model) { - case self::RCDATA: - case self::CDATA: - /* If the next input character is a U+002F SOLIDUS (/) character, - consume it and switch to the close tag open state. If the next - input character is not a U+002F SOLIDUS (/) character, emit a - U+003C LESS-THAN SIGN character token and switch to the data - state to process the next input character. */ - if($this->character($this->char + 1) === '/') { - $this->char++; - $this->state = 'closeTagOpen'; - - } else { - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => '<' - )); - - $this->state = 'data'; - } - break; - - case self::PCDATA: - // If the content model flag is set to the PCDATA state - // Consume the next input character: - $this->char++; - $char = $this->char(); - - if($char === '!') { - /* U+0021 EXCLAMATION MARK (!) - Switch to the markup declaration open state. */ - $this->state = 'markupDeclarationOpen'; - - } elseif($char === '/') { - /* U+002F SOLIDUS (/) - Switch to the close tag open state. */ - $this->state = 'closeTagOpen'; - - } elseif(preg_match('/^[A-Za-z]$/', $char)) { - /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z - Create a new start tag token, set its tag name to the lowercase - version of the input character (add 0x0020 to the character's code - point), then switch to the tag name state. (Don't emit the token - yet; further details will be filled in before it is emitted.) */ - $this->token = array( - 'name' => strtolower($char), - 'type' => self::STARTTAG, - 'attr' => array() - ); - - $this->state = 'tagName'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Parse error. Emit a U+003C LESS-THAN SIGN character token and a - U+003E GREATER-THAN SIGN character token. Switch to the data state. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => '<>' - )); - - $this->state = 'data'; - - } elseif($char === '?') { - /* U+003F QUESTION MARK (?) - Parse error. Switch to the bogus comment state. */ - $this->state = 'bogusComment'; - - } else { - /* Anything else - Parse error. Emit a U+003C LESS-THAN SIGN character token and - reconsume the current input character in the data state. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => '<' - )); - - $this->char--; - $this->state = 'data'; - } - break; - } - } - - private function closeTagOpenState() { - $next_node = strtolower($this->characters('A-Za-z', $this->char + 1)); - $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName; - - if(($this->content_model === self::RCDATA || $this->content_model === self::CDATA) && - (!$the_same || ($the_same && (!preg_match('/[\t\n\x0b\x0c >\/]/', - $this->character($this->char + 1 + strlen($next_node))) || $this->EOF === $this->char)))) { - /* If the content model flag is set to the RCDATA or CDATA states then - examine the next few characters. If they do not match the tag name of - the last start tag token emitted (case insensitively), or if they do but - they are not immediately followed by one of the following characters: - * U+0009 CHARACTER TABULATION - * U+000A LINE FEED (LF) - * U+000B LINE TABULATION - * U+000C FORM FEED (FF) - * U+0020 SPACE - * U+003E GREATER-THAN SIGN (>) - * U+002F SOLIDUS (/) - * EOF - ...then there is a parse error. Emit a U+003C LESS-THAN SIGN character - token, a U+002F SOLIDUS character token, and switch to the data state - to process the next input character. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => '</' - )); - - $this->state = 'data'; - - } else { - /* Otherwise, if the content model flag is set to the PCDATA state, - or if the next few characters do match that tag name, consume the - next input character: */ - $this->char++; - $char = $this->char(); - - if(preg_match('/^[A-Za-z]$/', $char)) { - /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z - Create a new end tag token, set its tag name to the lowercase version - of the input character (add 0x0020 to the character's code point), then - switch to the tag name state. (Don't emit the token yet; further details - will be filled in before it is emitted.) */ - $this->token = array( - 'name' => strtolower($char), - 'type' => self::ENDTAG - ); - - $this->state = 'tagName'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Parse error. Switch to the data state. */ - $this->state = 'data'; - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit a U+003C LESS-THAN SIGN character token and a U+002F - SOLIDUS character token. Reconsume the EOF character in the data state. */ - $this->emitToken(array( - 'type' => self::CHARACTR, - 'data' => '</' - )); - - $this->char--; - $this->state = 'data'; - - } else { - /* Parse error. Switch to the bogus comment state. */ - $this->state = 'bogusComment'; - } - } - } - - private function tagNameState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } elseif($char === '/') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } else { - /* Anything else - Append the current input character to the current tag token's tag name. - Stay in the tag name state. */ - $this->token['name'] .= strtolower($char); - $this->state = 'tagName'; - } - } - - private function beforeAttributeNameState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($char === '/') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Stay in the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Start a new attribute in the current tag token. Set that attribute's - name to the current input character, and its value to the empty string. - Switch to the attribute name state. */ - $this->token['attr'][] = array( - 'name' => strtolower($char), - 'value' => null - ); - - $this->state = 'attributeName'; - } - } - - private function attributeNameState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute name state. */ - $this->state = 'afterAttributeName'; - - } elseif($char === '=') { - /* U+003D EQUALS SIGN (=) - Switch to the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($char === '/' && $this->character($this->char + 1) !== '>') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's name. - Stay in the attribute name state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['name'] .= strtolower($char); - - $this->state = 'attributeName'; - } - } - - private function afterAttributeNameState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the after attribute name state. */ - $this->state = 'afterAttributeName'; - - } elseif($char === '=') { - /* U+003D EQUALS SIGN (=) - Switch to the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($char === '/' && $this->character($this->char + 1) !== '>') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the - before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Start a new attribute in the current tag token. Set that attribute's - name to the current input character, and its value to the empty string. - Switch to the attribute name state. */ - $this->token['attr'][] = array( - 'name' => strtolower($char), - 'value' => null - ); - - $this->state = 'attributeName'; - } - } - - private function beforeAttributeValueState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif($char === '"') { - /* U+0022 QUOTATION MARK (") - Switch to the attribute value (double-quoted) state. */ - $this->state = 'attributeValueDoubleQuoted'; - - } elseif($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the attribute value (unquoted) state and reconsume - this input character. */ - $this->char--; - $this->state = 'attributeValueUnquoted'; - - } elseif($char === '\'') { - /* U+0027 APOSTROPHE (') - Switch to the attribute value (single-quoted) state. */ - $this->state = 'attributeValueSingleQuoted'; - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Switch to the attribute value (unquoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueUnquoted'; - } - } - - private function attributeValueDoubleQuotedState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if($char === '"') { - /* U+0022 QUOTATION MARK (") - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState('double'); - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the character - in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (double-quoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueDoubleQuoted'; - } - } - - private function attributeValueSingleQuotedState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if($char === '\'') { - /* U+0022 QUOTATION MARK (') - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState('single'); - - } elseif($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the character - in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (single-quoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueSingleQuoted'; - } - } - - private function attributeValueUnquotedState() { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState(); - - } elseif($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (unquoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueUnquoted'; - } - } - - private function entityInAttributeValueState() { - // Attempt to consume an entity. - $entity = $this->entity(); - - // If nothing is returned, append a U+0026 AMPERSAND character to the - // current attribute's value. Otherwise, emit the character token that - // was returned. - $char = (!$entity) - ? '&' - : $entity; - - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - } - - private function bogusCommentState() { - /* Consume every character up to the first U+003E GREATER-THAN SIGN - character (>) or the end of the file (EOF), whichever comes first. Emit - a comment token whose data is the concatenation of all the characters - starting from and including the character that caused the state machine - to switch into the bogus comment state, up to and including the last - consumed character before the U+003E character, if any, or up to the - end of the file otherwise. (If the comment was started by the end of - the file (EOF), the token is empty.) */ - $data = $this->characters('^>', $this->char); - $this->emitToken(array( - 'data' => $data, - 'type' => self::COMMENT - )); - - $this->char += strlen($data); - - /* Switch to the data state. */ - $this->state = 'data'; - - /* If the end of the file was reached, reconsume the EOF character. */ - if($this->char === $this->EOF) { - $this->char = $this->EOF - 1; - } - } - - private function markupDeclarationOpenState() { - /* If the next two characters are both U+002D HYPHEN-MINUS (-) - characters, consume those two characters, create a comment token whose - data is the empty string, and switch to the comment state. */ - if($this->character($this->char + 1, 2) === '--') { - $this->char += 2; - $this->state = 'comment'; - $this->token = array( - 'data' => null, - 'type' => self::COMMENT - ); - - /* Otherwise if the next seven chacacters are a case-insensitive match - for the word "DOCTYPE", then consume those characters and switch to the - DOCTYPE state. */ - } elseif(strtolower($this->character($this->char + 1, 7)) === 'doctype') { - $this->char += 7; - $this->state = 'doctype'; - - /* Otherwise, is is a parse error. Switch to the bogus comment state. - The next character that is consumed, if any, is the first character - that will be in the comment. */ - } else { - $this->char++; - $this->state = 'bogusComment'; - } - } - - private function commentState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - /* U+002D HYPHEN-MINUS (-) */ - if($char === '-') { - /* Switch to the comment dash state */ - $this->state = 'commentDash'; - - /* EOF */ - } elseif($this->char === $this->EOF) { - /* Parse error. Emit the comment token. Reconsume the EOF character - in the data state. */ - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - /* Anything else */ - } else { - /* Append the input character to the comment token's data. Stay in - the comment state. */ - $this->token['data'] .= $char; - } - } - - private function commentDashState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - /* U+002D HYPHEN-MINUS (-) */ - if($char === '-') { - /* Switch to the comment end state */ - $this->state = 'commentEnd'; - - /* EOF */ - } elseif($this->char === $this->EOF) { - /* Parse error. Emit the comment token. Reconsume the EOF character - in the data state. */ - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - /* Anything else */ - } else { - /* Append a U+002D HYPHEN-MINUS (-) character and the input - character to the comment token's data. Switch to the comment state. */ - $this->token['data'] .= '-'.$char; - $this->state = 'comment'; - } - } - - private function commentEndState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($char === '-') { - $this->token['data'] .= '-'; - - } elseif($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['data'] .= '--'.$char; - $this->state = 'comment'; - } - } - - private function doctypeState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - $this->state = 'beforeDoctypeName'; - - } else { - $this->char--; - $this->state = 'beforeDoctypeName'; - } - } - - private function beforeDoctypeNameState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - // Stay in the before DOCTYPE name state. - - } elseif(preg_match('/^[a-z]$/', $char)) { - $this->token = array( - 'name' => strtoupper($char), - 'type' => self::DOCTYPE, - 'error' => true - ); - - $this->state = 'doctypeName'; - - } elseif($char === '>') { - $this->emitToken(array( - 'name' => null, - 'type' => self::DOCTYPE, - 'error' => true - )); - - $this->state = 'data'; - - } elseif($this->char === $this->EOF) { - $this->emitToken(array( - 'name' => null, - 'type' => self::DOCTYPE, - 'error' => true - )); - - $this->char--; - $this->state = 'data'; - - } else { - $this->token = array( - 'name' => $char, - 'type' => self::DOCTYPE, - 'error' => true - ); - - $this->state = 'doctypeName'; - } - } - - private function doctypeNameState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - $this->state = 'AfterDoctypeName'; - - } elseif($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif(preg_match('/^[a-z]$/', $char)) { - $this->token['name'] .= strtoupper($char); - - } elseif($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['name'] .= $char; - } - - $this->token['error'] = ($this->token['name'] === 'HTML') - ? false - : true; - } - - private function afterDoctypeNameState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - // Stay in the DOCTYPE name state. - - } elseif($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['error'] = true; - $this->state = 'bogusDoctype'; - } - } - - private function bogusDoctypeState() { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - // Stay in the bogus DOCTYPE state. - } - } - - private function entity() { - $start = $this->char; - - // This section defines how to consume an entity. This definition is - // used when parsing entities in text and in attributes. - - // The behaviour depends on the identity of the next character (the - // one immediately after the U+0026 AMPERSAND character): - - switch($this->character($this->char + 1)) { - // U+0023 NUMBER SIGN (#) - case '#': - - // The behaviour further depends on the character after the - // U+0023 NUMBER SIGN: - switch($this->character($this->char + 1)) { - // U+0078 LATIN SMALL LETTER X - // U+0058 LATIN CAPITAL LETTER X - case 'x': - case 'X': - // Follow the steps below, but using the range of - // characters U+0030 DIGIT ZERO through to U+0039 DIGIT - // NINE, U+0061 LATIN SMALL LETTER A through to U+0066 - // LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER - // A, through to U+0046 LATIN CAPITAL LETTER F (in other - // words, 0-9, A-F, a-f). - $char = 1; - $char_class = '0-9A-Fa-f'; - break; - - // Anything else - default: - // Follow the steps below, but using the range of - // characters U+0030 DIGIT ZERO through to U+0039 DIGIT - // NINE (i.e. just 0-9). - $char = 0; - $char_class = '0-9'; - break; - } - - // Consume as many characters as match the range of characters - // given above. - $this->char++; - $e_name = $this->characters($char_class, $this->char + $char + 1); - $entity = $this->character($start, $this->char); - $cond = strlen($e_name) > 0; - - // The rest of the parsing happens bellow. - break; - - // Anything else - default: - // Consume the maximum number of characters possible, with the - // consumed characters case-sensitively matching one of the - // identifiers in the first column of the entities table. - $e_name = $this->characters('0-9A-Za-z;', $this->char + 1); - $len = strlen($e_name); - - for($c = 1; $c <= $len; $c++) { - $id = substr($e_name, 0, $c); - $this->char++; - - if(in_array($id, $this->entities)) { - if ($e_name[$c-1] !== ';') { - if ($c < $len && $e_name[$c] == ';') { - $this->char++; // consume extra semicolon - } - } - $entity = $id; - break; - } - } - - $cond = isset($entity); - // The rest of the parsing happens bellow. - break; - } - - if(!$cond) { - // If no match can be made, then this is a parse error. No - // characters are consumed, and nothing is returned. - $this->char = $start; - return false; - } - - // Return a character token for the character corresponding to the - // entity name (as given by the second column of the entities table). - return html_entity_decode('&'.$entity.';', ENT_QUOTES, 'UTF-8'); - } - - private function emitToken($token) { - $emit = $this->tree->emitToken($token); - - if(is_int($emit)) { - $this->content_model = $emit; - - } elseif($token['type'] === self::ENDTAG) { - $this->content_model = self::PCDATA; - } - } - - private function EOF() { - $this->state = null; - $this->tree->emitToken(array( - 'type' => self::EOF - )); - } -} - -class HTML5TreeConstructer { - public $stack = array(); - - private $phase; - private $mode; - private $dom; - private $foster_parent = null; - private $a_formatting = array(); - - private $head_pointer = null; - private $form_pointer = null; - - private $scoping = array('button','caption','html','marquee','object','table','td','th'); - private $formatting = array('a','b','big','em','font','i','nobr','s','small','strike','strong','tt','u'); - private $special = array('address','area','base','basefont','bgsound', - 'blockquote','body','br','center','col','colgroup','dd','dir','div','dl', - 'dt','embed','fieldset','form','frame','frameset','h1','h2','h3','h4','h5', - 'h6','head','hr','iframe','image','img','input','isindex','li','link', - 'listing','menu','meta','noembed','noframes','noscript','ol','optgroup', - 'option','p','param','plaintext','pre','script','select','spacer','style', - 'tbody','textarea','tfoot','thead','title','tr','ul','wbr'); - - // The different phases. - const INIT_PHASE = 0; - const ROOT_PHASE = 1; - const MAIN_PHASE = 2; - const END_PHASE = 3; - - // The different insertion modes for the main phase. - const BEFOR_HEAD = 0; - const IN_HEAD = 1; - const AFTER_HEAD = 2; - const IN_BODY = 3; - const IN_TABLE = 4; - const IN_CAPTION = 5; - const IN_CGROUP = 6; - const IN_TBODY = 7; - const IN_ROW = 8; - const IN_CELL = 9; - const IN_SELECT = 10; - const AFTER_BODY = 11; - const IN_FRAME = 12; - const AFTR_FRAME = 13; - - // The different types of elements. - const SPECIAL = 0; - const SCOPING = 1; - const FORMATTING = 2; - const PHRASING = 3; - - const MARKER = 0; - - public function __construct() { - $this->phase = self::INIT_PHASE; - $this->mode = self::BEFOR_HEAD; - $this->dom = new DOMDocument; - - $this->dom->encoding = 'UTF-8'; - $this->dom->preserveWhiteSpace = true; - $this->dom->substituteEntities = true; - $this->dom->strictErrorChecking = false; - } - - // Process tag tokens - public function emitToken($token) { - switch($this->phase) { - case self::INIT_PHASE: return $this->initPhase($token); break; - case self::ROOT_PHASE: return $this->rootElementPhase($token); break; - case self::MAIN_PHASE: return $this->mainPhase($token); break; - case self::END_PHASE : return $this->trailingEndPhase($token); break; - } - } - - private function initPhase($token) { - /* Initially, the tree construction stage must handle each token - emitted from the tokenisation stage as follows: */ - - /* A DOCTYPE token that is marked as being in error - A comment token - A start tag token - An end tag token - A character token that is not one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE - An end-of-file token */ - if((isset($token['error']) && $token['error']) || - $token['type'] === HTML5::COMMENT || - $token['type'] === HTML5::STARTTAG || - $token['type'] === HTML5::ENDTAG || - $token['type'] === HTML5::EOF || - ($token['type'] === HTML5::CHARACTR && isset($token['data']) && - !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']))) { - /* This specification does not define how to handle this case. In - particular, user agents may ignore the entirety of this specification - altogether for such documents, and instead invoke special parse modes - with a greater emphasis on backwards compatibility. */ - - $this->phase = self::ROOT_PHASE; - return $this->rootElementPhase($token); - - /* A DOCTYPE token marked as being correct */ - } elseif(isset($token['error']) && !$token['error']) { - /* Append a DocumentType node to the Document node, with the name - attribute set to the name given in the DOCTYPE token (which will be - "HTML"), and the other attributes specific to DocumentType objects - set to null, empty lists, or the empty string as appropriate. */ - $doctype = new DOMDocumentType(null, null, 'HTML'); - - /* Then, switch to the root element phase of the tree construction - stage. */ - $this->phase = self::ROOT_PHASE; - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif(isset($token['data']) && preg_match('/^[\t\n\x0b\x0c ]+$/', - $token['data'])) { - /* Append that character to the Document node. */ - $text = $this->dom->createTextNode($token['data']); - $this->dom->appendChild($text); - } - } - - private function rootElementPhase($token) { - /* After the initial phase, as each token is emitted from the tokenisation - stage, it must be processed as described in this section. */ - - /* A DOCTYPE token */ - if($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the Document object with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->dom->appendChild($comment); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append that character to the Document node. */ - $text = $this->dom->createTextNode($token['data']); - $this->dom->appendChild($text); - - /* A character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED - (FF), or U+0020 SPACE - A start tag token - An end tag token - An end-of-file token */ - } elseif(($token['type'] === HTML5::CHARACTR && - !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || - $token['type'] === HTML5::STARTTAG || - $token['type'] === HTML5::ENDTAG || - $token['type'] === HTML5::EOF) { - /* Create an HTMLElement node with the tag name html, in the HTML - namespace. Append it to the Document object. Switch to the main - phase and reprocess the current token. */ - $html = $this->dom->createElement('html'); - $this->dom->appendChild($html); - $this->stack[] = $html; - - $this->phase = self::MAIN_PHASE; - return $this->mainPhase($token); - } - } - - private function mainPhase($token) { - /* Tokens in the main phase must be handled as follows: */ - - /* A DOCTYPE token */ - if($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A start tag token with the tag name "html" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') { - /* If this start tag token was not the first start tag token, then - it is a parse error. */ - - /* For each attribute on the token, check to see if the attribute - is already present on the top element of the stack of open elements. - If it is not, add the attribute and its corresponding value to that - element. */ - foreach($token['attr'] as $attr) { - if(!$this->stack[0]->hasAttribute($attr['name'])) { - $this->stack[0]->setAttribute($attr['name'], $attr['value']); - } - } - - /* An end-of-file token */ - } elseif($token['type'] === HTML5::EOF) { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Anything else. */ - } else { - /* Depends on the insertion mode: */ - switch($this->mode) { - case self::BEFOR_HEAD: return $this->beforeHead($token); break; - case self::IN_HEAD: return $this->inHead($token); break; - case self::AFTER_HEAD: return $this->afterHead($token); break; - case self::IN_BODY: return $this->inBody($token); break; - case self::IN_TABLE: return $this->inTable($token); break; - case self::IN_CAPTION: return $this->inCaption($token); break; - case self::IN_CGROUP: return $this->inColumnGroup($token); break; - case self::IN_TBODY: return $this->inTableBody($token); break; - case self::IN_ROW: return $this->inRow($token); break; - case self::IN_CELL: return $this->inCell($token); break; - case self::IN_SELECT: return $this->inSelect($token); break; - case self::AFTER_BODY: return $this->afterBody($token); break; - case self::IN_FRAME: return $this->inFrameset($token); break; - case self::AFTR_FRAME: return $this->afterFrameset($token); break; - case self::END_PHASE: return $this->trailingEndPhase($token); break; - } - } - } - - private function beforeHead($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token with the tag name "head" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') { - /* Create an element for the token, append the new element to the - current node and push it onto the stack of open elements. */ - $element = $this->insertElement($token); - - /* Set the head element pointer to this new element node. */ - $this->head_pointer = $element; - - /* Change the insertion mode to "in head". */ - $this->mode = self::IN_HEAD; - - /* A start tag token whose tag name is one of: "base", "link", "meta", - "script", "style", "title". Or an end tag with the tag name "html". - Or a character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. Or any other start tag token */ - } elseif($token['type'] === HTML5::STARTTAG || - ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') || - ($token['type'] === HTML5::CHARACTR && !preg_match('/^[\t\n\x0b\x0c ]$/', - $token['data']))) { - /* Act as if a start tag token with the tag name "head" and no - attributes had been seen, then reprocess the current token. */ - $this->beforeHead(array( - 'name' => 'head', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - return $this->inHead($token); - - /* Any other end tag */ - } elseif($token['type'] === HTML5::ENDTAG) { - /* Parse error. Ignore the token. */ - } - } - - private function inHead($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. - - THIS DIFFERS FROM THE SPEC: If the current node is either a title, style - or script element, append the character to the current node regardless - of its content. */ - if(($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || ( - $token['type'] === HTML5::CHARACTR && in_array(end($this->stack)->nodeName, - array('title', 'style', 'script')))) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - } elseif($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('title', 'style', 'script'))) { - array_pop($this->stack); - return HTML5::PCDATA; - - /* A start tag with the tag name "title" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'title') { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - } else { - $element = $this->insertElement($token); - } - - /* Switch the tokeniser's content model flag to the RCDATA state. */ - return HTML5::RCDATA; - - /* A start tag with the tag name "style" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'style') { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - } else { - $this->insertElement($token); - } - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - - /* A start tag with the tag name "script" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'script') { - /* Create an element for the token. */ - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - - /* A start tag with the tag name "base", "link", or "meta" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('base', 'link', 'meta'))) { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - array_pop($this->stack); - - } else { - $this->insertElement($token); - } - - /* An end tag with the tag name "head" */ - } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { - /* If the current node is a head element, pop the current node off - the stack of open elements. */ - if($this->head_pointer->isSameNode(end($this->stack))) { - array_pop($this->stack); - - /* Otherwise, this is a parse error. */ - } else { - // k - } - - /* Change the insertion mode to "after head". */ - $this->mode = self::AFTER_HEAD; - - /* A start tag with the tag name "head" or an end tag except "html". */ - } elseif(($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') || - ($token['type'] === HTML5::ENDTAG && $token['name'] !== 'html')) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* If the current node is a head element, act as if an end tag - token with the tag name "head" had been seen. */ - if($this->head_pointer->isSameNode(end($this->stack))) { - $this->inHead(array( - 'name' => 'head', - 'type' => HTML5::ENDTAG - )); - - /* Otherwise, change the insertion mode to "after head". */ - } else { - $this->mode = self::AFTER_HEAD; - } - - /* Then, reprocess the current token. */ - return $this->afterHead($token); - } - } - - private function afterHead($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token with the tag name "body" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'body') { - /* Insert a body element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in body". */ - $this->mode = self::IN_BODY; - - /* A start tag token with the tag name "frameset" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'frameset') { - /* Insert a frameset element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in frameset". */ - $this->mode = self::IN_FRAME; - - /* A start tag token whose tag name is one of: "base", "link", "meta", - "script", "style", "title" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('base', 'link', 'meta', 'script', 'style', 'title'))) { - /* Parse error. Switch the insertion mode back to "in head" and - reprocess the token. */ - $this->mode = self::IN_HEAD; - return $this->inHead($token); - - /* Anything else */ - } else { - /* Act as if a start tag token with the tag name "body" and no - attributes had been seen, and then reprocess the current token. */ - $this->afterHead(array( - 'name' => 'body', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - return $this->inBody($token); - } - } - - private function inBody($token) { - /* Handle the token as follows: */ - - switch($token['type']) { - /* A character token */ - case HTML5::CHARACTR: - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Append the token's character to the current node. */ - $this->insertText($token['data']); - break; - - /* A comment token */ - case HTML5::COMMENT: - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - break; - - case HTML5::STARTTAG: - switch($token['name']) { - /* A start tag token whose tag name is one of: "script", - "style" */ - case 'script': case 'style': - /* Process the token as if the insertion mode had been "in - head". */ - return $this->inHead($token); - break; - - /* A start tag token whose tag name is one of: "base", "link", - "meta", "title" */ - case 'base': case 'link': case 'meta': case 'title': - /* Parse error. Process the token as if the insertion mode - had been "in head". */ - return $this->inHead($token); - break; - - /* A start tag token with the tag name "body" */ - case 'body': - /* Parse error. If the second element on the stack of open - elements is not a body element, or, if the stack of open - elements has only one node on it, then ignore the token. - (innerHTML case) */ - if(count($this->stack) === 1 || $this->stack[1]->nodeName !== 'body') { - // Ignore - - /* Otherwise, for each attribute on the token, check to see - if the attribute is already present on the body element (the - second element) on the stack of open elements. If it is not, - add the attribute and its corresponding value to that - element. */ - } else { - foreach($token['attr'] as $attr) { - if(!$this->stack[1]->hasAttribute($attr['name'])) { - $this->stack[1]->setAttribute($attr['name'], $attr['value']); - } - } - } - break; - - /* A start tag whose tag name is one of: "address", - "blockquote", "center", "dir", "div", "dl", "fieldset", - "listing", "menu", "ol", "p", "ul" */ - case 'address': case 'blockquote': case 'center': case 'dir': - case 'div': case 'dl': case 'fieldset': case 'listing': - case 'menu': case 'ol': case 'p': case 'ul': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - break; - - /* A start tag whose tag name is "form" */ - case 'form': - /* If the form element pointer is not null, ignore the - token with a parse error. */ - if($this->form_pointer !== null) { - // Ignore. - - /* Otherwise: */ - } else { - /* If the stack of open elements has a p element in - scope, then act as if an end tag with the tag name p - had been seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token, and set the - form element pointer to point to the element created. */ - $element = $this->insertElement($token); - $this->form_pointer = $element; - } - break; - - /* A start tag whose tag name is "li", "dd" or "dt" */ - case 'li': case 'dd': case 'dt': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - $stack_length = count($this->stack) - 1; - - for($n = $stack_length; 0 <= $n; $n--) { - /* 1. Initialise node to be the current node (the - bottommost node of the stack). */ - $stop = false; - $node = $this->stack[$n]; - $cat = $this->getElementCategory($node->tagName); - - /* 2. If node is an li, dd or dt element, then pop all - the nodes from the current node up to node, including - node, then stop this algorithm. */ - if($token['name'] === $node->tagName || ($token['name'] !== 'li' - && ($node->tagName === 'dd' || $node->tagName === 'dt'))) { - for($x = $stack_length; $x >= $n ; $x--) { - array_pop($this->stack); - } - - break; - } - - /* 3. If node is not in the formatting category, and is - not in the phrasing category, and is not an address or - div element, then stop this algorithm. */ - if($cat !== self::FORMATTING && $cat !== self::PHRASING && - $node->tagName !== 'address' && $node->tagName !== 'div') { - break; - } - } - - /* Finally, insert an HTML element with the same tag - name as the token's. */ - $this->insertElement($token); - break; - - /* A start tag token whose tag name is "plaintext" */ - case 'plaintext': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - return HTML5::PLAINTEXT; - break; - - /* A start tag whose tag name is one of: "h1", "h2", "h3", "h4", - "h5", "h6" */ - case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* If the stack of open elements has in scope an element whose - tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then - this is a parse error; pop elements from the stack until an - element with one of those tag names has been popped from the - stack. */ - while($this->elementInScope(array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))) { - array_pop($this->stack); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - break; - - /* A start tag whose tag name is "a" */ - case 'a': - /* If the list of active formatting elements contains - an element whose tag name is "a" between the end of the - list and the last marker on the list (or the start of - the list if there is no marker on the list), then this - is a parse error; act as if an end tag with the tag name - "a" had been seen, then remove that element from the list - of active formatting elements and the stack of open - elements if the end tag didn't already remove it (it - might not have if the element is not in table scope). */ - $leng = count($this->a_formatting); - - for($n = $leng - 1; $n >= 0; $n--) { - if($this->a_formatting[$n] === self::MARKER) { - break; - - } elseif($this->a_formatting[$n]->nodeName === 'a') { - $this->emitToken(array( - 'name' => 'a', - 'type' => HTML5::ENDTAG - )); - break; - } - } - - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $el = $this->insertElement($token); - - /* Add that element to the list of active formatting - elements. */ - $this->a_formatting[] = $el; - break; - - /* A start tag whose tag name is one of: "b", "big", "em", "font", - "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ - case 'b': case 'big': case 'em': case 'font': case 'i': - case 'nobr': case 's': case 'small': case 'strike': - case 'strong': case 'tt': case 'u': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $el = $this->insertElement($token); - - /* Add that element to the list of active formatting - elements. */ - $this->a_formatting[] = $el; - break; - - /* A start tag token whose tag name is "button" */ - case 'button': - /* If the stack of open elements has a button element in scope, - then this is a parse error; act as if an end tag with the tag - name "button" had been seen, then reprocess the token. (We don't - do that. Unnecessary.) */ - if($this->elementInScope('button')) { - $this->inBody(array( - 'name' => 'button', - 'type' => HTML5::ENDTAG - )); - } - - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - break; - - /* A start tag token whose tag name is one of: "marquee", "object" */ - case 'marquee': case 'object': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - break; - - /* A start tag token whose tag name is "xmp" */ - case 'xmp': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Switch the content model flag to the CDATA state. */ - return HTML5::CDATA; - break; - - /* A start tag whose tag name is "table" */ - case 'table': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in table". */ - $this->mode = self::IN_TABLE; - break; - - /* A start tag whose tag name is one of: "area", "basefont", - "bgsound", "br", "embed", "img", "param", "spacer", "wbr" */ - case 'area': case 'basefont': case 'bgsound': case 'br': - case 'embed': case 'img': case 'param': case 'spacer': - case 'wbr': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "hr" */ - case 'hr': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if($this->elementInScope('p')) { - $this->emitToken(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "image" */ - case 'image': - /* Parse error. Change the token's tag name to "img" and - reprocess it. (Don't ask.) */ - $token['name'] = 'img'; - return $this->inBody($token); - break; - - /* A start tag whose tag name is "input" */ - case 'input': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an input element for the token. */ - $element = $this->insertElement($token, false); - - /* If the form element pointer is not null, then associate the - input element with the form element pointed to by the form - element pointer. */ - $this->form_pointer !== null - ? $this->form_pointer->appendChild($element) - : end($this->stack)->appendChild($element); - - /* Pop that input element off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "isindex" */ - case 'isindex': - /* Parse error. */ - // w/e - - /* If the form element pointer is not null, - then ignore the token. */ - if($this->form_pointer === null) { - /* Act as if a start tag token with the tag name "form" had - been seen. */ - $this->inBody(array( - 'name' => 'body', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - /* Act as if a start tag token with the tag name "hr" had - been seen. */ - $this->inBody(array( - 'name' => 'hr', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - /* Act as if a start tag token with the tag name "p" had - been seen. */ - $this->inBody(array( - 'name' => 'p', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - /* Act as if a start tag token with the tag name "label" - had been seen. */ - $this->inBody(array( - 'name' => 'label', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - /* Act as if a stream of character tokens had been seen. */ - $this->insertText('This is a searchable index. '. - 'Insert your search keywords here: '); - - /* Act as if a start tag token with the tag name "input" - had been seen, with all the attributes from the "isindex" - token, except with the "name" attribute set to the value - "isindex" (ignoring any explicit "name" attribute). */ - $attr = $token['attr']; - $attr[] = array('name' => 'name', 'value' => 'isindex'); - - $this->inBody(array( - 'name' => 'input', - 'type' => HTML5::STARTTAG, - 'attr' => $attr - )); - - /* Act as if a stream of character tokens had been seen - (see below for what they should say). */ - $this->insertText('This is a searchable index. '. - 'Insert your search keywords here: '); - - /* Act as if an end tag token with the tag name "label" - had been seen. */ - $this->inBody(array( - 'name' => 'label', - 'type' => HTML5::ENDTAG - )); - - /* Act as if an end tag token with the tag name "p" had - been seen. */ - $this->inBody(array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - )); - - /* Act as if a start tag token with the tag name "hr" had - been seen. */ - $this->inBody(array( - 'name' => 'hr', - 'type' => HTML5::ENDTAG - )); - - /* Act as if an end tag token with the tag name "form" had - been seen. */ - $this->inBody(array( - 'name' => 'form', - 'type' => HTML5::ENDTAG - )); - } - break; - - /* A start tag whose tag name is "textarea" */ - case 'textarea': - $this->insertElement($token); - - /* Switch the tokeniser's content model flag to the - RCDATA state. */ - return HTML5::RCDATA; - break; - - /* A start tag whose tag name is one of: "iframe", "noembed", - "noframes" */ - case 'iframe': case 'noembed': case 'noframes': - $this->insertElement($token); - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - break; - - /* A start tag whose tag name is "select" */ - case 'select': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in select". */ - $this->mode = self::IN_SELECT; - break; - - /* A start or end tag whose tag name is one of: "caption", "col", - "colgroup", "frame", "frameset", "head", "option", "optgroup", - "tbody", "td", "tfoot", "th", "thead", "tr". */ - case 'caption': case 'col': case 'colgroup': case 'frame': - case 'frameset': case 'head': case 'option': case 'optgroup': - case 'tbody': case 'td': case 'tfoot': case 'th': case 'thead': - case 'tr': - // Parse error. Ignore the token. - break; - - /* A start or end tag whose tag name is one of: "event-source", - "section", "nav", "article", "aside", "header", "footer", - "datagrid", "command" */ - case 'event-source': case 'section': case 'nav': case 'article': - case 'aside': case 'header': case 'footer': case 'datagrid': - case 'command': - // Work in progress! - break; - - /* A start tag token not covered by the previous entries */ - default: - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - $this->insertElement($token, true, true); - break; - } - break; - - case HTML5::ENDTAG: - switch($token['name']) { - /* An end tag with the tag name "body" */ - case 'body': - /* If the second element in the stack of open elements is - not a body element, this is a parse error. Ignore the token. - (innerHTML case) */ - if(count($this->stack) < 2 || $this->stack[1]->nodeName !== 'body') { - // Ignore. - - /* If the current node is not the body element, then this - is a parse error. */ - } elseif(end($this->stack)->nodeName !== 'body') { - // Parse error. - } - - /* Change the insertion mode to "after body". */ - $this->mode = self::AFTER_BODY; - break; - - /* An end tag with the tag name "html" */ - case 'html': - /* Act as if an end tag with tag name "body" had been seen, - then, if that token wasn't ignored, reprocess the current - token. */ - $this->inBody(array( - 'name' => 'body', - 'type' => HTML5::ENDTAG - )); - - return $this->afterBody($token); - break; - - /* An end tag whose tag name is one of: "address", "blockquote", - "center", "dir", "div", "dl", "fieldset", "listing", "menu", - "ol", "pre", "ul" */ - case 'address': case 'blockquote': case 'center': case 'dir': - case 'div': case 'dl': case 'fieldset': case 'listing': - case 'menu': case 'ol': case 'pre': case 'ul': - /* If the stack of open elements has an element in scope - with the same tag name as that of the token, then generate - implied end tags. */ - if($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with - the same tag name as that of the token, then this - is a parse error. */ - // w/e - - /* If the stack of open elements has an element in - scope with the same tag name as that of the token, - then pop elements from this stack until an element - with that tag name has been popped from the stack. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is "form" */ - case 'form': - /* If the stack of open elements has an element in scope - with the same tag name as that of the token, then generate - implied end tags. */ - if($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - } - - if(end($this->stack)->nodeName !== $token['name']) { - /* Now, if the current node is not an element with the - same tag name as that of the token, then this is a parse - error. */ - // w/e - - } else { - /* Otherwise, if the current node is an element with - the same tag name as that of the token pop that element - from the stack. */ - array_pop($this->stack); - } - - /* In any case, set the form element pointer to null. */ - $this->form_pointer = null; - break; - - /* An end tag whose tag name is "p" */ - case 'p': - /* If the stack of open elements has a p element in scope, - then generate implied end tags, except for p elements. */ - if($this->elementInScope('p')) { - $this->generateImpliedEndTags(array('p')); - - /* If the current node is not a p element, then this is - a parse error. */ - // k - - /* If the stack of open elements has a p element in - scope, then pop elements from this stack until the stack - no longer has a p element in scope. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->elementInScope('p')) { - array_pop($this->stack); - - } else { - break; - } - } - } - break; - - /* An end tag whose tag name is "dd", "dt", or "li" */ - case 'dd': case 'dt': case 'li': - /* If the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then - generate implied end tags, except for elements with the - same tag name as the token. */ - if($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(array($token['name'])); - - /* If the current node is not an element with the same - tag name as the token, then this is a parse error. */ - // w/e - - /* If the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then - pop elements from this stack until an element with that - tag name has been popped from the stack. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is one of: "h1", "h2", "h3", "h4", - "h5", "h6" */ - case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': - $elements = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); - - /* If the stack of open elements has in scope an element whose - tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then - generate implied end tags. */ - if($this->elementInScope($elements)) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with the same - tag name as that of the token, then this is a parse error. */ - // w/e - - /* If the stack of open elements has in scope an element - whose tag name is one of "h1", "h2", "h3", "h4", "h5", or - "h6", then pop elements from the stack until an element - with one of those tag names has been popped from the stack. */ - while($this->elementInScope($elements)) { - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is one of: "a", "b", "big", "em", - "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ - case 'a': case 'b': case 'big': case 'em': case 'font': - case 'i': case 'nobr': case 's': case 'small': case 'strike': - case 'strong': case 'tt': case 'u': - /* 1. Let the formatting element be the last element in - the list of active formatting elements that: - * is between the end of the list and the last scope - marker in the list, if any, or the start of the list - otherwise, and - * has the same tag name as the token. - */ - while(true) { - for($a = count($this->a_formatting) - 1; $a >= 0; $a--) { - if($this->a_formatting[$a] === self::MARKER) { - break; - - } elseif($this->a_formatting[$a]->tagName === $token['name']) { - $formatting_element = $this->a_formatting[$a]; - $in_stack = in_array($formatting_element, $this->stack, true); - $fe_af_pos = $a; - break; - } - } - - /* If there is no such node, or, if that node is - also in the stack of open elements but the element - is not in scope, then this is a parse error. Abort - these steps. The token is ignored. */ - if(!isset($formatting_element) || ($in_stack && - !$this->elementInScope($token['name']))) { - break; - - /* Otherwise, if there is such a node, but that node - is not in the stack of open elements, then this is a - parse error; remove the element from the list, and - abort these steps. */ - } elseif(isset($formatting_element) && !$in_stack) { - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - break; - } - - /* 2. Let the furthest block be the topmost node in the - stack of open elements that is lower in the stack - than the formatting element, and is not an element in - the phrasing or formatting categories. There might - not be one. */ - $fe_s_pos = array_search($formatting_element, $this->stack, true); - $length = count($this->stack); - - for($s = $fe_s_pos + 1; $s < $length; $s++) { - $category = $this->getElementCategory($this->stack[$s]->nodeName); - - if($category !== self::PHRASING && $category !== self::FORMATTING) { - $furthest_block = $this->stack[$s]; - } - } - - /* 3. If there is no furthest block, then the UA must - skip the subsequent steps and instead just pop all - the nodes from the bottom of the stack of open - elements, from the current node up to the formatting - element, and remove the formatting element from the - list of active formatting elements. */ - if(!isset($furthest_block)) { - for($n = $length - 1; $n >= $fe_s_pos; $n--) { - array_pop($this->stack); - } - - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - break; - } - - /* 4. Let the common ancestor be the element - immediately above the formatting element in the stack - of open elements. */ - $common_ancestor = $this->stack[$fe_s_pos - 1]; - - /* 5. If the furthest block has a parent node, then - remove the furthest block from its parent node. */ - if($furthest_block->parentNode !== null) { - $furthest_block->parentNode->removeChild($furthest_block); - } - - /* 6. Let a bookmark note the position of the - formatting element in the list of active formatting - elements relative to the elements on either side - of it in the list. */ - $bookmark = $fe_af_pos; - - /* 7. Let node and last node be the furthest block. - Follow these steps: */ - $node = $furthest_block; - $last_node = $furthest_block; - - while(true) { - for($n = array_search($node, $this->stack, true) - 1; $n >= 0; $n--) { - /* 7.1 Let node be the element immediately - prior to node in the stack of open elements. */ - $node = $this->stack[$n]; - - /* 7.2 If node is not in the list of active - formatting elements, then remove node from - the stack of open elements and then go back - to step 1. */ - if(!in_array($node, $this->a_formatting, true)) { - unset($this->stack[$n]); - $this->stack = array_merge($this->stack); - - } else { - break; - } - } - - /* 7.3 Otherwise, if node is the formatting - element, then go to the next step in the overall - algorithm. */ - if($node === $formatting_element) { - break; - - /* 7.4 Otherwise, if last node is the furthest - block, then move the aforementioned bookmark to - be immediately after the node in the list of - active formatting elements. */ - } elseif($last_node === $furthest_block) { - $bookmark = array_search($node, $this->a_formatting, true) + 1; - } - - /* 7.5 If node has any children, perform a - shallow clone of node, replace the entry for - node in the list of active formatting elements - with an entry for the clone, replace the entry - for node in the stack of open elements with an - entry for the clone, and let node be the clone. */ - if($node->hasChildNodes()) { - $clone = $node->cloneNode(); - $s_pos = array_search($node, $this->stack, true); - $a_pos = array_search($node, $this->a_formatting, true); - - $this->stack[$s_pos] = $clone; - $this->a_formatting[$a_pos] = $clone; - $node = $clone; - } - - /* 7.6 Insert last node into node, first removing - it from its previous parent node if any. */ - if($last_node->parentNode !== null) { - $last_node->parentNode->removeChild($last_node); - } - - $node->appendChild($last_node); - - /* 7.7 Let last node be node. */ - $last_node = $node; - } - - /* 8. Insert whatever last node ended up being in - the previous step into the common ancestor node, - first removing it from its previous parent node if - any. */ - if($last_node->parentNode !== null) { - $last_node->parentNode->removeChild($last_node); - } - - $common_ancestor->appendChild($last_node); - - /* 9. Perform a shallow clone of the formatting - element. */ - $clone = $formatting_element->cloneNode(); - - /* 10. Take all of the child nodes of the furthest - block and append them to the clone created in the - last step. */ - while($furthest_block->hasChildNodes()) { - $child = $furthest_block->firstChild; - $furthest_block->removeChild($child); - $clone->appendChild($child); - } - - /* 11. Append that clone to the furthest block. */ - $furthest_block->appendChild($clone); - - /* 12. Remove the formatting element from the list - of active formatting elements, and insert the clone - into the list of active formatting elements at the - position of the aforementioned bookmark. */ - $fe_af_pos = array_search($formatting_element, $this->a_formatting, true); - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - - $af_part1 = array_slice($this->a_formatting, 0, $bookmark - 1); - $af_part2 = array_slice($this->a_formatting, $bookmark, count($this->a_formatting)); - $this->a_formatting = array_merge($af_part1, array($clone), $af_part2); - - /* 13. Remove the formatting element from the stack - of open elements, and insert the clone into the stack - of open elements immediately after (i.e. in a more - deeply nested position than) the position of the - furthest block in that stack. */ - $fe_s_pos = array_search($formatting_element, $this->stack, true); - $fb_s_pos = array_search($furthest_block, $this->stack, true); - unset($this->stack[$fe_s_pos]); - - $s_part1 = array_slice($this->stack, 0, $fb_s_pos); - $s_part2 = array_slice($this->stack, $fb_s_pos + 1, count($this->stack)); - $this->stack = array_merge($s_part1, array($clone), $s_part2); - - /* 14. Jump back to step 1 in this series of steps. */ - unset($formatting_element, $fe_af_pos, $fe_s_pos, $furthest_block); - } - break; - - /* An end tag token whose tag name is one of: "button", - "marquee", "object" */ - case 'button': case 'marquee': case 'object': - /* If the stack of open elements has an element in scope whose - tag name matches the tag name of the token, then generate implied - tags. */ - if($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with the same - tag name as the token, then this is a parse error. */ - // k - - /* Now, if the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then pop - elements from the stack until that element has been popped from - the stack, and clear the list of active formatting elements up - to the last marker. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - - $marker = end(array_keys($this->a_formatting, self::MARKER, true)); - - for($n = count($this->a_formatting) - 1; $n > $marker; $n--) { - array_pop($this->a_formatting); - } - } - break; - - /* Or an end tag whose tag name is one of: "area", "basefont", - "bgsound", "br", "embed", "hr", "iframe", "image", "img", - "input", "isindex", "noembed", "noframes", "param", "select", - "spacer", "table", "textarea", "wbr" */ - case 'area': case 'basefont': case 'bgsound': case 'br': - case 'embed': case 'hr': case 'iframe': case 'image': - case 'img': case 'input': case 'isindex': case 'noembed': - case 'noframes': case 'param': case 'select': case 'spacer': - case 'table': case 'textarea': case 'wbr': - // Parse error. Ignore the token. - break; - - /* An end tag token not covered by the previous entries */ - default: - for($n = count($this->stack) - 1; $n >= 0; $n--) { - /* Initialise node to be the current node (the bottommost - node of the stack). */ - $node = end($this->stack); - - /* If node has the same tag name as the end tag token, - then: */ - if($token['name'] === $node->nodeName) { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* If the tag name of the end tag token does not - match the tag name of the current node, this is a - parse error. */ - // k - - /* Pop all the nodes from the current node up to - node, including node, then stop this algorithm. */ - for($x = count($this->stack) - $n; $x >= $n; $x--) { - array_pop($this->stack); - } - - } else { - $category = $this->getElementCategory($node); - - if($category !== self::SPECIAL && $category !== self::SCOPING) { - /* Otherwise, if node is in neither the formatting - category nor the phrasing category, then this is a - parse error. Stop this algorithm. The end tag token - is ignored. */ - return false; - } - } - } - break; - } - break; - } - } - - private function inTable($token) { - $clear = array('html', 'table'); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $text = $this->dom->createTextNode($token['data']); - end($this->stack)->appendChild($text); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - end($this->stack)->appendChild($comment); - - /* A start tag whose tag name is "caption" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'caption') { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - - /* Insert an HTML element for the token, then switch the - insertion mode to "in caption". */ - $this->insertElement($token); - $this->mode = self::IN_CAPTION; - - /* A start tag whose tag name is "colgroup" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'colgroup') { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the - insertion mode to "in column group". */ - $this->insertElement($token); - $this->mode = self::IN_CGROUP; - - /* A start tag whose tag name is "col" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'col') { - $this->inTable(array( - 'name' => 'colgroup', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - $this->inColumnGroup($token); - - /* A start tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('tbody', 'tfoot', 'thead'))) { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the insertion - mode to "in table body". */ - $this->insertElement($token); - $this->mode = self::IN_TBODY; - - /* A start tag whose tag name is one of: "td", "th", "tr" */ - } elseif($token['type'] === HTML5::STARTTAG && - in_array($token['name'], array('td', 'th', 'tr'))) { - /* Act as if a start tag token with the tag name "tbody" had been - seen, then reprocess the current token. */ - $this->inTable(array( - 'name' => 'tbody', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - return $this->inTableBody($token); - - /* A start tag whose tag name is "table" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'table') { - /* Parse error. Act as if an end tag token with the tag name "table" - had been seen, then, if that token wasn't ignored, reprocess the - current token. */ - $this->inTable(array( - 'name' => 'table', - 'type' => HTML5::ENDTAG - )); - - return $this->mainPhase($token); - - /* An end tag whose tag name is "table" */ - } elseif($token['type'] === HTML5::ENDTAG && - $token['name'] === 'table') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if(!$this->elementInScope($token['name'], true)) { - return false; - - /* Otherwise: */ - } else { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Now, if the current node is not a table element, then this - is a parse error. */ - // w/e - - /* Pop elements from this stack until a table element has been - popped from the stack. */ - while(true) { - $current = end($this->stack)->nodeName; - array_pop($this->stack); - - if($current === 'table') { - break; - } - } - - /* Reset the insertion mode appropriately. */ - $this->resetInsertionMode(); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('body', 'caption', 'col', 'colgroup', 'html', 'tbody', 'td', - 'tfoot', 'th', 'thead', 'tr'))) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* Parse error. Process the token as if the insertion mode was "in - body", with the following exception: */ - - /* If the current node is a table, tbody, tfoot, thead, or tr - element, then, whenever a node would be inserted into the current - node, it must instead be inserted into the foster parent element. */ - if(in_array(end($this->stack)->nodeName, - array('table', 'tbody', 'tfoot', 'thead', 'tr'))) { - /* The foster parent element is the parent element of the last - table element in the stack of open elements, if there is a - table element and it has such a parent element. If there is no - table element in the stack of open elements (innerHTML case), - then the foster parent element is the first element in the - stack of open elements (the html element). Otherwise, if there - is a table element in the stack of open elements, but the last - table element in the stack of open elements has no parent, or - its parent node is not an element, then the foster parent - element is the element before the last table element in the - stack of open elements. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->stack[$n]->nodeName === 'table') { - $table = $this->stack[$n]; - break; - } - } - - if(isset($table) && $table->parentNode !== null) { - $this->foster_parent = $table->parentNode; - - } elseif(!isset($table)) { - $this->foster_parent = $this->stack[0]; - - } elseif(isset($table) && ($table->parentNode === null || - $table->parentNode->nodeType !== XML_ELEMENT_NODE)) { - $this->foster_parent = $this->stack[$n - 1]; - } - } - - $this->inBody($token); - } - } - - private function inCaption($token) { - /* An end tag whose tag name is "caption" */ - if($token['type'] === HTML5::ENDTAG && $token['name'] === 'caption') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore - - /* Otherwise: */ - } else { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Now, if the current node is not a caption element, then this - is a parse error. */ - // w/e - - /* Pop elements from this stack until a caption element has - been popped from the stack. */ - while(true) { - $node = end($this->stack)->nodeName; - array_pop($this->stack); - - if($node === 'caption') { - break; - } - } - - /* Clear the list of active formatting elements up to the last - marker. */ - $this->clearTheActiveFormattingElementsUpToTheLastMarker(); - - /* Switch the insertion mode to "in table". */ - $this->mode = self::IN_TABLE; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr", or an end tag whose tag - name is "table" */ - } elseif(($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', - 'thead', 'tr'))) || ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'table')) { - /* Parse error. Act as if an end tag with the tag name "caption" - had been seen, then, if that token wasn't ignored, reprocess the - current token. */ - $this->inCaption(array( - 'name' => 'caption', - 'type' => HTML5::ENDTAG - )); - - return $this->inTable($token); - - /* An end tag whose tag name is one of: "body", "col", "colgroup", - "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('body', 'col', 'colgroup', 'html', 'tbody', 'tfoot', 'th', - 'thead', 'tr'))) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in body". */ - $this->inBody($token); - } - } - - private function inColumnGroup($token) { - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $text = $this->dom->createTextNode($token['data']); - end($this->stack)->appendChild($text); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - end($this->stack)->appendChild($comment); - - /* A start tag whose tag name is "col" */ - } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'col') { - /* Insert a col element for the token. Immediately pop the current - node off the stack of open elements. */ - $this->insertElement($token); - array_pop($this->stack); - - /* An end tag whose tag name is "colgroup" */ - } elseif($token['type'] === HTML5::ENDTAG && - $token['name'] === 'colgroup') { - /* If the current node is the root html element, then this is a - parse error, ignore the token. (innerHTML case) */ - if(end($this->stack)->nodeName === 'html') { - // Ignore - - /* Otherwise, pop the current node (which will be a colgroup - element) from the stack of open elements. Switch the insertion - mode to "in table". */ - } else { - array_pop($this->stack); - $this->mode = self::IN_TABLE; - } - - /* An end tag whose tag name is "col" */ - } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'col') { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Act as if an end tag with the tag name "colgroup" had been seen, - and then, if that token wasn't ignored, reprocess the current token. */ - $this->inColumnGroup(array( - 'name' => 'colgroup', - 'type' => HTML5::ENDTAG - )); - - return $this->inTable($token); - } - } - - private function inTableBody($token) { - $clear = array('tbody', 'tfoot', 'thead', 'html'); - - /* A start tag whose tag name is "tr" */ - if($token['type'] === HTML5::STARTTAG && $token['name'] === 'tr') { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Insert a tr element for the token, then switch the insertion - mode to "in row". */ - $this->insertElement($token); - $this->mode = self::IN_ROW; - - /* A start tag whose tag name is one of: "th", "td" */ - } elseif($token['type'] === HTML5::STARTTAG && - ($token['name'] === 'th' || $token['name'] === 'td')) { - /* Parse error. Act as if a start tag with the tag name "tr" had - been seen, then reprocess the current token. */ - $this->inTableBody(array( - 'name' => 'tr', - 'type' => HTML5::STARTTAG, - 'attr' => array() - )); - - return $this->inRow($token); - - /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('tbody', 'tfoot', 'thead'))) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore - - /* Otherwise: */ - } else { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Pop the current node from the stack of open elements. Switch - the insertion mode to "in table". */ - array_pop($this->stack); - $this->mode = self::IN_TABLE; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "tfoot", "thead", or an end tag whose tag name is "table" */ - } elseif(($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'tfoor', 'thead'))) || - ($token['type'] === HTML5::STARTTAG && $token['name'] === 'table')) { - /* If the stack of open elements does not have a tbody, thead, or - tfoot element in table scope, this is a parse error. Ignore the - token. (innerHTML case) */ - if(!$this->elementInScope(array('tbody', 'thead', 'tfoot'), true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Act as if an end tag with the same tag name as the current - node ("tbody", "tfoot", or "thead") had been seen, then - reprocess the current token. */ - $this->inTableBody(array( - 'name' => end($this->stack)->nodeName, - 'type' => HTML5::ENDTAG - )); - - return $this->mainPhase($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "td", "th", "tr" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr'))) { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in table". */ - $this->inTable($token); - } - } - - private function inRow($token) { - $clear = array('tr', 'html'); - - /* A start tag whose tag name is one of: "th", "td" */ - if($token['type'] === HTML5::STARTTAG && - ($token['name'] === 'th' || $token['name'] === 'td')) { - /* Clear the stack back to a table row context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the insertion - mode to "in cell". */ - $this->insertElement($token); - $this->mode = self::IN_CELL; - - /* Insert a marker at the end of the list of active formatting - elements. */ - $this->a_formatting[] = self::MARKER; - - /* An end tag whose tag name is "tr" */ - } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'tr') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Clear the stack back to a table row context. */ - $this->clearStackToTableContext($clear); - - /* Pop the current node (which will be a tr element) from the - stack of open elements. Switch the insertion mode to "in table - body". */ - array_pop($this->stack); - $this->mode = self::IN_TBODY; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "tfoot", "thead", "tr" or an end tag whose tag name is "table" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'tfoot', 'thead', 'tr'))) { - /* Act as if an end tag with the tag name "tr" had been seen, then, - if that token wasn't ignored, reprocess the current token. */ - $this->inRow(array( - 'name' => 'tr', - 'type' => HTML5::ENDTAG - )); - - return $this->inCell($token); - - /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('tbody', 'tfoot', 'thead'))) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Otherwise, act as if an end tag with the tag name "tr" had - been seen, then reprocess the current token. */ - $this->inRow(array( - 'name' => 'tr', - 'type' => HTML5::ENDTAG - )); - - return $this->inCell($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "td", "th" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr'))) { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in table". */ - $this->inTable($token); - } - } - - private function inCell($token) { - /* An end tag whose tag name is one of: "td", "th" */ - if($token['type'] === HTML5::ENDTAG && - ($token['name'] === 'td' || $token['name'] === 'th')) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as that of the token, then this is a - parse error and the token must be ignored. */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Generate implied end tags, except for elements with the same - tag name as the token. */ - $this->generateImpliedEndTags(array($token['name'])); - - /* Now, if the current node is not an element with the same tag - name as the token, then this is a parse error. */ - // k - - /* Pop elements from this stack until an element with the same - tag name as the token has been popped from the stack. */ - while(true) { - $node = end($this->stack)->nodeName; - array_pop($this->stack); - - if($node === $token['name']) { - break; - } - } - - /* Clear the list of active formatting elements up to the last - marker. */ - $this->clearTheActiveFormattingElementsUpToTheLastMarker(); - - /* Switch the insertion mode to "in row". (The current node - will be a tr element at this point.) */ - $this->mode = self::IN_ROW; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', - 'thead', 'tr'))) { - /* If the stack of open elements does not have a td or th element - in table scope, then this is a parse error; ignore the token. - (innerHTML case) */ - if(!$this->elementInScope(array('td', 'th'), true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', - 'thead', 'tr'))) { - /* If the stack of open elements does not have a td or th element - in table scope, then this is a parse error; ignore the token. - (innerHTML case) */ - if(!$this->elementInScope(array('td', 'th'), true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('body', 'caption', 'col', 'colgroup', 'html'))) { - /* Parse error. Ignore the token. */ - - /* An end tag whose tag name is one of: "table", "tbody", "tfoot", - "thead", "tr" */ - } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], - array('table', 'tbody', 'tfoot', 'thead', 'tr'))) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as that of the token (which can only - happen for "tbody", "tfoot" and "thead", or, in the innerHTML case), - then this is a parse error and the token must be ignored. */ - if(!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in body". */ - $this->inBody($token); - } - } - - private function inSelect($token) { - /* Handle the token as follows: */ - - /* A character token */ - if($token['type'] === HTML5::CHARACTR) { - /* Append the token's character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token whose tag name is "option" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'option') { - /* If the current node is an option element, act as if an end tag - with the tag name "option" had been seen. */ - if(end($this->stack)->nodeName === 'option') { - $this->inSelect(array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* A start tag token whose tag name is "optgroup" */ - } elseif($token['type'] === HTML5::STARTTAG && - $token['name'] === 'optgroup') { - /* If the current node is an option element, act as if an end tag - with the tag name "option" had been seen. */ - if(end($this->stack)->nodeName === 'option') { - $this->inSelect(array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - )); - } - - /* If the current node is an optgroup element, act as if an end tag - with the tag name "optgroup" had been seen. */ - if(end($this->stack)->nodeName === 'optgroup') { - $this->inSelect(array( - 'name' => 'optgroup', - 'type' => HTML5::ENDTAG - )); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* An end tag token whose tag name is "optgroup" */ - } elseif($token['type'] === HTML5::ENDTAG && - $token['name'] === 'optgroup') { - /* First, if the current node is an option element, and the node - immediately before it in the stack of open elements is an optgroup - element, then act as if an end tag with the tag name "option" had - been seen. */ - $elements_in_stack = count($this->stack); - - if($this->stack[$elements_in_stack - 1]->nodeName === 'option' && - $this->stack[$elements_in_stack - 2]->nodeName === 'optgroup') { - $this->inSelect(array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - )); - } - - /* If the current node is an optgroup element, then pop that node - from the stack of open elements. Otherwise, this is a parse error, - ignore the token. */ - if($this->stack[$elements_in_stack - 1] === 'optgroup') { - array_pop($this->stack); - } - - /* An end tag token whose tag name is "option" */ - } elseif($token['type'] === HTML5::ENDTAG && - $token['name'] === 'option') { - /* If the current node is an option element, then pop that node - from the stack of open elements. Otherwise, this is a parse error, - ignore the token. */ - if(end($this->stack)->nodeName === 'option') { - array_pop($this->stack); - } - - /* An end tag whose tag name is "select" */ - } elseif($token['type'] === HTML5::ENDTAG && - $token['name'] === 'select') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if(!$this->elementInScope($token['name'], true)) { - // w/e - - /* Otherwise: */ - } else { - /* Pop elements from the stack of open elements until a select - element has been popped from the stack. */ - while(true) { - $current = end($this->stack)->nodeName; - array_pop($this->stack); - - if($current === 'select') { - break; - } - } - - /* Reset the insertion mode appropriately. */ - $this->resetInsertionMode(); - } - - /* A start tag whose tag name is "select" */ - } elseif($token['name'] === 'select' && - $token['type'] === HTML5::STARTTAG) { - /* Parse error. Act as if the token had been an end tag with the - tag name "select" instead. */ - $this->inSelect(array( - 'name' => 'select', - 'type' => HTML5::ENDTAG - )); - - /* An end tag whose tag name is one of: "caption", "table", "tbody", - "tfoot", "thead", "tr", "td", "th" */ - } elseif(in_array($token['name'], array('caption', 'table', 'tbody', - 'tfoot', 'thead', 'tr', 'td', 'th')) && $token['type'] === HTML5::ENDTAG) { - /* Parse error. */ - // w/e - - /* If the stack of open elements has an element in table scope with - the same tag name as that of the token, then act as if an end tag - with the tag name "select" had been seen, and reprocess the token. - Otherwise, ignore the token. */ - if($this->elementInScope($token['name'], true)) { - $this->inSelect(array( - 'name' => 'select', - 'type' => HTML5::ENDTAG - )); - - $this->mainPhase($token); - } - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function afterBody($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Process the token as it would be processed if the insertion mode - was "in body". */ - $this->inBody($token); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the first element in the stack of open - elements (the html element), with the data attribute set to the - data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->stack[0]->appendChild($comment); - - /* An end tag with the tag name "html" */ - } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') { - /* If the parser was originally created in order to handle the - setting of an element's innerHTML attribute, this is a parse error; - ignore the token. (The element will be an html element in this - case.) (innerHTML case) */ - - /* Otherwise, switch to the trailing end phase. */ - $this->phase = self::END_PHASE; - - /* Anything else */ - } else { - /* Parse error. Set the insertion mode to "in body" and reprocess - the token. */ - $this->mode = self::IN_BODY; - return $this->inBody($token); - } - } - - private function inFrameset($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag with the tag name "frameset" */ - } elseif($token['name'] === 'frameset' && - $token['type'] === HTML5::STARTTAG) { - $this->insertElement($token); - - /* An end tag with the tag name "frameset" */ - } elseif($token['name'] === 'frameset' && - $token['type'] === HTML5::ENDTAG) { - /* If the current node is the root html element, then this is a - parse error; ignore the token. (innerHTML case) */ - if(end($this->stack)->nodeName === 'html') { - // Ignore - - } else { - /* Otherwise, pop the current node from the stack of open - elements. */ - array_pop($this->stack); - - /* If the parser was not originally created in order to handle - the setting of an element's innerHTML attribute (innerHTML case), - and the current node is no longer a frameset element, then change - the insertion mode to "after frameset". */ - $this->mode = self::AFTR_FRAME; - } - - /* A start tag with the tag name "frame" */ - } elseif($token['name'] === 'frame' && - $token['type'] === HTML5::STARTTAG) { - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - - /* A start tag with the tag name "noframes" */ - } elseif($token['name'] === 'noframes' && - $token['type'] === HTML5::STARTTAG) { - /* Process the token as if the insertion mode had been "in body". */ - $this->inBody($token); - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function afterFrameset($token) { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ - if($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* An end tag with the tag name "html" */ - } elseif($token['name'] === 'html' && - $token['type'] === HTML5::ENDTAG) { - /* Switch to the trailing end phase. */ - $this->phase = self::END_PHASE; - - /* A start tag with the tag name "noframes" */ - } elseif($token['name'] === 'noframes' && - $token['type'] === HTML5::STARTTAG) { - /* Process the token as if the insertion mode had been "in body". */ - $this->inBody($token); - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function trailingEndPhase($token) { - /* After the main phase, as each token is emitted from the tokenisation - stage, it must be processed as described in this section. */ - - /* A DOCTYPE token */ - if($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A comment token */ - } elseif($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the Document object with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->dom->appendChild($comment); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { - /* Process the token as it would be processed in the main phase. */ - $this->mainPhase($token); - - /* A character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. Or a start tag token. Or an end tag token. */ - } elseif(($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || - $token['type'] === HTML5::STARTTAG || $token['type'] === HTML5::ENDTAG) { - /* Parse error. Switch back to the main phase and reprocess the - token. */ - $this->phase = self::MAIN_PHASE; - return $this->mainPhase($token); - - /* An end-of-file token */ - } elseif($token['type'] === HTML5::EOF) { - /* OMG DONE!! */ - } - } - - private function insertElement($token, $append = true, $check = false) { - // Proprietary workaround for libxml2's limitations with tag names - if ($check) { - // Slightly modified HTML5 tag-name modification, - // removing anything that's not an ASCII letter, digit, or hyphen - $token['name'] = preg_replace('/[^a-z0-9-]/i', '', $token['name']); - // Remove leading hyphens and numbers - $token['name'] = ltrim($token['name'], '-0..9'); - // In theory, this should ever be needed, but just in case - if ($token['name'] === '') $token['name'] = 'span'; // arbitrary generic choice - } - - $el = $this->dom->createElement($token['name']); - - foreach($token['attr'] as $attr) { - if(!$el->hasAttribute($attr['name'])) { - $el->setAttribute($attr['name'], $attr['value']); - } - } - - $this->appendToRealParent($el); - $this->stack[] = $el; - - return $el; - } - - private function insertText($data) { - $text = $this->dom->createTextNode($data); - $this->appendToRealParent($text); - } - - private function insertComment($data) { - $comment = $this->dom->createComment($data); - $this->appendToRealParent($comment); - } - - private function appendToRealParent($node) { - if($this->foster_parent === null) { - end($this->stack)->appendChild($node); - - } elseif($this->foster_parent !== null) { - /* If the foster parent element is the parent element of the - last table element in the stack of open elements, then the new - node must be inserted immediately before the last table element - in the stack of open elements in the foster parent element; - otherwise, the new node must be appended to the foster parent - element. */ - for($n = count($this->stack) - 1; $n >= 0; $n--) { - if($this->stack[$n]->nodeName === 'table' && - $this->stack[$n]->parentNode !== null) { - $table = $this->stack[$n]; - break; - } - } - - if(isset($table) && $this->foster_parent->isSameNode($table->parentNode)) - $this->foster_parent->insertBefore($node, $table); - else - $this->foster_parent->appendChild($node); - - $this->foster_parent = null; - } - } - - private function elementInScope($el, $table = false) { - if(is_array($el)) { - foreach($el as $element) { - if($this->elementInScope($element, $table)) { - return true; - } - } - - return false; - } - - $leng = count($this->stack); - - for($n = 0; $n < $leng; $n++) { - /* 1. Initialise node to be the current node (the bottommost node of - the stack). */ - $node = $this->stack[$leng - 1 - $n]; - - if($node->tagName === $el) { - /* 2. If node is the target node, terminate in a match state. */ - return true; - - } elseif($node->tagName === 'table') { - /* 3. Otherwise, if node is a table element, terminate in a failure - state. */ - return false; - - } elseif($table === true && in_array($node->tagName, array('caption', 'td', - 'th', 'button', 'marquee', 'object'))) { - /* 4. Otherwise, if the algorithm is the "has an element in scope" - variant (rather than the "has an element in table scope" variant), - and node is one of the following, terminate in a failure state. */ - return false; - - } elseif($node === $node->ownerDocument->documentElement) { - /* 5. Otherwise, if node is an html element (root element), terminate - in a failure state. (This can only happen if the node is the topmost - node of the stack of open elements, and prevents the next step from - being invoked if there are no more elements in the stack.) */ - return false; - } - - /* Otherwise, set node to the previous entry in the stack of open - elements and return to step 2. (This will never fail, since the loop - will always terminate in the previous step if the top of the stack - is reached.) */ - } - } - - private function reconstructActiveFormattingElements() { - /* 1. If there are no entries in the list of active formatting elements, - then there is nothing to reconstruct; stop this algorithm. */ - $formatting_elements = count($this->a_formatting); - - if($formatting_elements === 0) { - return false; - } - - /* 3. Let entry be the last (most recently added) element in the list - of active formatting elements. */ - $entry = end($this->a_formatting); - - /* 2. If the last (most recently added) entry in the list of active - formatting elements is a marker, or if it is an element that is in the - stack of open elements, then there is nothing to reconstruct; stop this - algorithm. */ - if($entry === self::MARKER || in_array($entry, $this->stack, true)) { - return false; - } - - for($a = $formatting_elements - 1; $a >= 0; true) { - /* 4. If there are no entries before entry in the list of active - formatting elements, then jump to step 8. */ - if($a === 0) { - $step_seven = false; - break; - } - - /* 5. Let entry be the entry one earlier than entry in the list of - active formatting elements. */ - $a--; - $entry = $this->a_formatting[$a]; - - /* 6. If entry is neither a marker nor an element that is also in - thetack of open elements, go to step 4. */ - if($entry === self::MARKER || in_array($entry, $this->stack, true)) { - break; - } - } - - while(true) { - /* 7. Let entry be the element one later than entry in the list of - active formatting elements. */ - if(isset($step_seven) && $step_seven === true) { - $a++; - $entry = $this->a_formatting[$a]; - } - - /* 8. Perform a shallow clone of the element entry to obtain clone. */ - $clone = $entry->cloneNode(); - - /* 9. Append clone to the current node and push it onto the stack - of open elements so that it is the new current node. */ - end($this->stack)->appendChild($clone); - $this->stack[] = $clone; - - /* 10. Replace the entry for entry in the list with an entry for - clone. */ - $this->a_formatting[$a] = $clone; - - /* 11. If the entry for clone in the list of active formatting - elements is not the last entry in the list, return to step 7. */ - if(end($this->a_formatting) !== $clone) { - $step_seven = true; - } else { - break; - } - } - } - - private function clearTheActiveFormattingElementsUpToTheLastMarker() { - /* When the steps below require the UA to clear the list of active - formatting elements up to the last marker, the UA must perform the - following steps: */ - - while(true) { - /* 1. Let entry be the last (most recently added) entry in the list - of active formatting elements. */ - $entry = end($this->a_formatting); - - /* 2. Remove entry from the list of active formatting elements. */ - array_pop($this->a_formatting); - - /* 3. If entry was a marker, then stop the algorithm at this point. - The list has been cleared up to the last marker. */ - if($entry === self::MARKER) { - break; - } - } - } - - private function generateImpliedEndTags($exclude = array()) { - /* When the steps below require the UA to generate implied end tags, - then, if the current node is a dd element, a dt element, an li element, - a p element, a td element, a th element, or a tr element, the UA must - act as if an end tag with the respective tag name had been seen and - then generate implied end tags again. */ - $node = end($this->stack); - $elements = array_diff(array('dd', 'dt', 'li', 'p', 'td', 'th', 'tr'), $exclude); - - while(in_array(end($this->stack)->nodeName, $elements)) { - array_pop($this->stack); - } - } - - private function getElementCategory($node) { - $name = $node->tagName; - if(in_array($name, $this->special)) - return self::SPECIAL; - - elseif(in_array($name, $this->scoping)) - return self::SCOPING; - - elseif(in_array($name, $this->formatting)) - return self::FORMATTING; - - else - return self::PHRASING; - } - - private function clearStackToTableContext($elements) { - /* When the steps above require the UA to clear the stack back to a - table context, it means that the UA must, while the current node is not - a table element or an html element, pop elements from the stack of open - elements. If this causes any elements to be popped from the stack, then - this is a parse error. */ - while(true) { - $node = end($this->stack)->nodeName; - - if(in_array($node, $elements)) { - break; - } else { - array_pop($this->stack); - } - } - } - - private function resetInsertionMode() { - /* 1. Let last be false. */ - $last = false; - $leng = count($this->stack); - - for($n = $leng - 1; $n >= 0; $n--) { - /* 2. Let node be the last node in the stack of open elements. */ - $node = $this->stack[$n]; - - /* 3. If node is the first node in the stack of open elements, then - set last to true. If the element whose innerHTML attribute is being - set is neither a td element nor a th element, then set node to the - element whose innerHTML attribute is being set. (innerHTML case) */ - if($this->stack[0]->isSameNode($node)) { - $last = true; - } - - /* 4. If node is a select element, then switch the insertion mode to - "in select" and abort these steps. (innerHTML case) */ - if($node->nodeName === 'select') { - $this->mode = self::IN_SELECT; - break; - - /* 5. If node is a td or th element, then switch the insertion mode - to "in cell" and abort these steps. */ - } elseif($node->nodeName === 'td' || $node->nodeName === 'th') { - $this->mode = self::IN_CELL; - break; - - /* 6. If node is a tr element, then switch the insertion mode to - "in row" and abort these steps. */ - } elseif($node->nodeName === 'tr') { - $this->mode = self::IN_ROW; - break; - - /* 7. If node is a tbody, thead, or tfoot element, then switch the - insertion mode to "in table body" and abort these steps. */ - } elseif(in_array($node->nodeName, array('tbody', 'thead', 'tfoot'))) { - $this->mode = self::IN_TBODY; - break; - - /* 8. If node is a caption element, then switch the insertion mode - to "in caption" and abort these steps. */ - } elseif($node->nodeName === 'caption') { - $this->mode = self::IN_CAPTION; - break; - - /* 9. If node is a colgroup element, then switch the insertion mode - to "in column group" and abort these steps. (innerHTML case) */ - } elseif($node->nodeName === 'colgroup') { - $this->mode = self::IN_CGROUP; - break; - - /* 10. If node is a table element, then switch the insertion mode - to "in table" and abort these steps. */ - } elseif($node->nodeName === 'table') { - $this->mode = self::IN_TABLE; - break; - - /* 11. If node is a head element, then switch the insertion mode - to "in body" ("in body"! not "in head"!) and abort these steps. - (innerHTML case) */ - } elseif($node->nodeName === 'head') { - $this->mode = self::IN_BODY; - break; - - /* 12. If node is a body element, then switch the insertion mode to - "in body" and abort these steps. */ - } elseif($node->nodeName === 'body') { - $this->mode = self::IN_BODY; - break; - - /* 13. If node is a frameset element, then switch the insertion - mode to "in frameset" and abort these steps. (innerHTML case) */ - } elseif($node->nodeName === 'frameset') { - $this->mode = self::IN_FRAME; - break; - - /* 14. If node is an html element, then: if the head element - pointer is null, switch the insertion mode to "before head", - otherwise, switch the insertion mode to "after head". In either - case, abort these steps. (innerHTML case) */ - } elseif($node->nodeName === 'html') { - $this->mode = ($this->head_pointer === null) - ? self::BEFOR_HEAD - : self::AFTER_HEAD; - - break; - - /* 15. If last is true, then set the insertion mode to "in body" - and abort these steps. (innerHTML case) */ - } elseif($last) { - $this->mode = self::IN_BODY; - break; - } - } - } - - private function closeCell() { - /* If the stack of open elements has a td or th element in table scope, - then act as if an end tag token with that tag name had been seen. */ - foreach(array('td', 'th') as $cell) { - if($this->elementInScope($cell, true)) { - $this->inCell(array( - 'name' => $cell, - 'type' => HTML5::ENDTAG - )); - - break; - } - } - } - - public function save() { - return $this->dom; - } -} -?> diff --git a/libraries/htmlpurifier/library/HTMLPurifier/PropertyList.php b/libraries/htmlpurifier/library/HTMLPurifier/PropertyList.php deleted file mode 100644 index 2b99fb7bc3caffe0a8c8439199e05ae1930aea21..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/PropertyList.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -/** - * Generic property list implementation - */ -class HTMLPurifier_PropertyList -{ - /** - * Internal data-structure for properties - */ - protected $data = array(); - - /** - * Parent plist - */ - protected $parent; - - protected $cache; - - public function __construct($parent = null) { - $this->parent = $parent; - } - - /** - * Recursively retrieves the value for a key - */ - public function get($name) { - if ($this->has($name)) return $this->data[$name]; - // possible performance bottleneck, convert to iterative if necessary - if ($this->parent) return $this->parent->get($name); - throw new HTMLPurifier_Exception("Key '$name' not found"); - } - - /** - * Sets the value of a key, for this plist - */ - public function set($name, $value) { - $this->data[$name] = $value; - } - - /** - * Returns true if a given key exists - */ - public function has($name) { - return array_key_exists($name, $this->data); - } - - /** - * Resets a value to the value of it's parent, usually the default. If - * no value is specified, the entire plist is reset. - */ - public function reset($name = null) { - if ($name == null) $this->data = array(); - else unset($this->data[$name]); - } - - /** - * Squashes this property list and all of its property lists into a single - * array, and returns the array. This value is cached by default. - * @param $force If true, ignores the cache and regenerates the array. - */ - public function squash($force = false) { - if ($this->cache !== null && !$force) return $this->cache; - if ($this->parent) { - return $this->cache = array_merge($this->parent->squash($force), $this->data); - } else { - return $this->cache = $this->data; - } - } - - /** - * Returns the parent plist. - */ - public function getParent() { - return $this->parent; - } - - /** - * Sets the parent plist. - */ - public function setParent($plist) { - $this->parent = $plist; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php b/libraries/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php deleted file mode 100644 index f81802391bf64426a536335b310a81bdf07b849c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php +++ /dev/null @@ -1,328 +0,0 @@ -<?php - -/** - * Takes a well formed list of tokens and fixes their nesting. - * - * HTML elements dictate which elements are allowed to be their children, - * for example, you can't have a p tag in a span tag. Other elements have - * much more rigorous definitions: tables, for instance, require a specific - * order for their elements. There are also constraints not expressible by - * document type definitions, such as the chameleon nature of ins/del - * tags and global child exclusions. - * - * The first major objective of this strategy is to iterate through all the - * nodes (not tokens) of the list of tokens and determine whether or not - * their children conform to the element's definition. If they do not, the - * child definition may optionally supply an amended list of elements that - * is valid or require that the entire node be deleted (and the previous - * node rescanned). - * - * The second objective is to ensure that explicitly excluded elements of - * an element do not appear in its children. Code that accomplishes this - * task is pervasive through the strategy, though the two are distinct tasks - * and could, theoretically, be seperated (although it's not recommended). - * - * @note Whether or not unrecognized children are silently dropped or - * translated into text depends on the child definitions. - * - * @todo Enable nodes to be bubbled out of the structure. - */ - -class HTMLPurifier_Strategy_FixNesting extends HTMLPurifier_Strategy -{ - - public function execute($tokens, $config, $context) { - //####################################################################// - // Pre-processing - - // get a copy of the HTML definition - $definition = $config->getHTMLDefinition(); - - // insert implicit "parent" node, will be removed at end. - // DEFINITION CALL - $parent_name = $definition->info_parent; - array_unshift($tokens, new HTMLPurifier_Token_Start($parent_name)); - $tokens[] = new HTMLPurifier_Token_End($parent_name); - - // setup the context variable 'IsInline', for chameleon processing - // is 'false' when we are not inline, 'true' when it must always - // be inline, and an integer when it is inline for a certain - // branch of the document tree - $is_inline = $definition->info_parent_def->descendants_are_inline; - $context->register('IsInline', $is_inline); - - // setup error collector - $e =& $context->get('ErrorCollector', true); - - //####################################################################// - // Loop initialization - - // stack that contains the indexes of all parents, - // $stack[count($stack)-1] being the current parent - $stack = array(); - - // stack that contains all elements that are excluded - // it is organized by parent elements, similar to $stack, - // but it is only populated when an element with exclusions is - // processed, i.e. there won't be empty exclusions. - $exclude_stack = array(); - - // variable that contains the start token while we are processing - // nodes. This enables error reporting to do its job - $start_token = false; - $context->register('CurrentToken', $start_token); - - //####################################################################// - // Loop - - // iterate through all start nodes. Determining the start node - // is complicated so it has been omitted from the loop construct - for ($i = 0, $size = count($tokens) ; $i < $size; ) { - - //################################################################// - // Gather information on children - - // child token accumulator - $child_tokens = array(); - - // scroll to the end of this node, report number, and collect - // all children - for ($j = $i, $depth = 0; ; $j++) { - if ($tokens[$j] instanceof HTMLPurifier_Token_Start) { - $depth++; - // skip token assignment on first iteration, this is the - // token we currently are on - if ($depth == 1) continue; - } elseif ($tokens[$j] instanceof HTMLPurifier_Token_End) { - $depth--; - // skip token assignment on last iteration, this is the - // end token of the token we're currently on - if ($depth == 0) break; - } - $child_tokens[] = $tokens[$j]; - } - - // $i is index of start token - // $j is index of end token - - $start_token = $tokens[$i]; // to make token available via CurrentToken - - //################################################################// - // Gather information on parent - - // calculate parent information - if ($count = count($stack)) { - $parent_index = $stack[$count-1]; - $parent_name = $tokens[$parent_index]->name; - if ($parent_index == 0) { - $parent_def = $definition->info_parent_def; - } else { - $parent_def = $definition->info[$parent_name]; - } - } else { - // processing as if the parent were the "root" node - // unknown info, it won't be used anyway, in the future, - // we may want to enforce one element only (this is - // necessary for HTML Purifier to clean entire documents - $parent_index = $parent_name = $parent_def = null; - } - - // calculate context - if ($is_inline === false) { - // check if conditions make it inline - if (!empty($parent_def) && $parent_def->descendants_are_inline) { - $is_inline = $count - 1; - } - } else { - // check if we're out of inline - if ($count === $is_inline) { - $is_inline = false; - } - } - - //################################################################// - // Determine whether element is explicitly excluded SGML-style - - // determine whether or not element is excluded by checking all - // parent exclusions. The array should not be very large, two - // elements at most. - $excluded = false; - if (!empty($exclude_stack)) { - foreach ($exclude_stack as $lookup) { - if (isset($lookup[$tokens[$i]->name])) { - $excluded = true; - // no need to continue processing - break; - } - } - } - - //################################################################// - // Perform child validation - - if ($excluded) { - // there is an exclusion, remove the entire node - $result = false; - $excludes = array(); // not used, but good to initialize anyway - } else { - // DEFINITION CALL - if ($i === 0) { - // special processing for the first node - $def = $definition->info_parent_def; - } else { - $def = $definition->info[$tokens[$i]->name]; - - } - - if (!empty($def->child)) { - // have DTD child def validate children - $result = $def->child->validateChildren( - $child_tokens, $config, $context); - } else { - // weird, no child definition, get rid of everything - $result = false; - } - - // determine whether or not this element has any exclusions - $excludes = $def->excludes; - } - - // $result is now a bool or array - - //################################################################// - // Process result by interpreting $result - - if ($result === true || $child_tokens === $result) { - // leave the node as is - - // register start token as a parental node start - $stack[] = $i; - - // register exclusions if there are any - if (!empty($excludes)) $exclude_stack[] = $excludes; - - // move cursor to next possible start node - $i++; - - } elseif($result === false) { - // remove entire node - - if ($e) { - if ($excluded) { - $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded'); - } else { - $e->send(E_ERROR, 'Strategy_FixNesting: Node removed'); - } - } - - // calculate length of inner tokens and current tokens - $length = $j - $i + 1; - - // perform removal - array_splice($tokens, $i, $length); - - // update size - $size -= $length; - - // there is no start token to register, - // current node is now the next possible start node - // unless it turns out that we need to do a double-check - - // this is a rought heuristic that covers 100% of HTML's - // cases and 99% of all other cases. A child definition - // that would be tricked by this would be something like: - // ( | a b c) where it's all or nothing. Fortunately, - // our current implementation claims that that case would - // not allow empty, even if it did - if (!$parent_def->child->allow_empty) { - // we need to do a double-check - $i = $parent_index; - array_pop($stack); - } - - // PROJECTED OPTIMIZATION: Process all children elements before - // reprocessing parent node. - - } else { - // replace node with $result - - // calculate length of inner tokens - $length = $j - $i - 1; - - if ($e) { - if (empty($result) && $length) { - $e->send(E_ERROR, 'Strategy_FixNesting: Node contents removed'); - } else { - $e->send(E_WARNING, 'Strategy_FixNesting: Node reorganized'); - } - } - - // perform replacement - array_splice($tokens, $i + 1, $length, $result); - - // update size - $size -= $length; - $size += count($result); - - // register start token as a parental node start - $stack[] = $i; - - // register exclusions if there are any - if (!empty($excludes)) $exclude_stack[] = $excludes; - - // move cursor to next possible start node - $i++; - - } - - //################################################################// - // Scroll to next start node - - // We assume, at this point, that $i is the index of the token - // that is the first possible new start point for a node. - - // Test if the token indeed is a start tag, if not, move forward - // and test again. - $size = count($tokens); - while ($i < $size and !$tokens[$i] instanceof HTMLPurifier_Token_Start) { - if ($tokens[$i] instanceof HTMLPurifier_Token_End) { - // pop a token index off the stack if we ended a node - array_pop($stack); - // pop an exclusion lookup off exclusion stack if - // we ended node and that node had exclusions - if ($i == 0 || $i == $size - 1) { - // use specialized var if it's the super-parent - $s_excludes = $definition->info_parent_def->excludes; - } else { - $s_excludes = $definition->info[$tokens[$i]->name]->excludes; - } - if ($s_excludes) { - array_pop($exclude_stack); - } - } - $i++; - } - - } - - //####################################################################// - // Post-processing - - // remove implicit parent tokens at the beginning and end - array_shift($tokens); - array_pop($tokens); - - // remove context variables - $context->destroy('IsInline'); - $context->destroy('CurrentToken'); - - //####################################################################// - // Return - - return $tokens; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php b/libraries/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php deleted file mode 100644 index 0ec811f8ae2aa114526ecaf06ceae2e2bbfff47e..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php +++ /dev/null @@ -1,455 +0,0 @@ -<?php - -/** - * Takes tokens makes them well-formed (balance end tags, etc.) - */ -class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy -{ - - /** - * Array stream of tokens being processed. - */ - protected $tokens; - - /** - * Current index in $tokens. - */ - protected $t; - - /** - * Current nesting of elements. - */ - protected $stack; - - /** - * Injectors active in this stream processing. - */ - protected $injectors; - - /** - * Current instance of HTMLPurifier_Config. - */ - protected $config; - - /** - * Current instance of HTMLPurifier_Context. - */ - protected $context; - - public function execute($tokens, $config, $context) { - - $definition = $config->getHTMLDefinition(); - - // local variables - $generator = new HTMLPurifier_Generator($config, $context); - $escape_invalid_tags = $config->get('Core', 'EscapeInvalidTags'); - $e = $context->get('ErrorCollector', true); - $t = false; // token index - $i = false; // injector index - $token = false; // the current token - $reprocess = false; // whether or not to reprocess the same token - $stack = array(); - - // member variables - $this->stack =& $stack; - $this->t =& $t; - $this->tokens =& $tokens; - $this->config = $config; - $this->context = $context; - - // context variables - $context->register('CurrentNesting', $stack); - $context->register('InputIndex', $t); - $context->register('InputTokens', $tokens); - $context->register('CurrentToken', $token); - - // -- begin INJECTOR -- - - $this->injectors = array(); - - $injectors = $config->getBatch('AutoFormat'); - $def_injectors = $definition->info_injector; - $custom_injectors = $injectors['Custom']; - unset($injectors['Custom']); // special case - foreach ($injectors as $injector => $b) { - $injector = "HTMLPurifier_Injector_$injector"; - if (!$b) continue; - $this->injectors[] = new $injector; - } - foreach ($def_injectors as $injector) { - // assumed to be objects - $this->injectors[] = $injector; - } - foreach ($custom_injectors as $injector) { - if (is_string($injector)) { - $injector = "HTMLPurifier_Injector_$injector"; - $injector = new $injector; - } - $this->injectors[] = $injector; - } - - // give the injectors references to the definition and context - // variables for performance reasons - foreach ($this->injectors as $ix => $injector) { - $error = $injector->prepare($config, $context); - if (!$error) continue; - array_splice($this->injectors, $ix, 1); // rm the injector - trigger_error("Cannot enable {$injector->name} injector because $error is not allowed", E_USER_WARNING); - } - - // -- end INJECTOR -- - - // a note on punting: - // In order to reduce code duplication, whenever some code needs - // to make HTML changes in order to make things "correct", the - // new HTML gets sent through the purifier, regardless of its - // status. This means that if we add a start token, because it - // was totally necessary, we don't have to update nesting; we just - // punt ($reprocess = true; continue;) and it does that for us. - - // isset is in loop because $tokens size changes during loop exec - for ( - $t = 0; - $t == 0 || isset($tokens[$t - 1]); - // only increment if we don't need to reprocess - $reprocess ? $reprocess = false : $t++ - ) { - - // check for a rewind - if (is_int($i) && $i >= 0) { - // possibility: disable rewinding if the current token has a - // rewind set on it already. This would offer protection from - // infinite loop, but might hinder some advanced rewinding. - $rewind_to = $this->injectors[$i]->getRewind(); - if (is_int($rewind_to) && $rewind_to < $t) { - if ($rewind_to < 0) $rewind_to = 0; - while ($t > $rewind_to) { - $t--; - $prev = $tokens[$t]; - // indicate that other injectors should not process this token, - // but we need to reprocess it - unset($prev->skip[$i]); - $prev->rewind = $i; - if ($prev instanceof HTMLPurifier_Token_Start) array_pop($this->stack); - elseif ($prev instanceof HTMLPurifier_Token_End) $this->stack[] = $prev->start; - } - } - $i = false; - } - - // handle case of document end - if (!isset($tokens[$t])) { - // kill processing if stack is empty - if (empty($this->stack)) break; - - // peek - $top_nesting = array_pop($this->stack); - $this->stack[] = $top_nesting; - - // send error - if ($e && !isset($top_nesting->armor['MakeWellFormed_TagClosedError'])) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by document end', $top_nesting); - } - - // append, don't splice, since this is the end - $tokens[] = new HTMLPurifier_Token_End($top_nesting->name); - - // punt! - $reprocess = true; - continue; - } - - $token = $tokens[$t]; - - //echo '<br>'; printTokens($tokens, $t); printTokens($this->stack); - - // quick-check: if it's not a tag, no need to process - if (empty($token->is_tag)) { - if ($token instanceof HTMLPurifier_Token_Text) { - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) continue; - if ($token->rewind !== null && $token->rewind !== $i) continue; - $injector->handleText($token); - $this->processToken($token, $i); - $reprocess = true; - break; - } - } - // another possibility is a comment - continue; - } - - if (isset($definition->info[$token->name])) { - $type = $definition->info[$token->name]->child->type; - } else { - $type = false; // Type is unknown, treat accordingly - } - - // quick tag checks: anything that's *not* an end tag - $ok = false; - if ($type === 'empty' && $token instanceof HTMLPurifier_Token_Start) { - // claims to be a start tag but is empty - $token = new HTMLPurifier_Token_Empty($token->name, $token->attr); - $ok = true; - } elseif ($type && $type !== 'empty' && $token instanceof HTMLPurifier_Token_Empty) { - // claims to be empty but really is a start tag - $this->swap(new HTMLPurifier_Token_End($token->name)); - $this->insertBefore(new HTMLPurifier_Token_Start($token->name, $token->attr)); - // punt (since we had to modify the input stream in a non-trivial way) - $reprocess = true; - continue; - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - // real empty token - $ok = true; - } elseif ($token instanceof HTMLPurifier_Token_Start) { - // start tag - - // ...unless they also have to close their parent - if (!empty($this->stack)) { - - $parent = array_pop($this->stack); - $this->stack[] = $parent; - - if (isset($definition->info[$parent->name])) { - $elements = $definition->info[$parent->name]->child->getAllowedElements($config); - $autoclose = !isset($elements[$token->name]); - } else { - $autoclose = false; - } - - $carryover = false; - if ($autoclose && $definition->info[$parent->name]->formatting) { - $carryover = true; - } - - if ($autoclose) { - // errors need to be updated - $new_token = new HTMLPurifier_Token_End($parent->name); - $new_token->start = $parent; - if ($carryover) { - $element = clone $parent; - $element->armor['MakeWellFormed_TagClosedError'] = true; - $element->carryover = true; - $this->processToken(array($new_token, $token, $element)); - } else { - $this->insertBefore($new_token); - } - if ($e && !isset($parent->armor['MakeWellFormed_TagClosedError'])) { - if (!$carryover) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag auto closed', $parent); - } else { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag carryover', $parent); - } - } - $reprocess = true; - continue; - } - - } - $ok = true; - } - - if ($ok) { - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) continue; - if ($token->rewind !== null && $token->rewind !== $i) continue; - $injector->handleElement($token); - $this->processToken($token, $i); - $reprocess = true; - break; - } - if (!$reprocess) { - // ah, nothing interesting happened; do normal processing - $this->swap($token); - if ($token instanceof HTMLPurifier_Token_Start) { - $this->stack[] = $token; - } elseif ($token instanceof HTMLPurifier_Token_End) { - throw new HTMLPurifier_Exception('Improper handling of end tag in start code; possible error in MakeWellFormed'); - } - } - continue; - } - - // sanity check: we should be dealing with a closing tag - if (!$token instanceof HTMLPurifier_Token_End) { - throw new HTMLPurifier_Exception('Unaccounted for tag token in input stream, bug in HTML Purifier'); - } - - // make sure that we have something open - if (empty($this->stack)) { - if ($escape_invalid_tags) { - if ($e) $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag to text'); - $this->swap(new HTMLPurifier_Token_Text( - $generator->generateFromToken($token) - )); - } else { - $this->remove(); - if ($e) $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag removed'); - } - $reprocess = true; - continue; - } - - // first, check for the simplest case: everything closes neatly. - // Eventually, everything passes through here; if there are problems - // we modify the input stream accordingly and then punt, so that - // the tokens get processed again. - $current_parent = array_pop($this->stack); - if ($current_parent->name == $token->name) { - $token->start = $current_parent; - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) continue; - if ($token->rewind !== null && $token->rewind !== $i) continue; - $injector->handleEnd($token); - $this->processToken($token, $i); - $this->stack[] = $current_parent; - $reprocess = true; - break; - } - continue; - } - - // okay, so we're trying to close the wrong tag - - // undo the pop previous pop - $this->stack[] = $current_parent; - - // scroll back the entire nest, trying to find our tag. - // (feature could be to specify how far you'd like to go) - $size = count($this->stack); - // -2 because -1 is the last element, but we already checked that - $skipped_tags = false; - for ($j = $size - 2; $j >= 0; $j--) { - if ($this->stack[$j]->name == $token->name) { - $skipped_tags = array_slice($this->stack, $j); - break; - } - } - - // we didn't find the tag, so remove - if ($skipped_tags === false) { - if ($escape_invalid_tags) { - $this->swap(new HTMLPurifier_Token_Text( - $generator->generateFromToken($token) - )); - if ($e) $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag to text'); - } else { - $this->remove(); - if ($e) $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag removed'); - } - $reprocess = true; - continue; - } - - // do errors, in REVERSE $j order: a,b,c with </a></b></c> - $c = count($skipped_tags); - if ($e) { - for ($j = $c - 1; $j > 0; $j--) { - // notice we exclude $j == 0, i.e. the current ending tag, from - // the errors... - if (!isset($skipped_tags[$j]->armor['MakeWellFormed_TagClosedError'])) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by element end', $skipped_tags[$j]); - } - } - } - - // insert tags, in FORWARD $j order: c,b,a with </a></b></c> - $replace = array($token); - for ($j = 1; $j < $c; $j++) { - // ...as well as from the insertions - $new_token = new HTMLPurifier_Token_End($skipped_tags[$j]->name); - $new_token->start = $skipped_tags[$j]; - array_unshift($replace, $new_token); - if (isset($definition->info[$new_token->name]) && $definition->info[$new_token->name]->formatting) { - $element = clone $skipped_tags[$j]; - $element->carryover = true; - $element->armor['MakeWellFormed_TagClosedError'] = true; - $replace[] = $element; - } - } - $this->processToken($replace); - $reprocess = true; - continue; - } - - $context->destroy('CurrentNesting'); - $context->destroy('InputTokens'); - $context->destroy('InputIndex'); - $context->destroy('CurrentToken'); - - unset($this->injectors, $this->stack, $this->tokens, $this->t); - return $tokens; - } - - /** - * Processes arbitrary token values for complicated substitution patterns. - * In general: - * - * If $token is an array, it is a list of tokens to substitute for the - * current token. These tokens then get individually processed. If there - * is a leading integer in the list, that integer determines how many - * tokens from the stream should be removed. - * - * If $token is a regular token, it is swapped with the current token. - * - * If $token is false, the current token is deleted. - * - * If $token is an integer, that number of tokens (with the first token - * being the current one) will be deleted. - * - * @param $token Token substitution value - * @param $injector Injector that performed the substitution; default is if - * this is not an injector related operation. - */ - protected function processToken($token, $injector = -1) { - - // normalize forms of token - if (is_object($token)) $token = array(1, $token); - if (is_int($token)) $token = array($token); - if ($token === false) $token = array(1); - if (!is_array($token)) throw new HTMLPurifier_Exception('Invalid token type from injector'); - if (!is_int($token[0])) array_unshift($token, 1); - if ($token[0] === 0) throw new HTMLPurifier_Exception('Deleting zero tokens is not valid'); - - // $token is now an array with the following form: - // array(number nodes to delete, new node 1, new node 2, ...) - - $delete = array_shift($token); - $old = array_splice($this->tokens, $this->t, $delete, $token); - - if ($injector > -1) { - // determine appropriate skips - $oldskip = isset($old[0]) ? $old[0]->skip : array(); - foreach ($token as $object) { - $object->skip = $oldskip; - $object->skip[$injector] = true; - } - } - - } - - /** - * Inserts a token before the current token. Cursor now points to this token - */ - private function insertBefore($token) { - array_splice($this->tokens, $this->t, 0, array($token)); - } - - /** - * Removes current token. Cursor now points to new token occupying previously - * occupied space. - */ - private function remove() { - array_splice($this->tokens, $this->t, 1); - } - - /** - * Swap current token with new token. Cursor points to new token (no change). - */ - private function swap($token) { - $this->tokens[$this->t] = $token; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token.php b/libraries/htmlpurifier/library/HTMLPurifier/Token.php deleted file mode 100644 index 7900e6cb10110ef4e9b6cec880c1a6d59c7beed1..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/** - * Abstract base token class that all others inherit from. - */ -class HTMLPurifier_Token { - public $line; /**< Line number node was on in source document. Null if unknown. */ - public $col; /**< Column of line node was on in source document. Null if unknown. */ - - /** - * Lookup array of processing that this token is exempt from. - * Currently, valid values are "ValidateAttributes" and - * "MakeWellFormed_TagClosedError" - */ - public $armor = array(); - - /** - * Used during MakeWellFormed. - */ - public $skip; - public $rewind; - public $carryover; - - public function __get($n) { - if ($n === 'type') { - trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE); - switch (get_class($this)) { - case 'HTMLPurifier_Token_Start': return 'start'; - case 'HTMLPurifier_Token_Empty': return 'empty'; - case 'HTMLPurifier_Token_End': return 'end'; - case 'HTMLPurifier_Token_Text': return 'text'; - case 'HTMLPurifier_Token_Comment': return 'comment'; - default: return null; - } - } - } - - /** - * Sets the position of the token in the source document. - */ - public function position($l = null, $c = null) { - $this->line = $l; - $this->col = $c; - } - - /** - * Convenience function for DirectLex settings line/col position. - */ - public function rawPosition($l, $c) { - if ($c === -1) $l++; - $this->line = $l; - $this->col = $c; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/Comment.php b/libraries/htmlpurifier/library/HTMLPurifier/Token/Comment.php deleted file mode 100644 index dc6bdcabb85952963cc48978bdce24253952e7d8..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/Comment.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * Concrete comment token class. Generally will be ignored. - */ -class HTMLPurifier_Token_Comment extends HTMLPurifier_Token -{ - public $data; /**< Character data within comment. */ - public $is_whitespace = true; - /** - * Transparent constructor. - * - * @param $data String comment data. - */ - public function __construct($data, $line = null, $col = null) { - $this->data = $data; - $this->line = $line; - $this->col = $col; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/TokenFactory.php b/libraries/htmlpurifier/library/HTMLPurifier/TokenFactory.php deleted file mode 100644 index 7cf48fb41c1ee30b3d2a5f21a22579effb1d547d..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/TokenFactory.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -/** - * Factory for token generation. - * - * @note Doing some benchmarking indicates that the new operator is much - * slower than the clone operator (even discounting the cost of the - * constructor). This class is for that optimization. - * Other then that, there's not much point as we don't - * maintain parallel HTMLPurifier_Token hierarchies (the main reason why - * you'd want to use an abstract factory). - * @todo Port DirectLex to use this - */ -class HTMLPurifier_TokenFactory -{ - - /** - * Prototypes that will be cloned. - * @private - */ - // p stands for prototype - private $p_start, $p_end, $p_empty, $p_text, $p_comment; - - /** - * Generates blank prototypes for cloning. - */ - public function __construct() { - $this->p_start = new HTMLPurifier_Token_Start('', array()); - $this->p_end = new HTMLPurifier_Token_End(''); - $this->p_empty = new HTMLPurifier_Token_Empty('', array()); - $this->p_text = new HTMLPurifier_Token_Text(''); - $this->p_comment= new HTMLPurifier_Token_Comment(''); - } - - /** - * Creates a HTMLPurifier_Token_Start. - * @param $name Tag name - * @param $attr Associative array of attributes - * @return Generated HTMLPurifier_Token_Start - */ - public function createStart($name, $attr = array()) { - $p = clone $this->p_start; - $p->__construct($name, $attr); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_End. - * @param $name Tag name - * @return Generated HTMLPurifier_Token_End - */ - public function createEnd($name) { - $p = clone $this->p_end; - $p->__construct($name); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Empty. - * @param $name Tag name - * @param $attr Associative array of attributes - * @return Generated HTMLPurifier_Token_Empty - */ - public function createEmpty($name, $attr = array()) { - $p = clone $this->p_empty; - $p->__construct($name, $attr); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Text. - * @param $data Data of text token - * @return Generated HTMLPurifier_Token_Text - */ - public function createText($data) { - $p = clone $this->p_text; - $p->__construct($data); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Comment. - * @param $data Data of comment token - * @return Generated HTMLPurifier_Token_Comment - */ - public function createComment($data) { - $p = clone $this->p_comment; - $p->__construct($data); - return $p; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URI.php b/libraries/htmlpurifier/library/HTMLPurifier/URI.php deleted file mode 100644 index 8b50d0d18d8510c0e6ea56598a5d7555c0ebb735..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URI.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -/** - * HTML Purifier's internal representation of a URI. - * @note - * Internal data-structures are completely escaped. If the data needs - * to be used in a non-URI context (which is very unlikely), be sure - * to decode it first. The URI may not necessarily be well-formed until - * validate() is called. - */ -class HTMLPurifier_URI -{ - - public $scheme, $userinfo, $host, $port, $path, $query, $fragment; - - /** - * @note Automatically normalizes scheme and port - */ - public function __construct($scheme, $userinfo, $host, $port, $path, $query, $fragment) { - $this->scheme = is_null($scheme) || ctype_lower($scheme) ? $scheme : strtolower($scheme); - $this->userinfo = $userinfo; - $this->host = $host; - $this->port = is_null($port) ? $port : (int) $port; - $this->path = $path; - $this->query = $query; - $this->fragment = $fragment; - } - - /** - * Retrieves a scheme object corresponding to the URI's scheme/default - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return Scheme object appropriate for validating this URI - */ - public function getSchemeObj($config, $context) { - $registry = HTMLPurifier_URISchemeRegistry::instance(); - if ($this->scheme !== null) { - $scheme_obj = $registry->getScheme($this->scheme, $config, $context); - if (!$scheme_obj) return false; // invalid scheme, clean it out - } else { - // no scheme: retrieve the default one - $def = $config->getDefinition('URI'); - $scheme_obj = $registry->getScheme($def->defaultScheme, $config, $context); - if (!$scheme_obj) { - // something funky happened to the default scheme object - trigger_error( - 'Default scheme object "' . $def->defaultScheme . '" was not readable', - E_USER_WARNING - ); - return false; - } - } - return $scheme_obj; - } - - /** - * Generic validation method applicable for all schemes. May modify - * this URI in order to get it into a compliant form. - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return True if validation/filtering succeeds, false if failure - */ - public function validate($config, $context) { - - // ABNF definitions from RFC 3986 - $chars_sub_delims = '!$&\'()*+,;='; - $chars_gen_delims = ':/?#[]@'; - $chars_pchar = $chars_sub_delims . ':@'; - - // validate scheme (MUST BE FIRST!) - if (!is_null($this->scheme) && is_null($this->host)) { - $def = $config->getDefinition('URI'); - if ($def->defaultScheme === $this->scheme) { - $this->scheme = null; - } - } - - // validate host - if (!is_null($this->host)) { - $host_def = new HTMLPurifier_AttrDef_URI_Host(); - $this->host = $host_def->validate($this->host, $config, $context); - if ($this->host === false) $this->host = null; - } - - // validate username - if (!is_null($this->userinfo)) { - $encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . ':'); - $this->userinfo = $encoder->encode($this->userinfo); - } - - // validate port - if (!is_null($this->port)) { - if ($this->port < 1 || $this->port > 65535) $this->port = null; - } - - // validate path - $path_parts = array(); - $segments_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/'); - if (!is_null($this->host)) { - // path-abempty (hier and relative) - $this->path = $segments_encoder->encode($this->path); - } elseif ($this->path !== '' && $this->path[0] === '/') { - // path-absolute (hier and relative) - if (strlen($this->path) >= 2 && $this->path[1] === '/') { - // This shouldn't ever happen! - $this->path = ''; - } else { - $this->path = $segments_encoder->encode($this->path); - } - } elseif (!is_null($this->scheme) && $this->path !== '') { - // path-rootless (hier) - // Short circuit evaluation means we don't need to check nz - $this->path = $segments_encoder->encode($this->path); - } elseif (is_null($this->scheme) && $this->path !== '') { - // path-noscheme (relative) - // (once again, not checking nz) - $segment_nc_encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . '@'); - $c = strpos($this->path, '/'); - if ($c !== false) { - $this->path = - $segment_nc_encoder->encode(substr($this->path, 0, $c)) . - $segments_encoder->encode(substr($this->path, $c)); - } else { - $this->path = $segment_nc_encoder->encode($this->path); - } - } else { - // path-empty (hier and relative) - $this->path = ''; // just to be safe - } - - // qf = query and fragment - $qf_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/?'); - - if (!is_null($this->query)) { - $this->query = $qf_encoder->encode($this->query); - } - - if (!is_null($this->fragment)) { - $this->fragment = $qf_encoder->encode($this->fragment); - } - - return true; - - } - - /** - * Convert URI back to string - * @return String URI appropriate for output - */ - public function toString() { - // reconstruct authority - $authority = null; - if (!is_null($this->host)) { - $authority = ''; - if(!is_null($this->userinfo)) $authority .= $this->userinfo . '@'; - $authority .= $this->host; - if(!is_null($this->port)) $authority .= ':' . $this->port; - } - - // reconstruct the result - $result = ''; - if (!is_null($this->scheme)) $result .= $this->scheme . ':'; - if (!is_null($authority)) $result .= '//' . $authority; - $result .= $this->path; - if (!is_null($this->query)) $result .= '?' . $this->query; - if (!is_null($this->fragment)) $result .= '#' . $this->fragment; - - return $result; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter.php b/libraries/htmlpurifier/library/HTMLPurifier/URIFilter.php deleted file mode 100644 index c116f93dffc02a198a97ffcc3454147d3e5e9c1c..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * Chainable filters for custom URI processing. - * - * These filters can perform custom actions on a URI filter object, - * including transformation or blacklisting. - * - * @warning This filter is called before scheme object validation occurs. - * Make sure, if you require a specific scheme object, you - * you check that it exists. This allows filters to convert - * proprietary URI schemes into regular ones. - */ -abstract class HTMLPurifier_URIFilter -{ - - /** - * Unique identifier of filter - */ - public $name; - - /** - * True if this filter should be run after scheme validation. - */ - public $post = false; - - /** - * Performs initialization for the filter - */ - public function prepare($config) {return true;} - - /** - * Filter a URI object - * @param $uri Reference to URI object variable - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return bool Whether or not to continue processing: false indicates - * URL is no good, true indicates continue processing. Note that - * all changes are committed directly on the URI object - */ - abstract public function filter(&$uri, $config, $context); - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php b/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php deleted file mode 100644 index d8a39a5011120d663e92a3ab22d4dab1e9826116..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -class HTMLPurifier_URIFilter_DisableExternal extends HTMLPurifier_URIFilter -{ - public $name = 'DisableExternal'; - protected $ourHostParts = false; - public function prepare($config) { - $our_host = $config->getDefinition('URI')->host; - if ($our_host !== null) $this->ourHostParts = array_reverse(explode('.', $our_host)); - } - public function filter(&$uri, $config, $context) { - if (is_null($uri->host)) return true; - if ($this->ourHostParts === false) return false; - $host_parts = array_reverse(explode('.', $uri->host)); - foreach ($this->ourHostParts as $i => $x) { - if (!isset($host_parts[$i])) return false; - if ($host_parts[$i] != $this->ourHostParts[$i]) return false; - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php b/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php deleted file mode 100644 index 881abc43cfa2533027109ca74e7052be9a273ff6..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -class HTMLPurifier_URIFilter_DisableExternalResources extends HTMLPurifier_URIFilter_DisableExternal -{ - public $name = 'DisableExternalResources'; - public function filter(&$uri, $config, $context) { - if (!$context->get('EmbeddedURI', true)) return true; - return parent::filter($uri, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php b/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php deleted file mode 100644 index bac56e8b8e4b7a0ac88b35f2c858ef870dd69c2a..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -class HTMLPurifier_URIFilter_HostBlacklist extends HTMLPurifier_URIFilter -{ - public $name = 'HostBlacklist'; - protected $blacklist = array(); - public function prepare($config) { - $this->blacklist = $config->get('URI', 'HostBlacklist'); - return true; - } - public function filter(&$uri, $config, $context) { - foreach($this->blacklist as $blacklisted_host_fragment) { - if (strpos($uri->host, $blacklisted_host_fragment) !== false) { - return false; - } - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php b/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php deleted file mode 100644 index 29ed0ed1f27c9575273613e449044342367c59de..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter -{ - public $name = 'Munge'; - public $post = true; - private $target, $parser, $doEmbed, $secretKey; - - protected $replace = array(); - - public function prepare($config) { - $this->target = $config->get('URI', $this->name); - $this->parser = new HTMLPurifier_URIParser(); - $this->doEmbed = $config->get('URI', 'MungeResources'); - $this->secretKey = $config->get('URI', 'MungeSecretKey'); - return true; - } - public function filter(&$uri, $config, $context) { - if ($context->get('EmbeddedURI', true) && !$this->doEmbed) return true; - - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) return true; // ignore unknown schemes, maybe another postfilter did it - if (is_null($uri->host) || empty($scheme_obj->browsable)) { - return true; - } - - $this->makeReplace($uri, $config, $context); - $this->replace = array_map('rawurlencode', $this->replace); - - $new_uri = strtr($this->target, $this->replace); - $new_uri = $this->parser->parse($new_uri); - // don't redirect if the target host is the same as the - // starting host - if ($uri->host === $new_uri->host) return true; - $uri = $new_uri; // overwrite - return true; - } - - protected function makeReplace($uri, $config, $context) { - $string = $uri->toString(); - // always available - $this->replace['%s'] = $string; - $this->replace['%r'] = $context->get('EmbeddedURI', true); - $token = $context->get('CurrentToken', true); - $this->replace['%n'] = $token ? $token->name : null; - $this->replace['%m'] = $context->get('CurrentAttr', true); - $this->replace['%p'] = $context->get('CurrentCSSProperty', true); - // not always available - if ($this->secretKey) $this->replace['%t'] = sha1($this->secretKey . ':' . $string); - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme.php b/libraries/htmlpurifier/library/HTMLPurifier/URIScheme.php deleted file mode 100644 index 039710fd1586bf525394d06b8d2b4fe1863ac191..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * Validator for the components of a URI for a specific scheme - */ -class HTMLPurifier_URIScheme -{ - - /** - * Scheme's default port (integer) - */ - public $default_port = null; - - /** - * Whether or not URIs of this schem are locatable by a browser - * http and ftp are accessible, while mailto and news are not. - */ - public $browsable = false; - - /** - * Whether or not the URI always uses <hier_part>, resolves edge cases - * with making relative URIs absolute - */ - public $hierarchical = false; - - /** - * Validates the components of a URI - * @note This implementation should be called by children if they define - * a default port, as it does port processing. - * @param $uri Instance of HTMLPurifier_URI - * @param $config HTMLPurifier_Config object - * @param $context HTMLPurifier_Context object - * @return Bool success or failure - */ - public function validate(&$uri, $config, $context) { - if ($this->default_port == $uri->port) $uri->port = null; - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/http.php b/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/http.php deleted file mode 100644 index b097a31d6a329a54645a82cd97600c80961bc442..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/http.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * Validates http (HyperText Transfer Protocol) as defined by RFC 2616 - */ -class HTMLPurifier_URIScheme_http extends HTMLPurifier_URIScheme { - - public $default_port = 80; - public $browsable = true; - public $hierarchical = true; - - public function validate(&$uri, $config, $context) { - parent::validate($uri, $config, $context); - $uri->userinfo = null; - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/news.php b/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/news.php deleted file mode 100644 index f5f54f4f56ffad336482d1cbf1b8151f3fff69b4..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/news.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * Validates news (Usenet) as defined by generic RFC 1738 - */ -class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme { - - public $browsable = false; - - public function validate(&$uri, $config, $context) { - parent::validate($uri, $config, $context); - $uri->userinfo = null; - $uri->host = null; - $uri->port = null; - $uri->query = null; - // typecode check needed on path - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php b/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php deleted file mode 100644 index 5bf93ea7849c2dc3709df9f5eada4e0dc42ffa24..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/** - * Validates nntp (Network News Transfer Protocol) as defined by generic RFC 1738 - */ -class HTMLPurifier_URIScheme_nntp extends HTMLPurifier_URIScheme { - - public $default_port = 119; - public $browsable = false; - - public function validate(&$uri, $config, $context) { - parent::validate($uri, $config, $context); - $uri->userinfo = null; - $uri->query = null; - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/VarParser.php b/libraries/htmlpurifier/library/HTMLPurifier/VarParser.php deleted file mode 100644 index 68e72ae86959619de36bc15d6875e7aaefd57dee..0000000000000000000000000000000000000000 --- a/libraries/htmlpurifier/library/HTMLPurifier/VarParser.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -/** - * Parses string representations into their corresponding native PHP - * variable type. The base implementation does a simple type-check. - */ -class HTMLPurifier_VarParser -{ - - const STRING = 1; - const ISTRING = 2; - const TEXT = 3; - const ITEXT = 4; - const INT = 5; - const FLOAT = 6; - const BOOL = 7; - const LOOKUP = 8; - const ALIST = 9; - const HASH = 10; - const MIXED = 11; - - /** - * Lookup table of allowed types. Mainly for backwards compatibility, but - * also convenient for transforming string type names to the integer constants. - */ - static public $types = array( - 'string' => self::STRING, - 'istring' => self::ISTRING, - 'text' => self::TEXT, - 'itext' => self::ITEXT, - 'int' => self::INT, - 'float' => self::FLOAT, - 'bool' => self::BOOL, - 'lookup' => self::LOOKUP, - 'list' => self::ALIST, - 'hash' => self::HASH, - 'mixed' => self::MIXED - ); - - /** - * Lookup table of types that are string, and can have aliases or - * allowed value lists. - */ - static public $stringTypes = array( - self::STRING => true, - self::ISTRING => true, - self::TEXT => true, - self::ITEXT => true, - ); - - /** - * Validate a variable according to type. Throws - * HTMLPurifier_VarParserException if invalid. - * It may return NULL as a valid type if $allow_null is true. - * - * @param $var Variable to validate - * @param $type Type of variable, see HTMLPurifier_VarParser->types - * @param $allow_null Whether or not to permit null as a value - * @return Validated and type-coerced variable - */ - final public function parse($var, $type, $allow_null = false) { - if (is_string($type)) { - if (!isset(HTMLPurifier_VarParser::$types[$type])) { - throw new HTMLPurifier_VarParserException("Invalid type '$type'"); - } else { - $type = HTMLPurifier_VarParser::$types[$type]; - } - } - $var = $this->parseImplementation($var, $type, $allow_null); - if ($allow_null && $var === null) return null; - // These are basic checks, to make sure nothing horribly wrong - // happened in our implementations. - switch ($type) { - case (self::STRING): - case (self::ISTRING): - case (self::TEXT): - case (self::ITEXT): - if (!is_string($var)) break; - if ($type == self::ISTRING || $type == self::ITEXT) $var = strtolower($var); - return $var; - case (self::INT): - if (!is_int($var)) break; - return $var; - case (self::FLOAT): - if (!is_float($var)) break; - return $var; - case (self::BOOL): - if (!is_bool($var)) break; - return $var; - case (self::LOOKUP): - case (self::ALIST): - case (self::HASH): - if (!is_array($var)) break; - if ($type === self::LOOKUP) { - foreach ($var as $k) if ($k !== true) $this->error('Lookup table contains value other than true'); - } elseif ($type === self::ALIST) { - $keys = array_keys($var); - if (array_keys($keys) !== $keys) $this->error('Indices for list are not uniform'); - } - return $var; - case (self::MIXED): - return $var; - default: - $this->errorInconsistent(get_class($this), $type); - } - $this->errorGeneric($var, $type); - } - - /** - * Actually implements the parsing. Base implementation is to not - * do anything to $var. Subclasses should overload this! - */ - protected function parseImplementation($var, $type, $allow_null) { - return $var; - } - - /** - * Throws an exception. - */ - protected function error($msg) { - throw new HTMLPurifier_VarParserException($msg); - } - - /** - * Throws an inconsistency exception. - * @note This should not ever be called. It would be called if we - * extend the allowed values of HTMLPurifier_VarParser without - * updating subclasses. - */ - protected function errorInconsistent($class, $type) { - throw new HTMLPurifier_Exception("Inconsistency in $class: ".HTMLPurifier_VarParser::getTypeName($type)." not implemented"); - } - - /** - * Generic error for if a type didn't work. - */ - protected function errorGeneric($var, $type) { - $vtype = gettype($var); - $this->error("Expected type ".HTMLPurifier_VarParser::getTypeName($type).", got $vtype"); - } - - static public function getTypeName($type) { - static $lookup; - if (!$lookup) { - // Lazy load the alternative lookup table - $lookup = array_flip(HTMLPurifier_VarParser::$types); - } - if (!isset($lookup[$type])) return 'unknown'; - return $lookup[$type]; - } - -} - -// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/CREDITS b/libraries/htmlpurifier410/CREDITS similarity index 100% rename from libraries/htmlpurifier/CREDITS rename to libraries/htmlpurifier410/CREDITS diff --git a/libraries/htmlpurifier/INSTALL b/libraries/htmlpurifier410/INSTALL similarity index 87% rename from libraries/htmlpurifier/INSTALL rename to libraries/htmlpurifier410/INSTALL index e08b44d9ddee50e066344e7fc8c3cf7990f227a4..e77b5166139d0d57c9a7943f7315442d4e209f33 100644 --- a/libraries/htmlpurifier/INSTALL +++ b/libraries/htmlpurifier410/INSTALL @@ -15,9 +15,8 @@ with these contents. --------------------------------------------------------------------------- 1. Compatibility -HTML Purifier is PHP 5 only, and is actively tested from PHP 5.0.5 and -up. It has no core dependencies with other libraries. PHP -4 support was deprecated on December 31, 2007 with HTML Purifier 3.0.0. +HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.0.5 +and up. It has no core dependencies with other libraries. These optional extensions can enhance the capabilities of HTML Purifier: @@ -25,6 +24,13 @@ These optional extensions can enhance the capabilities of HTML Purifier: * bcmath : Used for unit conversion and imagecrash protection * tidy : Used for pretty-printing HTML +These optional libraries can enhance the capabilities of HTML Purifier: + + * CSSTidy : Clean CSS stylesheets using %Core.ExtractStyleBlocks + Note: You should use the modernized fork of CSSTidy available + at https://github.com/Cerdic/CSSTidy + * Net_IDNA2 (PEAR) : IRI support using %Core.EnableIDNA + Note: This is not necessary for PHP 5.3 or later --------------------------------------------------------------------------- 2. Reconnaissance @@ -231,12 +237,12 @@ HTML Purifier uses iconv to support other character encodings, as such, any encoding that iconv supports <http://www.gnu.org/software/libiconv/> HTML Purifier supports with this code: - $config->set('Core', 'Encoding', /* put your encoding here */); + $config->set('Core.Encoding', /* put your encoding here */); An example usage for Latin-1 websites (the most common encoding for English websites): - $config->set('Core', 'Encoding', 'ISO-8859-1'); + $config->set('Core.Encoding', 'ISO-8859-1'); Note that HTML Purifier's support for non-Unicode encodings is crippled by the fact that any character not supported by that encoding will be silently @@ -251,7 +257,7 @@ reason, I do not include the solution in this document). For those of you using HTML 4.01 Transitional, you can disable XHTML output like this: - $config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); + $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); Other supported doctypes include: @@ -277,14 +283,14 @@ are, respectively, %HTML.Allowed, %URI.MakeAbsolute and %URI.Base, and %AutoFormat.AutoParagraph. The %Namespace.Directive naming convention translates to: - $config->set('Namespace', 'Directive', $value); + $config->set('Namespace.Directive', $value); E.g. - $config->set('HTML', 'Allowed', 'p,b,a[href],i'); - $config->set('URI', 'Base', 'http://www.example.com'); - $config->set('URI', 'MakeAbsolute', true); - $config->set('AutoFormat', 'AutoParagraph', true); + $config->set('HTML.Allowed', 'p,b,a[href],i'); + $config->set('URI.Base', 'http://www.example.com'); + $config->set('URI.MakeAbsolute', true); + $config->set('AutoFormat.AutoParagraph', true); --------------------------------------------------------------------------- @@ -300,11 +306,9 @@ appropriate permissions using: chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer If the above command doesn't work, you may need to assign write permissions -to all. This may be necessary if your webserver runs as nobody, but is -not recommended since it means any other user can write files in the -directory. Use: +to group: - chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer + chmod -R 0775 HTMLPurifier/DefinitionCache/Serializer You can also chmod files via your FTP client; this option is usually accessible by right clicking the corresponding directory and @@ -318,11 +322,11 @@ If you are unable or unwilling to give write permissions to the cache directory, you can either disable the cache (and suffer a performance hit): - $config->set('Core', 'DefinitionCache', null); + $config->set('Core.DefinitionCache', null); Or move the cache directory somewhere else (no trailing slash): - $config->set('Cache', 'SerializerPath', '/home/user/absolute/path'); + $config->set('Cache.SerializerPath', '/home/user/absolute/path'); --------------------------------------------------------------------------- @@ -330,11 +334,6 @@ Or move the cache directory somewhere else (no trailing slash): The interface is mind-numbingly simple: - $purifier = new HTMLPurifier(); - $clean_html = $purifier->purify( $dirty_html ); - -...or, if you're using the configuration object: - $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify( $dirty_html ); @@ -353,7 +352,8 @@ If your website is in UTF-8 and XHTML Transitional, use this code: <?php require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php'; - $purifier = new HTMLPurifier(); + $config = HTMLPurifier_Config::createDefault(); + $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($dirty_html); ?> @@ -363,8 +363,8 @@ If your website is in a different encoding or doctype, use this code: require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php'; $config = HTMLPurifier_Config::createDefault(); - $config->set('Core', 'Encoding', 'ISO-8859-1'); // replace with your encoding - $config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); // replace with your doctype + $config->set('Core.Encoding', 'ISO-8859-1'); // replace with your encoding + $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); // replace with your doctype $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($dirty_html); diff --git a/libraries/htmlpurifier/LICENSE b/libraries/htmlpurifier410/LICENSE similarity index 100% rename from libraries/htmlpurifier/LICENSE rename to libraries/htmlpurifier410/LICENSE diff --git a/libraries/htmlpurifier/library/HTMLPurifier.auto.php b/libraries/htmlpurifier410/library/HTMLPurifier.auto.php similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier.auto.php rename to libraries/htmlpurifier410/library/HTMLPurifier.auto.php index 1960c399f89861a4a1da263030feddb150fe1384..c810e87b6e26361d610f4a0506a3b26b3ffde918 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.auto.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.auto.php @@ -1,11 +1,11 @@ -<?php - -/** - * This is a stub include that automatically configures the include path. - */ - -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); -require_once 'HTMLPurifier/Bootstrap.php'; -require_once 'HTMLPurifier.autoload.php'; - -// vim: et sw=4 sts=4 +<?php + +/** + * This is a stub include that automatically configures the include path. + */ + +set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); +require_once 'HTMLPurifier/Bootstrap.php'; +require_once 'HTMLPurifier.autoload.php'; + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier.autoload-legacy.php b/libraries/htmlpurifier410/library/HTMLPurifier.autoload-legacy.php new file mode 100644 index 0000000000000000000000000000000000000000..d2ea83f451f6b1ba327dd366329cf7ef8680a2ee --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier.autoload-legacy.php @@ -0,0 +1,15 @@ +<?php + +/** + * @file + * Legacy autoloader for systems lacking spl_autoload_register + * + * Must be separate to prevent deprecation warning on PHP 7.2 + */ + +function __autoload($class) +{ + return HTMLPurifier_Bootstrap::autoload($class); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier.autoload.php b/libraries/htmlpurifier410/library/HTMLPurifier.autoload.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier.autoload.php rename to libraries/htmlpurifier410/library/HTMLPurifier.autoload.php index 8d40176406a079f8ab49b7d0260c86073daf2c58..722e7673228fca8e19ea870994843c4d4599d222 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.autoload.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.autoload.php @@ -1,21 +1,24 @@ -<?php - -/** - * @file - * Convenience file that registers autoload handler for HTML Purifier. - */ - -if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) { - // We need unregister for our pre-registering functionality - HTMLPurifier_Bootstrap::registerAutoload(); - if (function_exists('__autoload')) { - // Be polite and ensure that userland autoload gets retained - spl_autoload_register('__autoload'); - } -} elseif (!function_exists('__autoload')) { - function __autoload($class) { - return HTMLPurifier_Bootstrap::autoload($class); - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * @file + * Convenience file that registers autoload handler for HTML Purifier. + * It also does some sanity checks. + */ + +if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) { + // We need unregister for our pre-registering functionality + HTMLPurifier_Bootstrap::registerAutoload(); + if (function_exists('__autoload')) { + // Be polite and ensure that userland autoload gets retained + spl_autoload_register('__autoload'); + } +} elseif (!function_exists('__autoload')) { + require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php'; +} + +if (ini_get('zend.ze1_compatibility_mode')) { + trigger_error("HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off", E_USER_ERROR); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier.composer.php b/libraries/htmlpurifier410/library/HTMLPurifier.composer.php new file mode 100644 index 0000000000000000000000000000000000000000..4d06ae4aa14f2d573d8fd5f39893eb01d82c56d0 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier.composer.php @@ -0,0 +1,4 @@ +<?php +if (!defined('HTMLPURIFIER_PREFIX')) { + define('HTMLPURIFIER_PREFIX', dirname(__FILE__)); +} diff --git a/libraries/htmlpurifier/library/HTMLPurifier.func.php b/libraries/htmlpurifier410/library/HTMLPurifier.func.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier.func.php rename to libraries/htmlpurifier410/library/HTMLPurifier.func.php index 56a55b2fedac9c4c035ae476ece07e56cdb14252..f26eed1fa15e312ef60e3080eda292db110856f4 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.func.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.func.php @@ -1,23 +1,25 @@ -<?php - -/** - * @file - * Defines a function wrapper for HTML Purifier for quick use. - * @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()'' - */ - -/** - * Purify HTML. - * @param $html String HTML to purify - * @param $config Configuration to use, can be any value accepted by - * HTMLPurifier_Config::create() - */ -function HTMLPurifier($html, $config = null) { - static $purifier = false; - if (!$purifier) { - $purifier = new HTMLPurifier(); - } - return $purifier->purify($html, $config); -} - -// vim: et sw=4 sts=4 +<?php + +/** + * @file + * Defines a function wrapper for HTML Purifier for quick use. + * @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()'' + */ + +/** + * Purify HTML. + * @param string $html String HTML to purify + * @param mixed $config Configuration to use, can be any value accepted by + * HTMLPurifier_Config::create() + * @return string + */ +function HTMLPurifier($html, $config = null) +{ + static $purifier = false; + if (!$purifier) { + $purifier = new HTMLPurifier(); + } + return $purifier->purify($html, $config); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier.includes.php b/libraries/htmlpurifier410/library/HTMLPurifier.includes.php similarity index 85% rename from libraries/htmlpurifier/library/HTMLPurifier.includes.php rename to libraries/htmlpurifier410/library/HTMLPurifier.includes.php index 944f0893b9380279beb72810ebf3a17cfab1a7f9..c3318b3ab7d0dfb4126f98f0064bd35022c47074 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.includes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.includes.php @@ -1,206 +1,234 @@ -<?php - -/** - * @file - * This file was auto-generated by generate-includes.php and includes all of - * the core files required by HTML Purifier. Use this if performance is a - * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS - * FILE, changes will be overwritten the next time the script is run. - * - * @version 3.3.0 - * - * @warning - * You must *not* include any other HTML Purifier files before this file, - * because 'require' not 'require_once' is used. - * - * @warning - * This file requires that the include path contains the HTML Purifier - * library directory; this is not auto-set. - */ - -require 'HTMLPurifier.php'; -require 'HTMLPurifier/AttrCollections.php'; -require 'HTMLPurifier/AttrDef.php'; -require 'HTMLPurifier/AttrTransform.php'; -require 'HTMLPurifier/AttrTypes.php'; -require 'HTMLPurifier/AttrValidator.php'; -require 'HTMLPurifier/Bootstrap.php'; -require 'HTMLPurifier/Definition.php'; -require 'HTMLPurifier/CSSDefinition.php'; -require 'HTMLPurifier/ChildDef.php'; -require 'HTMLPurifier/Config.php'; -require 'HTMLPurifier/ConfigSchema.php'; -require 'HTMLPurifier/ContentSets.php'; -require 'HTMLPurifier/Context.php'; -require 'HTMLPurifier/DefinitionCache.php'; -require 'HTMLPurifier/DefinitionCacheFactory.php'; -require 'HTMLPurifier/Doctype.php'; -require 'HTMLPurifier/DoctypeRegistry.php'; -require 'HTMLPurifier/ElementDef.php'; -require 'HTMLPurifier/Encoder.php'; -require 'HTMLPurifier/EntityLookup.php'; -require 'HTMLPurifier/EntityParser.php'; -require 'HTMLPurifier/ErrorCollector.php'; -require 'HTMLPurifier/ErrorStruct.php'; -require 'HTMLPurifier/Exception.php'; -require 'HTMLPurifier/Filter.php'; -require 'HTMLPurifier/Generator.php'; -require 'HTMLPurifier/HTMLDefinition.php'; -require 'HTMLPurifier/HTMLModule.php'; -require 'HTMLPurifier/HTMLModuleManager.php'; -require 'HTMLPurifier/IDAccumulator.php'; -require 'HTMLPurifier/Injector.php'; -require 'HTMLPurifier/Language.php'; -require 'HTMLPurifier/LanguageFactory.php'; -require 'HTMLPurifier/Length.php'; -require 'HTMLPurifier/Lexer.php'; -require 'HTMLPurifier/PercentEncoder.php'; -require 'HTMLPurifier/PropertyList.php'; -require 'HTMLPurifier/PropertyListIterator.php'; -require 'HTMLPurifier/Strategy.php'; -require 'HTMLPurifier/StringHash.php'; -require 'HTMLPurifier/StringHashParser.php'; -require 'HTMLPurifier/TagTransform.php'; -require 'HTMLPurifier/Token.php'; -require 'HTMLPurifier/TokenFactory.php'; -require 'HTMLPurifier/URI.php'; -require 'HTMLPurifier/URIDefinition.php'; -require 'HTMLPurifier/URIFilter.php'; -require 'HTMLPurifier/URIParser.php'; -require 'HTMLPurifier/URIScheme.php'; -require 'HTMLPurifier/URISchemeRegistry.php'; -require 'HTMLPurifier/UnitConverter.php'; -require 'HTMLPurifier/VarParser.php'; -require 'HTMLPurifier/VarParserException.php'; -require 'HTMLPurifier/AttrDef/CSS.php'; -require 'HTMLPurifier/AttrDef/Enum.php'; -require 'HTMLPurifier/AttrDef/Integer.php'; -require 'HTMLPurifier/AttrDef/Lang.php'; -require 'HTMLPurifier/AttrDef/Switch.php'; -require 'HTMLPurifier/AttrDef/Text.php'; -require 'HTMLPurifier/AttrDef/URI.php'; -require 'HTMLPurifier/AttrDef/CSS/Number.php'; -require 'HTMLPurifier/AttrDef/CSS/AlphaValue.php'; -require 'HTMLPurifier/AttrDef/CSS/Background.php'; -require 'HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; -require 'HTMLPurifier/AttrDef/CSS/Border.php'; -require 'HTMLPurifier/AttrDef/CSS/Color.php'; -require 'HTMLPurifier/AttrDef/CSS/Composite.php'; -require 'HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; -require 'HTMLPurifier/AttrDef/CSS/Filter.php'; -require 'HTMLPurifier/AttrDef/CSS/Font.php'; -require 'HTMLPurifier/AttrDef/CSS/FontFamily.php'; -require 'HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; -require 'HTMLPurifier/AttrDef/CSS/Length.php'; -require 'HTMLPurifier/AttrDef/CSS/ListStyle.php'; -require 'HTMLPurifier/AttrDef/CSS/Multiple.php'; -require 'HTMLPurifier/AttrDef/CSS/Percentage.php'; -require 'HTMLPurifier/AttrDef/CSS/TextDecoration.php'; -require 'HTMLPurifier/AttrDef/CSS/URI.php'; -require 'HTMLPurifier/AttrDef/HTML/Bool.php'; -require 'HTMLPurifier/AttrDef/HTML/Color.php'; -require 'HTMLPurifier/AttrDef/HTML/FrameTarget.php'; -require 'HTMLPurifier/AttrDef/HTML/ID.php'; -require 'HTMLPurifier/AttrDef/HTML/Pixels.php'; -require 'HTMLPurifier/AttrDef/HTML/Length.php'; -require 'HTMLPurifier/AttrDef/HTML/LinkTypes.php'; -require 'HTMLPurifier/AttrDef/HTML/MultiLength.php'; -require 'HTMLPurifier/AttrDef/HTML/Nmtokens.php'; -require 'HTMLPurifier/AttrDef/URI/Email.php'; -require 'HTMLPurifier/AttrDef/URI/Host.php'; -require 'HTMLPurifier/AttrDef/URI/IPv4.php'; -require 'HTMLPurifier/AttrDef/URI/IPv6.php'; -require 'HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; -require 'HTMLPurifier/AttrTransform/Background.php'; -require 'HTMLPurifier/AttrTransform/BdoDir.php'; -require 'HTMLPurifier/AttrTransform/BgColor.php'; -require 'HTMLPurifier/AttrTransform/BoolToCSS.php'; -require 'HTMLPurifier/AttrTransform/Border.php'; -require 'HTMLPurifier/AttrTransform/EnumToCSS.php'; -require 'HTMLPurifier/AttrTransform/ImgRequired.php'; -require 'HTMLPurifier/AttrTransform/ImgSpace.php'; -require 'HTMLPurifier/AttrTransform/Input.php'; -require 'HTMLPurifier/AttrTransform/Lang.php'; -require 'HTMLPurifier/AttrTransform/Length.php'; -require 'HTMLPurifier/AttrTransform/Name.php'; -require 'HTMLPurifier/AttrTransform/SafeEmbed.php'; -require 'HTMLPurifier/AttrTransform/SafeObject.php'; -require 'HTMLPurifier/AttrTransform/SafeParam.php'; -require 'HTMLPurifier/AttrTransform/ScriptRequired.php'; -require 'HTMLPurifier/AttrTransform/Textarea.php'; -require 'HTMLPurifier/ChildDef/Chameleon.php'; -require 'HTMLPurifier/ChildDef/Custom.php'; -require 'HTMLPurifier/ChildDef/Empty.php'; -require 'HTMLPurifier/ChildDef/Required.php'; -require 'HTMLPurifier/ChildDef/Optional.php'; -require 'HTMLPurifier/ChildDef/StrictBlockquote.php'; -require 'HTMLPurifier/ChildDef/Table.php'; -require 'HTMLPurifier/DefinitionCache/Decorator.php'; -require 'HTMLPurifier/DefinitionCache/Null.php'; -require 'HTMLPurifier/DefinitionCache/Serializer.php'; -require 'HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; -require 'HTMLPurifier/DefinitionCache/Decorator/Memory.php'; -require 'HTMLPurifier/HTMLModule/Bdo.php'; -require 'HTMLPurifier/HTMLModule/CommonAttributes.php'; -require 'HTMLPurifier/HTMLModule/Edit.php'; -require 'HTMLPurifier/HTMLModule/Forms.php'; -require 'HTMLPurifier/HTMLModule/Hypertext.php'; -require 'HTMLPurifier/HTMLModule/Image.php'; -require 'HTMLPurifier/HTMLModule/Legacy.php'; -require 'HTMLPurifier/HTMLModule/List.php'; -require 'HTMLPurifier/HTMLModule/Name.php'; -require 'HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; -require 'HTMLPurifier/HTMLModule/Object.php'; -require 'HTMLPurifier/HTMLModule/Presentation.php'; -require 'HTMLPurifier/HTMLModule/Proprietary.php'; -require 'HTMLPurifier/HTMLModule/Ruby.php'; -require 'HTMLPurifier/HTMLModule/SafeEmbed.php'; -require 'HTMLPurifier/HTMLModule/SafeObject.php'; -require 'HTMLPurifier/HTMLModule/Scripting.php'; -require 'HTMLPurifier/HTMLModule/StyleAttribute.php'; -require 'HTMLPurifier/HTMLModule/Tables.php'; -require 'HTMLPurifier/HTMLModule/Target.php'; -require 'HTMLPurifier/HTMLModule/Text.php'; -require 'HTMLPurifier/HTMLModule/Tidy.php'; -require 'HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; -require 'HTMLPurifier/HTMLModule/Tidy/Name.php'; -require 'HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; -require 'HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; -require 'HTMLPurifier/HTMLModule/Tidy/Strict.php'; -require 'HTMLPurifier/HTMLModule/Tidy/Transitional.php'; -require 'HTMLPurifier/HTMLModule/Tidy/XHTML.php'; -require 'HTMLPurifier/Injector/AutoParagraph.php'; -require 'HTMLPurifier/Injector/DisplayLinkURI.php'; -require 'HTMLPurifier/Injector/Linkify.php'; -require 'HTMLPurifier/Injector/PurifierLinkify.php'; -require 'HTMLPurifier/Injector/RemoveEmpty.php'; -require 'HTMLPurifier/Injector/SafeObject.php'; -require 'HTMLPurifier/Lexer/DOMLex.php'; -require 'HTMLPurifier/Lexer/DirectLex.php'; -require 'HTMLPurifier/Strategy/Composite.php'; -require 'HTMLPurifier/Strategy/Core.php'; -require 'HTMLPurifier/Strategy/FixNesting.php'; -require 'HTMLPurifier/Strategy/MakeWellFormed.php'; -require 'HTMLPurifier/Strategy/RemoveForeignElements.php'; -require 'HTMLPurifier/Strategy/ValidateAttributes.php'; -require 'HTMLPurifier/TagTransform/Font.php'; -require 'HTMLPurifier/TagTransform/Simple.php'; -require 'HTMLPurifier/Token/Comment.php'; -require 'HTMLPurifier/Token/Tag.php'; -require 'HTMLPurifier/Token/Empty.php'; -require 'HTMLPurifier/Token/End.php'; -require 'HTMLPurifier/Token/Start.php'; -require 'HTMLPurifier/Token/Text.php'; -require 'HTMLPurifier/URIFilter/DisableExternal.php'; -require 'HTMLPurifier/URIFilter/DisableExternalResources.php'; -require 'HTMLPurifier/URIFilter/HostBlacklist.php'; -require 'HTMLPurifier/URIFilter/MakeAbsolute.php'; -require 'HTMLPurifier/URIFilter/Munge.php'; -require 'HTMLPurifier/URIScheme/ftp.php'; -require 'HTMLPurifier/URIScheme/http.php'; -require 'HTMLPurifier/URIScheme/https.php'; -require 'HTMLPurifier/URIScheme/mailto.php'; -require 'HTMLPurifier/URIScheme/news.php'; -require 'HTMLPurifier/URIScheme/nntp.php'; -require 'HTMLPurifier/VarParser/Flexible.php'; -require 'HTMLPurifier/VarParser/Native.php'; +<?php + +/** + * @file + * This file was auto-generated by generate-includes.php and includes all of + * the core files required by HTML Purifier. Use this if performance is a + * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS + * FILE, changes will be overwritten the next time the script is run. + * + * @version 4.10.0 + * + * @warning + * You must *not* include any other HTML Purifier files before this file, + * because 'require' not 'require_once' is used. + * + * @warning + * This file requires that the include path contains the HTML Purifier + * library directory; this is not auto-set. + */ + +require 'HTMLPurifier.php'; +require 'HTMLPurifier/Arborize.php'; +require 'HTMLPurifier/AttrCollections.php'; +require 'HTMLPurifier/AttrDef.php'; +require 'HTMLPurifier/AttrTransform.php'; +require 'HTMLPurifier/AttrTypes.php'; +require 'HTMLPurifier/AttrValidator.php'; +require 'HTMLPurifier/Bootstrap.php'; +require 'HTMLPurifier/Definition.php'; +require 'HTMLPurifier/CSSDefinition.php'; +require 'HTMLPurifier/ChildDef.php'; +require 'HTMLPurifier/Config.php'; +require 'HTMLPurifier/ConfigSchema.php'; +require 'HTMLPurifier/ContentSets.php'; +require 'HTMLPurifier/Context.php'; +require 'HTMLPurifier/DefinitionCache.php'; +require 'HTMLPurifier/DefinitionCacheFactory.php'; +require 'HTMLPurifier/Doctype.php'; +require 'HTMLPurifier/DoctypeRegistry.php'; +require 'HTMLPurifier/ElementDef.php'; +require 'HTMLPurifier/Encoder.php'; +require 'HTMLPurifier/EntityLookup.php'; +require 'HTMLPurifier/EntityParser.php'; +require 'HTMLPurifier/ErrorCollector.php'; +require 'HTMLPurifier/ErrorStruct.php'; +require 'HTMLPurifier/Exception.php'; +require 'HTMLPurifier/Filter.php'; +require 'HTMLPurifier/Generator.php'; +require 'HTMLPurifier/HTMLDefinition.php'; +require 'HTMLPurifier/HTMLModule.php'; +require 'HTMLPurifier/HTMLModuleManager.php'; +require 'HTMLPurifier/IDAccumulator.php'; +require 'HTMLPurifier/Injector.php'; +require 'HTMLPurifier/Language.php'; +require 'HTMLPurifier/LanguageFactory.php'; +require 'HTMLPurifier/Length.php'; +require 'HTMLPurifier/Lexer.php'; +require 'HTMLPurifier/Node.php'; +require 'HTMLPurifier/PercentEncoder.php'; +require 'HTMLPurifier/PropertyList.php'; +require 'HTMLPurifier/PropertyListIterator.php'; +require 'HTMLPurifier/Queue.php'; +require 'HTMLPurifier/Strategy.php'; +require 'HTMLPurifier/StringHash.php'; +require 'HTMLPurifier/StringHashParser.php'; +require 'HTMLPurifier/TagTransform.php'; +require 'HTMLPurifier/Token.php'; +require 'HTMLPurifier/TokenFactory.php'; +require 'HTMLPurifier/URI.php'; +require 'HTMLPurifier/URIDefinition.php'; +require 'HTMLPurifier/URIFilter.php'; +require 'HTMLPurifier/URIParser.php'; +require 'HTMLPurifier/URIScheme.php'; +require 'HTMLPurifier/URISchemeRegistry.php'; +require 'HTMLPurifier/UnitConverter.php'; +require 'HTMLPurifier/VarParser.php'; +require 'HTMLPurifier/VarParserException.php'; +require 'HTMLPurifier/Zipper.php'; +require 'HTMLPurifier/AttrDef/CSS.php'; +require 'HTMLPurifier/AttrDef/Clone.php'; +require 'HTMLPurifier/AttrDef/Enum.php'; +require 'HTMLPurifier/AttrDef/Integer.php'; +require 'HTMLPurifier/AttrDef/Lang.php'; +require 'HTMLPurifier/AttrDef/Switch.php'; +require 'HTMLPurifier/AttrDef/Text.php'; +require 'HTMLPurifier/AttrDef/URI.php'; +require 'HTMLPurifier/AttrDef/CSS/Number.php'; +require 'HTMLPurifier/AttrDef/CSS/AlphaValue.php'; +require 'HTMLPurifier/AttrDef/CSS/Background.php'; +require 'HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; +require 'HTMLPurifier/AttrDef/CSS/Border.php'; +require 'HTMLPurifier/AttrDef/CSS/Color.php'; +require 'HTMLPurifier/AttrDef/CSS/Composite.php'; +require 'HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; +require 'HTMLPurifier/AttrDef/CSS/Filter.php'; +require 'HTMLPurifier/AttrDef/CSS/Font.php'; +require 'HTMLPurifier/AttrDef/CSS/FontFamily.php'; +require 'HTMLPurifier/AttrDef/CSS/Ident.php'; +require 'HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; +require 'HTMLPurifier/AttrDef/CSS/Length.php'; +require 'HTMLPurifier/AttrDef/CSS/ListStyle.php'; +require 'HTMLPurifier/AttrDef/CSS/Multiple.php'; +require 'HTMLPurifier/AttrDef/CSS/Percentage.php'; +require 'HTMLPurifier/AttrDef/CSS/TextDecoration.php'; +require 'HTMLPurifier/AttrDef/CSS/URI.php'; +require 'HTMLPurifier/AttrDef/HTML/Bool.php'; +require 'HTMLPurifier/AttrDef/HTML/Nmtokens.php'; +require 'HTMLPurifier/AttrDef/HTML/Class.php'; +require 'HTMLPurifier/AttrDef/HTML/Color.php'; +require 'HTMLPurifier/AttrDef/HTML/FrameTarget.php'; +require 'HTMLPurifier/AttrDef/HTML/ID.php'; +require 'HTMLPurifier/AttrDef/HTML/Pixels.php'; +require 'HTMLPurifier/AttrDef/HTML/Length.php'; +require 'HTMLPurifier/AttrDef/HTML/LinkTypes.php'; +require 'HTMLPurifier/AttrDef/HTML/MultiLength.php'; +require 'HTMLPurifier/AttrDef/URI/Email.php'; +require 'HTMLPurifier/AttrDef/URI/Host.php'; +require 'HTMLPurifier/AttrDef/URI/IPv4.php'; +require 'HTMLPurifier/AttrDef/URI/IPv6.php'; +require 'HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; +require 'HTMLPurifier/AttrTransform/Background.php'; +require 'HTMLPurifier/AttrTransform/BdoDir.php'; +require 'HTMLPurifier/AttrTransform/BgColor.php'; +require 'HTMLPurifier/AttrTransform/BoolToCSS.php'; +require 'HTMLPurifier/AttrTransform/Border.php'; +require 'HTMLPurifier/AttrTransform/EnumToCSS.php'; +require 'HTMLPurifier/AttrTransform/ImgRequired.php'; +require 'HTMLPurifier/AttrTransform/ImgSpace.php'; +require 'HTMLPurifier/AttrTransform/Input.php'; +require 'HTMLPurifier/AttrTransform/Lang.php'; +require 'HTMLPurifier/AttrTransform/Length.php'; +require 'HTMLPurifier/AttrTransform/Name.php'; +require 'HTMLPurifier/AttrTransform/NameSync.php'; +require 'HTMLPurifier/AttrTransform/Nofollow.php'; +require 'HTMLPurifier/AttrTransform/SafeEmbed.php'; +require 'HTMLPurifier/AttrTransform/SafeObject.php'; +require 'HTMLPurifier/AttrTransform/SafeParam.php'; +require 'HTMLPurifier/AttrTransform/ScriptRequired.php'; +require 'HTMLPurifier/AttrTransform/TargetBlank.php'; +require 'HTMLPurifier/AttrTransform/TargetNoopener.php'; +require 'HTMLPurifier/AttrTransform/TargetNoreferrer.php'; +require 'HTMLPurifier/AttrTransform/Textarea.php'; +require 'HTMLPurifier/ChildDef/Chameleon.php'; +require 'HTMLPurifier/ChildDef/Custom.php'; +require 'HTMLPurifier/ChildDef/Empty.php'; +require 'HTMLPurifier/ChildDef/List.php'; +require 'HTMLPurifier/ChildDef/Required.php'; +require 'HTMLPurifier/ChildDef/Optional.php'; +require 'HTMLPurifier/ChildDef/StrictBlockquote.php'; +require 'HTMLPurifier/ChildDef/Table.php'; +require 'HTMLPurifier/DefinitionCache/Decorator.php'; +require 'HTMLPurifier/DefinitionCache/Null.php'; +require 'HTMLPurifier/DefinitionCache/Serializer.php'; +require 'HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; +require 'HTMLPurifier/DefinitionCache/Decorator/Memory.php'; +require 'HTMLPurifier/HTMLModule/Bdo.php'; +require 'HTMLPurifier/HTMLModule/CommonAttributes.php'; +require 'HTMLPurifier/HTMLModule/Edit.php'; +require 'HTMLPurifier/HTMLModule/Forms.php'; +require 'HTMLPurifier/HTMLModule/Hypertext.php'; +require 'HTMLPurifier/HTMLModule/Iframe.php'; +require 'HTMLPurifier/HTMLModule/Image.php'; +require 'HTMLPurifier/HTMLModule/Legacy.php'; +require 'HTMLPurifier/HTMLModule/List.php'; +require 'HTMLPurifier/HTMLModule/Name.php'; +require 'HTMLPurifier/HTMLModule/Nofollow.php'; +require 'HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; +require 'HTMLPurifier/HTMLModule/Object.php'; +require 'HTMLPurifier/HTMLModule/Presentation.php'; +require 'HTMLPurifier/HTMLModule/Proprietary.php'; +require 'HTMLPurifier/HTMLModule/Ruby.php'; +require 'HTMLPurifier/HTMLModule/SafeEmbed.php'; +require 'HTMLPurifier/HTMLModule/SafeObject.php'; +require 'HTMLPurifier/HTMLModule/SafeScripting.php'; +require 'HTMLPurifier/HTMLModule/Scripting.php'; +require 'HTMLPurifier/HTMLModule/StyleAttribute.php'; +require 'HTMLPurifier/HTMLModule/Tables.php'; +require 'HTMLPurifier/HTMLModule/Target.php'; +require 'HTMLPurifier/HTMLModule/TargetBlank.php'; +require 'HTMLPurifier/HTMLModule/TargetNoopener.php'; +require 'HTMLPurifier/HTMLModule/TargetNoreferrer.php'; +require 'HTMLPurifier/HTMLModule/Text.php'; +require 'HTMLPurifier/HTMLModule/Tidy.php'; +require 'HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; +require 'HTMLPurifier/HTMLModule/Tidy/Name.php'; +require 'HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; +require 'HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; +require 'HTMLPurifier/HTMLModule/Tidy/Strict.php'; +require 'HTMLPurifier/HTMLModule/Tidy/Transitional.php'; +require 'HTMLPurifier/HTMLModule/Tidy/XHTML.php'; +require 'HTMLPurifier/Injector/AutoParagraph.php'; +require 'HTMLPurifier/Injector/DisplayLinkURI.php'; +require 'HTMLPurifier/Injector/Linkify.php'; +require 'HTMLPurifier/Injector/PurifierLinkify.php'; +require 'HTMLPurifier/Injector/RemoveEmpty.php'; +require 'HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php'; +require 'HTMLPurifier/Injector/SafeObject.php'; +require 'HTMLPurifier/Lexer/DOMLex.php'; +require 'HTMLPurifier/Lexer/DirectLex.php'; +require 'HTMLPurifier/Node/Comment.php'; +require 'HTMLPurifier/Node/Element.php'; +require 'HTMLPurifier/Node/Text.php'; +require 'HTMLPurifier/Strategy/Composite.php'; +require 'HTMLPurifier/Strategy/Core.php'; +require 'HTMLPurifier/Strategy/FixNesting.php'; +require 'HTMLPurifier/Strategy/MakeWellFormed.php'; +require 'HTMLPurifier/Strategy/RemoveForeignElements.php'; +require 'HTMLPurifier/Strategy/ValidateAttributes.php'; +require 'HTMLPurifier/TagTransform/Font.php'; +require 'HTMLPurifier/TagTransform/Simple.php'; +require 'HTMLPurifier/Token/Comment.php'; +require 'HTMLPurifier/Token/Tag.php'; +require 'HTMLPurifier/Token/Empty.php'; +require 'HTMLPurifier/Token/End.php'; +require 'HTMLPurifier/Token/Start.php'; +require 'HTMLPurifier/Token/Text.php'; +require 'HTMLPurifier/URIFilter/DisableExternal.php'; +require 'HTMLPurifier/URIFilter/DisableExternalResources.php'; +require 'HTMLPurifier/URIFilter/DisableResources.php'; +require 'HTMLPurifier/URIFilter/HostBlacklist.php'; +require 'HTMLPurifier/URIFilter/MakeAbsolute.php'; +require 'HTMLPurifier/URIFilter/Munge.php'; +require 'HTMLPurifier/URIFilter/SafeIframe.php'; +require 'HTMLPurifier/URIScheme/data.php'; +require 'HTMLPurifier/URIScheme/file.php'; +require 'HTMLPurifier/URIScheme/ftp.php'; +require 'HTMLPurifier/URIScheme/http.php'; +require 'HTMLPurifier/URIScheme/https.php'; +require 'HTMLPurifier/URIScheme/mailto.php'; +require 'HTMLPurifier/URIScheme/news.php'; +require 'HTMLPurifier/URIScheme/nntp.php'; +require 'HTMLPurifier/URIScheme/tel.php'; +require 'HTMLPurifier/VarParser/Flexible.php'; +require 'HTMLPurifier/VarParser/Native.php'; diff --git a/libraries/htmlpurifier/library/HTMLPurifier.kses.php b/libraries/htmlpurifier410/library/HTMLPurifier.kses.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier.kses.php rename to libraries/htmlpurifier410/library/HTMLPurifier.kses.php index 24bef74a572c6ad286b8de98b1dbf9f185908d18..cf0c322f095fd66974d31ed2a265b82a90a88d0b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.kses.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.kses.php @@ -1,30 +1,30 @@ -<?php - -/** - * @file - * Emulation layer for code that used kses(), substituting in HTML Purifier. - */ - -require_once dirname(__FILE__) . '/HTMLPurifier.auto.php'; - -function kses($string, $allowed_html, $allowed_protocols = null) { - $config = HTMLPurifier_Config::createDefault(); - $allowed_elements = array(); - $allowed_attributes = array(); - foreach ($allowed_html as $element => $attributes) { - $allowed_elements[$element] = true; - foreach ($attributes as $attribute => $x) { - $allowed_attributes["$element.$attribute"] = true; - } - } - $config->set('HTML', 'AllowedElements', $allowed_elements); - $config->set('HTML', 'AllowedAttributes', $allowed_attributes); - $allowed_schemes = array(); - if ($allowed_protocols !== null) { - $config->set('URI', 'AllowedSchemes', $allowed_protocols); - } - $purifier = new HTMLPurifier($config); - return $purifier->purify($string); -} - -// vim: et sw=4 sts=4 +<?php + +/** + * @file + * Emulation layer for code that used kses(), substituting in HTML Purifier. + */ + +require_once dirname(__FILE__) . '/HTMLPurifier.auto.php'; + +function kses($string, $allowed_html, $allowed_protocols = null) +{ + $config = HTMLPurifier_Config::createDefault(); + $allowed_elements = array(); + $allowed_attributes = array(); + foreach ($allowed_html as $element => $attributes) { + $allowed_elements[$element] = true; + foreach ($attributes as $attribute => $x) { + $allowed_attributes["$element.$attribute"] = true; + } + } + $config->set('HTML.AllowedElements', $allowed_elements); + $config->set('HTML.AllowedAttributes', $allowed_attributes); + if ($allowed_protocols !== null) { + $config->set('URI.AllowedSchemes', $allowed_protocols); + } + $purifier = new HTMLPurifier($config); + return $purifier->purify($string); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier.path.php b/libraries/htmlpurifier410/library/HTMLPurifier.path.php similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier.path.php rename to libraries/htmlpurifier410/library/HTMLPurifier.path.php index 39b1b65319f4d19c22b78d64c73910297c5ddac8..353492a1cc1a275b030782caa6a0c5f93a79c382 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.path.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.path.php @@ -1,11 +1,11 @@ -<?php - -/** - * @file - * Convenience stub file that adds HTML Purifier's library file to the path - * without any other side-effects. - */ - -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); - -// vim: et sw=4 sts=4 +<?php + +/** + * @file + * Convenience stub file that adds HTML Purifier's library file to the path + * without any other side-effects. + */ + +set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier.php b/libraries/htmlpurifier410/library/HTMLPurifier.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier.php rename to libraries/htmlpurifier410/library/HTMLPurifier.php index 4b1eddecb59f97cda4af8039eea0f3fdfd0d3aeb..6f0fa811a74331af42b994984c983715be4a04f3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.php @@ -1,236 +1,292 @@ -<?php - -/*! @mainpage - * - * HTML Purifier is an HTML filter that will take an arbitrary snippet of - * HTML and rigorously test, validate and filter it into a version that - * is safe for output onto webpages. It achieves this by: - * - * -# Lexing (parsing into tokens) the document, - * -# Executing various strategies on the tokens: - * -# Removing all elements not in the whitelist, - * -# Making the tokens well-formed, - * -# Fixing the nesting of the nodes, and - * -# Validating attributes of the nodes; and - * -# Generating HTML from the purified tokens. - * - * However, most users will only need to interface with the HTMLPurifier - * and HTMLPurifier_Config. - */ - -/* - HTML Purifier 3.3.0 - Standards Compliant HTML Filtering - Copyright (C) 2006-2008 Edward Z. Yang - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * Facade that coordinates HTML Purifier's subsystems in order to purify HTML. - * - * @note There are several points in which configuration can be specified - * for HTML Purifier. The precedence of these (from lowest to - * highest) is as follows: - * -# Instance: new HTMLPurifier($config) - * -# Invocation: purify($html, $config) - * These configurations are entirely independent of each other and - * are *not* merged (this behavior may change in the future). - * - * @todo We need an easier way to inject strategies using the configuration - * object. - */ -class HTMLPurifier -{ - - /** Version of HTML Purifier */ - public $version = '3.3.0'; - - /** Constant with version of HTML Purifier */ - const VERSION = '3.3.0'; - - /** Global configuration object */ - public $config; - - /** Array of extra HTMLPurifier_Filter objects to run on HTML, for backwards compatibility */ - private $filters = array(); - - /** Single instance of HTML Purifier */ - private static $instance; - - protected $strategy, $generator; - - /** - * Resultant HTMLPurifier_Context of last run purification. Is an array - * of contexts if the last called method was purifyArray(). - */ - public $context; - - /** - * Initializes the purifier. - * @param $config Optional HTMLPurifier_Config object for all instances of - * the purifier, if omitted, a default configuration is - * supplied (which can be overridden on a per-use basis). - * The parameter can also be any type that - * HTMLPurifier_Config::create() supports. - */ - public function __construct($config = null) { - - $this->config = HTMLPurifier_Config::create($config); - - $this->strategy = new HTMLPurifier_Strategy_Core(); - - } - - /** - * Adds a filter to process the output. First come first serve - * @param $filter HTMLPurifier_Filter object - */ - public function addFilter($filter) { - trigger_error('HTMLPurifier->addFilter() is deprecated, use configuration directives in the Filter namespace or Filter.Custom', E_USER_WARNING); - $this->filters[] = $filter; - } - - /** - * Filters an HTML snippet/document to be XSS-free and standards-compliant. - * - * @param $html String of HTML to purify - * @param $config HTMLPurifier_Config object for this operation, if omitted, - * defaults to the config object specified during this - * object's construction. The parameter can also be any type - * that HTMLPurifier_Config::create() supports. - * @return Purified HTML - */ - public function purify($html, $config = null) { - - // :TODO: make the config merge in, instead of replace - $config = $config ? HTMLPurifier_Config::create($config) : $this->config; - - // implementation is partially environment dependant, partially - // configuration dependant - $lexer = HTMLPurifier_Lexer::create($config); - - $context = new HTMLPurifier_Context(); - - // setup HTML generator - $this->generator = new HTMLPurifier_Generator($config, $context); - $context->register('Generator', $this->generator); - - // set up global context variables - if ($config->get('Core', 'CollectErrors')) { - // may get moved out if other facilities use it - $language_factory = HTMLPurifier_LanguageFactory::instance(); - $language = $language_factory->create($config, $context); - $context->register('Locale', $language); - - $error_collector = new HTMLPurifier_ErrorCollector($context); - $context->register('ErrorCollector', $error_collector); - } - - // setup id_accumulator context, necessary due to the fact that - // AttrValidator can be called from many places - $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); - $context->register('IDAccumulator', $id_accumulator); - - $html = HTMLPurifier_Encoder::convertToUTF8($html, $config, $context); - - // setup filters - $filter_flags = $config->getBatch('Filter'); - $custom_filters = $filter_flags['Custom']; - unset($filter_flags['Custom']); - $filters = array(); - foreach ($filter_flags as $filter => $flag) { - if (!$flag) continue; - $class = "HTMLPurifier_Filter_$filter"; - $filters[] = new $class; - } - foreach ($custom_filters as $filter) { - // maybe "HTMLPurifier_Filter_$filter", but be consistent with AutoFormat - $filters[] = $filter; - } - $filters = array_merge($filters, $this->filters); - // maybe prepare(), but later - - for ($i = 0, $filter_size = count($filters); $i < $filter_size; $i++) { - $html = $filters[$i]->preFilter($html, $config, $context); - } - - // purified HTML - $html = - $this->generator->generateFromTokens( - // list of tokens - $this->strategy->execute( - // list of un-purified tokens - $lexer->tokenizeHTML( - // un-purified HTML - $html, $config, $context - ), - $config, $context - ) - ); - - for ($i = $filter_size - 1; $i >= 0; $i--) { - $html = $filters[$i]->postFilter($html, $config, $context); - } - - $html = HTMLPurifier_Encoder::convertFromUTF8($html, $config, $context); - $this->context =& $context; - return $html; - } - - /** - * Filters an array of HTML snippets - * @param $config Optional HTMLPurifier_Config object for this operation. - * See HTMLPurifier::purify() for more details. - * @return Array of purified HTML - */ - public function purifyArray($array_of_html, $config = null) { - $context_array = array(); - foreach ($array_of_html as $key => $html) { - $array_of_html[$key] = $this->purify($html, $config); - $context_array[$key] = $this->context; - } - $this->context = $context_array; - return $array_of_html; - } - - /** - * Singleton for enforcing just one HTML Purifier in your system - * @param $prototype Optional prototype HTMLPurifier instance to - * overload singleton with, or HTMLPurifier_Config - * instance to configure the generated version with. - */ - public static function instance($prototype = null) { - if (!self::$instance || $prototype) { - if ($prototype instanceof HTMLPurifier) { - self::$instance = $prototype; - } elseif ($prototype) { - self::$instance = new HTMLPurifier($prototype); - } else { - self::$instance = new HTMLPurifier(); - } - } - return self::$instance; - } - - /** - * @note Backwards compatibility, see instance() - */ - public static function getInstance($prototype = null) { - return HTMLPurifier::instance($prototype); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/*! @mainpage + * + * HTML Purifier is an HTML filter that will take an arbitrary snippet of + * HTML and rigorously test, validate and filter it into a version that + * is safe for output onto webpages. It achieves this by: + * + * -# Lexing (parsing into tokens) the document, + * -# Executing various strategies on the tokens: + * -# Removing all elements not in the whitelist, + * -# Making the tokens well-formed, + * -# Fixing the nesting of the nodes, and + * -# Validating attributes of the nodes; and + * -# Generating HTML from the purified tokens. + * + * However, most users will only need to interface with the HTMLPurifier + * and HTMLPurifier_Config. + */ + +/* + HTML Purifier 4.10.0 - Standards Compliant HTML Filtering + Copyright (C) 2006-2008 Edward Z. Yang + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * Facade that coordinates HTML Purifier's subsystems in order to purify HTML. + * + * @note There are several points in which configuration can be specified + * for HTML Purifier. The precedence of these (from lowest to + * highest) is as follows: + * -# Instance: new HTMLPurifier($config) + * -# Invocation: purify($html, $config) + * These configurations are entirely independent of each other and + * are *not* merged (this behavior may change in the future). + * + * @todo We need an easier way to inject strategies using the configuration + * object. + */ +class HTMLPurifier +{ + + /** + * Version of HTML Purifier. + * @type string + */ + public $version = '4.10.0'; + + /** + * Constant with version of HTML Purifier. + */ + const VERSION = '4.10.0'; + + /** + * Global configuration object. + * @type HTMLPurifier_Config + */ + public $config; + + /** + * Array of extra filter objects to run on HTML, + * for backwards compatibility. + * @type HTMLPurifier_Filter[] + */ + private $filters = array(); + + /** + * Single instance of HTML Purifier. + * @type HTMLPurifier + */ + private static $instance; + + /** + * @type HTMLPurifier_Strategy_Core + */ + protected $strategy; + + /** + * @type HTMLPurifier_Generator + */ + protected $generator; + + /** + * Resultant context of last run purification. + * Is an array of contexts if the last called method was purifyArray(). + * @type HTMLPurifier_Context + */ + public $context; + + /** + * Initializes the purifier. + * + * @param HTMLPurifier_Config|mixed $config Optional HTMLPurifier_Config object + * for all instances of the purifier, if omitted, a default + * configuration is supplied (which can be overridden on a + * per-use basis). + * The parameter can also be any type that + * HTMLPurifier_Config::create() supports. + */ + public function __construct($config = null) + { + $this->config = HTMLPurifier_Config::create($config); + $this->strategy = new HTMLPurifier_Strategy_Core(); + } + + /** + * Adds a filter to process the output. First come first serve + * + * @param HTMLPurifier_Filter $filter HTMLPurifier_Filter object + */ + public function addFilter($filter) + { + trigger_error( + 'HTMLPurifier->addFilter() is deprecated, use configuration directives' . + ' in the Filter namespace or Filter.Custom', + E_USER_WARNING + ); + $this->filters[] = $filter; + } + + /** + * Filters an HTML snippet/document to be XSS-free and standards-compliant. + * + * @param string $html String of HTML to purify + * @param HTMLPurifier_Config $config Config object for this operation, + * if omitted, defaults to the config object specified during this + * object's construction. The parameter can also be any type + * that HTMLPurifier_Config::create() supports. + * + * @return string Purified HTML + */ + public function purify($html, $config = null) + { + // :TODO: make the config merge in, instead of replace + $config = $config ? HTMLPurifier_Config::create($config) : $this->config; + + // implementation is partially environment dependant, partially + // configuration dependant + $lexer = HTMLPurifier_Lexer::create($config); + + $context = new HTMLPurifier_Context(); + + // setup HTML generator + $this->generator = new HTMLPurifier_Generator($config, $context); + $context->register('Generator', $this->generator); + + // set up global context variables + if ($config->get('Core.CollectErrors')) { + // may get moved out if other facilities use it + $language_factory = HTMLPurifier_LanguageFactory::instance(); + $language = $language_factory->create($config, $context); + $context->register('Locale', $language); + + $error_collector = new HTMLPurifier_ErrorCollector($context); + $context->register('ErrorCollector', $error_collector); + } + + // setup id_accumulator context, necessary due to the fact that + // AttrValidator can be called from many places + $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); + $context->register('IDAccumulator', $id_accumulator); + + $html = HTMLPurifier_Encoder::convertToUTF8($html, $config, $context); + + // setup filters + $filter_flags = $config->getBatch('Filter'); + $custom_filters = $filter_flags['Custom']; + unset($filter_flags['Custom']); + $filters = array(); + foreach ($filter_flags as $filter => $flag) { + if (!$flag) { + continue; + } + if (strpos($filter, '.') !== false) { + continue; + } + $class = "HTMLPurifier_Filter_$filter"; + $filters[] = new $class; + } + foreach ($custom_filters as $filter) { + // maybe "HTMLPurifier_Filter_$filter", but be consistent with AutoFormat + $filters[] = $filter; + } + $filters = array_merge($filters, $this->filters); + // maybe prepare(), but later + + for ($i = 0, $filter_size = count($filters); $i < $filter_size; $i++) { + $html = $filters[$i]->preFilter($html, $config, $context); + } + + // purified HTML + $html = + $this->generator->generateFromTokens( + // list of tokens + $this->strategy->execute( + // list of un-purified tokens + $lexer->tokenizeHTML( + // un-purified HTML + $html, + $config, + $context + ), + $config, + $context + ) + ); + + for ($i = $filter_size - 1; $i >= 0; $i--) { + $html = $filters[$i]->postFilter($html, $config, $context); + } + + $html = HTMLPurifier_Encoder::convertFromUTF8($html, $config, $context); + $this->context =& $context; + return $html; + } + + /** + * Filters an array of HTML snippets + * + * @param string[] $array_of_html Array of html snippets + * @param HTMLPurifier_Config $config Optional config object for this operation. + * See HTMLPurifier::purify() for more details. + * + * @return string[] Array of purified HTML + */ + public function purifyArray($array_of_html, $config = null) + { + $context_array = array(); + foreach ($array_of_html as $key => $html) { + $array_of_html[$key] = $this->purify($html, $config); + $context_array[$key] = $this->context; + } + $this->context = $context_array; + return $array_of_html; + } + + /** + * Singleton for enforcing just one HTML Purifier in your system + * + * @param HTMLPurifier|HTMLPurifier_Config $prototype Optional prototype + * HTMLPurifier instance to overload singleton with, + * or HTMLPurifier_Config instance to configure the + * generated version with. + * + * @return HTMLPurifier + */ + public static function instance($prototype = null) + { + if (!self::$instance || $prototype) { + if ($prototype instanceof HTMLPurifier) { + self::$instance = $prototype; + } elseif ($prototype) { + self::$instance = new HTMLPurifier($prototype); + } else { + self::$instance = new HTMLPurifier(); + } + } + return self::$instance; + } + + /** + * Singleton for enforcing just one HTML Purifier in your system + * + * @param HTMLPurifier|HTMLPurifier_Config $prototype Optional prototype + * HTMLPurifier instance to overload singleton with, + * or HTMLPurifier_Config instance to configure the + * generated version with. + * + * @return HTMLPurifier + * @note Backwards compatibility, see instance() + */ + public static function getInstance($prototype = null) + { + return HTMLPurifier::instance($prototype); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier.safe-includes.php b/libraries/htmlpurifier410/library/HTMLPurifier.safe-includes.php similarity index 85% rename from libraries/htmlpurifier/library/HTMLPurifier.safe-includes.php rename to libraries/htmlpurifier410/library/HTMLPurifier.safe-includes.php index 7d393036a896a5fef42222f8390eeb8a75dd7a56..852a0b853cfc1657f6a5e6212ce083e4c29dfd5f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier.safe-includes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier.safe-includes.php @@ -1,200 +1,228 @@ -<?php - -/** - * @file - * This file was auto-generated by generate-includes.php and includes all of - * the core files required by HTML Purifier. This is a convenience stub that - * includes all files using dirname(__FILE__) and require_once. PLEASE DO NOT - * EDIT THIS FILE, changes will be overwritten the next time the script is run. - * - * Changes to include_path are not necessary. - */ - -$__dir = dirname(__FILE__); - -require_once $__dir . '/HTMLPurifier.php'; -require_once $__dir . '/HTMLPurifier/AttrCollections.php'; -require_once $__dir . '/HTMLPurifier/AttrDef.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform.php'; -require_once $__dir . '/HTMLPurifier/AttrTypes.php'; -require_once $__dir . '/HTMLPurifier/AttrValidator.php'; -require_once $__dir . '/HTMLPurifier/Bootstrap.php'; -require_once $__dir . '/HTMLPurifier/Definition.php'; -require_once $__dir . '/HTMLPurifier/CSSDefinition.php'; -require_once $__dir . '/HTMLPurifier/ChildDef.php'; -require_once $__dir . '/HTMLPurifier/Config.php'; -require_once $__dir . '/HTMLPurifier/ConfigSchema.php'; -require_once $__dir . '/HTMLPurifier/ContentSets.php'; -require_once $__dir . '/HTMLPurifier/Context.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCacheFactory.php'; -require_once $__dir . '/HTMLPurifier/Doctype.php'; -require_once $__dir . '/HTMLPurifier/DoctypeRegistry.php'; -require_once $__dir . '/HTMLPurifier/ElementDef.php'; -require_once $__dir . '/HTMLPurifier/Encoder.php'; -require_once $__dir . '/HTMLPurifier/EntityLookup.php'; -require_once $__dir . '/HTMLPurifier/EntityParser.php'; -require_once $__dir . '/HTMLPurifier/ErrorCollector.php'; -require_once $__dir . '/HTMLPurifier/ErrorStruct.php'; -require_once $__dir . '/HTMLPurifier/Exception.php'; -require_once $__dir . '/HTMLPurifier/Filter.php'; -require_once $__dir . '/HTMLPurifier/Generator.php'; -require_once $__dir . '/HTMLPurifier/HTMLDefinition.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule.php'; -require_once $__dir . '/HTMLPurifier/HTMLModuleManager.php'; -require_once $__dir . '/HTMLPurifier/IDAccumulator.php'; -require_once $__dir . '/HTMLPurifier/Injector.php'; -require_once $__dir . '/HTMLPurifier/Language.php'; -require_once $__dir . '/HTMLPurifier/LanguageFactory.php'; -require_once $__dir . '/HTMLPurifier/Length.php'; -require_once $__dir . '/HTMLPurifier/Lexer.php'; -require_once $__dir . '/HTMLPurifier/PercentEncoder.php'; -require_once $__dir . '/HTMLPurifier/PropertyList.php'; -require_once $__dir . '/HTMLPurifier/PropertyListIterator.php'; -require_once $__dir . '/HTMLPurifier/Strategy.php'; -require_once $__dir . '/HTMLPurifier/StringHash.php'; -require_once $__dir . '/HTMLPurifier/StringHashParser.php'; -require_once $__dir . '/HTMLPurifier/TagTransform.php'; -require_once $__dir . '/HTMLPurifier/Token.php'; -require_once $__dir . '/HTMLPurifier/TokenFactory.php'; -require_once $__dir . '/HTMLPurifier/URI.php'; -require_once $__dir . '/HTMLPurifier/URIDefinition.php'; -require_once $__dir . '/HTMLPurifier/URIFilter.php'; -require_once $__dir . '/HTMLPurifier/URIParser.php'; -require_once $__dir . '/HTMLPurifier/URIScheme.php'; -require_once $__dir . '/HTMLPurifier/URISchemeRegistry.php'; -require_once $__dir . '/HTMLPurifier/UnitConverter.php'; -require_once $__dir . '/HTMLPurifier/VarParser.php'; -require_once $__dir . '/HTMLPurifier/VarParserException.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/Enum.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/Integer.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/Lang.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/Switch.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/Text.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Number.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/AlphaValue.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Background.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Border.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Color.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Composite.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Filter.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Font.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/FontFamily.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Length.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ListStyle.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Multiple.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Percentage.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/TextDecoration.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/URI.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Bool.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Color.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/FrameTarget.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/ID.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Pixels.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Length.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/LinkTypes.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/MultiLength.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Nmtokens.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Host.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv4.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv6.php'; -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Background.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/BdoDir.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/BgColor.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/BoolToCSS.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Border.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/EnumToCSS.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/ImgRequired.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/ImgSpace.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Input.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Lang.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Length.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Name.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeEmbed.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeObject.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeParam.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/ScriptRequired.php'; -require_once $__dir . '/HTMLPurifier/AttrTransform/Textarea.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Chameleon.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Custom.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Empty.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Required.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Optional.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/StrictBlockquote.php'; -require_once $__dir . '/HTMLPurifier/ChildDef/Table.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache/Null.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache/Serializer.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Memory.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Bdo.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/CommonAttributes.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Edit.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Forms.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Hypertext.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/List.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Object.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Presentation.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Proprietary.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Ruby.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/SafeEmbed.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/SafeObject.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Scripting.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/StyleAttribute.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tables.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Target.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Text.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Name.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Strict.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Transitional.php'; -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTML.php'; -require_once $__dir . '/HTMLPurifier/Injector/AutoParagraph.php'; -require_once $__dir . '/HTMLPurifier/Injector/DisplayLinkURI.php'; -require_once $__dir . '/HTMLPurifier/Injector/Linkify.php'; -require_once $__dir . '/HTMLPurifier/Injector/PurifierLinkify.php'; -require_once $__dir . '/HTMLPurifier/Injector/RemoveEmpty.php'; -require_once $__dir . '/HTMLPurifier/Injector/SafeObject.php'; -require_once $__dir . '/HTMLPurifier/Lexer/DOMLex.php'; -require_once $__dir . '/HTMLPurifier/Lexer/DirectLex.php'; -require_once $__dir . '/HTMLPurifier/Strategy/Composite.php'; -require_once $__dir . '/HTMLPurifier/Strategy/Core.php'; -require_once $__dir . '/HTMLPurifier/Strategy/FixNesting.php'; -require_once $__dir . '/HTMLPurifier/Strategy/MakeWellFormed.php'; -require_once $__dir . '/HTMLPurifier/Strategy/RemoveForeignElements.php'; -require_once $__dir . '/HTMLPurifier/Strategy/ValidateAttributes.php'; -require_once $__dir . '/HTMLPurifier/TagTransform/Font.php'; -require_once $__dir . '/HTMLPurifier/TagTransform/Simple.php'; -require_once $__dir . '/HTMLPurifier/Token/Comment.php'; -require_once $__dir . '/HTMLPurifier/Token/Tag.php'; -require_once $__dir . '/HTMLPurifier/Token/Empty.php'; -require_once $__dir . '/HTMLPurifier/Token/End.php'; -require_once $__dir . '/HTMLPurifier/Token/Start.php'; -require_once $__dir . '/HTMLPurifier/Token/Text.php'; -require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternal.php'; -require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternalResources.php'; -require_once $__dir . '/HTMLPurifier/URIFilter/HostBlacklist.php'; -require_once $__dir . '/HTMLPurifier/URIFilter/MakeAbsolute.php'; -require_once $__dir . '/HTMLPurifier/URIFilter/Munge.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/ftp.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/http.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/https.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/mailto.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/news.php'; -require_once $__dir . '/HTMLPurifier/URIScheme/nntp.php'; -require_once $__dir . '/HTMLPurifier/VarParser/Flexible.php'; -require_once $__dir . '/HTMLPurifier/VarParser/Native.php'; +<?php + +/** + * @file + * This file was auto-generated by generate-includes.php and includes all of + * the core files required by HTML Purifier. This is a convenience stub that + * includes all files using dirname(__FILE__) and require_once. PLEASE DO NOT + * EDIT THIS FILE, changes will be overwritten the next time the script is run. + * + * Changes to include_path are not necessary. + */ + +$__dir = dirname(__FILE__); + +require_once $__dir . '/HTMLPurifier.php'; +require_once $__dir . '/HTMLPurifier/Arborize.php'; +require_once $__dir . '/HTMLPurifier/AttrCollections.php'; +require_once $__dir . '/HTMLPurifier/AttrDef.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform.php'; +require_once $__dir . '/HTMLPurifier/AttrTypes.php'; +require_once $__dir . '/HTMLPurifier/AttrValidator.php'; +require_once $__dir . '/HTMLPurifier/Bootstrap.php'; +require_once $__dir . '/HTMLPurifier/Definition.php'; +require_once $__dir . '/HTMLPurifier/CSSDefinition.php'; +require_once $__dir . '/HTMLPurifier/ChildDef.php'; +require_once $__dir . '/HTMLPurifier/Config.php'; +require_once $__dir . '/HTMLPurifier/ConfigSchema.php'; +require_once $__dir . '/HTMLPurifier/ContentSets.php'; +require_once $__dir . '/HTMLPurifier/Context.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCacheFactory.php'; +require_once $__dir . '/HTMLPurifier/Doctype.php'; +require_once $__dir . '/HTMLPurifier/DoctypeRegistry.php'; +require_once $__dir . '/HTMLPurifier/ElementDef.php'; +require_once $__dir . '/HTMLPurifier/Encoder.php'; +require_once $__dir . '/HTMLPurifier/EntityLookup.php'; +require_once $__dir . '/HTMLPurifier/EntityParser.php'; +require_once $__dir . '/HTMLPurifier/ErrorCollector.php'; +require_once $__dir . '/HTMLPurifier/ErrorStruct.php'; +require_once $__dir . '/HTMLPurifier/Exception.php'; +require_once $__dir . '/HTMLPurifier/Filter.php'; +require_once $__dir . '/HTMLPurifier/Generator.php'; +require_once $__dir . '/HTMLPurifier/HTMLDefinition.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule.php'; +require_once $__dir . '/HTMLPurifier/HTMLModuleManager.php'; +require_once $__dir . '/HTMLPurifier/IDAccumulator.php'; +require_once $__dir . '/HTMLPurifier/Injector.php'; +require_once $__dir . '/HTMLPurifier/Language.php'; +require_once $__dir . '/HTMLPurifier/LanguageFactory.php'; +require_once $__dir . '/HTMLPurifier/Length.php'; +require_once $__dir . '/HTMLPurifier/Lexer.php'; +require_once $__dir . '/HTMLPurifier/Node.php'; +require_once $__dir . '/HTMLPurifier/PercentEncoder.php'; +require_once $__dir . '/HTMLPurifier/PropertyList.php'; +require_once $__dir . '/HTMLPurifier/PropertyListIterator.php'; +require_once $__dir . '/HTMLPurifier/Queue.php'; +require_once $__dir . '/HTMLPurifier/Strategy.php'; +require_once $__dir . '/HTMLPurifier/StringHash.php'; +require_once $__dir . '/HTMLPurifier/StringHashParser.php'; +require_once $__dir . '/HTMLPurifier/TagTransform.php'; +require_once $__dir . '/HTMLPurifier/Token.php'; +require_once $__dir . '/HTMLPurifier/TokenFactory.php'; +require_once $__dir . '/HTMLPurifier/URI.php'; +require_once $__dir . '/HTMLPurifier/URIDefinition.php'; +require_once $__dir . '/HTMLPurifier/URIFilter.php'; +require_once $__dir . '/HTMLPurifier/URIParser.php'; +require_once $__dir . '/HTMLPurifier/URIScheme.php'; +require_once $__dir . '/HTMLPurifier/URISchemeRegistry.php'; +require_once $__dir . '/HTMLPurifier/UnitConverter.php'; +require_once $__dir . '/HTMLPurifier/VarParser.php'; +require_once $__dir . '/HTMLPurifier/VarParserException.php'; +require_once $__dir . '/HTMLPurifier/Zipper.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Clone.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Enum.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Integer.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Lang.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Switch.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/Text.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Number.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/AlphaValue.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Background.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Border.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Color.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Composite.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Filter.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Font.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/FontFamily.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Ident.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Length.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ListStyle.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Multiple.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Percentage.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/TextDecoration.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/CSS/URI.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Bool.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Nmtokens.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Class.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Color.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/FrameTarget.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/ID.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Pixels.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Length.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/LinkTypes.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/HTML/MultiLength.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI/Host.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv4.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv6.php'; +require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Background.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/BdoDir.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/BgColor.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/BoolToCSS.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Border.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/EnumToCSS.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/ImgRequired.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/ImgSpace.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Input.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Lang.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Length.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Name.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/NameSync.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Nofollow.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/SafeEmbed.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/SafeObject.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/SafeParam.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/ScriptRequired.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/TargetBlank.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/TargetNoopener.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/TargetNoreferrer.php'; +require_once $__dir . '/HTMLPurifier/AttrTransform/Textarea.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Chameleon.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Custom.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Empty.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/List.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Required.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Optional.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/StrictBlockquote.php'; +require_once $__dir . '/HTMLPurifier/ChildDef/Table.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache/Null.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache/Serializer.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; +require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Memory.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Bdo.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/CommonAttributes.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Edit.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Forms.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Hypertext.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Iframe.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/List.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Nofollow.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Object.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Presentation.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Proprietary.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Ruby.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/SafeEmbed.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/SafeObject.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/SafeScripting.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Scripting.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/StyleAttribute.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tables.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Target.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/TargetBlank.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/TargetNoopener.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/TargetNoreferrer.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Text.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Name.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Strict.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Transitional.php'; +require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTML.php'; +require_once $__dir . '/HTMLPurifier/Injector/AutoParagraph.php'; +require_once $__dir . '/HTMLPurifier/Injector/DisplayLinkURI.php'; +require_once $__dir . '/HTMLPurifier/Injector/Linkify.php'; +require_once $__dir . '/HTMLPurifier/Injector/PurifierLinkify.php'; +require_once $__dir . '/HTMLPurifier/Injector/RemoveEmpty.php'; +require_once $__dir . '/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php'; +require_once $__dir . '/HTMLPurifier/Injector/SafeObject.php'; +require_once $__dir . '/HTMLPurifier/Lexer/DOMLex.php'; +require_once $__dir . '/HTMLPurifier/Lexer/DirectLex.php'; +require_once $__dir . '/HTMLPurifier/Node/Comment.php'; +require_once $__dir . '/HTMLPurifier/Node/Element.php'; +require_once $__dir . '/HTMLPurifier/Node/Text.php'; +require_once $__dir . '/HTMLPurifier/Strategy/Composite.php'; +require_once $__dir . '/HTMLPurifier/Strategy/Core.php'; +require_once $__dir . '/HTMLPurifier/Strategy/FixNesting.php'; +require_once $__dir . '/HTMLPurifier/Strategy/MakeWellFormed.php'; +require_once $__dir . '/HTMLPurifier/Strategy/RemoveForeignElements.php'; +require_once $__dir . '/HTMLPurifier/Strategy/ValidateAttributes.php'; +require_once $__dir . '/HTMLPurifier/TagTransform/Font.php'; +require_once $__dir . '/HTMLPurifier/TagTransform/Simple.php'; +require_once $__dir . '/HTMLPurifier/Token/Comment.php'; +require_once $__dir . '/HTMLPurifier/Token/Tag.php'; +require_once $__dir . '/HTMLPurifier/Token/Empty.php'; +require_once $__dir . '/HTMLPurifier/Token/End.php'; +require_once $__dir . '/HTMLPurifier/Token/Start.php'; +require_once $__dir . '/HTMLPurifier/Token/Text.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternal.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternalResources.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/DisableResources.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/HostBlacklist.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/MakeAbsolute.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/Munge.php'; +require_once $__dir . '/HTMLPurifier/URIFilter/SafeIframe.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/data.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/file.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/ftp.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/http.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/https.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/mailto.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/news.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/nntp.php'; +require_once $__dir . '/HTMLPurifier/URIScheme/tel.php'; +require_once $__dir . '/HTMLPurifier/VarParser/Flexible.php'; +require_once $__dir . '/HTMLPurifier/VarParser/Native.php'; diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Arborize.php b/libraries/htmlpurifier410/library/HTMLPurifier/Arborize.php new file mode 100644 index 0000000000000000000000000000000000000000..b31f2afb36a41f3725b511c69cd062f902ae7014 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Arborize.php @@ -0,0 +1,71 @@ +<?php + +/** + * Converts a stream of HTMLPurifier_Token into an HTMLPurifier_Node, + * and back again. + * + * @note This transformation is not an equivalence. We mutate the input + * token stream to make it so; see all [MUT] markers in code. + */ +class HTMLPurifier_Arborize +{ + public static function arborize($tokens, $config, $context) { + $definition = $config->getHTMLDefinition(); + $parent = new HTMLPurifier_Token_Start($definition->info_parent); + $stack = array($parent->toNode()); + foreach ($tokens as $token) { + $token->skip = null; // [MUT] + $token->carryover = null; // [MUT] + if ($token instanceof HTMLPurifier_Token_End) { + $token->start = null; // [MUT] + $r = array_pop($stack); + //assert($r->name === $token->name); + //assert(empty($token->attr)); + $r->endCol = $token->col; + $r->endLine = $token->line; + $r->endArmor = $token->armor; + continue; + } + $node = $token->toNode(); + $stack[count($stack)-1]->children[] = $node; + if ($token instanceof HTMLPurifier_Token_Start) { + $stack[] = $node; + } + } + //assert(count($stack) == 1); + return $stack[0]; + } + + public static function flatten($node, $config, $context) { + $level = 0; + $nodes = array($level => new HTMLPurifier_Queue(array($node))); + $closingTokens = array(); + $tokens = array(); + do { + while (!$nodes[$level]->isEmpty()) { + $node = $nodes[$level]->shift(); // FIFO + list($start, $end) = $node->toTokenPair(); + if ($level > 0) { + $tokens[] = $start; + } + if ($end !== NULL) { + $closingTokens[$level][] = $end; + } + if ($node instanceof HTMLPurifier_Node_Element) { + $level++; + $nodes[$level] = new HTMLPurifier_Queue(); + foreach ($node->children as $childNode) { + $nodes[$level]->push($childNode); + } + } + } + $level--; + if ($level && isset($closingTokens[$level])) { + while ($token = array_pop($closingTokens[$level])) { + $tokens[] = $token; + } + } + } while ($level > 0); + return $tokens; + } +} diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrCollections.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrCollections.php similarity index 70% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrCollections.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrCollections.php index 555b86d0428d7e3770ea58d1745d80d0bd2f73cf..6e58663ac4d7fe12a257a3b602667b02f94f1bdf 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrCollections.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrCollections.php @@ -1,128 +1,148 @@ -<?php - -/** - * Defines common attribute collections that modules reference - */ - -class HTMLPurifier_AttrCollections -{ - - /** - * Associative array of attribute collections, indexed by name - */ - public $info = array(); - - /** - * Performs all expansions on internal data for use by other inclusions - * It also collects all attribute collection extensions from - * modules - * @param $attr_types HTMLPurifier_AttrTypes instance - * @param $modules Hash array of HTMLPurifier_HTMLModule members - */ - public function __construct($attr_types, $modules) { - // load extensions from the modules - foreach ($modules as $module) { - foreach ($module->attr_collections as $coll_i => $coll) { - if (!isset($this->info[$coll_i])) { - $this->info[$coll_i] = array(); - } - foreach ($coll as $attr_i => $attr) { - if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) { - // merge in includes - $this->info[$coll_i][$attr_i] = array_merge( - $this->info[$coll_i][$attr_i], $attr); - continue; - } - $this->info[$coll_i][$attr_i] = $attr; - } - } - } - // perform internal expansions and inclusions - foreach ($this->info as $name => $attr) { - // merge attribute collections that include others - $this->performInclusions($this->info[$name]); - // replace string identifiers with actual attribute objects - $this->expandIdentifiers($this->info[$name], $attr_types); - } - } - - /** - * Takes a reference to an attribute associative array and performs - * all inclusions specified by the zero index. - * @param &$attr Reference to attribute array - */ - public function performInclusions(&$attr) { - if (!isset($attr[0])) return; - $merge = $attr[0]; - $seen = array(); // recursion guard - // loop through all the inclusions - for ($i = 0; isset($merge[$i]); $i++) { - if (isset($seen[$merge[$i]])) continue; - $seen[$merge[$i]] = true; - // foreach attribute of the inclusion, copy it over - if (!isset($this->info[$merge[$i]])) continue; - foreach ($this->info[$merge[$i]] as $key => $value) { - if (isset($attr[$key])) continue; // also catches more inclusions - $attr[$key] = $value; - } - if (isset($this->info[$merge[$i]][0])) { - // recursion - $merge = array_merge($merge, $this->info[$merge[$i]][0]); - } - } - unset($attr[0]); - } - - /** - * Expands all string identifiers in an attribute array by replacing - * them with the appropriate values inside HTMLPurifier_AttrTypes - * @param &$attr Reference to attribute array - * @param $attr_types HTMLPurifier_AttrTypes instance - */ - public function expandIdentifiers(&$attr, $attr_types) { - - // because foreach will process new elements we add, make sure we - // skip duplicates - $processed = array(); - - foreach ($attr as $def_i => $def) { - // skip inclusions - if ($def_i === 0) continue; - - if (isset($processed[$def_i])) continue; - - // determine whether or not attribute is required - if ($required = (strpos($def_i, '*') !== false)) { - // rename the definition - unset($attr[$def_i]); - $def_i = trim($def_i, '*'); - $attr[$def_i] = $def; - } - - $processed[$def_i] = true; - - // if we've already got a literal object, move on - if (is_object($def)) { - // preserve previous required - $attr[$def_i]->required = ($required || $attr[$def_i]->required); - continue; - } - - if ($def === false) { - unset($attr[$def_i]); - continue; - } - - if ($t = $attr_types->get($def)) { - $attr[$def_i] = $t; - $attr[$def_i]->required = $required; - } else { - unset($attr[$def_i]); - } - } - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Defines common attribute collections that modules reference + */ + +class HTMLPurifier_AttrCollections +{ + + /** + * Associative array of attribute collections, indexed by name. + * @type array + */ + public $info = array(); + + /** + * Performs all expansions on internal data for use by other inclusions + * It also collects all attribute collection extensions from + * modules + * @param HTMLPurifier_AttrTypes $attr_types HTMLPurifier_AttrTypes instance + * @param HTMLPurifier_HTMLModule[] $modules Hash array of HTMLPurifier_HTMLModule members + */ + public function __construct($attr_types, $modules) + { + $this->doConstruct($attr_types, $modules); + } + + public function doConstruct($attr_types, $modules) + { + // load extensions from the modules + foreach ($modules as $module) { + foreach ($module->attr_collections as $coll_i => $coll) { + if (!isset($this->info[$coll_i])) { + $this->info[$coll_i] = array(); + } + foreach ($coll as $attr_i => $attr) { + if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) { + // merge in includes + $this->info[$coll_i][$attr_i] = array_merge( + $this->info[$coll_i][$attr_i], + $attr + ); + continue; + } + $this->info[$coll_i][$attr_i] = $attr; + } + } + } + // perform internal expansions and inclusions + foreach ($this->info as $name => $attr) { + // merge attribute collections that include others + $this->performInclusions($this->info[$name]); + // replace string identifiers with actual attribute objects + $this->expandIdentifiers($this->info[$name], $attr_types); + } + } + + /** + * Takes a reference to an attribute associative array and performs + * all inclusions specified by the zero index. + * @param array &$attr Reference to attribute array + */ + public function performInclusions(&$attr) + { + if (!isset($attr[0])) { + return; + } + $merge = $attr[0]; + $seen = array(); // recursion guard + // loop through all the inclusions + for ($i = 0; isset($merge[$i]); $i++) { + if (isset($seen[$merge[$i]])) { + continue; + } + $seen[$merge[$i]] = true; + // foreach attribute of the inclusion, copy it over + if (!isset($this->info[$merge[$i]])) { + continue; + } + foreach ($this->info[$merge[$i]] as $key => $value) { + if (isset($attr[$key])) { + continue; + } // also catches more inclusions + $attr[$key] = $value; + } + if (isset($this->info[$merge[$i]][0])) { + // recursion + $merge = array_merge($merge, $this->info[$merge[$i]][0]); + } + } + unset($attr[0]); + } + + /** + * Expands all string identifiers in an attribute array by replacing + * them with the appropriate values inside HTMLPurifier_AttrTypes + * @param array &$attr Reference to attribute array + * @param HTMLPurifier_AttrTypes $attr_types HTMLPurifier_AttrTypes instance + */ + public function expandIdentifiers(&$attr, $attr_types) + { + // because foreach will process new elements we add, make sure we + // skip duplicates + $processed = array(); + + foreach ($attr as $def_i => $def) { + // skip inclusions + if ($def_i === 0) { + continue; + } + + if (isset($processed[$def_i])) { + continue; + } + + // determine whether or not attribute is required + if ($required = (strpos($def_i, '*') !== false)) { + // rename the definition + unset($attr[$def_i]); + $def_i = trim($def_i, '*'); + $attr[$def_i] = $def; + } + + $processed[$def_i] = true; + + // if we've already got a literal object, move on + if (is_object($def)) { + // preserve previous required + $attr[$def_i]->required = ($required || $attr[$def_i]->required); + continue; + } + + if ($def === false) { + unset($attr[$def_i]); + continue; + } + + if ($t = $attr_types->get($def)) { + $attr[$def_i] = $t; + $attr[$def_i]->required = $required; + } else { + unset($attr[$def_i]); + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef.php new file mode 100644 index 0000000000000000000000000000000000000000..3e30d1e3b9c5c297f7a4863a6b8bca6a07528e03 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef.php @@ -0,0 +1,144 @@ +<?php + +/** + * Base class for all validating attribute definitions. + * + * This family of classes forms the core for not only HTML attribute validation, + * but also any sort of string that needs to be validated or cleaned (which + * means CSS properties and composite definitions are defined here too). + * Besides defining (through code) what precisely makes the string valid, + * subclasses are also responsible for cleaning the code if possible. + */ + +abstract class HTMLPurifier_AttrDef +{ + + /** + * Tells us whether or not an HTML attribute is minimized. + * Has no meaning in other contexts. + * @type bool + */ + public $minimized = false; + + /** + * Tells us whether or not an HTML attribute is required. + * Has no meaning in other contexts + * @type bool + */ + public $required = false; + + /** + * Validates and cleans passed string according to a definition. + * + * @param string $string String to be validated and cleaned. + * @param HTMLPurifier_Config $config Mandatory HTMLPurifier_Config object. + * @param HTMLPurifier_Context $context Mandatory HTMLPurifier_Context object. + */ + abstract public function validate($string, $config, $context); + + /** + * Convenience method that parses a string as if it were CDATA. + * + * This method process a string in the manner specified at + * <http://www.w3.org/TR/html4/types.html#h-6.2> by removing + * leading and trailing whitespace, ignoring line feeds, and replacing + * carriage returns and tabs with spaces. While most useful for HTML + * attributes specified as CDATA, it can also be applied to most CSS + * values. + * + * @note This method is not entirely standards compliant, as trim() removes + * more types of whitespace than specified in the spec. In practice, + * this is rarely a problem, as those extra characters usually have + * already been removed by HTMLPurifier_Encoder. + * + * @warning This processing is inconsistent with XML's whitespace handling + * as specified by section 3.3.3 and referenced XHTML 1.0 section + * 4.7. However, note that we are NOT necessarily + * parsing XML, thus, this behavior may still be correct. We + * assume that newlines have been normalized. + */ + public function parseCDATA($string) + { + $string = trim($string); + $string = str_replace(array("\n", "\t", "\r"), ' ', $string); + return $string; + } + + /** + * Factory method for creating this class from a string. + * @param string $string String construction info + * @return HTMLPurifier_AttrDef Created AttrDef object corresponding to $string + */ + public function make($string) + { + // default implementation, return a flyweight of this object. + // If $string has an effect on the returned object (i.e. you + // need to overload this method), it is best + // to clone or instantiate new copies. (Instantiation is safer.) + return $this; + } + + /** + * Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work + * properly. THIS IS A HACK! + * @param string $string a CSS colour definition + * @return string + */ + protected function mungeRgb($string) + { + $p = '\s*(\d+(\.\d+)?([%]?))\s*'; + + if (preg_match('/(rgba|hsla)\(/', $string)) { + return preg_replace('/(rgba|hsla)\('.$p.','.$p.','.$p.','.$p.'\)/', '\1(\2,\5,\8,\11)', $string); + } + + return preg_replace('/(rgb|hsl)\('.$p.','.$p.','.$p.'\)/', '\1(\2,\5,\8)', $string); + } + + /** + * Parses a possibly escaped CSS string and returns the "pure" + * version of it. + */ + protected function expandCSSEscape($string) + { + // flexibly parse it + $ret = ''; + for ($i = 0, $c = strlen($string); $i < $c; $i++) { + if ($string[$i] === '\\') { + $i++; + if ($i >= $c) { + $ret .= '\\'; + break; + } + if (ctype_xdigit($string[$i])) { + $code = $string[$i]; + for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) { + if (!ctype_xdigit($string[$i])) { + break; + } + $code .= $string[$i]; + } + // We have to be extremely careful when adding + // new characters, to make sure we're not breaking + // the encoding. + $char = HTMLPurifier_Encoder::unichr(hexdec($code)); + if (HTMLPurifier_Encoder::cleanUTF8($char) === '') { + continue; + } + $ret .= $char; + if ($i < $c && trim($string[$i]) !== '') { + $i--; + } + continue; + } + if ($string[$i] === "\n") { + continue; + } + } + $ret .= $string[$i]; + } + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS.php index 953e70675556b1074fcf18e946605b46efbd3052..369db1e767707b7acd8d7f6e344c28992c76d671 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS.php @@ -1,87 +1,136 @@ -<?php - -/** - * Validates the HTML attribute style, otherwise known as CSS. - * @note We don't implement the whole CSS specification, so it might be - * difficult to reuse this component in the context of validating - * actual stylesheet declarations. - * @note If we were really serious about validating the CSS, we would - * tokenize the styles and then parse the tokens. Obviously, we - * are not doing that. Doing that could seriously harm performance, - * but would make these components a lot more viable for a CSS - * filtering solution. - */ -class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef -{ - - public function validate($css, $config, $context) { - - $css = $this->parseCDATA($css); - - $definition = $config->getCSSDefinition(); - - // we're going to break the spec and explode by semicolons. - // This is because semicolon rarely appears in escaped form - // Doing this is generally flaky but fast - // IT MIGHT APPEAR IN URIs, see HTMLPurifier_AttrDef_CSSURI - // for details - - $declarations = explode(';', $css); - $propvalues = array(); - - /** - * Name of the current CSS property being validated. - */ - $property = false; - $context->register('CurrentCSSProperty', $property); - - foreach ($declarations as $declaration) { - if (!$declaration) continue; - if (!strpos($declaration, ':')) continue; - list($property, $value) = explode(':', $declaration, 2); - $property = trim($property); - $value = trim($value); - $ok = false; - do { - if (isset($definition->info[$property])) { - $ok = true; - break; - } - if (ctype_lower($property)) break; - $property = strtolower($property); - if (isset($definition->info[$property])) { - $ok = true; - break; - } - } while(0); - if (!$ok) continue; - // inefficient call, since the validator will do this again - if (strtolower(trim($value)) !== 'inherit') { - // inherit works for everything (but only on the base property) - $result = $definition->info[$property]->validate( - $value, $config, $context ); - } else { - $result = 'inherit'; - } - if ($result === false) continue; - $propvalues[$property] = $result; - } - - $context->destroy('CurrentCSSProperty'); - - // procedure does not write the new CSS simultaneously, so it's - // slightly inefficient, but it's the only way of getting rid of - // duplicates. Perhaps config to optimize it, but not now. - - $new_declarations = ''; - foreach ($propvalues as $prop => $value) { - $new_declarations .= "$prop:$value;"; - } - - return $new_declarations ? $new_declarations : false; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates the HTML attribute style, otherwise known as CSS. + * @note We don't implement the whole CSS specification, so it might be + * difficult to reuse this component in the context of validating + * actual stylesheet declarations. + * @note If we were really serious about validating the CSS, we would + * tokenize the styles and then parse the tokens. Obviously, we + * are not doing that. Doing that could seriously harm performance, + * but would make these components a lot more viable for a CSS + * filtering solution. + */ +class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef +{ + + /** + * @param string $css + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($css, $config, $context) + { + $css = $this->parseCDATA($css); + + $definition = $config->getCSSDefinition(); + $allow_duplicates = $config->get("CSS.AllowDuplicates"); + + + // According to the CSS2.1 spec, the places where a + // non-delimiting semicolon can appear are in strings + // escape sequences. So here is some dumb hack to + // handle quotes. + $len = strlen($css); + $accum = ""; + $declarations = array(); + $quoted = false; + for ($i = 0; $i < $len; $i++) { + $c = strcspn($css, ";'\"", $i); + $accum .= substr($css, $i, $c); + $i += $c; + if ($i == $len) break; + $d = $css[$i]; + if ($quoted) { + $accum .= $d; + if ($d == $quoted) { + $quoted = false; + } + } else { + if ($d == ";") { + $declarations[] = $accum; + $accum = ""; + } else { + $accum .= $d; + $quoted = $d; + } + } + } + if ($accum != "") $declarations[] = $accum; + + $propvalues = array(); + $new_declarations = ''; + + /** + * Name of the current CSS property being validated. + */ + $property = false; + $context->register('CurrentCSSProperty', $property); + + foreach ($declarations as $declaration) { + if (!$declaration) { + continue; + } + if (!strpos($declaration, ':')) { + continue; + } + list($property, $value) = explode(':', $declaration, 2); + $property = trim($property); + $value = trim($value); + $ok = false; + do { + if (isset($definition->info[$property])) { + $ok = true; + break; + } + if (ctype_lower($property)) { + break; + } + $property = strtolower($property); + if (isset($definition->info[$property])) { + $ok = true; + break; + } + } while (0); + if (!$ok) { + continue; + } + // inefficient call, since the validator will do this again + if (strtolower(trim($value)) !== 'inherit') { + // inherit works for everything (but only on the base property) + $result = $definition->info[$property]->validate( + $value, + $config, + $context + ); + } else { + $result = 'inherit'; + } + if ($result === false) { + continue; + } + if ($allow_duplicates) { + $new_declarations .= "$property:$result;"; + } else { + $propvalues[$property] = $result; + } + } + + $context->destroy('CurrentCSSProperty'); + + // procedure does not write the new CSS simultaneously, so it's + // slightly inefficient, but it's the only way of getting rid of + // duplicates. Perhaps config to optimize it, but not now. + + foreach ($propvalues as $prop => $value) { + $new_declarations .= "$prop:$value;"; + } + + return $new_declarations ? $new_declarations : false; + + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php new file mode 100644 index 0000000000000000000000000000000000000000..1a30e8fe0cbe8dce30e294b70875067eedaf86b4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php @@ -0,0 +1,34 @@ +<?php + +class HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_CSS_Number +{ + + public function __construct() + { + parent::__construct(false); // opacity is non-negative, but we will clamp it + } + + /** + * @param string $number + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function validate($number, $config, $context) + { + $result = parent::validate($number, $config, $context); + if ($result === false) { + return $result; + } + $float = (float)$result; + if ($float < 0.0) { + $result = '0'; + } + if ($float > 1.0) { + $result = '1'; + } + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Background.php similarity index 61% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Background.php index 3a3d20cd6a7cb830204d2b1f8cfce3f05a5f8a9c..ecd6e276e92b4e7082de5d644601db4e7d9cc58d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Background.php @@ -1,87 +1,111 @@ -<?php - -/** - * Validates shorthand CSS property background. - * @warning Does not support url tokens that have internal spaces. - */ -class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef -{ - - /** - * Local copy of component validators. - * @note See HTMLPurifier_AttrDef_Font::$info for a similar impl. - */ - protected $info; - - public function __construct($config) { - $def = $config->getCSSDefinition(); - $this->info['background-color'] = $def->info['background-color']; - $this->info['background-image'] = $def->info['background-image']; - $this->info['background-repeat'] = $def->info['background-repeat']; - $this->info['background-attachment'] = $def->info['background-attachment']; - $this->info['background-position'] = $def->info['background-position']; - } - - public function validate($string, $config, $context) { - - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') return false; - - // munge rgb() decl if necessary - $string = $this->mungeRgb($string); - - // assumes URI doesn't have spaces in it - $bits = explode(' ', strtolower($string)); // bits to process - - $caught = array(); - $caught['color'] = false; - $caught['image'] = false; - $caught['repeat'] = false; - $caught['attachment'] = false; - $caught['position'] = false; - - $i = 0; // number of catches - $none = false; - - foreach ($bits as $bit) { - if ($bit === '') continue; - foreach ($caught as $key => $status) { - if ($key != 'position') { - if ($status !== false) continue; - $r = $this->info['background-' . $key]->validate($bit, $config, $context); - } else { - $r = $bit; - } - if ($r === false) continue; - if ($key == 'position') { - if ($caught[$key] === false) $caught[$key] = ''; - $caught[$key] .= $r . ' '; - } else { - $caught[$key] = $r; - } - $i++; - break; - } - } - - if (!$i) return false; - if ($caught['position'] !== false) { - $caught['position'] = $this->info['background-position']-> - validate($caught['position'], $config, $context); - } - - $ret = array(); - foreach ($caught as $value) { - if ($value === false) continue; - $ret[] = $value; - } - - if (empty($ret)) return false; - return implode(' ', $ret); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates shorthand CSS property background. + * @warning Does not support url tokens that have internal spaces. + */ +class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef +{ + + /** + * Local copy of component validators. + * @type HTMLPurifier_AttrDef[] + * @note See HTMLPurifier_AttrDef_Font::$info for a similar impl. + */ + protected $info; + + /** + * @param HTMLPurifier_Config $config + */ + public function __construct($config) + { + $def = $config->getCSSDefinition(); + $this->info['background-color'] = $def->info['background-color']; + $this->info['background-image'] = $def->info['background-image']; + $this->info['background-repeat'] = $def->info['background-repeat']; + $this->info['background-attachment'] = $def->info['background-attachment']; + $this->info['background-position'] = $def->info['background-position']; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + // regular pre-processing + $string = $this->parseCDATA($string); + if ($string === '') { + return false; + } + + // munge rgb() decl if necessary + $string = $this->mungeRgb($string); + + // assumes URI doesn't have spaces in it + $bits = explode(' ', $string); // bits to process + + $caught = array(); + $caught['color'] = false; + $caught['image'] = false; + $caught['repeat'] = false; + $caught['attachment'] = false; + $caught['position'] = false; + + $i = 0; // number of catches + + foreach ($bits as $bit) { + if ($bit === '') { + continue; + } + foreach ($caught as $key => $status) { + if ($key != 'position') { + if ($status !== false) { + continue; + } + $r = $this->info['background-' . $key]->validate($bit, $config, $context); + } else { + $r = $bit; + } + if ($r === false) { + continue; + } + if ($key == 'position') { + if ($caught[$key] === false) { + $caught[$key] = ''; + } + $caught[$key] .= $r . ' '; + } else { + $caught[$key] = $r; + } + $i++; + break; + } + } + + if (!$i) { + return false; + } + if ($caught['position'] !== false) { + $caught['position'] = $this->info['background-position']-> + validate($caught['position'], $config, $context); + } + + $ret = array(); + foreach ($caught as $value) { + if ($value === false) { + continue; + } + $ret[] = $value; + } + + if (empty($ret)) { + return false; + } + return implode(' ', $ret); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php index 35df3985e23dbb8a347334b1a92ad37b5996c255..f95de5bbfe5b454d69564e05b576e06688aa962a 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php @@ -1,126 +1,157 @@ -<?php - -/* W3C says: - [ // adjective and number must be in correct order, even if - // you could switch them without introducing ambiguity. - // some browsers support that syntax - [ - <percentage> | <length> | left | center | right - ] - [ - <percentage> | <length> | top | center | bottom - ]? - ] | - [ // this signifies that the vertical and horizontal adjectives - // can be arbitrarily ordered, however, there can only be two, - // one of each, or none at all - [ - left | center | right - ] || - [ - top | center | bottom - ] - ] - top, left = 0% - center, (none) = 50% - bottom, right = 100% -*/ - -/* QuirksMode says: - keyword + length/percentage must be ordered correctly, as per W3C - - Internet Explorer and Opera, however, support arbitrary ordering. We - should fix it up. - - Minor issue though, not strictly necessary. -*/ - -// control freaks may appreciate the ability to convert these to -// percentages or something, but it's not necessary - -/** - * Validates the value of background-position. - */ -class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_AttrDef -{ - - protected $length; - protected $percentage; - - public function __construct() { - $this->length = new HTMLPurifier_AttrDef_CSS_Length(); - $this->percentage = new HTMLPurifier_AttrDef_CSS_Percentage(); - } - - public function validate($string, $config, $context) { - $string = $this->parseCDATA($string); - $bits = explode(' ', $string); - - $keywords = array(); - $keywords['h'] = false; // left, right - $keywords['v'] = false; // top, bottom - $keywords['c'] = false; // center - $measures = array(); - - $i = 0; - - $lookup = array( - 'top' => 'v', - 'bottom' => 'v', - 'left' => 'h', - 'right' => 'h', - 'center' => 'c' - ); - - foreach ($bits as $bit) { - if ($bit === '') continue; - - // test for keyword - $lbit = ctype_lower($bit) ? $bit : strtolower($bit); - if (isset($lookup[$lbit])) { - $status = $lookup[$lbit]; - $keywords[$status] = $lbit; - $i++; - } - - // test for length - $r = $this->length->validate($bit, $config, $context); - if ($r !== false) { - $measures[] = $r; - $i++; - } - - // test for percentage - $r = $this->percentage->validate($bit, $config, $context); - if ($r !== false) { - $measures[] = $r; - $i++; - } - - } - - if (!$i) return false; // no valid values were caught - - - $ret = array(); - - // first keyword - if ($keywords['h']) $ret[] = $keywords['h']; - elseif (count($measures)) $ret[] = array_shift($measures); - elseif ($keywords['c']) { - $ret[] = $keywords['c']; - $keywords['c'] = false; // prevent re-use: center = center center - } - - if ($keywords['v']) $ret[] = $keywords['v']; - elseif (count($measures)) $ret[] = array_shift($measures); - elseif ($keywords['c']) $ret[] = $keywords['c']; - - if (empty($ret)) return false; - return implode(' ', $ret); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/* W3C says: + [ // adjective and number must be in correct order, even if + // you could switch them without introducing ambiguity. + // some browsers support that syntax + [ + <percentage> | <length> | left | center | right + ] + [ + <percentage> | <length> | top | center | bottom + ]? + ] | + [ // this signifies that the vertical and horizontal adjectives + // can be arbitrarily ordered, however, there can only be two, + // one of each, or none at all + [ + left | center | right + ] || + [ + top | center | bottom + ] + ] + top, left = 0% + center, (none) = 50% + bottom, right = 100% +*/ + +/* QuirksMode says: + keyword + length/percentage must be ordered correctly, as per W3C + + Internet Explorer and Opera, however, support arbitrary ordering. We + should fix it up. + + Minor issue though, not strictly necessary. +*/ + +// control freaks may appreciate the ability to convert these to +// percentages or something, but it's not necessary + +/** + * Validates the value of background-position. + */ +class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_AttrDef +{ + + /** + * @type HTMLPurifier_AttrDef_CSS_Length + */ + protected $length; + + /** + * @type HTMLPurifier_AttrDef_CSS_Percentage + */ + protected $percentage; + + public function __construct() + { + $this->length = new HTMLPurifier_AttrDef_CSS_Length(); + $this->percentage = new HTMLPurifier_AttrDef_CSS_Percentage(); + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = $this->parseCDATA($string); + $bits = explode(' ', $string); + + $keywords = array(); + $keywords['h'] = false; // left, right + $keywords['v'] = false; // top, bottom + $keywords['ch'] = false; // center (first word) + $keywords['cv'] = false; // center (second word) + $measures = array(); + + $i = 0; + + $lookup = array( + 'top' => 'v', + 'bottom' => 'v', + 'left' => 'h', + 'right' => 'h', + 'center' => 'c' + ); + + foreach ($bits as $bit) { + if ($bit === '') { + continue; + } + + // test for keyword + $lbit = ctype_lower($bit) ? $bit : strtolower($bit); + if (isset($lookup[$lbit])) { + $status = $lookup[$lbit]; + if ($status == 'c') { + if ($i == 0) { + $status = 'ch'; + } else { + $status = 'cv'; + } + } + $keywords[$status] = $lbit; + $i++; + } + + // test for length + $r = $this->length->validate($bit, $config, $context); + if ($r !== false) { + $measures[] = $r; + $i++; + } + + // test for percentage + $r = $this->percentage->validate($bit, $config, $context); + if ($r !== false) { + $measures[] = $r; + $i++; + } + } + + if (!$i) { + return false; + } // no valid values were caught + + $ret = array(); + + // first keyword + if ($keywords['h']) { + $ret[] = $keywords['h']; + } elseif ($keywords['ch']) { + $ret[] = $keywords['ch']; + $keywords['cv'] = false; // prevent re-use: center = center center + } elseif (count($measures)) { + $ret[] = array_shift($measures); + } + + if ($keywords['v']) { + $ret[] = $keywords['v']; + } elseif ($keywords['cv']) { + $ret[] = $keywords['cv']; + } elseif (count($measures)) { + $ret[] = array_shift($measures); + } + + if (empty($ret)) { + return false; + } + return implode(' ', $ret); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Border.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Border.php index 42a1d1b4ae36290be99d29a24d7ee2c67a01abdc..bd310ff231a82b27c7cfcfd9ffa4bc9ef0093ed8 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Border.php @@ -1,43 +1,56 @@ -<?php - -/** - * Validates the border property as defined by CSS. - */ -class HTMLPurifier_AttrDef_CSS_Border extends HTMLPurifier_AttrDef -{ - - /** - * Local copy of properties this property is shorthand for. - */ - protected $info = array(); - - public function __construct($config) { - $def = $config->getCSSDefinition(); - $this->info['border-width'] = $def->info['border-width']; - $this->info['border-style'] = $def->info['border-style']; - $this->info['border-top-color'] = $def->info['border-top-color']; - } - - public function validate($string, $config, $context) { - $string = $this->parseCDATA($string); - $string = $this->mungeRgb($string); - $bits = explode(' ', $string); - $done = array(); // segments we've finished - $ret = ''; // return value - foreach ($bits as $bit) { - foreach ($this->info as $propname => $validator) { - if (isset($done[$propname])) continue; - $r = $validator->validate($bit, $config, $context); - if ($r !== false) { - $ret .= $r . ' '; - $done[$propname] = true; - break; - } - } - } - return rtrim($ret); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates the border property as defined by CSS. + */ +class HTMLPurifier_AttrDef_CSS_Border extends HTMLPurifier_AttrDef +{ + + /** + * Local copy of properties this property is shorthand for. + * @type HTMLPurifier_AttrDef[] + */ + protected $info = array(); + + /** + * @param HTMLPurifier_Config $config + */ + public function __construct($config) + { + $def = $config->getCSSDefinition(); + $this->info['border-width'] = $def->info['border-width']; + $this->info['border-style'] = $def->info['border-style']; + $this->info['border-top-color'] = $def->info['border-top-color']; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = $this->parseCDATA($string); + $string = $this->mungeRgb($string); + $bits = explode(' ', $string); + $done = array(); // segments we've finished + $ret = ''; // return value + foreach ($bits as $bit) { + foreach ($this->info as $propname => $validator) { + if (isset($done[$propname])) { + continue; + } + $r = $validator->validate($bit, $config, $context); + if ($r !== false) { + $ret .= $r . ' '; + $done[$propname] = true; + break; + } + } + } + return rtrim($ret); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Color.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Color.php new file mode 100644 index 0000000000000000000000000000000000000000..d1b1b3c1940f28aca5972f9ca55ca61f8e4b0db4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Color.php @@ -0,0 +1,161 @@ +<?php + +/** + * Validates Color as defined by CSS. + */ +class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef +{ + + /** + * @type HTMLPurifier_AttrDef_CSS_AlphaValue + */ + protected $alpha; + + public function __construct() + { + $this->alpha = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + } + + /** + * @param string $color + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($color, $config, $context) + { + static $colors = null; + if ($colors === null) { + $colors = $config->get('Core.ColorKeywords'); + } + + $color = trim($color); + if ($color === '') { + return false; + } + + $lower = strtolower($color); + if (isset($colors[$lower])) { + return $colors[$lower]; + } + + if (preg_match('#(rgb|rgba|hsl|hsla)\(#', $color, $matches) === 1) { + $length = strlen($color); + if (strpos($color, ')') !== $length - 1) { + return false; + } + + // get used function : rgb, rgba, hsl or hsla + $function = $matches[1]; + + $parameters_size = 3; + $alpha_channel = false; + if (substr($function, -1) === 'a') { + $parameters_size = 4; + $alpha_channel = true; + } + + /* + * Allowed types for values : + * parameter_position => [type => max_value] + */ + $allowed_types = array( + 1 => array('percentage' => 100, 'integer' => 255), + 2 => array('percentage' => 100, 'integer' => 255), + 3 => array('percentage' => 100, 'integer' => 255), + ); + $allow_different_types = false; + + if (strpos($function, 'hsl') !== false) { + $allowed_types = array( + 1 => array('integer' => 360), + 2 => array('percentage' => 100), + 3 => array('percentage' => 100), + ); + $allow_different_types = true; + } + + $values = trim(str_replace($function, '', $color), ' ()'); + + $parts = explode(',', $values); + if (count($parts) !== $parameters_size) { + return false; + } + + $type = false; + $new_parts = array(); + $i = 0; + + foreach ($parts as $part) { + $i++; + $part = trim($part); + + if ($part === '') { + return false; + } + + // different check for alpha channel + if ($alpha_channel === true && $i === count($parts)) { + $result = $this->alpha->validate($part, $config, $context); + + if ($result === false) { + return false; + } + + $new_parts[] = (string)$result; + continue; + } + + if (substr($part, -1) === '%') { + $current_type = 'percentage'; + } else { + $current_type = 'integer'; + } + + if (!array_key_exists($current_type, $allowed_types[$i])) { + return false; + } + + if (!$type) { + $type = $current_type; + } + + if ($allow_different_types === false && $type != $current_type) { + return false; + } + + $max_value = $allowed_types[$i][$current_type]; + + if ($current_type == 'integer') { + // Return value between range 0 -> $max_value + $new_parts[] = (int)max(min($part, $max_value), 0); + } elseif ($current_type == 'percentage') { + $new_parts[] = (float)max(min(rtrim($part, '%'), $max_value), 0) . '%'; + } + } + + $new_values = implode(',', $new_parts); + + $color = $function . '(' . $new_values . ')'; + } else { + // hexadecimal handling + if ($color[0] === '#') { + $hex = substr($color, 1); + } else { + $hex = $color; + $color = '#' . $color; + } + $length = strlen($hex); + if ($length !== 3 && $length !== 6) { + return false; + } + if (!ctype_xdigit($hex)) { + return false; + } + } + return $color; + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Composite.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Composite.php index de1289cba8af47101e3ae09e0fc92de2fd061f95..38900232292978c55276ff040b33670630e621fb 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Composite.php @@ -1,38 +1,48 @@ -<?php - -/** - * Allows multiple validators to attempt to validate attribute. - * - * Composite is just what it sounds like: a composite of many validators. - * This means that multiple HTMLPurifier_AttrDef objects will have a whack - * at the string. If one of them passes, that's what is returned. This is - * especially useful for CSS values, which often are a choice between - * an enumerated set of predefined values or a flexible data type. - */ -class HTMLPurifier_AttrDef_CSS_Composite extends HTMLPurifier_AttrDef -{ - - /** - * List of HTMLPurifier_AttrDef objects that may process strings - * @todo Make protected - */ - public $defs; - - /** - * @param $defs List of HTMLPurifier_AttrDef objects - */ - public function __construct($defs) { - $this->defs = $defs; - } - - public function validate($string, $config, $context) { - foreach ($this->defs as $i => $def) { - $result = $this->defs[$i]->validate($string, $config, $context); - if ($result !== false) return $result; - } - return false; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Allows multiple validators to attempt to validate attribute. + * + * Composite is just what it sounds like: a composite of many validators. + * This means that multiple HTMLPurifier_AttrDef objects will have a whack + * at the string. If one of them passes, that's what is returned. This is + * especially useful for CSS values, which often are a choice between + * an enumerated set of predefined values or a flexible data type. + */ +class HTMLPurifier_AttrDef_CSS_Composite extends HTMLPurifier_AttrDef +{ + + /** + * List of objects that may process strings. + * @type HTMLPurifier_AttrDef[] + * @todo Make protected + */ + public $defs; + + /** + * @param HTMLPurifier_AttrDef[] $defs List of HTMLPurifier_AttrDef objects + */ + public function __construct($defs) + { + $this->defs = $defs; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + foreach ($this->defs as $i => $def) { + $result = $this->defs[$i]->validate($string, $config, $context); + if ($result !== false) { + return $result; + } + } + return false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php new file mode 100644 index 0000000000000000000000000000000000000000..ff0d897edc564173aead16e5550360346d87399a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php @@ -0,0 +1,44 @@ +<?php + +/** + * Decorator which enables CSS properties to be disabled for specific elements. + */ +class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef +{ + /** + * @type HTMLPurifier_AttrDef + */ + public $def; + /** + * @type string + */ + public $element; + + /** + * @param HTMLPurifier_AttrDef $def Definition to wrap + * @param string $element Element to deny + */ + public function __construct($def, $element) + { + $this->def = $def; + $this->element = $element; + } + + /** + * Checks if CurrentToken is set and equal to $this->element + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $token = $context->get('CurrentToken', true); + if ($token && $token->name == $this->element) { + return false; + } + return $this->def->validate($string, $config, $context); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Filter.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Filter.php index 147894b8619719ada179523f30371b871292d2b7..019722a487c29935d3113d14b04642276f44efa1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Filter.php @@ -1,54 +1,77 @@ -<?php - -/** - * Microsoft's proprietary filter: CSS property - * @note Currently supports the alpha filter. In the future, this will - * probably need an extensible framework - */ -class HTMLPurifier_AttrDef_CSS_Filter extends HTMLPurifier_AttrDef -{ - - protected $intValidator; - - public function __construct() { - $this->intValidator = new HTMLPurifier_AttrDef_Integer(); - } - - public function validate($value, $config, $context) { - $value = $this->parseCDATA($value); - if ($value === 'none') return $value; - // if we looped this we could support multiple filters - $function_length = strcspn($value, '('); - $function = trim(substr($value, 0, $function_length)); - if ($function !== 'alpha' && - $function !== 'Alpha' && - $function !== 'progid:DXImageTransform.Microsoft.Alpha' - ) return false; - $cursor = $function_length + 1; - $parameters_length = strcspn($value, ')', $cursor); - $parameters = substr($value, $cursor, $parameters_length); - $params = explode(',', $parameters); - $ret_params = array(); - $lookup = array(); - foreach ($params as $param) { - list($key, $value) = explode('=', $param); - $key = trim($key); - $value = trim($value); - if (isset($lookup[$key])) continue; - if ($key !== 'opacity') continue; - $value = $this->intValidator->validate($value, $config, $context); - if ($value === false) continue; - $int = (int) $value; - if ($int > 100) $value = '100'; - if ($int < 0) $value = '0'; - $ret_params[] = "$key=$value"; - $lookup[$key] = true; - } - $ret_parameters = implode(',', $ret_params); - $ret_function = "$function($ret_parameters)"; - return $ret_function; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Microsoft's proprietary filter: CSS property + * @note Currently supports the alpha filter. In the future, this will + * probably need an extensible framework + */ +class HTMLPurifier_AttrDef_CSS_Filter extends HTMLPurifier_AttrDef +{ + /** + * @type HTMLPurifier_AttrDef_Integer + */ + protected $intValidator; + + public function __construct() + { + $this->intValidator = new HTMLPurifier_AttrDef_Integer(); + } + + /** + * @param string $value + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($value, $config, $context) + { + $value = $this->parseCDATA($value); + if ($value === 'none') { + return $value; + } + // if we looped this we could support multiple filters + $function_length = strcspn($value, '('); + $function = trim(substr($value, 0, $function_length)); + if ($function !== 'alpha' && + $function !== 'Alpha' && + $function !== 'progid:DXImageTransform.Microsoft.Alpha' + ) { + return false; + } + $cursor = $function_length + 1; + $parameters_length = strcspn($value, ')', $cursor); + $parameters = substr($value, $cursor, $parameters_length); + $params = explode(',', $parameters); + $ret_params = array(); + $lookup = array(); + foreach ($params as $param) { + list($key, $value) = explode('=', $param); + $key = trim($key); + $value = trim($value); + if (isset($lookup[$key])) { + continue; + } + if ($key !== 'opacity') { + continue; + } + $value = $this->intValidator->validate($value, $config, $context); + if ($value === false) { + continue; + } + $int = (int)$value; + if ($int > 100) { + $value = '100'; + } + if ($int < 0) { + $value = '0'; + } + $ret_params[] = "$key=$value"; + $lookup[$key] = true; + } + $ret_parameters = implode(',', $ret_params); + $ret_function = "$function($ret_parameters)"; + return $ret_function; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Font.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Font.php index 699ee0b7012a6d1a5d951d7598ab528247b579b8..b9b63f8efd20c37d6185fcfef0cbce4c10386bce 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Font.php @@ -1,149 +1,176 @@ -<?php - -/** - * Validates shorthand CSS property font. - */ -class HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDef -{ - - /** - * Local copy of component validators. - * - * @note If we moved specific CSS property definitions to their own - * classes instead of having them be assembled at run time by - * CSSDefinition, this wouldn't be necessary. We'd instantiate - * our own copies. - */ - protected $info = array(); - - public function __construct($config) { - $def = $config->getCSSDefinition(); - $this->info['font-style'] = $def->info['font-style']; - $this->info['font-variant'] = $def->info['font-variant']; - $this->info['font-weight'] = $def->info['font-weight']; - $this->info['font-size'] = $def->info['font-size']; - $this->info['line-height'] = $def->info['line-height']; - $this->info['font-family'] = $def->info['font-family']; - } - - public function validate($string, $config, $context) { - - static $system_fonts = array( - 'caption' => true, - 'icon' => true, - 'menu' => true, - 'message-box' => true, - 'small-caption' => true, - 'status-bar' => true - ); - - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') return false; - - // check if it's one of the keywords - $lowercase_string = strtolower($string); - if (isset($system_fonts[$lowercase_string])) { - return $lowercase_string; - } - - $bits = explode(' ', $string); // bits to process - $stage = 0; // this indicates what we're looking for - $caught = array(); // which stage 0 properties have we caught? - $stage_1 = array('font-style', 'font-variant', 'font-weight'); - $final = ''; // output - - for ($i = 0, $size = count($bits); $i < $size; $i++) { - if ($bits[$i] === '') continue; - switch ($stage) { - - // attempting to catch font-style, font-variant or font-weight - case 0: - foreach ($stage_1 as $validator_name) { - if (isset($caught[$validator_name])) continue; - $r = $this->info[$validator_name]->validate( - $bits[$i], $config, $context); - if ($r !== false) { - $final .= $r . ' '; - $caught[$validator_name] = true; - break; - } - } - // all three caught, continue on - if (count($caught) >= 3) $stage = 1; - if ($r !== false) break; - - // attempting to catch font-size and perhaps line-height - case 1: - $found_slash = false; - if (strpos($bits[$i], '/') !== false) { - list($font_size, $line_height) = - explode('/', $bits[$i]); - if ($line_height === '') { - // ooh, there's a space after the slash! - $line_height = false; - $found_slash = true; - } - } else { - $font_size = $bits[$i]; - $line_height = false; - } - $r = $this->info['font-size']->validate( - $font_size, $config, $context); - if ($r !== false) { - $final .= $r; - // attempt to catch line-height - if ($line_height === false) { - // we need to scroll forward - for ($j = $i + 1; $j < $size; $j++) { - if ($bits[$j] === '') continue; - if ($bits[$j] === '/') { - if ($found_slash) { - return false; - } else { - $found_slash = true; - continue; - } - } - $line_height = $bits[$j]; - break; - } - } else { - // slash already found - $found_slash = true; - $j = $i; - } - if ($found_slash) { - $i = $j; - $r = $this->info['line-height']->validate( - $line_height, $config, $context); - if ($r !== false) { - $final .= '/' . $r; - } - } - $final .= ' '; - $stage = 2; - break; - } - return false; - - // attempting to catch font-family - case 2: - $font_family = - implode(' ', array_slice($bits, $i, $size - $i)); - $r = $this->info['font-family']->validate( - $font_family, $config, $context); - if ($r !== false) { - $final .= $r . ' '; - // processing completed successfully - return rtrim($final); - } - return false; - } - } - return false; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates shorthand CSS property font. + */ +class HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDef +{ + + /** + * Local copy of validators + * @type HTMLPurifier_AttrDef[] + * @note If we moved specific CSS property definitions to their own + * classes instead of having them be assembled at run time by + * CSSDefinition, this wouldn't be necessary. We'd instantiate + * our own copies. + */ + protected $info = array(); + + /** + * @param HTMLPurifier_Config $config + */ + public function __construct($config) + { + $def = $config->getCSSDefinition(); + $this->info['font-style'] = $def->info['font-style']; + $this->info['font-variant'] = $def->info['font-variant']; + $this->info['font-weight'] = $def->info['font-weight']; + $this->info['font-size'] = $def->info['font-size']; + $this->info['line-height'] = $def->info['line-height']; + $this->info['font-family'] = $def->info['font-family']; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + static $system_fonts = array( + 'caption' => true, + 'icon' => true, + 'menu' => true, + 'message-box' => true, + 'small-caption' => true, + 'status-bar' => true + ); + + // regular pre-processing + $string = $this->parseCDATA($string); + if ($string === '') { + return false; + } + + // check if it's one of the keywords + $lowercase_string = strtolower($string); + if (isset($system_fonts[$lowercase_string])) { + return $lowercase_string; + } + + $bits = explode(' ', $string); // bits to process + $stage = 0; // this indicates what we're looking for + $caught = array(); // which stage 0 properties have we caught? + $stage_1 = array('font-style', 'font-variant', 'font-weight'); + $final = ''; // output + + for ($i = 0, $size = count($bits); $i < $size; $i++) { + if ($bits[$i] === '') { + continue; + } + switch ($stage) { + case 0: // attempting to catch font-style, font-variant or font-weight + foreach ($stage_1 as $validator_name) { + if (isset($caught[$validator_name])) { + continue; + } + $r = $this->info[$validator_name]->validate( + $bits[$i], + $config, + $context + ); + if ($r !== false) { + $final .= $r . ' '; + $caught[$validator_name] = true; + break; + } + } + // all three caught, continue on + if (count($caught) >= 3) { + $stage = 1; + } + if ($r !== false) { + break; + } + case 1: // attempting to catch font-size and perhaps line-height + $found_slash = false; + if (strpos($bits[$i], '/') !== false) { + list($font_size, $line_height) = + explode('/', $bits[$i]); + if ($line_height === '') { + // ooh, there's a space after the slash! + $line_height = false; + $found_slash = true; + } + } else { + $font_size = $bits[$i]; + $line_height = false; + } + $r = $this->info['font-size']->validate( + $font_size, + $config, + $context + ); + if ($r !== false) { + $final .= $r; + // attempt to catch line-height + if ($line_height === false) { + // we need to scroll forward + for ($j = $i + 1; $j < $size; $j++) { + if ($bits[$j] === '') { + continue; + } + if ($bits[$j] === '/') { + if ($found_slash) { + return false; + } else { + $found_slash = true; + continue; + } + } + $line_height = $bits[$j]; + break; + } + } else { + // slash already found + $found_slash = true; + $j = $i; + } + if ($found_slash) { + $i = $j; + $r = $this->info['line-height']->validate( + $line_height, + $config, + $context + ); + if ($r !== false) { + $final .= '/' . $r; + } + } + $final .= ' '; + $stage = 2; + break; + } + return false; + case 2: // attempting to catch font-family + $font_family = + implode(' ', array_slice($bits, $i, $size - $i)); + $r = $this->info['font-family']->validate( + $font_family, + $config, + $context + ); + if ($r !== false) { + $final .= $r . ' '; + // processing completed successfully + return rtrim($final); + } + return false; + } + } + return false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/FontFamily.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/FontFamily.php new file mode 100644 index 0000000000000000000000000000000000000000..f9af36d790756b588d371e7c0376cd3cdf9686f4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/FontFamily.php @@ -0,0 +1,219 @@ +<?php + +/** + * Validates a font family list according to CSS spec + */ +class HTMLPurifier_AttrDef_CSS_FontFamily extends HTMLPurifier_AttrDef +{ + + protected $mask = null; + + public function __construct() + { + $this->mask = '_- '; + for ($c = 'a'; $c <= 'z'; $c++) { + $this->mask .= $c; + } + for ($c = 'A'; $c <= 'Z'; $c++) { + $this->mask .= $c; + } + for ($c = '0'; $c <= '9'; $c++) { + $this->mask .= $c; + } // cast-y, but should be fine + // special bytes used by UTF-8 + for ($i = 0x80; $i <= 0xFF; $i++) { + // We don't bother excluding invalid bytes in this range, + // because the our restriction of well-formed UTF-8 will + // prevent these from ever occurring. + $this->mask .= chr($i); + } + + /* + PHP's internal strcspn implementation is + O(length of string * length of mask), making it inefficient + for large masks. However, it's still faster than + preg_match 8) + for (p = s1;;) { + spanp = s2; + do { + if (*spanp == c || p == s1_end) { + return p - s1; + } + } while (spanp++ < (s2_end - 1)); + c = *++p; + } + */ + // possible optimization: invert the mask. + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + static $generic_names = array( + 'serif' => true, + 'sans-serif' => true, + 'monospace' => true, + 'fantasy' => true, + 'cursive' => true + ); + $allowed_fonts = $config->get('CSS.AllowedFonts'); + + // assume that no font names contain commas in them + $fonts = explode(',', $string); + $final = ''; + foreach ($fonts as $font) { + $font = trim($font); + if ($font === '') { + continue; + } + // match a generic name + if (isset($generic_names[$font])) { + if ($allowed_fonts === null || isset($allowed_fonts[$font])) { + $final .= $font . ', '; + } + continue; + } + // match a quoted name + if ($font[0] === '"' || $font[0] === "'") { + $length = strlen($font); + if ($length <= 2) { + continue; + } + $quote = $font[0]; + if ($font[$length - 1] !== $quote) { + continue; + } + $font = substr($font, 1, $length - 2); + } + + $font = $this->expandCSSEscape($font); + + // $font is a pure representation of the font name + + if ($allowed_fonts !== null && !isset($allowed_fonts[$font])) { + continue; + } + + if (ctype_alnum($font) && $font !== '') { + // very simple font, allow it in unharmed + $final .= $font . ', '; + continue; + } + + // bugger out on whitespace. form feed (0C) really + // shouldn't show up regardless + $font = str_replace(array("\n", "\t", "\r", "\x0C"), ' ', $font); + + // Here, there are various classes of characters which need + // to be treated differently: + // - Alphanumeric characters are essentially safe. We + // handled these above. + // - Spaces require quoting, though most parsers will do + // the right thing if there aren't any characters that + // can be misinterpreted + // - Dashes rarely occur, but they fairly unproblematic + // for parsing/rendering purposes. + // The above characters cover the majority of Western font + // names. + // - Arbitrary Unicode characters not in ASCII. Because + // most parsers give little thought to Unicode, treatment + // of these codepoints is basically uniform, even for + // punctuation-like codepoints. These characters can + // show up in non-Western pages and are supported by most + // major browsers, for example: "ï¼ï¼³ 明æœ" is a + // legitimate font-name + // <http://ja.wikipedia.org/wiki/MS_明æœ>. See + // the CSS3 spec for more examples: + // <http://www.w3.org/TR/2011/WD-css3-fonts-20110324/localizedfamilynames.png> + // You can see live samples of these on the Internet: + // <http://www.google.co.jp/search?q=font-family+ï¼ï¼³+明æœ|ゴシック> + // However, most of these fonts have ASCII equivalents: + // for example, 'MS Mincho', and it's considered + // professional to use ASCII font names instead of + // Unicode font names. Thanks Takeshi Terada for + // providing this information. + // The following characters, to my knowledge, have not been + // used to name font names. + // - Single quote. While theoretically you might find a + // font name that has a single quote in its name (serving + // as an apostrophe, e.g. Dave's Scribble), I haven't + // been able to find any actual examples of this. + // Internet Explorer's cssText translation (which I + // believe is invoked by innerHTML) normalizes any + // quoting to single quotes, and fails to escape single + // quotes. (Note that this is not IE's behavior for all + // CSS properties, just some sort of special casing for + // font-family). So a single quote *cannot* be used + // safely in the font-family context if there will be an + // innerHTML/cssText translation. Note that Firefox 3.x + // does this too. + // - Double quote. In IE, these get normalized to + // single-quotes, no matter what the encoding. (Fun + // fact, in IE8, the 'content' CSS property gained + // support, where they special cased to preserve encoded + // double quotes, but still translate unadorned double + // quotes into single quotes.) So, because their + // fixpoint behavior is identical to single quotes, they + // cannot be allowed either. Firefox 3.x displays + // single-quote style behavior. + // - Backslashes are reduced by one (so \\ -> \) every + // iteration, so they cannot be used safely. This shows + // up in IE7, IE8 and FF3 + // - Semicolons, commas and backticks are handled properly. + // - The rest of the ASCII punctuation is handled properly. + // We haven't checked what browsers do to unadorned + // versions, but this is not important as long as the + // browser doesn't /remove/ surrounding quotes (as IE does + // for HTML). + // + // With these results in hand, we conclude that there are + // various levels of safety: + // - Paranoid: alphanumeric, spaces and dashes(?) + // - International: Paranoid + non-ASCII Unicode + // - Edgy: Everything except quotes, backslashes + // - NoJS: Standards compliance, e.g. sod IE. Note that + // with some judicious character escaping (since certain + // types of escaping doesn't work) this is theoretically + // OK as long as innerHTML/cssText is not called. + // We believe that international is a reasonable default + // (that we will implement now), and once we do more + // extensive research, we may feel comfortable with dropping + // it down to edgy. + + // Edgy: alphanumeric, spaces, dashes, underscores and Unicode. Use of + // str(c)spn assumes that the string was already well formed + // Unicode (which of course it is). + if (strspn($font, $this->mask) !== strlen($font)) { + continue; + } + + // Historical: + // In the absence of innerHTML/cssText, these ugly + // transforms don't pose a security risk (as \\ and \" + // might--these escapes are not supported by most browsers). + // We could try to be clever and use single-quote wrapping + // when there is a double quote present, but I have choosen + // not to implement that. (NOTE: you can reduce the amount + // of escapes by one depending on what quoting style you use) + // $font = str_replace('\\', '\\5C ', $font); + // $font = str_replace('"', '\\22 ', $font); + // $font = str_replace("'", '\\27 ', $font); + + // font possibly with spaces, requires quoting + $final .= "'$font', "; + } + $final = rtrim($final, ', '); + if ($final === '') { + return false; + } + return $final; + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Ident.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Ident.php new file mode 100644 index 0000000000000000000000000000000000000000..5f13edfd101b351997b846cb93125f80fe4e6cdd --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Ident.php @@ -0,0 +1,32 @@ +<?php + +/** + * Validates based on {ident} CSS grammar production + */ +class HTMLPurifier_AttrDef_CSS_Ident extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + + // early abort: '' and '0' (strings that convert to false) are invalid + if (!$string) { + return false; + } + + $pattern = '/^(-?[A-Za-z_][A-Za-z_\-0-9]*)$/'; + if (!preg_match($pattern, $string)) { + return false; + } + return $string; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php index 4e6b35e5a0dffd031b35963945e71d6dee00ca41..f48484944deddf4aa6e2daece95492701daabac9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php @@ -1,40 +1,56 @@ -<?php - -/** - * Decorator which enables !important to be used in CSS values. - */ -class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_AttrDef -{ - public $def, $allow; - - /** - * @param $def Definition to wrap - * @param $allow Whether or not to allow !important - */ - public function __construct($def, $allow = false) { - $this->def = $def; - $this->allow = $allow; - } - /** - * Intercepts and removes !important if necessary - */ - public function validate($string, $config, $context) { - // test for ! and important tokens - $string = trim($string); - $is_important = false; - // :TODO: optimization: test directly for !important and ! important - if (strlen($string) >= 9 && substr($string, -9) === 'important') { - $temp = rtrim(substr($string, 0, -9)); - // use a temp, because we might want to restore important - if (strlen($temp) >= 1 && substr($temp, -1) === '!') { - $string = rtrim(substr($temp, 0, -1)); - $is_important = true; - } - } - $string = $this->def->validate($string, $config, $context); - if ($this->allow && $is_important) $string .= ' !important'; - return $string; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Decorator which enables !important to be used in CSS values. + */ +class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_AttrDef +{ + /** + * @type HTMLPurifier_AttrDef + */ + public $def; + /** + * @type bool + */ + public $allow; + + /** + * @param HTMLPurifier_AttrDef $def Definition to wrap + * @param bool $allow Whether or not to allow !important + */ + public function __construct($def, $allow = false) + { + $this->def = $def; + $this->allow = $allow; + } + + /** + * Intercepts and removes !important if necessary + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + // test for ! and important tokens + $string = trim($string); + $is_important = false; + // :TODO: optimization: test directly for !important and ! important + if (strlen($string) >= 9 && substr($string, -9) === 'important') { + $temp = rtrim(substr($string, 0, -9)); + // use a temp, because we might want to restore important + if (strlen($temp) >= 1 && substr($temp, -1) === '!') { + $string = rtrim(substr($temp, 0, -1)); + $is_important = true; + } + } + $string = $this->def->validate($string, $config, $context); + if ($this->allow && $is_important) { + $string .= ' !important'; + } + return $string; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Length.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Length.php new file mode 100644 index 0000000000000000000000000000000000000000..88da41d93dcb0f64cd070bc9589beca8b7b371f4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Length.php @@ -0,0 +1,77 @@ +<?php + +/** + * Represents a Length as defined by CSS. + */ +class HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_AttrDef +{ + + /** + * @type HTMLPurifier_Length|string + */ + protected $min; + + /** + * @type HTMLPurifier_Length|string + */ + protected $max; + + /** + * @param HTMLPurifier_Length|string $min Minimum length, or null for no bound. String is also acceptable. + * @param HTMLPurifier_Length|string $max Maximum length, or null for no bound. String is also acceptable. + */ + public function __construct($min = null, $max = null) + { + $this->min = $min !== null ? HTMLPurifier_Length::make($min) : null; + $this->max = $max !== null ? HTMLPurifier_Length::make($max) : null; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = $this->parseCDATA($string); + + // Optimizations + if ($string === '') { + return false; + } + if ($string === '0') { + return '0'; + } + if (strlen($string) === 1) { + return false; + } + + $length = HTMLPurifier_Length::make($string); + if (!$length->isValid()) { + return false; + } + + if ($this->min) { + $c = $length->compareTo($this->min); + if ($c === false) { + return false; + } + if ($c < 0) { + return false; + } + } + if ($this->max) { + $c = $length->compareTo($this->max); + if ($c === false) { + return false; + } + if ($c > 0) { + return false; + } + } + return $length->toString(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ListStyle.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ListStyle.php new file mode 100644 index 0000000000000000000000000000000000000000..b4cce9a9df41e51660c18a2aaf04d4d2d7da63ff --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/ListStyle.php @@ -0,0 +1,112 @@ +<?php + +/** + * Validates shorthand CSS property list-style. + * @warning Does not support url tokens that have internal spaces. + */ +class HTMLPurifier_AttrDef_CSS_ListStyle extends HTMLPurifier_AttrDef +{ + + /** + * Local copy of validators. + * @type HTMLPurifier_AttrDef[] + * @note See HTMLPurifier_AttrDef_CSS_Font::$info for a similar impl. + */ + protected $info; + + /** + * @param HTMLPurifier_Config $config + */ + public function __construct($config) + { + $def = $config->getCSSDefinition(); + $this->info['list-style-type'] = $def->info['list-style-type']; + $this->info['list-style-position'] = $def->info['list-style-position']; + $this->info['list-style-image'] = $def->info['list-style-image']; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + // regular pre-processing + $string = $this->parseCDATA($string); + if ($string === '') { + return false; + } + + // assumes URI doesn't have spaces in it + $bits = explode(' ', strtolower($string)); // bits to process + + $caught = array(); + $caught['type'] = false; + $caught['position'] = false; + $caught['image'] = false; + + $i = 0; // number of catches + $none = false; + + foreach ($bits as $bit) { + if ($i >= 3) { + return; + } // optimization bit + if ($bit === '') { + continue; + } + foreach ($caught as $key => $status) { + if ($status !== false) { + continue; + } + $r = $this->info['list-style-' . $key]->validate($bit, $config, $context); + if ($r === false) { + continue; + } + if ($r === 'none') { + if ($none) { + continue; + } else { + $none = true; + } + if ($key == 'image') { + continue; + } + } + $caught[$key] = $r; + $i++; + break; + } + } + + if (!$i) { + return false; + } + + $ret = array(); + + // construct type + if ($caught['type']) { + $ret[] = $caught['type']; + } + + // construct image + if ($caught['image']) { + $ret[] = $caught['image']; + } + + // construct position + if ($caught['position']) { + $ret[] = $caught['position']; + } + + if (empty($ret)) { + return false; + } + return implode(' ', $ret); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Multiple.php similarity index 62% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Multiple.php index 4d62a40d7fc6a6abb3a834e3f80139deb39a8ada..4efb6c04f1161c2c0138ed3c3695266697ddf420 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Multiple.php @@ -1,58 +1,71 @@ -<?php - -/** - * Framework class for strings that involve multiple values. - * - * Certain CSS properties such as border-width and margin allow multiple - * lengths to be specified. This class can take a vanilla border-width - * definition and multiply it, usually into a max of four. - * - * @note Even though the CSS specification isn't clear about it, inherit - * can only be used alone: it will never manifest as part of a multi - * shorthand declaration. Thus, this class does not allow inherit. - */ -class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef -{ - - /** - * Instance of component definition to defer validation to. - * @todo Make protected - */ - public $single; - - /** - * Max number of values allowed. - * @todo Make protected - */ - public $max; - - /** - * @param $single HTMLPurifier_AttrDef to multiply - * @param $max Max number of values allowed (usually four) - */ - public function __construct($single, $max = 4) { - $this->single = $single; - $this->max = $max; - } - - public function validate($string, $config, $context) { - $string = $this->parseCDATA($string); - if ($string === '') return false; - $parts = explode(' ', $string); // parseCDATA replaced \r, \t and \n - $length = count($parts); - $final = ''; - for ($i = 0, $num = 0; $i < $length && $num < $this->max; $i++) { - if (ctype_space($parts[$i])) continue; - $result = $this->single->validate($parts[$i], $config, $context); - if ($result !== false) { - $final .= $result . ' '; - $num++; - } - } - if ($final === '') return false; - return rtrim($final); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Framework class for strings that involve multiple values. + * + * Certain CSS properties such as border-width and margin allow multiple + * lengths to be specified. This class can take a vanilla border-width + * definition and multiply it, usually into a max of four. + * + * @note Even though the CSS specification isn't clear about it, inherit + * can only be used alone: it will never manifest as part of a multi + * shorthand declaration. Thus, this class does not allow inherit. + */ +class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef +{ + /** + * Instance of component definition to defer validation to. + * @type HTMLPurifier_AttrDef + * @todo Make protected + */ + public $single; + + /** + * Max number of values allowed. + * @todo Make protected + */ + public $max; + + /** + * @param HTMLPurifier_AttrDef $single HTMLPurifier_AttrDef to multiply + * @param int $max Max number of values allowed (usually four) + */ + public function __construct($single, $max = 4) + { + $this->single = $single; + $this->max = $max; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = $this->mungeRgb($this->parseCDATA($string)); + if ($string === '') { + return false; + } + $parts = explode(' ', $string); // parseCDATA replaced \r, \t and \n + $length = count($parts); + $final = ''; + for ($i = 0, $num = 0; $i < $length && $num < $this->max; $i++) { + if (ctype_space($parts[$i])) { + continue; + } + $result = $this->single->validate($parts[$i], $config, $context); + if ($result !== false) { + $final .= $result . ' '; + $num++; + } + } + if ($final === '') { + return false; + } + return rtrim($final); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Number.php similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Number.php index 3f99e12ec26f8a35cb79b942a74a20021c1b0007..c78f6c9dfb7cc4c986b93b0dedda14b6b06bffb9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Number.php @@ -1,69 +1,84 @@ -<?php - -/** - * Validates a number as defined by the CSS spec. - */ -class HTMLPurifier_AttrDef_CSS_Number extends HTMLPurifier_AttrDef -{ - - /** - * Bool indicating whether or not only positive values allowed. - */ - protected $non_negative = false; - - /** - * @param $non_negative Bool indicating whether negatives are forbidden - */ - public function __construct($non_negative = false) { - $this->non_negative = $non_negative; - } - - /** - * @warning Some contexts do not pass $config, $context. These - * variables should not be used without checking HTMLPurifier_Length - */ - public function validate($number, $config, $context) { - - $number = $this->parseCDATA($number); - - if ($number === '') return false; - if ($number === '0') return '0'; - - $sign = ''; - switch ($number[0]) { - case '-': - if ($this->non_negative) return false; - $sign = '-'; - case '+': - $number = substr($number, 1); - } - - if (ctype_digit($number)) { - $number = ltrim($number, '0'); - return $number ? $sign . $number : '0'; - } - - // Period is the only non-numeric character allowed - if (strpos($number, '.') === false) return false; - - list($left, $right) = explode('.', $number, 2); - - if ($left === '' && $right === '') return false; - if ($left !== '' && !ctype_digit($left)) return false; - - $left = ltrim($left, '0'); - $right = rtrim($right, '0'); - - if ($right === '') { - return $left ? $sign . $left : '0'; - } elseif (!ctype_digit($right)) { - return false; - } - - return $sign . $left . '.' . $right; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates a number as defined by the CSS spec. + */ +class HTMLPurifier_AttrDef_CSS_Number extends HTMLPurifier_AttrDef +{ + + /** + * Indicates whether or not only positive values are allowed. + * @type bool + */ + protected $non_negative = false; + + /** + * @param bool $non_negative indicates whether negatives are forbidden + */ + public function __construct($non_negative = false) + { + $this->non_negative = $non_negative; + } + + /** + * @param string $number + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string|bool + * @warning Some contexts do not pass $config, $context. These + * variables should not be used without checking HTMLPurifier_Length + */ + public function validate($number, $config, $context) + { + $number = $this->parseCDATA($number); + + if ($number === '') { + return false; + } + if ($number === '0') { + return '0'; + } + + $sign = ''; + switch ($number[0]) { + case '-': + if ($this->non_negative) { + return false; + } + $sign = '-'; + case '+': + $number = substr($number, 1); + } + + if (ctype_digit($number)) { + $number = ltrim($number, '0'); + return $number ? $sign . $number : '0'; + } + + // Period is the only non-numeric character allowed + if (strpos($number, '.') === false) { + return false; + } + + list($left, $right) = explode('.', $number, 2); + + if ($left === '' && $right === '') { + return false; + } + if ($left !== '' && !ctype_digit($left)) { + return false; + } + + $left = ltrim($left, '0'); + $right = rtrim($right, '0'); + + if ($right === '') { + return $left ? $sign . $left : '0'; + } elseif (!ctype_digit($right)) { + return false; + } + return $sign . $left . '.' . $right; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Percentage.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Percentage.php new file mode 100644 index 0000000000000000000000000000000000000000..aac1a6f5fc9536eabd71b345c492373d8a342968 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/Percentage.php @@ -0,0 +1,54 @@ +<?php + +/** + * Validates a Percentage as defined by the CSS spec. + */ +class HTMLPurifier_AttrDef_CSS_Percentage extends HTMLPurifier_AttrDef +{ + + /** + * Instance to defer number validation to. + * @type HTMLPurifier_AttrDef_CSS_Number + */ + protected $number_def; + + /** + * @param bool $non_negative Whether to forbid negative values + */ + public function __construct($non_negative = false) + { + $this->number_def = new HTMLPurifier_AttrDef_CSS_Number($non_negative); + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = $this->parseCDATA($string); + + if ($string === '') { + return false; + } + $length = strlen($string); + if ($length === 1) { + return false; + } + if ($string[$length - 1] !== '%') { + return false; + } + + $number = substr($string, 0, $length - 1); + $number = $this->number_def->validate($number, $config, $context); + + if ($number === false) { + return false; + } + return "$number%"; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php similarity index 66% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php index 772c922d80bde9e3ca6f24db8ebef6b20132adf5..3992de0e60447ba9bb31ea9152090f1e0a4e6861 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php @@ -1,38 +1,46 @@ -<?php - -/** - * Validates the value for the CSS property text-decoration - * @note This class could be generalized into a version that acts sort of - * like Enum except you can compound the allowed values. - */ -class HTMLPurifier_AttrDef_CSS_TextDecoration extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - - static $allowed_values = array( - 'line-through' => true, - 'overline' => true, - 'underline' => true, - ); - - $string = strtolower($this->parseCDATA($string)); - - if ($string === 'none') return $string; - - $parts = explode(' ', $string); - $final = ''; - foreach ($parts as $part) { - if (isset($allowed_values[$part])) { - $final .= $part . ' '; - } - } - $final = rtrim($final); - if ($final === '') return false; - return $final; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates the value for the CSS property text-decoration + * @note This class could be generalized into a version that acts sort of + * like Enum except you can compound the allowed values. + */ +class HTMLPurifier_AttrDef_CSS_TextDecoration extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + static $allowed_values = array( + 'line-through' => true, + 'overline' => true, + 'underline' => true, + ); + + $string = strtolower($this->parseCDATA($string)); + + if ($string === 'none') { + return $string; + } + + $parts = explode(' ', $string); + $final = ''; + foreach ($parts as $part) { + if (isset($allowed_values[$part])) { + $final .= $part . ' '; + } + } + $final = rtrim($final); + if ($final === '') { + return false; + } + return $final; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/URI.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/URI.php new file mode 100644 index 0000000000000000000000000000000000000000..3d18b3289e0e5813effeb129b2fc644e9faa6523 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/CSS/URI.php @@ -0,0 +1,77 @@ +<?php + +/** + * Validates a URI in CSS syntax, which uses url('http://example.com') + * @note While theoretically speaking a URI in a CSS document could + * be non-embedded, as of CSS2 there is no such usage so we're + * generalizing it. This may need to be changed in the future. + * @warning Since HTMLPurifier_AttrDef_CSS blindly uses semicolons as + * the separator, you cannot put a literal semicolon in + * in the URI. Try percent encoding it, in that case. + */ +class HTMLPurifier_AttrDef_CSS_URI extends HTMLPurifier_AttrDef_URI +{ + + public function __construct() + { + parent::__construct(true); // always embedded + } + + /** + * @param string $uri_string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($uri_string, $config, $context) + { + // parse the URI out of the string and then pass it onto + // the parent object + + $uri_string = $this->parseCDATA($uri_string); + if (strpos($uri_string, 'url(') !== 0) { + return false; + } + $uri_string = substr($uri_string, 4); + if (strlen($uri_string) == 0) { + return false; + } + $new_length = strlen($uri_string) - 1; + if ($uri_string[$new_length] != ')') { + return false; + } + $uri = trim(substr($uri_string, 0, $new_length)); + + if (!empty($uri) && ($uri[0] == "'" || $uri[0] == '"')) { + $quote = $uri[0]; + $new_length = strlen($uri) - 1; + if ($uri[$new_length] !== $quote) { + return false; + } + $uri = substr($uri, 1, $new_length - 1); + } + + $uri = $this->expandCSSEscape($uri); + + $result = parent::validate($uri, $config, $context); + + if ($result === false) { + return false; + } + + // extra sanity check; should have been done by URI + $result = str_replace(array('"', "\\", "\n", "\x0c", "\r"), "", $result); + + // suspicious characters are ()'; we're going to percent encode + // them for safety. + $result = str_replace(array('(', ')', "'"), array('%28', '%29', '%27'), $result); + + // there's an extra bug where ampersands lose their escaping on + // an innerHTML cycle, so a very unlucky query parameter could + // then change the meaning of the URL. Unfortunately, there's + // not much we can do about that... + return "url(\"$result\")"; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Clone.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Clone.php new file mode 100644 index 0000000000000000000000000000000000000000..b181d1bcd43f9cb59fe386112e13f35b180197ad --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Clone.php @@ -0,0 +1,44 @@ +<?php + +/** + * Dummy AttrDef that mimics another AttrDef, BUT it generates clones + * with make. + */ +class HTMLPurifier_AttrDef_Clone extends HTMLPurifier_AttrDef +{ + /** + * What we're cloning. + * @type HTMLPurifier_AttrDef + */ + protected $clone; + + /** + * @param HTMLPurifier_AttrDef $clone + */ + public function __construct($clone) + { + $this->clone = $clone; + } + + /** + * @param string $v + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($v, $config, $context) + { + return $this->clone->validate($v, $config, $context); + } + + /** + * @param string $string + * @return HTMLPurifier_AttrDef + */ + public function make($string) + { + return clone $this->clone; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Enum.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Enum.php index 5d603ebcc67d51ddad1eb47010d702b157f7fa85..b40122b6caae2d1eb4aaf66110a4fcc6e235cf6e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Enum.php @@ -1,65 +1,73 @@ -<?php - -// Enum = Enumerated -/** - * Validates a keyword against a list of valid values. - * @warning The case-insensitive compare of this function uses PHP's - * built-in strtolower and ctype_lower functions, which may - * cause problems with international comparisons - */ -class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef -{ - - /** - * Lookup table of valid values. - * @todo Make protected - */ - public $valid_values = array(); - - /** - * Bool indicating whether or not enumeration is case sensitive. - * @note In general this is always case insensitive. - */ - protected $case_sensitive = false; // values according to W3C spec - - /** - * @param $valid_values List of valid values - * @param $case_sensitive Bool indicating whether or not case sensitive - */ - public function __construct( - $valid_values = array(), $case_sensitive = false - ) { - $this->valid_values = array_flip($valid_values); - $this->case_sensitive = $case_sensitive; - } - - public function validate($string, $config, $context) { - $string = trim($string); - if (!$this->case_sensitive) { - // we may want to do full case-insensitive libraries - $string = ctype_lower($string) ? $string : strtolower($string); - } - $result = isset($this->valid_values[$string]); - - return $result ? $string : false; - } - - /** - * @param $string In form of comma-delimited list of case-insensitive - * valid values. Example: "foo,bar,baz". Prepend "s:" to make - * case sensitive - */ - public function make($string) { - if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') { - $string = substr($string, 2); - $sensitive = true; - } else { - $sensitive = false; - } - $values = explode(',', $string); - return new HTMLPurifier_AttrDef_Enum($values, $sensitive); - } - -} - -// vim: et sw=4 sts=4 +<?php + +// Enum = Enumerated +/** + * Validates a keyword against a list of valid values. + * @warning The case-insensitive compare of this function uses PHP's + * built-in strtolower and ctype_lower functions, which may + * cause problems with international comparisons + */ +class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef +{ + + /** + * Lookup table of valid values. + * @type array + * @todo Make protected + */ + public $valid_values = array(); + + /** + * Bool indicating whether or not enumeration is case sensitive. + * @note In general this is always case insensitive. + */ + protected $case_sensitive = false; // values according to W3C spec + + /** + * @param array $valid_values List of valid values + * @param bool $case_sensitive Whether or not case sensitive + */ + public function __construct($valid_values = array(), $case_sensitive = false) + { + $this->valid_values = array_flip($valid_values); + $this->case_sensitive = $case_sensitive; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + if (!$this->case_sensitive) { + // we may want to do full case-insensitive libraries + $string = ctype_lower($string) ? $string : strtolower($string); + } + $result = isset($this->valid_values[$string]); + + return $result ? $string : false; + } + + /** + * @param string $string In form of comma-delimited list of case-insensitive + * valid values. Example: "foo,bar,baz". Prepend "s:" to make + * case sensitive + * @return HTMLPurifier_AttrDef_Enum + */ + public function make($string) + { + if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') { + $string = substr($string, 2); + $sensitive = true; + } else { + $sensitive = false; + } + $values = explode(',', $string); + return new HTMLPurifier_AttrDef_Enum($values, $sensitive); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Bool.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Bool.php new file mode 100644 index 0000000000000000000000000000000000000000..953a36a6c90a6b9da0132fddfe8098586d045fff --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Bool.php @@ -0,0 +1,48 @@ +<?php + +/** + * Validates a boolean attribute + */ +class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef +{ + + /** + * @type bool + */ + protected $name; + + /** + * @type bool + */ + public $minimized = true; + + /** + * @param bool $name + */ + public function __construct($name = false) + { + $this->name = $name; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + return $this->name; + } + + /** + * @param string $string Name of attribute + * @return HTMLPurifier_AttrDef_HTML_Bool + */ + public function make($string) + { + return new HTMLPurifier_AttrDef_HTML_Bool($string); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Class.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Class.php new file mode 100644 index 0000000000000000000000000000000000000000..b874c7e1ae1dd77e366b8411e14fdb1639212216 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Class.php @@ -0,0 +1,48 @@ +<?php + +/** + * Implements special behavior for class attribute (normally NMTOKENS) + */ +class HTMLPurifier_AttrDef_HTML_Class extends HTMLPurifier_AttrDef_HTML_Nmtokens +{ + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + protected function split($string, $config, $context) + { + // really, this twiddle should be lazy loaded + $name = $config->getDefinition('HTML')->doctype->name; + if ($name == "XHTML 1.1" || $name == "XHTML 2.0") { + return parent::split($string, $config, $context); + } else { + return preg_split('/\s+/', $string); + } + } + + /** + * @param array $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + protected function filter($tokens, $config, $context) + { + $allowed = $config->get('Attr.AllowedClasses'); + $forbidden = $config->get('Attr.ForbiddenClasses'); + $ret = array(); + foreach ($tokens as $token) { + if (($allowed === null || isset($allowed[$token])) && + !isset($forbidden[$token]) && + // We need this O(n) check because of PHP's array + // implementation that casts -0 to 0. + !in_array($token, $ret, true) + ) { + $ret[] = $token; + } + } + return $ret; + } +} diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Color.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Color.php new file mode 100644 index 0000000000000000000000000000000000000000..25c93fc6e559560f4af2c74fa6750f07fe903280 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Color.php @@ -0,0 +1,51 @@ +<?php + +/** + * Validates a color according to the HTML spec. + */ +class HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + static $colors = null; + if ($colors === null) { + $colors = $config->get('Core.ColorKeywords'); + } + + $string = trim($string); + + if (empty($string)) { + return false; + } + $lower = strtolower($string); + if (isset($colors[$lower])) { + return $colors[$lower]; + } + if ($string[0] === '#') { + $hex = substr($string, 1); + } else { + $hex = $string; + } + + $length = strlen($hex); + if ($length !== 3 && $length !== 6) { + return false; + } + if (!ctype_xdigit($hex)) { + return false; + } + if ($length === 3) { + $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; + } + return "#$hex"; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php new file mode 100644 index 0000000000000000000000000000000000000000..7446b6da99b3c3099a363ad0bde67cfb099fc88d --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php @@ -0,0 +1,38 @@ +<?php + +/** + * Special-case enum attribute definition that lazy loads allowed frame targets + */ +class HTMLPurifier_AttrDef_HTML_FrameTarget extends HTMLPurifier_AttrDef_Enum +{ + + /** + * @type array + */ + public $valid_values = false; // uninitialized value + + /** + * @type bool + */ + protected $case_sensitive = false; + + public function __construct() + { + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + if ($this->valid_values === false) { + $this->valid_values = $config->get('Attr.AllowedFrameTargets'); + } + return parent::validate($string, $config, $context); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/ID.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/ID.php new file mode 100644 index 0000000000000000000000000000000000000000..7e464ba546a7d55fd0a77f6cb6b20a5c70304101 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/ID.php @@ -0,0 +1,113 @@ +<?php + +/** + * Validates the HTML attribute ID. + * @warning Even though this is the id processor, it + * will ignore the directive Attr:IDBlacklist, since it will only + * go according to the ID accumulator. Since the accumulator is + * automatically generated, it will have already absorbed the + * blacklist. If you're hacking around, make sure you use load()! + */ + +class HTMLPurifier_AttrDef_HTML_ID extends HTMLPurifier_AttrDef +{ + + // selector is NOT a valid thing to use for IDREFs, because IDREFs + // *must* target IDs that exist, whereas selector #ids do not. + + /** + * Determines whether or not we're validating an ID in a CSS + * selector context. + * @type bool + */ + protected $selector; + + /** + * @param bool $selector + */ + public function __construct($selector = false) + { + $this->selector = $selector; + } + + /** + * @param string $id + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($id, $config, $context) + { + if (!$this->selector && !$config->get('Attr.EnableID')) { + return false; + } + + $id = trim($id); // trim it first + + if ($id === '') { + return false; + } + + $prefix = $config->get('Attr.IDPrefix'); + if ($prefix !== '') { + $prefix .= $config->get('Attr.IDPrefixLocal'); + // prevent re-appending the prefix + if (strpos($id, $prefix) !== 0) { + $id = $prefix . $id; + } + } elseif ($config->get('Attr.IDPrefixLocal') !== '') { + trigger_error( + '%Attr.IDPrefixLocal cannot be used unless ' . + '%Attr.IDPrefix is set', + E_USER_WARNING + ); + } + + if (!$this->selector) { + $id_accumulator =& $context->get('IDAccumulator'); + if (isset($id_accumulator->ids[$id])) { + return false; + } + } + + // we purposely avoid using regex, hopefully this is faster + + if ($config->get('Attr.ID.HTML5') === true) { + if (preg_match('/[\t\n\x0b\x0c ]/', $id)) { + return false; + } + } else { + if (ctype_alpha($id)) { + // OK + } else { + if (!ctype_alpha(@$id[0])) { + return false; + } + // primitive style of regexps, I suppose + $trim = trim( + $id, + 'A..Za..z0..9:-._' + ); + if ($trim !== '') { + return false; + } + } + } + + $regexp = $config->get('Attr.IDBlacklistRegexp'); + if ($regexp && preg_match($regexp, $id)) { + return false; + } + + if (!$this->selector) { + $id_accumulator->add($id); + } + + // if no change was made to the ID, return the result + // else, return the new id if stripping whitespace made it + // valid, or return false. + return $id; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Length.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Length.php new file mode 100644 index 0000000000000000000000000000000000000000..c8f51886566d22471faa214734b95534fe024b8b --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Length.php @@ -0,0 +1,56 @@ +<?php + +/** + * Validates the HTML type length (not to be confused with CSS's length). + * + * This accepts integer pixels or percentages as lengths for certain + * HTML attributes. + */ + +class HTMLPurifier_AttrDef_HTML_Length extends HTMLPurifier_AttrDef_HTML_Pixels +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + if ($string === '') { + return false; + } + + $parent_result = parent::validate($string, $config, $context); + if ($parent_result !== false) { + return $parent_result; + } + + $length = strlen($string); + $last_char = $string[$length - 1]; + + if ($last_char !== '%') { + return false; + } + + $points = substr($string, 0, $length - 1); + + if (!is_numeric($points)) { + return false; + } + + $points = (int)$points; + + if ($points < 0) { + return '0%'; + } + if ($points > 100) { + return '100%'; + } + return ((string)$points) . '%'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php index 8a0da0c89e0ccc02aa501b3d4b0d5e33e7dc3005..3f56934ffc6db2a0041f047f5007d9caea93ee0a 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php @@ -1,53 +1,72 @@ -<?php - -/** - * Validates a rel/rev link attribute against a directive of allowed values - * @note We cannot use Enum because link types allow multiple - * values. - * @note Assumes link types are ASCII text - */ -class HTMLPurifier_AttrDef_HTML_LinkTypes extends HTMLPurifier_AttrDef -{ - - /** Name config attribute to pull. */ - protected $name; - - public function __construct($name) { - $configLookup = array( - 'rel' => 'AllowedRel', - 'rev' => 'AllowedRev' - ); - if (!isset($configLookup[$name])) { - trigger_error('Unrecognized attribute name for link '. - 'relationship.', E_USER_ERROR); - return; - } - $this->name = $configLookup[$name]; - } - - public function validate($string, $config, $context) { - - $allowed = $config->get('Attr', $this->name); - if (empty($allowed)) return false; - - $string = $this->parseCDATA($string); - $parts = explode(' ', $string); - - // lookup to prevent duplicates - $ret_lookup = array(); - foreach ($parts as $part) { - $part = strtolower(trim($part)); - if (!isset($allowed[$part])) continue; - $ret_lookup[$part] = true; - } - - if (empty($ret_lookup)) return false; - $string = implode(' ', array_keys($ret_lookup)); - - return $string; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates a rel/rev link attribute against a directive of allowed values + * @note We cannot use Enum because link types allow multiple + * values. + * @note Assumes link types are ASCII text + */ +class HTMLPurifier_AttrDef_HTML_LinkTypes extends HTMLPurifier_AttrDef +{ + + /** + * Name config attribute to pull. + * @type string + */ + protected $name; + + /** + * @param string $name + */ + public function __construct($name) + { + $configLookup = array( + 'rel' => 'AllowedRel', + 'rev' => 'AllowedRev' + ); + if (!isset($configLookup[$name])) { + trigger_error( + 'Unrecognized attribute name for link ' . + 'relationship.', + E_USER_ERROR + ); + return; + } + $this->name = $configLookup[$name]; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $allowed = $config->get('Attr.' . $this->name); + if (empty($allowed)) { + return false; + } + + $string = $this->parseCDATA($string); + $parts = explode(' ', $string); + + // lookup to prevent duplicates + $ret_lookup = array(); + foreach ($parts as $part) { + $part = strtolower(trim($part)); + if (!isset($allowed[$part])) { + continue; + } + $ret_lookup[$part] = true; + } + + if (empty($ret_lookup)) { + return false; + } + $string = implode(' ', array_keys($ret_lookup)); + return $string; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/MultiLength.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/MultiLength.php new file mode 100644 index 0000000000000000000000000000000000000000..eb713e15b94e3b9d021d2c020d87ff5cded57e9d --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/MultiLength.php @@ -0,0 +1,60 @@ +<?php + +/** + * Validates a MultiLength as defined by the HTML spec. + * + * A multilength is either a integer (pixel count), a percentage, or + * a relative number. + */ +class HTMLPurifier_AttrDef_HTML_MultiLength extends HTMLPurifier_AttrDef_HTML_Length +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + if ($string === '') { + return false; + } + + $parent_result = parent::validate($string, $config, $context); + if ($parent_result !== false) { + return $parent_result; + } + + $length = strlen($string); + $last_char = $string[$length - 1]; + + if ($last_char !== '*') { + return false; + } + + $int = substr($string, 0, $length - 1); + + if ($int == '') { + return '*'; + } + if (!is_numeric($int)) { + return false; + } + + $int = (int)$int; + if ($int < 0) { + return false; + } + if ($int == 0) { + return '0'; + } + if ($int == 1) { + return '*'; + } + return ((string)$int) . '*'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php new file mode 100644 index 0000000000000000000000000000000000000000..ecb070c36d11058f6608746f4a65bdf82955e574 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php @@ -0,0 +1,70 @@ +<?php + +/** + * Validates contents based on NMTOKENS attribute type. + */ +class HTMLPurifier_AttrDef_HTML_Nmtokens extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + + // early abort: '' and '0' (strings that convert to false) are invalid + if (!$string) { + return false; + } + + $tokens = $this->split($string, $config, $context); + $tokens = $this->filter($tokens, $config, $context); + if (empty($tokens)) { + return false; + } + return implode(' ', $tokens); + } + + /** + * Splits a space separated list of tokens into its constituent parts. + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + protected function split($string, $config, $context) + { + // OPTIMIZABLE! + // do the preg_match, capture all subpatterns for reformulation + + // we don't support U+00A1 and up codepoints or + // escaping because I don't know how to do that with regexps + // and plus it would complicate optimization efforts (you never + // see that anyway). + $pattern = '/(?:(?<=\s)|\A)' . // look behind for space or string start + '((?:--|-?[A-Za-z_])[A-Za-z_\-0-9]*)' . + '(?:(?=\s)|\z)/'; // look ahead for space or string end + preg_match_all($pattern, $string, $matches); + return $matches[1]; + } + + /** + * Template method for removing certain tokens based on arbitrary criteria. + * @note If we wanted to be really functional, we'd do an array_filter + * with a callback. But... we're not. + * @param array $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + protected function filter($tokens, $config, $context) + { + return $tokens; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Pixels.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Pixels.php new file mode 100644 index 0000000000000000000000000000000000000000..1a68f238554f054336cbf29154b06a04fd2d2c81 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/HTML/Pixels.php @@ -0,0 +1,76 @@ +<?php + +/** + * Validates an integer representation of pixels according to the HTML spec. + */ +class HTMLPurifier_AttrDef_HTML_Pixels extends HTMLPurifier_AttrDef +{ + + /** + * @type int + */ + protected $max; + + /** + * @param int $max + */ + public function __construct($max = null) + { + $this->max = $max; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + if ($string === '0') { + return $string; + } + if ($string === '') { + return false; + } + $length = strlen($string); + if (substr($string, $length - 2) == 'px') { + $string = substr($string, 0, $length - 2); + } + if (!is_numeric($string)) { + return false; + } + $int = (int)$string; + + if ($int < 0) { + return '0'; + } + + // upper-bound value, extremely high values can + // crash operating systems, see <http://ha.ckers.org/imagecrash.html> + // WARNING, above link WILL crash you if you're using Windows + + if ($this->max !== null && $int > $this->max) { + return (string)$this->max; + } + return (string)$int; + } + + /** + * @param string $string + * @return HTMLPurifier_AttrDef + */ + public function make($string) + { + if ($string === '') { + $max = null; + } else { + $max = (int)$string; + } + $class = get_class($this); + return new $class($max); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Integer.php similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Integer.php index d59738d2a2b772d876cc0529e52b14a2ac680198..c98376d750d0f7605857c2d0f3886dbb46a86aad 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Integer.php @@ -1,73 +1,91 @@ -<?php - -/** - * Validates an integer. - * @note While this class was modeled off the CSS definition, no currently - * allowed CSS uses this type. The properties that do are: widows, - * orphans, z-index, counter-increment, counter-reset. Some of the - * HTML attributes, however, find use for a non-negative version of this. - */ -class HTMLPurifier_AttrDef_Integer extends HTMLPurifier_AttrDef -{ - - /** - * Bool indicating whether or not negative values are allowed - */ - protected $negative = true; - - /** - * Bool indicating whether or not zero is allowed - */ - protected $zero = true; - - /** - * Bool indicating whether or not positive values are allowed - */ - protected $positive = true; - - /** - * @param $negative Bool indicating whether or not negative values are allowed - * @param $zero Bool indicating whether or not zero is allowed - * @param $positive Bool indicating whether or not positive values are allowed - */ - public function __construct( - $negative = true, $zero = true, $positive = true - ) { - $this->negative = $negative; - $this->zero = $zero; - $this->positive = $positive; - } - - public function validate($integer, $config, $context) { - - $integer = $this->parseCDATA($integer); - if ($integer === '') return false; - - // we could possibly simply typecast it to integer, but there are - // certain fringe cases that must not return an integer. - - // clip leading sign - if ( $this->negative && $integer[0] === '-' ) { - $digits = substr($integer, 1); - if ($digits === '0') $integer = '0'; // rm minus sign for zero - } elseif( $this->positive && $integer[0] === '+' ) { - $digits = $integer = substr($integer, 1); // rm unnecessary plus - } else { - $digits = $integer; - } - - // test if it's numeric - if (!ctype_digit($digits)) return false; - - // perform scope tests - if (!$this->zero && $integer == 0) return false; - if (!$this->positive && $integer > 0) return false; - if (!$this->negative && $integer < 0) return false; - - return $integer; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates an integer. + * @note While this class was modeled off the CSS definition, no currently + * allowed CSS uses this type. The properties that do are: widows, + * orphans, z-index, counter-increment, counter-reset. Some of the + * HTML attributes, however, find use for a non-negative version of this. + */ +class HTMLPurifier_AttrDef_Integer extends HTMLPurifier_AttrDef +{ + + /** + * Whether or not negative values are allowed. + * @type bool + */ + protected $negative = true; + + /** + * Whether or not zero is allowed. + * @type bool + */ + protected $zero = true; + + /** + * Whether or not positive values are allowed. + * @type bool + */ + protected $positive = true; + + /** + * @param $negative Bool indicating whether or not negative values are allowed + * @param $zero Bool indicating whether or not zero is allowed + * @param $positive Bool indicating whether or not positive values are allowed + */ + public function __construct($negative = true, $zero = true, $positive = true) + { + $this->negative = $negative; + $this->zero = $zero; + $this->positive = $positive; + } + + /** + * @param string $integer + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($integer, $config, $context) + { + $integer = $this->parseCDATA($integer); + if ($integer === '') { + return false; + } + + // we could possibly simply typecast it to integer, but there are + // certain fringe cases that must not return an integer. + + // clip leading sign + if ($this->negative && $integer[0] === '-') { + $digits = substr($integer, 1); + if ($digits === '0') { + $integer = '0'; + } // rm minus sign for zero + } elseif ($this->positive && $integer[0] === '+') { + $digits = $integer = substr($integer, 1); // rm unnecessary plus + } else { + $digits = $integer; + } + + // test if it's numeric + if (!ctype_digit($digits)) { + return false; + } + + // perform scope tests + if (!$this->zero && $integer == 0) { + return false; + } + if (!$this->positive && $integer > 0) { + return false; + } + if (!$this->negative && $integer < 0) { + return false; + } + + return $integer; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Lang.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Lang.php index 10e6da56db190fdf4c2e28b0da8aa36d3172e04e..6ad0f799df645155b678d84049e7111c8d56a68d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Lang.php @@ -1,73 +1,86 @@ -<?php - -/** - * Validates the HTML attribute lang, effectively a language code. - * @note Built according to RFC 3066, which obsoleted RFC 1766 - */ -class HTMLPurifier_AttrDef_Lang extends HTMLPurifier_AttrDef -{ - - public function validate($string, $config, $context) { - - $string = trim($string); - if (!$string) return false; - - $subtags = explode('-', $string); - $num_subtags = count($subtags); - - if ($num_subtags == 0) return false; // sanity check - - // process primary subtag : $subtags[0] - $length = strlen($subtags[0]); - switch ($length) { - case 0: - return false; - case 1: - if (! ($subtags[0] == 'x' || $subtags[0] == 'i') ) { - return false; - } - break; - case 2: - case 3: - if (! ctype_alpha($subtags[0]) ) { - return false; - } elseif (! ctype_lower($subtags[0]) ) { - $subtags[0] = strtolower($subtags[0]); - } - break; - default: - return false; - } - - $new_string = $subtags[0]; - if ($num_subtags == 1) return $new_string; - - // process second subtag : $subtags[1] - $length = strlen($subtags[1]); - if ($length == 0 || ($length == 1 && $subtags[1] != 'x') || $length > 8 || !ctype_alnum($subtags[1])) { - return $new_string; - } - if (!ctype_lower($subtags[1])) $subtags[1] = strtolower($subtags[1]); - - $new_string .= '-' . $subtags[1]; - if ($num_subtags == 2) return $new_string; - - // process all other subtags, index 2 and up - for ($i = 2; $i < $num_subtags; $i++) { - $length = strlen($subtags[$i]); - if ($length == 0 || $length > 8 || !ctype_alnum($subtags[$i])) { - return $new_string; - } - if (!ctype_lower($subtags[$i])) { - $subtags[$i] = strtolower($subtags[$i]); - } - $new_string .= '-' . $subtags[$i]; - } - - return $new_string; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates the HTML attribute lang, effectively a language code. + * @note Built according to RFC 3066, which obsoleted RFC 1766 + */ +class HTMLPurifier_AttrDef_Lang extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $string = trim($string); + if (!$string) { + return false; + } + + $subtags = explode('-', $string); + $num_subtags = count($subtags); + + if ($num_subtags == 0) { // sanity check + return false; + } + + // process primary subtag : $subtags[0] + $length = strlen($subtags[0]); + switch ($length) { + case 0: + return false; + case 1: + if (!($subtags[0] == 'x' || $subtags[0] == 'i')) { + return false; + } + break; + case 2: + case 3: + if (!ctype_alpha($subtags[0])) { + return false; + } elseif (!ctype_lower($subtags[0])) { + $subtags[0] = strtolower($subtags[0]); + } + break; + default: + return false; + } + + $new_string = $subtags[0]; + if ($num_subtags == 1) { + return $new_string; + } + + // process second subtag : $subtags[1] + $length = strlen($subtags[1]); + if ($length == 0 || ($length == 1 && $subtags[1] != 'x') || $length > 8 || !ctype_alnum($subtags[1])) { + return $new_string; + } + if (!ctype_lower($subtags[1])) { + $subtags[1] = strtolower($subtags[1]); + } + + $new_string .= '-' . $subtags[1]; + if ($num_subtags == 2) { + return $new_string; + } + + // process all other subtags, index 2 and up + for ($i = 2; $i < $num_subtags; $i++) { + $length = strlen($subtags[$i]); + if ($length == 0 || $length > 8 || !ctype_alnum($subtags[$i])) { + return $new_string; + } + if (!ctype_lower($subtags[$i])) { + $subtags[$i] = strtolower($subtags[$i]); + } + $new_string .= '-' . $subtags[$i]; + } + return $new_string; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Switch.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Switch.php index c9e3ed193e77d0cbeac150d02105b81173eb37c0..078291f5845b7ec9288fdd8b412a0255f866ca93 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Switch.php @@ -1,34 +1,53 @@ -<?php - -/** - * Decorator that, depending on a token, switches between two definitions. - */ -class HTMLPurifier_AttrDef_Switch -{ - - protected $tag; - protected $withTag, $withoutTag; - - /** - * @param string $tag Tag name to switch upon - * @param HTMLPurifier_AttrDef $with_tag Call if token matches tag - * @param HTMLPurifier_AttrDef $without_tag Call if token doesn't match, or there is no token - */ - public function __construct($tag, $with_tag, $without_tag) { - $this->tag = $tag; - $this->withTag = $with_tag; - $this->withoutTag = $without_tag; - } - - public function validate($string, $config, $context) { - $token = $context->get('CurrentToken', true); - if (!$token || $token->name !== $this->tag) { - return $this->withoutTag->validate($string, $config, $context); - } else { - return $this->withTag->validate($string, $config, $context); - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Decorator that, depending on a token, switches between two definitions. + */ +class HTMLPurifier_AttrDef_Switch +{ + + /** + * @type string + */ + protected $tag; + + /** + * @type HTMLPurifier_AttrDef + */ + protected $withTag; + + /** + * @type HTMLPurifier_AttrDef + */ + protected $withoutTag; + + /** + * @param string $tag Tag name to switch upon + * @param HTMLPurifier_AttrDef $with_tag Call if token matches tag + * @param HTMLPurifier_AttrDef $without_tag Call if token doesn't match, or there is no token + */ + public function __construct($tag, $with_tag, $without_tag) + { + $this->tag = $tag; + $this->withTag = $with_tag; + $this->withoutTag = $without_tag; + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $token = $context->get('CurrentToken', true); + if (!$token || $token->name !== $this->tag) { + return $this->withoutTag->validate($string, $config, $context); + } else { + return $this->withTag->validate($string, $config, $context); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Text.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..9f23bac4a2d4d28e61474a54c31fcb057dbc3f04 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/Text.php @@ -0,0 +1,21 @@ +<?php + +/** + * Validates arbitrary text according to the HTML spec. + */ +class HTMLPurifier_AttrDef_Text extends HTMLPurifier_AttrDef +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + return $this->parseCDATA($string); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI.php index 93d2f0bbf4818b2cc12979a02a65015c7b1a3f95..a1097cd91875856e9f41eea1e7ff2feba105b65f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI.php @@ -1,77 +1,111 @@ -<?php - -/** - * Validates a URI as defined by RFC 3986. - * @note Scheme-specific mechanics deferred to HTMLPurifier_URIScheme - */ -class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef -{ - - protected $parser; - protected $embedsResource; - - /** - * @param $embeds_resource_resource Does the URI here result in an extra HTTP request? - */ - public function __construct($embeds_resource = false) { - $this->parser = new HTMLPurifier_URIParser(); - $this->embedsResource = (bool) $embeds_resource; - } - - public function make($string) { - $embeds = (bool) $string; - return new HTMLPurifier_AttrDef_URI($embeds); - } - - public function validate($uri, $config, $context) { - - if ($config->get('URI', 'Disable')) return false; - - $uri = $this->parseCDATA($uri); - - // parse the URI - $uri = $this->parser->parse($uri); - if ($uri === false) return false; - - // add embedded flag to context for validators - $context->register('EmbeddedURI', $this->embedsResource); - - $ok = false; - do { - - // generic validation - $result = $uri->validate($config, $context); - if (!$result) break; - - // chained filtering - $uri_def = $config->getDefinition('URI'); - $result = $uri_def->filter($uri, $config, $context); - if (!$result) break; - - // scheme-specific validation - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) break; - if ($this->embedsResource && !$scheme_obj->browsable) break; - $result = $scheme_obj->validate($uri, $config, $context); - if (!$result) break; - - // Post chained filtering - $result = $uri_def->postFilter($uri, $config, $context); - if (!$result) break; - - // survived gauntlet - $ok = true; - - } while (false); - - $context->destroy('EmbeddedURI'); - if (!$ok) return false; - - // back to string - return $uri->toString(); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates a URI as defined by RFC 3986. + * @note Scheme-specific mechanics deferred to HTMLPurifier_URIScheme + */ +class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef +{ + + /** + * @type HTMLPurifier_URIParser + */ + protected $parser; + + /** + * @type bool + */ + protected $embedsResource; + + /** + * @param bool $embeds_resource Does the URI here result in an extra HTTP request? + */ + public function __construct($embeds_resource = false) + { + $this->parser = new HTMLPurifier_URIParser(); + $this->embedsResource = (bool)$embeds_resource; + } + + /** + * @param string $string + * @return HTMLPurifier_AttrDef_URI + */ + public function make($string) + { + $embeds = ($string === 'embedded'); + return new HTMLPurifier_AttrDef_URI($embeds); + } + + /** + * @param string $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($uri, $config, $context) + { + if ($config->get('URI.Disable')) { + return false; + } + + $uri = $this->parseCDATA($uri); + + // parse the URI + $uri = $this->parser->parse($uri); + if ($uri === false) { + return false; + } + + // add embedded flag to context for validators + $context->register('EmbeddedURI', $this->embedsResource); + + $ok = false; + do { + + // generic validation + $result = $uri->validate($config, $context); + if (!$result) { + break; + } + + // chained filtering + $uri_def = $config->getDefinition('URI'); + $result = $uri_def->filter($uri, $config, $context); + if (!$result) { + break; + } + + // scheme-specific validation + $scheme_obj = $uri->getSchemeObj($config, $context); + if (!$scheme_obj) { + break; + } + if ($this->embedsResource && !$scheme_obj->browsable) { + break; + } + $result = $scheme_obj->validate($uri, $config, $context); + if (!$result) { + break; + } + + // Post chained filtering + $result = $uri_def->postFilter($uri, $config, $context); + if (!$result) { + break; + } + + // survived gauntlet + $ok = true; + + } while (false); + + $context->destroy('EmbeddedURI'); + if (!$ok) { + return false; + } + // back to string + return $uri->toString(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email.php similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email.php index bfee9d166c82ee6c0df47636afa4ea0948e8ba09..846d38814815893e1d17542105d6ac840e1e3f3c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email.php @@ -1,17 +1,20 @@ -<?php - -abstract class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef -{ - - /** - * Unpacks a mailbox into its display-name and address - */ - function unpack($string) { - // needs to be implemented - } - -} - -// sub-implementations - -// vim: et sw=4 sts=4 +<?php + +abstract class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef +{ + + /** + * Unpacks a mailbox into its display-name and address + * @param string $string + * @return mixed + */ + public function unpack($string) + { + // needs to be implemented + } + +} + +// sub-implementations + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php index 94c715ab43258b923f89f300a853438ccce2da49..3b041ce8c7069ec63eb8e677b336c3b56b23763e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php @@ -1,21 +1,29 @@ -<?php - -/** - * Primitive email validation class based on the regexp found at - * http://www.regular-expressions.info/email.html - */ -class HTMLPurifier_AttrDef_URI_Email_SimpleCheck extends HTMLPurifier_AttrDef_URI_Email -{ - - public function validate($string, $config, $context) { - // no support for named mailboxes i.e. "Bob <bob@example.com>" - // that needs more percent encoding to be done - if ($string == '') return false; - $string = trim($string); - $result = preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $string); - return $result ? $string : false; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Primitive email validation class based on the regexp found at + * http://www.regular-expressions.info/email.html + */ +class HTMLPurifier_AttrDef_URI_Email_SimpleCheck extends HTMLPurifier_AttrDef_URI_Email +{ + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + // no support for named mailboxes i.e. "Bob <bob@example.com>" + // that needs more percent encoding to be done + if ($string == '') { + return false; + } + $string = trim($string); + $result = preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $string); + return $result ? $string : false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Host.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Host.php new file mode 100644 index 0000000000000000000000000000000000000000..c1e2e3c5ddd48e7e07cd617e48b92d3372fc0d86 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/Host.php @@ -0,0 +1,138 @@ +<?php + +/** + * Validates a host according to the IPv4, IPv6 and DNS (future) specifications. + */ +class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef +{ + + /** + * IPv4 sub-validator. + * @type HTMLPurifier_AttrDef_URI_IPv4 + */ + protected $ipv4; + + /** + * IPv6 sub-validator. + * @type HTMLPurifier_AttrDef_URI_IPv6 + */ + protected $ipv6; + + public function __construct() + { + $this->ipv4 = new HTMLPurifier_AttrDef_URI_IPv4(); + $this->ipv6 = new HTMLPurifier_AttrDef_URI_IPv6(); + } + + /** + * @param string $string + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($string, $config, $context) + { + $length = strlen($string); + // empty hostname is OK; it's usually semantically equivalent: + // the default host as defined by a URI scheme is used: + // + // If the URI scheme defines a default for host, then that + // default applies when the host subcomponent is undefined + // or when the registered name is empty (zero length). + if ($string === '') { + return ''; + } + if ($length > 1 && $string[0] === '[' && $string[$length - 1] === ']') { + //IPv6 + $ip = substr($string, 1, $length - 2); + $valid = $this->ipv6->validate($ip, $config, $context); + if ($valid === false) { + return false; + } + return '[' . $valid . ']'; + } + + // need to do checks on unusual encodings too + $ipv4 = $this->ipv4->validate($string, $config, $context); + if ($ipv4 !== false) { + return $ipv4; + } + + // A regular domain name. + + // This doesn't match I18N domain names, but we don't have proper IRI support, + // so force users to insert Punycode. + + // There is not a good sense in which underscores should be + // allowed, since it's technically not! (And if you go as + // far to allow everything as specified by the DNS spec... + // well, that's literally everything, modulo some space limits + // for the components and the overall name (which, by the way, + // we are NOT checking!). So we (arbitrarily) decide this: + // let's allow underscores wherever we would have allowed + // hyphens, if they are enabled. This is a pretty good match + // for browser behavior, for example, a large number of browsers + // cannot handle foo_.example.com, but foo_bar.example.com is + // fairly well supported. + $underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : ''; + + // Based off of RFC 1738, but amended so that + // as per RFC 3696, the top label need only not be all numeric. + // The productions describing this are: + $a = '[a-z]'; // alpha + $an = '[a-z0-9]'; // alphanum + $and = "[a-z0-9-$underscore]"; // alphanum | "-" + // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum + $domainlabel = "$an(?:$and*$an)?"; + // AMENDED as per RFC 3696 + // toplabel = alphanum | alphanum *( alphanum | "-" ) alphanum + // side condition: not all numeric + $toplabel = "$an(?:$and*$an)?"; + // hostname = *( domainlabel "." ) toplabel [ "." ] + if (preg_match("/^(?:$domainlabel\.)*($toplabel)\.?$/i", $string, $matches)) { + if (!ctype_digit($matches[1])) { + return $string; + } + } + + // PHP 5.3 and later support this functionality natively + if (function_exists('idn_to_ascii')) { + $string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); + + // If we have Net_IDNA2 support, we can support IRIs by + // punycoding them. (This is the most portable thing to do, + // since otherwise we have to assume browsers support + } elseif ($config->get('Core.EnableIDNA')) { + $idna = new Net_IDNA2(array('encoding' => 'utf8', 'overlong' => false, 'strict' => true)); + // we need to encode each period separately + $parts = explode('.', $string); + try { + $new_parts = array(); + foreach ($parts as $part) { + $encodable = false; + for ($i = 0, $c = strlen($part); $i < $c; $i++) { + if (ord($part[$i]) > 0x7a) { + $encodable = true; + break; + } + } + if (!$encodable) { + $new_parts[] = $part; + } else { + $new_parts[] = $idna->encode($part); + } + } + $string = implode('.', $new_parts); + } catch (Exception $e) { + // XXX error reporting + } + } + // Try again + if (preg_match("/^($domainlabel\.)*$toplabel\.?$/i", $string)) { + return $string; + } + return false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv4.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv4.php new file mode 100644 index 0000000000000000000000000000000000000000..bbc8a77e32067427bd7235c6c62398850e3a2e54 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv4.php @@ -0,0 +1,45 @@ +<?php + +/** + * Validates an IPv4 address + * @author Feyd @ forums.devnetwork.net (public domain) + */ +class HTMLPurifier_AttrDef_URI_IPv4 extends HTMLPurifier_AttrDef +{ + + /** + * IPv4 regex, protected so that IPv6 can reuse it. + * @type string + */ + protected $ip4; + + /** + * @param string $aIP + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($aIP, $config, $context) + { + if (!$this->ip4) { + $this->_loadRegex(); + } + + if (preg_match('#^' . $this->ip4 . '$#s', $aIP)) { + return $aIP; + } + return false; + } + + /** + * Lazy load function to prevent regex from being stuffed in + * cache. + */ + protected function _loadRegex() + { + $oct = '(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])'; // 0-255 + $this->ip4 = "(?:{$oct}\\.{$oct}\\.{$oct}\\.{$oct})"; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv6.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv6.php new file mode 100644 index 0000000000000000000000000000000000000000..67f148bd83078c3c6c00d446610fffc8673c23fe --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrDef/URI/IPv6.php @@ -0,0 +1,89 @@ +<?php + +/** + * Validates an IPv6 address. + * @author Feyd @ forums.devnetwork.net (public domain) + * @note This function requires brackets to have been removed from address + * in URI. + */ +class HTMLPurifier_AttrDef_URI_IPv6 extends HTMLPurifier_AttrDef_URI_IPv4 +{ + + /** + * @param string $aIP + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string + */ + public function validate($aIP, $config, $context) + { + if (!$this->ip4) { + $this->_loadRegex(); + } + + $original = $aIP; + + $hex = '[0-9a-fA-F]'; + $blk = '(?:' . $hex . '{1,4})'; + $pre = '(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))'; // /0 - /128 + + // prefix check + if (strpos($aIP, '/') !== false) { + if (preg_match('#' . $pre . '$#s', $aIP, $find)) { + $aIP = substr($aIP, 0, 0 - strlen($find[0])); + unset($find); + } else { + return false; + } + } + + // IPv4-compatiblity check + if (preg_match('#(?<=:' . ')' . $this->ip4 . '$#s', $aIP, $find)) { + $aIP = substr($aIP, 0, 0 - strlen($find[0])); + $ip = explode('.', $find[0]); + $ip = array_map('dechex', $ip); + $aIP .= $ip[0] . $ip[1] . ':' . $ip[2] . $ip[3]; + unset($find, $ip); + } + + // compression check + $aIP = explode('::', $aIP); + $c = count($aIP); + if ($c > 2) { + return false; + } elseif ($c == 2) { + list($first, $second) = $aIP; + $first = explode(':', $first); + $second = explode(':', $second); + + if (count($first) + count($second) > 8) { + return false; + } + + while (count($first) < 8) { + array_push($first, '0'); + } + + array_splice($first, 8 - count($second), 8, $second); + $aIP = $first; + unset($first, $second); + } else { + $aIP = explode(':', $aIP[0]); + } + $c = count($aIP); + + if ($c != 8) { + return false; + } + + // All the pieces should be 16-bit hex strings. Are they? + foreach ($aIP as $piece) { + if (!preg_match('#^[0-9a-fA-F]{4}$#s', sprintf('%04s', $piece))) { + return false; + } + } + return $original; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform.php similarity index 61% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform.php index e61d3e01b6d55f3f83b42d2e3d82a21f83492c52..d9baaf394f0af7004603d6a77a24b18fc355c346 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform.php @@ -1,56 +1,60 @@ -<?php - -/** - * Processes an entire attribute array for corrections needing multiple values. - * - * Occasionally, a certain attribute will need to be removed and popped onto - * another value. Instead of creating a complex return syntax for - * HTMLPurifier_AttrDef, we just pass the whole attribute array to a - * specialized object and have that do the special work. That is the - * family of HTMLPurifier_AttrTransform. - * - * An attribute transformation can be assigned to run before or after - * HTMLPurifier_AttrDef validation. See HTMLPurifier_HTMLDefinition for - * more details. - */ - -abstract class HTMLPurifier_AttrTransform -{ - - /** - * Abstract: makes changes to the attributes dependent on multiple values. - * - * @param $attr Assoc array of attributes, usually from - * HTMLPurifier_Token_Tag::$attr - * @param $config Mandatory HTMLPurifier_Config object. - * @param $context Mandatory HTMLPurifier_Context object - * @returns Processed attribute array. - */ - abstract public function transform($attr, $config, $context); - - /** - * Prepends CSS properties to the style attribute, creating the - * attribute if it doesn't exist. - * @param $attr Attribute array to process (passed by reference) - * @param $css CSS to prepend - */ - public function prependCSS(&$attr, $css) { - $attr['style'] = isset($attr['style']) ? $attr['style'] : ''; - $attr['style'] = $css . $attr['style']; - } - - /** - * Retrieves and removes an attribute - * @param $attr Attribute array to process (passed by reference) - * @param $key Key of attribute to confiscate - */ - public function confiscateAttr(&$attr, $key) { - if (!isset($attr[$key])) return null; - $value = $attr[$key]; - unset($attr[$key]); - return $value; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Processes an entire attribute array for corrections needing multiple values. + * + * Occasionally, a certain attribute will need to be removed and popped onto + * another value. Instead of creating a complex return syntax for + * HTMLPurifier_AttrDef, we just pass the whole attribute array to a + * specialized object and have that do the special work. That is the + * family of HTMLPurifier_AttrTransform. + * + * An attribute transformation can be assigned to run before or after + * HTMLPurifier_AttrDef validation. See HTMLPurifier_HTMLDefinition for + * more details. + */ + +abstract class HTMLPurifier_AttrTransform +{ + + /** + * Abstract: makes changes to the attributes dependent on multiple values. + * + * @param array $attr Assoc array of attributes, usually from + * HTMLPurifier_Token_Tag::$attr + * @param HTMLPurifier_Config $config Mandatory HTMLPurifier_Config object. + * @param HTMLPurifier_Context $context Mandatory HTMLPurifier_Context object + * @return array Processed attribute array. + */ + abstract public function transform($attr, $config, $context); + + /** + * Prepends CSS properties to the style attribute, creating the + * attribute if it doesn't exist. + * @param array &$attr Attribute array to process (passed by reference) + * @param string $css CSS to prepend + */ + public function prependCSS(&$attr, $css) + { + $attr['style'] = isset($attr['style']) ? $attr['style'] : ''; + $attr['style'] = $css . $attr['style']; + } + + /** + * Retrieves and removes an attribute + * @param array &$attr Attribute array to process (passed by reference) + * @param mixed $key Key of attribute to confiscate + * @return mixed + */ + public function confiscateAttr(&$attr, $key) + { + if (!isset($attr[$key])) { + return null; + } + $value = $attr[$key]; + unset($attr[$key]); + return $value; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Background.php similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Background.php index 0e1ff24a3ed8ed6758118ba293f40d5783150f1c..f0f00068f183a699d4778b3470aa8cea63507860 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Background.php @@ -1,23 +1,28 @@ -<?php - -/** - * Pre-transform that changes proprietary background attribute to CSS. - */ -class HTMLPurifier_AttrTransform_Background extends HTMLPurifier_AttrTransform { - - public function transform($attr, $config, $context) { - - if (!isset($attr['background'])) return $attr; - - $background = $this->confiscateAttr($attr, 'background'); - // some validation should happen here - - $this->prependCSS($attr, "background-image:url($background);"); - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Pre-transform that changes proprietary background attribute to CSS. + */ +class HTMLPurifier_AttrTransform_Background extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['background'])) { + return $attr; + } + + $background = $this->confiscateAttr($attr, 'background'); + // some validation should happen here + + $this->prependCSS($attr, "background-image:url($background);"); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BdoDir.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BdoDir.php new file mode 100644 index 0000000000000000000000000000000000000000..86dcb17e4b998fe57c3e89ec0f24210518ed4d4e --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BdoDir.php @@ -0,0 +1,27 @@ +<?php + +// this MUST be placed in post, as it assumes that any value in dir is valid + +/** + * Post-trasnform that ensures that bdo tags have the dir attribute set. + */ +class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform +{ + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (isset($attr['dir'])) { + return $attr; + } + $attr['dir'] = $config->get('Attr.DefaultTextDir'); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BgColor.php similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BgColor.php index ad3916bb9676a482104027657545a8a8e616c177..e45e9ba376d7f7a9bbea82ed5d9d1037d938a634 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BgColor.php @@ -1,23 +1,28 @@ -<?php - -/** - * Pre-transform that changes deprecated bgcolor attribute to CSS. - */ -class HTMLPurifier_AttrTransform_BgColor extends HTMLPurifier_AttrTransform { - - public function transform($attr, $config, $context) { - - if (!isset($attr['bgcolor'])) return $attr; - - $bgcolor = $this->confiscateAttr($attr, 'bgcolor'); - // some validation should happen here - - $this->prependCSS($attr, "background-color:$bgcolor;"); - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Pre-transform that changes deprecated bgcolor attribute to CSS. + */ +class HTMLPurifier_AttrTransform_BgColor extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['bgcolor'])) { + return $attr; + } + + $bgcolor = $this->confiscateAttr($attr, 'bgcolor'); + // some validation should happen here + + $this->prependCSS($attr, "background-color:$bgcolor;"); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BoolToCSS.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BoolToCSS.php new file mode 100644 index 0000000000000000000000000000000000000000..29d7ff2698812fa3484c43abcf899fd1705a7c92 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/BoolToCSS.php @@ -0,0 +1,47 @@ +<?php + +/** + * Pre-transform that changes converts a boolean attribute to fixed CSS + */ +class HTMLPurifier_AttrTransform_BoolToCSS extends HTMLPurifier_AttrTransform +{ + /** + * Name of boolean attribute that is trigger. + * @type string + */ + protected $attr; + + /** + * CSS declarations to add to style, needs trailing semicolon. + * @type string + */ + protected $css; + + /** + * @param string $attr attribute name to convert from + * @param string $css CSS declarations to add to style (needs semicolon) + */ + public function __construct($attr, $css) + { + $this->attr = $attr; + $this->css = $css; + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr[$this->attr])) { + return $attr; + } + unset($attr[$this->attr]); + $this->prependCSS($attr, $this->css); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Border.php similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Border.php index 476b0b079b11074ce4e26f5ba163ed9849b7a161..90a8dea87744b2463d8dd411b3179dff966cad33 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Border.php @@ -1,18 +1,26 @@ -<?php - -/** - * Pre-transform that changes deprecated border attribute to CSS. - */ -class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform { - - public function transform($attr, $config, $context) { - if (!isset($attr['border'])) return $attr; - $border_width = $this->confiscateAttr($attr, 'border'); - // some validation should happen here - $this->prependCSS($attr, "border:{$border_width}px solid;"); - return $attr; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Pre-transform that changes deprecated border attribute to CSS. + */ +class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['border'])) { + return $attr; + } + $border_width = $this->confiscateAttr($attr, 'border'); + // some validation should happen here + $this->prependCSS($attr, "border:{$border_width}px solid;"); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/EnumToCSS.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/EnumToCSS.php new file mode 100644 index 0000000000000000000000000000000000000000..e2bfbf007252debe45e07f03fa90d24e745417dc --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/EnumToCSS.php @@ -0,0 +1,68 @@ +<?php + +/** + * Generic pre-transform that converts an attribute with a fixed number of + * values (enumerated) to CSS. + */ +class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTransform +{ + /** + * Name of attribute to transform from. + * @type string + */ + protected $attr; + + /** + * Lookup array of attribute values to CSS. + * @type array + */ + protected $enumToCSS = array(); + + /** + * Case sensitivity of the matching. + * @type bool + * @warning Currently can only be guaranteed to work with ASCII + * values. + */ + protected $caseSensitive = false; + + /** + * @param string $attr Attribute name to transform from + * @param array $enum_to_css Lookup array of attribute values to CSS + * @param bool $case_sensitive Case sensitivity indicator, default false + */ + public function __construct($attr, $enum_to_css, $case_sensitive = false) + { + $this->attr = $attr; + $this->enumToCSS = $enum_to_css; + $this->caseSensitive = (bool)$case_sensitive; + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr[$this->attr])) { + return $attr; + } + + $value = trim($attr[$this->attr]); + unset($attr[$this->attr]); + + if (!$this->caseSensitive) { + $value = strtolower($value); + } + + if (!isset($this->enumToCSS[$value])) { + return $attr; + } + $this->prependCSS($attr, $this->enumToCSS[$value]); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgRequired.php similarity index 58% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgRequired.php index 25c9403c209344b54b0db62472ea9ca2ab4c1581..335f0033e1af3b4565a363ab05845c70144db298 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgRequired.php @@ -1,42 +1,47 @@ -<?php - -// must be called POST validation - -/** - * Transform that supplies default values for the src and alt attributes - * in img tags, as well as prevents the img tag from being removed - * because of a missing alt tag. This needs to be registered as both - * a pre and post attribute transform. - */ -class HTMLPurifier_AttrTransform_ImgRequired extends HTMLPurifier_AttrTransform -{ - - public function transform($attr, $config, $context) { - - $src = true; - if (!isset($attr['src'])) { - if ($config->get('Core', 'RemoveInvalidImg')) return $attr; - $attr['src'] = $config->get('Attr', 'DefaultInvalidImage'); - $src = false; - } - - if (!isset($attr['alt'])) { - if ($src) { - $alt = $config->get('Attr', 'DefaultImageAlt'); - if ($alt === null) { - $attr['alt'] = basename($attr['src']); - } else { - $attr['alt'] = $alt; - } - } else { - $attr['alt'] = $config->get('Attr', 'DefaultInvalidImageAlt'); - } - } - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +// must be called POST validation + +/** + * Transform that supplies default values for the src and alt attributes + * in img tags, as well as prevents the img tag from being removed + * because of a missing alt tag. This needs to be registered as both + * a pre and post attribute transform. + */ +class HTMLPurifier_AttrTransform_ImgRequired extends HTMLPurifier_AttrTransform +{ + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + $src = true; + if (!isset($attr['src'])) { + if ($config->get('Core.RemoveInvalidImg')) { + return $attr; + } + $attr['src'] = $config->get('Attr.DefaultInvalidImage'); + $src = false; + } + + if (!isset($attr['alt'])) { + if ($src) { + $alt = $config->get('Attr.DefaultImageAlt'); + if ($alt === null) { + $attr['alt'] = basename($attr['src']); + } else { + $attr['alt'] = $alt; + } + } else { + $attr['alt'] = $config->get('Attr.DefaultInvalidImageAlt'); + } + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgSpace.php similarity index 58% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgSpace.php index fd84c10c3618fb4642282ae307cf731e9e042490..aec42aea8c3396283db10ff036441046e136b8c5 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ImgSpace.php @@ -1,44 +1,61 @@ -<?php - -/** - * Pre-transform that changes deprecated hspace and vspace attributes to CSS - */ -class HTMLPurifier_AttrTransform_ImgSpace extends HTMLPurifier_AttrTransform { - - protected $attr; - protected $css = array( - 'hspace' => array('left', 'right'), - 'vspace' => array('top', 'bottom') - ); - - public function __construct($attr) { - $this->attr = $attr; - if (!isset($this->css[$attr])) { - trigger_error(htmlspecialchars($attr) . ' is not valid space attribute'); - } - } - - public function transform($attr, $config, $context) { - - if (!isset($attr[$this->attr])) return $attr; - - $width = $this->confiscateAttr($attr, $this->attr); - // some validation could happen here - - if (!isset($this->css[$this->attr])) return $attr; - - $style = ''; - foreach ($this->css[$this->attr] as $suffix) { - $property = "margin-$suffix"; - $style .= "$property:{$width}px;"; - } - - $this->prependCSS($attr, $style); - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Pre-transform that changes deprecated hspace and vspace attributes to CSS + */ +class HTMLPurifier_AttrTransform_ImgSpace extends HTMLPurifier_AttrTransform +{ + /** + * @type string + */ + protected $attr; + + /** + * @type array + */ + protected $css = array( + 'hspace' => array('left', 'right'), + 'vspace' => array('top', 'bottom') + ); + + /** + * @param string $attr + */ + public function __construct($attr) + { + $this->attr = $attr; + if (!isset($this->css[$attr])) { + trigger_error(htmlspecialchars($attr) . ' is not valid space attribute'); + } + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr[$this->attr])) { + return $attr; + } + + $width = $this->confiscateAttr($attr, $this->attr); + // some validation could happen here + + if (!isset($this->css[$this->attr])) { + return $attr; + } + + $style = ''; + foreach ($this->css[$this->attr] as $suffix) { + $property = "margin-$suffix"; + $style .= "$property:{$width}px;"; + } + $this->prependCSS($attr, $style); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Input.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Input.php index 16829552d14d2a82502661ad530186a8c9e21cc9..17a2ce4cec17ed0ba170d4e178abd1339c6f52ce 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Input.php @@ -1,40 +1,56 @@ -<?php - -/** - * Performs miscellaneous cross attribute validation and filtering for - * input elements. This is meant to be a post-transform. - */ -class HTMLPurifier_AttrTransform_Input extends HTMLPurifier_AttrTransform { - - protected $pixels; - - public function __construct() { - $this->pixels = new HTMLPurifier_AttrDef_HTML_Pixels(); - } - - public function transform($attr, $config, $context) { - if (!isset($attr['type'])) $t = 'text'; - else $t = strtolower($attr['type']); - if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') { - unset($attr['checked']); - } - if (isset($attr['maxlength']) && $t !== 'text' && $t !== 'password') { - unset($attr['maxlength']); - } - if (isset($attr['size']) && $t !== 'text' && $t !== 'password') { - $result = $this->pixels->validate($attr['size'], $config, $context); - if ($result === false) unset($attr['size']); - else $attr['size'] = $result; - } - if (isset($attr['src']) && $t !== 'image') { - unset($attr['src']); - } - if (!isset($attr['value']) && ($t === 'radio' || $t === 'checkbox')) { - $attr['value'] = ''; - } - return $attr; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Performs miscellaneous cross attribute validation and filtering for + * input elements. This is meant to be a post-transform. + */ +class HTMLPurifier_AttrTransform_Input extends HTMLPurifier_AttrTransform +{ + /** + * @type HTMLPurifier_AttrDef_HTML_Pixels + */ + protected $pixels; + + public function __construct() + { + $this->pixels = new HTMLPurifier_AttrDef_HTML_Pixels(); + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['type'])) { + $t = 'text'; + } else { + $t = strtolower($attr['type']); + } + if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') { + unset($attr['checked']); + } + if (isset($attr['maxlength']) && $t !== 'text' && $t !== 'password') { + unset($attr['maxlength']); + } + if (isset($attr['size']) && $t !== 'text' && $t !== 'password') { + $result = $this->pixels->validate($attr['size'], $config, $context); + if ($result === false) { + unset($attr['size']); + } else { + $attr['size'] = $result; + } + } + if (isset($attr['src']) && $t !== 'image') { + unset($attr['src']); + } + if (!isset($attr['value']) && ($t === 'radio' || $t === 'checkbox')) { + $attr['value'] = ''; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Lang.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Lang.php index 5869e7f82037c5a38b9ea55789735181e4980160..591b8ca73862413aac5c53a67d873b390b864ee2 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Lang.php @@ -1,28 +1,31 @@ -<?php - -/** - * Post-transform that copies lang's value to xml:lang (and vice-versa) - * @note Theoretically speaking, this could be a pre-transform, but putting - * post is more efficient. - */ -class HTMLPurifier_AttrTransform_Lang extends HTMLPurifier_AttrTransform -{ - - public function transform($attr, $config, $context) { - - $lang = isset($attr['lang']) ? $attr['lang'] : false; - $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false; - - if ($lang !== false && $xml_lang === false) { - $attr['xml:lang'] = $lang; - } elseif ($xml_lang !== false) { - $attr['lang'] = $xml_lang; - } - - return $attr; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Post-transform that copies lang's value to xml:lang (and vice-versa) + * @note Theoretically speaking, this could be a pre-transform, but putting + * post is more efficient. + */ +class HTMLPurifier_AttrTransform_Lang extends HTMLPurifier_AttrTransform +{ + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + $lang = isset($attr['lang']) ? $attr['lang'] : false; + $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false; + + if ($lang !== false && $xml_lang === false) { + $attr['xml:lang'] = $lang; + } elseif ($xml_lang !== false) { + $attr['lang'] = $xml_lang; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Length.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Length.php new file mode 100644 index 0000000000000000000000000000000000000000..c4bfd9760b61220d1d035858072c0d1199309a69 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Length.php @@ -0,0 +1,45 @@ +<?php + +/** + * Class for handling width/height length attribute transformations to CSS + */ +class HTMLPurifier_AttrTransform_Length extends HTMLPurifier_AttrTransform +{ + + /** + * @type string + */ + protected $name; + + /** + * @type string + */ + protected $cssName; + + public function __construct($name, $css_name = null) + { + $this->name = $name; + $this->cssName = $css_name ? $css_name : $name; + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr[$this->name])) { + return $attr; + } + $length = $this->confiscateAttr($attr, $this->name); + if (ctype_digit($length)) { + $length .= 'px'; + } + $this->prependCSS($attr, $this->cssName . ":$length;"); + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Name.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Name.php new file mode 100644 index 0000000000000000000000000000000000000000..a874d0f7ae6748098dcb90814e927a4ab2b20a4f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Name.php @@ -0,0 +1,33 @@ +<?php + +/** + * Pre-transform that changes deprecated name attribute to ID if necessary + */ +class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform +{ + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + // Abort early if we're using relaxed definition of name + if ($config->get('HTML.Attr.Name.UseCDATA')) { + return $attr; + } + if (!isset($attr['name'])) { + return $attr; + } + $id = $this->confiscateAttr($attr, 'name'); + if (isset($attr['id'])) { + return $attr; + } + $attr['id'] = $id; + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/NameSync.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/NameSync.php new file mode 100644 index 0000000000000000000000000000000000000000..457f8110f0386a9a01dc73dbbb6c43238768eb6f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/NameSync.php @@ -0,0 +1,41 @@ +<?php + +/** + * Post-transform that performs validation to the name attribute; if + * it is present with an equivalent id attribute, it is passed through; + * otherwise validation is performed. + */ +class HTMLPurifier_AttrTransform_NameSync extends HTMLPurifier_AttrTransform +{ + + public function __construct() + { + $this->idDef = new HTMLPurifier_AttrDef_HTML_ID(); + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['name'])) { + return $attr; + } + $name = $attr['name']; + if (isset($attr['id']) && $attr['id'] === $name) { + return $attr; + } + $result = $this->idDef->validate($name, $config, $context); + if ($result === false) { + unset($attr['name']); + } else { + $attr['name'] = $result; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Nofollow.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Nofollow.php new file mode 100644 index 0000000000000000000000000000000000000000..25173c219fd00adaeb3d83e4c1b8ab2436b46cb1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Nofollow.php @@ -0,0 +1,52 @@ +<?php + +// must be called POST validation + +/** + * Adds rel="nofollow" to all outbound links. This transform is + * only attached if Attr.Nofollow is TRUE. + */ +class HTMLPurifier_AttrTransform_Nofollow extends HTMLPurifier_AttrTransform +{ + /** + * @type HTMLPurifier_URIParser + */ + private $parser; + + public function __construct() + { + $this->parser = new HTMLPurifier_URIParser(); + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['href'])) { + return $attr; + } + + // XXX Kind of inefficient + $url = $this->parser->parse($attr['href']); + $scheme = $url->getSchemeObj($config, $context); + + if ($scheme->browsable && !$url->isLocal($config, $context)) { + if (isset($attr['rel'])) { + $rels = explode(' ', $attr['rel']); + if (!in_array('nofollow', $rels)) { + $rels[] = 'nofollow'; + } + $attr['rel'] = implode(' ', $rels); + } else { + $attr['rel'] = 'nofollow'; + } + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeEmbed.php similarity index 54% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeEmbed.php index 4da449981fbd4b8f23992e317309ee46baaa347c..98ebf49bfb6079798db936d4191cd698fac0a1b6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeEmbed.php @@ -1,15 +1,25 @@ -<?php - -class HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTransform -{ - public $name = "SafeEmbed"; - - public function transform($attr, $config, $context) { - $attr['allowscriptaccess'] = 'never'; - $attr['allownetworking'] = 'internal'; - $attr['type'] = 'application/x-shockwave-flash'; - return $attr; - } -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTransform +{ + /** + * @type string + */ + public $name = "SafeEmbed"; + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + $attr['allowscriptaccess'] = 'never'; + $attr['allownetworking'] = 'internal'; + $attr['type'] = 'application/x-shockwave-flash'; + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeObject.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeObject.php new file mode 100644 index 0000000000000000000000000000000000000000..b71a8f9a5a9a544874d0f5ca5f7c12a06e7ffb40 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeObject.php @@ -0,0 +1,28 @@ +<?php + +/** + * Writes default type for all objects. Currently only supports flash. + */ +class HTMLPurifier_AttrTransform_SafeObject extends HTMLPurifier_AttrTransform +{ + /** + * @type string + */ + public $name = "SafeObject"; + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['type'])) { + $attr['type'] = 'application/x-shockwave-flash'; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeParam.php similarity index 55% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeParam.php index 94e8052a9d09f3d71575a6a1d21176031d4a9013..206644144c2a81e5467222f2cbe120e5179bf68f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/SafeParam.php @@ -1,50 +1,79 @@ -<?php - -/** - * Validates name/value pairs in param tags to be used in safe objects. This - * will only allow name values it recognizes, and pre-fill certain attributes - * with required values. - * - * @note - * This class only supports Flash. In the future, Quicktime support - * may be added. - * - * @warning - * This class expects an injector to add the necessary parameters tags. - */ -class HTMLPurifier_AttrTransform_SafeParam extends HTMLPurifier_AttrTransform -{ - public $name = "SafeParam"; - private $uri; - - public function __construct() { - $this->uri = new HTMLPurifier_AttrDef_URI(true); // embedded - } - - public function transform($attr, $config, $context) { - // If we add support for other objects, we'll need to alter the - // transforms. - switch ($attr['name']) { - // application/x-shockwave-flash - // Keep this synchronized with Injector/SafeObject.php - case 'allowScriptAccess': - $attr['value'] = 'never'; - break; - case 'allowNetworking': - $attr['value'] = 'internal'; - break; - case 'wmode': - $attr['value'] = 'window'; - break; - case 'movie': - $attr['value'] = $this->uri->validate($attr['value'], $config, $context); - break; - // add other cases to support other param name/value pairs - default: - $attr['name'] = $attr['value'] = null; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates name/value pairs in param tags to be used in safe objects. This + * will only allow name values it recognizes, and pre-fill certain attributes + * with required values. + * + * @note + * This class only supports Flash. In the future, Quicktime support + * may be added. + * + * @warning + * This class expects an injector to add the necessary parameters tags. + */ +class HTMLPurifier_AttrTransform_SafeParam extends HTMLPurifier_AttrTransform +{ + /** + * @type string + */ + public $name = "SafeParam"; + + /** + * @type HTMLPurifier_AttrDef_URI + */ + private $uri; + + public function __construct() + { + $this->uri = new HTMLPurifier_AttrDef_URI(true); // embedded + $this->wmode = new HTMLPurifier_AttrDef_Enum(array('window', 'opaque', 'transparent')); + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + // If we add support for other objects, we'll need to alter the + // transforms. + switch ($attr['name']) { + // application/x-shockwave-flash + // Keep this synchronized with Injector/SafeObject.php + case 'allowScriptAccess': + $attr['value'] = 'never'; + break; + case 'allowNetworking': + $attr['value'] = 'internal'; + break; + case 'allowFullScreen': + if ($config->get('HTML.FlashAllowFullScreen')) { + $attr['value'] = ($attr['value'] == 'true') ? 'true' : 'false'; + } else { + $attr['value'] = 'false'; + } + break; + case 'wmode': + $attr['value'] = $this->wmode->validate($attr['value'], $config, $context); + break; + case 'movie': + case 'src': + $attr['name'] = "movie"; + $attr['value'] = $this->uri->validate($attr['value'], $config, $context); + break; + case 'flashvars': + // we're going to allow arbitrary inputs to the SWF, on + // the reasoning that it could only hack the SWF, not us. + break; + // add other cases to support other param name/value pairs + default: + $attr['name'] = $attr['value'] = null; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ScriptRequired.php similarity index 56% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ScriptRequired.php index 4499050a22ac7fbb0012459ecbd04fe615560f47..49445b43f190d81e2b18dd4acd7438be8ee7eab2 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/ScriptRequired.php @@ -1,16 +1,23 @@ -<?php - -/** - * Implements required attribute stipulation for <script> - */ -class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_AttrTransform -{ - public function transform($attr, $config, $context) { - if (!isset($attr['type'])) { - $attr['type'] = 'text/javascript'; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Implements required attribute stipulation for <script> + */ +class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['type'])) { + $attr['type'] = 'text/javascript'; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetBlank.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetBlank.php new file mode 100644 index 0000000000000000000000000000000000000000..f66dcf8c4ee8d0ea1f7d54e3cc2e71059c4655b2 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetBlank.php @@ -0,0 +1,45 @@ +<?php + +// must be called POST validation + +/** + * Adds target="blank" to all outbound links. This transform is + * only attached if Attr.TargetBlank is TRUE. This works regardless + * of whether or not Attr.AllowedFrameTargets + */ +class HTMLPurifier_AttrTransform_TargetBlank extends HTMLPurifier_AttrTransform +{ + /** + * @type HTMLPurifier_URIParser + */ + private $parser; + + public function __construct() + { + $this->parser = new HTMLPurifier_URIParser(); + } + + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (!isset($attr['href'])) { + return $attr; + } + + // XXX Kind of inefficient + $url = $this->parser->parse($attr['href']); + $scheme = $url->getSchemeObj($config, $context); + + if ($scheme->browsable && !$url->isBenign($config, $context)) { + $attr['target'] = '_blank'; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoopener.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoopener.php new file mode 100644 index 0000000000000000000000000000000000000000..ab4c09721cd8506d4cff886b9b53e3938ad98a9d --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoopener.php @@ -0,0 +1,37 @@ +<?php + +// must be called POST validation + +/** + * Adds rel="noopener" to any links which target a different window + * than the current one. This is used to prevent malicious websites + * from silently replacing the original window, which could be used + * to do phishing. + * This transform is controlled by %HTML.TargetNoopener. + */ +class HTMLPurifier_AttrTransform_TargetNoopener extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (isset($attr['rel'])) { + $rels = explode(' ', $attr['rel']); + } else { + $rels = array(); + } + if (isset($attr['target']) && !in_array('noopener', $rels)) { + $rels[] = 'noopener'; + } + if (!empty($rels) || isset($attr['rel'])) { + $attr['rel'] = implode(' ', $rels); + } + + return $attr; + } +} + diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php new file mode 100644 index 0000000000000000000000000000000000000000..ec0030b94b210f85e06d5f09441d1642fa872c84 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php @@ -0,0 +1,37 @@ +<?php + +// must be called POST validation + +/** + * Adds rel="noreferrer" to any links which target a different window + * than the current one. This is used to prevent malicious websites + * from silently replacing the original window, which could be used + * to do phishing. + * This transform is controlled by %HTML.TargetNoreferrer. + */ +class HTMLPurifier_AttrTransform_TargetNoreferrer extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + if (isset($attr['rel'])) { + $rels = explode(' ', $attr['rel']); + } else { + $rels = array(); + } + if (isset($attr['target']) && !in_array('noreferrer', $rels)) { + $rels[] = 'noreferrer'; + } + if (!empty($rels) || isset($attr['rel'])) { + $attr['rel'] = implode(' ', $rels); + } + + return $attr; + } +} + diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Textarea.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Textarea.php new file mode 100644 index 0000000000000000000000000000000000000000..182fdda74f8e4e24e12d73a3048a1c584b0bac25 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTransform/Textarea.php @@ -0,0 +1,27 @@ +<?php + +/** + * Sets height/width defaults for <textarea> + */ +class HTMLPurifier_AttrTransform_Textarea extends HTMLPurifier_AttrTransform +{ + /** + * @param array $attr + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function transform($attr, $config, $context) + { + // Calculated from Firefox + if (!isset($attr['cols'])) { + $attr['cols'] = '22'; + } + if (!isset($attr['rows'])) { + $attr['rows'] = '3'; + } + return $attr; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrTypes.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTypes.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrTypes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrTypes.php index 6c624bb0ba6dc801d5212abe4088e2f0fd4e412e..7e8019bd0b3e3537926c0044ab58dfc66a838bfe 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrTypes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrTypes.php @@ -1,74 +1,96 @@ -<?php - -/** - * Provides lookup array of attribute types to HTMLPurifier_AttrDef objects - */ -class HTMLPurifier_AttrTypes -{ - /** - * Lookup array of attribute string identifiers to concrete implementations - */ - protected $info = array(); - - /** - * Constructs the info array, supplying default implementations for attribute - * types. - */ - public function __construct() { - // pseudo-types, must be instantiated via shorthand - $this->info['Enum'] = new HTMLPurifier_AttrDef_Enum(); - $this->info['Bool'] = new HTMLPurifier_AttrDef_HTML_Bool(); - - $this->info['CDATA'] = new HTMLPurifier_AttrDef_Text(); - $this->info['ID'] = new HTMLPurifier_AttrDef_HTML_ID(); - $this->info['Length'] = new HTMLPurifier_AttrDef_HTML_Length(); - $this->info['MultiLength'] = new HTMLPurifier_AttrDef_HTML_MultiLength(); - $this->info['NMTOKENS'] = new HTMLPurifier_AttrDef_HTML_Nmtokens(); - $this->info['Pixels'] = new HTMLPurifier_AttrDef_HTML_Pixels(); - $this->info['Text'] = new HTMLPurifier_AttrDef_Text(); - $this->info['URI'] = new HTMLPurifier_AttrDef_URI(); - $this->info['LanguageCode'] = new HTMLPurifier_AttrDef_Lang(); - $this->info['Color'] = new HTMLPurifier_AttrDef_HTML_Color(); - - // unimplemented aliases - $this->info['ContentType'] = new HTMLPurifier_AttrDef_Text(); - $this->info['ContentTypes'] = new HTMLPurifier_AttrDef_Text(); - $this->info['Charsets'] = new HTMLPurifier_AttrDef_Text(); - $this->info['Character'] = new HTMLPurifier_AttrDef_Text(); - - // number is really a positive integer (one or more digits) - // FIXME: ^^ not always, see start and value of list items - $this->info['Number'] = new HTMLPurifier_AttrDef_Integer(false, false, true); - } - - /** - * Retrieves a type - * @param $type String type name - * @return Object AttrDef for type - */ - public function get($type) { - - // determine if there is any extra info tacked on - if (strpos($type, '#') !== false) list($type, $string) = explode('#', $type, 2); - else $string = ''; - - if (!isset($this->info[$type])) { - trigger_error('Cannot retrieve undefined attribute type ' . $type, E_USER_ERROR); - return; - } - - return $this->info[$type]->make($string); - - } - - /** - * Sets a new implementation for a type - * @param $type String type name - * @param $impl Object AttrDef for type - */ - public function set($type, $impl) { - $this->info[$type] = $impl; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Provides lookup array of attribute types to HTMLPurifier_AttrDef objects + */ +class HTMLPurifier_AttrTypes +{ + /** + * Lookup array of attribute string identifiers to concrete implementations. + * @type HTMLPurifier_AttrDef[] + */ + protected $info = array(); + + /** + * Constructs the info array, supplying default implementations for attribute + * types. + */ + public function __construct() + { + // XXX This is kind of poor, since we don't actually /clone/ + // instances; instead, we use the supplied make() attribute. So, + // the underlying class must know how to deal with arguments. + // With the old implementation of Enum, that ignored its + // arguments when handling a make dispatch, the IAlign + // definition wouldn't work. + + // pseudo-types, must be instantiated via shorthand + $this->info['Enum'] = new HTMLPurifier_AttrDef_Enum(); + $this->info['Bool'] = new HTMLPurifier_AttrDef_HTML_Bool(); + + $this->info['CDATA'] = new HTMLPurifier_AttrDef_Text(); + $this->info['ID'] = new HTMLPurifier_AttrDef_HTML_ID(); + $this->info['Length'] = new HTMLPurifier_AttrDef_HTML_Length(); + $this->info['MultiLength'] = new HTMLPurifier_AttrDef_HTML_MultiLength(); + $this->info['NMTOKENS'] = new HTMLPurifier_AttrDef_HTML_Nmtokens(); + $this->info['Pixels'] = new HTMLPurifier_AttrDef_HTML_Pixels(); + $this->info['Text'] = new HTMLPurifier_AttrDef_Text(); + $this->info['URI'] = new HTMLPurifier_AttrDef_URI(); + $this->info['LanguageCode'] = new HTMLPurifier_AttrDef_Lang(); + $this->info['Color'] = new HTMLPurifier_AttrDef_HTML_Color(); + $this->info['IAlign'] = self::makeEnum('top,middle,bottom,left,right'); + $this->info['LAlign'] = self::makeEnum('top,bottom,left,right'); + $this->info['FrameTarget'] = new HTMLPurifier_AttrDef_HTML_FrameTarget(); + + // unimplemented aliases + $this->info['ContentType'] = new HTMLPurifier_AttrDef_Text(); + $this->info['ContentTypes'] = new HTMLPurifier_AttrDef_Text(); + $this->info['Charsets'] = new HTMLPurifier_AttrDef_Text(); + $this->info['Character'] = new HTMLPurifier_AttrDef_Text(); + + // "proprietary" types + $this->info['Class'] = new HTMLPurifier_AttrDef_HTML_Class(); + + // number is really a positive integer (one or more digits) + // FIXME: ^^ not always, see start and value of list items + $this->info['Number'] = new HTMLPurifier_AttrDef_Integer(false, false, true); + } + + private static function makeEnum($in) + { + return new HTMLPurifier_AttrDef_Clone(new HTMLPurifier_AttrDef_Enum(explode(',', $in))); + } + + /** + * Retrieves a type + * @param string $type String type name + * @return HTMLPurifier_AttrDef Object AttrDef for type + */ + public function get($type) + { + // determine if there is any extra info tacked on + if (strpos($type, '#') !== false) { + list($type, $string) = explode('#', $type, 2); + } else { + $string = ''; + } + + if (!isset($this->info[$type])) { + trigger_error('Cannot retrieve undefined attribute type ' . $type, E_USER_ERROR); + return; + } + return $this->info[$type]->make($string); + } + + /** + * Sets a new implementation for a type + * @param string $type String type name + * @param HTMLPurifier_AttrDef $impl Object AttrDef for type + */ + public function set($type, $impl) + { + $this->info[$type] = $impl; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/AttrValidator.php b/libraries/htmlpurifier410/library/HTMLPurifier/AttrValidator.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/AttrValidator.php rename to libraries/htmlpurifier410/library/HTMLPurifier/AttrValidator.php index 829a0f8f225e5f56125c2daafc8ad835d694065a..1a2b0b673e596facc12706c0955677154621eabf 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/AttrValidator.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/AttrValidator.php @@ -1,162 +1,178 @@ -<?php - -/** - * Validates the attributes of a token. Doesn't manage required attributes - * very well. The only reason we factored this out was because RemoveForeignElements - * also needed it besides ValidateAttributes. - */ -class HTMLPurifier_AttrValidator -{ - - /** - * Validates the attributes of a token, returning a modified token - * that has valid tokens - * @param $token Reference to token to validate. We require a reference - * because the operation this class performs on the token are - * not atomic, so the context CurrentToken to be updated - * throughout - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - */ - public function validateToken(&$token, &$config, $context) { - - $definition = $config->getHTMLDefinition(); - $e =& $context->get('ErrorCollector', true); - - // initialize IDAccumulator if necessary - $ok =& $context->get('IDAccumulator', true); - if (!$ok) { - $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); - $context->register('IDAccumulator', $id_accumulator); - } - - // initialize CurrentToken if necessary - $current_token =& $context->get('CurrentToken', true); - if (!$current_token) $context->register('CurrentToken', $token); - - if ( - !$token instanceof HTMLPurifier_Token_Start && - !$token instanceof HTMLPurifier_Token_Empty - ) return $token; - - // create alias to global definition array, see also $defs - // DEFINITION CALL - $d_defs = $definition->info_global_attr; - - // don't update token until the very end, to ensure an atomic update - $attr = $token->attr; - - // do global transformations (pre) - // nothing currently utilizes this - foreach ($definition->info_attr_transform_pre as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - - // do local transformations only applicable to this element (pre) - // ex. <p align="right"> to <p style="text-align:right;"> - foreach ($definition->info[$token->name]->attr_transform_pre as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - - // create alias to this element's attribute definition array, see - // also $d_defs (global attribute definition array) - // DEFINITION CALL - $defs = $definition->info[$token->name]->attr; - - $attr_key = false; - $context->register('CurrentAttr', $attr_key); - - // iterate through all the attribute keypairs - // Watch out for name collisions: $key has previously been used - foreach ($attr as $attr_key => $value) { - - // call the definition - if ( isset($defs[$attr_key]) ) { - // there is a local definition defined - if ($defs[$attr_key] === false) { - // We've explicitly been told not to allow this element. - // This is usually when there's a global definition - // that must be overridden. - // Theoretically speaking, we could have a - // AttrDef_DenyAll, but this is faster! - $result = false; - } else { - // validate according to the element's definition - $result = $defs[$attr_key]->validate( - $value, $config, $context - ); - } - } elseif ( isset($d_defs[$attr_key]) ) { - // there is a global definition defined, validate according - // to the global definition - $result = $d_defs[$attr_key]->validate( - $value, $config, $context - ); - } else { - // system never heard of the attribute? DELETE! - $result = false; - } - - // put the results into effect - if ($result === false || $result === null) { - // this is a generic error message that should replaced - // with more specific ones when possible - if ($e) $e->send(E_ERROR, 'AttrValidator: Attribute removed'); - - // remove the attribute - unset($attr[$attr_key]); - } elseif (is_string($result)) { - // generally, if a substitution is happening, there - // was some sort of implicit correction going on. We'll - // delegate it to the attribute classes to say exactly what. - - // simple substitution - $attr[$attr_key] = $result; - } else { - // nothing happens - } - - // we'd also want slightly more complicated substitution - // involving an array as the return value, - // although we're not sure how colliding attributes would - // resolve (certain ones would be completely overriden, - // others would prepend themselves). - } - - $context->destroy('CurrentAttr'); - - // post transforms - - // global (error reporting untested) - foreach ($definition->info_attr_transform_post as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - - // local (error reporting untested) - foreach ($definition->info[$token->name]->attr_transform_post as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - - $token->attr = $attr; - - // destroy CurrentToken if we made it ourselves - if (!$current_token) $context->destroy('CurrentToken'); - - } - - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates the attributes of a token. Doesn't manage required attributes + * very well. The only reason we factored this out was because RemoveForeignElements + * also needed it besides ValidateAttributes. + */ +class HTMLPurifier_AttrValidator +{ + + /** + * Validates the attributes of a token, mutating it as necessary. + * that has valid tokens + * @param HTMLPurifier_Token $token Token to validate. + * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config + * @param HTMLPurifier_Context $context Instance of HTMLPurifier_Context + */ + public function validateToken($token, $config, $context) + { + $definition = $config->getHTMLDefinition(); + $e =& $context->get('ErrorCollector', true); + + // initialize IDAccumulator if necessary + $ok =& $context->get('IDAccumulator', true); + if (!$ok) { + $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); + $context->register('IDAccumulator', $id_accumulator); + } + + // initialize CurrentToken if necessary + $current_token =& $context->get('CurrentToken', true); + if (!$current_token) { + $context->register('CurrentToken', $token); + } + + if (!$token instanceof HTMLPurifier_Token_Start && + !$token instanceof HTMLPurifier_Token_Empty + ) { + return; + } + + // create alias to global definition array, see also $defs + // DEFINITION CALL + $d_defs = $definition->info_global_attr; + + // don't update token until the very end, to ensure an atomic update + $attr = $token->attr; + + // do global transformations (pre) + // nothing currently utilizes this + foreach ($definition->info_attr_transform_pre as $transform) { + $attr = $transform->transform($o = $attr, $config, $context); + if ($e) { + if ($attr != $o) { + $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); + } + } + } + + // do local transformations only applicable to this element (pre) + // ex. <p align="right"> to <p style="text-align:right;"> + foreach ($definition->info[$token->name]->attr_transform_pre as $transform) { + $attr = $transform->transform($o = $attr, $config, $context); + if ($e) { + if ($attr != $o) { + $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); + } + } + } + + // create alias to this element's attribute definition array, see + // also $d_defs (global attribute definition array) + // DEFINITION CALL + $defs = $definition->info[$token->name]->attr; + + $attr_key = false; + $context->register('CurrentAttr', $attr_key); + + // iterate through all the attribute keypairs + // Watch out for name collisions: $key has previously been used + foreach ($attr as $attr_key => $value) { + + // call the definition + if (isset($defs[$attr_key])) { + // there is a local definition defined + if ($defs[$attr_key] === false) { + // We've explicitly been told not to allow this element. + // This is usually when there's a global definition + // that must be overridden. + // Theoretically speaking, we could have a + // AttrDef_DenyAll, but this is faster! + $result = false; + } else { + // validate according to the element's definition + $result = $defs[$attr_key]->validate( + $value, + $config, + $context + ); + } + } elseif (isset($d_defs[$attr_key])) { + // there is a global definition defined, validate according + // to the global definition + $result = $d_defs[$attr_key]->validate( + $value, + $config, + $context + ); + } else { + // system never heard of the attribute? DELETE! + $result = false; + } + + // put the results into effect + if ($result === false || $result === null) { + // this is a generic error message that should replaced + // with more specific ones when possible + if ($e) { + $e->send(E_ERROR, 'AttrValidator: Attribute removed'); + } + + // remove the attribute + unset($attr[$attr_key]); + } elseif (is_string($result)) { + // generally, if a substitution is happening, there + // was some sort of implicit correction going on. We'll + // delegate it to the attribute classes to say exactly what. + + // simple substitution + $attr[$attr_key] = $result; + } else { + // nothing happens + } + + // we'd also want slightly more complicated substitution + // involving an array as the return value, + // although we're not sure how colliding attributes would + // resolve (certain ones would be completely overriden, + // others would prepend themselves). + } + + $context->destroy('CurrentAttr'); + + // post transforms + + // global (error reporting untested) + foreach ($definition->info_attr_transform_post as $transform) { + $attr = $transform->transform($o = $attr, $config, $context); + if ($e) { + if ($attr != $o) { + $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); + } + } + } + + // local (error reporting untested) + foreach ($definition->info[$token->name]->attr_transform_post as $transform) { + $attr = $transform->transform($o = $attr, $config, $context); + if ($e) { + if ($attr != $o) { + $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); + } + } + } + + $token->attr = $attr; + + // destroy CurrentToken if we made it ourselves + if (!$current_token) { + $context->destroy('CurrentToken'); + } + + } + + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Bootstrap.php b/libraries/htmlpurifier410/library/HTMLPurifier/Bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..0ab0e341e785e9cea1d8845132851355a1f3a9ac --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Bootstrap.php @@ -0,0 +1,124 @@ +<?php + +// constants are slow, so we use as few as possible +if (!defined('HTMLPURIFIER_PREFIX')) { + define('HTMLPURIFIER_PREFIX', realpath(dirname(__FILE__) . '/..')); +} + +// accomodations for versions earlier than 5.0.2 +// borrowed from PHP_Compat, LGPL licensed, by Aidan Lister <aidan@php.net> +if (!defined('PHP_EOL')) { + switch (strtoupper(substr(PHP_OS, 0, 3))) { + case 'WIN': + define('PHP_EOL', "\r\n"); + break; + case 'DAR': + define('PHP_EOL', "\r"); + break; + default: + define('PHP_EOL', "\n"); + } +} + +/** + * Bootstrap class that contains meta-functionality for HTML Purifier such as + * the autoload function. + * + * @note + * This class may be used without any other files from HTML Purifier. + */ +class HTMLPurifier_Bootstrap +{ + + /** + * Autoload function for HTML Purifier + * @param string $class Class to load + * @return bool + */ + public static function autoload($class) + { + $file = HTMLPurifier_Bootstrap::getPath($class); + if (!$file) { + return false; + } + // Technically speaking, it should be ok and more efficient to + // just do 'require', but Antonio Parraga reports that with + // Zend extensions such as Zend debugger and APC, this invariant + // may be broken. Since we have efficient alternatives, pay + // the cost here and avoid the bug. + require_once HTMLPURIFIER_PREFIX . '/' . $file; + return true; + } + + /** + * Returns the path for a specific class. + * @param string $class Class path to get + * @return string + */ + public static function getPath($class) + { + if (strncmp('HTMLPurifier', $class, 12) !== 0) { + return false; + } + // Custom implementations + if (strncmp('HTMLPurifier_Language_', $class, 22) === 0) { + $code = str_replace('_', '-', substr($class, 22)); + $file = 'HTMLPurifier/Language/classes/' . $code . '.php'; + } else { + $file = str_replace('_', '/', $class) . '.php'; + } + if (!file_exists(HTMLPURIFIER_PREFIX . '/' . $file)) { + return false; + } + return $file; + } + + /** + * "Pre-registers" our autoloader on the SPL stack. + */ + public static function registerAutoload() + { + $autoload = array('HTMLPurifier_Bootstrap', 'autoload'); + if (($funcs = spl_autoload_functions()) === false) { + spl_autoload_register($autoload); + } elseif (function_exists('spl_autoload_unregister')) { + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + // prepend flag exists, no need for shenanigans + spl_autoload_register($autoload, true, true); + } else { + $buggy = version_compare(PHP_VERSION, '5.2.11', '<'); + $compat = version_compare(PHP_VERSION, '5.1.2', '<=') && + version_compare(PHP_VERSION, '5.1.0', '>='); + foreach ($funcs as $func) { + if ($buggy && is_array($func)) { + // :TRICKY: There are some compatibility issues and some + // places where we need to error out + $reflector = new ReflectionMethod($func[0], $func[1]); + if (!$reflector->isStatic()) { + throw new Exception( + 'HTML Purifier autoloader registrar is not compatible + with non-static object methods due to PHP Bug #44144; + Please do not use HTMLPurifier.autoload.php (or any + file that includes this file); instead, place the code: + spl_autoload_register(array(\'HTMLPurifier_Bootstrap\', \'autoload\')) + after your own autoloaders.' + ); + } + // Suprisingly, spl_autoload_register supports the + // Class::staticMethod callback format, although call_user_func doesn't + if ($compat) { + $func = implode('::', $func); + } + } + spl_autoload_unregister($func); + } + spl_autoload_register($autoload); + foreach ($funcs as $func) { + spl_autoload_register($func); + } + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/CSSDefinition.php b/libraries/htmlpurifier410/library/HTMLPurifier/CSSDefinition.php new file mode 100644 index 0000000000000000000000000000000000000000..5e7490eb2d6fdcb308274355e962b6f5d9d3d8d2 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/CSSDefinition.php @@ -0,0 +1,491 @@ +<?php + +/** + * Defines allowed CSS attributes and what their values are. + * @see HTMLPurifier_HTMLDefinition + */ +class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition +{ + + public $type = 'CSS'; + + /** + * Assoc array of attribute name to definition object. + * @type HTMLPurifier_AttrDef[] + */ + public $info = array(); + + /** + * Constructs the info array. The meat of this class. + * @param HTMLPurifier_Config $config + */ + protected function doSetup($config) + { + $this->info['text-align'] = new HTMLPurifier_AttrDef_Enum( + array('left', 'right', 'center', 'justify'), + false + ); + + $border_style = + $this->info['border-bottom-style'] = + $this->info['border-right-style'] = + $this->info['border-left-style'] = + $this->info['border-top-style'] = new HTMLPurifier_AttrDef_Enum( + array( + 'none', + 'hidden', + 'dotted', + 'dashed', + 'solid', + 'double', + 'groove', + 'ridge', + 'inset', + 'outset' + ), + false + ); + + $this->info['border-style'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_style); + + $this->info['clear'] = new HTMLPurifier_AttrDef_Enum( + array('none', 'left', 'right', 'both'), + false + ); + $this->info['float'] = new HTMLPurifier_AttrDef_Enum( + array('none', 'left', 'right'), + false + ); + $this->info['font-style'] = new HTMLPurifier_AttrDef_Enum( + array('normal', 'italic', 'oblique'), + false + ); + $this->info['font-variant'] = new HTMLPurifier_AttrDef_Enum( + array('normal', 'small-caps'), + false + ); + + $uri_or_none = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('none')), + new HTMLPurifier_AttrDef_CSS_URI() + ) + ); + + $this->info['list-style-position'] = new HTMLPurifier_AttrDef_Enum( + array('inside', 'outside'), + false + ); + $this->info['list-style-type'] = new HTMLPurifier_AttrDef_Enum( + array( + 'disc', + 'circle', + 'square', + 'decimal', + 'lower-roman', + 'upper-roman', + 'lower-alpha', + 'upper-alpha', + 'none' + ), + false + ); + $this->info['list-style-image'] = $uri_or_none; + + $this->info['list-style'] = new HTMLPurifier_AttrDef_CSS_ListStyle($config); + + $this->info['text-transform'] = new HTMLPurifier_AttrDef_Enum( + array('capitalize', 'uppercase', 'lowercase', 'none'), + false + ); + $this->info['color'] = new HTMLPurifier_AttrDef_CSS_Color(); + + $this->info['background-image'] = $uri_or_none; + $this->info['background-repeat'] = new HTMLPurifier_AttrDef_Enum( + array('repeat', 'repeat-x', 'repeat-y', 'no-repeat') + ); + $this->info['background-attachment'] = new HTMLPurifier_AttrDef_Enum( + array('scroll', 'fixed') + ); + $this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition(); + + $border_color = + $this->info['border-top-color'] = + $this->info['border-bottom-color'] = + $this->info['border-left-color'] = + $this->info['border-right-color'] = + $this->info['background-color'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('transparent')), + new HTMLPurifier_AttrDef_CSS_Color() + ) + ); + + $this->info['background'] = new HTMLPurifier_AttrDef_CSS_Background($config); + + $this->info['border-color'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_color); + + $border_width = + $this->info['border-top-width'] = + $this->info['border-bottom-width'] = + $this->info['border-left-width'] = + $this->info['border-right-width'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('thin', 'medium', 'thick')), + new HTMLPurifier_AttrDef_CSS_Length('0') //disallow negative + ) + ); + + $this->info['border-width'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_width); + + $this->info['letter-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('normal')), + new HTMLPurifier_AttrDef_CSS_Length() + ) + ); + + $this->info['word-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('normal')), + new HTMLPurifier_AttrDef_CSS_Length() + ) + ); + + $this->info['font-size'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum( + array( + 'xx-small', + 'x-small', + 'small', + 'medium', + 'large', + 'x-large', + 'xx-large', + 'larger', + 'smaller' + ) + ), + new HTMLPurifier_AttrDef_CSS_Percentage(), + new HTMLPurifier_AttrDef_CSS_Length() + ) + ); + + $this->info['line-height'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum(array('normal')), + new HTMLPurifier_AttrDef_CSS_Number(true), // no negatives + new HTMLPurifier_AttrDef_CSS_Length('0'), + new HTMLPurifier_AttrDef_CSS_Percentage(true) + ) + ); + + $margin = + $this->info['margin-top'] = + $this->info['margin-bottom'] = + $this->info['margin-left'] = + $this->info['margin-right'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length(), + new HTMLPurifier_AttrDef_CSS_Percentage(), + new HTMLPurifier_AttrDef_Enum(array('auto')) + ) + ); + + $this->info['margin'] = new HTMLPurifier_AttrDef_CSS_Multiple($margin); + + // non-negative + $padding = + $this->info['padding-top'] = + $this->info['padding-bottom'] = + $this->info['padding-left'] = + $this->info['padding-right'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length('0'), + new HTMLPurifier_AttrDef_CSS_Percentage(true) + ) + ); + + $this->info['padding'] = new HTMLPurifier_AttrDef_CSS_Multiple($padding); + + $this->info['text-indent'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length(), + new HTMLPurifier_AttrDef_CSS_Percentage() + ) + ); + + $trusted_wh = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length('0'), + new HTMLPurifier_AttrDef_CSS_Percentage(true), + new HTMLPurifier_AttrDef_Enum(array('auto')) + ) + ); + $max = $config->get('CSS.MaxImgLength'); + + $this->info['min-width'] = + $this->info['max-width'] = + $this->info['min-height'] = + $this->info['max-height'] = + $this->info['width'] = + $this->info['height'] = + $max === null ? + $trusted_wh : + new HTMLPurifier_AttrDef_Switch( + 'img', + // For img tags: + new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length('0', $max), + new HTMLPurifier_AttrDef_Enum(array('auto')) + ) + ), + // For everyone else: + $trusted_wh + ); + + $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration(); + + $this->info['font-family'] = new HTMLPurifier_AttrDef_CSS_FontFamily(); + + // this could use specialized code + $this->info['font-weight'] = new HTMLPurifier_AttrDef_Enum( + array( + 'normal', + 'bold', + 'bolder', + 'lighter', + '100', + '200', + '300', + '400', + '500', + '600', + '700', + '800', + '900' + ), + false + ); + + // MUST be called after other font properties, as it references + // a CSSDefinition object + $this->info['font'] = new HTMLPurifier_AttrDef_CSS_Font($config); + + // same here + $this->info['border'] = + $this->info['border-bottom'] = + $this->info['border-top'] = + $this->info['border-left'] = + $this->info['border-right'] = new HTMLPurifier_AttrDef_CSS_Border($config); + + $this->info['border-collapse'] = new HTMLPurifier_AttrDef_Enum( + array('collapse', 'separate') + ); + + $this->info['caption-side'] = new HTMLPurifier_AttrDef_Enum( + array('top', 'bottom') + ); + + $this->info['table-layout'] = new HTMLPurifier_AttrDef_Enum( + array('auto', 'fixed') + ); + + $this->info['vertical-align'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Enum( + array( + 'baseline', + 'sub', + 'super', + 'top', + 'text-top', + 'middle', + 'bottom', + 'text-bottom' + ) + ), + new HTMLPurifier_AttrDef_CSS_Length(), + new HTMLPurifier_AttrDef_CSS_Percentage() + ) + ); + + $this->info['border-spacing'] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2); + + // These CSS properties don't work on many browsers, but we live + // in THE FUTURE! + $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum( + array('nowrap', 'normal', 'pre', 'pre-wrap', 'pre-line') + ); + + if ($config->get('CSS.Proprietary')) { + $this->doSetupProprietary($config); + } + + if ($config->get('CSS.AllowTricky')) { + $this->doSetupTricky($config); + } + + if ($config->get('CSS.Trusted')) { + $this->doSetupTrusted($config); + } + + $allow_important = $config->get('CSS.AllowImportant'); + // wrap all attr-defs with decorator that handles !important + foreach ($this->info as $k => $v) { + $this->info[$k] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important); + } + + $this->setupConfigStuff($config); + } + + /** + * @param HTMLPurifier_Config $config + */ + protected function doSetupProprietary($config) + { + // Internet Explorer only scrollbar colors + $this->info['scrollbar-arrow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + $this->info['scrollbar-base-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + $this->info['scrollbar-darkshadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + $this->info['scrollbar-face-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); + + // vendor specific prefixes of opacity + $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + + // only opacity, for now + $this->info['filter'] = new HTMLPurifier_AttrDef_CSS_Filter(); + + // more CSS3 + $this->info['page-break-after'] = + $this->info['page-break-before'] = new HTMLPurifier_AttrDef_Enum( + array( + 'auto', + 'always', + 'avoid', + 'left', + 'right' + ) + ); + $this->info['page-break-inside'] = new HTMLPurifier_AttrDef_Enum(array('auto', 'avoid')); + + $border_radius = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Percentage(true), // disallow negative + new HTMLPurifier_AttrDef_CSS_Length('0') // disallow negative + )); + + $this->info['border-top-left-radius'] = + $this->info['border-top-right-radius'] = + $this->info['border-bottom-right-radius'] = + $this->info['border-bottom-left-radius'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_radius, 2); + // TODO: support SLASH syntax + $this->info['border-radius'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_radius, 4); + + } + + /** + * @param HTMLPurifier_Config $config + */ + protected function doSetupTricky($config) + { + $this->info['display'] = new HTMLPurifier_AttrDef_Enum( + array( + 'inline', + 'block', + 'list-item', + 'run-in', + 'compact', + 'marker', + 'table', + 'inline-block', + 'inline-table', + 'table-row-group', + 'table-header-group', + 'table-footer-group', + 'table-row', + 'table-column-group', + 'table-column', + 'table-cell', + 'table-caption', + 'none' + ) + ); + $this->info['visibility'] = new HTMLPurifier_AttrDef_Enum( + array('visible', 'hidden', 'collapse') + ); + $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll')); + $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + } + + /** + * @param HTMLPurifier_Config $config + */ + protected function doSetupTrusted($config) + { + $this->info['position'] = new HTMLPurifier_AttrDef_Enum( + array('static', 'relative', 'absolute', 'fixed') + ); + $this->info['top'] = + $this->info['left'] = + $this->info['right'] = + $this->info['bottom'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_CSS_Length(), + new HTMLPurifier_AttrDef_CSS_Percentage(), + new HTMLPurifier_AttrDef_Enum(array('auto')), + ) + ); + $this->info['z-index'] = new HTMLPurifier_AttrDef_CSS_Composite( + array( + new HTMLPurifier_AttrDef_Integer(), + new HTMLPurifier_AttrDef_Enum(array('auto')), + ) + ); + } + + /** + * Performs extra config-based processing. Based off of + * HTMLPurifier_HTMLDefinition. + * @param HTMLPurifier_Config $config + * @todo Refactor duplicate elements into common class (probably using + * composition, not inheritance). + */ + protected function setupConfigStuff($config) + { + // setup allowed elements + $support = "(for information on implementing this, see the " . + "support forums) "; + $allowed_properties = $config->get('CSS.AllowedProperties'); + if ($allowed_properties !== null) { + foreach ($this->info as $name => $d) { + if (!isset($allowed_properties[$name])) { + unset($this->info[$name]); + } + unset($allowed_properties[$name]); + } + // emit errors + foreach ($allowed_properties as $name => $d) { + // :TODO: Is this htmlspecialchars() call really necessary? + $name = htmlspecialchars($name); + trigger_error("Style attribute '$name' is not supported $support", E_USER_WARNING); + } + } + + $forbidden_properties = $config->get('CSS.ForbiddenProperties'); + if ($forbidden_properties !== null) { + foreach ($this->info as $name => $d) { + if (isset($forbidden_properties[$name])) { + unset($this->info[$name]); + } + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef.php similarity index 50% rename from libraries/htmlpurifier/library/HTMLPurifier/ChildDef.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ChildDef.php index c5d5216dab2d2c29b3b1d6be417a550dbf5b2345..5d64cd41a1a180aaf27ece99bee76644dc1a9e6e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef.php @@ -1,48 +1,52 @@ -<?php - -/** - * Defines allowed child nodes and validates tokens against it. - */ -abstract class HTMLPurifier_ChildDef -{ - /** - * Type of child definition, usually right-most part of class name lowercase. - * Used occasionally in terms of context. - */ - public $type; - - /** - * Bool that indicates whether or not an empty array of children is okay - * - * This is necessary for redundant checking when changes affecting - * a child node may cause a parent node to now be disallowed. - */ - public $allow_empty; - - /** - * Lookup array of all elements that this definition could possibly allow - */ - public $elements = array(); - - /** - * Get lookup of tag names that should not close this element automatically. - * All other elements will do so. - */ - public function getAllowedElements($config) { - return $this->elements; - } - - /** - * Validates nodes according to definition and returns modification. - * - * @param $tokens_of_children Array of HTMLPurifier_Token - * @param $config HTMLPurifier_Config object - * @param $context HTMLPurifier_Context object - * @return bool true to leave nodes as is - * @return bool false to remove parent node - * @return array of replacement child tokens - */ - abstract public function validateChildren($tokens_of_children, $config, $context); -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Defines allowed child nodes and validates nodes against it. + */ +abstract class HTMLPurifier_ChildDef +{ + /** + * Type of child definition, usually right-most part of class name lowercase. + * Used occasionally in terms of context. + * @type string + */ + public $type; + + /** + * Indicates whether or not an empty array of children is okay. + * + * This is necessary for redundant checking when changes affecting + * a child node may cause a parent node to now be disallowed. + * @type bool + */ + public $allow_empty; + + /** + * Lookup array of all elements that this definition could possibly allow. + * @type array + */ + public $elements = array(); + + /** + * Get lookup of tag names that should not close this element automatically. + * All other elements will do so. + * @param HTMLPurifier_Config $config HTMLPurifier_Config object + * @return array + */ + public function getAllowedElements($config) + { + return $this->elements; + } + + /** + * Validates nodes according to definition and returns modification. + * + * @param HTMLPurifier_Node[] $children Array of HTMLPurifier_Node + * @param HTMLPurifier_Config $config HTMLPurifier_Config object + * @param HTMLPurifier_Context $context HTMLPurifier_Context object + * @return bool|array true to leave nodes as is, false to remove parent node, array of replacement children + */ + abstract public function validateChildren($children, $config, $context); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Chameleon.php similarity index 55% rename from libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Chameleon.php index 15c364ee33c53bc36a0fddeb77bbb2eae0903d84..f6b2f22e5ab9e8685a6e0686e12025ae42cc0d3d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Chameleon.php @@ -1,48 +1,67 @@ -<?php - -/** - * Definition that uses different definitions depending on context. - * - * The del and ins tags are notable because they allow different types of - * elements depending on whether or not they're in a block or inline context. - * Chameleon allows this behavior to happen by using two different - * definitions depending on context. While this somewhat generalized, - * it is specifically intended for those two tags. - */ -class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef -{ - - /** - * Instance of the definition object to use when inline. Usually stricter. - */ - public $inline; - - /** - * Instance of the definition object to use when block. - */ - public $block; - - public $type = 'chameleon'; - - /** - * @param $inline List of elements to allow when inline. - * @param $block List of elements to allow when block. - */ - public function __construct($inline, $block) { - $this->inline = new HTMLPurifier_ChildDef_Optional($inline); - $this->block = new HTMLPurifier_ChildDef_Optional($block); - $this->elements = $this->block->elements; - } - - public function validateChildren($tokens_of_children, $config, $context) { - if ($context->get('IsInline') === false) { - return $this->block->validateChildren( - $tokens_of_children, $config, $context); - } else { - return $this->inline->validateChildren( - $tokens_of_children, $config, $context); - } - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Definition that uses different definitions depending on context. + * + * The del and ins tags are notable because they allow different types of + * elements depending on whether or not they're in a block or inline context. + * Chameleon allows this behavior to happen by using two different + * definitions depending on context. While this somewhat generalized, + * it is specifically intended for those two tags. + */ +class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef +{ + + /** + * Instance of the definition object to use when inline. Usually stricter. + * @type HTMLPurifier_ChildDef_Optional + */ + public $inline; + + /** + * Instance of the definition object to use when block. + * @type HTMLPurifier_ChildDef_Optional + */ + public $block; + + /** + * @type string + */ + public $type = 'chameleon'; + + /** + * @param array $inline List of elements to allow when inline. + * @param array $block List of elements to allow when block. + */ + public function __construct($inline, $block) + { + $this->inline = new HTMLPurifier_ChildDef_Optional($inline); + $this->block = new HTMLPurifier_ChildDef_Optional($block); + $this->elements = $this->block->elements; + } + + /** + * @param HTMLPurifier_Node[] $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function validateChildren($children, $config, $context) + { + if ($context->get('IsInline') === false) { + return $this->block->validateChildren( + $children, + $config, + $context + ); + } else { + return $this->inline->validateChildren( + $children, + $config, + $context + ); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Custom.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Custom.php index b68047b4b55f9f6e3564f06e11b038c6a154fe94..1047cd8e8b9427d89297bc302a625440adb86d6b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Custom.php @@ -1,90 +1,102 @@ -<?php - -/** - * Custom validation class, accepts DTD child definitions - * - * @warning Currently this class is an all or nothing proposition, that is, - * it will only give a bool return value. - */ -class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef -{ - public $type = 'custom'; - public $allow_empty = false; - /** - * Allowed child pattern as defined by the DTD - */ - public $dtd_regex; - /** - * PCRE regex derived from $dtd_regex - * @private - */ - private $_pcre_regex; - /** - * @param $dtd_regex Allowed child pattern from the DTD - */ - public function __construct($dtd_regex) { - $this->dtd_regex = $dtd_regex; - $this->_compileRegex(); - } - /** - * Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex) - */ - protected function _compileRegex() { - $raw = str_replace(' ', '', $this->dtd_regex); - if ($raw{0} != '(') { - $raw = "($raw)"; - } - $el = '[#a-zA-Z0-9_.-]+'; - $reg = $raw; - - // COMPLICATED! AND MIGHT BE BUGGY! I HAVE NO CLUE WHAT I'M - // DOING! Seriously: if there's problems, please report them. - - // collect all elements into the $elements array - preg_match_all("/$el/", $reg, $matches); - foreach ($matches[0] as $match) { - $this->elements[$match] = true; - } - - // setup all elements as parentheticals with leading commas - $reg = preg_replace("/$el/", '(,\\0)', $reg); - - // remove commas when they were not solicited - $reg = preg_replace("/([^,(|]\(+),/", '\\1', $reg); - - // remove all non-paranthetical commas: they are handled by first regex - $reg = preg_replace("/,\(/", '(', $reg); - - $this->_pcre_regex = $reg; - } - public function validateChildren($tokens_of_children, $config, $context) { - $list_of_children = ''; - $nesting = 0; // depth into the nest - foreach ($tokens_of_children as $token) { - if (!empty($token->is_whitespace)) continue; - - $is_child = ($nesting == 0); // direct - - if ($token instanceof HTMLPurifier_Token_Start) { - $nesting++; - } elseif ($token instanceof HTMLPurifier_Token_End) { - $nesting--; - } - - if ($is_child) { - $list_of_children .= $token->name . ','; - } - } - // add leading comma to deal with stray comma declarations - $list_of_children = ',' . rtrim($list_of_children, ','); - $okay = - preg_match( - '/^,?'.$this->_pcre_regex.'$/', - $list_of_children - ); - - return (bool) $okay; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Custom validation class, accepts DTD child definitions + * + * @warning Currently this class is an all or nothing proposition, that is, + * it will only give a bool return value. + */ +class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef +{ + /** + * @type string + */ + public $type = 'custom'; + + /** + * @type bool + */ + public $allow_empty = false; + + /** + * Allowed child pattern as defined by the DTD. + * @type string + */ + public $dtd_regex; + + /** + * PCRE regex derived from $dtd_regex. + * @type string + */ + private $_pcre_regex; + + /** + * @param $dtd_regex Allowed child pattern from the DTD + */ + public function __construct($dtd_regex) + { + $this->dtd_regex = $dtd_regex; + $this->_compileRegex(); + } + + /** + * Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex) + */ + protected function _compileRegex() + { + $raw = str_replace(' ', '', $this->dtd_regex); + if ($raw{0} != '(') { + $raw = "($raw)"; + } + $el = '[#a-zA-Z0-9_.-]+'; + $reg = $raw; + + // COMPLICATED! AND MIGHT BE BUGGY! I HAVE NO CLUE WHAT I'M + // DOING! Seriously: if there's problems, please report them. + + // collect all elements into the $elements array + preg_match_all("/$el/", $reg, $matches); + foreach ($matches[0] as $match) { + $this->elements[$match] = true; + } + + // setup all elements as parentheticals with leading commas + $reg = preg_replace("/$el/", '(,\\0)', $reg); + + // remove commas when they were not solicited + $reg = preg_replace("/([^,(|]\(+),/", '\\1', $reg); + + // remove all non-paranthetical commas: they are handled by first regex + $reg = preg_replace("/,\(/", '(', $reg); + + $this->_pcre_regex = $reg; + } + + /** + * @param HTMLPurifier_Node[] $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function validateChildren($children, $config, $context) + { + $list_of_children = ''; + $nesting = 0; // depth into the nest + foreach ($children as $node) { + if (!empty($node->is_whitespace)) { + continue; + } + $list_of_children .= $node->name . ','; + } + // add leading comma to deal with stray comma declarations + $list_of_children = ',' . rtrim($list_of_children, ','); + $okay = + preg_match( + '/^,?' . $this->_pcre_regex . '$/', + $list_of_children + ); + return (bool)$okay; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Empty.php similarity index 56% rename from libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Empty.php index 13171f6651dc87ff98353d66454162cdf6392574..bbcde56e8fef11e33e4660784179069485a0e32b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Empty.php @@ -1,20 +1,38 @@ -<?php - -/** - * Definition that disallows all elements. - * @warning validateChildren() in this class is actually never called, because - * empty elements are corrected in HTMLPurifier_Strategy_MakeWellFormed - * before child definitions are parsed in earnest by - * HTMLPurifier_Strategy_FixNesting. - */ -class HTMLPurifier_ChildDef_Empty extends HTMLPurifier_ChildDef -{ - public $allow_empty = true; - public $type = 'empty'; - public function __construct() {} - public function validateChildren($tokens_of_children, $config, $context) { - return array(); - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Definition that disallows all elements. + * @warning validateChildren() in this class is actually never called, because + * empty elements are corrected in HTMLPurifier_Strategy_MakeWellFormed + * before child definitions are parsed in earnest by + * HTMLPurifier_Strategy_FixNesting. + */ +class HTMLPurifier_ChildDef_Empty extends HTMLPurifier_ChildDef +{ + /** + * @type bool + */ + public $allow_empty = true; + + /** + * @type string + */ + public $type = 'empty'; + + public function __construct() + { + } + + /** + * @param HTMLPurifier_Node[] $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + return array(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/List.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/List.php new file mode 100644 index 0000000000000000000000000000000000000000..0ea90ac4bee80d3a772599c2fd512e5ae48ca4a8 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/List.php @@ -0,0 +1,92 @@ +<?php + +/** + * Definition for list containers ul and ol. + * + * What does this do? The big thing is to handle ol/ul at the top + * level of list nodes, which should be handled specially by /folding/ + * them into the previous list node. We generally shouldn't ever + * see other disallowed elements, because the autoclose behavior + * in MakeWellFormed handles it. + */ +class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef +{ + /** + * @type string + */ + public $type = 'list'; + /** + * @type array + */ + // lying a little bit, so that we can handle ul and ol ourselves + // XXX: This whole business with 'wrap' is all a bit unsatisfactory + public $elements = array('li' => true, 'ul' => true, 'ol' => true); + + /** + * @param array $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + // Flag for subclasses + $this->whitespace = false; + + // if there are no tokens, delete parent node + if (empty($children)) { + return false; + } + + // if li is not allowed, delete parent node + if (!isset($config->getHTMLDefinition()->info['li'])) { + trigger_error("Cannot allow ul/ol without allowing li", E_USER_WARNING); + return false; + } + + // the new set of children + $result = array(); + + // a little sanity check to make sure it's not ALL whitespace + $all_whitespace = true; + + $current_li = null; + + foreach ($children as $node) { + if (!empty($node->is_whitespace)) { + $result[] = $node; + continue; + } + $all_whitespace = false; // phew, we're not talking about whitespace + + if ($node->name === 'li') { + // good + $current_li = $node; + $result[] = $node; + } else { + // we want to tuck this into the previous li + // Invariant: we expect the node to be ol/ul + // ToDo: Make this more robust in the case of not ol/ul + // by distinguishing between existing li and li created + // to handle non-list elements; non-list elements should + // not be appended to an existing li; only li created + // for non-list. This distinction is not currently made. + if ($current_li === null) { + $current_li = new HTMLPurifier_Node_Element('li'); + $result[] = $current_li; + } + $current_li->children[] = $node; + $current_li->empty = false; // XXX fascinating! Check for this error elsewhere ToDo + } + } + if (empty($result)) { + return false; + } + if ($all_whitespace) { + return false; + } + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Optional.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Optional.php new file mode 100644 index 0000000000000000000000000000000000000000..1db864d907e6bf9a0ea3b53e25ef7ce558dfe465 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Optional.php @@ -0,0 +1,45 @@ +<?php + +/** + * Definition that allows a set of elements, and allows no children. + * @note This is a hack to reuse code from HTMLPurifier_ChildDef_Required, + * really, one shouldn't inherit from the other. Only altered behavior + * is to overload a returned false with an array. Thus, it will never + * return false. + */ +class HTMLPurifier_ChildDef_Optional extends HTMLPurifier_ChildDef_Required +{ + /** + * @type bool + */ + public $allow_empty = true; + + /** + * @type string + */ + public $type = 'optional'; + + /** + * @param array $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + $result = parent::validateChildren($children, $config, $context); + // we assume that $children is not modified + if ($result === false) { + if (empty($children)) { + return true; + } elseif ($this->whitespace) { + return $children; + } else { + return array(); + } + } + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Required.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Required.php new file mode 100644 index 0000000000000000000000000000000000000000..f6b8e8a2f0752c52654886c273ff294723950b1f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Required.php @@ -0,0 +1,118 @@ +<?php + +/** + * Definition that allows a set of elements, but disallows empty children. + */ +class HTMLPurifier_ChildDef_Required extends HTMLPurifier_ChildDef +{ + /** + * Lookup table of allowed elements. + * @type array + */ + public $elements = array(); + + /** + * Whether or not the last passed node was all whitespace. + * @type bool + */ + protected $whitespace = false; + + /** + * @param array|string $elements List of allowed element names (lowercase). + */ + public function __construct($elements) + { + if (is_string($elements)) { + $elements = str_replace(' ', '', $elements); + $elements = explode('|', $elements); + } + $keys = array_keys($elements); + if ($keys == array_keys($keys)) { + $elements = array_flip($elements); + foreach ($elements as $i => $x) { + $elements[$i] = true; + if (empty($i)) { + unset($elements[$i]); + } // remove blank + } + } + $this->elements = $elements; + } + + /** + * @type bool + */ + public $allow_empty = false; + + /** + * @type string + */ + public $type = 'required'; + + /** + * @param array $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + // Flag for subclasses + $this->whitespace = false; + + // if there are no tokens, delete parent node + if (empty($children)) { + return false; + } + + // the new set of children + $result = array(); + + // whether or not parsed character data is allowed + // this controls whether or not we silently drop a tag + // or generate escaped HTML from it + $pcdata_allowed = isset($this->elements['#PCDATA']); + + // a little sanity check to make sure it's not ALL whitespace + $all_whitespace = true; + + $stack = array_reverse($children); + while (!empty($stack)) { + $node = array_pop($stack); + if (!empty($node->is_whitespace)) { + $result[] = $node; + continue; + } + $all_whitespace = false; // phew, we're not talking about whitespace + + if (!isset($this->elements[$node->name])) { + // special case text + // XXX One of these ought to be redundant or something + if ($pcdata_allowed && $node instanceof HTMLPurifier_Node_Text) { + $result[] = $node; + continue; + } + // spill the child contents in + // ToDo: Make configurable + if ($node instanceof HTMLPurifier_Node_Element) { + for ($i = count($node->children) - 1; $i >= 0; $i--) { + $stack[] = $node->children[$i]; + } + continue; + } + continue; + } + $result[] = $node; + } + if (empty($result)) { + return false; + } + if ($all_whitespace) { + $this->whitespace = true; + return false; + } + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/StrictBlockquote.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/StrictBlockquote.php new file mode 100644 index 0000000000000000000000000000000000000000..38bf9533eb5add6dd4ba4776c891323a01def17a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/StrictBlockquote.php @@ -0,0 +1,110 @@ +<?php + +/** + * Takes the contents of blockquote when in strict and reformats for validation. + */ +class HTMLPurifier_ChildDef_StrictBlockquote extends HTMLPurifier_ChildDef_Required +{ + /** + * @type array + */ + protected $real_elements; + + /** + * @type array + */ + protected $fake_elements; + + /** + * @type bool + */ + public $allow_empty = true; + + /** + * @type string + */ + public $type = 'strictblockquote'; + + /** + * @type bool + */ + protected $init = false; + + /** + * @param HTMLPurifier_Config $config + * @return array + * @note We don't want MakeWellFormed to auto-close inline elements since + * they might be allowed. + */ + public function getAllowedElements($config) + { + $this->init($config); + return $this->fake_elements; + } + + /** + * @param array $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + $this->init($config); + + // trick the parent class into thinking it allows more + $this->elements = $this->fake_elements; + $result = parent::validateChildren($children, $config, $context); + $this->elements = $this->real_elements; + + if ($result === false) { + return array(); + } + if ($result === true) { + $result = $children; + } + + $def = $config->getHTMLDefinition(); + $block_wrap_name = $def->info_block_wrapper; + $block_wrap = false; + $ret = array(); + + foreach ($result as $node) { + if ($block_wrap === false) { + if (($node instanceof HTMLPurifier_Node_Text && !$node->is_whitespace) || + ($node instanceof HTMLPurifier_Node_Element && !isset($this->elements[$node->name]))) { + $block_wrap = new HTMLPurifier_Node_Element($def->info_block_wrapper); + $ret[] = $block_wrap; + } + } else { + if ($node instanceof HTMLPurifier_Node_Element && isset($this->elements[$node->name])) { + $block_wrap = false; + + } + } + if ($block_wrap) { + $block_wrap->children[] = $node; + } else { + $ret[] = $node; + } + } + return $ret; + } + + /** + * @param HTMLPurifier_Config $config + */ + private function init($config) + { + if (!$this->init) { + $def = $config->getHTMLDefinition(); + // allow all inline elements + $this->real_elements = $this->elements; + $this->fake_elements = $def->info_content_sets['Flow']; + $this->fake_elements['#PCDATA'] = true; + $this->init = true; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Table.php b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Table.php new file mode 100644 index 0000000000000000000000000000000000000000..9b12c928039b973d77e4b5814d898f2cdc0fc2a4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ChildDef/Table.php @@ -0,0 +1,224 @@ +<?php + +/** + * Definition for tables. The general idea is to extract out all of the + * essential bits, and then reconstruct it later. + * + * This is a bit confusing, because the DTDs and the W3C + * validators seem to disagree on the appropriate definition. The + * DTD claims: + * + * (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+) + * + * But actually, the HTML4 spec then has this to say: + * + * The TBODY start tag is always required except when the table + * contains only one table body and no table head or foot sections. + * The TBODY end tag may always be safely omitted. + * + * So the DTD is kind of wrong. The validator is, unfortunately, kind + * of on crack. + * + * The definition changed again in XHTML1.1; and in my opinion, this + * formulation makes the most sense. + * + * caption?, ( col* | colgroup* ), (( thead?, tfoot?, tbody+ ) | ( tr+ )) + * + * Essentially, we have two modes: thead/tfoot/tbody mode, and tr mode. + * If we encounter a thead, tfoot or tbody, we are placed in the former + * mode, and we *must* wrap any stray tr segments with a tbody. But if + * we don't run into any of them, just have tr tags is OK. + */ +class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef +{ + /** + * @type bool + */ + public $allow_empty = false; + + /** + * @type string + */ + public $type = 'table'; + + /** + * @type array + */ + public $elements = array( + 'tr' => true, + 'tbody' => true, + 'thead' => true, + 'tfoot' => true, + 'caption' => true, + 'colgroup' => true, + 'col' => true + ); + + public function __construct() + { + } + + /** + * @param array $children + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array + */ + public function validateChildren($children, $config, $context) + { + if (empty($children)) { + return false; + } + + // only one of these elements is allowed in a table + $caption = false; + $thead = false; + $tfoot = false; + + // whitespace + $initial_ws = array(); + $after_caption_ws = array(); + $after_thead_ws = array(); + $after_tfoot_ws = array(); + + // as many of these as you want + $cols = array(); + $content = array(); + + $tbody_mode = false; // if true, then we need to wrap any stray + // <tr>s with a <tbody>. + + $ws_accum =& $initial_ws; + + foreach ($children as $node) { + if ($node instanceof HTMLPurifier_Node_Comment) { + $ws_accum[] = $node; + continue; + } + switch ($node->name) { + case 'tbody': + $tbody_mode = true; + // fall through + case 'tr': + $content[] = $node; + $ws_accum =& $content; + break; + case 'caption': + // there can only be one caption! + if ($caption !== false) break; + $caption = $node; + $ws_accum =& $after_caption_ws; + break; + case 'thead': + $tbody_mode = true; + // XXX This breaks rendering properties with + // Firefox, which never floats a <thead> to + // the top. Ever. (Our scheme will float the + // first <thead> to the top.) So maybe + // <thead>s that are not first should be + // turned into <tbody>? Very tricky, indeed. + if ($thead === false) { + $thead = $node; + $ws_accum =& $after_thead_ws; + } else { + // Oops, there's a second one! What + // should we do? Current behavior is to + // transmutate the first and last entries into + // tbody tags, and then put into content. + // Maybe a better idea is to *attach + // it* to the existing thead or tfoot? + // We don't do this, because Firefox + // doesn't float an extra tfoot to the + // bottom like it does for the first one. + $node->name = 'tbody'; + $content[] = $node; + $ws_accum =& $content; + } + break; + case 'tfoot': + // see above for some aveats + $tbody_mode = true; + if ($tfoot === false) { + $tfoot = $node; + $ws_accum =& $after_tfoot_ws; + } else { + $node->name = 'tbody'; + $content[] = $node; + $ws_accum =& $content; + } + break; + case 'colgroup': + case 'col': + $cols[] = $node; + $ws_accum =& $cols; + break; + case '#PCDATA': + // How is whitespace handled? We treat is as sticky to + // the *end* of the previous element. So all of the + // nonsense we have worked on is to keep things + // together. + if (!empty($node->is_whitespace)) { + $ws_accum[] = $node; + } + break; + } + } + + if (empty($content)) { + return false; + } + + $ret = $initial_ws; + if ($caption !== false) { + $ret[] = $caption; + $ret = array_merge($ret, $after_caption_ws); + } + if ($cols !== false) { + $ret = array_merge($ret, $cols); + } + if ($thead !== false) { + $ret[] = $thead; + $ret = array_merge($ret, $after_thead_ws); + } + if ($tfoot !== false) { + $ret[] = $tfoot; + $ret = array_merge($ret, $after_tfoot_ws); + } + + if ($tbody_mode) { + // we have to shuffle tr into tbody + $current_tr_tbody = null; + + foreach($content as $node) { + switch ($node->name) { + case 'tbody': + $current_tr_tbody = null; + $ret[] = $node; + break; + case 'tr': + if ($current_tr_tbody === null) { + $current_tr_tbody = new HTMLPurifier_Node_Element('tbody'); + $ret[] = $current_tr_tbody; + } + $current_tr_tbody->children[] = $node; + break; + case '#PCDATA': + //assert($node->is_whitespace); + if ($current_tr_tbody === null) { + $ret[] = $node; + } else { + $current_tr_tbody->children[] = $node; + } + break; + } + } + } else { + $ret = array_merge($ret, $content); + } + + return $ret; + + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Config.php b/libraries/htmlpurifier410/library/HTMLPurifier/Config.php new file mode 100644 index 0000000000000000000000000000000000000000..0d89bc208cda781bd17d8a73a2122247d969d414 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Config.php @@ -0,0 +1,920 @@ +<?php + +/** + * Configuration object that triggers customizable behavior. + * + * @warning This class is strongly defined: that means that the class + * will fail if an undefined directive is retrieved or set. + * + * @note Many classes that could (although many times don't) use the + * configuration object make it a mandatory parameter. This is + * because a configuration object should always be forwarded, + * otherwise, you run the risk of missing a parameter and then + * being stumped when a configuration directive doesn't work. + * + * @todo Reconsider some of the public member variables + */ +class HTMLPurifier_Config +{ + + /** + * HTML Purifier's version + * @type string + */ + public $version = '4.10.0'; + + /** + * Whether or not to automatically finalize + * the object if a read operation is done. + * @type bool + */ + public $autoFinalize = true; + + // protected member variables + + /** + * Namespace indexed array of serials for specific namespaces. + * @see getSerial() for more info. + * @type string[] + */ + protected $serials = array(); + + /** + * Serial for entire configuration object. + * @type string + */ + protected $serial; + + /** + * Parser for variables. + * @type HTMLPurifier_VarParser_Flexible + */ + protected $parser = null; + + /** + * Reference HTMLPurifier_ConfigSchema for value checking. + * @type HTMLPurifier_ConfigSchema + * @note This is public for introspective purposes. Please don't + * abuse! + */ + public $def; + + /** + * Indexed array of definitions. + * @type HTMLPurifier_Definition[] + */ + protected $definitions; + + /** + * Whether or not config is finalized. + * @type bool + */ + protected $finalized = false; + + /** + * Property list containing configuration directives. + * @type array + */ + protected $plist; + + /** + * Whether or not a set is taking place due to an alias lookup. + * @type bool + */ + private $aliasMode; + + /** + * Set to false if you do not want line and file numbers in errors. + * (useful when unit testing). This will also compress some errors + * and exceptions. + * @type bool + */ + public $chatty = true; + + /** + * Current lock; only gets to this namespace are allowed. + * @type string + */ + private $lock; + + /** + * Constructor + * @param HTMLPurifier_ConfigSchema $definition ConfigSchema that defines + * what directives are allowed. + * @param HTMLPurifier_PropertyList $parent + */ + public function __construct($definition, $parent = null) + { + $parent = $parent ? $parent : $definition->defaultPlist; + $this->plist = new HTMLPurifier_PropertyList($parent); + $this->def = $definition; // keep a copy around for checking + $this->parser = new HTMLPurifier_VarParser_Flexible(); + } + + /** + * Convenience constructor that creates a config object based on a mixed var + * @param mixed $config Variable that defines the state of the config + * object. Can be: a HTMLPurifier_Config() object, + * an array of directives based on loadArray(), + * or a string filename of an ini file. + * @param HTMLPurifier_ConfigSchema $schema Schema object + * @return HTMLPurifier_Config Configured object + */ + public static function create($config, $schema = null) + { + if ($config instanceof HTMLPurifier_Config) { + // pass-through + return $config; + } + if (!$schema) { + $ret = HTMLPurifier_Config::createDefault(); + } else { + $ret = new HTMLPurifier_Config($schema); + } + if (is_string($config)) { + $ret->loadIni($config); + } elseif (is_array($config)) $ret->loadArray($config); + return $ret; + } + + /** + * Creates a new config object that inherits from a previous one. + * @param HTMLPurifier_Config $config Configuration object to inherit from. + * @return HTMLPurifier_Config object with $config as its parent. + */ + public static function inherit(HTMLPurifier_Config $config) + { + return new HTMLPurifier_Config($config->def, $config->plist); + } + + /** + * Convenience constructor that creates a default configuration object. + * @return HTMLPurifier_Config default object. + */ + public static function createDefault() + { + $definition = HTMLPurifier_ConfigSchema::instance(); + $config = new HTMLPurifier_Config($definition); + return $config; + } + + /** + * Retrieves a value from the configuration. + * + * @param string $key String key + * @param mixed $a + * + * @return mixed + */ + public function get($key, $a = null) + { + if ($a !== null) { + $this->triggerError( + "Using deprecated API: use \$config->get('$key.$a') instead", + E_USER_WARNING + ); + $key = "$key.$a"; + } + if (!$this->finalized) { + $this->autoFinalize(); + } + if (!isset($this->def->info[$key])) { + // can't add % due to SimpleTest bug + $this->triggerError( + 'Cannot retrieve value of undefined directive ' . htmlspecialchars($key), + E_USER_WARNING + ); + return; + } + if (isset($this->def->info[$key]->isAlias)) { + $d = $this->def->info[$key]; + $this->triggerError( + 'Cannot get value from aliased directive, use real name ' . $d->key, + E_USER_ERROR + ); + return; + } + if ($this->lock) { + list($ns) = explode('.', $key); + if ($ns !== $this->lock) { + $this->triggerError( + 'Cannot get value of namespace ' . $ns . ' when lock for ' . + $this->lock . + ' is active, this probably indicates a Definition setup method ' . + 'is accessing directives that are not within its namespace', + E_USER_ERROR + ); + return; + } + } + return $this->plist->get($key); + } + + /** + * Retrieves an array of directives to values from a given namespace + * + * @param string $namespace String namespace + * + * @return array + */ + public function getBatch($namespace) + { + if (!$this->finalized) { + $this->autoFinalize(); + } + $full = $this->getAll(); + if (!isset($full[$namespace])) { + $this->triggerError( + 'Cannot retrieve undefined namespace ' . + htmlspecialchars($namespace), + E_USER_WARNING + ); + return; + } + return $full[$namespace]; + } + + /** + * Returns a SHA-1 signature of a segment of the configuration object + * that uniquely identifies that particular configuration + * + * @param string $namespace Namespace to get serial for + * + * @return string + * @note Revision is handled specially and is removed from the batch + * before processing! + */ + public function getBatchSerial($namespace) + { + if (empty($this->serials[$namespace])) { + $batch = $this->getBatch($namespace); + unset($batch['DefinitionRev']); + $this->serials[$namespace] = sha1(serialize($batch)); + } + return $this->serials[$namespace]; + } + + /** + * Returns a SHA-1 signature for the entire configuration object + * that uniquely identifies that particular configuration + * + * @return string + */ + public function getSerial() + { + if (empty($this->serial)) { + $this->serial = sha1(serialize($this->getAll())); + } + return $this->serial; + } + + /** + * Retrieves all directives, organized by namespace + * + * @warning This is a pretty inefficient function, avoid if you can + */ + public function getAll() + { + if (!$this->finalized) { + $this->autoFinalize(); + } + $ret = array(); + foreach ($this->plist->squash() as $name => $value) { + list($ns, $key) = explode('.', $name, 2); + $ret[$ns][$key] = $value; + } + return $ret; + } + + /** + * Sets a value to configuration. + * + * @param string $key key + * @param mixed $value value + * @param mixed $a + */ + public function set($key, $value, $a = null) + { + if (strpos($key, '.') === false) { + $namespace = $key; + $directive = $value; + $value = $a; + $key = "$key.$directive"; + $this->triggerError("Using deprecated API: use \$config->set('$key', ...) instead", E_USER_NOTICE); + } else { + list($namespace) = explode('.', $key); + } + if ($this->isFinalized('Cannot set directive after finalization')) { + return; + } + if (!isset($this->def->info[$key])) { + $this->triggerError( + 'Cannot set undefined directive ' . htmlspecialchars($key) . ' to value', + E_USER_WARNING + ); + return; + } + $def = $this->def->info[$key]; + + if (isset($def->isAlias)) { + if ($this->aliasMode) { + $this->triggerError( + 'Double-aliases not allowed, please fix '. + 'ConfigSchema bug with' . $key, + E_USER_ERROR + ); + return; + } + $this->aliasMode = true; + $this->set($def->key, $value); + $this->aliasMode = false; + $this->triggerError("$key is an alias, preferred directive name is {$def->key}", E_USER_NOTICE); + return; + } + + // Raw type might be negative when using the fully optimized form + // of stdClass, which indicates allow_null == true + $rtype = is_int($def) ? $def : $def->type; + if ($rtype < 0) { + $type = -$rtype; + $allow_null = true; + } else { + $type = $rtype; + $allow_null = isset($def->allow_null); + } + + try { + $value = $this->parser->parse($value, $type, $allow_null); + } catch (HTMLPurifier_VarParserException $e) { + $this->triggerError( + 'Value for ' . $key . ' is of invalid type, should be ' . + HTMLPurifier_VarParser::getTypeName($type), + E_USER_WARNING + ); + return; + } + if (is_string($value) && is_object($def)) { + // resolve value alias if defined + if (isset($def->aliases[$value])) { + $value = $def->aliases[$value]; + } + // check to see if the value is allowed + if (isset($def->allowed) && !isset($def->allowed[$value])) { + $this->triggerError( + 'Value not supported, valid values are: ' . + $this->_listify($def->allowed), + E_USER_WARNING + ); + return; + } + } + $this->plist->set($key, $value); + + // reset definitions if the directives they depend on changed + // this is a very costly process, so it's discouraged + // with finalization + if ($namespace == 'HTML' || $namespace == 'CSS' || $namespace == 'URI') { + $this->definitions[$namespace] = null; + } + + $this->serials[$namespace] = false; + } + + /** + * Convenience function for error reporting + * + * @param array $lookup + * + * @return string + */ + private function _listify($lookup) + { + $list = array(); + foreach ($lookup as $name => $b) { + $list[] = $name; + } + return implode(', ', $list); + } + + /** + * Retrieves object reference to the HTML definition. + * + * @param bool $raw Return a copy that has not been setup yet. Must be + * called before it's been setup, otherwise won't work. + * @param bool $optimized If true, this method may return null, to + * indicate that a cached version of the modified + * definition object is available and no further edits + * are necessary. Consider using + * maybeGetRawHTMLDefinition, which is more explicitly + * named, instead. + * + * @return HTMLPurifier_HTMLDefinition + */ + public function getHTMLDefinition($raw = false, $optimized = false) + { + return $this->getDefinition('HTML', $raw, $optimized); + } + + /** + * Retrieves object reference to the CSS definition + * + * @param bool $raw Return a copy that has not been setup yet. Must be + * called before it's been setup, otherwise won't work. + * @param bool $optimized If true, this method may return null, to + * indicate that a cached version of the modified + * definition object is available and no further edits + * are necessary. Consider using + * maybeGetRawCSSDefinition, which is more explicitly + * named, instead. + * + * @return HTMLPurifier_CSSDefinition + */ + public function getCSSDefinition($raw = false, $optimized = false) + { + return $this->getDefinition('CSS', $raw, $optimized); + } + + /** + * Retrieves object reference to the URI definition + * + * @param bool $raw Return a copy that has not been setup yet. Must be + * called before it's been setup, otherwise won't work. + * @param bool $optimized If true, this method may return null, to + * indicate that a cached version of the modified + * definition object is available and no further edits + * are necessary. Consider using + * maybeGetRawURIDefinition, which is more explicitly + * named, instead. + * + * @return HTMLPurifier_URIDefinition + */ + public function getURIDefinition($raw = false, $optimized = false) + { + return $this->getDefinition('URI', $raw, $optimized); + } + + /** + * Retrieves a definition + * + * @param string $type Type of definition: HTML, CSS, etc + * @param bool $raw Whether or not definition should be returned raw + * @param bool $optimized Only has an effect when $raw is true. Whether + * or not to return null if the result is already present in + * the cache. This is off by default for backwards + * compatibility reasons, but you need to do things this + * way in order to ensure that caching is done properly. + * Check out enduser-customize.html for more details. + * We probably won't ever change this default, as much as the + * maybe semantics is the "right thing to do." + * + * @throws HTMLPurifier_Exception + * @return HTMLPurifier_Definition + */ + public function getDefinition($type, $raw = false, $optimized = false) + { + if ($optimized && !$raw) { + throw new HTMLPurifier_Exception("Cannot set optimized = true when raw = false"); + } + if (!$this->finalized) { + $this->autoFinalize(); + } + // temporarily suspend locks, so we can handle recursive definition calls + $lock = $this->lock; + $this->lock = null; + $factory = HTMLPurifier_DefinitionCacheFactory::instance(); + $cache = $factory->create($type, $this); + $this->lock = $lock; + if (!$raw) { + // full definition + // --------------- + // check if definition is in memory + if (!empty($this->definitions[$type])) { + $def = $this->definitions[$type]; + // check if the definition is setup + if ($def->setup) { + return $def; + } else { + $def->setup($this); + if ($def->optimized) { + $cache->add($def, $this); + } + return $def; + } + } + // check if definition is in cache + $def = $cache->get($this); + if ($def) { + // definition in cache, save to memory and return it + $this->definitions[$type] = $def; + return $def; + } + // initialize it + $def = $this->initDefinition($type); + // set it up + $this->lock = $type; + $def->setup($this); + $this->lock = null; + // save in cache + $cache->add($def, $this); + // return it + return $def; + } else { + // raw definition + // -------------- + // check preconditions + $def = null; + if ($optimized) { + if (is_null($this->get($type . '.DefinitionID'))) { + // fatally error out if definition ID not set + throw new HTMLPurifier_Exception( + "Cannot retrieve raw version without specifying %$type.DefinitionID" + ); + } + } + if (!empty($this->definitions[$type])) { + $def = $this->definitions[$type]; + if ($def->setup && !$optimized) { + $extra = $this->chatty ? + " (try moving this code block earlier in your initialization)" : + ""; + throw new HTMLPurifier_Exception( + "Cannot retrieve raw definition after it has already been setup" . + $extra + ); + } + if ($def->optimized === null) { + $extra = $this->chatty ? " (try flushing your cache)" : ""; + throw new HTMLPurifier_Exception( + "Optimization status of definition is unknown" . $extra + ); + } + if ($def->optimized !== $optimized) { + $msg = $optimized ? "optimized" : "unoptimized"; + $extra = $this->chatty ? + " (this backtrace is for the first inconsistent call, which was for a $msg raw definition)" + : ""; + throw new HTMLPurifier_Exception( + "Inconsistent use of optimized and unoptimized raw definition retrievals" . $extra + ); + } + } + // check if definition was in memory + if ($def) { + if ($def->setup) { + // invariant: $optimized === true (checked above) + return null; + } else { + return $def; + } + } + // if optimized, check if definition was in cache + // (because we do the memory check first, this formulation + // is prone to cache slamming, but I think + // guaranteeing that either /all/ of the raw + // setup code or /none/ of it is run is more important.) + if ($optimized) { + // This code path only gets run once; once we put + // something in $definitions (which is guaranteed by the + // trailing code), we always short-circuit above. + $def = $cache->get($this); + if ($def) { + // save the full definition for later, but don't + // return it yet + $this->definitions[$type] = $def; + return null; + } + } + // check invariants for creation + if (!$optimized) { + if (!is_null($this->get($type . '.DefinitionID'))) { + if ($this->chatty) { + $this->triggerError( + 'Due to a documentation error in previous version of HTML Purifier, your ' . + 'definitions are not being cached. If this is OK, you can remove the ' . + '%$type.DefinitionRev and %$type.DefinitionID declaration. Otherwise, ' . + 'modify your code to use maybeGetRawDefinition, and test if the returned ' . + 'value is null before making any edits (if it is null, that means that a ' . + 'cached version is available, and no raw operations are necessary). See ' . + '<a href="http://htmlpurifier.org/docs/enduser-customize.html#optimized">' . + 'Customize</a> for more details', + E_USER_WARNING + ); + } else { + $this->triggerError( + "Useless DefinitionID declaration", + E_USER_WARNING + ); + } + } + } + // initialize it + $def = $this->initDefinition($type); + $def->optimized = $optimized; + return $def; + } + throw new HTMLPurifier_Exception("The impossible happened!"); + } + + /** + * Initialise definition + * + * @param string $type What type of definition to create + * + * @return HTMLPurifier_CSSDefinition|HTMLPurifier_HTMLDefinition|HTMLPurifier_URIDefinition + * @throws HTMLPurifier_Exception + */ + private function initDefinition($type) + { + // quick checks failed, let's create the object + if ($type == 'HTML') { + $def = new HTMLPurifier_HTMLDefinition(); + } elseif ($type == 'CSS') { + $def = new HTMLPurifier_CSSDefinition(); + } elseif ($type == 'URI') { + $def = new HTMLPurifier_URIDefinition(); + } else { + throw new HTMLPurifier_Exception( + "Definition of $type type not supported" + ); + } + $this->definitions[$type] = $def; + return $def; + } + + public function maybeGetRawDefinition($name) + { + return $this->getDefinition($name, true, true); + } + + /** + * @return HTMLPurifier_HTMLDefinition + */ + public function maybeGetRawHTMLDefinition() + { + return $this->getDefinition('HTML', true, true); + } + + /** + * @return HTMLPurifier_CSSDefinition + */ + public function maybeGetRawCSSDefinition() + { + return $this->getDefinition('CSS', true, true); + } + + /** + * @return HTMLPurifier_URIDefinition + */ + public function maybeGetRawURIDefinition() + { + return $this->getDefinition('URI', true, true); + } + + /** + * Loads configuration values from an array with the following structure: + * Namespace.Directive => Value + * + * @param array $config_array Configuration associative array + */ + public function loadArray($config_array) + { + if ($this->isFinalized('Cannot load directives after finalization')) { + return; + } + foreach ($config_array as $key => $value) { + $key = str_replace('_', '.', $key); + if (strpos($key, '.') !== false) { + $this->set($key, $value); + } else { + $namespace = $key; + $namespace_values = $value; + foreach ($namespace_values as $directive => $value2) { + $this->set($namespace .'.'. $directive, $value2); + } + } + } + } + + /** + * Returns a list of array(namespace, directive) for all directives + * that are allowed in a web-form context as per an allowed + * namespaces/directives list. + * + * @param array $allowed List of allowed namespaces/directives + * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy + * + * @return array + */ + public static function getAllowedDirectivesForForm($allowed, $schema = null) + { + if (!$schema) { + $schema = HTMLPurifier_ConfigSchema::instance(); + } + if ($allowed !== true) { + if (is_string($allowed)) { + $allowed = array($allowed); + } + $allowed_ns = array(); + $allowed_directives = array(); + $blacklisted_directives = array(); + foreach ($allowed as $ns_or_directive) { + if (strpos($ns_or_directive, '.') !== false) { + // directive + if ($ns_or_directive[0] == '-') { + $blacklisted_directives[substr($ns_or_directive, 1)] = true; + } else { + $allowed_directives[$ns_or_directive] = true; + } + } else { + // namespace + $allowed_ns[$ns_or_directive] = true; + } + } + } + $ret = array(); + foreach ($schema->info as $key => $def) { + list($ns, $directive) = explode('.', $key, 2); + if ($allowed !== true) { + if (isset($blacklisted_directives["$ns.$directive"])) { + continue; + } + if (!isset($allowed_directives["$ns.$directive"]) && !isset($allowed_ns[$ns])) { + continue; + } + } + if (isset($def->isAlias)) { + continue; + } + if ($directive == 'DefinitionID' || $directive == 'DefinitionRev') { + continue; + } + $ret[] = array($ns, $directive); + } + return $ret; + } + + /** + * Loads configuration values from $_GET/$_POST that were posted + * via ConfigForm + * + * @param array $array $_GET or $_POST array to import + * @param string|bool $index Index/name that the config variables are in + * @param array|bool $allowed List of allowed namespaces/directives + * @param bool $mq_fix Boolean whether or not to enable magic quotes fix + * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy + * + * @return mixed + */ + public static function loadArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) + { + $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $schema); + $config = HTMLPurifier_Config::create($ret, $schema); + return $config; + } + + /** + * Merges in configuration values from $_GET/$_POST to object. NOT STATIC. + * + * @param array $array $_GET or $_POST array to import + * @param string|bool $index Index/name that the config variables are in + * @param array|bool $allowed List of allowed namespaces/directives + * @param bool $mq_fix Boolean whether or not to enable magic quotes fix + */ + public function mergeArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true) + { + $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $this->def); + $this->loadArray($ret); + } + + /** + * Prepares an array from a form into something usable for the more + * strict parts of HTMLPurifier_Config + * + * @param array $array $_GET or $_POST array to import + * @param string|bool $index Index/name that the config variables are in + * @param array|bool $allowed List of allowed namespaces/directives + * @param bool $mq_fix Boolean whether or not to enable magic quotes fix + * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy + * + * @return array + */ + public static function prepareArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) + { + if ($index !== false) { + $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array(); + } + $mq = $mq_fix && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc(); + + $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema); + $ret = array(); + foreach ($allowed as $key) { + list($ns, $directive) = $key; + $skey = "$ns.$directive"; + if (!empty($array["Null_$skey"])) { + $ret[$ns][$directive] = null; + continue; + } + if (!isset($array[$skey])) { + continue; + } + $value = $mq ? stripslashes($array[$skey]) : $array[$skey]; + $ret[$ns][$directive] = $value; + } + return $ret; + } + + /** + * Loads configuration values from an ini file + * + * @param string $filename Name of ini file + */ + public function loadIni($filename) + { + if ($this->isFinalized('Cannot load directives after finalization')) { + return; + } + $array = parse_ini_file($filename, true); + $this->loadArray($array); + } + + /** + * Checks whether or not the configuration object is finalized. + * + * @param string|bool $error String error message, or false for no error + * + * @return bool + */ + public function isFinalized($error = false) + { + if ($this->finalized && $error) { + $this->triggerError($error, E_USER_ERROR); + } + return $this->finalized; + } + + /** + * Finalizes configuration only if auto finalize is on and not + * already finalized + */ + public function autoFinalize() + { + if ($this->autoFinalize) { + $this->finalize(); + } else { + $this->plist->squash(true); + } + } + + /** + * Finalizes a configuration object, prohibiting further change + */ + public function finalize() + { + $this->finalized = true; + $this->parser = null; + } + + /** + * Produces a nicely formatted error message by supplying the + * stack frame information OUTSIDE of HTMLPurifier_Config. + * + * @param string $msg An error message + * @param int $no An error number + */ + protected function triggerError($msg, $no) + { + // determine previous stack frame + $extra = ''; + if ($this->chatty) { + $trace = debug_backtrace(); + // zip(tail(trace), trace) -- but PHP is not Haskell har har + for ($i = 0, $c = count($trace); $i < $c - 1; $i++) { + // XXX this is not correct on some versions of HTML Purifier + if ($trace[$i + 1]['class'] === 'HTMLPurifier_Config') { + continue; + } + $frame = $trace[$i]; + $extra = " invoked on line {$frame['line']} in file {$frame['file']}"; + break; + } + } + trigger_error($msg . $extra, $no); + } + + /** + * Returns a serialized form of the configuration object that can + * be reconstituted. + * + * @return string + */ + public function serialize() + { + $this->getDefinition('HTML'); + $this->getDefinition('CSS'); + $this->getDefinition('URI'); + return serialize($this); + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema.php new file mode 100644 index 0000000000000000000000000000000000000000..cc8f4716663a4e18a7c924d2d640229e7399f623 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema.php @@ -0,0 +1,176 @@ +<?php + +/** + * Configuration definition, defines directives and their defaults. + */ +class HTMLPurifier_ConfigSchema +{ + /** + * Defaults of the directives and namespaces. + * @type array + * @note This shares the exact same structure as HTMLPurifier_Config::$conf + */ + public $defaults = array(); + + /** + * The default property list. Do not edit this property list. + * @type array + */ + public $defaultPlist; + + /** + * Definition of the directives. + * The structure of this is: + * + * array( + * 'Namespace' => array( + * 'Directive' => new stdClass(), + * ) + * ) + * + * The stdClass may have the following properties: + * + * - If isAlias isn't set: + * - type: Integer type of directive, see HTMLPurifier_VarParser for definitions + * - allow_null: If set, this directive allows null values + * - aliases: If set, an associative array of value aliases to real values + * - allowed: If set, a lookup array of allowed (string) values + * - If isAlias is set: + * - namespace: Namespace this directive aliases to + * - name: Directive name this directive aliases to + * + * In certain degenerate cases, stdClass will actually be an integer. In + * that case, the value is equivalent to an stdClass with the type + * property set to the integer. If the integer is negative, type is + * equal to the absolute value of integer, and allow_null is true. + * + * This class is friendly with HTMLPurifier_Config. If you need introspection + * about the schema, you're better of using the ConfigSchema_Interchange, + * which uses more memory but has much richer information. + * @type array + */ + public $info = array(); + + /** + * Application-wide singleton + * @type HTMLPurifier_ConfigSchema + */ + protected static $singleton; + + public function __construct() + { + $this->defaultPlist = new HTMLPurifier_PropertyList(); + } + + /** + * Unserializes the default ConfigSchema. + * @return HTMLPurifier_ConfigSchema + */ + public static function makeFromSerial() + { + $contents = file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema.ser'); + $r = unserialize($contents); + if (!$r) { + $hash = sha1($contents); + trigger_error("Unserialization of configuration schema failed, sha1 of file was $hash", E_USER_ERROR); + } + return $r; + } + + /** + * Retrieves an instance of the application-wide configuration definition. + * @param HTMLPurifier_ConfigSchema $prototype + * @return HTMLPurifier_ConfigSchema + */ + public static function instance($prototype = null) + { + if ($prototype !== null) { + HTMLPurifier_ConfigSchema::$singleton = $prototype; + } elseif (HTMLPurifier_ConfigSchema::$singleton === null || $prototype === true) { + HTMLPurifier_ConfigSchema::$singleton = HTMLPurifier_ConfigSchema::makeFromSerial(); + } + return HTMLPurifier_ConfigSchema::$singleton; + } + + /** + * Defines a directive for configuration + * @warning Will fail of directive's namespace is defined. + * @warning This method's signature is slightly different from the legacy + * define() static method! Beware! + * @param string $key Name of directive + * @param mixed $default Default value of directive + * @param string $type Allowed type of the directive. See + * HTMLPurifier_DirectiveDef::$type for allowed values + * @param bool $allow_null Whether or not to allow null values + */ + public function add($key, $default, $type, $allow_null) + { + $obj = new stdClass(); + $obj->type = is_int($type) ? $type : HTMLPurifier_VarParser::$types[$type]; + if ($allow_null) { + $obj->allow_null = true; + } + $this->info[$key] = $obj; + $this->defaults[$key] = $default; + $this->defaultPlist->set($key, $default); + } + + /** + * Defines a directive value alias. + * + * Directive value aliases are convenient for developers because it lets + * them set a directive to several values and get the same result. + * @param string $key Name of Directive + * @param array $aliases Hash of aliased values to the real alias + */ + public function addValueAliases($key, $aliases) + { + if (!isset($this->info[$key]->aliases)) { + $this->info[$key]->aliases = array(); + } + foreach ($aliases as $alias => $real) { + $this->info[$key]->aliases[$alias] = $real; + } + } + + /** + * Defines a set of allowed values for a directive. + * @warning This is slightly different from the corresponding static + * method definition. + * @param string $key Name of directive + * @param array $allowed Lookup array of allowed values + */ + public function addAllowedValues($key, $allowed) + { + $this->info[$key]->allowed = $allowed; + } + + /** + * Defines a directive alias for backwards compatibility + * @param string $key Directive that will be aliased + * @param string $new_key Directive that the alias will be to + */ + public function addAlias($key, $new_key) + { + $obj = new stdClass; + $obj->key = $new_key; + $obj->isAlias = true; + $this->info[$key] = $obj; + } + + /** + * Replaces any stdClass that only has the type property with type integer. + */ + public function postProcess() + { + foreach ($this->info as $key => $v) { + if (count((array) $v) == 1) { + $this->info[$key] = $v->type; + } elseif (count((array) $v) == 2 && isset($v->allow_null)) { + $this->info[$key] = -$v->type; + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php index 987f547bcaffcc1976517dfd21339ed3ecd4a3ac..1174575ea9048ab5c33cacf542a93a8df7f2bf62 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php @@ -1,52 +1,48 @@ -<?php - -/** - * Converts HTMLPurifier_ConfigSchema_Interchange to our runtime - * representation used to perform checks on user configuration. - */ -class HTMLPurifier_ConfigSchema_Builder_ConfigSchema -{ - - public function build($interchange) { - $schema = new HTMLPurifier_ConfigSchema(); - foreach ($interchange->namespaces as $n) { - $schema->addNamespace($n->namespace); - } - foreach ($interchange->directives as $d) { - $schema->add( - $d->id->namespace, - $d->id->directive, - $d->default, - $d->type, - $d->typeAllowsNull - ); - if ($d->allowed !== null) { - $schema->addAllowedValues( - $d->id->namespace, - $d->id->directive, - $d->allowed - ); - } - foreach ($d->aliases as $alias) { - $schema->addAlias( - $alias->namespace, - $alias->directive, - $d->id->namespace, - $d->id->directive - ); - } - if ($d->valueAliases !== null) { - $schema->addValueAliases( - $d->id->namespace, - $d->id->directive, - $d->valueAliases - ); - } - } - $schema->postProcess(); - return $schema; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Converts HTMLPurifier_ConfigSchema_Interchange to our runtime + * representation used to perform checks on user configuration. + */ +class HTMLPurifier_ConfigSchema_Builder_ConfigSchema +{ + + /** + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + * @return HTMLPurifier_ConfigSchema + */ + public function build($interchange) + { + $schema = new HTMLPurifier_ConfigSchema(); + foreach ($interchange->directives as $d) { + $schema->add( + $d->id->key, + $d->default, + $d->type, + $d->typeAllowsNull + ); + if ($d->allowed !== null) { + $schema->addAllowedValues( + $d->id->key, + $d->allowed + ); + } + foreach ($d->aliases as $alias) { + $schema->addAlias( + $alias->key, + $d->id->key + ); + } + if ($d->valueAliases !== null) { + $schema->addValueAliases( + $d->id->key, + $d->valueAliases + ); + } + } + $schema->postProcess(); + return $schema; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/Xml.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/Xml.php new file mode 100644 index 0000000000000000000000000000000000000000..0d00bf1d155fe9c7d8ea684f4037fb1808298acb --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Builder/Xml.php @@ -0,0 +1,144 @@ +<?php + +/** + * Converts HTMLPurifier_ConfigSchema_Interchange to an XML format, + * which can be further processed to generate documentation. + */ +class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter +{ + + /** + * @type HTMLPurifier_ConfigSchema_Interchange + */ + protected $interchange; + + /** + * @type string + */ + private $namespace; + + /** + * @param string $html + */ + protected function writeHTMLDiv($html) + { + $this->startElement('div'); + + $purifier = HTMLPurifier::getInstance(); + $html = $purifier->purify($html); + $this->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); + $this->writeRaw($html); + + $this->endElement(); // div + } + + /** + * @param mixed $var + * @return string + */ + protected function export($var) + { + if ($var === array()) { + return 'array()'; + } + return var_export($var, true); + } + + /** + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + */ + public function build($interchange) + { + // global access, only use as last resort + $this->interchange = $interchange; + + $this->setIndent(true); + $this->startDocument('1.0', 'UTF-8'); + $this->startElement('configdoc'); + $this->writeElement('title', $interchange->name); + + foreach ($interchange->directives as $directive) { + $this->buildDirective($directive); + } + + if ($this->namespace) { + $this->endElement(); + } // namespace + + $this->endElement(); // configdoc + $this->flush(); + } + + /** + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $directive + */ + public function buildDirective($directive) + { + // Kludge, although I suppose having a notion of a "root namespace" + // certainly makes things look nicer when documentation is built. + // Depends on things being sorted. + if (!$this->namespace || $this->namespace !== $directive->id->getRootNamespace()) { + if ($this->namespace) { + $this->endElement(); + } // namespace + $this->namespace = $directive->id->getRootNamespace(); + $this->startElement('namespace'); + $this->writeAttribute('id', $this->namespace); + $this->writeElement('name', $this->namespace); + } + + $this->startElement('directive'); + $this->writeAttribute('id', $directive->id->toString()); + + $this->writeElement('name', $directive->id->getDirective()); + + $this->startElement('aliases'); + foreach ($directive->aliases as $alias) { + $this->writeElement('alias', $alias->toString()); + } + $this->endElement(); // aliases + + $this->startElement('constraints'); + if ($directive->version) { + $this->writeElement('version', $directive->version); + } + $this->startElement('type'); + if ($directive->typeAllowsNull) { + $this->writeAttribute('allow-null', 'yes'); + } + $this->text($directive->type); + $this->endElement(); // type + if ($directive->allowed) { + $this->startElement('allowed'); + foreach ($directive->allowed as $value => $x) { + $this->writeElement('value', $value); + } + $this->endElement(); // allowed + } + $this->writeElement('default', $this->export($directive->default)); + $this->writeAttribute('xml:space', 'preserve'); + if ($directive->external) { + $this->startElement('external'); + foreach ($directive->external as $project) { + $this->writeElement('project', $project); + } + $this->endElement(); + } + $this->endElement(); // constraints + + if ($directive->deprecatedVersion) { + $this->startElement('deprecated'); + $this->writeElement('version', $directive->deprecatedVersion); + $this->writeElement('use', $directive->deprecatedUse->toString()); + $this->endElement(); // deprecated + } + + $this->startElement('description'); + $this->writeHTMLDiv($directive->description); + $this->endElement(); // description + + $this->endElement(); // directive + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Exception.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Exception.php index 2671516c58838b9f225b2e253b5f1a183543c60c..1abdcfc065215d0cec3af54068d15912fc21f8c8 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Exception.php @@ -1,11 +1,11 @@ -<?php - -/** - * Exceptions related to configuration schema - */ -class HTMLPurifier_ConfigSchema_Exception extends HTMLPurifier_Exception -{ - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Exceptions related to configuration schema + */ +class HTMLPurifier_ConfigSchema_Exception extends HTMLPurifier_Exception +{ + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange.php index 365c66357f55430b11f8220219a6fb9de939e44b..c094fa0b83c9594191ba400fe62de40bafa0969a 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange.php @@ -1,57 +1,47 @@ -<?php - -/** - * Generic schema interchange format that can be converted to a runtime - * representation (HTMLPurifier_ConfigSchema) or HTML documentation. Members - * are completely validated. - */ -class HTMLPurifier_ConfigSchema_Interchange -{ - - /** - * Name of the application this schema is describing. - */ - public $name; - - /** - * Array of Namespace ID => array(namespace info) - */ - public $namespaces = array(); - - /** - * Array of Directive ID => array(directive info) - */ - public $directives = array(); - - /** - * Adds a namespace array to $namespaces - */ - public function addNamespace($namespace) { - if (isset($this->namespaces[$i = $namespace->namespace])) { - throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine namespace '$i'"); - } - $this->namespaces[$i] = $namespace; - } - - /** - * Adds a directive array to $directives - */ - public function addDirective($directive) { - if (isset($this->directives[$i = $directive->id->toString()])) { - throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'"); - } - $this->directives[$i] = $directive; - } - - /** - * Convenience function to perform standard validation. Throws exception - * on failed validation. - */ - public function validate() { - $validator = new HTMLPurifier_ConfigSchema_Validator(); - return $validator->validate($this); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Generic schema interchange format that can be converted to a runtime + * representation (HTMLPurifier_ConfigSchema) or HTML documentation. Members + * are completely validated. + */ +class HTMLPurifier_ConfigSchema_Interchange +{ + + /** + * Name of the application this schema is describing. + * @type string + */ + public $name; + + /** + * Array of Directive ID => array(directive info) + * @type HTMLPurifier_ConfigSchema_Interchange_Directive[] + */ + public $directives = array(); + + /** + * Adds a directive array to $directives + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $directive + * @throws HTMLPurifier_ConfigSchema_Exception + */ + public function addDirective($directive) + { + if (isset($this->directives[$i = $directive->id->toString()])) { + throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'"); + } + $this->directives[$i] = $directive; + } + + /** + * Convenience function to perform standard validation. Throws exception + * on failed validation. + */ + public function validate() + { + $validator = new HTMLPurifier_ConfigSchema_Validator(); + return $validator->validate($this); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php index ac8be0d9707d5f33b9012a40641411f25b0b5d2d..4c39c5c6883fc8d969e94e06718635a0c8da6527 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php @@ -1,77 +1,89 @@ -<?php - -/** - * Interchange component class describing configuration directives. - */ -class HTMLPurifier_ConfigSchema_Interchange_Directive -{ - - /** - * ID of directive, instance of HTMLPurifier_ConfigSchema_Interchange_Id. - */ - public $id; - - /** - * String type, e.g. 'integer' or 'istring'. - */ - public $type; - - /** - * Default value, e.g. 3 or 'DefaultVal'. - */ - public $default; - - /** - * HTML description. - */ - public $description; - - /** - * Boolean whether or not null is allowed as a value. - */ - public $typeAllowsNull = false; - - /** - * Lookup table of allowed scalar values, e.g. array('allowed' => true). - * Null if all values are allowed. - */ - public $allowed; - - /** - * List of aliases for the directive, - * e.g. array(new HTMLPurifier_ConfigSchema_Interchange_Id('Ns', 'Dir'))). - */ - public $aliases = array(); - - /** - * Hash of value aliases, e.g. array('alt' => 'real'). Null if value - * aliasing is disabled (necessary for non-scalar types). - */ - public $valueAliases; - - /** - * Version of HTML Purifier the directive was introduced, e.g. '1.3.1'. - * Null if the directive has always existed. - */ - public $version; - - /** - * ID of directive that supercedes this old directive, is an instance - * of HTMLPurifier_ConfigSchema_Interchange_Id. Null if not deprecated. - */ - public $deprecatedUse; - - /** - * Version of HTML Purifier this directive was deprecated. Null if not - * deprecated. - */ - public $deprecatedVersion; - - /** - * List of external projects this directive depends on, e.g. array('CSSTidy'). - */ - public $external = array(); - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Interchange component class describing configuration directives. + */ +class HTMLPurifier_ConfigSchema_Interchange_Directive +{ + + /** + * ID of directive. + * @type HTMLPurifier_ConfigSchema_Interchange_Id + */ + public $id; + + /** + * Type, e.g. 'integer' or 'istring'. + * @type string + */ + public $type; + + /** + * Default value, e.g. 3 or 'DefaultVal'. + * @type mixed + */ + public $default; + + /** + * HTML description. + * @type string + */ + public $description; + + /** + * Whether or not null is allowed as a value. + * @type bool + */ + public $typeAllowsNull = false; + + /** + * Lookup table of allowed scalar values. + * e.g. array('allowed' => true). + * Null if all values are allowed. + * @type array + */ + public $allowed; + + /** + * List of aliases for the directive. + * e.g. array(new HTMLPurifier_ConfigSchema_Interchange_Id('Ns', 'Dir'))). + * @type HTMLPurifier_ConfigSchema_Interchange_Id[] + */ + public $aliases = array(); + + /** + * Hash of value aliases, e.g. array('alt' => 'real'). Null if value + * aliasing is disabled (necessary for non-scalar types). + * @type array + */ + public $valueAliases; + + /** + * Version of HTML Purifier the directive was introduced, e.g. '1.3.1'. + * Null if the directive has always existed. + * @type string + */ + public $version; + + /** + * ID of directive that supercedes this old directive. + * Null if not deprecated. + * @type HTMLPurifier_ConfigSchema_Interchange_Id + */ + public $deprecatedUse; + + /** + * Version of HTML Purifier this directive was deprecated. Null if not + * deprecated. + * @type string + */ + public $deprecatedVersion; + + /** + * List of external projects this directive depends on, e.g. array('CSSTidy'). + * @type array + */ + public $external = array(); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Id.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Id.php new file mode 100644 index 0000000000000000000000000000000000000000..3ee8171141d1daf212977f4e57144d6b67accedc --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Interchange/Id.php @@ -0,0 +1,58 @@ +<?php + +/** + * Represents a directive ID in the interchange format. + */ +class HTMLPurifier_ConfigSchema_Interchange_Id +{ + + /** + * @type string + */ + public $key; + + /** + * @param string $key + */ + public function __construct($key) + { + $this->key = $key; + } + + /** + * @return string + * @warning This is NOT magic, to ensure that people don't abuse SPL and + * cause problems for PHP 5.0 support. + */ + public function toString() + { + return $this->key; + } + + /** + * @return string + */ + public function getRootNamespace() + { + return substr($this->key, 0, strpos($this->key, ".")); + } + + /** + * @return string + */ + public function getDirective() + { + return substr($this->key, strpos($this->key, ".") + 1); + } + + /** + * @param string $id + * @return HTMLPurifier_ConfigSchema_Interchange_Id + */ + public static function make($id) + { + return new HTMLPurifier_ConfigSchema_Interchange_Id($id); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php similarity index 56% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php index a1a24eacbaffa1dd455b31926ea29906e337241b..fe9b3268f45d9bc06f382bed5cc2757e00fb3f3d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php @@ -1,176 +1,226 @@ -<?php - -class HTMLPurifier_ConfigSchema_InterchangeBuilder -{ - - /** - * Used for processing DEFAULT, nothing else. - */ - protected $varParser; - - public function __construct($varParser = null) { - $this->varParser = $varParser ? $varParser : new HTMLPurifier_VarParser_Native(); - } - - public static function buildFromDirectory($dir = null) { - $parser = new HTMLPurifier_StringHashParser(); - $builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder(); - $interchange = new HTMLPurifier_ConfigSchema_Interchange(); - - if (!$dir) $dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema/'; - $info = parse_ini_file($dir . 'info.ini'); - $interchange->name = $info['name']; - - $files = array(); - $dh = opendir($dir); - while (false !== ($file = readdir($dh))) { - if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') { - continue; - } - $files[] = $file; - } - closedir($dh); - - sort($files); - foreach ($files as $file) { - $builder->build( - $interchange, - new HTMLPurifier_StringHash( $parser->parseFile($dir . $file) ) - ); - } - - return $interchange; - } - - /** - * Builds an interchange object based on a hash. - * @param $interchange HTMLPurifier_ConfigSchema_Interchange object to build - * @param $hash HTMLPurifier_ConfigSchema_StringHash source data - */ - public function build($interchange, $hash) { - if (!$hash instanceof HTMLPurifier_StringHash) { - $hash = new HTMLPurifier_StringHash($hash); - } - if (!isset($hash['ID'])) { - throw new HTMLPurifier_ConfigSchema_Exception('Hash does not have any ID'); - } - if (strpos($hash['ID'], '.') === false) { - $this->buildNamespace($interchange, $hash); - } else { - $this->buildDirective($interchange, $hash); - } - $this->_findUnused($hash); - } - - public function buildNamespace($interchange, $hash) { - $namespace = new HTMLPurifier_ConfigSchema_Interchange_Namespace(); - $namespace->namespace = $hash->offsetGet('ID'); - if (isset($hash['DESCRIPTION'])) { - $namespace->description = $hash->offsetGet('DESCRIPTION'); - } - $interchange->addNamespace($namespace); - } - - public function buildDirective($interchange, $hash) { - $directive = new HTMLPurifier_ConfigSchema_Interchange_Directive(); - - // These are required elements: - $directive->id = $this->id($hash->offsetGet('ID')); - $id = $directive->id->toString(); // convenience - - if (isset($hash['TYPE'])) { - $type = explode('/', $hash->offsetGet('TYPE')); - if (isset($type[1])) $directive->typeAllowsNull = true; - $directive->type = $type[0]; - } else { - throw new HTMLPurifier_ConfigSchema_Exception("TYPE in directive hash '$id' not defined"); - } - - if (isset($hash['DEFAULT'])) { - try { - $directive->default = $this->varParser->parse($hash->offsetGet('DEFAULT'), $directive->type, $directive->typeAllowsNull); - } catch (HTMLPurifier_VarParserException $e) { - throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage() . " in DEFAULT in directive hash '$id'"); - } - } - - if (isset($hash['DESCRIPTION'])) { - $directive->description = $hash->offsetGet('DESCRIPTION'); - } - - if (isset($hash['ALLOWED'])) { - $directive->allowed = $this->lookup($this->evalArray($hash->offsetGet('ALLOWED'))); - } - - if (isset($hash['VALUE-ALIASES'])) { - $directive->valueAliases = $this->evalArray($hash->offsetGet('VALUE-ALIASES')); - } - - if (isset($hash['ALIASES'])) { - $raw_aliases = trim($hash->offsetGet('ALIASES')); - $aliases = preg_split('/\s*,\s*/', $raw_aliases); - foreach ($aliases as $alias) { - $directive->aliases[] = $this->id($alias); - } - } - - if (isset($hash['VERSION'])) { - $directive->version = $hash->offsetGet('VERSION'); - } - - if (isset($hash['DEPRECATED-USE'])) { - $directive->deprecatedUse = $this->id($hash->offsetGet('DEPRECATED-USE')); - } - - if (isset($hash['DEPRECATED-VERSION'])) { - $directive->deprecatedVersion = $hash->offsetGet('DEPRECATED-VERSION'); - } - - if (isset($hash['EXTERNAL'])) { - $directive->external = preg_split('/\s*,\s*/', trim($hash->offsetGet('EXTERNAL'))); - } - - $interchange->addDirective($directive); - } - - /** - * Evaluates an array PHP code string without array() wrapper - */ - protected function evalArray($contents) { - return eval('return array('. $contents .');'); - } - - /** - * Converts an array list into a lookup array. - */ - protected function lookup($array) { - $ret = array(); - foreach ($array as $val) $ret[$val] = true; - return $ret; - } - - /** - * Convenience function that creates an HTMLPurifier_ConfigSchema_Interchange_Id - * object based on a string Id. - */ - protected function id($id) { - return HTMLPurifier_ConfigSchema_Interchange_Id::make($id); - } - - /** - * Triggers errors for any unused keys passed in the hash; such keys - * may indicate typos, missing values, etc. - * @param $hash Instance of ConfigSchema_StringHash to check. - */ - protected function _findUnused($hash) { - $accessed = $hash->getAccessed(); - foreach ($hash as $k => $v) { - if (!isset($accessed[$k])) { - trigger_error("String hash key '$k' not used by builder", E_USER_NOTICE); - } - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_ConfigSchema_InterchangeBuilder +{ + + /** + * Used for processing DEFAULT, nothing else. + * @type HTMLPurifier_VarParser + */ + protected $varParser; + + /** + * @param HTMLPurifier_VarParser $varParser + */ + public function __construct($varParser = null) + { + $this->varParser = $varParser ? $varParser : new HTMLPurifier_VarParser_Native(); + } + + /** + * @param string $dir + * @return HTMLPurifier_ConfigSchema_Interchange + */ + public static function buildFromDirectory($dir = null) + { + $builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder(); + $interchange = new HTMLPurifier_ConfigSchema_Interchange(); + return $builder->buildDir($interchange, $dir); + } + + /** + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + * @param string $dir + * @return HTMLPurifier_ConfigSchema_Interchange + */ + public function buildDir($interchange, $dir = null) + { + if (!$dir) { + $dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema'; + } + if (file_exists($dir . '/info.ini')) { + $info = parse_ini_file($dir . '/info.ini'); + $interchange->name = $info['name']; + } + + $files = array(); + $dh = opendir($dir); + while (false !== ($file = readdir($dh))) { + if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') { + continue; + } + $files[] = $file; + } + closedir($dh); + + sort($files); + foreach ($files as $file) { + $this->buildFile($interchange, $dir . '/' . $file); + } + return $interchange; + } + + /** + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + * @param string $file + */ + public function buildFile($interchange, $file) + { + $parser = new HTMLPurifier_StringHashParser(); + $this->build( + $interchange, + new HTMLPurifier_StringHash($parser->parseFile($file)) + ); + } + + /** + * Builds an interchange object based on a hash. + * @param HTMLPurifier_ConfigSchema_Interchange $interchange HTMLPurifier_ConfigSchema_Interchange object to build + * @param HTMLPurifier_StringHash $hash source data + * @throws HTMLPurifier_ConfigSchema_Exception + */ + public function build($interchange, $hash) + { + if (!$hash instanceof HTMLPurifier_StringHash) { + $hash = new HTMLPurifier_StringHash($hash); + } + if (!isset($hash['ID'])) { + throw new HTMLPurifier_ConfigSchema_Exception('Hash does not have any ID'); + } + if (strpos($hash['ID'], '.') === false) { + if (count($hash) == 2 && isset($hash['DESCRIPTION'])) { + $hash->offsetGet('DESCRIPTION'); // prevent complaining + } else { + throw new HTMLPurifier_ConfigSchema_Exception('All directives must have a namespace'); + } + } else { + $this->buildDirective($interchange, $hash); + } + $this->_findUnused($hash); + } + + /** + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + * @param HTMLPurifier_StringHash $hash + * @throws HTMLPurifier_ConfigSchema_Exception + */ + public function buildDirective($interchange, $hash) + { + $directive = new HTMLPurifier_ConfigSchema_Interchange_Directive(); + + // These are required elements: + $directive->id = $this->id($hash->offsetGet('ID')); + $id = $directive->id->toString(); // convenience + + if (isset($hash['TYPE'])) { + $type = explode('/', $hash->offsetGet('TYPE')); + if (isset($type[1])) { + $directive->typeAllowsNull = true; + } + $directive->type = $type[0]; + } else { + throw new HTMLPurifier_ConfigSchema_Exception("TYPE in directive hash '$id' not defined"); + } + + if (isset($hash['DEFAULT'])) { + try { + $directive->default = $this->varParser->parse( + $hash->offsetGet('DEFAULT'), + $directive->type, + $directive->typeAllowsNull + ); + } catch (HTMLPurifier_VarParserException $e) { + throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage() . " in DEFAULT in directive hash '$id'"); + } + } + + if (isset($hash['DESCRIPTION'])) { + $directive->description = $hash->offsetGet('DESCRIPTION'); + } + + if (isset($hash['ALLOWED'])) { + $directive->allowed = $this->lookup($this->evalArray($hash->offsetGet('ALLOWED'))); + } + + if (isset($hash['VALUE-ALIASES'])) { + $directive->valueAliases = $this->evalArray($hash->offsetGet('VALUE-ALIASES')); + } + + if (isset($hash['ALIASES'])) { + $raw_aliases = trim($hash->offsetGet('ALIASES')); + $aliases = preg_split('/\s*,\s*/', $raw_aliases); + foreach ($aliases as $alias) { + $directive->aliases[] = $this->id($alias); + } + } + + if (isset($hash['VERSION'])) { + $directive->version = $hash->offsetGet('VERSION'); + } + + if (isset($hash['DEPRECATED-USE'])) { + $directive->deprecatedUse = $this->id($hash->offsetGet('DEPRECATED-USE')); + } + + if (isset($hash['DEPRECATED-VERSION'])) { + $directive->deprecatedVersion = $hash->offsetGet('DEPRECATED-VERSION'); + } + + if (isset($hash['EXTERNAL'])) { + $directive->external = preg_split('/\s*,\s*/', trim($hash->offsetGet('EXTERNAL'))); + } + + $interchange->addDirective($directive); + } + + /** + * Evaluates an array PHP code string without array() wrapper + * @param string $contents + */ + protected function evalArray($contents) + { + return eval('return array(' . $contents . ');'); + } + + /** + * Converts an array list into a lookup array. + * @param array $array + * @return array + */ + protected function lookup($array) + { + $ret = array(); + foreach ($array as $val) { + $ret[$val] = true; + } + return $ret; + } + + /** + * Convenience function that creates an HTMLPurifier_ConfigSchema_Interchange_Id + * object based on a string Id. + * @param string $id + * @return HTMLPurifier_ConfigSchema_Interchange_Id + */ + protected function id($id) + { + return HTMLPurifier_ConfigSchema_Interchange_Id::make($id); + } + + /** + * Triggers errors for any unused keys passed in the hash; such keys + * may indicate typos, missing values, etc. + * @param HTMLPurifier_StringHash $hash Hash to check. + */ + protected function _findUnused($hash) + { + $accessed = $hash->getAccessed(); + foreach ($hash as $k => $v) { + if (!isset($accessed[$k])) { + trigger_error("String hash key '$k' not used by builder", E_USER_NOTICE); + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Validator.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Validator.php index 2dfd37baed8bc9809883a753fc38b76d678f8dd2..9f14444f3750fc8a3e79e5b8aa6b97c7bde495aa 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/Validator.php @@ -1,225 +1,248 @@ -<?php - -/** - * Performs validations on HTMLPurifier_ConfigSchema_Interchange - * - * @note If you see '// handled by InterchangeBuilder', that means a - * design decision in that class would prevent this validation from - * ever being necessary. We have them anyway, however, for - * redundancy. - */ -class HTMLPurifier_ConfigSchema_Validator -{ - - /** - * Easy to access global objects. - */ - protected $interchange, $aliases; - - /** - * Context-stack to provide easy to read error messages. - */ - protected $context = array(); - - /** - * HTMLPurifier_VarParser to test default's type. - */ - protected $parser; - - public function __construct() { - $this->parser = new HTMLPurifier_VarParser(); - } - - /** - * Validates a fully-formed interchange object. Throws an - * HTMLPurifier_ConfigSchema_Exception if there's a problem. - */ - public function validate($interchange) { - $this->interchange = $interchange; - $this->aliases = array(); - // PHP is a bit lax with integer <=> string conversions in - // arrays, so we don't use the identical !== comparison - foreach ($interchange->namespaces as $i => $namespace) { - if ($i != $namespace->namespace) $this->error(false, "Integrity violation: key '$i' does not match internal id '{$namespace->namespace}'"); - $this->validateNamespace($namespace); - } - foreach ($interchange->directives as $i => $directive) { - $id = $directive->id->toString(); - if ($i != $id) $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'"); - $this->validateDirective($directive); - } - return true; - } - - /** - * Validates a HTMLPurifier_ConfigSchema_Interchange_Namespace object. - */ - public function validateNamespace($n) { - $this->context[] = "namespace '{$n->namespace}'"; - $this->with($n, 'namespace') - ->assertNotEmpty() - ->assertAlnum(); // implicit assertIsString handled by InterchangeBuilder - $this->with($n, 'description') - ->assertNotEmpty() - ->assertIsString(); // handled by InterchangeBuilder - array_pop($this->context); - } - - /** - * Validates a HTMLPurifier_ConfigSchema_Interchange_Id object. - */ - public function validateId($id) { - $id_string = $id->toString(); - $this->context[] = "id '$id_string'"; - if (!$id instanceof HTMLPurifier_ConfigSchema_Interchange_Id) { - // handled by InterchangeBuilder - $this->error(false, 'is not an instance of HTMLPurifier_ConfigSchema_Interchange_Id'); - } - if (!isset($this->interchange->namespaces[$id->namespace])) { - $this->error('namespace', 'does not exist'); // assumes that the namespace was validated already - } - $this->with($id, 'directive') - ->assertNotEmpty() - ->assertAlnum(); // implicit assertIsString handled by InterchangeBuilder - array_pop($this->context); - } - - /** - * Validates a HTMLPurifier_ConfigSchema_Interchange_Directive object. - */ - public function validateDirective($d) { - $id = $d->id->toString(); - $this->context[] = "directive '$id'"; - $this->validateId($d->id); - - $this->with($d, 'description') - ->assertNotEmpty(); - - // BEGIN - handled by InterchangeBuilder - $this->with($d, 'type') - ->assertNotEmpty(); - $this->with($d, 'typeAllowsNull') - ->assertIsBool(); - try { - // This also tests validity of $d->type - $this->parser->parse($d->default, $d->type, $d->typeAllowsNull); - } catch (HTMLPurifier_VarParserException $e) { - $this->error('default', 'had error: ' . $e->getMessage()); - } - // END - handled by InterchangeBuilder - - if (!is_null($d->allowed) || !empty($d->valueAliases)) { - // allowed and valueAliases require that we be dealing with - // strings, so check for that early. - $d_int = HTMLPurifier_VarParser::$types[$d->type]; - if (!isset(HTMLPurifier_VarParser::$stringTypes[$d_int])) { - $this->error('type', 'must be a string type when used with allowed or value aliases'); - } - } - - $this->validateDirectiveAllowed($d); - $this->validateDirectiveValueAliases($d); - $this->validateDirectiveAliases($d); - - array_pop($this->context); - } - - /** - * Extra validation if $allowed member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - */ - public function validateDirectiveAllowed($d) { - if (is_null($d->allowed)) return; - $this->with($d, 'allowed') - ->assertNotEmpty() - ->assertIsLookup(); // handled by InterchangeBuilder - if (is_string($d->default) && !isset($d->allowed[$d->default])) { - $this->error('default', 'must be an allowed value'); - } - $this->context[] = 'allowed'; - foreach ($d->allowed as $val => $x) { - if (!is_string($val)) $this->error("value $val", 'must be a string'); - } - array_pop($this->context); - } - - /** - * Extra validation if $valueAliases member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - */ - public function validateDirectiveValueAliases($d) { - if (is_null($d->valueAliases)) return; - $this->with($d, 'valueAliases') - ->assertIsArray(); // handled by InterchangeBuilder - $this->context[] = 'valueAliases'; - foreach ($d->valueAliases as $alias => $real) { - if (!is_string($alias)) $this->error("alias $alias", 'must be a string'); - if (!is_string($real)) $this->error("alias target $real from alias '$alias'", 'must be a string'); - if ($alias === $real) { - $this->error("alias '$alias'", "must not be an alias to itself"); - } - } - if (!is_null($d->allowed)) { - foreach ($d->valueAliases as $alias => $real) { - if (isset($d->allowed[$alias])) { - $this->error("alias '$alias'", 'must not be an allowed value'); - } elseif (!isset($d->allowed[$real])) { - $this->error("alias '$alias'", 'must be an alias to an allowed value'); - } - } - } - array_pop($this->context); - } - - /** - * Extra validation if $aliases member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - */ - public function validateDirectiveAliases($d) { - $this->with($d, 'aliases') - ->assertIsArray(); // handled by InterchangeBuilder - $this->context[] = 'aliases'; - foreach ($d->aliases as $alias) { - $this->validateId($alias); - $s = $alias->toString(); - if (isset($this->interchange->directives[$s])) { - $this->error("alias '$s'", 'collides with another directive'); - } - if (isset($this->aliases[$s])) { - $other_directive = $this->aliases[$s]; - $this->error("alias '$s'", "collides with alias for directive '$other_directive'"); - } - $this->aliases[$s] = $d->id->toString(); - } - array_pop($this->context); - } - - // protected helper functions - - /** - * Convenience function for generating HTMLPurifier_ConfigSchema_ValidatorAtom - * for validating simple member variables of objects. - */ - protected function with($obj, $member) { - return new HTMLPurifier_ConfigSchema_ValidatorAtom($this->getFormattedContext(), $obj, $member); - } - - /** - * Emits an error, providing helpful context. - */ - protected function error($target, $msg) { - if ($target !== false) $prefix = ucfirst($target) . ' in ' . $this->getFormattedContext(); - else $prefix = ucfirst($this->getFormattedContext()); - throw new HTMLPurifier_ConfigSchema_Exception(trim($prefix . ' ' . $msg)); - } - - /** - * Returns a formatted context string. - */ - protected function getFormattedContext() { - return implode(' in ', array_reverse($this->context)); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Performs validations on HTMLPurifier_ConfigSchema_Interchange + * + * @note If you see '// handled by InterchangeBuilder', that means a + * design decision in that class would prevent this validation from + * ever being necessary. We have them anyway, however, for + * redundancy. + */ +class HTMLPurifier_ConfigSchema_Validator +{ + + /** + * @type HTMLPurifier_ConfigSchema_Interchange + */ + protected $interchange; + + /** + * @type array + */ + protected $aliases; + + /** + * Context-stack to provide easy to read error messages. + * @type array + */ + protected $context = array(); + + /** + * to test default's type. + * @type HTMLPurifier_VarParser + */ + protected $parser; + + public function __construct() + { + $this->parser = new HTMLPurifier_VarParser(); + } + + /** + * Validates a fully-formed interchange object. + * @param HTMLPurifier_ConfigSchema_Interchange $interchange + * @return bool + */ + public function validate($interchange) + { + $this->interchange = $interchange; + $this->aliases = array(); + // PHP is a bit lax with integer <=> string conversions in + // arrays, so we don't use the identical !== comparison + foreach ($interchange->directives as $i => $directive) { + $id = $directive->id->toString(); + if ($i != $id) { + $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'"); + } + $this->validateDirective($directive); + } + return true; + } + + /** + * Validates a HTMLPurifier_ConfigSchema_Interchange_Id object. + * @param HTMLPurifier_ConfigSchema_Interchange_Id $id + */ + public function validateId($id) + { + $id_string = $id->toString(); + $this->context[] = "id '$id_string'"; + if (!$id instanceof HTMLPurifier_ConfigSchema_Interchange_Id) { + // handled by InterchangeBuilder + $this->error(false, 'is not an instance of HTMLPurifier_ConfigSchema_Interchange_Id'); + } + // keys are now unconstrained (we might want to narrow down to A-Za-z0-9.) + // we probably should check that it has at least one namespace + $this->with($id, 'key') + ->assertNotEmpty() + ->assertIsString(); // implicit assertIsString handled by InterchangeBuilder + array_pop($this->context); + } + + /** + * Validates a HTMLPurifier_ConfigSchema_Interchange_Directive object. + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d + */ + public function validateDirective($d) + { + $id = $d->id->toString(); + $this->context[] = "directive '$id'"; + $this->validateId($d->id); + + $this->with($d, 'description') + ->assertNotEmpty(); + + // BEGIN - handled by InterchangeBuilder + $this->with($d, 'type') + ->assertNotEmpty(); + $this->with($d, 'typeAllowsNull') + ->assertIsBool(); + try { + // This also tests validity of $d->type + $this->parser->parse($d->default, $d->type, $d->typeAllowsNull); + } catch (HTMLPurifier_VarParserException $e) { + $this->error('default', 'had error: ' . $e->getMessage()); + } + // END - handled by InterchangeBuilder + + if (!is_null($d->allowed) || !empty($d->valueAliases)) { + // allowed and valueAliases require that we be dealing with + // strings, so check for that early. + $d_int = HTMLPurifier_VarParser::$types[$d->type]; + if (!isset(HTMLPurifier_VarParser::$stringTypes[$d_int])) { + $this->error('type', 'must be a string type when used with allowed or value aliases'); + } + } + + $this->validateDirectiveAllowed($d); + $this->validateDirectiveValueAliases($d); + $this->validateDirectiveAliases($d); + + array_pop($this->context); + } + + /** + * Extra validation if $allowed member variable of + * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d + */ + public function validateDirectiveAllowed($d) + { + if (is_null($d->allowed)) { + return; + } + $this->with($d, 'allowed') + ->assertNotEmpty() + ->assertIsLookup(); // handled by InterchangeBuilder + if (is_string($d->default) && !isset($d->allowed[$d->default])) { + $this->error('default', 'must be an allowed value'); + } + $this->context[] = 'allowed'; + foreach ($d->allowed as $val => $x) { + if (!is_string($val)) { + $this->error("value $val", 'must be a string'); + } + } + array_pop($this->context); + } + + /** + * Extra validation if $valueAliases member variable of + * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d + */ + public function validateDirectiveValueAliases($d) + { + if (is_null($d->valueAliases)) { + return; + } + $this->with($d, 'valueAliases') + ->assertIsArray(); // handled by InterchangeBuilder + $this->context[] = 'valueAliases'; + foreach ($d->valueAliases as $alias => $real) { + if (!is_string($alias)) { + $this->error("alias $alias", 'must be a string'); + } + if (!is_string($real)) { + $this->error("alias target $real from alias '$alias'", 'must be a string'); + } + if ($alias === $real) { + $this->error("alias '$alias'", "must not be an alias to itself"); + } + } + if (!is_null($d->allowed)) { + foreach ($d->valueAliases as $alias => $real) { + if (isset($d->allowed[$alias])) { + $this->error("alias '$alias'", 'must not be an allowed value'); + } elseif (!isset($d->allowed[$real])) { + $this->error("alias '$alias'", 'must be an alias to an allowed value'); + } + } + } + array_pop($this->context); + } + + /** + * Extra validation if $aliases member variable of + * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. + * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d + */ + public function validateDirectiveAliases($d) + { + $this->with($d, 'aliases') + ->assertIsArray(); // handled by InterchangeBuilder + $this->context[] = 'aliases'; + foreach ($d->aliases as $alias) { + $this->validateId($alias); + $s = $alias->toString(); + if (isset($this->interchange->directives[$s])) { + $this->error("alias '$s'", 'collides with another directive'); + } + if (isset($this->aliases[$s])) { + $other_directive = $this->aliases[$s]; + $this->error("alias '$s'", "collides with alias for directive '$other_directive'"); + } + $this->aliases[$s] = $d->id->toString(); + } + array_pop($this->context); + } + + // protected helper functions + + /** + * Convenience function for generating HTMLPurifier_ConfigSchema_ValidatorAtom + * for validating simple member variables of objects. + * @param $obj + * @param $member + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + protected function with($obj, $member) + { + return new HTMLPurifier_ConfigSchema_ValidatorAtom($this->getFormattedContext(), $obj, $member); + } + + /** + * Emits an error, providing helpful context. + * @throws HTMLPurifier_ConfigSchema_Exception + */ + protected function error($target, $msg) + { + if ($target !== false) { + $prefix = ucfirst($target) . ' in ' . $this->getFormattedContext(); + } else { + $prefix = ucfirst($this->getFormattedContext()); + } + throw new HTMLPurifier_ConfigSchema_Exception(trim($prefix . ' ' . $msg)); + } + + /** + * Returns a formatted context string. + * @return string + */ + protected function getFormattedContext() + { + return implode(' in ', array_reverse($this->context)); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php new file mode 100644 index 0000000000000000000000000000000000000000..a2e0b4a1b3227f3d7ca043d3de233f77ad7c61ae --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php @@ -0,0 +1,130 @@ +<?php + +/** + * Fluent interface for validating the contents of member variables. + * This should be immutable. See HTMLPurifier_ConfigSchema_Validator for + * use-cases. We name this an 'atom' because it's ONLY for validations that + * are independent and usually scalar. + */ +class HTMLPurifier_ConfigSchema_ValidatorAtom +{ + /** + * @type string + */ + protected $context; + + /** + * @type object + */ + protected $obj; + + /** + * @type string + */ + protected $member; + + /** + * @type mixed + */ + protected $contents; + + public function __construct($context, $obj, $member) + { + $this->context = $context; + $this->obj = $obj; + $this->member = $member; + $this->contents =& $obj->$member; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertIsString() + { + if (!is_string($this->contents)) { + $this->error('must be a string'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertIsBool() + { + if (!is_bool($this->contents)) { + $this->error('must be a boolean'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertIsArray() + { + if (!is_array($this->contents)) { + $this->error('must be an array'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertNotNull() + { + if ($this->contents === null) { + $this->error('must not be null'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertAlnum() + { + $this->assertIsString(); + if (!ctype_alnum($this->contents)) { + $this->error('must be alphanumeric'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertNotEmpty() + { + if (empty($this->contents)) { + $this->error('must not be empty'); + } + return $this; + } + + /** + * @return HTMLPurifier_ConfigSchema_ValidatorAtom + */ + public function assertIsLookup() + { + $this->assertIsArray(); + foreach ($this->contents as $v) { + if ($v !== true) { + $this->error('must be a lookup array'); + } + } + return $this; + } + + /** + * @param string $msg + * @throws HTMLPurifier_ConfigSchema_Exception + */ + protected function error($msg) + { + throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member) . ' in ' . $this->context . ' ' . $msg); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema.ser b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema.ser new file mode 100644 index 0000000000000000000000000000000000000000..371e948f1c76d99bacea65b4735454656858edbf Binary files /dev/null and b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema.ser differ diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt new file mode 100644 index 0000000000000000000000000000000000000000..4a42382ec5838aea905ad254f98f6ce54856ceaa --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt @@ -0,0 +1,8 @@ +Attr.AllowedClasses +TYPE: lookup/null +VERSION: 4.0.0 +DEFAULT: null +--DESCRIPTION-- +List of allowed class values in the class attribute. By default, this is null, +which means all classes are allowed. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt index 249edd647b0f3a05e1e166145a30d35e27c7bb1a..b033eb516a7e5abc845cb60b634d500811246b32 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt @@ -1,12 +1,12 @@ -Attr.AllowedFrameTargets -TYPE: lookup -DEFAULT: array() ---DESCRIPTION-- -Lookup table of all allowed link frame targets. Some commonly used link -targets include _blank, _self, _parent and _top. Values should be -lowercase, as validation will be done in a case-sensitive manner despite -W3C's recommendation. XHTML 1.0 Strict does not permit the target attribute -so this directive will have no effect in that doctype. XHTML 1.1 does not -enable the Target module by default, you will have to manually enable it -(see the module documentation for more details.) ---# vim: et sw=4 sts=4 +Attr.AllowedFrameTargets +TYPE: lookup +DEFAULT: array() +--DESCRIPTION-- +Lookup table of all allowed link frame targets. Some commonly used link +targets include _blank, _self, _parent and _top. Values should be +lowercase, as validation will be done in a case-sensitive manner despite +W3C's recommendation. XHTML 1.0 Strict does not permit the target attribute +so this directive will have no effect in that doctype. XHTML 1.1 does not +enable the Target module by default, you will have to manually enable it +(see the module documentation for more details.) +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt index 9a8fa6a2e202c1f32eee1503293f1460cb8e2e1b..ed72a9d567cbd33b0e8813aa0c802975f0e87e1e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt @@ -1,9 +1,9 @@ -Attr.AllowedRel -TYPE: lookup -VERSION: 1.6.0 -DEFAULT: array() ---DESCRIPTION-- -List of allowed forward document relationships in the rel attribute. Common -values may be nofollow or print. By default, this is empty, meaning that no -document relationships are allowed. ---# vim: et sw=4 sts=4 +Attr.AllowedRel +TYPE: lookup +VERSION: 1.6.0 +DEFAULT: array() +--DESCRIPTION-- +List of allowed forward document relationships in the rel attribute. Common +values may be nofollow or print. By default, this is empty, meaning that no +document relationships are allowed. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt index b017883485953fa1bb6fa31e21e2f284a34d9baa..1ae672d019d7c3957cdc883412b25fc67d5b516f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt @@ -1,9 +1,9 @@ -Attr.AllowedRev -TYPE: lookup -VERSION: 1.6.0 -DEFAULT: array() ---DESCRIPTION-- -List of allowed reverse document relationships in the rev attribute. This -attribute is a bit of an edge-case; if you don't know what it is for, stay -away. ---# vim: et sw=4 sts=4 +Attr.AllowedRev +TYPE: lookup +VERSION: 1.6.0 +DEFAULT: array() +--DESCRIPTION-- +List of allowed reverse document relationships in the rev attribute. This +attribute is a bit of an edge-case; if you don't know what it is for, stay +away. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt new file mode 100644 index 0000000000000000000000000000000000000000..119a9d2c66991710e80840102ce38c85ca0971f8 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt @@ -0,0 +1,19 @@ +Attr.ClassUseCDATA +TYPE: bool/null +DEFAULT: null +VERSION: 4.0.0 +--DESCRIPTION-- +If null, class will auto-detect the doctype and, if matching XHTML 1.1 or +XHTML 2.0, will use the restrictive NMTOKENS specification of class. Otherwise, +it will use a relaxed CDATA definition. If true, the relaxed CDATA definition +is forced; if false, the NMTOKENS definition is forced. To get behavior +of HTML Purifier prior to 4.0.0, set this directive to false. + +Some rational behind the auto-detection: +in previous versions of HTML Purifier, it was assumed that the form of +class was NMTOKENS, as specified by the XHTML Modularization (representing +XHTML 1.1 and XHTML 2.0). The DTDs for HTML 4.01 and XHTML 1.0, however +specify class as CDATA. HTML 5 effectively defines it as CDATA, but +with the additional constraint that each name should be unique (this is not +explicitly outlined in previous specifications). +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt index 533165e17590060510a5e0f8046df8b78234fb74..80b1431c3d55dada17b4c8d7109c0b084a67d4f0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt @@ -1,11 +1,11 @@ -Attr.DefaultImageAlt -TYPE: string/null -DEFAULT: null -VERSION: 3.2.0 ---DESCRIPTION-- -This is the content of the alt tag of an image if the user had not -previously specified an alt attribute. This applies to all images without -a valid alt attribute, as opposed to %Attr.DefaultInvalidImageAlt, which -only applies to invalid images, and overrides in the case of an invalid image. -Default behavior with null is to use the basename of the src tag for the alt. ---# vim: et sw=4 sts=4 +Attr.DefaultImageAlt +TYPE: string/null +DEFAULT: null +VERSION: 3.2.0 +--DESCRIPTION-- +This is the content of the alt tag of an image if the user had not +previously specified an alt attribute. This applies to all images without +a valid alt attribute, as opposed to %Attr.DefaultInvalidImageAlt, which +only applies to invalid images, and overrides in the case of an invalid image. +Default behavior with null is to use the basename of the src tag for the alt. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt index 9eb7e38469f0c94ba880396a89ddf9da483005f2..c51000d1d76f5f804376f9a10b3a717d67664375 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt @@ -1,9 +1,9 @@ -Attr.DefaultInvalidImage -TYPE: string -DEFAULT: '' ---DESCRIPTION-- -This is the default image an img tag will be pointed to if it does not have -a valid src attribute. In future versions, we may allow the image tag to -be removed completely, but due to design issues, this is not possible right -now. ---# vim: et sw=4 sts=4 +Attr.DefaultInvalidImage +TYPE: string +DEFAULT: '' +--DESCRIPTION-- +This is the default image an img tag will be pointed to if it does not have +a valid src attribute. In future versions, we may allow the image tag to +be removed completely, but due to design issues, this is not possible right +now. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt index 2f17bf477a3dd2643fc3494b4926cc388fa287c2..c1ec4b038b830ff1ac4a4b2316fb056fa10f759e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt @@ -1,8 +1,8 @@ -Attr.DefaultInvalidImageAlt -TYPE: string -DEFAULT: 'Invalid image' ---DESCRIPTION-- -This is the content of the alt tag of an invalid image if the user had not -previously specified an alt attribute. It has no effect when the image is -valid but there was no alt attribute present. ---# vim: et sw=4 sts=4 +Attr.DefaultInvalidImageAlt +TYPE: string +DEFAULT: 'Invalid image' +--DESCRIPTION-- +This is the content of the alt tag of an invalid image if the user had not +previously specified an alt attribute. It has no effect when the image is +valid but there was no alt attribute present. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt index 52654b53ae315bfbe70103acc2129487f8176c56..f57dcc40f2ed2233a3110df8b9d2fe32770595c2 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt @@ -1,10 +1,10 @@ -Attr.DefaultTextDir -TYPE: string -DEFAULT: 'ltr' ---DESCRIPTION-- -Defines the default text direction (ltr or rtl) of the document being -parsed. This generally is the same as the value of the dir attribute in -HTML, or ltr if that is not specified. ---ALLOWED-- -'ltr', 'rtl' ---# vim: et sw=4 sts=4 +Attr.DefaultTextDir +TYPE: string +DEFAULT: 'ltr' +--DESCRIPTION-- +Defines the default text direction (ltr or rtl) of the document being +parsed. This generally is the same as the value of the dir attribute in +HTML, or ltr if that is not specified. +--ALLOWED-- +'ltr', 'rtl' +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt index 6440d210321ade5b9bdb529c1b88060316304974..9b93a5575e5b701659feb0974f692608d1a0cd16 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt @@ -1,16 +1,16 @@ -Attr.EnableID -TYPE: bool -DEFAULT: false -VERSION: 1.2.0 ---DESCRIPTION-- -Allows the ID attribute in HTML. This is disabled by default due to the -fact that without proper configuration user input can easily break the -validation of a webpage by specifying an ID that is already on the -surrounding HTML. If you don't mind throwing caution to the wind, enable -this directive, but I strongly recommend you also consider blacklisting IDs -you use (%Attr.IDBlacklist) or prefixing all user supplied IDs -(%Attr.IDPrefix). When set to true HTML Purifier reverts to the behavior of -pre-1.2.0 versions. ---ALIASES-- -HTML.EnableAttrID ---# vim: et sw=4 sts=4 +Attr.EnableID +TYPE: bool +DEFAULT: false +VERSION: 1.2.0 +--DESCRIPTION-- +Allows the ID attribute in HTML. This is disabled by default due to the +fact that without proper configuration user input can easily break the +validation of a webpage by specifying an ID that is already on the +surrounding HTML. If you don't mind throwing caution to the wind, enable +this directive, but I strongly recommend you also consider blacklisting IDs +you use (%Attr.IDBlacklist) or prefixing all user supplied IDs +(%Attr.IDPrefix). When set to true HTML Purifier reverts to the behavior of +pre-1.2.0 versions. +--ALIASES-- +HTML.EnableAttrID +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt new file mode 100644 index 0000000000000000000000000000000000000000..fed8954cf7530ede197dc693f8f44fb6c523cf1e --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt @@ -0,0 +1,8 @@ +Attr.ForbiddenClasses +TYPE: lookup +VERSION: 4.0.0 +DEFAULT: array() +--DESCRIPTION-- +List of forbidden class values in the class attribute. By default, this is +empty, which means that no classes are forbidden. See also %Attr.AllowedClasses. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt new file mode 100644 index 0000000000000000000000000000000000000000..c48e62fbe3f7675351f6b43ce81962fbd715456f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt @@ -0,0 +1,10 @@ +Attr.ID.HTML5 +TYPE: bool/null +DEFAULT: null +VERSION: 4.8.0 +--DESCRIPTION-- +In HTML5, restrictions on the format of the id attribute have been significantly +relaxed, such that any string is valid so long as it contains no spaces and +is at least one character. In lieu of a general HTML5 compatibility flag, +set this configuration directive to true to use the relaxed rules. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt index 5f2b5e3d2cda09d577272888aa2f3458e942009a..52168bb5e5b2948d4736b9fbe00f1b3aa864b81f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt @@ -1,5 +1,5 @@ -Attr.IDBlacklist -TYPE: list -DEFAULT: array() -DESCRIPTION: Array of IDs not allowed in the document. ---# vim: et sw=4 sts=4 +Attr.IDBlacklist +TYPE: list +DEFAULT: array() +DESCRIPTION: Array of IDs not allowed in the document. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt index 6f5824586ec4f37cabe8afefe5c372bb0c39f295..7b85043077279eb0a61b8f646b9d3d130da431bc 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt @@ -1,9 +1,9 @@ -Attr.IDBlacklistRegexp -TYPE: string/null -VERSION: 1.6.0 -DEFAULT: NULL ---DESCRIPTION-- -PCRE regular expression to be matched against all IDs. If the expression is -matches, the ID is rejected. Use this with care: may cause significant -degradation. ID matching is done after all other validation. ---# vim: et sw=4 sts=4 +Attr.IDBlacklistRegexp +TYPE: string/null +VERSION: 1.6.0 +DEFAULT: NULL +--DESCRIPTION-- +PCRE regular expression to be matched against all IDs. If the expression is +matches, the ID is rejected. Use this with care: may cause significant +degradation. ID matching is done after all other validation. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt index cc49d43fd0c68abab6877d5a30f0251ed7dcb8b0..5781382775e03abc12e24ef4c825006bbc5147d9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt @@ -1,12 +1,12 @@ -Attr.IDPrefix -TYPE: string -VERSION: 1.2.0 -DEFAULT: '' ---DESCRIPTION-- -String to prefix to IDs. If you have no idea what IDs your pages may use, -you may opt to simply add a prefix to all user-submitted ID attributes so -that they are still usable, but will not conflict with core page IDs. -Example: setting the directive to 'user_' will result in a user submitted -'foo' to become 'user_foo' Be sure to set %HTML.EnableAttrID to true -before using this. ---# vim: et sw=4 sts=4 +Attr.IDPrefix +TYPE: string +VERSION: 1.2.0 +DEFAULT: '' +--DESCRIPTION-- +String to prefix to IDs. If you have no idea what IDs your pages may use, +you may opt to simply add a prefix to all user-submitted ID attributes so +that they are still usable, but will not conflict with core page IDs. +Example: setting the directive to 'user_' will result in a user submitted +'foo' to become 'user_foo' Be sure to set %HTML.EnableAttrID to true +before using this. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt index 2c5924a7ade81d45386a280a40b2721c93299731..f91fcd602ba22dbd0e1aaf9f7d66340f0b3e5832 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt @@ -1,14 +1,14 @@ -Attr.IDPrefixLocal -TYPE: string -VERSION: 1.2.0 -DEFAULT: '' ---DESCRIPTION-- -Temporary prefix for IDs used in conjunction with %Attr.IDPrefix. If you -need to allow multiple sets of user content on web page, you may need to -have a seperate prefix that changes with each iteration. This way, -seperately submitted user content displayed on the same page doesn't -clobber each other. Ideal values are unique identifiers for the content it -represents (i.e. the id of the row in the database). Be sure to add a -seperator (like an underscore) at the end. Warning: this directive will -not work unless %Attr.IDPrefix is set to a non-empty value! ---# vim: et sw=4 sts=4 +Attr.IDPrefixLocal +TYPE: string +VERSION: 1.2.0 +DEFAULT: '' +--DESCRIPTION-- +Temporary prefix for IDs used in conjunction with %Attr.IDPrefix. If you +need to allow multiple sets of user content on web page, you may need to +have a seperate prefix that changes with each iteration. This way, +seperately submitted user content displayed on the same page doesn't +clobber each other. Ideal values are unique identifiers for the content it +represents (i.e. the id of the row in the database). Be sure to add a +seperator (like an underscore) at the end. Warning: this directive will +not work unless %Attr.IDPrefix is set to a non-empty value! +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt index d5caa1bb978b2e9368074dd9fb46c1842347a3ca..2d7f94e0236e973de07ebde3b458f6a3dc49c8ee 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt @@ -1,31 +1,31 @@ -AutoFormat.AutoParagraph -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -<p> - This directive turns on auto-paragraphing, where double newlines are - converted in to paragraphs whenever possible. Auto-paragraphing: -</p> -<ul> - <li>Always applies to inline elements or text in the root node,</li> - <li>Applies to inline elements or text with double newlines in nodes - that allow paragraph tags,</li> - <li>Applies to double newlines in paragraph tags</li> -</ul> -<p> - <code>p</code> tags must be allowed for this directive to take effect. - We do not use <code>br</code> tags for paragraphing, as that is - semantically incorrect. -</p> -<p> - To prevent auto-paragraphing as a content-producer, refrain from using - double-newlines except to specify a new paragraph or in contexts where - it has special meaning (whitespace usually has no meaning except in - tags like <code>pre</code>, so this should not be difficult.) To prevent - the paragraphing of inline text adjacent to block elements, wrap them - in <code>div</code> tags (the behavior is slightly different outside of - the root node.) -</p> ---# vim: et sw=4 sts=4 +AutoFormat.AutoParagraph +TYPE: bool +VERSION: 2.0.1 +DEFAULT: false +--DESCRIPTION-- + +<p> + This directive turns on auto-paragraphing, where double newlines are + converted in to paragraphs whenever possible. Auto-paragraphing: +</p> +<ul> + <li>Always applies to inline elements or text in the root node,</li> + <li>Applies to inline elements or text with double newlines in nodes + that allow paragraph tags,</li> + <li>Applies to double newlines in paragraph tags</li> +</ul> +<p> + <code>p</code> tags must be allowed for this directive to take effect. + We do not use <code>br</code> tags for paragraphing, as that is + semantically incorrect. +</p> +<p> + To prevent auto-paragraphing as a content-producer, refrain from using + double-newlines except to specify a new paragraph or in contexts where + it has special meaning (whitespace usually has no meaning except in + tags like <code>pre</code>, so this should not be difficult.) To prevent + the paragraphing of inline text adjacent to block elements, wrap them + in <code>div</code> tags (the behavior is slightly different outside of + the root node.) +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt index 2a476481af6c1030ddf13c2df1c78a4aafb8960a..2eb1974fd034c172ce643547a39e235226625c07 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt @@ -1,12 +1,12 @@ -AutoFormat.Custom -TYPE: list -VERSION: 2.0.1 -DEFAULT: array() ---DESCRIPTION-- - -<p> - This directive can be used to add custom auto-format injectors. - Specify an array of injector names (class name minus the prefix) - or concrete implementations. Injector class must exist. -</p> ---# vim: et sw=4 sts=4 +AutoFormat.Custom +TYPE: list +VERSION: 2.0.1 +DEFAULT: array() +--DESCRIPTION-- + +<p> + This directive can be used to add custom auto-format injectors. + Specify an array of injector names (class name minus the prefix) + or concrete implementations. Injector class must exist. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt index 663064a3447ba4155f9ed52e18786a58f4ce1689..c955de7f62578e1ea725c09be7b2506c7cc75371 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt @@ -1,11 +1,11 @@ -AutoFormat.DisplayLinkURI -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -<p> - This directive turns on the in-text display of URIs in <a> tags, and disables - those links. For example, <a href="http://example.com">example</a> becomes - example (<a>http://example.com</a>). -</p> ---# vim: et sw=4 sts=4 +AutoFormat.DisplayLinkURI +TYPE: bool +VERSION: 3.2.0 +DEFAULT: false +--DESCRIPTION-- +<p> + This directive turns on the in-text display of URIs in <a> tags, and disables + those links. For example, <a href="http://example.com">example</a> becomes + example (<a>http://example.com</a>). +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt index 3a48ba960e934877c00f4844eb248df416ecb6b9..328b2b2bfe0f5a290a3b1ac9c20026a406b130d3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt @@ -1,12 +1,12 @@ -AutoFormat.Linkify -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -<p> - This directive turns on linkification, auto-linking http, ftp and - https URLs. <code>a</code> tags with the <code>href</code> attribute - must be allowed. -</p> ---# vim: et sw=4 sts=4 +AutoFormat.Linkify +TYPE: bool +VERSION: 2.0.1 +DEFAULT: false +--DESCRIPTION-- + +<p> + This directive turns on linkification, auto-linking http, ftp and + https URLs. <code>a</code> tags with the <code>href</code> attribute + must be allowed. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.PurifierLinkifyDocURL.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.PurifierLinkifyDocURL.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt index 3e8309e39e2b9832b2777f63ec9049ad0e3b961b..d0532b6ba4322c1ee0b56be6d3b3fd3b736a0030 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormatParam.PurifierLinkifyDocURL.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt @@ -1,12 +1,12 @@ -AutoFormatParam.PurifierLinkifyDocURL -TYPE: string -VERSION: 2.0.1 -DEFAULT: '#%s' ---DESCRIPTION-- - -<p> - Location of configuration documentation to link to, let %s substitute - into the configuration's namespace and directive names sans the percent - sign. -</p> ---# vim: et sw=4 sts=4 +AutoFormat.PurifierLinkify.DocURL +TYPE: string +VERSION: 2.0.1 +DEFAULT: '#%s' +ALIASES: AutoFormatParam.PurifierLinkifyDocURL +--DESCRIPTION-- +<p> + Location of configuration documentation to link to, let %s substitute + into the configuration's namespace and directive names sans the percent + sign. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt index 7996488be0d0f94896da45b86db8944e900aeb31..f3ab259a1b3d1375130562f6c0500b14f07994ce 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt @@ -1,12 +1,12 @@ -AutoFormat.PurifierLinkify -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -<p> - Internal auto-formatter that converts configuration directives in - syntax <a>%Namespace.Directive</a> to links. <code>a</code> tags - with the <code>href</code> attribute must be allowed. -</p> ---# vim: et sw=4 sts=4 +AutoFormat.PurifierLinkify +TYPE: bool +VERSION: 2.0.1 +DEFAULT: false +--DESCRIPTION-- + +<p> + Internal auto-formatter that converts configuration directives in + syntax <a>%Namespace.Directive</a> to links. <code>a</code> tags + with the <code>href</code> attribute must be allowed. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt new file mode 100644 index 0000000000000000000000000000000000000000..376f771ea204547c4a965118372d8f4a676e137a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt @@ -0,0 +1,14 @@ +AutoFormat.RemoveEmpty.Predicate +TYPE: hash +VERSION: 4.7.0 +DEFAULT: array('colgroup' => array(), 'th' => array(), 'td' => array(), 'iframe' => array('src')) +--DESCRIPTION-- +<p> + Given that an element has no contents, it will be removed by default, unless + this predicate dictates otherwise. The predicate can either be an associative + map from tag name to list of attributes that must be present for the element + to be considered preserved: thus, the default always preserves <code>colgroup</code>, + <code>th</code> and <code>td</code>, and also <code>iframe</code> if it + has a <code>src</code>. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt new file mode 100644 index 0000000000000000000000000000000000000000..219d04ac4c2661db15cc273bd8bf54b32fa125e6 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt @@ -0,0 +1,11 @@ +AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions +TYPE: lookup +VERSION: 4.0.0 +DEFAULT: array('td' => true, 'th' => true) +--DESCRIPTION-- +<p> + When %AutoFormat.RemoveEmpty and %AutoFormat.RemoveEmpty.RemoveNbsp + are enabled, this directive defines what HTML elements should not be + removede if they have only a non-breaking space in them. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt new file mode 100644 index 0000000000000000000000000000000000000000..5f355d6622ee0249fabc74efe509b39c2c4ddce3 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt @@ -0,0 +1,15 @@ +AutoFormat.RemoveEmpty.RemoveNbsp +TYPE: bool +VERSION: 4.0.0 +DEFAULT: false +--DESCRIPTION-- +<p> + When enabled, HTML Purifier will treat any elements that contain only + non-breaking spaces as well as regular whitespace as empty, and remove + them when %AutoForamt.RemoveEmpty is enabled. +</p> +<p> + See %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions for a list of elements + that don't have this behavior applied to them. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt similarity index 87% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt index aaede47d62ffdd9c8d3b147b897b3e8283b927d6..6b5a7a5c9a3af69591b8d77c4700bce144cfc733 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt @@ -1,45 +1,46 @@ -AutoFormat.RemoveEmpty -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -<p> - When enabled, HTML Purifier will attempt to remove empty elements that - contribute no semantic information to the document. The following types - of nodes will be removed: -</p> -<ul><li> - Tags with no attributes and no content, and that are not empty - elements (remove <code><a></a></code> but not - <code><br /></code>), and - </li> - <li> - Tags with no content, except for:<ul> - <li>The <code>colgroup</code> element, or</li> - <li> - Elements with the <code>id</code> or <code>name</code> attribute, - when those attributes are permitted on those elements. - </li> - </ul></li> -</ul> -<p> - Please be very careful when using this functionality; while it may not - seem that empty elements contain useful information, they can alter the - layout of a document given appropriate styling. This directive is most - useful when you are processing machine-generated HTML, please avoid using - it on regular user HTML. -</p> -<p> - Elements that contain only whitespace will be treated as empty. Non-breaking - spaces, however, do not count as whitespace. -</p> -<p> - This algorithm is not perfect; you may still notice some empty tags, - particularly if a node had elements, but those elements were later removed - because they were not permitted in that context, or tags that, after - being auto-closed by another tag, where empty. This is for safety reasons - to prevent clever code from breaking validation. The general rule of thumb: - if a tag looked empty on the way end, it will get removed; if HTML Purifier - made it empty, it will stay. -</p> ---# vim: et sw=4 sts=4 +AutoFormat.RemoveEmpty +TYPE: bool +VERSION: 3.2.0 +DEFAULT: false +--DESCRIPTION-- +<p> + When enabled, HTML Purifier will attempt to remove empty elements that + contribute no semantic information to the document. The following types + of nodes will be removed: +</p> +<ul><li> + Tags with no attributes and no content, and that are not empty + elements (remove <code><a></a></code> but not + <code><br /></code>), and + </li> + <li> + Tags with no content, except for:<ul> + <li>The <code>colgroup</code> element, or</li> + <li> + Elements with the <code>id</code> or <code>name</code> attribute, + when those attributes are permitted on those elements. + </li> + </ul></li> +</ul> +<p> + Please be very careful when using this functionality; while it may not + seem that empty elements contain useful information, they can alter the + layout of a document given appropriate styling. This directive is most + useful when you are processing machine-generated HTML, please avoid using + it on regular user HTML. +</p> +<p> + Elements that contain only whitespace will be treated as empty. Non-breaking + spaces, however, do not count as whitespace. See + %AutoFormat.RemoveEmpty.RemoveNbsp for alternate behavior. +</p> +<p> + This algorithm is not perfect; you may still notice some empty tags, + particularly if a node had elements, but those elements were later removed + because they were not permitted in that context, or tags that, after + being auto-closed by another tag, where empty. This is for safety reasons + to prevent clever code from breaking validation. The general rule of thumb: + if a tag looked empty on the way in, it will get removed; if HTML Purifier + made it empty, it will stay. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt new file mode 100644 index 0000000000000000000000000000000000000000..a448770e50e875cf2fc36e1c472dd411b5c6e488 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt @@ -0,0 +1,11 @@ +AutoFormat.RemoveSpansWithoutAttributes +TYPE: bool +VERSION: 4.0.1 +DEFAULT: false +--DESCRIPTION-- +<p> + This directive causes <code>span</code> tags without any attributes + to be removed. It will also remove spans that had all attributes + removed during processing. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt new file mode 100644 index 0000000000000000000000000000000000000000..acfeab3c874e4e92977798a89b336506a9e1b515 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt @@ -0,0 +1,11 @@ +CSS.AllowDuplicates +TYPE: bool +DEFAULT: false +VERSION: 4.8.0 +--DESCRIPTION-- +<p> + By default, HTML Purifier removes duplicate CSS properties, + like <code>color:red; color:blue</code>. If this is set to + true, duplicate properties are allowed. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt index b324608f761c2d4f116576993beaefdef23fd237..8096eb01ae1588beb460d7491d1ebd2bb3bdb9b6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt @@ -1,8 +1,8 @@ -CSS.AllowImportant -TYPE: bool -DEFAULT: false -VERSION: 3.1.0 ---DESCRIPTION-- -This parameter determines whether or not !important cascade modifiers should -be allowed in user CSS. If false, !important will stripped. ---# vim: et sw=4 sts=4 +CSS.AllowImportant +TYPE: bool +DEFAULT: false +VERSION: 3.1.0 +--DESCRIPTION-- +This parameter determines whether or not !important cascade modifiers should +be allowed in user CSS. If false, !important will stripped. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt index 748be0eec8bee195ccfd3cbcbfa662ea76db9615..9d34debc45c842402eebe3fefcfe7cb89b830e0d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt @@ -1,11 +1,11 @@ -CSS.AllowTricky -TYPE: bool -DEFAULT: false -VERSION: 3.1.0 ---DESCRIPTION-- -This parameter determines whether or not to allow "tricky" CSS properties and -values. Tricky CSS properties/values can drastically modify page layout or -be used for deceptive practices but do not directly constitute a security risk. -For example, <code>display:none;</code> is considered a tricky property that -will only be allowed if this directive is set to true. ---# vim: et sw=4 sts=4 +CSS.AllowTricky +TYPE: bool +DEFAULT: false +VERSION: 3.1.0 +--DESCRIPTION-- +This parameter determines whether or not to allow "tricky" CSS properties and +values. Tricky CSS properties/values can drastically modify page layout or +be used for deceptive practices but do not directly constitute a security risk. +For example, <code>display:none;</code> is considered a tricky property that +will only be allowed if this directive is set to true. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt new file mode 100644 index 0000000000000000000000000000000000000000..7c2b54763e1d6b4a68ce7a8d78ab72dbfe88b0e4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt @@ -0,0 +1,12 @@ +CSS.AllowedFonts +TYPE: lookup/null +VERSION: 4.3.0 +DEFAULT: NULL +--DESCRIPTION-- +<p> + Allows you to manually specify a set of allowed fonts. If + <code>NULL</code>, all fonts are allowed. This directive + affects generic names (serif, sans-serif, monospace, cursive, + fantasy) as well as specific font families. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt index 460112ebe0ae49eff6c6514d1cd4461301117ebe..f1ba513c3ffaf8a65b7da4c6418864db2fde3621 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt @@ -1,18 +1,18 @@ -CSS.AllowedProperties -TYPE: lookup/null -VERSION: 3.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - If HTML Purifier's style attributes set is unsatisfactory for your needs, - you can overload it with your own list of tags to allow. Note that this - method is subtractive: it does its job by taking away from HTML Purifier - usual feature set, so you cannot add an attribute that HTML Purifier never - supported in the first place. -</p> -<p> - <strong>Warning:</strong> If another directive conflicts with the - elements here, <em>that</em> directive will win and override. -</p> ---# vim: et sw=4 sts=4 +CSS.AllowedProperties +TYPE: lookup/null +VERSION: 3.1.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + If HTML Purifier's style attributes set is unsatisfactory for your needs, + you can overload it with your own list of tags to allow. Note that this + method is subtractive: it does its job by taking away from HTML Purifier + usual feature set, so you cannot add an attribute that HTML Purifier never + supported in the first place. +</p> +<p> + <strong>Warning:</strong> If another directive conflicts with the + elements here, <em>that</em> directive will win and override. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt similarity index 94% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt index 5cb7dda3baea51be40f06bbc3d60e8eb97f333e7..96b410829e21cc39c4490222f42dca1c4dc8f2a1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt @@ -1,11 +1,11 @@ -CSS.DefinitionRev -TYPE: int -VERSION: 2.0.0 -DEFAULT: 1 ---DESCRIPTION-- - -<p> - Revision identifier for your custom definition. See - %HTML.DefinitionRev for details. -</p> ---# vim: et sw=4 sts=4 +CSS.DefinitionRev +TYPE: int +VERSION: 2.0.0 +DEFAULT: 1 +--DESCRIPTION-- + +<p> + Revision identifier for your custom definition. See + %HTML.DefinitionRev for details. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt new file mode 100644 index 0000000000000000000000000000000000000000..923e8e995cb641c580d94bc3f4800df40ae18fd0 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt @@ -0,0 +1,13 @@ +CSS.ForbiddenProperties +TYPE: lookup +VERSION: 4.2.0 +DEFAULT: array() +--DESCRIPTION-- +<p> + This is the logical inverse of %CSS.AllowedProperties, and it will + override that directive or any other directive. If possible, + %CSS.AllowedProperties is recommended over this directive, + because it can sometimes be difficult to tell whether or not you've + forbidden all of the CSS properties you truly would like to disallow. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt index 7a3291470ccb798f1590a24bd58fe082c29e7900..3808581e2b72c22dffb5064b6987e5f1354846ea 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt @@ -1,16 +1,16 @@ -CSS.MaxImgLength -TYPE: string/null -DEFAULT: '1200px' -VERSION: 3.1.1 ---DESCRIPTION-- -<p> - This parameter sets the maximum allowed length on <code>img</code> tags, - effectively the <code>width</code> and <code>height</code> properties. - Only absolute units of measurement (in, pt, pc, mm, cm) and pixels (px) are allowed. This is - in place to prevent imagecrash attacks, disable with null at your own risk. - This directive is similar to %HTML.MaxImgLength, and both should be - concurrently edited, although there are - subtle differences in the input format (the CSS max is a number with - a unit). -</p> ---# vim: et sw=4 sts=4 +CSS.MaxImgLength +TYPE: string/null +DEFAULT: '1200px' +VERSION: 3.1.1 +--DESCRIPTION-- +<p> + This parameter sets the maximum allowed length on <code>img</code> tags, + effectively the <code>width</code> and <code>height</code> properties. + Only absolute units of measurement (in, pt, pc, mm, cm) and pixels (px) are allowed. This is + in place to prevent imagecrash attacks, disable with null at your own risk. + This directive is similar to %HTML.MaxImgLength, and both should be + concurrently edited, although there are + subtle differences in the input format (the CSS max is a number with + a unit). +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt similarity index 94% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt index 148eedb8be29e951f5ad92075d83a4b5d85f7456..8a26f228dd98915e1d86642162329b6eede6c836 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt @@ -1,10 +1,10 @@ -CSS.Proprietary -TYPE: bool -VERSION: 3.0.0 -DEFAULT: false ---DESCRIPTION-- - -<p> - Whether or not to allow safe, proprietary CSS values. -</p> ---# vim: et sw=4 sts=4 +CSS.Proprietary +TYPE: bool +VERSION: 3.0.0 +DEFAULT: false +--DESCRIPTION-- + +<p> + Whether or not to allow safe, proprietary CSS values. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt new file mode 100644 index 0000000000000000000000000000000000000000..917ec42ba46d381a39330adc414a3efdd23ba394 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt @@ -0,0 +1,9 @@ +CSS.Trusted +TYPE: bool +VERSION: 4.2.1 +DEFAULT: false +--DESCRIPTION-- +Indicates whether or not the user's CSS input is trusted or not. If the +input is trusted, a more expansive set of allowed properties. See +also %HTML.Trusted. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt index c486724c88ae49e875f802b0eaf0c079c4003df7..afc6a87a64380f90db498c49322aac8cfe4012c3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt @@ -1,14 +1,14 @@ -Cache.DefinitionImpl -TYPE: string/null -VERSION: 2.0.0 -DEFAULT: 'Serializer' ---DESCRIPTION-- - -This directive defines which method to use when caching definitions, -the complex data-type that makes HTML Purifier tick. Set to null -to disable caching (not recommended, as you will see a definite -performance degradation). - ---ALIASES-- -Core.DefinitionCache ---# vim: et sw=4 sts=4 +Cache.DefinitionImpl +TYPE: string/null +VERSION: 2.0.0 +DEFAULT: 'Serializer' +--DESCRIPTION-- + +This directive defines which method to use when caching definitions, +the complex data-type that makes HTML Purifier tick. Set to null +to disable caching (not recommended, as you will see a definite +performance degradation). + +--ALIASES-- +Core.DefinitionCache +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt index 54036507d6ce240dff64f2d7009a2440d86c98f2..668f248af4e5d7f1013d6e0a0d11158106f8cc3f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt @@ -1,13 +1,13 @@ -Cache.SerializerPath -TYPE: string/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - Absolute path with no trailing slash to store serialized definitions in. - Default is within the - HTML Purifier library inside DefinitionCache/Serializer. This - path must be writable by the webserver. -</p> ---# vim: et sw=4 sts=4 +Cache.SerializerPath +TYPE: string/null +VERSION: 2.0.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + Absolute path with no trailing slash to store serialized definitions in. + Default is within the + HTML Purifier library inside DefinitionCache/Serializer. This + path must be writable by the webserver. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt new file mode 100644 index 0000000000000000000000000000000000000000..f6059e672018691d36533fe635d13bb6e9dd09c0 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt @@ -0,0 +1,16 @@ +Cache.SerializerPermissions +TYPE: int/null +VERSION: 4.3.0 +DEFAULT: 0755 +--DESCRIPTION-- + +<p> + Directory permissions of the files and directories created inside + the DefinitionCache/Serializer or other custom serializer path. +</p> +<p> + In HTML Purifier 4.8.0, this also supports <code>NULL</code>, + which means that no chmod'ing or directory creation shall + occur. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt index 568cbf3b32823326c2b662aba0fe43bbf993944c..e0fa378ea8859f347878f60ecf3ed02975c7e309 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt @@ -1,18 +1,18 @@ -Core.AggressivelyFixLt -TYPE: bool -VERSION: 2.1.0 -DEFAULT: true ---DESCRIPTION-- -<p> - This directive enables aggressive pre-filter fixes HTML Purifier can - perform in order to ensure that open angled-brackets do not get killed - during parsing stage. Enabling this will result in two preg_replace_callback - calls and at least two preg_replace calls for every HTML document parsed; - if your users make very well-formed HTML, you can set this directive false. - This has no effect when DirectLex is used. -</p> -<p> - <strong>Notice:</strong> This directive's default turned from false to true - in HTML Purifier 3.2.0. -</p> ---# vim: et sw=4 sts=4 +Core.AggressivelyFixLt +TYPE: bool +VERSION: 2.1.0 +DEFAULT: true +--DESCRIPTION-- +<p> + This directive enables aggressive pre-filter fixes HTML Purifier can + perform in order to ensure that open angled-brackets do not get killed + during parsing stage. Enabling this will result in two preg_replace_callback + calls and at least two preg_replace calls for every HTML document parsed; + if your users make very well-formed HTML, you can set this directive false. + This has no effect when DirectLex is used. +</p> +<p> + <strong>Notice:</strong> This directive's default turned from false to true + in HTML Purifier 3.2.0. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt new file mode 100644 index 0000000000000000000000000000000000000000..fb140b69dbd70a21ad478ef058625509b7e5b78b --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt @@ -0,0 +1,16 @@ +Core.AggressivelyRemoveScript +TYPE: bool +VERSION: 4.9.0 +DEFAULT: true +--DESCRIPTION-- +<p> + This directive enables aggressive pre-filter removal of + script tags. This is not necessary for security, + but it can help work around a bug in libxml where embedded + HTML elements inside script sections cause the parser to + choke. To revert to pre-4.9.0 behavior, set this to false. + This directive has no effect if %Core.Trusted is true, + %Core.RemoveScriptContents is false, or %Core.HiddenElements + does not contain script. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt new file mode 100644 index 0000000000000000000000000000000000000000..405d36f17416860b91941c50676058dbdf2e347e --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt @@ -0,0 +1,16 @@ +Core.AllowHostnameUnderscore +TYPE: bool +VERSION: 4.6.0 +DEFAULT: false +--DESCRIPTION-- +<p> + By RFC 1123, underscores are not permitted in host names. + (This is in contrast to the specification for DNS, RFC + 2181, which allows underscores.) + However, most browsers do the right thing when faced with + an underscore in the host name, and so some poorly written + websites are written with the expectation this should work. + Setting this parameter to true relaxes our allowed character + check so that underscores are permitted. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt index d7317911fa30e3ee87456d6ff669f1d872654ae7..c6ea06990fc54e73d3bec5ba20beb9e942fa3136 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt @@ -1,12 +1,12 @@ -Core.CollectErrors -TYPE: bool -VERSION: 2.0.0 -DEFAULT: false ---DESCRIPTION-- - -Whether or not to collect errors found while filtering the document. This -is a useful way to give feedback to your users. <strong>Warning:</strong> -Currently this feature is very patchy and experimental, with lots of -possible error messages not yet implemented. It will not cause any -problems, but it may not help your users either. ---# vim: et sw=4 sts=4 +Core.CollectErrors +TYPE: bool +VERSION: 2.0.0 +DEFAULT: false +--DESCRIPTION-- + +Whether or not to collect errors found while filtering the document. This +is a useful way to give feedback to your users. <strong>Warning:</strong> +Currently this feature is very patchy and experimental, with lots of +possible error messages not yet implemented. It will not cause any +problems, but it may not help your users either. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt similarity index 80% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt index 08b381d34c1aeb49f55293decbe18588826d95e9..f7823982534c9e1c9ae1937bb055e25c951252fb 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt @@ -1,28 +1,29 @@ -Core.ColorKeywords -TYPE: hash -VERSION: 2.0.0 ---DEFAULT-- -array ( - 'maroon' => '#800000', - 'red' => '#FF0000', - 'orange' => '#FFA500', - 'yellow' => '#FFFF00', - 'olive' => '#808000', - 'purple' => '#800080', - 'fuchsia' => '#FF00FF', - 'white' => '#FFFFFF', - 'lime' => '#00FF00', - 'green' => '#008000', - 'navy' => '#000080', - 'blue' => '#0000FF', - 'aqua' => '#00FFFF', - 'teal' => '#008080', - 'black' => '#000000', - 'silver' => '#C0C0C0', - 'gray' => '#808080', -) ---DESCRIPTION-- - -Lookup array of color names to six digit hexadecimal number corresponding -to color, with preceding hash mark. Used when parsing colors. ---# vim: et sw=4 sts=4 +Core.ColorKeywords +TYPE: hash +VERSION: 2.0.0 +--DEFAULT-- +array ( + 'maroon' => '#800000', + 'red' => '#FF0000', + 'orange' => '#FFA500', + 'yellow' => '#FFFF00', + 'olive' => '#808000', + 'purple' => '#800080', + 'fuchsia' => '#FF00FF', + 'white' => '#FFFFFF', + 'lime' => '#00FF00', + 'green' => '#008000', + 'navy' => '#000080', + 'blue' => '#0000FF', + 'aqua' => '#00FFFF', + 'teal' => '#008080', + 'black' => '#000000', + 'silver' => '#C0C0C0', + 'gray' => '#808080', +) +--DESCRIPTION-- + +Lookup array of color names to six digit hexadecimal number corresponding +to color, with preceding hash mark. Used when parsing colors. The lookup +is done in a case-insensitive manner. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt index 64b114fce2b108f426835b2f69281494e52b312d..656d3783a80fb43957a21be327345bf4036c398e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt @@ -1,14 +1,14 @@ -Core.ConvertDocumentToFragment -TYPE: bool -DEFAULT: true ---DESCRIPTION-- - -This parameter determines whether or not the filter should convert -input that is a full document with html and body tags to a fragment -of just the contents of a body tag. This parameter is simply something -HTML Purifier can do during an edge-case: for most inputs, this -processing is not necessary. - ---ALIASES-- -Core.AcceptFullDocuments ---# vim: et sw=4 sts=4 +Core.ConvertDocumentToFragment +TYPE: bool +DEFAULT: true +--DESCRIPTION-- + +This parameter determines whether or not the filter should convert +input that is a full document with html and body tags to a fragment +of just the contents of a body tag. This parameter is simply something +HTML Purifier can do during an edge-case: for most inputs, this +processing is not necessary. + +--ALIASES-- +Core.AcceptFullDocuments +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt index 36f16e07eaefe31bfc8814b1f6dcafeba6dbcaac..2f54e462a1525a6d373a0ef721e5c8f8b3eb4c9c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt @@ -1,17 +1,17 @@ -Core.DirectLexLineNumberSyncInterval -TYPE: int -VERSION: 2.0.0 -DEFAULT: 0 ---DESCRIPTION-- - -<p> - Specifies the number of tokens the DirectLex line number tracking - implementations should process before attempting to resyncronize the - current line count by manually counting all previous new-lines. When - at 0, this functionality is disabled. Lower values will decrease - performance, and this is only strictly necessary if the counting - algorithm is buggy (in which case you should report it as a bug). - This has no effect when %Core.MaintainLineNumbers is disabled or DirectLex is - not being used. -</p> ---# vim: et sw=4 sts=4 +Core.DirectLexLineNumberSyncInterval +TYPE: int +VERSION: 2.0.0 +DEFAULT: 0 +--DESCRIPTION-- + +<p> + Specifies the number of tokens the DirectLex line number tracking + implementations should process before attempting to resyncronize the + current line count by manually counting all previous new-lines. When + at 0, this functionality is disabled. Lower values will decrease + performance, and this is only strictly necessary if the counting + algorithm is buggy (in which case you should report it as a bug). + This has no effect when %Core.MaintainLineNumbers is disabled or DirectLex is + not being used. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt new file mode 100644 index 0000000000000000000000000000000000000000..3c63c923c8c784695f99cae638bd00e7b2ce18ec --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt @@ -0,0 +1,14 @@ +Core.DisableExcludes +TYPE: bool +DEFAULT: false +VERSION: 4.5.0 +--DESCRIPTION-- +<p> + This directive disables SGML-style exclusions, e.g. the exclusion of + <code><object></code> in any descendant of a + <code><pre></code> tag. Disabling excludes will allow some + invalid documents to pass through HTML Purifier, but HTML Purifier + will also be less likely to accidentally remove large documents during + processing. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt new file mode 100644 index 0000000000000000000000000000000000000000..7f498e7e7aa1171282359ce8a0952e1dec3993ed --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt @@ -0,0 +1,9 @@ +Core.EnableIDNA +TYPE: bool +DEFAULT: false +VERSION: 4.4.0 +--DESCRIPTION-- +Allows international domain names in URLs. This configuration option +requires the PEAR Net_IDNA2 module to be installed. It operates by +punycoding any internationalized host names for maximum portability. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt similarity index 98% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt index 8bfb47c3ac1c97a0f11bec501d4f5b6c60d4434a..89e2ae34b1b6d0e6ff544a01574e4d6e14fed261 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt @@ -1,15 +1,15 @@ -Core.Encoding -TYPE: istring -DEFAULT: 'utf-8' ---DESCRIPTION-- -If for some reason you are unable to convert all webpages to UTF-8, you can -use this directive as a stop-gap compatibility change to let HTML Purifier -deal with non UTF-8 input. This technique has notable deficiencies: -absolutely no characters outside of the selected character encoding will be -preserved, not even the ones that have been ampersand escaped (this is due -to a UTF-8 specific <em>feature</em> that automatically resolves all -entities), making it pretty useless for anything except the most I18N-blind -applications, although %Core.EscapeNonASCIICharacters offers fixes this -trouble with another tradeoff. This directive only accepts ISO-8859-1 if -iconv is not enabled. ---# vim: et sw=4 sts=4 +Core.Encoding +TYPE: istring +DEFAULT: 'utf-8' +--DESCRIPTION-- +If for some reason you are unable to convert all webpages to UTF-8, you can +use this directive as a stop-gap compatibility change to let HTML Purifier +deal with non UTF-8 input. This technique has notable deficiencies: +absolutely no characters outside of the selected character encoding will be +preserved, not even the ones that have been ampersand escaped (this is due +to a UTF-8 specific <em>feature</em> that automatically resolves all +entities), making it pretty useless for anything except the most I18N-blind +applications, although %Core.EscapeNonASCIICharacters offers fixes this +trouble with another tradeoff. This directive only accepts ISO-8859-1 if +iconv is not enabled. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt index 4d5b5055cd31d2f611125f8a0c52aec91ed79eb2..1cc3fcda2f36f7da3afb9fce68a4f99d7316ba5b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt @@ -1,10 +1,12 @@ -Core.EscapeInvalidChildren -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -When true, a child is found that is not allowed in the context of the -parent element will be transformed into text as if it were ASCII. When -false, that element and all internal tags will be dropped, though text will -be preserved. There is no option for dropping the element but preserving -child nodes. ---# vim: et sw=4 sts=4 +Core.EscapeInvalidChildren +TYPE: bool +DEFAULT: false +--DESCRIPTION-- +<p><strong>Warning:</strong> this configuration option is no longer does anything as of 4.6.0.</p> + +<p>When true, a child is found that is not allowed in the context of the +parent element will be transformed into text as if it were ASCII. When +false, that element and all internal tags will be dropped, though text will +be preserved. There is no option for dropping the element but preserving +child nodes.</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt index a7a5b249bb71bc7623d67ffb69e5dadc43f959aa..299775fab2e9c5b79c42767b38be61dac38ad354 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt @@ -1,7 +1,7 @@ -Core.EscapeInvalidTags -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -When true, invalid tags will be written back to the document as plain text. -Otherwise, they are silently dropped. ---# vim: et sw=4 sts=4 +Core.EscapeInvalidTags +TYPE: bool +DEFAULT: false +--DESCRIPTION-- +When true, invalid tags will be written back to the document as plain text. +Otherwise, they are silently dropped. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt index abb499948aca3b2402794f9b2709c8074ede5a00..f50db2f92a7a682a82e408f1e05a0478cb60b1f8 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt @@ -1,13 +1,13 @@ -Core.EscapeNonASCIICharacters -TYPE: bool -VERSION: 1.4.0 -DEFAULT: false ---DESCRIPTION-- -This directive overcomes a deficiency in %Core.Encoding by blindly -converting all non-ASCII characters into decimal numeric entities before -converting it to its native encoding. This means that even characters that -can be expressed in the non-UTF-8 encoding will be entity-ized, which can -be a real downer for encodings like Big5. It also assumes that the ASCII -repetoire is available, although this is the case for almost all encodings. -Anyway, use UTF-8! ---# vim: et sw=4 sts=4 +Core.EscapeNonASCIICharacters +TYPE: bool +VERSION: 1.4.0 +DEFAULT: false +--DESCRIPTION-- +This directive overcomes a deficiency in %Core.Encoding by blindly +converting all non-ASCII characters into decimal numeric entities before +converting it to its native encoding. This means that even characters that +can be expressed in the non-UTF-8 encoding will be entity-ized, which can +be a real downer for encodings like Big5. It also assumes that the ASCII +repetoire is available, although this is the case for almost all encodings. +Anyway, use UTF-8! +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt index 915391edb73fc1c3f573666ff436f6db6a149673..c337e47fca2732ebfbc2363311402b25a424d8fd 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt @@ -1,19 +1,19 @@ -Core.HiddenElements -TYPE: lookup ---DEFAULT-- -array ( - 'script' => true, - 'style' => true, -) ---DESCRIPTION-- - -<p> - This directive is a lookup array of elements which should have their - contents removed when they are not allowed by the HTML definition. - For example, the contents of a <code>script</code> tag are not - normally shown in a document, so if script tags are to be removed, - their contents should be removed to. This is opposed to a <code>b</code> - tag, which defines some presentational changes but does not hide its - contents. -</p> ---# vim: et sw=4 sts=4 +Core.HiddenElements +TYPE: lookup +--DEFAULT-- +array ( + 'script' => true, + 'style' => true, +) +--DESCRIPTION-- + +<p> + This directive is a lookup array of elements which should have their + contents removed when they are not allowed by the HTML definition. + For example, the contents of a <code>script</code> tag are not + normally shown in a document, so if script tags are to be removed, + their contents should be removed to. This is opposed to a <code>b</code> + tag, which defines some presentational changes but does not hide its + contents. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt index 233fca14f84b2020e0b8c83152d7c3bc83070ffc..ed1f39b5f889aac8bfa7e7a9fcad20b6b5e975db 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt @@ -1,10 +1,10 @@ -Core.Language -TYPE: string -VERSION: 2.0.0 -DEFAULT: 'en' ---DESCRIPTION-- - -ISO 639 language code for localizable things in HTML Purifier to use, -which is mainly error reporting. There is currently only an English (en) -translation, so this directive is currently useless. ---# vim: et sw=4 sts=4 +Core.Language +TYPE: string +VERSION: 2.0.0 +DEFAULT: 'en' +--DESCRIPTION-- + +ISO 639 language code for localizable things in HTML Purifier to use, +which is mainly error reporting. There is currently only an English (en) +translation, so this directive is currently useless. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt new file mode 100644 index 0000000000000000000000000000000000000000..81d9ae4dcf4e6ba8161178fc9c0bf1a87148f3a6 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt @@ -0,0 +1,36 @@ +Core.LegacyEntityDecoder +TYPE: bool +VERSION: 4.9.0 +DEFAULT: false +--DESCRIPTION-- +<p> + Prior to HTML Purifier 4.9.0, entities were decoded by performing + a global search replace for all entities whose decoded versions + did not have special meanings under HTML, and replaced them with + their decoded versions. We would match all entities, even if they did + not have a trailing semicolon, but only if there weren't any trailing + alphanumeric characters. +</p> +<table> +<tr><th>Original</th><th>Text</th><th>Attribute</th></tr> +<tr><td>&yen;</td><td>¥</td><td>¥</td></tr> +<tr><td>&yen</td><td>¥</td><td>¥</td></tr> +<tr><td>&yena</td><td>&yena</td><td>&yena</td></tr> +<tr><td>&yen=</td><td>¥=</td><td>¥=</td></tr> +</table> +<p> + In HTML Purifier 4.9.0, we changed the behavior of entity parsing + to match entities that had missing trailing semicolons in less + cases, to more closely match HTML5 parsing behavior: +</p> +<table> +<tr><th>Original</th><th>Text</th><th>Attribute</th></tr> +<tr><td>&yen;</td><td>¥</td><td>¥</td></tr> +<tr><td>&yen</td><td>¥</td><td>¥</td></tr> +<tr><td>&yena</td><td>¥a</td><td>&yena</td></tr> +<tr><td>&yen=</td><td>¥=</td><td>&yen=</td></tr> +</table> +<p> + This flag reverts back to pre-HTML Purifier 4.9.0 behavior. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt index 8983e2cca9b3a9863e87c021d980f55440de0c8c..e11c0152c2db268a3e6b9d3d1faece419bd6f8d3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt @@ -1,34 +1,34 @@ -Core.LexerImpl -TYPE: mixed/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - This parameter determines what lexer implementation can be used. The - valid values are: -</p> -<dl> - <dt><em>null</em></dt> - <dd> - Recommended, the lexer implementation will be auto-detected based on - your PHP-version and configuration. - </dd> - <dt><em>string</em> lexer identifier</dt> - <dd> - This is a slim way of manually overridding the implementation. - Currently recognized values are: DOMLex (the default PHP5 -implementation) - and DirectLex (the default PHP4 implementation). Only use this if - you know what you are doing: usually, the auto-detection will - manage things for cases you aren't even aware of. - </dd> - <dt><em>object</em> lexer instance</dt> - <dd> - Super-advanced: you can specify your own, custom, implementation that - implements the interface defined by <code>HTMLPurifier_Lexer</code>. - I may remove this option simply because I don't expect anyone - to use it. - </dd> -</dl> ---# vim: et sw=4 sts=4 +Core.LexerImpl +TYPE: mixed/null +VERSION: 2.0.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + This parameter determines what lexer implementation can be used. The + valid values are: +</p> +<dl> + <dt><em>null</em></dt> + <dd> + Recommended, the lexer implementation will be auto-detected based on + your PHP-version and configuration. + </dd> + <dt><em>string</em> lexer identifier</dt> + <dd> + This is a slim way of manually overridding the implementation. + Currently recognized values are: DOMLex (the default PHP5 +implementation) + and DirectLex (the default PHP4 implementation). Only use this if + you know what you are doing: usually, the auto-detection will + manage things for cases you aren't even aware of. + </dd> + <dt><em>object</em> lexer instance</dt> + <dd> + Super-advanced: you can specify your own, custom, implementation that + implements the interface defined by <code>HTMLPurifier_Lexer</code>. + I may remove this option simply because I don't expect anyone + to use it. + </dd> +</dl> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt index eb841a7597a0ab16913ca8396461692f936c0944..838f10f61cbf3831c5e831397d23d95cf62f2cb9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt @@ -1,16 +1,16 @@ -Core.MaintainLineNumbers -TYPE: bool/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - If true, HTML Purifier will add line number information to all tokens. - This is useful when error reporting is turned on, but can result in - significant performance degradation and should not be used when - unnecessary. This directive must be used with the DirectLex lexer, - as the DOMLex lexer does not (yet) support this functionality. - If the value is null, an appropriate value will be selected based - on other configuration. -</p> ---# vim: et sw=4 sts=4 +Core.MaintainLineNumbers +TYPE: bool/null +VERSION: 2.0.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + If true, HTML Purifier will add line number information to all tokens. + This is useful when error reporting is turned on, but can result in + significant performance degradation and should not be used when + unnecessary. This directive must be used with the DirectLex lexer, + as the DOMLex lexer does not (yet) support this functionality. + If the value is null, an appropriate value will be selected based + on other configuration. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt new file mode 100644 index 0000000000000000000000000000000000000000..94a88600de7d5f8e90e202c78ad0de163aff588d --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt @@ -0,0 +1,11 @@ +Core.NormalizeNewlines +TYPE: bool +VERSION: 4.2.0 +DEFAULT: true +--DESCRIPTION-- +<p> + Whether or not to normalize newlines to the operating + system default. When <code>false</code>, HTML Purifier + will attempt to preserve mixed newline files. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt index 4070c2a0de20439361abcc5446c8fe0c072d2346..704ac56c850bdd43d1ef0a0e32ace63091f3c46f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt @@ -1,12 +1,12 @@ -Core.RemoveInvalidImg -TYPE: bool -DEFAULT: true -VERSION: 1.3.0 ---DESCRIPTION-- - -<p> - This directive enables pre-emptive URI checking in <code>img</code> - tags, as the attribute validation strategy is not authorized to - remove elements from the document. Revert to pre-1.3.0 behavior by setting to false. -</p> ---# vim: et sw=4 sts=4 +Core.RemoveInvalidImg +TYPE: bool +DEFAULT: true +VERSION: 1.3.0 +--DESCRIPTION-- + +<p> + This directive enables pre-emptive URI checking in <code>img</code> + tags, as the attribute validation strategy is not authorized to + remove elements from the document. Revert to pre-1.3.0 behavior by setting to false. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt new file mode 100644 index 0000000000000000000000000000000000000000..ed6f13425ee14781b19ffde7b919cd7949e57b10 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt @@ -0,0 +1,11 @@ +Core.RemoveProcessingInstructions +TYPE: bool +VERSION: 4.2.0 +DEFAULT: false +--DESCRIPTION-- +Instead of escaping processing instructions in the form <code><? ... +?></code>, remove it out-right. This may be useful if the HTML +you are validating contains XML processing instruction gunk, however, +it can also be user-unfriendly for people attempting to post PHP +snippets. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt index a4cd966df89aa5f5ec80eff45e00e5fffb079b2f..efbe994c28c42d357aa69e47ac2729c32de70809 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt @@ -1,12 +1,12 @@ -Core.RemoveScriptContents -TYPE: bool/null -DEFAULT: NULL -VERSION: 2.0.0 -DEPRECATED-VERSION: 2.1.0 -DEPRECATED-USE: Core.HiddenElements ---DESCRIPTION-- -<p> - This directive enables HTML Purifier to remove not only script tags - but all of their contents. -</p> ---# vim: et sw=4 sts=4 +Core.RemoveScriptContents +TYPE: bool/null +DEFAULT: NULL +VERSION: 2.0.0 +DEPRECATED-VERSION: 2.1.0 +DEPRECATED-USE: Core.HiddenElements +--DESCRIPTION-- +<p> + This directive enables HTML Purifier to remove not only script tags + but all of their contents. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt index 3db50ef204b4fc5d57e7757b6316774aa6c214f1..861ae66c3a9b3086025e15102a82da0c86675f8e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt @@ -1,11 +1,11 @@ -Filter.Custom -TYPE: list -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -<p> - This directive can be used to add custom filters; it is nearly the - equivalent of the now deprecated <code>HTMLPurifier->addFilter()</code> - method. Specify an array of concrete implementations. -</p> ---# vim: et sw=4 sts=4 +Filter.Custom +TYPE: list +VERSION: 3.1.0 +DEFAULT: array() +--DESCRIPTION-- +<p> + This directive can be used to add custom filters; it is nearly the + equivalent of the now deprecated <code>HTMLPurifier->addFilter()</code> + method. Specify an array of concrete implementations. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksEscaping.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt similarity index 73% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksEscaping.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt index d436ed015800084bc97a3b2d29aabfe78793c5e7..69602635eab6cb47ff79cd25cbc920ddb826a0f1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksEscaping.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt @@ -1,14 +1,14 @@ -FilterParam.ExtractStyleBlocksEscaping -TYPE: bool -VERSION: 3.0.0 -DEFAULT: true -ALIASES: Filter.ExtractStyleBlocksEscaping ---DESCRIPTION-- - -<p> - Whether or not to escape the dangerous characters <, > and & - as \3C, \3E and \26, respectively. This is can be safely set to false - if the contents of StyleBlocks will be placed in an external stylesheet, - where there is no risk of it being interpreted as HTML. -</p> ---# vim: et sw=4 sts=4 +Filter.ExtractStyleBlocks.Escaping +TYPE: bool +VERSION: 3.0.0 +DEFAULT: true +ALIASES: Filter.ExtractStyleBlocksEscaping, FilterParam.ExtractStyleBlocksEscaping +--DESCRIPTION-- + +<p> + Whether or not to escape the dangerous characters <, > and & + as \3C, \3E and \26, respectively. This is can be safely set to false + if the contents of StyleBlocks will be placed in an external stylesheet, + where there is no risk of it being interpreted as HTML. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksScope.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt similarity index 88% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksScope.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt index 3943529c7b09f61c7f3b9161276bc84d9af5ddd9..baa81ae062f9ed0afda99f491aed9be014cd3788 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksScope.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt @@ -1,29 +1,29 @@ -FilterParam.ExtractStyleBlocksScope -TYPE: string/null -VERSION: 3.0.0 -DEFAULT: NULL -ALIASES: Filter.ExtractStyleBlocksScope ---DESCRIPTION-- - -<p> - If you would like users to be able to define external stylesheets, but - only allow them to specify CSS declarations for a specific node and - prevent them from fiddling with other elements, use this directive. - It accepts any valid CSS selector, and will prepend this to any - CSS declaration extracted from the document. For example, if this - directive is set to <code>#user-content</code> and a user uses the - selector <code>a:hover</code>, the final selector will be - <code>#user-content a:hover</code>. -</p> -<p> - The comma shorthand may be used; consider the above example, with - <code>#user-content, #user-content2</code>, the final selector will - be <code>#user-content a:hover, #user-content2 a:hover</code>. -</p> -<p> - <strong>Warning:</strong> It is possible for users to bypass this measure - using a naughty + selector. This is a bug in CSS Tidy 1.3, not HTML - Purifier, and I am working to get it fixed. Until then, HTML Purifier - performs a basic check to prevent this. -</p> ---# vim: et sw=4 sts=4 +Filter.ExtractStyleBlocks.Scope +TYPE: string/null +VERSION: 3.0.0 +DEFAULT: NULL +ALIASES: Filter.ExtractStyleBlocksScope, FilterParam.ExtractStyleBlocksScope +--DESCRIPTION-- + +<p> + If you would like users to be able to define external stylesheets, but + only allow them to specify CSS declarations for a specific node and + prevent them from fiddling with other elements, use this directive. + It accepts any valid CSS selector, and will prepend this to any + CSS declaration extracted from the document. For example, if this + directive is set to <code>#user-content</code> and a user uses the + selector <code>a:hover</code>, the final selector will be + <code>#user-content a:hover</code>. +</p> +<p> + The comma shorthand may be used; consider the above example, with + <code>#user-content, #user-content2</code>, the final selector will + be <code>#user-content a:hover, #user-content2 a:hover</code>. +</p> +<p> + <strong>Warning:</strong> It is possible for users to bypass this measure + using a naughty + selector. This is a bug in CSS Tidy 1.3, not HTML + Purifier, and I am working to get it fixed. Until then, HTML Purifier + performs a basic check to prevent this. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksTidyImpl.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt similarity index 83% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksTidyImpl.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt index cafccf8b53cc220933587e1bbca05d80ca6e89fb..3b7018917e78beef1f640a914daa66cc24ea9784 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/FilterParam.ExtractStyleBlocksTidyImpl.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt @@ -1,15 +1,16 @@ -FilterParam.ExtractStyleBlocksTidyImpl -TYPE: mixed/null -VERSION: 3.1.0 -DEFAULT: NULL ---DESCRIPTION-- -<p> - If left NULL, HTML Purifier will attempt to instantiate a <code>csstidy</code> - class to use for internal cleaning. This will usually be good enough. -</p> -<p> - However, for trusted user input, you can set this to <code>false</code> to - disable cleaning. In addition, you can supply your own concrete implementation - of Tidy's interface to use, although I don't know why you'd want to do that. -</p> ---# vim: et sw=4 sts=4 +Filter.ExtractStyleBlocks.TidyImpl +TYPE: mixed/null +VERSION: 3.1.0 +DEFAULT: NULL +ALIASES: FilterParam.ExtractStyleBlocksTidyImpl +--DESCRIPTION-- +<p> + If left NULL, HTML Purifier will attempt to instantiate a <code>csstidy</code> + class to use for internal cleaning. This will usually be good enough. +</p> +<p> + However, for trusted user input, you can set this to <code>false</code> to + disable cleaning. In addition, you can supply your own concrete implementation + of Tidy's interface to use, although I don't know why you'd want to do that. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt index 078d087417e2e5510d3d193704da98493bc5e89e..be0177d4e02d31592dcd070465e81581600139c3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt @@ -1,74 +1,74 @@ -Filter.ExtractStyleBlocks -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false -EXTERNAL: CSSTidy ---DESCRIPTION-- -<p> - This directive turns on the style block extraction filter, which removes - <code>style</code> blocks from input HTML, cleans them up with CSSTidy, - and places them in the <code>StyleBlocks</code> context variable, for further - use by you, usually to be placed in an external stylesheet, or a - <code>style</code> block in the <code>head</code> of your document. -</p> -<p> - Sample usage: -</p> -<pre><![CDATA[ -<?php - header('Content-type: text/html; charset=utf-8'); - echo '<?xml version="1.0" encoding="UTF-8"?>'; -?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> -<head> - <title>Filter.ExtractStyleBlocks</title> -<?php - require_once '/path/to/library/HTMLPurifier.auto.php'; - require_once '/path/to/csstidy.class.php'; - - $dirty = '<style>body {color:#F00;}</style> Some text'; - - $config = HTMLPurifier_Config::createDefault(); - $config->set('Filter', 'ExtractStyleBlocks', true); - $purifier = new HTMLPurifier($config); - - $html = $purifier->purify($dirty); - - // This implementation writes the stylesheets to the styles/ directory. - // You can also echo the styles inside the document, but it's a bit - // more difficult to make sure they get interpreted properly by - // browsers; try the usual CSS armoring techniques. - $styles = $purifier->context->get('StyleBlocks'); - $dir = 'styles/'; - if (!is_dir($dir)) mkdir($dir); - $hash = sha1($_GET['html']); - foreach ($styles as $i => $style) { - file_put_contents($name = $dir . $hash . "_$i"); - echo '<link rel="stylesheet" type="text/css" href="'.$name.'" />'; - } -?> -</head> -<body> - <div> - <?php echo $html; ?> - </div> -</b]]><![CDATA[ody> -</html> -]]></pre> -<p> - <strong>Warning:</strong> It is possible for a user to mount an - imagecrash attack using this CSS. Counter-measures are difficult; - it is not simply enough to limit the range of CSS lengths (using - relative lengths with many nesting levels allows for large values - to be attained without actually specifying them in the stylesheet), - and the flexible nature of selectors makes it difficult to selectively - disable lengths on image tags (HTML Purifier, however, does disable - CSS width and height in inline styling). There are probably two effective - counter measures: an explicit width and height set to auto in all - images in your document (unlikely) or the disabling of width and - height (somewhat reasonable). Whether or not these measures should be - used is left to the reader. -</p> ---# vim: et sw=4 sts=4 +Filter.ExtractStyleBlocks +TYPE: bool +VERSION: 3.1.0 +DEFAULT: false +EXTERNAL: CSSTidy +--DESCRIPTION-- +<p> + This directive turns on the style block extraction filter, which removes + <code>style</code> blocks from input HTML, cleans them up with CSSTidy, + and places them in the <code>StyleBlocks</code> context variable, for further + use by you, usually to be placed in an external stylesheet, or a + <code>style</code> block in the <code>head</code> of your document. +</p> +<p> + Sample usage: +</p> +<pre><![CDATA[ +<?php + header('Content-type: text/html; charset=utf-8'); + echo '<?xml version="1.0" encoding="UTF-8"?>'; +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> + <title>Filter.ExtractStyleBlocks</title> +<?php + require_once '/path/to/library/HTMLPurifier.auto.php'; + require_once '/path/to/csstidy.class.php'; + + $dirty = '<style>body {color:#F00;}</style> Some text'; + + $config = HTMLPurifier_Config::createDefault(); + $config->set('Filter', 'ExtractStyleBlocks', true); + $purifier = new HTMLPurifier($config); + + $html = $purifier->purify($dirty); + + // This implementation writes the stylesheets to the styles/ directory. + // You can also echo the styles inside the document, but it's a bit + // more difficult to make sure they get interpreted properly by + // browsers; try the usual CSS armoring techniques. + $styles = $purifier->context->get('StyleBlocks'); + $dir = 'styles/'; + if (!is_dir($dir)) mkdir($dir); + $hash = sha1($_GET['html']); + foreach ($styles as $i => $style) { + file_put_contents($name = $dir . $hash . "_$i"); + echo '<link rel="stylesheet" type="text/css" href="'.$name.'" />'; + } +?> +</head> +<body> + <div> + <?php echo $html; ?> + </div> +</b]]><![CDATA[ody> +</html> +]]></pre> +<p> + <strong>Warning:</strong> It is possible for a user to mount an + imagecrash attack using this CSS. Counter-measures are difficult; + it is not simply enough to limit the range of CSS lengths (using + relative lengths with many nesting levels allows for large values + to be attained without actually specifying them in the stylesheet), + and the flexible nature of selectors makes it difficult to selectively + disable lengths on image tags (HTML Purifier, however, does disable + CSS width and height in inline styling). There are probably two effective + counter measures: an explicit width and height set to auto in all + images in your document (unlikely) or the disabling of width and + height (somewhat reasonable). Whether or not these measures should be + used is left to the reader. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt index 7fa6536b2c70f4b2593bb5ab8d32e57cce560194..882218668565cb403c39f168fdc038e553717075 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt @@ -1,11 +1,16 @@ -Filter.YouTube -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false ---DESCRIPTION-- -<p> - This directive enables YouTube video embedding in HTML Purifier. Check - <a href="http://htmlpurifier.org/docs/enduser-youtube.html">this document - on embedding videos</a> for more information on what this filter does. -</p> ---# vim: et sw=4 sts=4 +Filter.YouTube +TYPE: bool +VERSION: 3.1.0 +DEFAULT: false +--DESCRIPTION-- +<p> + <strong>Warning:</strong> Deprecated in favor of %HTML.SafeObject and + %Output.FlashCompat (turn both on to allow YouTube videos and other + Flash content). +</p> +<p> + This directive enables YouTube video embedding in HTML Purifier. Check + <a href="http://htmlpurifier.org/docs/enduser-youtube.html">this document + on embedding videos</a> for more information on what this filter does. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt similarity index 53% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt index 3e231d2d16a5c9ee671f98f618263df48f8223a2..afd48a0d47dd553fba246d826ad62a17a794dec0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt @@ -1,22 +1,25 @@ -HTML.Allowed -TYPE: itext/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - This is a convenience directive that rolls the functionality of - %HTML.AllowedElements and %HTML.AllowedAttributes into one directive. - Specify elements and attributes that are allowed using: - <code>element1[attr1|attr2],element2...</code>. You can also use - newlines instead of commas to separate elements. -</p> -<p> - <strong>Warning</strong>: - All of the constraints on the component directives are still enforced. - The syntax is a <em>subset</em> of TinyMCE's <code>valid_elements</code> - whitelist: directly copy-pasting it here will probably result in - broken whitelists. If %HTML.AllowedElements or %HTML.AllowedAttributes - are set, this directive has no effect. -</p> ---# vim: et sw=4 sts=4 +HTML.Allowed +TYPE: itext/null +VERSION: 2.0.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + This is a preferred convenience directive that combines + %HTML.AllowedElements and %HTML.AllowedAttributes. + Specify elements and attributes that are allowed using: + <code>element1[attr1|attr2],element2...</code>. For example, + if you would like to only allow paragraphs and links, specify + <code>a[href],p</code>. You can specify attributes that apply + to all elements using an asterisk, e.g. <code>*[lang]</code>. + You can also use newlines instead of commas to separate elements. +</p> +<p> + <strong>Warning</strong>: + All of the constraints on the component directives are still enforced. + The syntax is a <em>subset</em> of TinyMCE's <code>valid_elements</code> + whitelist: directly copy-pasting it here will probably result in + broken whitelists. If %HTML.AllowedElements or %HTML.AllowedAttributes + are set, this directive has no effect. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt index fcf093f17d1fbda44affba011425726b7257357a..0e6ec54f33f0df5c26c1112f3d112832b072c605 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt @@ -1,19 +1,19 @@ -HTML.AllowedAttributes -TYPE: lookup/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - If HTML Purifier's attribute set is unsatisfactory, overload it! - The syntax is "tag.attr" or "*.attr" for the global attributes - (style, id, class, dir, lang, xml:lang). -</p> -<p> - <strong>Warning:</strong> If another directive conflicts with the - elements here, <em>that</em> directive will win and override. For - example, %HTML.EnableAttrID will take precedence over *.id in this - directive. You must set that directive to true before you can use - IDs at all. -</p> ---# vim: et sw=4 sts=4 +HTML.AllowedAttributes +TYPE: lookup/null +VERSION: 1.3.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + If HTML Purifier's attribute set is unsatisfactory, overload it! + The syntax is "tag.attr" or "*.attr" for the global attributes + (style, id, class, dir, lang, xml:lang). +</p> +<p> + <strong>Warning:</strong> If another directive conflicts with the + elements here, <em>that</em> directive will win and override. For + example, %HTML.EnableAttrID will take precedence over *.id in this + directive. You must set that directive to true before you can use + IDs at all. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt new file mode 100644 index 0000000000000000000000000000000000000000..8440bc39df45a00f7d17c317f2810f2b9672ac53 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt @@ -0,0 +1,10 @@ +HTML.AllowedComments +TYPE: lookup +VERSION: 4.4.0 +DEFAULT: array() +--DESCRIPTION-- +A whitelist which indicates what explicit comment bodies should be +allowed, modulo leading and trailing whitespace. See also %HTML.AllowedCommentsRegexp +(these directives are union'ed together, so a comment is considered +valid if any directive deems it valid.) +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt new file mode 100644 index 0000000000000000000000000000000000000000..b1e65beb16b246af6a697572b99112cb49d63864 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt @@ -0,0 +1,15 @@ +HTML.AllowedCommentsRegexp +TYPE: string/null +VERSION: 4.4.0 +DEFAULT: NULL +--DESCRIPTION-- +A regexp, which if it matches the body of a comment, indicates that +it should be allowed. Trailing and leading spaces are removed prior +to running this regular expression. +<strong>Warning:</strong> Make sure you specify +correct anchor metacharacters <code>^regex$</code>, otherwise you may accept +comments that you did not mean to! In particular, the regex <code>/foo|bar/</code> +is probably not sufficiently strict, since it also allows <code>foobar</code>. +See also %HTML.AllowedComments (these directives are union'ed together, +so a comment is considered valid if any directive deems it valid.) +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ca3c13ddbf193dad5e56804ed31e31c4a96873e1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt @@ -0,0 +1,23 @@ +HTML.AllowedElements +TYPE: lookup/null +VERSION: 1.3.0 +DEFAULT: NULL +--DESCRIPTION-- +<p> + If HTML Purifier's tag set is unsatisfactory for your needs, you can + overload it with your own list of tags to allow. If you change + this, you probably also want to change %HTML.AllowedAttributes; see + also %HTML.Allowed which lets you set allowed elements and + attributes at the same time. +</p> +<p> + If you attempt to allow an element that HTML Purifier does not know + about, HTML Purifier will raise an error. You will need to manually + tell HTML Purifier about this element by using the + <a href="http://htmlpurifier.org/docs/enduser-customize.html">advanced customization features.</a> +</p> +<p> + <strong>Warning:</strong> If another directive conflicts with the + elements here, <em>that</em> directive will win and override. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt index 5a59a55c083e47c9e7eef4bb6bc40e21258de588..e373791a58a825022f0f800f11f4353a6c0cdaa1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt @@ -1,20 +1,20 @@ -HTML.AllowedModules -TYPE: lookup/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - A doctype comes with a set of usual modules to use. Without having - to mucking about with the doctypes, you can quickly activate or - disable these modules by specifying which modules you wish to allow - with this directive. This is most useful for unit testing specific - modules, although end users may find it useful for their own ends. -</p> -<p> - If you specify a module that does not exist, the manager will silently - fail to use it, so be careful! User-defined modules are not affected - by this directive. Modules defined in %HTML.CoreModules are not - affected by this directive. -</p> ---# vim: et sw=4 sts=4 +HTML.AllowedModules +TYPE: lookup/null +VERSION: 2.0.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + A doctype comes with a set of usual modules to use. Without having + to mucking about with the doctypes, you can quickly activate or + disable these modules by specifying which modules you wish to allow + with this directive. This is most useful for unit testing specific + modules, although end users may find it useful for their own ends. +</p> +<p> + If you specify a module that does not exist, the manager will silently + fail to use it, so be careful! User-defined modules are not affected + by this directive. Modules defined in %HTML.CoreModules are not + affected by this directive. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt new file mode 100644 index 0000000000000000000000000000000000000000..75d680ee1eb21fdb838bbc1a20a511a059e7423d --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt @@ -0,0 +1,11 @@ +HTML.Attr.Name.UseCDATA +TYPE: bool +DEFAULT: false +VERSION: 4.0.0 +--DESCRIPTION-- +The W3C specification DTD defines the name attribute to be CDATA, not ID, due +to limitations of DTD. In certain documents, this relaxed behavior is desired, +whether it is to specify duplicate names, or to specify names that would be +illegal IDs (for example, names that begin with a digit.) Set this configuration +directive to true to use the relaxed parsing rules. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt index 45ae469ec9852bbb6cc85fb30123e3b3e300f99e..f32b802c6d59febc55abb0d4beb25537b1bbc4fa 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt @@ -1,18 +1,18 @@ -HTML.BlockWrapper -TYPE: string -VERSION: 1.3.0 -DEFAULT: 'p' ---DESCRIPTION-- - -<p> - String name of element to wrap inline elements that are inside a block - context. This only occurs in the children of blockquote in strict mode. -</p> -<p> - Example: by default value, - <code><blockquote>Foo</blockquote></code> would become - <code><blockquote><p>Foo</p></blockquote></code>. - The <code><p></code> tags can be replaced with whatever you desire, - as long as it is a block level element. -</p> ---# vim: et sw=4 sts=4 +HTML.BlockWrapper +TYPE: string +VERSION: 1.3.0 +DEFAULT: 'p' +--DESCRIPTION-- + +<p> + String name of element to wrap inline elements that are inside a block + context. This only occurs in the children of blockquote in strict mode. +</p> +<p> + Example: by default value, + <code><blockquote>Foo</blockquote></code> would become + <code><blockquote><p>Foo</p></blockquote></code>. + The <code><p></code> tags can be replaced with whatever you desire, + as long as it is a block level element. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt index 5246188795507b0c161f3d2c45ff3ddfc392dbfb..fc8e40205870f88ee93b3f403b914def921c6ea4 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt @@ -1,23 +1,23 @@ -HTML.CoreModules -TYPE: lookup -VERSION: 2.0.0 ---DEFAULT-- -array ( - 'Structure' => true, - 'Text' => true, - 'Hypertext' => true, - 'List' => true, - 'NonXMLCommonAttributes' => true, - 'XMLCommonAttributes' => true, - 'CommonAttributes' => true, -) ---DESCRIPTION-- - -<p> - Certain modularized doctypes (XHTML, namely), have certain modules - that must be included for the doctype to be an conforming document - type: put those modules here. By default, XHTML's core modules - are used. You can set this to a blank array to disable core module - protection, but this is not recommended. -</p> ---# vim: et sw=4 sts=4 +HTML.CoreModules +TYPE: lookup +VERSION: 2.0.0 +--DEFAULT-- +array ( + 'Structure' => true, + 'Text' => true, + 'Hypertext' => true, + 'List' => true, + 'NonXMLCommonAttributes' => true, + 'XMLCommonAttributes' => true, + 'CommonAttributes' => true, +) +--DESCRIPTION-- + +<p> + Certain modularized doctypes (XHTML, namely), have certain modules + that must be included for the doctype to be an conforming document + type: put those modules here. By default, XHTML's core modules + are used. You can set this to a blank array to disable core module + protection, but this is not recommended. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt index a64e3d7c363ebaa06b555c02f8a88c8da49013a9..187c0a0d5e197b44380923695435cc56333d5ae6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt @@ -1,9 +1,9 @@ -HTML.CustomDoctype -TYPE: string/null -VERSION: 2.0.1 -DEFAULT: NULL ---DESCRIPTION-- - -A custom doctype for power-users who defined there own document -type. This directive only applies when %HTML.Doctype is blank. ---# vim: et sw=4 sts=4 +HTML.CustomDoctype +TYPE: string/null +VERSION: 2.0.1 +DEFAULT: NULL +--DESCRIPTION-- + +A custom doctype for power-users who defined their own document +type. This directive only applies when %HTML.Doctype is blank. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt index 103db754a289a5c9ad194008325f41e317b538a7..f5433e3f1fb8f10e793a725a02e86bfd05c0364b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt @@ -1,33 +1,33 @@ -HTML.DefinitionID -TYPE: string/null -DEFAULT: NULL -VERSION: 2.0.0 ---DESCRIPTION-- - -<p> - Unique identifier for a custom-built HTML definition. If you edit - the raw version of the HTMLDefinition, introducing changes that the - configuration object does not reflect, you must specify this variable. - If you change your custom edits, you should change this directive, or - clear your cache. Example: -</p> -<pre> -$config = HTMLPurifier_Config::createDefault(); -$config->set('HTML', 'DefinitionID', '1'); -$def = $config->getHTMLDefinition(); -$def->addAttribute('a', 'tabindex', 'Number'); -</pre> -<p> - In the above example, the configuration is still at the defaults, but - using the advanced API, an extra attribute has been added. The - configuration object normally has no way of knowing that this change - has taken place, so it needs an extra directive: %HTML.DefinitionID. - If someone else attempts to use the default configuration, these two - pieces of code will not clobber each other in the cache, since one has - an extra directive attached to it. -</p> -<p> - You <em>must</em> specify a value to this directive to use the - advanced API features. -</p> ---# vim: et sw=4 sts=4 +HTML.DefinitionID +TYPE: string/null +DEFAULT: NULL +VERSION: 2.0.0 +--DESCRIPTION-- + +<p> + Unique identifier for a custom-built HTML definition. If you edit + the raw version of the HTMLDefinition, introducing changes that the + configuration object does not reflect, you must specify this variable. + If you change your custom edits, you should change this directive, or + clear your cache. Example: +</p> +<pre> +$config = HTMLPurifier_Config::createDefault(); +$config->set('HTML', 'DefinitionID', '1'); +$def = $config->getHTMLDefinition(); +$def->addAttribute('a', 'tabindex', 'Number'); +</pre> +<p> + In the above example, the configuration is still at the defaults, but + using the advanced API, an extra attribute has been added. The + configuration object normally has no way of knowing that this change + has taken place, so it needs an extra directive: %HTML.DefinitionID. + If someone else attempts to use the default configuration, these two + pieces of code will not clobber each other in the cache, since one has + an extra directive attached to it. +</p> +<p> + You <em>must</em> specify a value to this directive to use the + advanced API features. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt index 229ae0267a6ff6eae15db65167045f89f1179e16..0bb5a718d5f5fa1fb699c993b0069b4dfbc4cffd 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt @@ -1,16 +1,16 @@ -HTML.DefinitionRev -TYPE: int -VERSION: 2.0.0 -DEFAULT: 1 ---DESCRIPTION-- - -<p> - Revision identifier for your custom definition specified in - %HTML.DefinitionID. This serves the same purpose: uniquely identifying - your custom definition, but this one does so in a chronological - context: revision 3 is more up-to-date then revision 2. Thus, when - this gets incremented, the cache handling is smart enough to clean - up any older revisions of your definition as well as flush the - cache. -</p> ---# vim: et sw=4 sts=4 +HTML.DefinitionRev +TYPE: int +VERSION: 2.0.0 +DEFAULT: 1 +--DESCRIPTION-- + +<p> + Revision identifier for your custom definition specified in + %HTML.DefinitionID. This serves the same purpose: uniquely identifying + your custom definition, but this one does so in a chronological + context: revision 3 is more up-to-date then revision 2. Thus, when + this gets incremented, the cache handling is smart enough to clean + up any older revisions of your definition as well as flush the + cache. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt index 9dab497f2f3ca79e9b217a0631a06b19ce83dd3e..a6969b99571b377ea04101e7000c4e7ac975ccb2 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt @@ -1,11 +1,11 @@ -HTML.Doctype -TYPE: string/null -DEFAULT: NULL ---DESCRIPTION-- -Doctype to use during filtering. Technically speaking this is not actually -a doctype (as it does not identify a corresponding DTD), but we are using -this name for sake of simplicity. When non-blank, this will override any -older directives like %HTML.XHTML or %HTML.Strict. ---ALLOWED-- -'HTML 4.01 Transitional', 'HTML 4.01 Strict', 'XHTML 1.0 Transitional', 'XHTML 1.0 Strict', 'XHTML 1.1' ---# vim: et sw=4 sts=4 +HTML.Doctype +TYPE: string/null +DEFAULT: NULL +--DESCRIPTION-- +Doctype to use during filtering. Technically speaking this is not actually +a doctype (as it does not identify a corresponding DTD), but we are using +this name for sake of simplicity. When non-blank, this will override any +older directives like %HTML.XHTML or %HTML.Strict. +--ALLOWED-- +'HTML 4.01 Transitional', 'HTML 4.01 Strict', 'XHTML 1.0 Transitional', 'XHTML 1.0 Strict', 'XHTML 1.1' +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt new file mode 100644 index 0000000000000000000000000000000000000000..08d641f954ac7f2fbf495b039d7f3350bd4ec172 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt @@ -0,0 +1,11 @@ +HTML.FlashAllowFullScreen +TYPE: bool +VERSION: 4.2.0 +DEFAULT: false +--DESCRIPTION-- +<p> + Whether or not to permit embedded Flash content from + %HTML.SafeObject to expand to the full screen. Corresponds to + the <code>allowFullScreen</code> parameter. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt index 57358f9bad296bca1b977480b11f6c0e89e6171c..2b8df97cbd95d9e36132bc56d9afd10ce5d14db5 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt @@ -1,21 +1,21 @@ -HTML.ForbiddenAttributes -TYPE: lookup -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -<p> - While this directive is similar to %HTML.AllowedAttributes, for - forwards-compatibility with XML, this attribute has a different syntax. Instead of - <code>tag.attr</code>, use <code>tag@attr</code>. To disallow <code>href</code> - attributes in <code>a</code> tags, set this directive to - <code>a@href</code>. You can also disallow an attribute globally with - <code>attr</code> or <code>*@attr</code> (either syntax is fine; the latter - is provided for consistency with %HTML.AllowedAttributes). -</p> -<p> - <strong>Warning:</strong> This directive complements %HTML.ForbiddenElements, - accordingly, check - out that directive for a discussion of why you - should think twice before using this directive. -</p> ---# vim: et sw=4 sts=4 +HTML.ForbiddenAttributes +TYPE: lookup +VERSION: 3.1.0 +DEFAULT: array() +--DESCRIPTION-- +<p> + While this directive is similar to %HTML.AllowedAttributes, for + forwards-compatibility with XML, this attribute has a different syntax. Instead of + <code>tag.attr</code>, use <code>tag@attr</code>. To disallow <code>href</code> + attributes in <code>a</code> tags, set this directive to + <code>a@href</code>. You can also disallow an attribute globally with + <code>attr</code> or <code>*@attr</code> (either syntax is fine; the latter + is provided for consistency with %HTML.AllowedAttributes). +</p> +<p> + <strong>Warning:</strong> This directive complements %HTML.ForbiddenElements, + accordingly, check + out that directive for a discussion of why you + should think twice before using this directive. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt index 93a53e14fb4e9532479a6727c1bae261c8c634ff..40466c463d2c068aeb22235443c010b8d0b2123f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt @@ -1,20 +1,20 @@ -HTML.ForbiddenElements -TYPE: lookup -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -<p> - This was, perhaps, the most requested feature ever in HTML - Purifier. Please don't abuse it! This is the logical inverse of - %HTML.AllowedElements, and it will override that directive, or any - other directive. -</p> -<p> - If possible, %HTML.Allowed is recommended over this directive, because it - can sometimes be difficult to tell whether or not you've forbidden all of - the behavior you would like to disallow. If you forbid <code>img</code> - with the expectation of preventing images on your site, you'll be in for - a nasty surprise when people start using the <code>background-image</code> - CSS property. -</p> ---# vim: et sw=4 sts=4 +HTML.ForbiddenElements +TYPE: lookup +VERSION: 3.1.0 +DEFAULT: array() +--DESCRIPTION-- +<p> + This was, perhaps, the most requested feature ever in HTML + Purifier. Please don't abuse it! This is the logical inverse of + %HTML.AllowedElements, and it will override that directive, or any + other directive. +</p> +<p> + If possible, %HTML.Allowed is recommended over this directive, because it + can sometimes be difficult to tell whether or not you've forbidden all of + the behavior you would like to disallow. If you forbid <code>img</code> + with the expectation of preventing images on your site, you'll be in for + a nasty surprise when people start using the <code>background-image</code> + CSS property. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt index e424c386ec31e391ee7c12e186af4a51d6101f2a..319747954810e72a5a9b94cd9d71c48bcb1c71ce 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt @@ -1,14 +1,14 @@ -HTML.MaxImgLength -TYPE: int/null -DEFAULT: 1200 -VERSION: 3.1.1 ---DESCRIPTION-- -<p> - This directive controls the maximum number of pixels in the width and - height attributes in <code>img</code> tags. This is - in place to prevent imagecrash attacks, disable with null at your own risk. - This directive is similar to %CSS.MaxImgLength, and both should be - concurrently edited, although there are - subtle differences in the input format (the HTML max is an integer). -</p> ---# vim: et sw=4 sts=4 +HTML.MaxImgLength +TYPE: int/null +DEFAULT: 1200 +VERSION: 3.1.1 +--DESCRIPTION-- +<p> + This directive controls the maximum number of pixels in the width and + height attributes in <code>img</code> tags. This is + in place to prevent imagecrash attacks, disable with null at your own risk. + This directive is similar to %CSS.MaxImgLength, and both should be + concurrently edited, although there are + subtle differences in the input format (the HTML max is an integer). +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt new file mode 100644 index 0000000000000000000000000000000000000000..7aa356353c12edcc93d74f00b966d656af2b1591 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt @@ -0,0 +1,7 @@ +HTML.Nofollow +TYPE: bool +VERSION: 4.3.0 +DEFAULT: FALSE +--DESCRIPTION-- +If enabled, nofollow rel attributes are added to all outgoing links. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt index 62e8e160c736570c69a1d5655dfad97053f85b16..2d2fbd1175211db73caf55af8b6c1681b3977c03 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt @@ -1,12 +1,12 @@ -HTML.Parent -TYPE: string -VERSION: 1.3.0 -DEFAULT: 'div' ---DESCRIPTION-- - -<p> - String name of element that HTML fragment passed to library will be - inserted in. An interesting variation would be using span as the - parent element, meaning that only inline tags would be allowed. -</p> ---# vim: et sw=4 sts=4 +HTML.Parent +TYPE: string +VERSION: 1.3.0 +DEFAULT: 'div' +--DESCRIPTION-- + +<p> + String name of element that HTML fragment passed to library will be + inserted in. An interesting variation would be using span as the + parent element, meaning that only inline tags would be allowed. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt index dfb720496dab5aa44f3893c53a90ff64f14d53b0..b3c45e19094f6e68d31ffd0b4ec4f822055c9d17 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt @@ -1,12 +1,12 @@ -HTML.Proprietary -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false ---DESCRIPTION-- -<p> - Whether or not to allow proprietary elements and attributes in your - documents, as per <code>HTMLPurifier_HTMLModule_Proprietary</code>. - <strong>Warning:</strong> This can cause your documents to stop - validating! -</p> ---# vim: et sw=4 sts=4 +HTML.Proprietary +TYPE: bool +VERSION: 3.1.0 +DEFAULT: false +--DESCRIPTION-- +<p> + Whether or not to allow proprietary elements and attributes in your + documents, as per <code>HTMLPurifier_HTMLModule_Proprietary</code>. + <strong>Warning:</strong> This can cause your documents to stop + validating! +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt index f635a68548bad4985efd5615b6df8cd79d0f4fdf..556fa674f8310dcb7533df698a7f7017a644d4da 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt @@ -1,14 +1,13 @@ -HTML.SafeEmbed -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -<p> - Whether or not to permit embed tags in documents, with a number of extra - security features added to prevent script execution. This is similar to - what websites like MySpace do to embed tags. Embed is a proprietary - element and will cause your website to stop validating. You probably want - to enable this with %HTML.SafeObject. - <strong>Highly experimental.</strong> -</p> ---# vim: et sw=4 sts=4 +HTML.SafeEmbed +TYPE: bool +VERSION: 3.1.1 +DEFAULT: false +--DESCRIPTION-- +<p> + Whether or not to permit embed tags in documents, with a number of extra + security features added to prevent script execution. This is similar to + what websites like MySpace do to embed tags. Embed is a proprietary + element and will cause your website to stop validating; you should + see if you can use %Output.FlashCompat with %HTML.SafeObject instead + first.</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt new file mode 100644 index 0000000000000000000000000000000000000000..295a8cf6608db896694d8e8da9f7c6dd8971b8a1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt @@ -0,0 +1,13 @@ +HTML.SafeIframe +TYPE: bool +VERSION: 4.4.0 +DEFAULT: false +--DESCRIPTION-- +<p> + Whether or not to permit iframe tags in untrusted documents. This + directive must be accompanied by a whitelist of permitted iframes, + such as %URI.SafeIframeRegexp, otherwise it will fatally error. + This directive has no effect on strict doctypes, as iframes are not + valid. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt new file mode 100644 index 0000000000000000000000000000000000000000..07f6e536e37a0a65e552c7817983fd88f1c54b67 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt @@ -0,0 +1,13 @@ +HTML.SafeObject +TYPE: bool +VERSION: 3.1.1 +DEFAULT: false +--DESCRIPTION-- +<p> + Whether or not to permit object tags in documents, with a number of extra + security features added to prevent script execution. This is similar to + what websites like MySpace do to object tags. You should also enable + %Output.FlashCompat in order to generate Internet Explorer + compatibility code for your object tags. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt new file mode 100644 index 0000000000000000000000000000000000000000..641b4a8d6b40f158e7648c0175a5af7ea34ecf15 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt @@ -0,0 +1,10 @@ +HTML.SafeScripting +TYPE: lookup +VERSION: 4.5.0 +DEFAULT: array() +--DESCRIPTION-- +<p> + Whether or not to permit script tags to external scripts in documents. + Inline scripting is not allowed, and the script must match an explicit whitelist. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt index a8b1de56bef7e9847fdf0c6e0ad9f9c1c6195929..d99663a5ee59ef13e5bf3b4460d79c5898f4e2c1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt @@ -1,9 +1,9 @@ -HTML.Strict -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false -DEPRECATED-VERSION: 1.7.0 -DEPRECATED-USE: HTML.Doctype ---DESCRIPTION-- -Determines whether or not to use Transitional (loose) or Strict rulesets. ---# vim: et sw=4 sts=4 +HTML.Strict +TYPE: bool +VERSION: 1.3.0 +DEFAULT: false +DEPRECATED-VERSION: 1.7.0 +DEPRECATED-USE: HTML.Doctype +--DESCRIPTION-- +Determines whether or not to use Transitional (loose) or Strict rulesets. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt new file mode 100644 index 0000000000000000000000000000000000000000..d65f0d041a940972c036a423c1e5c0453ac9160f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt @@ -0,0 +1,8 @@ +HTML.TargetBlank +TYPE: bool +VERSION: 4.4.0 +DEFAULT: FALSE +--DESCRIPTION-- +If enabled, <code>target=blank</code> attributes are added to all outgoing links. +(This includes links from an HTTPS version of a page to an HTTP version.) +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt new file mode 100644 index 0000000000000000000000000000000000000000..05cb3424f896b55c6b5122b249c0d2ffa564fe47 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt @@ -0,0 +1,10 @@ +--# vim: et sw=4 sts=4 +HTML.TargetNoopener +TYPE: bool +VERSION: 4.8.0 +DEFAULT: TRUE +--DESCRIPTION-- +If enabled, noopener rel attributes are added to links which have +a target attribute associated with them. This prevents malicious +destinations from overwriting the original window. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt new file mode 100644 index 0000000000000000000000000000000000000000..993a81704ee9f2ed2c1bd191aa0a5c87c1b6c222 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt @@ -0,0 +1,9 @@ +HTML.TargetNoreferrer +TYPE: bool +VERSION: 4.8.0 +DEFAULT: TRUE +--DESCRIPTION-- +If enabled, noreferrer rel attributes are added to links which have +a target attribute associated with them. This prevents malicious +destinations from overwriting the original window. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt index b4c271b7fac768967c9b7f36c22075e88c9e8b33..602453f6ee64d9de3134f707c9bd8c332c32b6f4 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt @@ -1,8 +1,8 @@ -HTML.TidyAdd -TYPE: lookup -VERSION: 2.0.0 -DEFAULT: array() ---DESCRIPTION-- - -Fixes to add to the default set of Tidy fixes as per your level. ---# vim: et sw=4 sts=4 +HTML.TidyAdd +TYPE: lookup +VERSION: 2.0.0 +DEFAULT: array() +--DESCRIPTION-- + +Fixes to add to the default set of Tidy fixes as per your level. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt index 4186ccd0d196ad2a4846c7e25781e1f119c067c6..bf943e8f0112e08f1d63370d754a9a3a6a7f66c8 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt @@ -1,24 +1,24 @@ -HTML.TidyLevel -TYPE: string -VERSION: 2.0.0 -DEFAULT: 'medium' ---DESCRIPTION-- - -<p>General level of cleanliness the Tidy module should enforce. -There are four allowed values:</p> -<dl> - <dt>none</dt> - <dd>No extra tidying should be done</dd> - <dt>light</dt> - <dd>Only fix elements that would be discarded otherwise due to - lack of support in doctype</dd> - <dt>medium</dt> - <dd>Enforce best practices</dd> - <dt>heavy</dt> - <dd>Transform all deprecated elements and attributes to standards - compliant equivalents</dd> -</dl> - ---ALLOWED-- -'none', 'light', 'medium', 'heavy' ---# vim: et sw=4 sts=4 +HTML.TidyLevel +TYPE: string +VERSION: 2.0.0 +DEFAULT: 'medium' +--DESCRIPTION-- + +<p>General level of cleanliness the Tidy module should enforce. +There are four allowed values:</p> +<dl> + <dt>none</dt> + <dd>No extra tidying should be done</dd> + <dt>light</dt> + <dd>Only fix elements that would be discarded otherwise due to + lack of support in doctype</dd> + <dt>medium</dt> + <dd>Enforce best practices</dd> + <dt>heavy</dt> + <dd>Transform all deprecated elements and attributes to standards + compliant equivalents</dd> +</dl> + +--ALLOWED-- +'none', 'light', 'medium', 'heavy' +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt index 996762bd1d66f725cd76f456326672a0cc86b208..92cca2a4340a8560d483ad0ea0d7ae552a5bfd9d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt @@ -1,8 +1,8 @@ -HTML.TidyRemove -TYPE: lookup -VERSION: 2.0.0 -DEFAULT: array() ---DESCRIPTION-- - -Fixes to remove from the default set of Tidy fixes as per your level. ---# vim: et sw=4 sts=4 +HTML.TidyRemove +TYPE: lookup +VERSION: 2.0.0 +DEFAULT: array() +--DESCRIPTION-- + +Fixes to remove from the default set of Tidy fixes as per your level. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt similarity index 88% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt index 89133b1a385d326c1e2882e7d1f18f75a09edb60..bc8e65499d65107bf3aa3b4758cc531c97930fa8 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt @@ -1,8 +1,9 @@ -HTML.Trusted -TYPE: bool -VERSION: 2.0.0 -DEFAULT: false ---DESCRIPTION-- -Indicates whether or not the user input is trusted or not. If the input is -trusted, a more expansive set of allowed tags and attributes will be used. ---# vim: et sw=4 sts=4 +HTML.Trusted +TYPE: bool +VERSION: 2.0.0 +DEFAULT: false +--DESCRIPTION-- +Indicates whether or not the user input is trusted or not. If the input is +trusted, a more expansive set of allowed tags and attributes will be used. +See also %CSS.Trusted. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt index 2a47e384f4142490020436a837f081fb63841ceb..a3c2f42c3af3892b43b2e22cbd7371732a5c9d8e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt @@ -1,11 +1,11 @@ -HTML.XHTML -TYPE: bool -DEFAULT: true -VERSION: 1.1.0 -DEPRECATED-VERSION: 1.7.0 -DEPRECATED-USE: HTML.Doctype ---DESCRIPTION-- -Determines whether or not output is XHTML 1.0 or HTML 4.01 flavor. ---ALIASES-- -Core.XHTML ---# vim: et sw=4 sts=4 +HTML.XHTML +TYPE: bool +DEFAULT: true +VERSION: 1.1.0 +DEPRECATED-VERSION: 1.7.0 +DEPRECATED-USE: HTML.Doctype +--DESCRIPTION-- +Determines whether or not output is XHTML 1.0 or HTML 4.01 flavor. +--ALIASES-- +Core.XHTML +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt index 08921fde70a17d49cfa7b555174e31ba2cf6cffb..2a13704700d2163aaefd1b2ae83f794a3796dd61 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt @@ -1,10 +1,10 @@ -Output.CommentScriptContents -TYPE: bool -VERSION: 2.0.0 -DEFAULT: true ---DESCRIPTION-- -Determines whether or not HTML Purifier should attempt to fix up the -contents of script tags for legacy browsers with comments. ---ALIASES-- -Core.CommentScriptContents ---# vim: et sw=4 sts=4 +Output.CommentScriptContents +TYPE: bool +VERSION: 2.0.0 +DEFAULT: true +--DESCRIPTION-- +Determines whether or not HTML Purifier should attempt to fix up the +contents of script tags for legacy browsers with comments. +--ALIASES-- +Core.CommentScriptContents +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt new file mode 100644 index 0000000000000000000000000000000000000000..d215ba2d3071b4ba97502089a1dd588ea2e02376 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt @@ -0,0 +1,15 @@ +Output.FixInnerHTML +TYPE: bool +VERSION: 4.3.0 +DEFAULT: true +--DESCRIPTION-- +<p> + If true, HTML Purifier will protect against Internet Explorer's + mishandling of the <code>innerHTML</code> attribute by appending + a space to any attribute that does not contain angled brackets, spaces + or quotes, but contains a backtick. This slightly changes the + semantics of any given attribute, so if this is unacceptable and + you do not use <code>innerHTML</code> on any of your pages, you can + turn this directive off. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt new file mode 100644 index 0000000000000000000000000000000000000000..e58f91aa8c24aa4043e1510a937948fb32660a05 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt @@ -0,0 +1,11 @@ +Output.FlashCompat +TYPE: bool +VERSION: 4.1.0 +DEFAULT: false +--DESCRIPTION-- +<p> + If true, HTML Purifier will generate Internet Explorer compatibility + code for all object code. This is highly recommended if you enable + %HTML.SafeObject. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt index 79f8ad82cfc6b01eab440bf41d0af66d6db91d8a..4bb90252318e452f89c2dd467b9510611935b8e5 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt @@ -1,13 +1,13 @@ -Output.Newline -TYPE: string/null -VERSION: 2.0.1 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - Newline string to format final output with. If left null, HTML Purifier - will auto-detect the default newline type of the system and use that; - you can manually override it here. Remember, \r\n is Windows, \r - is Mac, and \n is Unix. -</p> ---# vim: et sw=4 sts=4 +Output.Newline +TYPE: string/null +VERSION: 2.0.1 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + Newline string to format final output with. If left null, HTML Purifier + will auto-detect the default newline type of the system and use that; + you can manually override it here. Remember, \r\n is Windows, \r + is Mac, and \n is Unix. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt index 232b02362a46af7a9fd7d44894dab9b1c59f0e54..32231065179651ed696d65c24b3d766755a9a8b6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt @@ -1,14 +1,14 @@ -Output.SortAttr -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -<p> - If true, HTML Purifier will sort attributes by name before writing them back - to the document, converting a tag like: <code><el b="" a="" c="" /></code> - to <code><el a="" b="" c="" /></code>. This is a workaround for - a bug in FCKeditor which causes it to swap attributes order, adding noise - to text diffs. If you're not seeing this bug, chances are, you don't need - this directive. -</p> ---# vim: et sw=4 sts=4 +Output.SortAttr +TYPE: bool +VERSION: 3.2.0 +DEFAULT: false +--DESCRIPTION-- +<p> + If true, HTML Purifier will sort attributes by name before writing them back + to the document, converting a tag like: <code><el b="" a="" c="" /></code> + to <code><el a="" b="" c="" /></code>. This is a workaround for + a bug in FCKeditor which causes it to swap attributes order, adding noise + to text diffs. If you're not seeing this bug, chances are, you don't need + this directive. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt index 06bab00a0a2a1bd066d1344742ea457d3df03896..23dd4d3d5d59ffa08ad9e544679548162ce93e02 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt @@ -1,25 +1,25 @@ -Output.TidyFormat -TYPE: bool -VERSION: 1.1.1 -DEFAULT: false ---DESCRIPTION-- -<p> - Determines whether or not to run Tidy on the final output for pretty - formatting reasons, such as indentation and wrap. -</p> -<p> - This can greatly improve readability for editors who are hand-editing - the HTML, but is by no means necessary as HTML Purifier has already - fixed all major errors the HTML may have had. Tidy is a non-default - extension, and this directive will silently fail if Tidy is not - available. -</p> -<p> - If you are looking to make the overall look of your page's source - better, I recommend running Tidy on the entire page rather than just - user-content (after all, the indentation relative to the containing - blocks will be incorrect). -</p> ---ALIASES-- -Core.TidyFormat ---# vim: et sw=4 sts=4 +Output.TidyFormat +TYPE: bool +VERSION: 1.1.1 +DEFAULT: false +--DESCRIPTION-- +<p> + Determines whether or not to run Tidy on the final output for pretty + formatting reasons, such as indentation and wrap. +</p> +<p> + This can greatly improve readability for editors who are hand-editing + the HTML, but is by no means necessary as HTML Purifier has already + fixed all major errors the HTML may have had. Tidy is a non-default + extension, and this directive will silently fail if Tidy is not + available. +</p> +<p> + If you are looking to make the overall look of your page's source + better, I recommend running Tidy on the entire page rather than just + user-content (after all, the indentation relative to the containing + blocks will be incorrect). +</p> +--ALIASES-- +Core.TidyFormat +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt index 071bc0295df30acd443e87f49f77420b6f84d93d..d1820cdbd5deb39a33c946b75a9ff551e253bc32 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt @@ -1,7 +1,7 @@ -Test.ForceNoIconv -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -When set to true, HTMLPurifier_Encoder will act as if iconv does not exist -and use only pure PHP implementations. ---# vim: et sw=4 sts=4 +Test.ForceNoIconv +TYPE: bool +DEFAULT: false +--DESCRIPTION-- +When set to true, HTMLPurifier_Encoder will act as if iconv does not exist +and use only pure PHP implementations. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt index 98fdfe922260a2b6b574891c9cb05c5d99028f7f..0b0533a77f42a3ea7673e0ae1ec13ed3ddc04ebf 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt @@ -1,15 +1,18 @@ -URI.AllowedSchemes -TYPE: lookup ---DEFAULT-- -array ( - 'http' => true, - 'https' => true, - 'mailto' => true, - 'ftp' => true, - 'nntp' => true, - 'news' => true, -) ---DESCRIPTION-- -Whitelist that defines the schemes that a URI is allowed to have. This -prevents XSS attacks from using pseudo-schemes like javascript or mocha. ---# vim: et sw=4 sts=4 +URI.AllowedSchemes +TYPE: lookup +--DEFAULT-- +array ( + 'http' => true, + 'https' => true, + 'mailto' => true, + 'ftp' => true, + 'nntp' => true, + 'news' => true, + 'tel' => true, +) +--DESCRIPTION-- +Whitelist that defines the schemes that a URI is allowed to have. This +prevents XSS attacks from using pseudo-schemes like javascript or mocha. +There is also support for the <code>data</code> and <code>file</code> +URI schemes, but they are not enabled by default. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt index 876f0680cf27769d7ad396db186635f163e05dbd..ba4730808fb87f736e4363610854196b7a364956 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt @@ -1,17 +1,17 @@ -URI.Base -TYPE: string/null -VERSION: 2.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - The base URI is the URI of the document this purified HTML will be - inserted into. This information is important if HTML Purifier needs - to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute - is on. You may use a non-absolute URI for this value, but behavior - may vary (%URI.MakeAbsolute deals nicely with both absolute and - relative paths, but forwards-compatibility is not guaranteed). - <strong>Warning:</strong> If set, the scheme on this URI - overrides the one specified by %URI.DefaultScheme. -</p> ---# vim: et sw=4 sts=4 +URI.Base +TYPE: string/null +VERSION: 2.1.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + The base URI is the URI of the document this purified HTML will be + inserted into. This information is important if HTML Purifier needs + to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute + is on. You may use a non-absolute URI for this value, but behavior + may vary (%URI.MakeAbsolute deals nicely with both absolute and + relative paths, but forwards-compatibility is not guaranteed). + <strong>Warning:</strong> If set, the scheme on this URI + overrides the one specified by %URI.DefaultScheme. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt similarity index 55% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt index 728e378cbeb462998a10de23946b60e3ebd74cc5..981e443251ecbdde096915e2ebc8c80873490210 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt @@ -1,10 +1,15 @@ -URI.DefaultScheme -TYPE: string -DEFAULT: 'http' ---DESCRIPTION-- - -<p> - Defines through what scheme the output will be served, in order to - select the proper object validator when no scheme information is present. -</p> ---# vim: et sw=4 sts=4 +URI.DefaultScheme +TYPE: string/null +DEFAULT: 'http' +--DESCRIPTION-- + +<p> + Defines through what scheme the output will be served, in order to + select the proper object validator when no scheme information is present. +</p> + +<p> + Starting with HTML Purifier 4.9.0, the default scheme can be null, in + which case we reject all URIs which do not have explicit schemes. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt index f05312ba862690b00fb80399b299d24c25d1c7be..523204c08a97f0dfacabb6b787de17e655056b40 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt @@ -1,11 +1,11 @@ -URI.DefinitionID -TYPE: string/null -VERSION: 2.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - Unique identifier for a custom-built URI definition. If you want - to add custom URIFilters, you must specify this value. -</p> ---# vim: et sw=4 sts=4 +URI.DefinitionID +TYPE: string/null +VERSION: 2.1.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + Unique identifier for a custom-built URI definition. If you want + to add custom URIFilters, you must specify this value. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt similarity index 94% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt index 80cfea93f72dcc76d5ec39d68b5b0efccdef41fb..a9c07b1a392efd8b430b0e6c4419199401452531 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt @@ -1,11 +1,11 @@ -URI.DefinitionRev -TYPE: int -VERSION: 2.1.0 -DEFAULT: 1 ---DESCRIPTION-- - -<p> - Revision identifier for your custom definition. See - %HTML.DefinitionRev for details. -</p> ---# vim: et sw=4 sts=4 +URI.DefinitionRev +TYPE: int +VERSION: 2.1.0 +DEFAULT: 1 +--DESCRIPTION-- + +<p> + Revision identifier for your custom definition. See + %HTML.DefinitionRev for details. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt index 71ce025a2dcf06fad2171c8fa849552d81af2c50..b19ca1d5b802d9ab6116e41d38c8fb34ba83b9e2 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt @@ -1,14 +1,14 @@ -URI.Disable -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false ---DESCRIPTION-- - -<p> - Disables all URIs in all forms. Not sure why you'd want to do that - (after all, the Internet's founded on the notion of a hyperlink). -</p> - ---ALIASES-- -Attr.DisableURI ---# vim: et sw=4 sts=4 +URI.Disable +TYPE: bool +VERSION: 1.3.0 +DEFAULT: false +--DESCRIPTION-- + +<p> + Disables all URIs in all forms. Not sure why you'd want to do that + (after all, the Internet's founded on the notion of a hyperlink). +</p> + +--ALIASES-- +Attr.DisableURI +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt index 13c122c8cecabcda3c65897357de50955c1e91e8..9132ea4f5f68efb1d43143ac47dba276fadf7895 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt @@ -1,11 +1,11 @@ -URI.DisableExternal -TYPE: bool -VERSION: 1.2.0 -DEFAULT: false ---DESCRIPTION-- -Disables links to external websites. This is a highly effective anti-spam -and anti-pagerank-leech measure, but comes at a hefty price: nolinks or -images outside of your domain will be allowed. Non-linkified URIs will -still be preserved. If you want to be able to link to subdomains or use -absolute URIs, specify %URI.Host for your website. ---# vim: et sw=4 sts=4 +URI.DisableExternal +TYPE: bool +VERSION: 1.2.0 +DEFAULT: false +--DESCRIPTION-- +Disables links to external websites. This is a highly effective anti-spam +and anti-pagerank-leech measure, but comes at a hefty price: nolinks or +images outside of your domain will be allowed. Non-linkified URIs will +still be preserved. If you want to be able to link to subdomains or use +absolute URIs, specify %URI.Host for your website. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt index abcc1efd61328375ffdb5f233b265b69b612a0c9..d74bc1e3da6bce985448e4c92a41f59fa43a5636 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt @@ -1,13 +1,13 @@ -URI.DisableExternalResources -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false ---DESCRIPTION-- -Disables the embedding of external resources, preventing users from -embedding things like images from other hosts. This prevents access -tracking (good for email viewers), bandwidth leeching, cross-site request -forging, goatse.cx posting, and other nasties, but also results in a loss -of end-user functionality (they can't directly post a pic they posted from -Flickr anymore). Use it if you don't have a robust user-content moderation -team. ---# vim: et sw=4 sts=4 +URI.DisableExternalResources +TYPE: bool +VERSION: 1.3.0 +DEFAULT: false +--DESCRIPTION-- +Disables the embedding of external resources, preventing users from +embedding things like images from other hosts. This prevents access +tracking (good for email viewers), bandwidth leeching, cross-site request +forging, goatse.cx posting, and other nasties, but also results in a loss +of end-user functionality (they can't directly post a pic they posted from +Flickr anymore). Use it if you don't have a robust user-content moderation +team. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt similarity index 61% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt index 51e6ea91f79cf36ea1e717ed5aebf26449cc5b61..6c106144a00a32ed1af9c803f02de43d1e6bc7cf 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt @@ -1,12 +1,15 @@ -URI.DisableResources -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false ---DESCRIPTION-- - -<p> - Disables embedding resources, essentially meaning no pictures. You can - still link to them though. See %URI.DisableExternalResources for why - this might be a good idea. -</p> ---# vim: et sw=4 sts=4 +URI.DisableResources +TYPE: bool +VERSION: 4.2.0 +DEFAULT: false +--DESCRIPTION-- +<p> + Disables embedding resources, essentially meaning no pictures. You can + still link to them though. See %URI.DisableExternalResources for why + this might be a good idea. +</p> +<p> + <em>Note:</em> While this directive has been available since 1.3.0, + it didn't actually start doing anything until 4.2.0. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt index ee83b121dece74354d881dd76ce2b4dac9a74a7f..ba0e6bce194a1895c07260c5fe73c3499a2058cb 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt @@ -1,19 +1,19 @@ -URI.Host -TYPE: string/null -VERSION: 1.2.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - Defines the domain name of the server, so we can determine whether or - an absolute URI is from your website or not. Not strictly necessary, - as users should be using relative URIs to reference resources on your - website. It will, however, let you use absolute URIs to link to - subdomains of the domain you post here: i.e. example.com will allow - sub.example.com. However, higher up domains will still be excluded: - if you set %URI.Host to sub.example.com, example.com will be blocked. - <strong>Note:</strong> This directive overrides %URI.Base because - a given page may be on a sub-domain, but you wish HTML Purifier to be - more relaxed and allow some of the parent domains too. -</p> ---# vim: et sw=4 sts=4 +URI.Host +TYPE: string/null +VERSION: 1.2.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + Defines the domain name of the server, so we can determine whether or + an absolute URI is from your website or not. Not strictly necessary, + as users should be using relative URIs to reference resources on your + website. It will, however, let you use absolute URIs to link to + subdomains of the domain you post here: i.e. example.com will allow + sub.example.com. However, higher up domains will still be excluded: + if you set %URI.Host to sub.example.com, example.com will be blocked. + <strong>Note:</strong> This directive overrides %URI.Base because + a given page may be on a sub-domain, but you wish HTML Purifier to be + more relaxed and allow some of the parent domains too. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt index 0b6df7625dca565406073ec4ffb0d63fc080a992..825fef2769438ec467ccbd5f961e52cae8bb545d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt @@ -1,9 +1,9 @@ -URI.HostBlacklist -TYPE: list -VERSION: 1.3.0 -DEFAULT: array() ---DESCRIPTION-- -List of strings that are forbidden in the host of any URI. Use it to kill -domain names of spam, etc. Note that it will catch anything in the domain, -so <tt>moo.com</tt> will catch <tt>moo.com.example.com</tt>. ---# vim: et sw=4 sts=4 +URI.HostBlacklist +TYPE: list +VERSION: 1.3.0 +DEFAULT: array() +--DESCRIPTION-- +List of strings that are forbidden in the host of any URI. Use it to kill +domain names of spam, etc. Note that it will catch anything in the domain, +so <tt>moo.com</tt> will catch <tt>moo.com.example.com</tt>. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt index 4214900a592c400030521a9cc26af9d7343da81e..eb58c7f1a456a9d10400d30fe1a18464fff1fe8f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt @@ -1,13 +1,13 @@ -URI.MakeAbsolute -TYPE: bool -VERSION: 2.1.0 -DEFAULT: false ---DESCRIPTION-- - -<p> - Converts all URIs into absolute forms. This is useful when the HTML - being filtered assumes a specific base path, but will actually be - viewed in a different context (and setting an alternate base URI is - not possible). %URI.Base must be set for this directive to work. -</p> ---# vim: et sw=4 sts=4 +URI.MakeAbsolute +TYPE: bool +VERSION: 2.1.0 +DEFAULT: false +--DESCRIPTION-- + +<p> + Converts all URIs into absolute forms. This is useful when the HTML + being filtered assumes a specific base path, but will actually be + viewed in a different context (and setting an alternate base URI is + not possible). %URI.Base must be set for this directive to work. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt index 58c81dcc441625b4ea966a7dd2b04131c0542e66..bedd610d6698baf75ce10b093b75c58d4e91bd1c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt @@ -1,83 +1,83 @@ -URI.Munge -TYPE: string/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- - -<p> - Munges all browsable (usually http, https and ftp) - absolute URIs into another URI, usually a URI redirection service. - This directive accepts a URI, formatted with a <code>%s</code> where - the url-encoded original URI should be inserted (sample: - <code>http://www.google.com/url?q=%s</code>). -</p> -<p> - Uses for this directive: -</p> -<ul> - <li> - Prevent PageRank leaks, while being fairly transparent - to users (you may also want to add some client side JavaScript to - override the text in the statusbar). <strong>Notice</strong>: - Many security experts believe that this form of protection does not deter spam-bots. - </li> - <li> - Redirect users to a splash page telling them they are leaving your - website. While this is poor usability practice, it is often mandated - in corporate environments. - </li> -</ul> -<p> - Prior to HTML Purifier 3.1.1, this directive also enabled the munging - of browsable external resources, which could break things if your redirection - script was a splash page or used <code>meta</code> tags. To revert to - previous behavior, please use %URI.MungeResources. -</p> -<p> - You may want to also use %URI.MungeSecretKey along with this directive - in order to enforce what URIs your redirector script allows. Open - redirector scripts can be a security risk and negatively affect the - reputation of your domain name. -</p> -<p> - Starting with HTML Purifier 3.1.1, there is also these substitutions: -</p> -<table> - <thead> - <tr> - <th>Key</th> - <th>Description</th> - <th>Example <code><a href=""></code></th> - </tr> - </thead> - <tbody> - <tr> - <td>%r</td> - <td>1 - The URI embeds a resource<br />(blank) - The URI is merely a link</td> - <td></td> - </tr> - <tr> - <td>%n</td> - <td>The name of the tag this URI came from</td> - <td>a</td> - </tr> - <tr> - <td>%m</td> - <td>The name of the attribute this URI came from</td> - <td>href</td> - </tr> - <tr> - <td>%p</td> - <td>The name of the CSS property this URI came from, or blank if irrelevant</td> - <td></td> - </tr> - </tbody> -</table> -<p> - Admittedly, these letters are somewhat arbitrary; the only stipulation - was that they couldn't be a through f. r is for resource (I would have preferred - e, but you take what you can get), n is for name, m - was picked because it came after n (and I couldn't use a), p is for - property. -</p> ---# vim: et sw=4 sts=4 +URI.Munge +TYPE: string/null +VERSION: 1.3.0 +DEFAULT: NULL +--DESCRIPTION-- + +<p> + Munges all browsable (usually http, https and ftp) + absolute URIs into another URI, usually a URI redirection service. + This directive accepts a URI, formatted with a <code>%s</code> where + the url-encoded original URI should be inserted (sample: + <code>http://www.google.com/url?q=%s</code>). +</p> +<p> + Uses for this directive: +</p> +<ul> + <li> + Prevent PageRank leaks, while being fairly transparent + to users (you may also want to add some client side JavaScript to + override the text in the statusbar). <strong>Notice</strong>: + Many security experts believe that this form of protection does not deter spam-bots. + </li> + <li> + Redirect users to a splash page telling them they are leaving your + website. While this is poor usability practice, it is often mandated + in corporate environments. + </li> +</ul> +<p> + Prior to HTML Purifier 3.1.1, this directive also enabled the munging + of browsable external resources, which could break things if your redirection + script was a splash page or used <code>meta</code> tags. To revert to + previous behavior, please use %URI.MungeResources. +</p> +<p> + You may want to also use %URI.MungeSecretKey along with this directive + in order to enforce what URIs your redirector script allows. Open + redirector scripts can be a security risk and negatively affect the + reputation of your domain name. +</p> +<p> + Starting with HTML Purifier 3.1.1, there is also these substitutions: +</p> +<table> + <thead> + <tr> + <th>Key</th> + <th>Description</th> + <th>Example <code><a href=""></code></th> + </tr> + </thead> + <tbody> + <tr> + <td>%r</td> + <td>1 - The URI embeds a resource<br />(blank) - The URI is merely a link</td> + <td></td> + </tr> + <tr> + <td>%n</td> + <td>The name of the tag this URI came from</td> + <td>a</td> + </tr> + <tr> + <td>%m</td> + <td>The name of the attribute this URI came from</td> + <td>href</td> + </tr> + <tr> + <td>%p</td> + <td>The name of the CSS property this URI came from, or blank if irrelevant</td> + <td></td> + </tr> + </tbody> +</table> +<p> + Admittedly, these letters are somewhat arbitrary; the only stipulation + was that they couldn't be a through f. r is for resource (I would have preferred + e, but you take what you can get), n is for name, m + was picked because it came after n (and I couldn't use a), p is for + property. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt index 6fce0fdc3735655c3a8416c71f9b8f6bf24c3169..ed4b5b0d023afd7d0e68fdad214505a2bdbd55d1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt @@ -1,17 +1,17 @@ -URI.MungeResources -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -<p> - If true, any URI munging directives like %URI.Munge - will also apply to embedded resources, such as <code><img src=""></code>. - Be careful enabling this directive if you have a redirector script - that does not use the <code>Location</code> HTTP header; all of your images - and other embedded resources will break. -</p> -<p> - <strong>Warning:</strong> It is strongly advised you use this in conjunction - %URI.MungeSecretKey to mitigate the security risk of an open redirector. -</p> ---# vim: et sw=4 sts=4 +URI.MungeResources +TYPE: bool +VERSION: 3.1.1 +DEFAULT: false +--DESCRIPTION-- +<p> + If true, any URI munging directives like %URI.Munge + will also apply to embedded resources, such as <code><img src=""></code>. + Be careful enabling this directive if you have a redirector script + that does not use the <code>Location</code> HTTP header; all of your images + and other embedded resources will break. +</p> +<p> + <strong>Warning:</strong> It is strongly advised you use this in conjunction + %URI.MungeSecretKey to mitigate the security risk of an open redirector. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt similarity index 90% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt index 0d00f62ea8a41daf20a83e2ce54170035604e200..123b6e26b80ddc091e0f7591f929849c4b3c02fd 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt @@ -1,30 +1,30 @@ -URI.MungeSecretKey -TYPE: string/null -VERSION: 3.1.1 -DEFAULT: NULL ---DESCRIPTION-- -<p> - This directive enables secure checksum generation along with %URI.Munge. - It should be set to a secure key that is not shared with anyone else. - The checksum can be placed in the URI using %t. Use of this checksum - affords an additional level of protection by allowing a redirector - to check if a URI has passed through HTML Purifier with this line: -</p> - -<pre>$checksum === sha1($secret_key . ':' . $url)</pre> - -<p> - If the output is TRUE, the redirector script should accept the URI. -</p> - -<p> - Please note that it would still be possible for an attacker to procure - secure hashes en-mass by abusing your website's Preview feature or the - like, but this service affords an additional level of protection - that should be combined with website blacklisting. -</p> - -<p> - Remember this has no effect if %URI.Munge is not on. -</p> ---# vim: et sw=4 sts=4 +URI.MungeSecretKey +TYPE: string/null +VERSION: 3.1.1 +DEFAULT: NULL +--DESCRIPTION-- +<p> + This directive enables secure checksum generation along with %URI.Munge. + It should be set to a secure key that is not shared with anyone else. + The checksum can be placed in the URI using %t. Use of this checksum + affords an additional level of protection by allowing a redirector + to check if a URI has passed through HTML Purifier with this line: +</p> + +<pre>$checksum === hash_hmac("sha256", $url, $secret_key)</pre> + +<p> + If the output is TRUE, the redirector script should accept the URI. +</p> + +<p> + Please note that it would still be possible for an attacker to procure + secure hashes en-mass by abusing your website's Preview feature or the + like, but this service affords an additional level of protection + that should be combined with website blacklisting. +</p> + +<p> + Remember this has no effect if %URI.Munge is not on. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt similarity index 97% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt index 23331a4e79047ea1b0935802f34c0a92cc8df4cd..8b387dea31f91c31a43ff28b586f569bfd4ec598 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt @@ -1,9 +1,9 @@ -URI.OverrideAllowedSchemes -TYPE: bool -DEFAULT: true ---DESCRIPTION-- -If this is set to true (which it is by default), you can override -%URI.AllowedSchemes by simply registering a HTMLPurifier_URIScheme to the -registry. If false, you will also have to update that directive in order -to add more schemes. ---# vim: et sw=4 sts=4 +URI.OverrideAllowedSchemes +TYPE: bool +DEFAULT: true +--DESCRIPTION-- +If this is set to true (which it is by default), you can override +%URI.AllowedSchemes by simply registering a HTMLPurifier_URIScheme to the +registry. If false, you will also have to update that directive in order +to add more schemes. +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e1f227f793fca1c66ff056d9aedb18e58d54052 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt @@ -0,0 +1,22 @@ +URI.SafeIframeRegexp +TYPE: string/null +VERSION: 4.4.0 +DEFAULT: NULL +--DESCRIPTION-- +<p> + A PCRE regular expression that will be matched against an iframe URI. This is + a relatively inflexible scheme, but works well enough for the most common + use-case of iframes: embedded video. This directive only has an effect if + %HTML.SafeIframe is enabled. Here are some example values: +</p> +<ul> + <li><code>%^http://www.youtube.com/embed/%</code> - Allow YouTube videos</li> + <li><code>%^http://player.vimeo.com/video/%</code> - Allow Vimeo videos</li> + <li><code>%^http://(www.youtube.com/embed/|player.vimeo.com/video/)%</code> - Allow both</li> +</ul> +<p> + Note that this directive does not give you enough granularity to, say, disable + all <code>autoplay</code> videos. Pipe up on the HTML Purifier forums if this + is a capability you want. +</p> +--# vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/info.ini similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini rename to libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/info.ini index 5de4505e1b04bcb2b35bfb9357b7b3f9ae6f7fb4..58e0ce4a17f9b0459e4ff6ebf9570f589bb8c646 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ConfigSchema/schema/info.ini @@ -1,3 +1,3 @@ -name = "HTML Purifier" - -; vim: et sw=4 sts=4 +name = "HTML Purifier" + +; vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ContentSets.php b/libraries/htmlpurifier410/library/HTMLPurifier/ContentSets.php similarity index 74% rename from libraries/htmlpurifier/library/HTMLPurifier/ContentSets.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ContentSets.php index 3b6e96f5f56a8fee3e8f3bcf4e48d1be85cce14d..f68b19631ab01097f360208d39d0f01c6be5fa6d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ContentSets.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ContentSets.php @@ -1,155 +1,170 @@ -<?php - -/** - * @todo Unit test - */ -class HTMLPurifier_ContentSets -{ - - /** - * List of content set strings (pipe seperators) indexed by name. - */ - public $info = array(); - - /** - * List of content set lookups (element => true) indexed by name. - * @note This is in HTMLPurifier_HTMLDefinition->info_content_sets - */ - public $lookup = array(); - - /** - * Synchronized list of defined content sets (keys of info) - */ - protected $keys = array(); - /** - * Synchronized list of defined content values (values of info) - */ - protected $values = array(); - - /** - * Merges in module's content sets, expands identifiers in the content - * sets and populates the keys, values and lookup member variables. - * @param $modules List of HTMLPurifier_HTMLModule - */ - public function __construct($modules) { - if (!is_array($modules)) $modules = array($modules); - // populate content_sets based on module hints - // sorry, no way of overloading - foreach ($modules as $module_i => $module) { - foreach ($module->content_sets as $key => $value) { - $temp = $this->convertToLookup($value); - if (isset($this->lookup[$key])) { - // add it into the existing content set - $this->lookup[$key] = array_merge($this->lookup[$key], $temp); - } else { - $this->lookup[$key] = $temp; - } - } - } - $old_lookup = false; - while ($old_lookup !== $this->lookup) { - $old_lookup = $this->lookup; - foreach ($this->lookup as $i => $set) { - $add = array(); - foreach ($set as $element => $x) { - if (isset($this->lookup[$element])) { - $add += $this->lookup[$element]; - unset($this->lookup[$i][$element]); - } - } - $this->lookup[$i] += $add; - } - } - - foreach ($this->lookup as $key => $lookup) { - $this->info[$key] = implode(' | ', array_keys($lookup)); - } - $this->keys = array_keys($this->info); - $this->values = array_values($this->info); - } - - /** - * Accepts a definition; generates and assigns a ChildDef for it - * @param $def HTMLPurifier_ElementDef reference - * @param $module Module that defined the ElementDef - */ - public function generateChildDef(&$def, $module) { - if (!empty($def->child)) return; // already done! - $content_model = $def->content_model; - if (is_string($content_model)) { - // Assume that $this->keys is alphanumeric - $def->content_model = preg_replace_callback( - '/\b(' . implode('|', $this->keys) . ')\b/', - array($this, 'generateChildDefCallback'), - $content_model - ); - //$def->content_model = str_replace( - // $this->keys, $this->values, $content_model); - } - $def->child = $this->getChildDef($def, $module); - } - - public function generateChildDefCallback($matches) { - return $this->info[$matches[0]]; - } - - /** - * Instantiates a ChildDef based on content_model and content_model_type - * member variables in HTMLPurifier_ElementDef - * @note This will also defer to modules for custom HTMLPurifier_ChildDef - * subclasses that need content set expansion - * @param $def HTMLPurifier_ElementDef to have ChildDef extracted - * @return HTMLPurifier_ChildDef corresponding to ElementDef - */ - public function getChildDef($def, $module) { - $value = $def->content_model; - if (is_object($value)) { - trigger_error( - 'Literal object child definitions should be stored in '. - 'ElementDef->child not ElementDef->content_model', - E_USER_NOTICE - ); - return $value; - } - switch ($def->content_model_type) { - case 'required': - return new HTMLPurifier_ChildDef_Required($value); - case 'optional': - return new HTMLPurifier_ChildDef_Optional($value); - case 'empty': - return new HTMLPurifier_ChildDef_Empty(); - case 'custom': - return new HTMLPurifier_ChildDef_Custom($value); - } - // defer to its module - $return = false; - if ($module->defines_child_def) { // save a func call - $return = $module->getChildDef($def); - } - if ($return !== false) return $return; - // error-out - trigger_error( - 'Could not determine which ChildDef class to instantiate', - E_USER_ERROR - ); - return false; - } - - /** - * Converts a string list of elements separated by pipes into - * a lookup array. - * @param $string List of elements - * @return Lookup array of elements - */ - protected function convertToLookup($string) { - $array = explode('|', str_replace(' ', '', $string)); - $ret = array(); - foreach ($array as $i => $k) { - $ret[$k] = true; - } - return $ret; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * @todo Unit test + */ +class HTMLPurifier_ContentSets +{ + + /** + * List of content set strings (pipe separators) indexed by name. + * @type array + */ + public $info = array(); + + /** + * List of content set lookups (element => true) indexed by name. + * @type array + * @note This is in HTMLPurifier_HTMLDefinition->info_content_sets + */ + public $lookup = array(); + + /** + * Synchronized list of defined content sets (keys of info). + * @type array + */ + protected $keys = array(); + /** + * Synchronized list of defined content values (values of info). + * @type array + */ + protected $values = array(); + + /** + * Merges in module's content sets, expands identifiers in the content + * sets and populates the keys, values and lookup member variables. + * @param HTMLPurifier_HTMLModule[] $modules List of HTMLPurifier_HTMLModule + */ + public function __construct($modules) + { + if (!is_array($modules)) { + $modules = array($modules); + } + // populate content_sets based on module hints + // sorry, no way of overloading + foreach ($modules as $module) { + foreach ($module->content_sets as $key => $value) { + $temp = $this->convertToLookup($value); + if (isset($this->lookup[$key])) { + // add it into the existing content set + $this->lookup[$key] = array_merge($this->lookup[$key], $temp); + } else { + $this->lookup[$key] = $temp; + } + } + } + $old_lookup = false; + while ($old_lookup !== $this->lookup) { + $old_lookup = $this->lookup; + foreach ($this->lookup as $i => $set) { + $add = array(); + foreach ($set as $element => $x) { + if (isset($this->lookup[$element])) { + $add += $this->lookup[$element]; + unset($this->lookup[$i][$element]); + } + } + $this->lookup[$i] += $add; + } + } + + foreach ($this->lookup as $key => $lookup) { + $this->info[$key] = implode(' | ', array_keys($lookup)); + } + $this->keys = array_keys($this->info); + $this->values = array_values($this->info); + } + + /** + * Accepts a definition; generates and assigns a ChildDef for it + * @param HTMLPurifier_ElementDef $def HTMLPurifier_ElementDef reference + * @param HTMLPurifier_HTMLModule $module Module that defined the ElementDef + */ + public function generateChildDef(&$def, $module) + { + if (!empty($def->child)) { // already done! + return; + } + $content_model = $def->content_model; + if (is_string($content_model)) { + // Assume that $this->keys is alphanumeric + $def->content_model = preg_replace_callback( + '/\b(' . implode('|', $this->keys) . ')\b/', + array($this, 'generateChildDefCallback'), + $content_model + ); + //$def->content_model = str_replace( + // $this->keys, $this->values, $content_model); + } + $def->child = $this->getChildDef($def, $module); + } + + public function generateChildDefCallback($matches) + { + return $this->info[$matches[0]]; + } + + /** + * Instantiates a ChildDef based on content_model and content_model_type + * member variables in HTMLPurifier_ElementDef + * @note This will also defer to modules for custom HTMLPurifier_ChildDef + * subclasses that need content set expansion + * @param HTMLPurifier_ElementDef $def HTMLPurifier_ElementDef to have ChildDef extracted + * @param HTMLPurifier_HTMLModule $module Module that defined the ElementDef + * @return HTMLPurifier_ChildDef corresponding to ElementDef + */ + public function getChildDef($def, $module) + { + $value = $def->content_model; + if (is_object($value)) { + trigger_error( + 'Literal object child definitions should be stored in '. + 'ElementDef->child not ElementDef->content_model', + E_USER_NOTICE + ); + return $value; + } + switch ($def->content_model_type) { + case 'required': + return new HTMLPurifier_ChildDef_Required($value); + case 'optional': + return new HTMLPurifier_ChildDef_Optional($value); + case 'empty': + return new HTMLPurifier_ChildDef_Empty(); + case 'custom': + return new HTMLPurifier_ChildDef_Custom($value); + } + // defer to its module + $return = false; + if ($module->defines_child_def) { // save a func call + $return = $module->getChildDef($def); + } + if ($return !== false) { + return $return; + } + // error-out + trigger_error( + 'Could not determine which ChildDef class to instantiate', + E_USER_ERROR + ); + return false; + } + + /** + * Converts a string list of elements separated by pipes into + * a lookup array. + * @param string $string List of elements + * @return array Lookup array of elements + */ + protected function convertToLookup($string) + { + $array = explode('|', str_replace(' ', '', $string)); + $ret = array(); + foreach ($array as $k) { + $ret[$k] = true; + } + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Context.php b/libraries/htmlpurifier410/library/HTMLPurifier/Context.php new file mode 100644 index 0000000000000000000000000000000000000000..5ad536d51c3fc7460c138e72fadae1c817cae923 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Context.php @@ -0,0 +1,95 @@ +<?php + +/** + * Registry object that contains information about the current context. + * @warning Is a bit buggy when variables are set to null: it thinks + * they don't exist! So use false instead, please. + * @note Since the variables Context deals with may not be objects, + * references are very important here! Do not remove! + */ +class HTMLPurifier_Context +{ + + /** + * Private array that stores the references. + * @type array + */ + private $_storage = array(); + + /** + * Registers a variable into the context. + * @param string $name String name + * @param mixed $ref Reference to variable to be registered + */ + public function register($name, &$ref) + { + if (array_key_exists($name, $this->_storage)) { + trigger_error( + "Name $name produces collision, cannot re-register", + E_USER_ERROR + ); + return; + } + $this->_storage[$name] =& $ref; + } + + /** + * Retrieves a variable reference from the context. + * @param string $name String name + * @param bool $ignore_error Boolean whether or not to ignore error + * @return mixed + */ + public function &get($name, $ignore_error = false) + { + if (!array_key_exists($name, $this->_storage)) { + if (!$ignore_error) { + trigger_error( + "Attempted to retrieve non-existent variable $name", + E_USER_ERROR + ); + } + $var = null; // so we can return by reference + return $var; + } + return $this->_storage[$name]; + } + + /** + * Destroys a variable in the context. + * @param string $name String name + */ + public function destroy($name) + { + if (!array_key_exists($name, $this->_storage)) { + trigger_error( + "Attempted to destroy non-existent variable $name", + E_USER_ERROR + ); + return; + } + unset($this->_storage[$name]); + } + + /** + * Checks whether or not the variable exists. + * @param string $name String name + * @return bool + */ + public function exists($name) + { + return array_key_exists($name, $this->_storage); + } + + /** + * Loads a series of variables from an associative array + * @param array $context_array Assoc array of variables to load + */ + public function loadArray($context_array) + { + foreach ($context_array as $key => $discard) { + $this->register($key, $context_array[$key]); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Definition.php b/libraries/htmlpurifier410/library/HTMLPurifier/Definition.php new file mode 100644 index 0000000000000000000000000000000000000000..f987e603591783ccc52041178bf9f891cda75988 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Definition.php @@ -0,0 +1,55 @@ +<?php + +/** + * Super-class for definition datatype objects, implements serialization + * functions for the class. + */ +abstract class HTMLPurifier_Definition +{ + + /** + * Has setup() been called yet? + * @type bool + */ + public $setup = false; + + /** + * If true, write out the final definition object to the cache after + * setup. This will be true only if all invocations to get a raw + * definition object are also optimized. This does not cause file + * system thrashing because on subsequent calls the cached object + * is used and any writes to the raw definition object are short + * circuited. See enduser-customize.html for the high-level + * picture. + * @type bool + */ + public $optimized = null; + + /** + * What type of definition is it? + * @type string + */ + public $type; + + /** + * Sets up the definition object into the final form, something + * not done by the constructor + * @param HTMLPurifier_Config $config + */ + abstract protected function doSetup($config); + + /** + * Setup function that aborts if already setup + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + if ($this->setup) { + return; + } + $this->setup = true; + $this->doSetup($config); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache.php rename to libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache.php index fa5a087bb754b71c667746549a27e3386609ad91..72448d03fc2b36f125781bc4c23e61307a5d7b42 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache.php @@ -1,108 +1,129 @@ -<?php - -/** - * Abstract class representing Definition cache managers that implements - * useful common methods and is a factory. - * @todo Create a separate maintenance file advanced users can use to - * cache their custom HTMLDefinition, which can be loaded - * via a configuration directive - * @todo Implement memcached - */ -abstract class HTMLPurifier_DefinitionCache -{ - - public $type; - - /** - * @param $name Type of definition objects this instance of the - * cache will handle. - */ - public function __construct($type) { - $this->type = $type; - } - - /** - * Generates a unique identifier for a particular configuration - * @param Instance of HTMLPurifier_Config - */ - public function generateKey($config) { - return $config->version . ',' . // possibly replace with function calls - $config->getBatchSerial($this->type) . ',' . - $config->get($this->type, 'DefinitionRev'); - } - - /** - * Tests whether or not a key is old with respect to the configuration's - * version and revision number. - * @param $key Key to test - * @param $config Instance of HTMLPurifier_Config to test against - */ - public function isOld($key, $config) { - if (substr_count($key, ',') < 2) return true; - list($version, $hash, $revision) = explode(',', $key, 3); - $compare = version_compare($version, $config->version); - // version mismatch, is always old - if ($compare != 0) return true; - // versions match, ids match, check revision number - if ( - $hash == $config->getBatchSerial($this->type) && - $revision < $config->get($this->type, 'DefinitionRev') - ) return true; - return false; - } - - /** - * Checks if a definition's type jives with the cache's type - * @note Throws an error on failure - * @param $def Definition object to check - * @return Boolean true if good, false if not - */ - public function checkDefType($def) { - if ($def->type !== $this->type) { - trigger_error("Cannot use definition of type {$def->type} in cache for {$this->type}"); - return false; - } - return true; - } - - /** - * Adds a definition object to the cache - */ - abstract public function add($def, $config); - - /** - * Unconditionally saves a definition object to the cache - */ - abstract public function set($def, $config); - - /** - * Replace an object in the cache - */ - abstract public function replace($def, $config); - - /** - * Retrieves a definition object from the cache - */ - abstract public function get($config); - - /** - * Removes a definition object to the cache - */ - abstract public function remove($config); - - /** - * Clears all objects from cache - */ - abstract public function flush($config); - - /** - * Clears all expired (older version or revision) objects from cache - * @note Be carefuly implementing this method as flush. Flush must - * not interfere with other Definition types, and cleanup() - * should not be repeatedly called by userland code. - */ - abstract public function cleanup($config); - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Abstract class representing Definition cache managers that implements + * useful common methods and is a factory. + * @todo Create a separate maintenance file advanced users can use to + * cache their custom HTMLDefinition, which can be loaded + * via a configuration directive + * @todo Implement memcached + */ +abstract class HTMLPurifier_DefinitionCache +{ + /** + * @type string + */ + public $type; + + /** + * @param string $type Type of definition objects this instance of the + * cache will handle. + */ + public function __construct($type) + { + $this->type = $type; + } + + /** + * Generates a unique identifier for a particular configuration + * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config + * @return string + */ + public function generateKey($config) + { + return $config->version . ',' . // possibly replace with function calls + $config->getBatchSerial($this->type) . ',' . + $config->get($this->type . '.DefinitionRev'); + } + + /** + * Tests whether or not a key is old with respect to the configuration's + * version and revision number. + * @param string $key Key to test + * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config to test against + * @return bool + */ + public function isOld($key, $config) + { + if (substr_count($key, ',') < 2) { + return true; + } + list($version, $hash, $revision) = explode(',', $key, 3); + $compare = version_compare($version, $config->version); + // version mismatch, is always old + if ($compare != 0) { + return true; + } + // versions match, ids match, check revision number + if ($hash == $config->getBatchSerial($this->type) && + $revision < $config->get($this->type . '.DefinitionRev')) { + return true; + } + return false; + } + + /** + * Checks if a definition's type jives with the cache's type + * @note Throws an error on failure + * @param HTMLPurifier_Definition $def Definition object to check + * @return bool true if good, false if not + */ + public function checkDefType($def) + { + if ($def->type !== $this->type) { + trigger_error("Cannot use definition of type {$def->type} in cache for {$this->type}"); + return false; + } + return true; + } + + /** + * Adds a definition object to the cache + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + */ + abstract public function add($def, $config); + + /** + * Unconditionally saves a definition object to the cache + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + */ + abstract public function set($def, $config); + + /** + * Replace an object in the cache + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + */ + abstract public function replace($def, $config); + + /** + * Retrieves a definition object from the cache + * @param HTMLPurifier_Config $config + */ + abstract public function get($config); + + /** + * Removes a definition object to the cache + * @param HTMLPurifier_Config $config + */ + abstract public function remove($config); + + /** + * Clears all objects from cache + * @param HTMLPurifier_Config $config + */ + abstract public function flush($config); + + /** + * Clears all expired (older version or revision) objects from cache + * @note Be careful implementing this method as flush. Flush must + * not interfere with other Definition types, and cleanup() + * should not be repeatedly called by userland code. + * @param HTMLPurifier_Config $config + */ + abstract public function cleanup($config); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator.php new file mode 100644 index 0000000000000000000000000000000000000000..09cdc1c825fcef2e790d3fec7f230755690ef7c5 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator.php @@ -0,0 +1,112 @@ +<?php + +class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache +{ + + /** + * Cache object we are decorating + * @type HTMLPurifier_DefinitionCache + */ + public $cache; + + /** + * The name of the decorator + * @var string + */ + public $name; + + public function __construct() + { + } + + /** + * Lazy decorator function + * @param HTMLPurifier_DefinitionCache $cache Reference to cache object to decorate + * @return HTMLPurifier_DefinitionCache_Decorator + */ + public function decorate(&$cache) + { + $decorator = $this->copy(); + // reference is necessary for mocks in PHP 4 + $decorator->cache =& $cache; + $decorator->type = $cache->type; + return $decorator; + } + + /** + * Cross-compatible clone substitute + * @return HTMLPurifier_DefinitionCache_Decorator + */ + public function copy() + { + return new HTMLPurifier_DefinitionCache_Decorator(); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function add($def, $config) + { + return $this->cache->add($def, $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function set($def, $config) + { + return $this->cache->set($def, $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function replace($def, $config) + { + return $this->cache->replace($def, $config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function get($config) + { + return $this->cache->get($config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function remove($config) + { + return $this->cache->remove($config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function flush($config) + { + return $this->cache->flush($config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function cleanup($config) + { + return $this->cache->cleanup($config); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php new file mode 100644 index 0000000000000000000000000000000000000000..53dca67dcd79635c1daba82ada90d546e834cdd0 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php @@ -0,0 +1,78 @@ +<?php + +/** + * Definition cache decorator class that cleans up the cache + * whenever there is a cache miss. + */ +class HTMLPurifier_DefinitionCache_Decorator_Cleanup extends HTMLPurifier_DefinitionCache_Decorator +{ + /** + * @type string + */ + public $name = 'Cleanup'; + + /** + * @return HTMLPurifier_DefinitionCache_Decorator_Cleanup + */ + public function copy() + { + return new HTMLPurifier_DefinitionCache_Decorator_Cleanup(); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function add($def, $config) + { + $status = parent::add($def, $config); + if (!$status) { + parent::cleanup($config); + } + return $status; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function set($def, $config) + { + $status = parent::set($def, $config); + if (!$status) { + parent::cleanup($config); + } + return $status; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function replace($def, $config) + { + $status = parent::replace($def, $config); + if (!$status) { + parent::cleanup($config); + } + return $status; + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function get($config) + { + $ret = parent::get($config); + if (!$ret) { + parent::cleanup($config); + } + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php new file mode 100644 index 0000000000000000000000000000000000000000..1725d8303bcaca0d2fc1bf00832a0eb8daa80fb9 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php @@ -0,0 +1,85 @@ +<?php + +/** + * Definition cache decorator class that saves all cache retrievals + * to PHP's memory; good for unit tests or circumstances where + * there are lots of configuration objects floating around. + */ +class HTMLPurifier_DefinitionCache_Decorator_Memory extends HTMLPurifier_DefinitionCache_Decorator +{ + /** + * @type array + */ + protected $definitions; + + /** + * @type string + */ + public $name = 'Memory'; + + /** + * @return HTMLPurifier_DefinitionCache_Decorator_Memory + */ + public function copy() + { + return new HTMLPurifier_DefinitionCache_Decorator_Memory(); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function add($def, $config) + { + $status = parent::add($def, $config); + if ($status) { + $this->definitions[$this->generateKey($config)] = $def; + } + return $status; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function set($def, $config) + { + $status = parent::set($def, $config); + if ($status) { + $this->definitions[$this->generateKey($config)] = $def; + } + return $status; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function replace($def, $config) + { + $status = parent::replace($def, $config); + if ($status) { + $this->definitions[$this->generateKey($config)] = $def; + } + return $status; + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function get($config) + { + $key = $this->generateKey($config); + if (isset($this->definitions[$key])) { + return $this->definitions[$key]; + } + $this->definitions[$key] = parent::get($config); + return $this->definitions[$key]; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in new file mode 100644 index 0000000000000000000000000000000000000000..c586890fbc52f7be72a6a4853c870ff325280024 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in @@ -0,0 +1,82 @@ +<?php + +require_once 'HTMLPurifier/DefinitionCache/Decorator.php'; + +/** + * Definition cache decorator template. + */ +class HTMLPurifier_DefinitionCache_Decorator_Template extends HTMLPurifier_DefinitionCache_Decorator +{ + + /** + * @type string + */ + public $name = 'Template'; // replace this + + public function copy() + { + // replace class name with yours + return new HTMLPurifier_DefinitionCache_Decorator_Template(); + } + + // remove methods you don't need + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function add($def, $config) + { + return parent::add($def, $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function set($def, $config) + { + return parent::set($def, $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function replace($def, $config) + { + return parent::replace($def, $config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function get($config) + { + return parent::get($config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function flush($config) + { + return parent::flush($config); + } + + /** + * @param HTMLPurifier_Config $config + * @return mixed + */ + public function cleanup($config) + { + return parent::cleanup($config); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Null.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Null.php new file mode 100644 index 0000000000000000000000000000000000000000..55eff9e03eb47b0e60f734ae72c60f5df0697f7a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Null.php @@ -0,0 +1,76 @@ +<?php + +/** + * Null cache object to use when no caching is on. + */ +class HTMLPurifier_DefinitionCache_Null extends HTMLPurifier_DefinitionCache +{ + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return bool + */ + public function add($def, $config) + { + return false; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return bool + */ + public function set($def, $config) + { + return false; + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return bool + */ + public function replace($def, $config) + { + return false; + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function remove($config) + { + return false; + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function get($config) + { + return false; + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function flush($config) + { + return false; + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function cleanup($config) + { + return false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Serializer.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Serializer.php new file mode 100644 index 0000000000000000000000000000000000000000..22b50b5adff9683a1e6387f1a97b5023ac8c5b78 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Serializer.php @@ -0,0 +1,311 @@ +<?php + +class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache +{ + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return int|bool + */ + public function add($def, $config) + { + if (!$this->checkDefType($def)) { + return; + } + $file = $this->generateFilePath($config); + if (file_exists($file)) { + return false; + } + if (!$this->_prepareDir($config)) { + return false; + } + return $this->_write($file, serialize($def), $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return int|bool + */ + public function set($def, $config) + { + if (!$this->checkDefType($def)) { + return; + } + $file = $this->generateFilePath($config); + if (!$this->_prepareDir($config)) { + return false; + } + return $this->_write($file, serialize($def), $config); + } + + /** + * @param HTMLPurifier_Definition $def + * @param HTMLPurifier_Config $config + * @return int|bool + */ + public function replace($def, $config) + { + if (!$this->checkDefType($def)) { + return; + } + $file = $this->generateFilePath($config); + if (!file_exists($file)) { + return false; + } + if (!$this->_prepareDir($config)) { + return false; + } + return $this->_write($file, serialize($def), $config); + } + + /** + * @param HTMLPurifier_Config $config + * @return bool|HTMLPurifier_Config + */ + public function get($config) + { + $file = $this->generateFilePath($config); + if (!file_exists($file)) { + return false; + } + return unserialize(file_get_contents($file)); + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function remove($config) + { + $file = $this->generateFilePath($config); + if (!file_exists($file)) { + return false; + } + return unlink($file); + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function flush($config) + { + if (!$this->_prepareDir($config)) { + return false; + } + $dir = $this->generateDirectoryPath($config); + $dh = opendir($dir); + // Apparently, on some versions of PHP, readdir will return + // an empty string if you pass an invalid argument to readdir. + // So you need this test. See #49. + if (false === $dh) { + return false; + } + while (false !== ($filename = readdir($dh))) { + if (empty($filename)) { + continue; + } + if ($filename[0] === '.') { + continue; + } + unlink($dir . '/' . $filename); + } + closedir($dh); + return true; + } + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function cleanup($config) + { + if (!$this->_prepareDir($config)) { + return false; + } + $dir = $this->generateDirectoryPath($config); + $dh = opendir($dir); + // See #49 (and above). + if (false === $dh) { + return false; + } + while (false !== ($filename = readdir($dh))) { + if (empty($filename)) { + continue; + } + if ($filename[0] === '.') { + continue; + } + $key = substr($filename, 0, strlen($filename) - 4); + if ($this->isOld($key, $config)) { + unlink($dir . '/' . $filename); + } + } + closedir($dh); + return true; + } + + /** + * Generates the file path to the serial file corresponding to + * the configuration and definition name + * @param HTMLPurifier_Config $config + * @return string + * @todo Make protected + */ + public function generateFilePath($config) + { + $key = $this->generateKey($config); + return $this->generateDirectoryPath($config) . '/' . $key . '.ser'; + } + + /** + * Generates the path to the directory contain this cache's serial files + * @param HTMLPurifier_Config $config + * @return string + * @note No trailing slash + * @todo Make protected + */ + public function generateDirectoryPath($config) + { + $base = $this->generateBaseDirectoryPath($config); + return $base . '/' . $this->type; + } + + /** + * Generates path to base directory that contains all definition type + * serials + * @param HTMLPurifier_Config $config + * @return mixed|string + * @todo Make protected + */ + public function generateBaseDirectoryPath($config) + { + $base = $config->get('Cache.SerializerPath'); + $base = is_null($base) ? HTMLPURIFIER_PREFIX . '/HTMLPurifier/DefinitionCache/Serializer' : $base; + return $base; + } + + /** + * Convenience wrapper function for file_put_contents + * @param string $file File name to write to + * @param string $data Data to write into file + * @param HTMLPurifier_Config $config + * @return int|bool Number of bytes written if success, or false if failure. + */ + private function _write($file, $data, $config) + { + $result = file_put_contents($file, $data); + if ($result !== false) { + // set permissions of the new file (no execute) + $chmod = $config->get('Cache.SerializerPermissions'); + if ($chmod !== null) { + chmod($file, $chmod & 0666); + } + } + return $result; + } + + /** + * Prepares the directory that this type stores the serials in + * @param HTMLPurifier_Config $config + * @return bool True if successful + */ + private function _prepareDir($config) + { + $directory = $this->generateDirectoryPath($config); + $chmod = $config->get('Cache.SerializerPermissions'); + if ($chmod === null) { + if (!@mkdir($directory) && !is_dir($directory)) { + trigger_error( + 'Could not create directory ' . $directory . '', + E_USER_WARNING + ); + return false; + } + return true; + } + if (!is_dir($directory)) { + $base = $this->generateBaseDirectoryPath($config); + if (!is_dir($base)) { + trigger_error( + 'Base directory ' . $base . ' does not exist, + please create or change using %Cache.SerializerPath', + E_USER_WARNING + ); + return false; + } elseif (!$this->_testPermissions($base, $chmod)) { + return false; + } + if (!@mkdir($directory, $chmod) && !is_dir($directory)) { + trigger_error( + 'Could not create directory ' . $directory . '', + E_USER_WARNING + ); + return false; + } + if (!$this->_testPermissions($directory, $chmod)) { + return false; + } + } elseif (!$this->_testPermissions($directory, $chmod)) { + return false; + } + return true; + } + + /** + * Tests permissions on a directory and throws out friendly + * error messages and attempts to chmod it itself if possible + * @param string $dir Directory path + * @param int $chmod Permissions + * @return bool True if directory is writable + */ + private function _testPermissions($dir, $chmod) + { + // early abort, if it is writable, everything is hunky-dory + if (is_writable($dir)) { + return true; + } + if (!is_dir($dir)) { + // generally, you'll want to handle this beforehand + // so a more specific error message can be given + trigger_error( + 'Directory ' . $dir . ' does not exist', + E_USER_WARNING + ); + return false; + } + if (function_exists('posix_getuid') && $chmod !== null) { + // POSIX system, we can give more specific advice + if (fileowner($dir) === posix_getuid()) { + // we can chmod it ourselves + $chmod = $chmod | 0700; + if (chmod($dir, $chmod)) { + return true; + } + } elseif (filegroup($dir) === posix_getgid()) { + $chmod = $chmod | 0070; + } else { + // PHP's probably running as nobody, so we'll + // need to give global permissions + $chmod = $chmod | 0777; + } + trigger_error( + 'Directory ' . $dir . ' not writable, ' . + 'please chmod to ' . decoct($chmod), + E_USER_WARNING + ); + } else { + // generic error message + trigger_error( + 'Directory ' . $dir . ' not writable, ' . + 'please alter file permissions', + E_USER_WARNING + ); + } + return false; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Serializer/README similarity index 100% rename from libraries/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README rename to libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCache/Serializer/README diff --git a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCacheFactory.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php rename to libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCacheFactory.php index 3adefbb661c5d55df6fd403f9ba07b4a57187a09..737b8bb3b0f0319768801ba2c552c6c6348ccc93 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DefinitionCacheFactory.php @@ -1,91 +1,106 @@ -<?php - -/** - * Responsible for creating definition caches. - */ -class HTMLPurifier_DefinitionCacheFactory -{ - - protected $caches = array('Serializer' => array()); - protected $implementations = array(); - protected $decorators = array(); - - /** - * Initialize default decorators - */ - public function setup() { - $this->addDecorator('Cleanup'); - } - - /** - * Retrieves an instance of global definition cache factory. - */ - public static function instance($prototype = null) { - static $instance; - if ($prototype !== null) { - $instance = $prototype; - } elseif ($instance === null || $prototype === true) { - $instance = new HTMLPurifier_DefinitionCacheFactory(); - $instance->setup(); - } - return $instance; - } - - /** - * Registers a new definition cache object - * @param $short Short name of cache object, for reference - * @param $long Full class name of cache object, for construction - */ - public function register($short, $long) { - $this->implementations[$short] = $long; - } - - /** - * Factory method that creates a cache object based on configuration - * @param $name Name of definitions handled by cache - * @param $config Instance of HTMLPurifier_Config - */ - public function create($type, $config) { - $method = $config->get('Cache', 'DefinitionImpl'); - if ($method === null) { - return new HTMLPurifier_DefinitionCache_Null($type); - } - if (!empty($this->caches[$method][$type])) { - return $this->caches[$method][$type]; - } - if ( - isset($this->implementations[$method]) && - class_exists($class = $this->implementations[$method], false) - ) { - $cache = new $class($type); - } else { - if ($method != 'Serializer') { - trigger_error("Unrecognized DefinitionCache $method, using Serializer instead", E_USER_WARNING); - } - $cache = new HTMLPurifier_DefinitionCache_Serializer($type); - } - foreach ($this->decorators as $decorator) { - $new_cache = $decorator->decorate($cache); - // prevent infinite recursion in PHP 4 - unset($cache); - $cache = $new_cache; - } - $this->caches[$method][$type] = $cache; - return $this->caches[$method][$type]; - } - - /** - * Registers a decorator to add to all new cache objects - * @param - */ - public function addDecorator($decorator) { - if (is_string($decorator)) { - $class = "HTMLPurifier_DefinitionCache_Decorator_$decorator"; - $decorator = new $class; - } - $this->decorators[$decorator->name] = $decorator; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Responsible for creating definition caches. + */ +class HTMLPurifier_DefinitionCacheFactory +{ + /** + * @type array + */ + protected $caches = array('Serializer' => array()); + + /** + * @type array + */ + protected $implementations = array(); + + /** + * @type HTMLPurifier_DefinitionCache_Decorator[] + */ + protected $decorators = array(); + + /** + * Initialize default decorators + */ + public function setup() + { + $this->addDecorator('Cleanup'); + } + + /** + * Retrieves an instance of global definition cache factory. + * @param HTMLPurifier_DefinitionCacheFactory $prototype + * @return HTMLPurifier_DefinitionCacheFactory + */ + public static function instance($prototype = null) + { + static $instance; + if ($prototype !== null) { + $instance = $prototype; + } elseif ($instance === null || $prototype === true) { + $instance = new HTMLPurifier_DefinitionCacheFactory(); + $instance->setup(); + } + return $instance; + } + + /** + * Registers a new definition cache object + * @param string $short Short name of cache object, for reference + * @param string $long Full class name of cache object, for construction + */ + public function register($short, $long) + { + $this->implementations[$short] = $long; + } + + /** + * Factory method that creates a cache object based on configuration + * @param string $type Name of definitions handled by cache + * @param HTMLPurifier_Config $config Config instance + * @return mixed + */ + public function create($type, $config) + { + $method = $config->get('Cache.DefinitionImpl'); + if ($method === null) { + return new HTMLPurifier_DefinitionCache_Null($type); + } + if (!empty($this->caches[$method][$type])) { + return $this->caches[$method][$type]; + } + if (isset($this->implementations[$method]) && + class_exists($class = $this->implementations[$method], false)) { + $cache = new $class($type); + } else { + if ($method != 'Serializer') { + trigger_error("Unrecognized DefinitionCache $method, using Serializer instead", E_USER_WARNING); + } + $cache = new HTMLPurifier_DefinitionCache_Serializer($type); + } + foreach ($this->decorators as $decorator) { + $new_cache = $decorator->decorate($cache); + // prevent infinite recursion in PHP 4 + unset($cache); + $cache = $new_cache; + } + $this->caches[$method][$type] = $cache; + return $this->caches[$method][$type]; + } + + /** + * Registers a decorator to add to all new cache objects + * @param HTMLPurifier_DefinitionCache_Decorator|string $decorator An instance or the name of a decorator + */ + public function addDecorator($decorator) + { + if (is_string($decorator)) { + $class = "HTMLPurifier_DefinitionCache_Decorator_$decorator"; + $decorator = new $class; + } + $this->decorators[$decorator->name] = $decorator; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Doctype.php b/libraries/htmlpurifier410/library/HTMLPurifier/Doctype.php similarity index 74% rename from libraries/htmlpurifier/library/HTMLPurifier/Doctype.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Doctype.php index 1e3c574c065279b2338a1add7e303e90e3affd20..4d723129e09e86bd174bab67a6ec89f8db6a6b97 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Doctype.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Doctype.php @@ -1,60 +1,73 @@ -<?php - -/** - * Represents a document type, contains information on which modules - * need to be loaded. - * @note This class is inspected by Printer_HTMLDefinition->renderDoctype. - * If structure changes, please update that function. - */ -class HTMLPurifier_Doctype -{ - /** - * Full name of doctype - */ - public $name; - - /** - * List of standard modules (string identifiers or literal objects) - * that this doctype uses - */ - public $modules = array(); - - /** - * List of modules to use for tidying up code - */ - public $tidyModules = array(); - - /** - * Is the language derived from XML (i.e. XHTML)? - */ - public $xml = true; - - /** - * List of aliases for this doctype - */ - public $aliases = array(); - - /** - * Public DTD identifier - */ - public $dtdPublic; - - /** - * System DTD identifier - */ - public $dtdSystem; - - public function __construct($name = null, $xml = true, $modules = array(), - $tidyModules = array(), $aliases = array(), $dtd_public = null, $dtd_system = null - ) { - $this->name = $name; - $this->xml = $xml; - $this->modules = $modules; - $this->tidyModules = $tidyModules; - $this->aliases = $aliases; - $this->dtdPublic = $dtd_public; - $this->dtdSystem = $dtd_system; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Represents a document type, contains information on which modules + * need to be loaded. + * @note This class is inspected by Printer_HTMLDefinition->renderDoctype. + * If structure changes, please update that function. + */ +class HTMLPurifier_Doctype +{ + /** + * Full name of doctype + * @type string + */ + public $name; + + /** + * List of standard modules (string identifiers or literal objects) + * that this doctype uses + * @type array + */ + public $modules = array(); + + /** + * List of modules to use for tidying up code + * @type array + */ + public $tidyModules = array(); + + /** + * Is the language derived from XML (i.e. XHTML)? + * @type bool + */ + public $xml = true; + + /** + * List of aliases for this doctype + * @type array + */ + public $aliases = array(); + + /** + * Public DTD identifier + * @type string + */ + public $dtdPublic; + + /** + * System DTD identifier + * @type string + */ + public $dtdSystem; + + public function __construct( + $name = null, + $xml = true, + $modules = array(), + $tidyModules = array(), + $aliases = array(), + $dtd_public = null, + $dtd_system = null + ) { + $this->name = $name; + $this->xml = $xml; + $this->modules = $modules; + $this->tidyModules = $tidyModules; + $this->aliases = $aliases; + $this->dtdPublic = $dtd_public; + $this->dtdSystem = $dtd_system; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/DoctypeRegistry.php b/libraries/htmlpurifier410/library/HTMLPurifier/DoctypeRegistry.php new file mode 100644 index 0000000000000000000000000000000000000000..cab9dc53615b8f92cec2e9f5933c015c63d59369 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/DoctypeRegistry.php @@ -0,0 +1,142 @@ +<?php + +class HTMLPurifier_DoctypeRegistry +{ + + /** + * Hash of doctype names to doctype objects. + * @type array + */ + protected $doctypes; + + /** + * Lookup table of aliases to real doctype names. + * @type array + */ + protected $aliases; + + /** + * Registers a doctype to the registry + * @note Accepts a fully-formed doctype object, or the + * parameters for constructing a doctype object + * @param string $doctype Name of doctype or literal doctype object + * @param bool $xml + * @param array $modules Modules doctype will load + * @param array $tidy_modules Modules doctype will load for certain modes + * @param array $aliases Alias names for doctype + * @param string $dtd_public + * @param string $dtd_system + * @return HTMLPurifier_Doctype Editable registered doctype + */ + public function register( + $doctype, + $xml = true, + $modules = array(), + $tidy_modules = array(), + $aliases = array(), + $dtd_public = null, + $dtd_system = null + ) { + if (!is_array($modules)) { + $modules = array($modules); + } + if (!is_array($tidy_modules)) { + $tidy_modules = array($tidy_modules); + } + if (!is_array($aliases)) { + $aliases = array($aliases); + } + if (!is_object($doctype)) { + $doctype = new HTMLPurifier_Doctype( + $doctype, + $xml, + $modules, + $tidy_modules, + $aliases, + $dtd_public, + $dtd_system + ); + } + $this->doctypes[$doctype->name] = $doctype; + $name = $doctype->name; + // hookup aliases + foreach ($doctype->aliases as $alias) { + if (isset($this->doctypes[$alias])) { + continue; + } + $this->aliases[$alias] = $name; + } + // remove old aliases + if (isset($this->aliases[$name])) { + unset($this->aliases[$name]); + } + return $doctype; + } + + /** + * Retrieves reference to a doctype of a certain name + * @note This function resolves aliases + * @note When possible, use the more fully-featured make() + * @param string $doctype Name of doctype + * @return HTMLPurifier_Doctype Editable doctype object + */ + public function get($doctype) + { + if (isset($this->aliases[$doctype])) { + $doctype = $this->aliases[$doctype]; + } + if (!isset($this->doctypes[$doctype])) { + trigger_error('Doctype ' . htmlspecialchars($doctype) . ' does not exist', E_USER_ERROR); + $anon = new HTMLPurifier_Doctype($doctype); + return $anon; + } + return $this->doctypes[$doctype]; + } + + /** + * Creates a doctype based on a configuration object, + * will perform initialization on the doctype + * @note Use this function to get a copy of doctype that config + * can hold on to (this is necessary in order to tell + * Generator whether or not the current document is XML + * based or not). + * @param HTMLPurifier_Config $config + * @return HTMLPurifier_Doctype + */ + public function make($config) + { + return clone $this->get($this->getDoctypeFromConfig($config)); + } + + /** + * Retrieves the doctype from the configuration object + * @param HTMLPurifier_Config $config + * @return string + */ + public function getDoctypeFromConfig($config) + { + // recommended test + $doctype = $config->get('HTML.Doctype'); + if (!empty($doctype)) { + return $doctype; + } + $doctype = $config->get('HTML.CustomDoctype'); + if (!empty($doctype)) { + return $doctype; + } + // backwards-compatibility + if ($config->get('HTML.XHTML')) { + $doctype = 'XHTML 1.0'; + } else { + $doctype = 'HTML 4.01'; + } + if ($config->get('HTML.Strict')) { + $doctype .= ' Strict'; + } else { + $doctype .= ' Transitional'; + } + return $doctype; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ElementDef.php b/libraries/htmlpurifier410/library/HTMLPurifier/ElementDef.php similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/ElementDef.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ElementDef.php index b55c7bd79337e337a5e8f28fc1df6befa3f41a8f..089f7efe8f3c9a7dd432b7d582a73438b2bd2515 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ElementDef.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ElementDef.php @@ -1,175 +1,216 @@ -<?php - -/** - * Structure that stores an HTML element definition. Used by - * HTMLPurifier_HTMLDefinition and HTMLPurifier_HTMLModule. - * @note This class is inspected by HTMLPurifier_Printer_HTMLDefinition. - * Please update that class too. - * @warning If you add new properties to this class, you MUST update - * the mergeIn() method. - */ -class HTMLPurifier_ElementDef -{ - - /** - * Does the definition work by itself, or is it created solely - * for the purpose of merging into another definition? - */ - public $standalone = true; - - /** - * Associative array of attribute name to HTMLPurifier_AttrDef - * @note Before being processed by HTMLPurifier_AttrCollections - * when modules are finalized during - * HTMLPurifier_HTMLDefinition->setup(), this array may also - * contain an array at index 0 that indicates which attribute - * collections to load into the full array. It may also - * contain string indentifiers in lieu of HTMLPurifier_AttrDef, - * see HTMLPurifier_AttrTypes on how they are expanded during - * HTMLPurifier_HTMLDefinition->setup() processing. - */ - public $attr = array(); - - /** - * Indexed list of tag's HTMLPurifier_AttrTransform to be done before validation - */ - public $attr_transform_pre = array(); - - /** - * Indexed list of tag's HTMLPurifier_AttrTransform to be done after validation - */ - public $attr_transform_post = array(); - - /** - * HTMLPurifier_ChildDef of this tag. - */ - public $child; - - /** - * Abstract string representation of internal ChildDef rules. See - * HTMLPurifier_ContentSets for how this is parsed and then transformed - * into an HTMLPurifier_ChildDef. - * @warning This is a temporary variable that is not available after - * being processed by HTMLDefinition - */ - public $content_model; - - /** - * Value of $child->type, used to determine which ChildDef to use, - * used in combination with $content_model. - * @warning This must be lowercase - * @warning This is a temporary variable that is not available after - * being processed by HTMLDefinition - */ - public $content_model_type; - - - - /** - * Does the element have a content model (#PCDATA | Inline)*? This - * is important for chameleon ins and del processing in - * HTMLPurifier_ChildDef_Chameleon. Dynamically set: modules don't - * have to worry about this one. - */ - public $descendants_are_inline = false; - - /** - * List of the names of required attributes this element has. Dynamically - * populated by HTMLPurifier_HTMLDefinition::getElement - */ - public $required_attr = array(); - - /** - * Lookup table of tags excluded from all descendants of this tag. - * @note SGML permits exclusions for all descendants, but this is - * not possible with DTDs or XML Schemas. W3C has elected to - * use complicated compositions of content_models to simulate - * exclusion for children, but we go the simpler, SGML-style - * route of flat-out exclusions, which correctly apply to - * all descendants and not just children. Note that the XHTML - * Modularization Abstract Modules are blithely unaware of such - * distinctions. - */ - public $excludes = array(); - - /** - * This tag is explicitly auto-closed by the following tags. - */ - public $autoclose = array(); - - /** - * Whether or not this is a formatting element affected by the - * "Active Formatting Elements" algorithm. - */ - public $formatting; - - /** - * Low-level factory constructor for creating new standalone element defs - */ - public static function create($content_model, $content_model_type, $attr) { - $def = new HTMLPurifier_ElementDef(); - $def->content_model = $content_model; - $def->content_model_type = $content_model_type; - $def->attr = $attr; - return $def; - } - - /** - * Merges the values of another element definition into this one. - * Values from the new element def take precedence if a value is - * not mergeable. - */ - public function mergeIn($def) { - - // later keys takes precedence - foreach($def->attr as $k => $v) { - if ($k === 0) { - // merge in the includes - // sorry, no way to override an include - foreach ($v as $v2) { - $this->attr[0][] = $v2; - } - continue; - } - if ($v === false) { - if (isset($this->attr[$k])) unset($this->attr[$k]); - continue; - } - $this->attr[$k] = $v; - } - $this->_mergeAssocArray($this->attr_transform_pre, $def->attr_transform_pre); - $this->_mergeAssocArray($this->attr_transform_post, $def->attr_transform_post); - $this->_mergeAssocArray($this->excludes, $def->excludes); - - if(!empty($def->content_model)) { - $this->content_model .= ' | ' . $def->content_model; - $this->child = false; - } - if(!empty($def->content_model_type)) { - $this->content_model_type = $def->content_model_type; - $this->child = false; - } - if(!is_null($def->child)) $this->child = $def->child; - if(!is_null($def->formatting)) $this->formatting = $def->formatting; - if($def->descendants_are_inline) $this->descendants_are_inline = $def->descendants_are_inline; - - } - - /** - * Merges one array into another, removes values which equal false - * @param $a1 Array by reference that is merged into - * @param $a2 Array that merges into $a1 - */ - private function _mergeAssocArray(&$a1, $a2) { - foreach ($a2 as $k => $v) { - if ($v === false) { - if (isset($a1[$k])) unset($a1[$k]); - continue; - } - $a1[$k] = $v; - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Structure that stores an HTML element definition. Used by + * HTMLPurifier_HTMLDefinition and HTMLPurifier_HTMLModule. + * @note This class is inspected by HTMLPurifier_Printer_HTMLDefinition. + * Please update that class too. + * @warning If you add new properties to this class, you MUST update + * the mergeIn() method. + */ +class HTMLPurifier_ElementDef +{ + /** + * Does the definition work by itself, or is it created solely + * for the purpose of merging into another definition? + * @type bool + */ + public $standalone = true; + + /** + * Associative array of attribute name to HTMLPurifier_AttrDef. + * @type array + * @note Before being processed by HTMLPurifier_AttrCollections + * when modules are finalized during + * HTMLPurifier_HTMLDefinition->setup(), this array may also + * contain an array at index 0 that indicates which attribute + * collections to load into the full array. It may also + * contain string indentifiers in lieu of HTMLPurifier_AttrDef, + * see HTMLPurifier_AttrTypes on how they are expanded during + * HTMLPurifier_HTMLDefinition->setup() processing. + */ + public $attr = array(); + + // XXX: Design note: currently, it's not possible to override + // previously defined AttrTransforms without messing around with + // the final generated config. This is by design; a previous version + // used an associated list of attr_transform, but it was extremely + // easy to accidentally override other attribute transforms by + // forgetting to specify an index (and just using 0.) While we + // could check this by checking the index number and complaining, + // there is a second problem which is that it is not at all easy to + // tell when something is getting overridden. Combine this with a + // codebase where this isn't really being used, and it's perfect for + // nuking. + + /** + * List of tags HTMLPurifier_AttrTransform to be done before validation. + * @type array + */ + public $attr_transform_pre = array(); + + /** + * List of tags HTMLPurifier_AttrTransform to be done after validation. + * @type array + */ + public $attr_transform_post = array(); + + /** + * HTMLPurifier_ChildDef of this tag. + * @type HTMLPurifier_ChildDef + */ + public $child; + + /** + * Abstract string representation of internal ChildDef rules. + * @see HTMLPurifier_ContentSets for how this is parsed and then transformed + * into an HTMLPurifier_ChildDef. + * @warning This is a temporary variable that is not available after + * being processed by HTMLDefinition + * @type string + */ + public $content_model; + + /** + * Value of $child->type, used to determine which ChildDef to use, + * used in combination with $content_model. + * @warning This must be lowercase + * @warning This is a temporary variable that is not available after + * being processed by HTMLDefinition + * @type string + */ + public $content_model_type; + + /** + * Does the element have a content model (#PCDATA | Inline)*? This + * is important for chameleon ins and del processing in + * HTMLPurifier_ChildDef_Chameleon. Dynamically set: modules don't + * have to worry about this one. + * @type bool + */ + public $descendants_are_inline = false; + + /** + * List of the names of required attributes this element has. + * Dynamically populated by HTMLPurifier_HTMLDefinition::getElement() + * @type array + */ + public $required_attr = array(); + + /** + * Lookup table of tags excluded from all descendants of this tag. + * @type array + * @note SGML permits exclusions for all descendants, but this is + * not possible with DTDs or XML Schemas. W3C has elected to + * use complicated compositions of content_models to simulate + * exclusion for children, but we go the simpler, SGML-style + * route of flat-out exclusions, which correctly apply to + * all descendants and not just children. Note that the XHTML + * Modularization Abstract Modules are blithely unaware of such + * distinctions. + */ + public $excludes = array(); + + /** + * This tag is explicitly auto-closed by the following tags. + * @type array + */ + public $autoclose = array(); + + /** + * If a foreign element is found in this element, test if it is + * allowed by this sub-element; if it is, instead of closing the + * current element, place it inside this element. + * @type string + */ + public $wrap; + + /** + * Whether or not this is a formatting element affected by the + * "Active Formatting Elements" algorithm. + * @type bool + */ + public $formatting; + + /** + * Low-level factory constructor for creating new standalone element defs + */ + public static function create($content_model, $content_model_type, $attr) + { + $def = new HTMLPurifier_ElementDef(); + $def->content_model = $content_model; + $def->content_model_type = $content_model_type; + $def->attr = $attr; + return $def; + } + + /** + * Merges the values of another element definition into this one. + * Values from the new element def take precedence if a value is + * not mergeable. + * @param HTMLPurifier_ElementDef $def + */ + public function mergeIn($def) + { + // later keys takes precedence + foreach ($def->attr as $k => $v) { + if ($k === 0) { + // merge in the includes + // sorry, no way to override an include + foreach ($v as $v2) { + $this->attr[0][] = $v2; + } + continue; + } + if ($v === false) { + if (isset($this->attr[$k])) { + unset($this->attr[$k]); + } + continue; + } + $this->attr[$k] = $v; + } + $this->_mergeAssocArray($this->excludes, $def->excludes); + $this->attr_transform_pre = array_merge($this->attr_transform_pre, $def->attr_transform_pre); + $this->attr_transform_post = array_merge($this->attr_transform_post, $def->attr_transform_post); + + if (!empty($def->content_model)) { + $this->content_model = + str_replace("#SUPER", $this->content_model, $def->content_model); + $this->child = false; + } + if (!empty($def->content_model_type)) { + $this->content_model_type = $def->content_model_type; + $this->child = false; + } + if (!is_null($def->child)) { + $this->child = $def->child; + } + if (!is_null($def->formatting)) { + $this->formatting = $def->formatting; + } + if ($def->descendants_are_inline) { + $this->descendants_are_inline = $def->descendants_are_inline; + } + } + + /** + * Merges one array into another, removes values which equal false + * @param $a1 Array by reference that is merged into + * @param $a2 Array that merges into $a1 + */ + private function _mergeAssocArray(&$a1, $a2) + { + foreach ($a2 as $k => $v) { + if ($v === false) { + if (isset($a1[$k])) { + unset($a1[$k]); + } + continue; + } + $a1[$k] = $v; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Encoder.php b/libraries/htmlpurifier410/library/HTMLPurifier/Encoder.php similarity index 58% rename from libraries/htmlpurifier/library/HTMLPurifier/Encoder.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Encoder.php index 79a42d26ec3cd70b4f5c816ab779a894b881cb10..ea13abcdbc8195774fd6e49e80d375e11928d78d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Encoder.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Encoder.php @@ -1,426 +1,617 @@ -<?php - -/** - * A UTF-8 specific character encoder that handles cleaning and transforming. - * @note All functions in this class should be static. - */ -class HTMLPurifier_Encoder -{ - - /** - * Constructor throws fatal error if you attempt to instantiate class - */ - private function __construct() { - trigger_error('Cannot instantiate encoder, call methods statically', E_USER_ERROR); - } - - /** - * Error-handler that mutes errors, alternative to shut-up operator. - */ - private static function muteErrorHandler() {} - - /** - * Cleans a UTF-8 string for well-formedness and SGML validity - * - * It will parse according to UTF-8 and return a valid UTF8 string, with - * non-SGML codepoints excluded. - * - * @note Just for reference, the non-SGML code points are 0 to 31 and - * 127 to 159, inclusive. However, we allow code points 9, 10 - * and 13, which are the tab, line feed and carriage return - * respectively. 128 and above the code points map to multibyte - * UTF-8 representations. - * - * @note Fallback code adapted from utf8ToUnicode by Henri Sivonen and - * hsivonen@iki.fi at <http://iki.fi/hsivonen/php-utf8/> under the - * LGPL license. Notes on what changed are inside, but in general, - * the original code transformed UTF-8 text into an array of integer - * Unicode codepoints. Understandably, transforming that back to - * a string would be somewhat expensive, so the function was modded to - * directly operate on the string. However, this discourages code - * reuse, and the logic enumerated here would be useful for any - * function that needs to be able to understand UTF-8 characters. - * As of right now, only smart lossless character encoding converters - * would need that, and I'm probably not going to implement them. - * Once again, PHP 6 should solve all our problems. - */ - public static function cleanUTF8($str, $force_php = false) { - - // UTF-8 validity is checked since PHP 4.3.5 - // This is an optimization: if the string is already valid UTF-8, no - // need to do PHP stuff. 99% of the time, this will be the case. - // The regexp matches the XML char production, as well as well as excluding - // non-SGML codepoints U+007F to U+009F - if (preg_match('/^[\x{9}\x{A}\x{D}\x{20}-\x{7E}\x{A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]*$/Du', $str)) { - return $str; - } - - $mState = 0; // cached expected number of octets after the current octet - // until the beginning of the next UTF8 character sequence - $mUcs4 = 0; // cached Unicode character - $mBytes = 1; // cached expected number of octets in the current sequence - - // original code involved an $out that was an array of Unicode - // codepoints. Instead of having to convert back into UTF-8, we've - // decided to directly append valid UTF-8 characters onto a string - // $out once they're done. $char accumulates raw bytes, while $mUcs4 - // turns into the Unicode code point, so there's some redundancy. - - $out = ''; - $char = ''; - - $len = strlen($str); - for($i = 0; $i < $len; $i++) { - $in = ord($str{$i}); - $char .= $str[$i]; // append byte to char - if (0 == $mState) { - // When mState is zero we expect either a US-ASCII character - // or a multi-octet sequence. - if (0 == (0x80 & ($in))) { - // US-ASCII, pass straight through. - if (($in <= 31 || $in == 127) && - !($in == 9 || $in == 13 || $in == 10) // save \r\t\n - ) { - // control characters, remove - } else { - $out .= $char; - } - // reset - $char = ''; - $mBytes = 1; - } elseif (0xC0 == (0xE0 & ($in))) { - // First octet of 2 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x1F) << 6; - $mState = 1; - $mBytes = 2; - } elseif (0xE0 == (0xF0 & ($in))) { - // First octet of 3 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x0F) << 12; - $mState = 2; - $mBytes = 3; - } elseif (0xF0 == (0xF8 & ($in))) { - // First octet of 4 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x07) << 18; - $mState = 3; - $mBytes = 4; - } elseif (0xF8 == (0xFC & ($in))) { - // First octet of 5 octet sequence. - // - // This is illegal because the encoded codepoint must be - // either: - // (a) not the shortest form or - // (b) outside the Unicode range of 0-0x10FFFF. - // Rather than trying to resynchronize, we will carry on - // until the end of the sequence and let the later error - // handling code catch it. - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x03) << 24; - $mState = 4; - $mBytes = 5; - } elseif (0xFC == (0xFE & ($in))) { - // First octet of 6 octet sequence, see comments for 5 - // octet sequence. - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 1) << 30; - $mState = 5; - $mBytes = 6; - } else { - // Current octet is neither in the US-ASCII range nor a - // legal first octet of a multi-octet sequence. - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char = ''; - } - } else { - // When mState is non-zero, we expect a continuation of the - // multi-octet sequence - if (0x80 == (0xC0 & ($in))) { - // Legal continuation. - $shift = ($mState - 1) * 6; - $tmp = $in; - $tmp = ($tmp & 0x0000003F) << $shift; - $mUcs4 |= $tmp; - - if (0 == --$mState) { - // End of the multi-octet sequence. mUcs4 now contains - // the final Unicode codepoint to be output - - // Check for illegal sequences and codepoints. - - // From Unicode 3.1, non-shortest form is illegal - if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || - ((3 == $mBytes) && ($mUcs4 < 0x0800)) || - ((4 == $mBytes) && ($mUcs4 < 0x10000)) || - (4 < $mBytes) || - // From Unicode 3.2, surrogate characters = illegal - (($mUcs4 & 0xFFFFF800) == 0xD800) || - // Codepoints outside the Unicode range are illegal - ($mUcs4 > 0x10FFFF) - ) { - - } elseif (0xFEFF != $mUcs4 && // omit BOM - // check for valid Char unicode codepoints - ( - 0x9 == $mUcs4 || - 0xA == $mUcs4 || - 0xD == $mUcs4 || - (0x20 <= $mUcs4 && 0x7E >= $mUcs4) || - // 7F-9F is not strictly prohibited by XML, - // but it is non-SGML, and thus we don't allow it - (0xA0 <= $mUcs4 && 0xD7FF >= $mUcs4) || - (0x10000 <= $mUcs4 && 0x10FFFF >= $mUcs4) - ) - ) { - $out .= $char; - } - // initialize UTF8 cache (reset) - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char = ''; - } - } else { - // ((0xC0 & (*in) != 0x80) && (mState != 0)) - // Incomplete multi-octet sequence. - // used to result in complete fail, but we'll reset - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char =''; - } - } - } - return $out; - } - - /** - * Translates a Unicode codepoint into its corresponding UTF-8 character. - * @note Based on Feyd's function at - * <http://forums.devnetwork.net/viewtopic.php?p=191404#191404>, - * which is in public domain. - * @note While we're going to do code point parsing anyway, a good - * optimization would be to refuse to translate code points that - * are non-SGML characters. However, this could lead to duplication. - * @note This is very similar to the unichr function in - * maintenance/generate-entity-file.php (although this is superior, - * due to its sanity checks). - */ - - // +----------+----------+----------+----------+ - // | 33222222 | 22221111 | 111111 | | - // | 10987654 | 32109876 | 54321098 | 76543210 | bit - // +----------+----------+----------+----------+ - // | | | | 0xxxxxxx | 1 byte 0x00000000..0x0000007F - // | | | 110yyyyy | 10xxxxxx | 2 byte 0x00000080..0x000007FF - // | | 1110zzzz | 10yyyyyy | 10xxxxxx | 3 byte 0x00000800..0x0000FFFF - // | 11110www | 10wwzzzz | 10yyyyyy | 10xxxxxx | 4 byte 0x00010000..0x0010FFFF - // +----------+----------+----------+----------+ - // | 00000000 | 00011111 | 11111111 | 11111111 | Theoretical upper limit of legal scalars: 2097151 (0x001FFFFF) - // | 00000000 | 00010000 | 11111111 | 11111111 | Defined upper limit of legal scalar codes - // +----------+----------+----------+----------+ - - public static function unichr($code) { - if($code > 1114111 or $code < 0 or - ($code >= 55296 and $code <= 57343) ) { - // bits are set outside the "valid" range as defined - // by UNICODE 4.1.0 - return ''; - } - - $x = $y = $z = $w = 0; - if ($code < 128) { - // regular ASCII character - $x = $code; - } else { - // set up bits for UTF-8 - $x = ($code & 63) | 128; - if ($code < 2048) { - $y = (($code & 2047) >> 6) | 192; - } else { - $y = (($code & 4032) >> 6) | 128; - if($code < 65536) { - $z = (($code >> 12) & 15) | 224; - } else { - $z = (($code >> 12) & 63) | 128; - $w = (($code >> 18) & 7) | 240; - } - } - } - // set up the actual character - $ret = ''; - if($w) $ret .= chr($w); - if($z) $ret .= chr($z); - if($y) $ret .= chr($y); - $ret .= chr($x); - - return $ret; - } - - /** - * Converts a string to UTF-8 based on configuration. - */ - public static function convertToUTF8($str, $config, $context) { - $encoding = $config->get('Core', 'Encoding'); - if ($encoding === 'utf-8') return $str; - static $iconv = null; - if ($iconv === null) $iconv = function_exists('iconv'); - set_error_handler(array('HTMLPurifier_Encoder', 'muteErrorHandler')); - if ($iconv && !$config->get('Test', 'ForceNoIconv')) { - $str = iconv($encoding, 'utf-8//IGNORE', $str); - if ($str === false) { - // $encoding is not a valid encoding - restore_error_handler(); - trigger_error('Invalid encoding ' . $encoding, E_USER_ERROR); - return ''; - } - // If the string is bjorked by Shift_JIS or a similar encoding - // that doesn't support all of ASCII, convert the naughty - // characters to their true byte-wise ASCII/UTF-8 equivalents. - $str = strtr($str, HTMLPurifier_Encoder::testEncodingSupportsASCII($encoding)); - restore_error_handler(); - return $str; - } elseif ($encoding === 'iso-8859-1') { - $str = utf8_encode($str); - restore_error_handler(); - return $str; - } - trigger_error('Encoding not supported, please install iconv', E_USER_ERROR); - } - - /** - * Converts a string from UTF-8 based on configuration. - * @note Currently, this is a lossy conversion, with unexpressable - * characters being omitted. - */ - public static function convertFromUTF8($str, $config, $context) { - $encoding = $config->get('Core', 'Encoding'); - if ($encoding === 'utf-8') return $str; - static $iconv = null; - if ($iconv === null) $iconv = function_exists('iconv'); - if ($escape = $config->get('Core', 'EscapeNonASCIICharacters')) { - $str = HTMLPurifier_Encoder::convertToASCIIDumbLossless($str); - } - set_error_handler(array('HTMLPurifier_Encoder', 'muteErrorHandler')); - if ($iconv && !$config->get('Test', 'ForceNoIconv')) { - // Undo our previous fix in convertToUTF8, otherwise iconv will barf - $ascii_fix = HTMLPurifier_Encoder::testEncodingSupportsASCII($encoding); - if (!$escape && !empty($ascii_fix)) { - $clear_fix = array(); - foreach ($ascii_fix as $utf8 => $native) $clear_fix[$utf8] = ''; - $str = strtr($str, $clear_fix); - } - $str = strtr($str, array_flip($ascii_fix)); - // Normal stuff - $str = iconv('utf-8', $encoding . '//IGNORE', $str); - restore_error_handler(); - return $str; - } elseif ($encoding === 'iso-8859-1') { - $str = utf8_decode($str); - restore_error_handler(); - return $str; - } - trigger_error('Encoding not supported', E_USER_ERROR); - } - - /** - * Lossless (character-wise) conversion of HTML to ASCII - * @param $str UTF-8 string to be converted to ASCII - * @returns ASCII encoded string with non-ASCII character entity-ized - * @warning Adapted from MediaWiki, claiming fair use: this is a common - * algorithm. If you disagree with this license fudgery, - * implement it yourself. - * @note Uses decimal numeric entities since they are best supported. - * @note This is a DUMB function: it has no concept of keeping - * character entities that the projected character encoding - * can allow. We could possibly implement a smart version - * but that would require it to also know which Unicode - * codepoints the charset supported (not an easy task). - * @note Sort of with cleanUTF8() but it assumes that $str is - * well-formed UTF-8 - */ - public static function convertToASCIIDumbLossless($str) { - $bytesleft = 0; - $result = ''; - $working = 0; - $len = strlen($str); - for( $i = 0; $i < $len; $i++ ) { - $bytevalue = ord( $str[$i] ); - if( $bytevalue <= 0x7F ) { //0xxx xxxx - $result .= chr( $bytevalue ); - $bytesleft = 0; - } elseif( $bytevalue <= 0xBF ) { //10xx xxxx - $working = $working << 6; - $working += ($bytevalue & 0x3F); - $bytesleft--; - if( $bytesleft <= 0 ) { - $result .= "&#" . $working . ";"; - } - } elseif( $bytevalue <= 0xDF ) { //110x xxxx - $working = $bytevalue & 0x1F; - $bytesleft = 1; - } elseif( $bytevalue <= 0xEF ) { //1110 xxxx - $working = $bytevalue & 0x0F; - $bytesleft = 2; - } else { //1111 0xxx - $working = $bytevalue & 0x07; - $bytesleft = 3; - } - } - return $result; - } - - /** - * This expensive function tests whether or not a given character - * encoding supports ASCII. 7/8-bit encodings like Shift_JIS will - * fail this test, and require special processing. Variable width - * encodings shouldn't ever fail. - * - * @param string $encoding Encoding name to test, as per iconv format - * @param bool $bypass Whether or not to bypass the precompiled arrays. - * @return Array of UTF-8 characters to their corresponding ASCII, - * which can be used to "undo" any overzealous iconv action. - */ - public static function testEncodingSupportsASCII($encoding, $bypass = false) { - static $encodings = array(); - if (!$bypass) { - if (isset($encodings[$encoding])) return $encodings[$encoding]; - $lenc = strtolower($encoding); - switch ($lenc) { - case 'shift_jis': - return array("\xC2\xA5" => '\\', "\xE2\x80\xBE" => '~'); - case 'johab': - return array("\xE2\x82\xA9" => '\\'); - } - if (strpos($lenc, 'iso-8859-') === 0) return array(); - } - $ret = array(); - set_error_handler(array('HTMLPurifier_Encoder', 'muteErrorHandler')); - if (iconv('UTF-8', $encoding, 'a') === false) return false; - for ($i = 0x20; $i <= 0x7E; $i++) { // all printable ASCII chars - $c = chr($i); // UTF-8 char - $r = iconv('UTF-8', "$encoding//IGNORE", $c); // initial conversion - if ( - $r === '' || - // This line is needed for iconv implementations that do not - // omit characters that do not exist in the target character set - ($r === $c && iconv($encoding, 'UTF-8//IGNORE', $r) !== $c) - ) { - // Reverse engineer: what's the UTF-8 equiv of this byte - // sequence? This assumes that there's no variable width - // encoding that doesn't support ASCII. - $ret[iconv($encoding, 'UTF-8//IGNORE', $c)] = $c; - } - } - restore_error_handler(); - $encodings[$encoding] = $ret; - return $ret; - } - - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * A UTF-8 specific character encoder that handles cleaning and transforming. + * @note All functions in this class should be static. + */ +class HTMLPurifier_Encoder +{ + + /** + * Constructor throws fatal error if you attempt to instantiate class + */ + private function __construct() + { + trigger_error('Cannot instantiate encoder, call methods statically', E_USER_ERROR); + } + + /** + * Error-handler that mutes errors, alternative to shut-up operator. + */ + public static function muteErrorHandler() + { + } + + /** + * iconv wrapper which mutes errors, but doesn't work around bugs. + * @param string $in Input encoding + * @param string $out Output encoding + * @param string $text The text to convert + * @return string + */ + public static function unsafeIconv($in, $out, $text) + { + set_error_handler(array('HTMLPurifier_Encoder', 'muteErrorHandler')); + $r = iconv($in, $out, $text); + restore_error_handler(); + return $r; + } + + /** + * iconv wrapper which mutes errors and works around bugs. + * @param string $in Input encoding + * @param string $out Output encoding + * @param string $text The text to convert + * @param int $max_chunk_size + * @return string + */ + public static function iconv($in, $out, $text, $max_chunk_size = 8000) + { + $code = self::testIconvTruncateBug(); + if ($code == self::ICONV_OK) { + return self::unsafeIconv($in, $out, $text); + } elseif ($code == self::ICONV_TRUNCATES) { + // we can only work around this if the input character set + // is utf-8 + if ($in == 'utf-8') { + if ($max_chunk_size < 4) { + trigger_error('max_chunk_size is too small', E_USER_WARNING); + return false; + } + // split into 8000 byte chunks, but be careful to handle + // multibyte boundaries properly + if (($c = strlen($text)) <= $max_chunk_size) { + return self::unsafeIconv($in, $out, $text); + } + $r = ''; + $i = 0; + while (true) { + if ($i + $max_chunk_size >= $c) { + $r .= self::unsafeIconv($in, $out, substr($text, $i)); + break; + } + // wibble the boundary + if (0x80 != (0xC0 & ord($text[$i + $max_chunk_size]))) { + $chunk_size = $max_chunk_size; + } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 1]))) { + $chunk_size = $max_chunk_size - 1; + } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 2]))) { + $chunk_size = $max_chunk_size - 2; + } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 3]))) { + $chunk_size = $max_chunk_size - 3; + } else { + return false; // rather confusing UTF-8... + } + $chunk = substr($text, $i, $chunk_size); // substr doesn't mind overlong lengths + $r .= self::unsafeIconv($in, $out, $chunk); + $i += $chunk_size; + } + return $r; + } else { + return false; + } + } else { + return false; + } + } + + /** + * Cleans a UTF-8 string for well-formedness and SGML validity + * + * It will parse according to UTF-8 and return a valid UTF8 string, with + * non-SGML codepoints excluded. + * + * Specifically, it will permit: + * \x{9}\x{A}\x{D}\x{20}-\x{7E}\x{A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF} + * Source: https://www.w3.org/TR/REC-xml/#NT-Char + * Arguably this function should be modernized to the HTML5 set + * of allowed characters: + * https://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream + * which simultaneously expand and restrict the set of allowed characters. + * + * @param string $str The string to clean + * @param bool $force_php + * @return string + * + * @note Just for reference, the non-SGML code points are 0 to 31 and + * 127 to 159, inclusive. However, we allow code points 9, 10 + * and 13, which are the tab, line feed and carriage return + * respectively. 128 and above the code points map to multibyte + * UTF-8 representations. + * + * @note Fallback code adapted from utf8ToUnicode by Henri Sivonen and + * hsivonen@iki.fi at <http://iki.fi/hsivonen/php-utf8/> under the + * LGPL license. Notes on what changed are inside, but in general, + * the original code transformed UTF-8 text into an array of integer + * Unicode codepoints. Understandably, transforming that back to + * a string would be somewhat expensive, so the function was modded to + * directly operate on the string. However, this discourages code + * reuse, and the logic enumerated here would be useful for any + * function that needs to be able to understand UTF-8 characters. + * As of right now, only smart lossless character encoding converters + * would need that, and I'm probably not going to implement them. + */ + public static function cleanUTF8($str, $force_php = false) + { + // UTF-8 validity is checked since PHP 4.3.5 + // This is an optimization: if the string is already valid UTF-8, no + // need to do PHP stuff. 99% of the time, this will be the case. + if (preg_match( + '/^[\x{9}\x{A}\x{D}\x{20}-\x{7E}\x{A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]*$/Du', + $str + )) { + return $str; + } + + $mState = 0; // cached expected number of octets after the current octet + // until the beginning of the next UTF8 character sequence + $mUcs4 = 0; // cached Unicode character + $mBytes = 1; // cached expected number of octets in the current sequence + + // original code involved an $out that was an array of Unicode + // codepoints. Instead of having to convert back into UTF-8, we've + // decided to directly append valid UTF-8 characters onto a string + // $out once they're done. $char accumulates raw bytes, while $mUcs4 + // turns into the Unicode code point, so there's some redundancy. + + $out = ''; + $char = ''; + + $len = strlen($str); + for ($i = 0; $i < $len; $i++) { + $in = ord($str{$i}); + $char .= $str[$i]; // append byte to char + if (0 == $mState) { + // When mState is zero we expect either a US-ASCII character + // or a multi-octet sequence. + if (0 == (0x80 & ($in))) { + // US-ASCII, pass straight through. + if (($in <= 31 || $in == 127) && + !($in == 9 || $in == 13 || $in == 10) // save \r\t\n + ) { + // control characters, remove + } else { + $out .= $char; + } + // reset + $char = ''; + $mBytes = 1; + } elseif (0xC0 == (0xE0 & ($in))) { + // First octet of 2 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x1F) << 6; + $mState = 1; + $mBytes = 2; + } elseif (0xE0 == (0xF0 & ($in))) { + // First octet of 3 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x0F) << 12; + $mState = 2; + $mBytes = 3; + } elseif (0xF0 == (0xF8 & ($in))) { + // First octet of 4 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x07) << 18; + $mState = 3; + $mBytes = 4; + } elseif (0xF8 == (0xFC & ($in))) { + // First octet of 5 octet sequence. + // + // This is illegal because the encoded codepoint must be + // either: + // (a) not the shortest form or + // (b) outside the Unicode range of 0-0x10FFFF. + // Rather than trying to resynchronize, we will carry on + // until the end of the sequence and let the later error + // handling code catch it. + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x03) << 24; + $mState = 4; + $mBytes = 5; + } elseif (0xFC == (0xFE & ($in))) { + // First octet of 6 octet sequence, see comments for 5 + // octet sequence. + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 1) << 30; + $mState = 5; + $mBytes = 6; + } else { + // Current octet is neither in the US-ASCII range nor a + // legal first octet of a multi-octet sequence. + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + $char = ''; + } + } else { + // When mState is non-zero, we expect a continuation of the + // multi-octet sequence + if (0x80 == (0xC0 & ($in))) { + // Legal continuation. + $shift = ($mState - 1) * 6; + $tmp = $in; + $tmp = ($tmp & 0x0000003F) << $shift; + $mUcs4 |= $tmp; + + if (0 == --$mState) { + // End of the multi-octet sequence. mUcs4 now contains + // the final Unicode codepoint to be output + + // Check for illegal sequences and codepoints. + + // From Unicode 3.1, non-shortest form is illegal + if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || + ((3 == $mBytes) && ($mUcs4 < 0x0800)) || + ((4 == $mBytes) && ($mUcs4 < 0x10000)) || + (4 < $mBytes) || + // From Unicode 3.2, surrogate characters = illegal + (($mUcs4 & 0xFFFFF800) == 0xD800) || + // Codepoints outside the Unicode range are illegal + ($mUcs4 > 0x10FFFF) + ) { + + } elseif (0xFEFF != $mUcs4 && // omit BOM + // check for valid Char unicode codepoints + ( + 0x9 == $mUcs4 || + 0xA == $mUcs4 || + 0xD == $mUcs4 || + (0x20 <= $mUcs4 && 0x7E >= $mUcs4) || + // 7F-9F is not strictly prohibited by XML, + // but it is non-SGML, and thus we don't allow it + (0xA0 <= $mUcs4 && 0xD7FF >= $mUcs4) || + (0xE000 <= $mUcs4 && 0xFFFD >= $mUcs4) || + (0x10000 <= $mUcs4 && 0x10FFFF >= $mUcs4) + ) + ) { + $out .= $char; + } + // initialize UTF8 cache (reset) + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + $char = ''; + } + } else { + // ((0xC0 & (*in) != 0x80) && (mState != 0)) + // Incomplete multi-octet sequence. + // used to result in complete fail, but we'll reset + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + $char =''; + } + } + } + return $out; + } + + /** + * Translates a Unicode codepoint into its corresponding UTF-8 character. + * @note Based on Feyd's function at + * <http://forums.devnetwork.net/viewtopic.php?p=191404#191404>, + * which is in public domain. + * @note While we're going to do code point parsing anyway, a good + * optimization would be to refuse to translate code points that + * are non-SGML characters. However, this could lead to duplication. + * @note This is very similar to the unichr function in + * maintenance/generate-entity-file.php (although this is superior, + * due to its sanity checks). + */ + + // +----------+----------+----------+----------+ + // | 33222222 | 22221111 | 111111 | | + // | 10987654 | 32109876 | 54321098 | 76543210 | bit + // +----------+----------+----------+----------+ + // | | | | 0xxxxxxx | 1 byte 0x00000000..0x0000007F + // | | | 110yyyyy | 10xxxxxx | 2 byte 0x00000080..0x000007FF + // | | 1110zzzz | 10yyyyyy | 10xxxxxx | 3 byte 0x00000800..0x0000FFFF + // | 11110www | 10wwzzzz | 10yyyyyy | 10xxxxxx | 4 byte 0x00010000..0x0010FFFF + // +----------+----------+----------+----------+ + // | 00000000 | 00011111 | 11111111 | 11111111 | Theoretical upper limit of legal scalars: 2097151 (0x001FFFFF) + // | 00000000 | 00010000 | 11111111 | 11111111 | Defined upper limit of legal scalar codes + // +----------+----------+----------+----------+ + + public static function unichr($code) + { + if ($code > 1114111 or $code < 0 or + ($code >= 55296 and $code <= 57343) ) { + // bits are set outside the "valid" range as defined + // by UNICODE 4.1.0 + return ''; + } + + $x = $y = $z = $w = 0; + if ($code < 128) { + // regular ASCII character + $x = $code; + } else { + // set up bits for UTF-8 + $x = ($code & 63) | 128; + if ($code < 2048) { + $y = (($code & 2047) >> 6) | 192; + } else { + $y = (($code & 4032) >> 6) | 128; + if ($code < 65536) { + $z = (($code >> 12) & 15) | 224; + } else { + $z = (($code >> 12) & 63) | 128; + $w = (($code >> 18) & 7) | 240; + } + } + } + // set up the actual character + $ret = ''; + if ($w) { + $ret .= chr($w); + } + if ($z) { + $ret .= chr($z); + } + if ($y) { + $ret .= chr($y); + } + $ret .= chr($x); + + return $ret; + } + + /** + * @return bool + */ + public static function iconvAvailable() + { + static $iconv = null; + if ($iconv === null) { + $iconv = function_exists('iconv') && self::testIconvTruncateBug() != self::ICONV_UNUSABLE; + } + return $iconv; + } + + /** + * Convert a string to UTF-8 based on configuration. + * @param string $str The string to convert + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public static function convertToUTF8($str, $config, $context) + { + $encoding = $config->get('Core.Encoding'); + if ($encoding === 'utf-8') { + return $str; + } + static $iconv = null; + if ($iconv === null) { + $iconv = self::iconvAvailable(); + } + if ($iconv && !$config->get('Test.ForceNoIconv')) { + // unaffected by bugs, since UTF-8 support all characters + $str = self::unsafeIconv($encoding, 'utf-8//IGNORE', $str); + if ($str === false) { + // $encoding is not a valid encoding + trigger_error('Invalid encoding ' . $encoding, E_USER_ERROR); + return ''; + } + // If the string is bjorked by Shift_JIS or a similar encoding + // that doesn't support all of ASCII, convert the naughty + // characters to their true byte-wise ASCII/UTF-8 equivalents. + $str = strtr($str, self::testEncodingSupportsASCII($encoding)); + return $str; + } elseif ($encoding === 'iso-8859-1') { + $str = utf8_encode($str); + return $str; + } + $bug = HTMLPurifier_Encoder::testIconvTruncateBug(); + if ($bug == self::ICONV_OK) { + trigger_error('Encoding not supported, please install iconv', E_USER_ERROR); + } else { + trigger_error( + 'You have a buggy version of iconv, see https://bugs.php.net/bug.php?id=48147 ' . + 'and http://sourceware.org/bugzilla/show_bug.cgi?id=13541', + E_USER_ERROR + ); + } + } + + /** + * Converts a string from UTF-8 based on configuration. + * @param string $str The string to convert + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + * @note Currently, this is a lossy conversion, with unexpressable + * characters being omitted. + */ + public static function convertFromUTF8($str, $config, $context) + { + $encoding = $config->get('Core.Encoding'); + if ($escape = $config->get('Core.EscapeNonASCIICharacters')) { + $str = self::convertToASCIIDumbLossless($str); + } + if ($encoding === 'utf-8') { + return $str; + } + static $iconv = null; + if ($iconv === null) { + $iconv = self::iconvAvailable(); + } + if ($iconv && !$config->get('Test.ForceNoIconv')) { + // Undo our previous fix in convertToUTF8, otherwise iconv will barf + $ascii_fix = self::testEncodingSupportsASCII($encoding); + if (!$escape && !empty($ascii_fix)) { + $clear_fix = array(); + foreach ($ascii_fix as $utf8 => $native) { + $clear_fix[$utf8] = ''; + } + $str = strtr($str, $clear_fix); + } + $str = strtr($str, array_flip($ascii_fix)); + // Normal stuff + $str = self::iconv('utf-8', $encoding . '//IGNORE', $str); + return $str; + } elseif ($encoding === 'iso-8859-1') { + $str = utf8_decode($str); + return $str; + } + trigger_error('Encoding not supported', E_USER_ERROR); + // You might be tempted to assume that the ASCII representation + // might be OK, however, this is *not* universally true over all + // encodings. So we take the conservative route here, rather + // than forcibly turn on %Core.EscapeNonASCIICharacters + } + + /** + * Lossless (character-wise) conversion of HTML to ASCII + * @param string $str UTF-8 string to be converted to ASCII + * @return string ASCII encoded string with non-ASCII character entity-ized + * @warning Adapted from MediaWiki, claiming fair use: this is a common + * algorithm. If you disagree with this license fudgery, + * implement it yourself. + * @note Uses decimal numeric entities since they are best supported. + * @note This is a DUMB function: it has no concept of keeping + * character entities that the projected character encoding + * can allow. We could possibly implement a smart version + * but that would require it to also know which Unicode + * codepoints the charset supported (not an easy task). + * @note Sort of with cleanUTF8() but it assumes that $str is + * well-formed UTF-8 + */ + public static function convertToASCIIDumbLossless($str) + { + $bytesleft = 0; + $result = ''; + $working = 0; + $len = strlen($str); + for ($i = 0; $i < $len; $i++) { + $bytevalue = ord($str[$i]); + if ($bytevalue <= 0x7F) { //0xxx xxxx + $result .= chr($bytevalue); + $bytesleft = 0; + } elseif ($bytevalue <= 0xBF) { //10xx xxxx + $working = $working << 6; + $working += ($bytevalue & 0x3F); + $bytesleft--; + if ($bytesleft <= 0) { + $result .= "&#" . $working . ";"; + } + } elseif ($bytevalue <= 0xDF) { //110x xxxx + $working = $bytevalue & 0x1F; + $bytesleft = 1; + } elseif ($bytevalue <= 0xEF) { //1110 xxxx + $working = $bytevalue & 0x0F; + $bytesleft = 2; + } else { //1111 0xxx + $working = $bytevalue & 0x07; + $bytesleft = 3; + } + } + return $result; + } + + /** No bugs detected in iconv. */ + const ICONV_OK = 0; + + /** Iconv truncates output if converting from UTF-8 to another + * character set with //IGNORE, and a non-encodable character is found */ + const ICONV_TRUNCATES = 1; + + /** Iconv does not support //IGNORE, making it unusable for + * transcoding purposes */ + const ICONV_UNUSABLE = 2; + + /** + * glibc iconv has a known bug where it doesn't handle the magic + * //IGNORE stanza correctly. In particular, rather than ignore + * characters, it will return an EILSEQ after consuming some number + * of characters, and expect you to restart iconv as if it were + * an E2BIG. Old versions of PHP did not respect the errno, and + * returned the fragment, so as a result you would see iconv + * mysteriously truncating output. We can work around this by + * manually chopping our input into segments of about 8000 + * characters, as long as PHP ignores the error code. If PHP starts + * paying attention to the error code, iconv becomes unusable. + * + * @return int Error code indicating severity of bug. + */ + public static function testIconvTruncateBug() + { + static $code = null; + if ($code === null) { + // better not use iconv, otherwise infinite loop! + $r = self::unsafeIconv('utf-8', 'ascii//IGNORE', "\xCE\xB1" . str_repeat('a', 9000)); + if ($r === false) { + $code = self::ICONV_UNUSABLE; + } elseif (($c = strlen($r)) < 9000) { + $code = self::ICONV_TRUNCATES; + } elseif ($c > 9000) { + trigger_error( + 'Your copy of iconv is extremely buggy. Please notify HTML Purifier maintainers: ' . + 'include your iconv version as per phpversion()', + E_USER_ERROR + ); + } else { + $code = self::ICONV_OK; + } + } + return $code; + } + + /** + * This expensive function tests whether or not a given character + * encoding supports ASCII. 7/8-bit encodings like Shift_JIS will + * fail this test, and require special processing. Variable width + * encodings shouldn't ever fail. + * + * @param string $encoding Encoding name to test, as per iconv format + * @param bool $bypass Whether or not to bypass the precompiled arrays. + * @return Array of UTF-8 characters to their corresponding ASCII, + * which can be used to "undo" any overzealous iconv action. + */ + public static function testEncodingSupportsASCII($encoding, $bypass = false) + { + // All calls to iconv here are unsafe, proof by case analysis: + // If ICONV_OK, no difference. + // If ICONV_TRUNCATE, all calls involve one character inputs, + // so bug is not triggered. + // If ICONV_UNUSABLE, this call is irrelevant + static $encodings = array(); + if (!$bypass) { + if (isset($encodings[$encoding])) { + return $encodings[$encoding]; + } + $lenc = strtolower($encoding); + switch ($lenc) { + case 'shift_jis': + return array("\xC2\xA5" => '\\', "\xE2\x80\xBE" => '~'); + case 'johab': + return array("\xE2\x82\xA9" => '\\'); + } + if (strpos($lenc, 'iso-8859-') === 0) { + return array(); + } + } + $ret = array(); + if (self::unsafeIconv('UTF-8', $encoding, 'a') === false) { + return false; + } + for ($i = 0x20; $i <= 0x7E; $i++) { // all printable ASCII chars + $c = chr($i); // UTF-8 char + $r = self::unsafeIconv('UTF-8', "$encoding//IGNORE", $c); // initial conversion + if ($r === '' || + // This line is needed for iconv implementations that do not + // omit characters that do not exist in the target character set + ($r === $c && self::unsafeIconv($encoding, 'UTF-8//IGNORE', $r) !== $c) + ) { + // Reverse engineer: what's the UTF-8 equiv of this byte + // sequence? This assumes that there's no variable width + // encoding that doesn't support ASCII. + $ret[self::unsafeIconv($encoding, 'UTF-8//IGNORE', $c)] = $c; + } + } + $encodings[$encoding] = $ret; + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/EntityLookup.php b/libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup.php similarity index 73% rename from libraries/htmlpurifier/library/HTMLPurifier/EntityLookup.php rename to libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup.php index b4dfce94c3852a21162e588e69b87e4062af23a8..cb3474e3be34d54f3c3d8a9a385b9fd3661ced54 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/EntityLookup.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup.php @@ -1,44 +1,48 @@ -<?php - -/** - * Object that provides entity lookup table from entity name to character - */ -class HTMLPurifier_EntityLookup { - - /** - * Assoc array of entity name to character represented. - */ - public $table; - - /** - * Sets up the entity lookup table from the serialized file contents. - * @note The serialized contents are versioned, but were generated - * using the maintenance script generate_entity_file.php - * @warning This is not in constructor to help enforce the Singleton - */ - public function setup($file = false) { - if (!$file) { - $file = HTMLPURIFIER_PREFIX . '/HTMLPurifier/EntityLookup/entities.ser'; - } - $this->table = unserialize(file_get_contents($file)); - } - - /** - * Retrieves sole instance of the object. - * @param Optional prototype of custom lookup table to overload with. - */ - public static function instance($prototype = false) { - // no references, since PHP doesn't copy unless modified - static $instance = null; - if ($prototype) { - $instance = $prototype; - } elseif (!$instance) { - $instance = new HTMLPurifier_EntityLookup(); - $instance->setup(); - } - return $instance; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Object that provides entity lookup table from entity name to character + */ +class HTMLPurifier_EntityLookup +{ + /** + * Assoc array of entity name to character represented. + * @type array + */ + public $table; + + /** + * Sets up the entity lookup table from the serialized file contents. + * @param bool $file + * @note The serialized contents are versioned, but were generated + * using the maintenance script generate_entity_file.php + * @warning This is not in constructor to help enforce the Singleton + */ + public function setup($file = false) + { + if (!$file) { + $file = HTMLPURIFIER_PREFIX . '/HTMLPurifier/EntityLookup/entities.ser'; + } + $this->table = unserialize(file_get_contents($file)); + } + + /** + * Retrieves sole instance of the object. + * @param bool|HTMLPurifier_EntityLookup $prototype Optional prototype of custom lookup table to overload with. + * @return HTMLPurifier_EntityLookup + */ + public static function instance($prototype = false) + { + // no references, since PHP doesn't copy unless modified + static $instance = null; + if ($prototype) { + $instance = $prototype; + } elseif (!$instance) { + $instance = new HTMLPurifier_EntityLookup(); + $instance->setup(); + } + return $instance; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup/entities.ser b/libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup/entities.ser new file mode 100644 index 0000000000000000000000000000000000000000..e8b08128beb5418e7f8428c7412a2bd8866607dc --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/EntityLookup/entities.ser @@ -0,0 +1 @@ +a:253:{s:4:"fnof";s:2:"Æ’";s:5:"Alpha";s:2:"Α";s:4:"Beta";s:2:"Î’";s:5:"Gamma";s:2:"Γ";s:5:"Delta";s:2:"Δ";s:7:"Epsilon";s:2:"Ε";s:4:"Zeta";s:2:"Ζ";s:3:"Eta";s:2:"Η";s:5:"Theta";s:2:"Θ";s:4:"Iota";s:2:"Ι";s:5:"Kappa";s:2:"Κ";s:6:"Lambda";s:2:"Λ";s:2:"Mu";s:2:"Μ";s:2:"Nu";s:2:"Î";s:2:"Xi";s:2:"Ξ";s:7:"Omicron";s:2:"Ο";s:2:"Pi";s:2:"Î ";s:3:"Rho";s:2:"Ρ";s:5:"Sigma";s:2:"Σ";s:3:"Tau";s:2:"Τ";s:7:"Upsilon";s:2:"Î¥";s:3:"Phi";s:2:"Φ";s:3:"Chi";s:2:"Χ";s:3:"Psi";s:2:"Ψ";s:5:"Omega";s:2:"Ω";s:5:"alpha";s:2:"α";s:4:"beta";s:2:"β";s:5:"gamma";s:2:"γ";s:5:"delta";s:2:"δ";s:7:"epsilon";s:2:"ε";s:4:"zeta";s:2:"ζ";s:3:"eta";s:2:"η";s:5:"theta";s:2:"θ";s:4:"iota";s:2:"ι";s:5:"kappa";s:2:"κ";s:6:"lambda";s:2:"λ";s:2:"mu";s:2:"μ";s:2:"nu";s:2:"ν";s:2:"xi";s:2:"ξ";s:7:"omicron";s:2:"ο";s:2:"pi";s:2:"Ï€";s:3:"rho";s:2:"Ï";s:6:"sigmaf";s:2:"Ï‚";s:5:"sigma";s:2:"σ";s:3:"tau";s:2:"Ï„";s:7:"upsilon";s:2:"Ï…";s:3:"phi";s:2:"φ";s:3:"chi";s:2:"χ";s:3:"psi";s:2:"ψ";s:5:"omega";s:2:"ω";s:8:"thetasym";s:2:"Ï‘";s:5:"upsih";s:2:"Ï’";s:3:"piv";s:2:"Ï–";s:4:"bull";s:3:"•";s:6:"hellip";s:3:"…";s:5:"prime";s:3:"′";s:5:"Prime";s:3:"″";s:5:"oline";s:3:"‾";s:5:"frasl";s:3:"â„";s:6:"weierp";s:3:"℘";s:5:"image";s:3:"â„‘";s:4:"real";s:3:"ℜ";s:5:"trade";s:3:"â„¢";s:7:"alefsym";s:3:"ℵ";s:4:"larr";s:3:"â†";s:4:"uarr";s:3:"↑";s:4:"rarr";s:3:"→";s:4:"darr";s:3:"↓";s:4:"harr";s:3:"↔";s:5:"crarr";s:3:"↵";s:4:"lArr";s:3:"â‡";s:4:"uArr";s:3:"⇑";s:4:"rArr";s:3:"⇒";s:4:"dArr";s:3:"⇓";s:4:"hArr";s:3:"⇔";s:6:"forall";s:3:"∀";s:4:"part";s:3:"∂";s:5:"exist";s:3:"∃";s:5:"empty";s:3:"∅";s:5:"nabla";s:3:"∇";s:4:"isin";s:3:"∈";s:5:"notin";s:3:"∉";s:2:"ni";s:3:"∋";s:4:"prod";s:3:"âˆ";s:3:"sum";s:3:"∑";s:5:"minus";s:3:"−";s:6:"lowast";s:3:"∗";s:5:"radic";s:3:"√";s:4:"prop";s:3:"âˆ";s:5:"infin";s:3:"∞";s:3:"ang";s:3:"∠";s:3:"and";s:3:"∧";s:2:"or";s:3:"∨";s:3:"cap";s:3:"∩";s:3:"cup";s:3:"∪";s:3:"int";s:3:"∫";s:6:"there4";s:3:"∴";s:3:"sim";s:3:"∼";s:4:"cong";s:3:"≅";s:5:"asymp";s:3:"≈";s:2:"ne";s:3:"≠";s:5:"equiv";s:3:"≡";s:2:"le";s:3:"≤";s:2:"ge";s:3:"≥";s:3:"sub";s:3:"⊂";s:3:"sup";s:3:"⊃";s:4:"nsub";s:3:"⊄";s:4:"sube";s:3:"⊆";s:4:"supe";s:3:"⊇";s:5:"oplus";s:3:"⊕";s:6:"otimes";s:3:"⊗";s:4:"perp";s:3:"⊥";s:4:"sdot";s:3:"â‹…";s:5:"lceil";s:3:"⌈";s:5:"rceil";s:3:"⌉";s:6:"lfloor";s:3:"⌊";s:6:"rfloor";s:3:"⌋";s:4:"lang";s:3:"〈";s:4:"rang";s:3:"〉";s:3:"loz";s:3:"â—Š";s:6:"spades";s:3:"â™ ";s:5:"clubs";s:3:"♣";s:6:"hearts";s:3:"♥";s:5:"diams";s:3:"♦";s:4:"quot";s:1:""";s:3:"amp";s:1:"&";s:2:"lt";s:1:"<";s:2:"gt";s:1:">";s:4:"apos";s:1:"'";s:5:"OElig";s:2:"Å’";s:5:"oelig";s:2:"Å“";s:6:"Scaron";s:2:"Å ";s:6:"scaron";s:2:"Å¡";s:4:"Yuml";s:2:"Ÿ";s:4:"circ";s:2:"ˆ";s:5:"tilde";s:2:"Ëœ";s:4:"ensp";s:3:" ";s:4:"emsp";s:3:" ";s:6:"thinsp";s:3:" ";s:4:"zwnj";s:3:"‌";s:3:"zwj";s:3:"â€";s:3:"lrm";s:3:"‎";s:3:"rlm";s:3:"â€";s:5:"ndash";s:3:"–";s:5:"mdash";s:3:"—";s:5:"lsquo";s:3:"‘";s:5:"rsquo";s:3:"’";s:5:"sbquo";s:3:"‚";s:5:"ldquo";s:3:"“";s:5:"rdquo";s:3:"â€";s:5:"bdquo";s:3:"„";s:6:"dagger";s:3:"†";s:6:"Dagger";s:3:"‡";s:6:"permil";s:3:"‰";s:6:"lsaquo";s:3:"‹";s:6:"rsaquo";s:3:"›";s:4:"euro";s:3:"€";s:4:"nbsp";s:2:" ";s:5:"iexcl";s:2:"¡";s:4:"cent";s:2:"¢";s:5:"pound";s:2:"£";s:6:"curren";s:2:"¤";s:3:"yen";s:2:"Â¥";s:6:"brvbar";s:2:"¦";s:4:"sect";s:2:"§";s:3:"uml";s:2:"¨";s:4:"copy";s:2:"©";s:4:"ordf";s:2:"ª";s:5:"laquo";s:2:"«";s:3:"not";s:2:"¬";s:3:"shy";s:2:"Â";s:3:"reg";s:2:"®";s:4:"macr";s:2:"¯";s:3:"deg";s:2:"°";s:6:"plusmn";s:2:"±";s:4:"sup2";s:2:"²";s:4:"sup3";s:2:"³";s:5:"acute";s:2:"´";s:5:"micro";s:2:"µ";s:4:"para";s:2:"¶";s:6:"middot";s:2:"·";s:5:"cedil";s:2:"¸";s:4:"sup1";s:2:"¹";s:4:"ordm";s:2:"º";s:5:"raquo";s:2:"»";s:6:"frac14";s:2:"¼";s:6:"frac12";s:2:"½";s:6:"frac34";s:2:"¾";s:6:"iquest";s:2:"¿";s:6:"Agrave";s:2:"À";s:6:"Aacute";s:2:"Ã";s:5:"Acirc";s:2:"Â";s:6:"Atilde";s:2:"Ã";s:4:"Auml";s:2:"Ä";s:5:"Aring";s:2:"Ã…";s:5:"AElig";s:2:"Æ";s:6:"Ccedil";s:2:"Ç";s:6:"Egrave";s:2:"È";s:6:"Eacute";s:2:"É";s:5:"Ecirc";s:2:"Ê";s:4:"Euml";s:2:"Ë";s:6:"Igrave";s:2:"ÃŒ";s:6:"Iacute";s:2:"Ã";s:5:"Icirc";s:2:"ÃŽ";s:4:"Iuml";s:2:"Ã";s:3:"ETH";s:2:"Ã";s:6:"Ntilde";s:2:"Ñ";s:6:"Ograve";s:2:"Ã’";s:6:"Oacute";s:2:"Ó";s:5:"Ocirc";s:2:"Ô";s:6:"Otilde";s:2:"Õ";s:4:"Ouml";s:2:"Ö";s:5:"times";s:2:"×";s:6:"Oslash";s:2:"Ø";s:6:"Ugrave";s:2:"Ù";s:6:"Uacute";s:2:"Ú";s:5:"Ucirc";s:2:"Û";s:4:"Uuml";s:2:"Ü";s:6:"Yacute";s:2:"Ã";s:5:"THORN";s:2:"Þ";s:5:"szlig";s:2:"ß";s:6:"agrave";s:2:"à ";s:6:"aacute";s:2:"á";s:5:"acirc";s:2:"â";s:6:"atilde";s:2:"ã";s:4:"auml";s:2:"ä";s:5:"aring";s:2:"Ã¥";s:5:"aelig";s:2:"æ";s:6:"ccedil";s:2:"ç";s:6:"egrave";s:2:"è";s:6:"eacute";s:2:"é";s:5:"ecirc";s:2:"ê";s:4:"euml";s:2:"ë";s:6:"igrave";s:2:"ì";s:6:"iacute";s:2:"Ã";s:5:"icirc";s:2:"î";s:4:"iuml";s:2:"ï";s:3:"eth";s:2:"ð";s:6:"ntilde";s:2:"ñ";s:6:"ograve";s:2:"ò";s:6:"oacute";s:2:"ó";s:5:"ocirc";s:2:"ô";s:6:"otilde";s:2:"õ";s:4:"ouml";s:2:"ö";s:6:"divide";s:2:"÷";s:6:"oslash";s:2:"ø";s:6:"ugrave";s:2:"ù";s:6:"uacute";s:2:"ú";s:5:"ucirc";s:2:"û";s:4:"uuml";s:2:"ü";s:6:"yacute";s:2:"ý";s:5:"thorn";s:2:"þ";s:4:"yuml";s:2:"ÿ";} \ No newline at end of file diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/EntityParser.php b/libraries/htmlpurifier410/library/HTMLPurifier/EntityParser.php new file mode 100644 index 0000000000000000000000000000000000000000..41059e50f4734c6f9a15538400b6026da1f2f345 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/EntityParser.php @@ -0,0 +1,285 @@ +<?php + +// if want to implement error collecting here, we'll need to use some sort +// of global data (probably trigger_error) because it's impossible to pass +// $config or $context to the callback functions. + +/** + * Handles referencing and derefencing character entities + */ +class HTMLPurifier_EntityParser +{ + + /** + * Reference to entity lookup table. + * @type HTMLPurifier_EntityLookup + */ + protected $_entity_lookup; + + /** + * Callback regex string for entities in text. + * @type string + */ + protected $_textEntitiesRegex; + + /** + * Callback regex string for entities in attributes. + * @type string + */ + protected $_attrEntitiesRegex; + + /** + * Tests if the beginning of a string is a semi-optional regex + */ + protected $_semiOptionalPrefixRegex; + + public function __construct() { + // From + // http://stackoverflow.com/questions/15532252/why-is-reg-being-rendered-as-without-the-bounding-semicolon + $semi_optional = "quot|QUOT|lt|LT|gt|GT|amp|AMP|AElig|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|Iacute|Icirc|Igrave|Iuml|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml"; + + // NB: three empty captures to put the fourth match in the right + // place + $this->_semiOptionalPrefixRegex = "/&()()()($semi_optional)/"; + + $this->_textEntitiesRegex = + '/&(?:'. + // hex + '[#]x([a-fA-F0-9]+);?|'. + // dec + '[#]0*(\d+);?|'. + // string (mandatory semicolon) + // NB: order matters: match semicolon preferentially + '([A-Za-z_:][A-Za-z0-9.\-_:]*);|'. + // string (optional semicolon) + "($semi_optional)". + ')/'; + + $this->_attrEntitiesRegex = + '/&(?:'. + // hex + '[#]x([a-fA-F0-9]+);?|'. + // dec + '[#]0*(\d+);?|'. + // string (mandatory semicolon) + // NB: order matters: match semicolon preferentially + '([A-Za-z_:][A-Za-z0-9.\-_:]*);|'. + // string (optional semicolon) + // don't match if trailing is equals or alphanumeric (URL + // like) + "($semi_optional)(?![=;A-Za-z0-9])". + ')/'; + + } + + /** + * Substitute entities with the parsed equivalents. Use this on + * textual data in an HTML document (as opposed to attributes.) + * + * @param string $string String to have entities parsed. + * @return string Parsed string. + */ + public function substituteTextEntities($string) + { + return preg_replace_callback( + $this->_textEntitiesRegex, + array($this, 'entityCallback'), + $string + ); + } + + /** + * Substitute entities with the parsed equivalents. Use this on + * attribute contents in documents. + * + * @param string $string String to have entities parsed. + * @return string Parsed string. + */ + public function substituteAttrEntities($string) + { + return preg_replace_callback( + $this->_attrEntitiesRegex, + array($this, 'entityCallback'), + $string + ); + } + + /** + * Callback function for substituteNonSpecialEntities() that does the work. + * + * @param array $matches PCRE matches array, with 0 the entire match, and + * either index 1, 2 or 3 set with a hex value, dec value, + * or string (respectively). + * @return string Replacement string. + */ + + protected function entityCallback($matches) + { + $entity = $matches[0]; + $hex_part = @$matches[1]; + $dec_part = @$matches[2]; + $named_part = empty($matches[3]) ? @$matches[4] : $matches[3]; + if ($hex_part !== NULL && $hex_part !== "") { + return HTMLPurifier_Encoder::unichr(hexdec($hex_part)); + } elseif ($dec_part !== NULL && $dec_part !== "") { + return HTMLPurifier_Encoder::unichr((int) $dec_part); + } else { + if (!$this->_entity_lookup) { + $this->_entity_lookup = HTMLPurifier_EntityLookup::instance(); + } + if (isset($this->_entity_lookup->table[$named_part])) { + return $this->_entity_lookup->table[$named_part]; + } else { + // exact match didn't match anything, so test if + // any of the semicolon optional match the prefix. + // Test that this is an EXACT match is important to + // prevent infinite loop + if (!empty($matches[3])) { + return preg_replace_callback( + $this->_semiOptionalPrefixRegex, + array($this, 'entityCallback'), + $entity + ); + } + return $entity; + } + } + } + + // LEGACY CODE BELOW + + /** + * Callback regex string for parsing entities. + * @type string + */ + protected $_substituteEntitiesRegex = + '/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/'; + // 1. hex 2. dec 3. string (XML style) + + /** + * Decimal to parsed string conversion table for special entities. + * @type array + */ + protected $_special_dec2str = + array( + 34 => '"', + 38 => '&', + 39 => "'", + 60 => '<', + 62 => '>' + ); + + /** + * Stripped entity names to decimal conversion table for special entities. + * @type array + */ + protected $_special_ent2dec = + array( + 'quot' => 34, + 'amp' => 38, + 'lt' => 60, + 'gt' => 62 + ); + + /** + * Substitutes non-special entities with their parsed equivalents. Since + * running this whenever you have parsed character is t3h 5uck, we run + * it before everything else. + * + * @param string $string String to have non-special entities parsed. + * @return string Parsed string. + */ + public function substituteNonSpecialEntities($string) + { + // it will try to detect missing semicolons, but don't rely on it + return preg_replace_callback( + $this->_substituteEntitiesRegex, + array($this, 'nonSpecialEntityCallback'), + $string + ); + } + + /** + * Callback function for substituteNonSpecialEntities() that does the work. + * + * @param array $matches PCRE matches array, with 0 the entire match, and + * either index 1, 2 or 3 set with a hex value, dec value, + * or string (respectively). + * @return string Replacement string. + */ + + protected function nonSpecialEntityCallback($matches) + { + // replaces all but big five + $entity = $matches[0]; + $is_num = (@$matches[0][1] === '#'); + if ($is_num) { + $is_hex = (@$entity[2] === 'x'); + $code = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; + // abort for special characters + if (isset($this->_special_dec2str[$code])) { + return $entity; + } + return HTMLPurifier_Encoder::unichr($code); + } else { + if (isset($this->_special_ent2dec[$matches[3]])) { + return $entity; + } + if (!$this->_entity_lookup) { + $this->_entity_lookup = HTMLPurifier_EntityLookup::instance(); + } + if (isset($this->_entity_lookup->table[$matches[3]])) { + return $this->_entity_lookup->table[$matches[3]]; + } else { + return $entity; + } + } + } + + /** + * Substitutes only special entities with their parsed equivalents. + * + * @notice We try to avoid calling this function because otherwise, it + * would have to be called a lot (for every parsed section). + * + * @param string $string String to have non-special entities parsed. + * @return string Parsed string. + */ + public function substituteSpecialEntities($string) + { + return preg_replace_callback( + $this->_substituteEntitiesRegex, + array($this, 'specialEntityCallback'), + $string + ); + } + + /** + * Callback function for substituteSpecialEntities() that does the work. + * + * This callback has same syntax as nonSpecialEntityCallback(). + * + * @param array $matches PCRE-style matches array, with 0 the entire match, and + * either index 1, 2 or 3 set with a hex value, dec value, + * or string (respectively). + * @return string Replacement string. + */ + protected function specialEntityCallback($matches) + { + $entity = $matches[0]; + $is_num = (@$matches[0][1] === '#'); + if ($is_num) { + $is_hex = (@$entity[2] === 'x'); + $int = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; + return isset($this->_special_dec2str[$int]) ? + $this->_special_dec2str[$int] : + $entity; + } else { + return isset($this->_special_ent2dec[$matches[3]]) ? + $this->_special_dec2str[$this->_special_ent2dec[$matches[3]]] : + $entity; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ErrorCollector.php b/libraries/htmlpurifier410/library/HTMLPurifier/ErrorCollector.php similarity index 79% rename from libraries/htmlpurifier/library/HTMLPurifier/ErrorCollector.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ErrorCollector.php index 6713eaf77309c1a9a6b5e3297899b92b01ae12e2..a6cbcaa0eaf68b28b9cf6da23d024a39fb61b467 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ErrorCollector.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ErrorCollector.php @@ -1,209 +1,244 @@ -<?php - -/** - * Error collection class that enables HTML Purifier to report HTML - * problems back to the user - */ -class HTMLPurifier_ErrorCollector -{ - - /** - * Identifiers for the returned error array. These are purposely numeric - * so list() can be used. - */ - const LINENO = 0; - const SEVERITY = 1; - const MESSAGE = 2; - const CHILDREN = 3; - - protected $errors; - protected $_current; - protected $_stacks = array(array()); - protected $locale; - protected $generator; - protected $context; - - protected $lines = array(); - - public function __construct($context) { - $this->locale =& $context->get('Locale'); - $this->context = $context; - $this->_current =& $this->_stacks[0]; - $this->errors =& $this->_stacks[0]; - } - - /** - * Sends an error message to the collector for later use - * @param $severity int Error severity, PHP error style (don't use E_USER_) - * @param $msg string Error message text - * @param $subst1 string First substitution for $msg - * @param $subst2 string ... - */ - public function send($severity, $msg) { - - $args = array(); - if (func_num_args() > 2) { - $args = func_get_args(); - array_shift($args); - unset($args[0]); - } - - $token = $this->context->get('CurrentToken', true); - $line = $token ? $token->line : $this->context->get('CurrentLine', true); - $col = $token ? $token->col : $this->context->get('CurrentCol', true); - $attr = $this->context->get('CurrentAttr', true); - - // perform special substitutions, also add custom parameters - $subst = array(); - if (!is_null($token)) { - $args['CurrentToken'] = $token; - } - if (!is_null($attr)) { - $subst['$CurrentAttr.Name'] = $attr; - if (isset($token->attr[$attr])) $subst['$CurrentAttr.Value'] = $token->attr[$attr]; - } - - if (empty($args)) { - $msg = $this->locale->getMessage($msg); - } else { - $msg = $this->locale->formatMessage($msg, $args); - } - - if (!empty($subst)) $msg = strtr($msg, $subst); - - // (numerically indexed) - $error = array( - self::LINENO => $line, - self::SEVERITY => $severity, - self::MESSAGE => $msg, - self::CHILDREN => array() - ); - $this->_current[] = $error; - - - // NEW CODE BELOW ... - - $struct = null; - // Top-level errors are either: - // TOKEN type, if $value is set appropriately, or - // "syntax" type, if $value is null - $new_struct = new HTMLPurifier_ErrorStruct(); - $new_struct->type = HTMLPurifier_ErrorStruct::TOKEN; - if ($token) $new_struct->value = clone $token; - if (is_int($line) && is_int($col)) { - if (isset($this->lines[$line][$col])) { - $struct = $this->lines[$line][$col]; - } else { - $struct = $this->lines[$line][$col] = $new_struct; - } - // These ksorts may present a performance problem - ksort($this->lines[$line], SORT_NUMERIC); - } else { - if (isset($this->lines[-1])) { - $struct = $this->lines[-1]; - } else { - $struct = $this->lines[-1] = $new_struct; - } - } - ksort($this->lines, SORT_NUMERIC); - - // Now, check if we need to operate on a lower structure - if (!empty($attr)) { - $struct = $struct->getChild(HTMLPurifier_ErrorStruct::ATTR, $attr); - if (!$struct->value) { - $struct->value = array($attr, 'PUT VALUE HERE'); - } - } - if (!empty($cssprop)) { - $struct = $struct->getChild(HTMLPurifier_ErrorStruct::CSSPROP, $cssprop); - if (!$struct->value) { - // if we tokenize CSS this might be a little more difficult to do - $struct->value = array($cssprop, 'PUT VALUE HERE'); - } - } - - // Ok, structs are all setup, now time to register the error - $struct->addError($severity, $msg); - } - - /** - * Retrieves raw error data for custom formatter to use - * @param List of arrays in format of array(line of error, - * error severity, error message, - * recursive sub-errors array) - */ - public function getRaw() { - return $this->errors; - } - - /** - * Default HTML formatting implementation for error messages - * @param $config Configuration array, vital for HTML output nature - * @param $errors Errors array to display; used for recursion. - */ - public function getHTMLFormatted($config, $errors = null) { - $ret = array(); - - $this->generator = new HTMLPurifier_Generator($config, $this->context); - if ($errors === null) $errors = $this->errors; - - // 'At line' message needs to be removed - - // generation code for new structure goes here. It needs to be recursive. - foreach ($this->lines as $line => $col_array) { - if ($line == -1) continue; - foreach ($col_array as $col => $struct) { - $this->_renderStruct($ret, $struct, $line, $col); - } - } - if (isset($this->lines[-1])) { - $this->_renderStruct($ret, $this->lines[-1]); - } - - if (empty($errors)) { - return '<p>' . $this->locale->getMessage('ErrorCollector: No errors') . '</p>'; - } else { - return '<ul><li>' . implode('</li><li>', $ret) . '</li></ul>'; - } - - } - - private function _renderStruct(&$ret, $struct, $line = null, $col = null) { - $stack = array($struct); - $context_stack = array(array()); - while ($current = array_pop($stack)) { - $context = array_pop($context_stack); - foreach ($current->errors as $error) { - list($severity, $msg) = $error; - $string = ''; - $string .= '<div>'; - // W3C uses an icon to indicate the severity of the error. - $error = $this->locale->getErrorName($severity); - $string .= "<span class=\"error e$severity\"><strong>$error</strong></span> "; - if (!is_null($line) && !is_null($col)) { - $string .= "<em class=\"location\">Line $line, Column $col: </em> "; - } else { - $string .= '<em class="location">End of Document: </em> '; - } - $string .= '<strong class="description">' . $this->generator->escape($msg) . '</strong> '; - $string .= '</div>'; - // Here, have a marker for the character on the column appropriate. - // Be sure to clip extremely long lines. - //$string .= '<pre>'; - //$string .= ''; - //$string .= '</pre>'; - $ret[] = $string; - } - foreach ($current->children as $type => $array) { - $context[] = $current; - $stack = array_merge($stack, array_reverse($array, true)); - for ($i = count($array); $i > 0; $i--) { - $context_stack[] = $context; - } - } - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Error collection class that enables HTML Purifier to report HTML + * problems back to the user + */ +class HTMLPurifier_ErrorCollector +{ + + /** + * Identifiers for the returned error array. These are purposely numeric + * so list() can be used. + */ + const LINENO = 0; + const SEVERITY = 1; + const MESSAGE = 2; + const CHILDREN = 3; + + /** + * @type array + */ + protected $errors; + + /** + * @type array + */ + protected $_current; + + /** + * @type array + */ + protected $_stacks = array(array()); + + /** + * @type HTMLPurifier_Language + */ + protected $locale; + + /** + * @type HTMLPurifier_Generator + */ + protected $generator; + + /** + * @type HTMLPurifier_Context + */ + protected $context; + + /** + * @type array + */ + protected $lines = array(); + + /** + * @param HTMLPurifier_Context $context + */ + public function __construct($context) + { + $this->locale =& $context->get('Locale'); + $this->context = $context; + $this->_current =& $this->_stacks[0]; + $this->errors =& $this->_stacks[0]; + } + + /** + * Sends an error message to the collector for later use + * @param int $severity Error severity, PHP error style (don't use E_USER_) + * @param string $msg Error message text + */ + public function send($severity, $msg) + { + $args = array(); + if (func_num_args() > 2) { + $args = func_get_args(); + array_shift($args); + unset($args[0]); + } + + $token = $this->context->get('CurrentToken', true); + $line = $token ? $token->line : $this->context->get('CurrentLine', true); + $col = $token ? $token->col : $this->context->get('CurrentCol', true); + $attr = $this->context->get('CurrentAttr', true); + + // perform special substitutions, also add custom parameters + $subst = array(); + if (!is_null($token)) { + $args['CurrentToken'] = $token; + } + if (!is_null($attr)) { + $subst['$CurrentAttr.Name'] = $attr; + if (isset($token->attr[$attr])) { + $subst['$CurrentAttr.Value'] = $token->attr[$attr]; + } + } + + if (empty($args)) { + $msg = $this->locale->getMessage($msg); + } else { + $msg = $this->locale->formatMessage($msg, $args); + } + + if (!empty($subst)) { + $msg = strtr($msg, $subst); + } + + // (numerically indexed) + $error = array( + self::LINENO => $line, + self::SEVERITY => $severity, + self::MESSAGE => $msg, + self::CHILDREN => array() + ); + $this->_current[] = $error; + + // NEW CODE BELOW ... + // Top-level errors are either: + // TOKEN type, if $value is set appropriately, or + // "syntax" type, if $value is null + $new_struct = new HTMLPurifier_ErrorStruct(); + $new_struct->type = HTMLPurifier_ErrorStruct::TOKEN; + if ($token) { + $new_struct->value = clone $token; + } + if (is_int($line) && is_int($col)) { + if (isset($this->lines[$line][$col])) { + $struct = $this->lines[$line][$col]; + } else { + $struct = $this->lines[$line][$col] = $new_struct; + } + // These ksorts may present a performance problem + ksort($this->lines[$line], SORT_NUMERIC); + } else { + if (isset($this->lines[-1])) { + $struct = $this->lines[-1]; + } else { + $struct = $this->lines[-1] = $new_struct; + } + } + ksort($this->lines, SORT_NUMERIC); + + // Now, check if we need to operate on a lower structure + if (!empty($attr)) { + $struct = $struct->getChild(HTMLPurifier_ErrorStruct::ATTR, $attr); + if (!$struct->value) { + $struct->value = array($attr, 'PUT VALUE HERE'); + } + } + if (!empty($cssprop)) { + $struct = $struct->getChild(HTMLPurifier_ErrorStruct::CSSPROP, $cssprop); + if (!$struct->value) { + // if we tokenize CSS this might be a little more difficult to do + $struct->value = array($cssprop, 'PUT VALUE HERE'); + } + } + + // Ok, structs are all setup, now time to register the error + $struct->addError($severity, $msg); + } + + /** + * Retrieves raw error data for custom formatter to use + */ + public function getRaw() + { + return $this->errors; + } + + /** + * Default HTML formatting implementation for error messages + * @param HTMLPurifier_Config $config Configuration, vital for HTML output nature + * @param array $errors Errors array to display; used for recursion. + * @return string + */ + public function getHTMLFormatted($config, $errors = null) + { + $ret = array(); + + $this->generator = new HTMLPurifier_Generator($config, $this->context); + if ($errors === null) { + $errors = $this->errors; + } + + // 'At line' message needs to be removed + + // generation code for new structure goes here. It needs to be recursive. + foreach ($this->lines as $line => $col_array) { + if ($line == -1) { + continue; + } + foreach ($col_array as $col => $struct) { + $this->_renderStruct($ret, $struct, $line, $col); + } + } + if (isset($this->lines[-1])) { + $this->_renderStruct($ret, $this->lines[-1]); + } + + if (empty($errors)) { + return '<p>' . $this->locale->getMessage('ErrorCollector: No errors') . '</p>'; + } else { + return '<ul><li>' . implode('</li><li>', $ret) . '</li></ul>'; + } + + } + + private function _renderStruct(&$ret, $struct, $line = null, $col = null) + { + $stack = array($struct); + $context_stack = array(array()); + while ($current = array_pop($stack)) { + $context = array_pop($context_stack); + foreach ($current->errors as $error) { + list($severity, $msg) = $error; + $string = ''; + $string .= '<div>'; + // W3C uses an icon to indicate the severity of the error. + $error = $this->locale->getErrorName($severity); + $string .= "<span class=\"error e$severity\"><strong>$error</strong></span> "; + if (!is_null($line) && !is_null($col)) { + $string .= "<em class=\"location\">Line $line, Column $col: </em> "; + } else { + $string .= '<em class="location">End of Document: </em> '; + } + $string .= '<strong class="description">' . $this->generator->escape($msg) . '</strong> '; + $string .= '</div>'; + // Here, have a marker for the character on the column appropriate. + // Be sure to clip extremely long lines. + //$string .= '<pre>'; + //$string .= ''; + //$string .= '</pre>'; + $ret[] = $string; + } + foreach ($current->children as $array) { + $context[] = $current; + $stack = array_merge($stack, array_reverse($array, true)); + for ($i = count($array); $i > 0; $i--) { + $context_stack[] = $context; + } + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/ErrorStruct.php b/libraries/htmlpurifier410/library/HTMLPurifier/ErrorStruct.php similarity index 78% rename from libraries/htmlpurifier/library/HTMLPurifier/ErrorStruct.php rename to libraries/htmlpurifier410/library/HTMLPurifier/ErrorStruct.php index 9bc8996ec1939d6a0d1da83ec4c651e9ce00b390..a6c0da29e800c7092e38445f49f96f7e2b0f14de 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/ErrorStruct.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/ErrorStruct.php @@ -1,60 +1,74 @@ -<?php - -/** - * Records errors for particular segments of an HTML document such as tokens, - * attributes or CSS properties. They can contain error structs (which apply - * to components of what they represent), but their main purpose is to hold - * errors applying to whatever struct is being used. - */ -class HTMLPurifier_ErrorStruct -{ - - /** - * Possible values for $children first-key. Note that top-level structures - * are automatically token-level. - */ - const TOKEN = 0; - const ATTR = 1; - const CSSPROP = 2; - - /** - * Type of this struct. - */ - public $type; - - /** - * Value of the struct we are recording errors for. There are various - * values for this: - * - TOKEN: Instance of HTMLPurifier_Token - * - ATTR: array('attr-name', 'value') - * - CSSPROP: array('prop-name', 'value') - */ - public $value; - - /** - * Errors registered for this structure. - */ - public $errors = array(); - - /** - * Child ErrorStructs that are from this structure. For example, a TOKEN - * ErrorStruct would contain ATTR ErrorStructs. This is a multi-dimensional - * array in structure: [TYPE]['identifier'] - */ - public $children = array(); - - public function getChild($type, $id) { - if (!isset($this->children[$type][$id])) { - $this->children[$type][$id] = new HTMLPurifier_ErrorStruct(); - $this->children[$type][$id]->type = $type; - } - return $this->children[$type][$id]; - } - - public function addError($severity, $message) { - $this->errors[] = array($severity, $message); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Records errors for particular segments of an HTML document such as tokens, + * attributes or CSS properties. They can contain error structs (which apply + * to components of what they represent), but their main purpose is to hold + * errors applying to whatever struct is being used. + */ +class HTMLPurifier_ErrorStruct +{ + + /** + * Possible values for $children first-key. Note that top-level structures + * are automatically token-level. + */ + const TOKEN = 0; + const ATTR = 1; + const CSSPROP = 2; + + /** + * Type of this struct. + * @type string + */ + public $type; + + /** + * Value of the struct we are recording errors for. There are various + * values for this: + * - TOKEN: Instance of HTMLPurifier_Token + * - ATTR: array('attr-name', 'value') + * - CSSPROP: array('prop-name', 'value') + * @type mixed + */ + public $value; + + /** + * Errors registered for this structure. + * @type array + */ + public $errors = array(); + + /** + * Child ErrorStructs that are from this structure. For example, a TOKEN + * ErrorStruct would contain ATTR ErrorStructs. This is a multi-dimensional + * array in structure: [TYPE]['identifier'] + * @type array + */ + public $children = array(); + + /** + * @param string $type + * @param string $id + * @return mixed + */ + public function getChild($type, $id) + { + if (!isset($this->children[$type][$id])) { + $this->children[$type][$id] = new HTMLPurifier_ErrorStruct(); + $this->children[$type][$id]->type = $type; + } + return $this->children[$type][$id]; + } + + /** + * @param int $severity + * @param string $message + */ + public function addError($severity, $message) + { + $this->errors[] = array($severity, $message); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Exception.php b/libraries/htmlpurifier410/library/HTMLPurifier/Exception.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/Exception.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Exception.php index be85b4c560e04ffed27885d7dddaba6450b12059..defe157e75d3fbc7cc5fafa1f53b4608cbbe91b3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Exception.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Exception.php @@ -1,12 +1,12 @@ -<?php - -/** - * Global exception class for HTML Purifier; any exceptions we throw - * are from here. - */ -class HTMLPurifier_Exception extends Exception -{ - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Global exception class for HTML Purifier; any exceptions we throw + * are from here. + */ +class HTMLPurifier_Exception extends Exception +{ + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Filter.php b/libraries/htmlpurifier410/library/HTMLPurifier/Filter.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/Filter.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Filter.php index 9a0e7b09f3b90079200832695d9af51041395648..2f85b93ff379f7e4ea40c3dac8054f13c9722e7d 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Filter.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Filter.php @@ -1,46 +1,56 @@ -<?php - -/** - * Represents a pre or post processing filter on HTML Purifier's output - * - * Sometimes, a little ad-hoc fixing of HTML has to be done before - * it gets sent through HTML Purifier: you can use filters to acheive - * this effect. For instance, YouTube videos can be preserved using - * this manner. You could have used a decorator for this task, but - * PHP's support for them is not terribly robust, so we're going - * to just loop through the filters. - * - * Filters should be exited first in, last out. If there are three filters, - * named 1, 2 and 3, the order of execution should go 1->preFilter, - * 2->preFilter, 3->preFilter, purify, 3->postFilter, 2->postFilter, - * 1->postFilter. - * - * @note Methods are not declared abstract as it is perfectly legitimate - * for an implementation not to want anything to happen on a step - */ - -class HTMLPurifier_Filter -{ - - /** - * Name of the filter for identification purposes - */ - public $name; - - /** - * Pre-processor function, handles HTML before HTML Purifier - */ - public function preFilter($html, $config, $context) { - return $html; - } - - /** - * Post-processor function, handles HTML after HTML Purifier - */ - public function postFilter($html, $config, $context) { - return $html; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Represents a pre or post processing filter on HTML Purifier's output + * + * Sometimes, a little ad-hoc fixing of HTML has to be done before + * it gets sent through HTML Purifier: you can use filters to acheive + * this effect. For instance, YouTube videos can be preserved using + * this manner. You could have used a decorator for this task, but + * PHP's support for them is not terribly robust, so we're going + * to just loop through the filters. + * + * Filters should be exited first in, last out. If there are three filters, + * named 1, 2 and 3, the order of execution should go 1->preFilter, + * 2->preFilter, 3->preFilter, purify, 3->postFilter, 2->postFilter, + * 1->postFilter. + * + * @note Methods are not declared abstract as it is perfectly legitimate + * for an implementation not to want anything to happen on a step + */ + +class HTMLPurifier_Filter +{ + + /** + * Name of the filter for identification purposes. + * @type string + */ + public $name; + + /** + * Pre-processor function, handles HTML before HTML Purifier + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function preFilter($html, $config, $context) + { + return $html; + } + + /** + * Post-processor function, handles HTML after HTML Purifier + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function postFilter($html, $config, $context) + { + return $html; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Filter/ExtractStyleBlocks.php b/libraries/htmlpurifier410/library/HTMLPurifier/Filter/ExtractStyleBlocks.php new file mode 100644 index 0000000000000000000000000000000000000000..5af24c2020ee080a792401af8dc560665d8231ba --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Filter/ExtractStyleBlocks.php @@ -0,0 +1,341 @@ +<?php + +// why is this a top level function? Because PHP 5.2.0 doesn't seem to +// understand how to interpret this filter if it's a static method. +// It's all really silly, but if we go this route it might be reasonable +// to coalesce all of these methods into one. +function htmlpurifier_filter_extractstyleblocks_muteerrorhandler() +{ +} + +/** + * This filter extracts <style> blocks from input HTML, cleans them up + * using CSSTidy, and then places them in $purifier->context->get('StyleBlocks') + * so they can be used elsewhere in the document. + * + * @note + * See tests/HTMLPurifier/Filter/ExtractStyleBlocksTest.php for + * sample usage. + * + * @note + * This filter can also be used on stylesheets not included in the + * document--something purists would probably prefer. Just directly + * call HTMLPurifier_Filter_ExtractStyleBlocks->cleanCSS() + */ +class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter +{ + /** + * @type string + */ + public $name = 'ExtractStyleBlocks'; + + /** + * @type array + */ + private $_styleMatches = array(); + + /** + * @type csstidy + */ + private $_tidy; + + /** + * @type HTMLPurifier_AttrDef_HTML_ID + */ + private $_id_attrdef; + + /** + * @type HTMLPurifier_AttrDef_CSS_Ident + */ + private $_class_attrdef; + + /** + * @type HTMLPurifier_AttrDef_Enum + */ + private $_enum_attrdef; + + public function __construct() + { + $this->_tidy = new csstidy(); + $this->_tidy->set_cfg('lowercase_s', false); + $this->_id_attrdef = new HTMLPurifier_AttrDef_HTML_ID(true); + $this->_class_attrdef = new HTMLPurifier_AttrDef_CSS_Ident(); + $this->_enum_attrdef = new HTMLPurifier_AttrDef_Enum( + array( + 'first-child', + 'link', + 'visited', + 'active', + 'hover', + 'focus' + ) + ); + } + + /** + * Save the contents of CSS blocks to style matches + * @param array $matches preg_replace style $matches array + */ + protected function styleCallback($matches) + { + $this->_styleMatches[] = $matches[1]; + } + + /** + * Removes inline <style> tags from HTML, saves them for later use + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + * @todo Extend to indicate non-text/css style blocks + */ + public function preFilter($html, $config, $context) + { + $tidy = $config->get('Filter.ExtractStyleBlocks.TidyImpl'); + if ($tidy !== null) { + $this->_tidy = $tidy; + } + // NB: this must be NON-greedy because if we have + // <style>foo</style> <style>bar</style> + // we must not grab foo</style> <style>bar + $html = preg_replace_callback('#<style(?:\s.*)?>(.*)<\/style>#isU', array($this, 'styleCallback'), $html); + $style_blocks = $this->_styleMatches; + $this->_styleMatches = array(); // reset + $context->register('StyleBlocks', $style_blocks); // $context must not be reused + if ($this->_tidy) { + foreach ($style_blocks as &$style) { + $style = $this->cleanCSS($style, $config, $context); + } + } + return $html; + } + + /** + * Takes CSS (the stuff found in <style>) and cleans it. + * @warning Requires CSSTidy <http://csstidy.sourceforge.net/> + * @param string $css CSS styling to clean + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @throws HTMLPurifier_Exception + * @return string Cleaned CSS + */ + public function cleanCSS($css, $config, $context) + { + // prepare scope + $scope = $config->get('Filter.ExtractStyleBlocks.Scope'); + if ($scope !== null) { + $scopes = array_map('trim', explode(',', $scope)); + } else { + $scopes = array(); + } + // remove comments from CSS + $css = trim($css); + if (strncmp('<!--', $css, 4) === 0) { + $css = substr($css, 4); + } + if (strlen($css) > 3 && substr($css, -3) == '-->') { + $css = substr($css, 0, -3); + } + $css = trim($css); + set_error_handler('htmlpurifier_filter_extractstyleblocks_muteerrorhandler'); + $this->_tidy->parse($css); + restore_error_handler(); + $css_definition = $config->getDefinition('CSS'); + $html_definition = $config->getDefinition('HTML'); + $new_css = array(); + foreach ($this->_tidy->css as $k => $decls) { + // $decls are all CSS declarations inside an @ selector + $new_decls = array(); + foreach ($decls as $selector => $style) { + $selector = trim($selector); + if ($selector === '') { + continue; + } // should not happen + // Parse the selector + // Here is the relevant part of the CSS grammar: + // + // ruleset + // : selector [ ',' S* selector ]* '{' ... + // selector + // : simple_selector [ combinator selector | S+ [ combinator? selector ]? ]? + // combinator + // : '+' S* + // : '>' S* + // simple_selector + // : element_name [ HASH | class | attrib | pseudo ]* + // | [ HASH | class | attrib | pseudo ]+ + // element_name + // : IDENT | '*' + // ; + // class + // : '.' IDENT + // ; + // attrib + // : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* + // [ IDENT | STRING ] S* ]? ']' + // ; + // pseudo + // : ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ] + // ; + // + // For reference, here are the relevant tokens: + // + // HASH #{name} + // IDENT {ident} + // INCLUDES == + // DASHMATCH |= + // STRING {string} + // FUNCTION {ident}\( + // + // And the lexical scanner tokens + // + // name {nmchar}+ + // nmchar [_a-z0-9-]|{nonascii}|{escape} + // nonascii [\240-\377] + // escape {unicode}|\\[^\r\n\f0-9a-f] + // unicode \\{h}}{1,6}(\r\n|[ \t\r\n\f])? + // ident -?{nmstart}{nmchar*} + // nmstart [_a-z]|{nonascii}|{escape} + // string {string1}|{string2} + // string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\" + // string2 \'([^\n\r\f\\"]|\\{nl}|{escape})*\' + // + // We'll implement a subset (in order to reduce attack + // surface); in particular: + // + // - No Unicode support + // - No escapes support + // - No string support (by proxy no attrib support) + // - element_name is matched against allowed + // elements (some people might find this + // annoying...) + // - Pseudo-elements one of :first-child, :link, + // :visited, :active, :hover, :focus + + // handle ruleset + $selectors = array_map('trim', explode(',', $selector)); + $new_selectors = array(); + foreach ($selectors as $sel) { + // split on +, > and spaces + $basic_selectors = preg_split('/\s*([+> ])\s*/', $sel, -1, PREG_SPLIT_DELIM_CAPTURE); + // even indices are chunks, odd indices are + // delimiters + $nsel = null; + $delim = null; // guaranteed to be non-null after + // two loop iterations + for ($i = 0, $c = count($basic_selectors); $i < $c; $i++) { + $x = $basic_selectors[$i]; + if ($i % 2) { + // delimiter + if ($x === ' ') { + $delim = ' '; + } else { + $delim = ' ' . $x . ' '; + } + } else { + // simple selector + $components = preg_split('/([#.:])/', $x, -1, PREG_SPLIT_DELIM_CAPTURE); + $sdelim = null; + $nx = null; + for ($j = 0, $cc = count($components); $j < $cc; $j++) { + $y = $components[$j]; + if ($j === 0) { + if ($y === '*' || isset($html_definition->info[$y = strtolower($y)])) { + $nx = $y; + } else { + // $nx stays null; this matters + // if we don't manage to find + // any valid selector content, + // in which case we ignore the + // outer $delim + } + } elseif ($j % 2) { + // set delimiter + $sdelim = $y; + } else { + $attrdef = null; + if ($sdelim === '#') { + $attrdef = $this->_id_attrdef; + } elseif ($sdelim === '.') { + $attrdef = $this->_class_attrdef; + } elseif ($sdelim === ':') { + $attrdef = $this->_enum_attrdef; + } else { + throw new HTMLPurifier_Exception('broken invariant sdelim and preg_split'); + } + $r = $attrdef->validate($y, $config, $context); + if ($r !== false) { + if ($r !== true) { + $y = $r; + } + if ($nx === null) { + $nx = ''; + } + $nx .= $sdelim . $y; + } + } + } + if ($nx !== null) { + if ($nsel === null) { + $nsel = $nx; + } else { + $nsel .= $delim . $nx; + } + } else { + // delimiters to the left of invalid + // basic selector ignored + } + } + } + if ($nsel !== null) { + if (!empty($scopes)) { + foreach ($scopes as $s) { + $new_selectors[] = "$s $nsel"; + } + } else { + $new_selectors[] = $nsel; + } + } + } + if (empty($new_selectors)) { + continue; + } + $selector = implode(', ', $new_selectors); + foreach ($style as $name => $value) { + if (!isset($css_definition->info[$name])) { + unset($style[$name]); + continue; + } + $def = $css_definition->info[$name]; + $ret = $def->validate($value, $config, $context); + if ($ret === false) { + unset($style[$name]); + } else { + $style[$name] = $ret; + } + } + $new_decls[$selector] = $style; + } + $new_css[$k] = $new_decls; + } + // remove stuff that shouldn't be used, could be reenabled + // after security risks are analyzed + $this->_tidy->css = $new_css; + $this->_tidy->import = array(); + $this->_tidy->charset = null; + $this->_tidy->namespace = null; + $css = $this->_tidy->print->plain(); + // we are going to escape any special characters <>& to ensure + // that no funny business occurs (i.e. </style> in a font-family prop). + if ($config->get('Filter.ExtractStyleBlocks.Escaping')) { + $css = str_replace( + array('<', '>', '&'), + array('\3C ', '\3E ', '\26 '), + $css + ); + } + return $css; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Filter/YouTube.php b/libraries/htmlpurifier410/library/HTMLPurifier/Filter/YouTube.php new file mode 100644 index 0000000000000000000000000000000000000000..b90ddf751715f23f983ad34df2466647e5e6eca1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Filter/YouTube.php @@ -0,0 +1,65 @@ +<?php + +class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter +{ + + /** + * @type string + */ + public $name = 'YouTube'; + + /** + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function preFilter($html, $config, $context) + { + $pre_regex = '#<object[^>]+>.+?' . + '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s'; + $pre_replace = '<span class="youtube-embed">\1</span>'; + return preg_replace($pre_regex, $pre_replace, $html); + } + + /** + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function postFilter($html, $config, $context) + { + $post_regex = '#<span class="youtube-embed">((?:v|cp)/[A-Za-z0-9\-_=]+)</span>#'; + return preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html); + } + + /** + * @param $url + * @return string + */ + protected function armorUrl($url) + { + return str_replace('--', '--', $url); + } + + /** + * @param array $matches + * @return string + */ + protected function postFilterCallback($matches) + { + $url = $this->armorUrl($matches[1]); + return '<object width="425" height="350" type="application/x-shockwave-flash" ' . + 'data="//www.youtube.com/' . $url . '">' . + '<param name="movie" value="//www.youtube.com/' . $url . '"></param>' . + '<!--[if IE]>' . + '<embed src="//www.youtube.com/' . $url . '"' . + 'type="application/x-shockwave-flash"' . + 'wmode="transparent" width="425" height="350" />' . + '<![endif]-->' . + '</object>'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Generator.php b/libraries/htmlpurifier410/library/HTMLPurifier/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..addc23e9e4d1bec667dacbc5671aedcf39618fde --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Generator.php @@ -0,0 +1,286 @@ +<?php + +/** + * Generates HTML from tokens. + * @todo Refactor interface so that configuration/context is determined + * upon instantiation, no need for messy generateFromTokens() calls + * @todo Make some of the more internal functions protected, and have + * unit tests work around that + */ +class HTMLPurifier_Generator +{ + + /** + * Whether or not generator should produce XML output. + * @type bool + */ + private $_xhtml = true; + + /** + * :HACK: Whether or not generator should comment the insides of <script> tags. + * @type bool + */ + private $_scriptFix = false; + + /** + * Cache of HTMLDefinition during HTML output to determine whether or + * not attributes should be minimized. + * @type HTMLPurifier_HTMLDefinition + */ + private $_def; + + /** + * Cache of %Output.SortAttr. + * @type bool + */ + private $_sortAttr; + + /** + * Cache of %Output.FlashCompat. + * @type bool + */ + private $_flashCompat; + + /** + * Cache of %Output.FixInnerHTML. + * @type bool + */ + private $_innerHTMLFix; + + /** + * Stack for keeping track of object information when outputting IE + * compatibility code. + * @type array + */ + private $_flashStack = array(); + + /** + * Configuration for the generator + * @type HTMLPurifier_Config + */ + protected $config; + + /** + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + */ + public function __construct($config, $context) + { + $this->config = $config; + $this->_scriptFix = $config->get('Output.CommentScriptContents'); + $this->_innerHTMLFix = $config->get('Output.FixInnerHTML'); + $this->_sortAttr = $config->get('Output.SortAttr'); + $this->_flashCompat = $config->get('Output.FlashCompat'); + $this->_def = $config->getHTMLDefinition(); + $this->_xhtml = $this->_def->doctype->xml; + } + + /** + * Generates HTML from an array of tokens. + * @param HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token + * @return string Generated HTML + */ + public function generateFromTokens($tokens) + { + if (!$tokens) { + return ''; + } + + // Basic algorithm + $html = ''; + for ($i = 0, $size = count($tokens); $i < $size; $i++) { + if ($this->_scriptFix && $tokens[$i]->name === 'script' + && $i + 2 < $size && $tokens[$i+2] instanceof HTMLPurifier_Token_End) { + // script special case + // the contents of the script block must be ONE token + // for this to work. + $html .= $this->generateFromToken($tokens[$i++]); + $html .= $this->generateScriptFromToken($tokens[$i++]); + } + $html .= $this->generateFromToken($tokens[$i]); + } + + // Tidy cleanup + if (extension_loaded('tidy') && $this->config->get('Output.TidyFormat')) { + $tidy = new Tidy; + $tidy->parseString( + $html, + array( + 'indent'=> true, + 'output-xhtml' => $this->_xhtml, + 'show-body-only' => true, + 'indent-spaces' => 2, + 'wrap' => 68, + ), + 'utf8' + ); + $tidy->cleanRepair(); + $html = (string) $tidy; // explicit cast necessary + } + + // Normalize newlines to system defined value + if ($this->config->get('Core.NormalizeNewlines')) { + $nl = $this->config->get('Output.Newline'); + if ($nl === null) { + $nl = PHP_EOL; + } + if ($nl !== "\n") { + $html = str_replace("\n", $nl, $html); + } + } + return $html; + } + + /** + * Generates HTML from a single token. + * @param HTMLPurifier_Token $token HTMLPurifier_Token object. + * @return string Generated HTML + */ + public function generateFromToken($token) + { + if (!$token instanceof HTMLPurifier_Token) { + trigger_error('Cannot generate HTML from non-HTMLPurifier_Token object', E_USER_WARNING); + return ''; + + } elseif ($token instanceof HTMLPurifier_Token_Start) { + $attr = $this->generateAttributes($token->attr, $token->name); + if ($this->_flashCompat) { + if ($token->name == "object") { + $flash = new stdClass(); + $flash->attr = $token->attr; + $flash->param = array(); + $this->_flashStack[] = $flash; + } + } + return '<' . $token->name . ($attr ? ' ' : '') . $attr . '>'; + + } elseif ($token instanceof HTMLPurifier_Token_End) { + $_extra = ''; + if ($this->_flashCompat) { + if ($token->name == "object" && !empty($this->_flashStack)) { + // doesn't do anything for now + } + } + return $_extra . '</' . $token->name . '>'; + + } elseif ($token instanceof HTMLPurifier_Token_Empty) { + if ($this->_flashCompat && $token->name == "param" && !empty($this->_flashStack)) { + $this->_flashStack[count($this->_flashStack)-1]->param[$token->attr['name']] = $token->attr['value']; + } + $attr = $this->generateAttributes($token->attr, $token->name); + return '<' . $token->name . ($attr ? ' ' : '') . $attr . + ( $this->_xhtml ? ' /': '' ) // <br /> v. <br> + . '>'; + + } elseif ($token instanceof HTMLPurifier_Token_Text) { + return $this->escape($token->data, ENT_NOQUOTES); + + } elseif ($token instanceof HTMLPurifier_Token_Comment) { + return '<!--' . $token->data . '-->'; + } else { + return ''; + + } + } + + /** + * Special case processor for the contents of script tags + * @param HTMLPurifier_Token $token HTMLPurifier_Token object. + * @return string + * @warning This runs into problems if there's already a literal + * --> somewhere inside the script contents. + */ + public function generateScriptFromToken($token) + { + if (!$token instanceof HTMLPurifier_Token_Text) { + return $this->generateFromToken($token); + } + // Thanks <http://lachy.id.au/log/2005/05/script-comments> + $data = preg_replace('#//\s*$#', '', $token->data); + return '<!--//--><![CDATA[//><!--' . "\n" . trim($data) . "\n" . '//--><!]]>'; + } + + /** + * Generates attribute declarations from attribute array. + * @note This does not include the leading or trailing space. + * @param array $assoc_array_of_attributes Attribute array + * @param string $element Name of element attributes are for, used to check + * attribute minimization. + * @return string Generated HTML fragment for insertion. + */ + public function generateAttributes($assoc_array_of_attributes, $element = '') + { + $html = ''; + if ($this->_sortAttr) { + ksort($assoc_array_of_attributes); + } + foreach ($assoc_array_of_attributes as $key => $value) { + if (!$this->_xhtml) { + // Remove namespaced attributes + if (strpos($key, ':') !== false) { + continue; + } + // Check if we should minimize the attribute: val="val" -> val + if ($element && !empty($this->_def->info[$element]->attr[$key]->minimized)) { + $html .= $key . ' '; + continue; + } + } + // Workaround for Internet Explorer innerHTML bug. + // Essentially, Internet Explorer, when calculating + // innerHTML, omits quotes if there are no instances of + // angled brackets, quotes or spaces. However, when parsing + // HTML (for example, when you assign to innerHTML), it + // treats backticks as quotes. Thus, + // <img alt="``" /> + // becomes + // <img alt=`` /> + // becomes + // <img alt='' /> + // Fortunately, all we need to do is trigger an appropriate + // quoting style, which we do by adding an extra space. + // This also is consistent with the W3C spec, which states + // that user agents may ignore leading or trailing + // whitespace (in fact, most don't, at least for attributes + // like alt, but an extra space at the end is barely + // noticeable). Still, we have a configuration knob for + // this, since this transformation is not necesary if you + // don't process user input with innerHTML or you don't plan + // on supporting Internet Explorer. + if ($this->_innerHTMLFix) { + if (strpos($value, '`') !== false) { + // check if correct quoting style would not already be + // triggered + if (strcspn($value, '"\' <>') === strlen($value)) { + // protect! + $value .= ' '; + } + } + } + $html .= $key.'="'.$this->escape($value).'" '; + } + return rtrim($html); + } + + /** + * Escapes raw text data. + * @todo This really ought to be protected, but until we have a facility + * for properly generating HTML here w/o using tokens, it stays + * public. + * @param string $string String data to escape for HTML. + * @param int $quote Quoting style, like htmlspecialchars. ENT_NOQUOTES is + * permissible for non-attribute output. + * @return string escaped data. + */ + public function escape($string, $quote = null) + { + // Workaround for APC bug on Mac Leopard reported by sidepodcast + // http://htmlpurifier.org/phorum/read.php?3,4823,4846 + if ($quote === null) { + $quote = ENT_COMPAT; + } + return htmlspecialchars($string, $quote, 'UTF-8'); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLDefinition.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLDefinition.php index 3368821c74fc7ec13ca9e4f43b2c75a5d72fab28..027c85d56e172a51c4630df8ae006ed18d4b2bd6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLDefinition.php @@ -1,420 +1,493 @@ -<?php - -/** - * Definition of the purified HTML that describes allowed children, - * attributes, and many other things. - * - * Conventions: - * - * All member variables that are prefixed with info - * (including the main $info array) are used by HTML Purifier internals - * and should not be directly edited when customizing the HTMLDefinition. - * They can usually be set via configuration directives or custom - * modules. - * - * On the other hand, member variables without the info prefix are used - * internally by the HTMLDefinition and MUST NOT be used by other HTML - * Purifier internals. Many of them, however, are public, and may be - * edited by userspace code to tweak the behavior of HTMLDefinition. - * - * @note This class is inspected by Printer_HTMLDefinition; please - * update that class if things here change. - * - * @warning Directives that change this object's structure must be in - * the HTML or Attr namespace! - */ -class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition -{ - - // FULLY-PUBLIC VARIABLES --------------------------------------------- - - /** - * Associative array of element names to HTMLPurifier_ElementDef - */ - public $info = array(); - - /** - * Associative array of global attribute name to attribute definition. - */ - public $info_global_attr = array(); - - /** - * String name of parent element HTML will be going into. - */ - public $info_parent = 'div'; - - /** - * Definition for parent element, allows parent element to be a - * tag that's not allowed inside the HTML fragment. - */ - public $info_parent_def; - - /** - * String name of element used to wrap inline elements in block context - * @note This is rarely used except for BLOCKQUOTEs in strict mode - */ - public $info_block_wrapper = 'p'; - - /** - * Associative array of deprecated tag name to HTMLPurifier_TagTransform - */ - public $info_tag_transform = array(); - - /** - * Indexed list of HTMLPurifier_AttrTransform to be performed before validation. - */ - public $info_attr_transform_pre = array(); - - /** - * Indexed list of HTMLPurifier_AttrTransform to be performed after validation. - */ - public $info_attr_transform_post = array(); - - /** - * Nested lookup array of content set name (Block, Inline) to - * element name to whether or not it belongs in that content set. - */ - public $info_content_sets = array(); - - /** - * Indexed list of HTMLPurifier_Injector to be used. - */ - public $info_injector = array(); - - /** - * Doctype object - */ - public $doctype; - - - - // RAW CUSTOMIZATION STUFF -------------------------------------------- - - /** - * Adds a custom attribute to a pre-existing element - * @note This is strictly convenience, and does not have a corresponding - * method in HTMLPurifier_HTMLModule - * @param $element_name String element name to add attribute to - * @param $attr_name String name of attribute - * @param $def Attribute definition, can be string or object, see - * HTMLPurifier_AttrTypes for details - */ - public function addAttribute($element_name, $attr_name, $def) { - $module = $this->getAnonymousModule(); - if (!isset($module->info[$element_name])) { - $element = $module->addBlankElement($element_name); - } else { - $element = $module->info[$element_name]; - } - $element->attr[$attr_name] = $def; - } - - /** - * Adds a custom element to your HTML definition - * @note See HTMLPurifier_HTMLModule::addElement for detailed - * parameter and return value descriptions. - */ - public function addElement($element_name, $type, $contents, $attr_collections, $attributes) { - $module = $this->getAnonymousModule(); - // assume that if the user is calling this, the element - // is safe. This may not be a good idea - $element = $module->addElement($element_name, $type, $contents, $attr_collections, $attributes); - return $element; - } - - /** - * Adds a blank element to your HTML definition, for overriding - * existing behavior - * @note See HTMLPurifier_HTMLModule::addBlankElement for detailed - * parameter and return value descriptions. - */ - public function addBlankElement($element_name) { - $module = $this->getAnonymousModule(); - $element = $module->addBlankElement($element_name); - return $element; - } - - /** - * Retrieves a reference to the anonymous module, so you can - * bust out advanced features without having to make your own - * module. - */ - public function getAnonymousModule() { - if (!$this->_anonModule) { - $this->_anonModule = new HTMLPurifier_HTMLModule(); - $this->_anonModule->name = 'Anonymous'; - } - return $this->_anonModule; - } - - private $_anonModule; - - - // PUBLIC BUT INTERNAL VARIABLES -------------------------------------- - - public $type = 'HTML'; - public $manager; /**< Instance of HTMLPurifier_HTMLModuleManager */ - - /** - * Performs low-cost, preliminary initialization. - */ - public function __construct() { - $this->manager = new HTMLPurifier_HTMLModuleManager(); - } - - protected function doSetup($config) { - $this->processModules($config); - $this->setupConfigStuff($config); - unset($this->manager); - - // cleanup some of the element definitions - foreach ($this->info as $k => $v) { - unset($this->info[$k]->content_model); - unset($this->info[$k]->content_model_type); - } - } - - /** - * Extract out the information from the manager - */ - protected function processModules($config) { - - if ($this->_anonModule) { - // for user specific changes - // this is late-loaded so we don't have to deal with PHP4 - // reference wonky-ness - $this->manager->addModule($this->_anonModule); - unset($this->_anonModule); - } - - $this->manager->setup($config); - $this->doctype = $this->manager->doctype; - - foreach ($this->manager->modules as $module) { - foreach($module->info_tag_transform as $k => $v) { - if ($v === false) unset($this->info_tag_transform[$k]); - else $this->info_tag_transform[$k] = $v; - } - foreach($module->info_attr_transform_pre as $k => $v) { - if ($v === false) unset($this->info_attr_transform_pre[$k]); - else $this->info_attr_transform_pre[$k] = $v; - } - foreach($module->info_attr_transform_post as $k => $v) { - if ($v === false) unset($this->info_attr_transform_post[$k]); - else $this->info_attr_transform_post[$k] = $v; - } - foreach ($module->info_injector as $k => $v) { - if ($v === false) unset($this->info_injector[$k]); - else $this->info_injector[$k] = $v; - } - } - - $this->info = $this->manager->getElements(); - $this->info_content_sets = $this->manager->contentSets->lookup; - - } - - /** - * Sets up stuff based on config. We need a better way of doing this. - */ - protected function setupConfigStuff($config) { - - $block_wrapper = $config->get('HTML', 'BlockWrapper'); - if (isset($this->info_content_sets['Block'][$block_wrapper])) { - $this->info_block_wrapper = $block_wrapper; - } else { - trigger_error('Cannot use non-block element as block wrapper', - E_USER_ERROR); - } - - $parent = $config->get('HTML', 'Parent'); - $def = $this->manager->getElement($parent, true); - if ($def) { - $this->info_parent = $parent; - $this->info_parent_def = $def; - } else { - trigger_error('Cannot use unrecognized element as parent', - E_USER_ERROR); - $this->info_parent_def = $this->manager->getElement($this->info_parent, true); - } - - // support template text - $support = "(for information on implementing this, see the ". - "support forums) "; - - // setup allowed elements ----------------------------------------- - - $allowed_elements = $config->get('HTML', 'AllowedElements'); - $allowed_attributes = $config->get('HTML', 'AllowedAttributes'); // retrieve early - - if (!is_array($allowed_elements) && !is_array($allowed_attributes)) { - $allowed = $config->get('HTML', 'Allowed'); - if (is_string($allowed)) { - list($allowed_elements, $allowed_attributes) = $this->parseTinyMCEAllowedList($allowed); - } - } - - if (is_array($allowed_elements)) { - foreach ($this->info as $name => $d) { - if(!isset($allowed_elements[$name])) unset($this->info[$name]); - unset($allowed_elements[$name]); - } - // emit errors - foreach ($allowed_elements as $element => $d) { - $element = htmlspecialchars($element); // PHP doesn't escape errors, be careful! - trigger_error("Element '$element' is not supported $support", E_USER_WARNING); - } - } - - // setup allowed attributes --------------------------------------- - - $allowed_attributes_mutable = $allowed_attributes; // by copy! - if (is_array($allowed_attributes)) { - - // This actually doesn't do anything, since we went away from - // global attributes. It's possible that userland code uses - // it, but HTMLModuleManager doesn't! - foreach ($this->info_global_attr as $attr => $x) { - $keys = array($attr, "*@$attr", "*.$attr"); - $delete = true; - foreach ($keys as $key) { - if ($delete && isset($allowed_attributes[$key])) { - $delete = false; - } - if (isset($allowed_attributes_mutable[$key])) { - unset($allowed_attributes_mutable[$key]); - } - } - if ($delete) unset($this->info_global_attr[$attr]); - } - - foreach ($this->info as $tag => $info) { - foreach ($info->attr as $attr => $x) { - $keys = array("$tag@$attr", $attr, "*@$attr", "$tag.$attr", "*.$attr"); - $delete = true; - foreach ($keys as $key) { - if ($delete && isset($allowed_attributes[$key])) { - $delete = false; - } - if (isset($allowed_attributes_mutable[$key])) { - unset($allowed_attributes_mutable[$key]); - } - } - if ($delete) unset($this->info[$tag]->attr[$attr]); - } - } - // emit errors - foreach ($allowed_attributes_mutable as $elattr => $d) { - $bits = preg_split('/[.@]/', $elattr, 2); - $c = count($bits); - switch ($c) { - case 2: - if ($bits[0] !== '*') { - $element = htmlspecialchars($bits[0]); - $attribute = htmlspecialchars($bits[1]); - if (!isset($this->info[$element])) { - trigger_error("Cannot allow attribute '$attribute' if element '$element' is not allowed/supported $support"); - } else { - trigger_error("Attribute '$attribute' in element '$element' not supported $support", - E_USER_WARNING); - } - break; - } - // otherwise fall through - case 1: - $attribute = htmlspecialchars($bits[0]); - trigger_error("Global attribute '$attribute' is not ". - "supported in any elements $support", - E_USER_WARNING); - break; - } - } - - } - - // setup forbidden elements --------------------------------------- - - $forbidden_elements = $config->get('HTML', 'ForbiddenElements'); - $forbidden_attributes = $config->get('HTML', 'ForbiddenAttributes'); - - foreach ($this->info as $tag => $info) { - if (isset($forbidden_elements[$tag])) { - unset($this->info[$tag]); - continue; - } - foreach ($info->attr as $attr => $x) { - if ( - isset($forbidden_attributes["$tag@$attr"]) || - isset($forbidden_attributes["*@$attr"]) || - isset($forbidden_attributes[$attr]) - ) { - unset($this->info[$tag]->attr[$attr]); - continue; - } // this segment might get removed eventually - elseif (isset($forbidden_attributes["$tag.$attr"])) { - // $tag.$attr are not user supplied, so no worries! - trigger_error("Error with $tag.$attr: tag.attr syntax not supported for HTML.ForbiddenAttributes; use tag@attr instead", E_USER_WARNING); - } - } - } - foreach ($forbidden_attributes as $key => $v) { - if (strlen($key) < 2) continue; - if ($key[0] != '*') continue; - if ($key[1] == '.') { - trigger_error("Error with $key: *.attr syntax not supported for HTML.ForbiddenAttributes; use attr instead", E_USER_WARNING); - } - } - - // setup injectors ----------------------------------------------------- - foreach ($this->info_injector as $i => $injector) { - if ($injector->checkNeeded($config) !== false) { - // remove injector that does not have it's required - // elements/attributes present, and is thus not needed. - unset($this->info_injector[$i]); - } - } - } - - /** - * Parses a TinyMCE-flavored Allowed Elements and Attributes list into - * separate lists for processing. Format is element[attr1|attr2],element2... - * @warning Although it's largely drawn from TinyMCE's implementation, - * it is different, and you'll probably have to modify your lists - * @param $list String list to parse - * @param array($allowed_elements, $allowed_attributes) - * @todo Give this its own class, probably static interface - */ - public function parseTinyMCEAllowedList($list) { - - $list = str_replace(array(' ', "\t"), '', $list); - - $elements = array(); - $attributes = array(); - - $chunks = preg_split('/(,|[\n\r]+)/', $list); - foreach ($chunks as $chunk) { - if (empty($chunk)) continue; - // remove TinyMCE element control characters - if (!strpos($chunk, '[')) { - $element = $chunk; - $attr = false; - } else { - list($element, $attr) = explode('[', $chunk); - } - if ($element !== '*') $elements[$element] = true; - if (!$attr) continue; - $attr = substr($attr, 0, strlen($attr) - 1); // remove trailing ] - $attr = explode('|', $attr); - foreach ($attr as $key) { - $attributes["$element.$key"] = true; - } - } - - return array($elements, $attributes); - - } - - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Definition of the purified HTML that describes allowed children, + * attributes, and many other things. + * + * Conventions: + * + * All member variables that are prefixed with info + * (including the main $info array) are used by HTML Purifier internals + * and should not be directly edited when customizing the HTMLDefinition. + * They can usually be set via configuration directives or custom + * modules. + * + * On the other hand, member variables without the info prefix are used + * internally by the HTMLDefinition and MUST NOT be used by other HTML + * Purifier internals. Many of them, however, are public, and may be + * edited by userspace code to tweak the behavior of HTMLDefinition. + * + * @note This class is inspected by Printer_HTMLDefinition; please + * update that class if things here change. + * + * @warning Directives that change this object's structure must be in + * the HTML or Attr namespace! + */ +class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition +{ + + // FULLY-PUBLIC VARIABLES --------------------------------------------- + + /** + * Associative array of element names to HTMLPurifier_ElementDef. + * @type HTMLPurifier_ElementDef[] + */ + public $info = array(); + + /** + * Associative array of global attribute name to attribute definition. + * @type array + */ + public $info_global_attr = array(); + + /** + * String name of parent element HTML will be going into. + * @type string + */ + public $info_parent = 'div'; + + /** + * Definition for parent element, allows parent element to be a + * tag that's not allowed inside the HTML fragment. + * @type HTMLPurifier_ElementDef + */ + public $info_parent_def; + + /** + * String name of element used to wrap inline elements in block context. + * @type string + * @note This is rarely used except for BLOCKQUOTEs in strict mode + */ + public $info_block_wrapper = 'p'; + + /** + * Associative array of deprecated tag name to HTMLPurifier_TagTransform. + * @type array + */ + public $info_tag_transform = array(); + + /** + * Indexed list of HTMLPurifier_AttrTransform to be performed before validation. + * @type HTMLPurifier_AttrTransform[] + */ + public $info_attr_transform_pre = array(); + + /** + * Indexed list of HTMLPurifier_AttrTransform to be performed after validation. + * @type HTMLPurifier_AttrTransform[] + */ + public $info_attr_transform_post = array(); + + /** + * Nested lookup array of content set name (Block, Inline) to + * element name to whether or not it belongs in that content set. + * @type array + */ + public $info_content_sets = array(); + + /** + * Indexed list of HTMLPurifier_Injector to be used. + * @type HTMLPurifier_Injector[] + */ + public $info_injector = array(); + + /** + * Doctype object + * @type HTMLPurifier_Doctype + */ + public $doctype; + + + + // RAW CUSTOMIZATION STUFF -------------------------------------------- + + /** + * Adds a custom attribute to a pre-existing element + * @note This is strictly convenience, and does not have a corresponding + * method in HTMLPurifier_HTMLModule + * @param string $element_name Element name to add attribute to + * @param string $attr_name Name of attribute + * @param mixed $def Attribute definition, can be string or object, see + * HTMLPurifier_AttrTypes for details + */ + public function addAttribute($element_name, $attr_name, $def) + { + $module = $this->getAnonymousModule(); + if (!isset($module->info[$element_name])) { + $element = $module->addBlankElement($element_name); + } else { + $element = $module->info[$element_name]; + } + $element->attr[$attr_name] = $def; + } + + /** + * Adds a custom element to your HTML definition + * @see HTMLPurifier_HTMLModule::addElement() for detailed + * parameter and return value descriptions. + */ + public function addElement($element_name, $type, $contents, $attr_collections, $attributes = array()) + { + $module = $this->getAnonymousModule(); + // assume that if the user is calling this, the element + // is safe. This may not be a good idea + $element = $module->addElement($element_name, $type, $contents, $attr_collections, $attributes); + return $element; + } + + /** + * Adds a blank element to your HTML definition, for overriding + * existing behavior + * @param string $element_name + * @return HTMLPurifier_ElementDef + * @see HTMLPurifier_HTMLModule::addBlankElement() for detailed + * parameter and return value descriptions. + */ + public function addBlankElement($element_name) + { + $module = $this->getAnonymousModule(); + $element = $module->addBlankElement($element_name); + return $element; + } + + /** + * Retrieves a reference to the anonymous module, so you can + * bust out advanced features without having to make your own + * module. + * @return HTMLPurifier_HTMLModule + */ + public function getAnonymousModule() + { + if (!$this->_anonModule) { + $this->_anonModule = new HTMLPurifier_HTMLModule(); + $this->_anonModule->name = 'Anonymous'; + } + return $this->_anonModule; + } + + private $_anonModule = null; + + // PUBLIC BUT INTERNAL VARIABLES -------------------------------------- + + /** + * @type string + */ + public $type = 'HTML'; + + /** + * @type HTMLPurifier_HTMLModuleManager + */ + public $manager; + + /** + * Performs low-cost, preliminary initialization. + */ + public function __construct() + { + $this->manager = new HTMLPurifier_HTMLModuleManager(); + } + + /** + * @param HTMLPurifier_Config $config + */ + protected function doSetup($config) + { + $this->processModules($config); + $this->setupConfigStuff($config); + unset($this->manager); + + // cleanup some of the element definitions + foreach ($this->info as $k => $v) { + unset($this->info[$k]->content_model); + unset($this->info[$k]->content_model_type); + } + } + + /** + * Extract out the information from the manager + * @param HTMLPurifier_Config $config + */ + protected function processModules($config) + { + if ($this->_anonModule) { + // for user specific changes + // this is late-loaded so we don't have to deal with PHP4 + // reference wonky-ness + $this->manager->addModule($this->_anonModule); + unset($this->_anonModule); + } + + $this->manager->setup($config); + $this->doctype = $this->manager->doctype; + + foreach ($this->manager->modules as $module) { + foreach ($module->info_tag_transform as $k => $v) { + if ($v === false) { + unset($this->info_tag_transform[$k]); + } else { + $this->info_tag_transform[$k] = $v; + } + } + foreach ($module->info_attr_transform_pre as $k => $v) { + if ($v === false) { + unset($this->info_attr_transform_pre[$k]); + } else { + $this->info_attr_transform_pre[$k] = $v; + } + } + foreach ($module->info_attr_transform_post as $k => $v) { + if ($v === false) { + unset($this->info_attr_transform_post[$k]); + } else { + $this->info_attr_transform_post[$k] = $v; + } + } + foreach ($module->info_injector as $k => $v) { + if ($v === false) { + unset($this->info_injector[$k]); + } else { + $this->info_injector[$k] = $v; + } + } + } + $this->info = $this->manager->getElements(); + $this->info_content_sets = $this->manager->contentSets->lookup; + } + + /** + * Sets up stuff based on config. We need a better way of doing this. + * @param HTMLPurifier_Config $config + */ + protected function setupConfigStuff($config) + { + $block_wrapper = $config->get('HTML.BlockWrapper'); + if (isset($this->info_content_sets['Block'][$block_wrapper])) { + $this->info_block_wrapper = $block_wrapper; + } else { + trigger_error( + 'Cannot use non-block element as block wrapper', + E_USER_ERROR + ); + } + + $parent = $config->get('HTML.Parent'); + $def = $this->manager->getElement($parent, true); + if ($def) { + $this->info_parent = $parent; + $this->info_parent_def = $def; + } else { + trigger_error( + 'Cannot use unrecognized element as parent', + E_USER_ERROR + ); + $this->info_parent_def = $this->manager->getElement($this->info_parent, true); + } + + // support template text + $support = "(for information on implementing this, see the support forums) "; + + // setup allowed elements ----------------------------------------- + + $allowed_elements = $config->get('HTML.AllowedElements'); + $allowed_attributes = $config->get('HTML.AllowedAttributes'); // retrieve early + + if (!is_array($allowed_elements) && !is_array($allowed_attributes)) { + $allowed = $config->get('HTML.Allowed'); + if (is_string($allowed)) { + list($allowed_elements, $allowed_attributes) = $this->parseTinyMCEAllowedList($allowed); + } + } + + if (is_array($allowed_elements)) { + foreach ($this->info as $name => $d) { + if (!isset($allowed_elements[$name])) { + unset($this->info[$name]); + } + unset($allowed_elements[$name]); + } + // emit errors + foreach ($allowed_elements as $element => $d) { + $element = htmlspecialchars($element); // PHP doesn't escape errors, be careful! + trigger_error("Element '$element' is not supported $support", E_USER_WARNING); + } + } + + // setup allowed attributes --------------------------------------- + + $allowed_attributes_mutable = $allowed_attributes; // by copy! + if (is_array($allowed_attributes)) { + // This actually doesn't do anything, since we went away from + // global attributes. It's possible that userland code uses + // it, but HTMLModuleManager doesn't! + foreach ($this->info_global_attr as $attr => $x) { + $keys = array($attr, "*@$attr", "*.$attr"); + $delete = true; + foreach ($keys as $key) { + if ($delete && isset($allowed_attributes[$key])) { + $delete = false; + } + if (isset($allowed_attributes_mutable[$key])) { + unset($allowed_attributes_mutable[$key]); + } + } + if ($delete) { + unset($this->info_global_attr[$attr]); + } + } + + foreach ($this->info as $tag => $info) { + foreach ($info->attr as $attr => $x) { + $keys = array("$tag@$attr", $attr, "*@$attr", "$tag.$attr", "*.$attr"); + $delete = true; + foreach ($keys as $key) { + if ($delete && isset($allowed_attributes[$key])) { + $delete = false; + } + if (isset($allowed_attributes_mutable[$key])) { + unset($allowed_attributes_mutable[$key]); + } + } + if ($delete) { + if ($this->info[$tag]->attr[$attr]->required) { + trigger_error( + "Required attribute '$attr' in element '$tag' " . + "was not allowed, which means '$tag' will not be allowed either", + E_USER_WARNING + ); + } + unset($this->info[$tag]->attr[$attr]); + } + } + } + // emit errors + foreach ($allowed_attributes_mutable as $elattr => $d) { + $bits = preg_split('/[.@]/', $elattr, 2); + $c = count($bits); + switch ($c) { + case 2: + if ($bits[0] !== '*') { + $element = htmlspecialchars($bits[0]); + $attribute = htmlspecialchars($bits[1]); + if (!isset($this->info[$element])) { + trigger_error( + "Cannot allow attribute '$attribute' if element " . + "'$element' is not allowed/supported $support" + ); + } else { + trigger_error( + "Attribute '$attribute' in element '$element' not supported $support", + E_USER_WARNING + ); + } + break; + } + // otherwise fall through + case 1: + $attribute = htmlspecialchars($bits[0]); + trigger_error( + "Global attribute '$attribute' is not ". + "supported in any elements $support", + E_USER_WARNING + ); + break; + } + } + } + + // setup forbidden elements --------------------------------------- + + $forbidden_elements = $config->get('HTML.ForbiddenElements'); + $forbidden_attributes = $config->get('HTML.ForbiddenAttributes'); + + foreach ($this->info as $tag => $info) { + if (isset($forbidden_elements[$tag])) { + unset($this->info[$tag]); + continue; + } + foreach ($info->attr as $attr => $x) { + if (isset($forbidden_attributes["$tag@$attr"]) || + isset($forbidden_attributes["*@$attr"]) || + isset($forbidden_attributes[$attr]) + ) { + unset($this->info[$tag]->attr[$attr]); + continue; + } elseif (isset($forbidden_attributes["$tag.$attr"])) { // this segment might get removed eventually + // $tag.$attr are not user supplied, so no worries! + trigger_error( + "Error with $tag.$attr: tag.attr syntax not supported for " . + "HTML.ForbiddenAttributes; use tag@attr instead", + E_USER_WARNING + ); + } + } + } + foreach ($forbidden_attributes as $key => $v) { + if (strlen($key) < 2) { + continue; + } + if ($key[0] != '*') { + continue; + } + if ($key[1] == '.') { + trigger_error( + "Error with $key: *.attr syntax not supported for HTML.ForbiddenAttributes; use attr instead", + E_USER_WARNING + ); + } + } + + // setup injectors ----------------------------------------------------- + foreach ($this->info_injector as $i => $injector) { + if ($injector->checkNeeded($config) !== false) { + // remove injector that does not have it's required + // elements/attributes present, and is thus not needed. + unset($this->info_injector[$i]); + } + } + } + + /** + * Parses a TinyMCE-flavored Allowed Elements and Attributes list into + * separate lists for processing. Format is element[attr1|attr2],element2... + * @warning Although it's largely drawn from TinyMCE's implementation, + * it is different, and you'll probably have to modify your lists + * @param array $list String list to parse + * @return array + * @todo Give this its own class, probably static interface + */ + public function parseTinyMCEAllowedList($list) + { + $list = str_replace(array(' ', "\t"), '', $list); + + $elements = array(); + $attributes = array(); + + $chunks = preg_split('/(,|[\n\r]+)/', $list); + foreach ($chunks as $chunk) { + if (empty($chunk)) { + continue; + } + // remove TinyMCE element control characters + if (!strpos($chunk, '[')) { + $element = $chunk; + $attr = false; + } else { + list($element, $attr) = explode('[', $chunk); + } + if ($element !== '*') { + $elements[$element] = true; + } + if (!$attr) { + continue; + } + $attr = substr($attr, 0, strlen($attr) - 1); // remove trailing ] + $attr = explode('|', $attr); + foreach ($attr as $key) { + $attributes["$element.$key"] = true; + } + } + return array($elements, $attributes); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule.php similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule.php index 072cf68084aff232148e8416ffdfda993d89011d..9877f9efe90beb9f407a41a15530557a6d0294be 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule.php @@ -1,244 +1,284 @@ -<?php - -/** - * Represents an XHTML 1.1 module, with information on elements, tags - * and attributes. - * @note Even though this is technically XHTML 1.1, it is also used for - * regular HTML parsing. We are using modulization as a convenient - * way to represent the internals of HTMLDefinition, and our - * implementation is by no means conforming and does not directly - * use the normative DTDs or XML schemas. - * @note The public variables in a module should almost directly - * correspond to the variables in HTMLPurifier_HTMLDefinition. - * However, the prefix info carries no special meaning in these - * objects (include it anyway if that's the correspondence though). - * @todo Consider making some member functions protected - */ - -class HTMLPurifier_HTMLModule -{ - - // -- Overloadable ---------------------------------------------------- - - /** - * Short unique string identifier of the module - */ - public $name; - - /** - * Informally, a list of elements this module changes. Not used in - * any significant way. - */ - public $elements = array(); - - /** - * Associative array of element names to element definitions. - * Some definitions may be incomplete, to be merged in later - * with the full definition. - */ - public $info = array(); - - /** - * Associative array of content set names to content set additions. - * This is commonly used to, say, add an A element to the Inline - * content set. This corresponds to an internal variable $content_sets - * and NOT info_content_sets member variable of HTMLDefinition. - */ - public $content_sets = array(); - - /** - * Associative array of attribute collection names to attribute - * collection additions. More rarely used for adding attributes to - * the global collections. Example is the StyleAttribute module adding - * the style attribute to the Core. Corresponds to HTMLDefinition's - * attr_collections->info, since the object's data is only info, - * with extra behavior associated with it. - */ - public $attr_collections = array(); - - /** - * Associative array of deprecated tag name to HTMLPurifier_TagTransform - */ - public $info_tag_transform = array(); - - /** - * List of HTMLPurifier_AttrTransform to be performed before validation. - */ - public $info_attr_transform_pre = array(); - - /** - * List of HTMLPurifier_AttrTransform to be performed after validation. - */ - public $info_attr_transform_post = array(); - - /** - * List of HTMLPurifier_Injector to be performed during well-formedness fixing. - * An injector will only be invoked if all of it's pre-requisites are met; - * if an injector fails setup, there will be no error; it will simply be - * silently disabled. - */ - public $info_injector = array(); - - /** - * Boolean flag that indicates whether or not getChildDef is implemented. - * For optimization reasons: may save a call to a function. Be sure - * to set it if you do implement getChildDef(), otherwise it will have - * no effect! - */ - public $defines_child_def = false; - - /** - * Boolean flag whether or not this module is safe. If it is not safe, all - * of its members are unsafe. Modules are safe by default (this might be - * slightly dangerous, but it doesn't make much sense to force HTML Purifier, - * which is based off of safe HTML, to explicitly say, "This is safe," even - * though there are modules which are "unsafe") - * - * @note Previously, safety could be applied at an element level granularity. - * We've removed this ability, so in order to add "unsafe" elements - * or attributes, a dedicated module with this property set to false - * must be used. - */ - public $safe = true; - - /** - * Retrieves a proper HTMLPurifier_ChildDef subclass based on - * content_model and content_model_type member variables of - * the HTMLPurifier_ElementDef class. There is a similar function - * in HTMLPurifier_HTMLDefinition. - * @param $def HTMLPurifier_ElementDef instance - * @return HTMLPurifier_ChildDef subclass - */ - public function getChildDef($def) {return false;} - - // -- Convenience ----------------------------------------------------- - - /** - * Convenience function that sets up a new element - * @param $element Name of element to add - * @param $type What content set should element be registered to? - * Set as false to skip this step. - * @param $contents Allowed children in form of: - * "$content_model_type: $content_model" - * @param $attr_includes What attribute collections to register to - * element? - * @param $attr What unique attributes does the element define? - * @note See ElementDef for in-depth descriptions of these parameters. - * @return Created element definition object, so you - * can set advanced parameters - */ - public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array()) { - $this->elements[] = $element; - // parse content_model - list($content_model_type, $content_model) = $this->parseContents($contents); - // merge in attribute inclusions - $this->mergeInAttrIncludes($attr, $attr_includes); - // add element to content sets - if ($type) $this->addElementToContentSet($element, $type); - // create element - $this->info[$element] = HTMLPurifier_ElementDef::create( - $content_model, $content_model_type, $attr - ); - // literal object $contents means direct child manipulation - if (!is_string($contents)) $this->info[$element]->child = $contents; - return $this->info[$element]; - } - - /** - * Convenience function that creates a totally blank, non-standalone - * element. - * @param $element Name of element to create - * @return Created element - */ - public function addBlankElement($element) { - if (!isset($this->info[$element])) { - $this->elements[] = $element; - $this->info[$element] = new HTMLPurifier_ElementDef(); - $this->info[$element]->standalone = false; - } else { - trigger_error("Definition for $element already exists in module, cannot redefine"); - } - return $this->info[$element]; - } - - /** - * Convenience function that registers an element to a content set - * @param Element to register - * @param Name content set (warning: case sensitive, usually upper-case - * first letter) - */ - public function addElementToContentSet($element, $type) { - if (!isset($this->content_sets[$type])) $this->content_sets[$type] = ''; - else $this->content_sets[$type] .= ' | '; - $this->content_sets[$type] .= $element; - } - - /** - * Convenience function that transforms single-string contents - * into separate content model and content model type - * @param $contents Allowed children in form of: - * "$content_model_type: $content_model" - * @note If contents is an object, an array of two nulls will be - * returned, and the callee needs to take the original $contents - * and use it directly. - */ - public function parseContents($contents) { - if (!is_string($contents)) return array(null, null); // defer - switch ($contents) { - // check for shorthand content model forms - case 'Empty': - return array('empty', ''); - case 'Inline': - return array('optional', 'Inline | #PCDATA'); - case 'Flow': - return array('optional', 'Flow | #PCDATA'); - } - list($content_model_type, $content_model) = explode(':', $contents); - $content_model_type = strtolower(trim($content_model_type)); - $content_model = trim($content_model); - return array($content_model_type, $content_model); - } - - /** - * Convenience function that merges a list of attribute includes into - * an attribute array. - * @param $attr Reference to attr array to modify - * @param $attr_includes Array of includes / string include to merge in - */ - public function mergeInAttrIncludes(&$attr, $attr_includes) { - if (!is_array($attr_includes)) { - if (empty($attr_includes)) $attr_includes = array(); - else $attr_includes = array($attr_includes); - } - $attr[0] = $attr_includes; - } - - /** - * Convenience function that generates a lookup table with boolean - * true as value. - * @param $list List of values to turn into a lookup - * @note You can also pass an arbitrary number of arguments in - * place of the regular argument - * @return Lookup array equivalent of list - */ - public function makeLookup($list) { - if (is_string($list)) $list = func_get_args(); - $ret = array(); - foreach ($list as $value) { - if (is_null($value)) continue; - $ret[$value] = true; - } - return $ret; - } - - /** - * Lazy load construction of the module after determining whether - * or not it's needed, and also when a finalized configuration object - * is available. - * @param $config Instance of HTMLPurifier_Config - */ - public function setup($config) {} - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Represents an XHTML 1.1 module, with information on elements, tags + * and attributes. + * @note Even though this is technically XHTML 1.1, it is also used for + * regular HTML parsing. We are using modulization as a convenient + * way to represent the internals of HTMLDefinition, and our + * implementation is by no means conforming and does not directly + * use the normative DTDs or XML schemas. + * @note The public variables in a module should almost directly + * correspond to the variables in HTMLPurifier_HTMLDefinition. + * However, the prefix info carries no special meaning in these + * objects (include it anyway if that's the correspondence though). + * @todo Consider making some member functions protected + */ + +class HTMLPurifier_HTMLModule +{ + + // -- Overloadable ---------------------------------------------------- + + /** + * Short unique string identifier of the module. + * @type string + */ + public $name; + + /** + * Informally, a list of elements this module changes. + * Not used in any significant way. + * @type array + */ + public $elements = array(); + + /** + * Associative array of element names to element definitions. + * Some definitions may be incomplete, to be merged in later + * with the full definition. + * @type array + */ + public $info = array(); + + /** + * Associative array of content set names to content set additions. + * This is commonly used to, say, add an A element to the Inline + * content set. This corresponds to an internal variable $content_sets + * and NOT info_content_sets member variable of HTMLDefinition. + * @type array + */ + public $content_sets = array(); + + /** + * Associative array of attribute collection names to attribute + * collection additions. More rarely used for adding attributes to + * the global collections. Example is the StyleAttribute module adding + * the style attribute to the Core. Corresponds to HTMLDefinition's + * attr_collections->info, since the object's data is only info, + * with extra behavior associated with it. + * @type array + */ + public $attr_collections = array(); + + /** + * Associative array of deprecated tag name to HTMLPurifier_TagTransform. + * @type array + */ + public $info_tag_transform = array(); + + /** + * List of HTMLPurifier_AttrTransform to be performed before validation. + * @type array + */ + public $info_attr_transform_pre = array(); + + /** + * List of HTMLPurifier_AttrTransform to be performed after validation. + * @type array + */ + public $info_attr_transform_post = array(); + + /** + * List of HTMLPurifier_Injector to be performed during well-formedness fixing. + * An injector will only be invoked if all of it's pre-requisites are met; + * if an injector fails setup, there will be no error; it will simply be + * silently disabled. + * @type array + */ + public $info_injector = array(); + + /** + * Boolean flag that indicates whether or not getChildDef is implemented. + * For optimization reasons: may save a call to a function. Be sure + * to set it if you do implement getChildDef(), otherwise it will have + * no effect! + * @type bool + */ + public $defines_child_def = false; + + /** + * Boolean flag whether or not this module is safe. If it is not safe, all + * of its members are unsafe. Modules are safe by default (this might be + * slightly dangerous, but it doesn't make much sense to force HTML Purifier, + * which is based off of safe HTML, to explicitly say, "This is safe," even + * though there are modules which are "unsafe") + * + * @type bool + * @note Previously, safety could be applied at an element level granularity. + * We've removed this ability, so in order to add "unsafe" elements + * or attributes, a dedicated module with this property set to false + * must be used. + */ + public $safe = true; + + /** + * Retrieves a proper HTMLPurifier_ChildDef subclass based on + * content_model and content_model_type member variables of + * the HTMLPurifier_ElementDef class. There is a similar function + * in HTMLPurifier_HTMLDefinition. + * @param HTMLPurifier_ElementDef $def + * @return HTMLPurifier_ChildDef subclass + */ + public function getChildDef($def) + { + return false; + } + + // -- Convenience ----------------------------------------------------- + + /** + * Convenience function that sets up a new element + * @param string $element Name of element to add + * @param string|bool $type What content set should element be registered to? + * Set as false to skip this step. + * @param string $contents Allowed children in form of: + * "$content_model_type: $content_model" + * @param array $attr_includes What attribute collections to register to + * element? + * @param array $attr What unique attributes does the element define? + * @see HTMLPurifier_ElementDef:: for in-depth descriptions of these parameters. + * @return HTMLPurifier_ElementDef Created element definition object, so you + * can set advanced parameters + */ + public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array()) + { + $this->elements[] = $element; + // parse content_model + list($content_model_type, $content_model) = $this->parseContents($contents); + // merge in attribute inclusions + $this->mergeInAttrIncludes($attr, $attr_includes); + // add element to content sets + if ($type) { + $this->addElementToContentSet($element, $type); + } + // create element + $this->info[$element] = HTMLPurifier_ElementDef::create( + $content_model, + $content_model_type, + $attr + ); + // literal object $contents means direct child manipulation + if (!is_string($contents)) { + $this->info[$element]->child = $contents; + } + return $this->info[$element]; + } + + /** + * Convenience function that creates a totally blank, non-standalone + * element. + * @param string $element Name of element to create + * @return HTMLPurifier_ElementDef Created element + */ + public function addBlankElement($element) + { + if (!isset($this->info[$element])) { + $this->elements[] = $element; + $this->info[$element] = new HTMLPurifier_ElementDef(); + $this->info[$element]->standalone = false; + } else { + trigger_error("Definition for $element already exists in module, cannot redefine"); + } + return $this->info[$element]; + } + + /** + * Convenience function that registers an element to a content set + * @param string $element Element to register + * @param string $type Name content set (warning: case sensitive, usually upper-case + * first letter) + */ + public function addElementToContentSet($element, $type) + { + if (!isset($this->content_sets[$type])) { + $this->content_sets[$type] = ''; + } else { + $this->content_sets[$type] .= ' | '; + } + $this->content_sets[$type] .= $element; + } + + /** + * Convenience function that transforms single-string contents + * into separate content model and content model type + * @param string $contents Allowed children in form of: + * "$content_model_type: $content_model" + * @return array + * @note If contents is an object, an array of two nulls will be + * returned, and the callee needs to take the original $contents + * and use it directly. + */ + public function parseContents($contents) + { + if (!is_string($contents)) { + return array(null, null); + } // defer + switch ($contents) { + // check for shorthand content model forms + case 'Empty': + return array('empty', ''); + case 'Inline': + return array('optional', 'Inline | #PCDATA'); + case 'Flow': + return array('optional', 'Flow | #PCDATA'); + } + list($content_model_type, $content_model) = explode(':', $contents); + $content_model_type = strtolower(trim($content_model_type)); + $content_model = trim($content_model); + return array($content_model_type, $content_model); + } + + /** + * Convenience function that merges a list of attribute includes into + * an attribute array. + * @param array $attr Reference to attr array to modify + * @param array $attr_includes Array of includes / string include to merge in + */ + public function mergeInAttrIncludes(&$attr, $attr_includes) + { + if (!is_array($attr_includes)) { + if (empty($attr_includes)) { + $attr_includes = array(); + } else { + $attr_includes = array($attr_includes); + } + } + $attr[0] = $attr_includes; + } + + /** + * Convenience function that generates a lookup table with boolean + * true as value. + * @param string $list List of values to turn into a lookup + * @note You can also pass an arbitrary number of arguments in + * place of the regular argument + * @return array array equivalent of list + */ + public function makeLookup($list) + { + if (is_string($list)) { + $list = func_get_args(); + } + $ret = array(); + foreach ($list as $value) { + if (is_null($value)) { + continue; + } + $ret[$value] = true; + } + return $ret; + } + + /** + * Lazy load construction of the module after determining whether + * or not it's needed, and also when a finalized configuration object + * is available. + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Bdo.php similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Bdo.php index 3d66f1b4e124681986fff442250006ab874dd009..191a78d1cc46732b6bd4ff0634129a379272e519 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Bdo.php @@ -1,31 +1,44 @@ -<?php - -/** - * XHTML 1.1 Bi-directional Text Module, defines elements that - * declare directionality of content. Text Extension Module. - */ -class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule -{ - - public $name = 'Bdo'; - public $attr_collections = array( - 'I18N' => array('dir' => false) - ); - - public function setup($config) { - $bdo = $this->addElement( - 'bdo', 'Inline', 'Inline', array('Core', 'Lang'), - array( - 'dir' => 'Enum#ltr,rtl', // required - // The Abstract Module specification has the attribute - // inclusions wrong for bdo: bdo allows Lang - ) - ); - $bdo->attr_transform_post['required-dir'] = new HTMLPurifier_AttrTransform_BdoDir(); - - $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl'; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Bi-directional Text Module, defines elements that + * declare directionality of content. Text Extension Module. + */ +class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Bdo'; + + /** + * @type array + */ + public $attr_collections = array( + 'I18N' => array('dir' => false) + ); + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $bdo = $this->addElement( + 'bdo', + 'Inline', + 'Inline', + array('Core', 'Lang'), + array( + 'dir' => 'Enum#ltr,rtl', // required + // The Abstract Module specification has the attribute + // inclusions wrong for bdo: bdo allows Lang + ) + ); + $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir(); + + $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/CommonAttributes.php similarity index 80% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/CommonAttributes.php index fdf7b323993dad10d5d0a72b1c8966f59a4ad234..e2fe53fc8188ec4de91838364f67944a7485e7b9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/CommonAttributes.php @@ -1,25 +1,31 @@ -<?php - -class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule -{ - public $name = 'CommonAttributes'; - - public $attr_collections = array( - 'Core' => array( - 0 => array('Style'), - // 'xml:space' => false, - 'class' => 'NMTOKENS', - 'id' => 'ID', - 'title' => 'CDATA', - ), - 'Lang' => array(), - 'I18N' => array( - 0 => array('Lang'), // proprietary, for xml:lang/lang - ), - 'Common' => array( - 0 => array('Core', 'I18N') - ) - ); -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'CommonAttributes'; + + /** + * @type array + */ + public $attr_collections = array( + 'Core' => array( + 0 => array('Style'), + // 'xml:space' => false, + 'class' => 'Class', + 'id' => 'ID', + 'title' => 'CDATA', + ), + 'Lang' => array(), + 'I18N' => array( + 0 => array('Lang'), // proprietary, for xml:lang/lang + ), + 'Common' => array( + 0 => array('Core', 'I18N') + ) + ); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Edit.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Edit.php index ff93690555fc76ce60c598d7e18df0c53dc5afc3..b8288368cf9580cdb0cc867485e4e66b441521a3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Edit.php @@ -1,38 +1,55 @@ -<?php - -/** - * XHTML 1.1 Edit Module, defines editing-related elements. Text Extension - * Module. - */ -class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule -{ - - public $name = 'Edit'; - - public function setup($config) { - $contents = 'Chameleon: #PCDATA | Inline ! #PCDATA | Flow'; - $attr = array( - 'cite' => 'URI', - // 'datetime' => 'Datetime', // not implemented - ); - $this->addElement('del', 'Inline', $contents, 'Common', $attr); - $this->addElement('ins', 'Inline', $contents, 'Common', $attr); - } - - // HTML 4.01 specifies that ins/del must not contain block - // elements when used in an inline context, chameleon is - // a complicated workaround to acheive this effect - - // Inline context ! Block context (exclamation mark is - // separator, see getChildDef for parsing) - - public $defines_child_def = true; - public function getChildDef($def) { - if ($def->content_model_type != 'chameleon') return false; - $value = explode('!', $def->content_model); - return new HTMLPurifier_ChildDef_Chameleon($value[0], $value[1]); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Edit Module, defines editing-related elements. Text Extension + * Module. + */ +class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Edit'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $contents = 'Chameleon: #PCDATA | Inline ! #PCDATA | Flow'; + $attr = array( + 'cite' => 'URI', + // 'datetime' => 'Datetime', // not implemented + ); + $this->addElement('del', 'Inline', $contents, 'Common', $attr); + $this->addElement('ins', 'Inline', $contents, 'Common', $attr); + } + + // HTML 4.01 specifies that ins/del must not contain block + // elements when used in an inline context, chameleon is + // a complicated workaround to acheive this effect + + // Inline context ! Block context (exclamation mark is + // separator, see getChildDef for parsing) + + /** + * @type bool + */ + public $defines_child_def = true; + + /** + * @param HTMLPurifier_ElementDef $def + * @return HTMLPurifier_ChildDef_Chameleon + */ + public function getChildDef($def) + { + if ($def->content_model_type != 'chameleon') { + return false; + } + $value = explode('!', $def->content_model); + return new HTMLPurifier_ChildDef_Chameleon($value[0], $value[1]); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Forms.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Forms.php new file mode 100644 index 0000000000000000000000000000000000000000..13ce6ad5d92ff5b0125b5cfda824ab53ba0df6b9 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Forms.php @@ -0,0 +1,190 @@ +<?php + +/** + * XHTML 1.1 Forms module, defines all form-related elements found in HTML 4. + */ +class HTMLPurifier_HTMLModule_Forms extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Forms'; + + /** + * @type bool + */ + public $safe = false; + + /** + * @type array + */ + public $content_sets = array( + 'Block' => 'Form', + 'Inline' => 'Formctrl', + ); + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $form = $this->addElement( + 'form', + 'Form', + 'Required: Heading | List | Block | fieldset', + 'Common', + array( + 'accept' => 'ContentTypes', + 'accept-charset' => 'Charsets', + 'action*' => 'URI', + 'method' => 'Enum#get,post', + // really ContentType, but these two are the only ones used today + 'enctype' => 'Enum#application/x-www-form-urlencoded,multipart/form-data', + ) + ); + $form->excludes = array('form' => true); + + $input = $this->addElement( + 'input', + 'Formctrl', + 'Empty', + 'Common', + array( + 'accept' => 'ContentTypes', + 'accesskey' => 'Character', + 'alt' => 'Text', + 'checked' => 'Bool#checked', + 'disabled' => 'Bool#disabled', + 'maxlength' => 'Number', + 'name' => 'CDATA', + 'readonly' => 'Bool#readonly', + 'size' => 'Number', + 'src' => 'URI#embedded', + 'tabindex' => 'Number', + 'type' => 'Enum#text,password,checkbox,button,radio,submit,reset,file,hidden,image', + 'value' => 'CDATA', + ) + ); + $input->attr_transform_post[] = new HTMLPurifier_AttrTransform_Input(); + + $this->addElement( + 'select', + 'Formctrl', + 'Required: optgroup | option', + 'Common', + array( + 'disabled' => 'Bool#disabled', + 'multiple' => 'Bool#multiple', + 'name' => 'CDATA', + 'size' => 'Number', + 'tabindex' => 'Number', + ) + ); + + $this->addElement( + 'option', + false, + 'Optional: #PCDATA', + 'Common', + array( + 'disabled' => 'Bool#disabled', + 'label' => 'Text', + 'selected' => 'Bool#selected', + 'value' => 'CDATA', + ) + ); + // It's illegal for there to be more than one selected, but not + // be multiple. Also, no selected means undefined behavior. This might + // be difficult to implement; perhaps an injector, or a context variable. + + $textarea = $this->addElement( + 'textarea', + 'Formctrl', + 'Optional: #PCDATA', + 'Common', + array( + 'accesskey' => 'Character', + 'cols*' => 'Number', + 'disabled' => 'Bool#disabled', + 'name' => 'CDATA', + 'readonly' => 'Bool#readonly', + 'rows*' => 'Number', + 'tabindex' => 'Number', + ) + ); + $textarea->attr_transform_pre[] = new HTMLPurifier_AttrTransform_Textarea(); + + $button = $this->addElement( + 'button', + 'Formctrl', + 'Optional: #PCDATA | Heading | List | Block | Inline', + 'Common', + array( + 'accesskey' => 'Character', + 'disabled' => 'Bool#disabled', + 'name' => 'CDATA', + 'tabindex' => 'Number', + 'type' => 'Enum#button,submit,reset', + 'value' => 'CDATA', + ) + ); + + // For exclusions, ideally we'd specify content sets, not literal elements + $button->excludes = $this->makeLookup( + 'form', + 'fieldset', // Form + 'input', + 'select', + 'textarea', + 'label', + 'button', // Formctrl + 'a', // as per HTML 4.01 spec, this is omitted by modularization + 'isindex', + 'iframe' // legacy items + ); + + // Extra exclusion: img usemap="" is not permitted within this element. + // We'll omit this for now, since we don't have any good way of + // indicating it yet. + + // This is HIGHLY user-unfriendly; we need a custom child-def for this + $this->addElement('fieldset', 'Form', 'Custom: (#WS?,legend,(Flow|#PCDATA)*)', 'Common'); + + $label = $this->addElement( + 'label', + 'Formctrl', + 'Optional: #PCDATA | Inline', + 'Common', + array( + 'accesskey' => 'Character', + // 'for' => 'IDREF', // IDREF not implemented, cannot allow + ) + ); + $label->excludes = array('label' => true); + + $this->addElement( + 'legend', + false, + 'Optional: #PCDATA | Inline', + 'Common', + array( + 'accesskey' => 'Character', + ) + ); + + $this->addElement( + 'optgroup', + false, + 'Required: option', + 'Common', + array( + 'disabled' => 'Bool#disabled', + 'label*' => 'Text', + ) + ); + // Don't forget an injector for <isindex>. This one's a little complex + // because it maps to multiple elements. + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Hypertext.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Hypertext.php index d7e9bdd27ee1814fe8fc054707ea4779608b6ad7..968c07e9805e093f314b68e2dcf16d6a8d823683 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Hypertext.php @@ -1,31 +1,40 @@ -<?php - -/** - * XHTML 1.1 Hypertext Module, defines hypertext links. Core Module. - */ -class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule -{ - - public $name = 'Hypertext'; - - public function setup($config) { - $a = $this->addElement( - 'a', 'Inline', 'Inline', 'Common', - array( - // 'accesskey' => 'Character', - // 'charset' => 'Charset', - 'href' => 'URI', - // 'hreflang' => 'LanguageCode', - 'rel' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rel'), - 'rev' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rev'), - // 'tabindex' => 'Number', - // 'type' => 'ContentType', - ) - ); - $a->formatting = true; - $a->excludes = array('a' => true); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Hypertext Module, defines hypertext links. Core Module. + */ +class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Hypertext'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $a = $this->addElement( + 'a', + 'Inline', + 'Inline', + 'Common', + array( + // 'accesskey' => 'Character', + // 'charset' => 'Charset', + 'href' => 'URI', + // 'hreflang' => 'LanguageCode', + 'rel' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rel'), + 'rev' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rev'), + // 'tabindex' => 'Number', + // 'type' => 'ContentType', + ) + ); + $a->formatting = true; + $a->excludes = array('a' => true); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Iframe.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Iframe.php new file mode 100644 index 0000000000000000000000000000000000000000..2c9bdc5803803f8e267a49467b939136d6c8da0c --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Iframe.php @@ -0,0 +1,51 @@ +<?php + +/** + * XHTML 1.1 Iframe Module provides inline frames. + * + * @note This module is not considered safe unless an Iframe + * whitelisting mechanism is specified. Currently, the only + * such mechanism is %URL.SafeIframeRegexp + */ +class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Iframe'; + + /** + * @type bool + */ + public $safe = false; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + if ($config->get('HTML.SafeIframe')) { + $this->safe = true; + } + $this->addElement( + 'iframe', + 'Inline', + 'Flow', + 'Common', + array( + 'src' => 'URI#embedded', + 'width' => 'Length', + 'height' => 'Length', + 'name' => 'ID', + 'scrolling' => 'Enum#yes,no,auto', + 'frameborder' => 'Enum#0,1', + 'longdesc' => 'URI', + 'marginheight' => 'Pixels', + 'marginwidth' => 'Pixels', + ) + ); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Image.php similarity index 70% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Image.php index e6ed53aea21bb7eaed7fafef49a5776b4c6bbf73..0ed7411e7f6416645d2c0f7c5c1e43e6720e3d82 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Image.php @@ -1,40 +1,49 @@ -<?php - -/** - * XHTML 1.1 Image Module provides basic image embedding. - * @note There is specialized code for removing empty images in - * HTMLPurifier_Strategy_RemoveForeignElements - */ -class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule -{ - - public $name = 'Image'; - - public function setup($config) { - $max = $config->get('HTML', 'MaxImgLength'); - $img = $this->addElement( - 'img', 'Inline', 'Empty', 'Common', - array( - 'alt*' => 'Text', - // According to the spec, it's Length, but percents can - // be abused, so we allow only Pixels. - 'height' => 'Pixels#' . $max, - 'width' => 'Pixels#' . $max, - 'longdesc' => 'URI', - 'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded - ) - ); - if ($max === null || $config->get('HTML', 'Trusted')) { - $img->attr['height'] = - $img->attr['width'] = 'Length'; - } - - // kind of strange, but splitting things up would be inefficient - $img->attr_transform_pre[] = - $img->attr_transform_post[] = - new HTMLPurifier_AttrTransform_ImgRequired(); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Image Module provides basic image embedding. + * @note There is specialized code for removing empty images in + * HTMLPurifier_Strategy_RemoveForeignElements + */ +class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Image'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $max = $config->get('HTML.MaxImgLength'); + $img = $this->addElement( + 'img', + 'Inline', + 'Empty', + 'Common', + array( + 'alt*' => 'Text', + // According to the spec, it's Length, but percents can + // be abused, so we allow only Pixels. + 'height' => 'Pixels#' . $max, + 'width' => 'Pixels#' . $max, + 'longdesc' => 'URI', + 'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded + ) + ); + if ($max === null || $config->get('HTML.Trusted')) { + $img->attr['height'] = + $img->attr['width'] = 'Length'; + } + + // kind of strange, but splitting things up would be inefficient + $img->attr_transform_pre[] = + $img->attr_transform_post[] = + new HTMLPurifier_AttrTransform_ImgRequired(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Legacy.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Legacy.php index df33927ba6b27d6e7f0151545bd3a9cda929eb60..9ca1cb3756993d18abb48e7a714b5a4ca07ba9cb 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Legacy.php @@ -1,143 +1,186 @@ -<?php - -/** - * XHTML 1.1 Legacy module defines elements that were previously - * deprecated. - * - * @note Not all legacy elements have been implemented yet, which - * is a bit of a reverse problem as compared to browsers! In - * addition, this legacy module may implement a bit more than - * mandated by XHTML 1.1. - * - * This module can be used in combination with TransformToStrict in order - * to transform as many deprecated elements as possible, but retain - * questionably deprecated elements that do not have good alternatives - * as well as transform elements that don't have an implementation. - * See docs/ref-strictness.txt for more details. - */ - -class HTMLPurifier_HTMLModule_Legacy extends HTMLPurifier_HTMLModule -{ - - public $name = 'Legacy'; - - public function setup($config) { - - $this->addElement('basefont', 'Inline', 'Empty', false, array( - 'color' => 'Color', - 'face' => 'Text', // extremely broad, we should - 'size' => 'Text', // tighten it - 'id' => 'ID' - )); - $this->addElement('center', 'Block', 'Flow', 'Common'); - $this->addElement('dir', 'Block', 'Required: li', 'Common', array( - 'compact' => 'Bool#compact' - )); - $this->addElement('font', 'Inline', 'Inline', array('Core', 'I18N'), array( - 'color' => 'Color', - 'face' => 'Text', // extremely broad, we should - 'size' => 'Text', // tighten it - )); - $this->addElement('menu', 'Block', 'Required: li', 'Common', array( - 'compact' => 'Bool#compact' - )); - - $s = $this->addElement('s', 'Inline', 'Inline', 'Common'); - $s->formatting = true; - - $strike = $this->addElement('strike', 'Inline', 'Inline', 'Common'); - $strike->formatting = true; - - $u = $this->addElement('u', 'Inline', 'Inline', 'Common'); - $u->formatting = true; - - // setup modifications to old elements - - $align = 'Enum#left,right,center,justify'; - - $address = $this->addBlankElement('address'); - $address->content_model = 'Inline | #PCDATA | p'; - $address->content_model_type = 'optional'; - $address->child = false; - - $blockquote = $this->addBlankElement('blockquote'); - $blockquote->content_model = 'Flow | #PCDATA'; - $blockquote->content_model_type = 'optional'; - $blockquote->child = false; - - $br = $this->addBlankElement('br'); - $br->attr['clear'] = 'Enum#left,all,right,none'; - - $caption = $this->addBlankElement('caption'); - $caption->attr['align'] = 'Enum#top,bottom,left,right'; - - $div = $this->addBlankElement('div'); - $div->attr['align'] = $align; - - $dl = $this->addBlankElement('dl'); - $dl->attr['compact'] = 'Bool#compact'; - - for ($i = 1; $i <= 6; $i++) { - $h = $this->addBlankElement("h$i"); - $h->attr['align'] = $align; - } - - $hr = $this->addBlankElement('hr'); - $hr->attr['align'] = $align; - $hr->attr['noshade'] = 'Bool#noshade'; - $hr->attr['size'] = 'Pixels'; - $hr->attr['width'] = 'Length'; - - $img = $this->addBlankElement('img'); - $img->attr['align'] = 'Enum#top,middle,bottom,left,right'; - $img->attr['border'] = 'Pixels'; - $img->attr['hspace'] = 'Pixels'; - $img->attr['vspace'] = 'Pixels'; - - // figure out this integer business - - $li = $this->addBlankElement('li'); - $li->attr['value'] = new HTMLPurifier_AttrDef_Integer(); - $li->attr['type'] = 'Enum#s:1,i,I,a,A,disc,square,circle'; - - $ol = $this->addBlankElement('ol'); - $ol->attr['compact'] = 'Bool#compact'; - $ol->attr['start'] = new HTMLPurifier_AttrDef_Integer(); - $ol->attr['type'] = 'Enum#s:1,i,I,a,A'; - - $p = $this->addBlankElement('p'); - $p->attr['align'] = $align; - - $pre = $this->addBlankElement('pre'); - $pre->attr['width'] = 'Number'; - - // script omitted - - $table = $this->addBlankElement('table'); - $table->attr['align'] = 'Enum#left,center,right'; - $table->attr['bgcolor'] = 'Color'; - - $tr = $this->addBlankElement('tr'); - $tr->attr['bgcolor'] = 'Color'; - - $th = $this->addBlankElement('th'); - $th->attr['bgcolor'] = 'Color'; - $th->attr['height'] = 'Length'; - $th->attr['nowrap'] = 'Bool#nowrap'; - $th->attr['width'] = 'Length'; - - $td = $this->addBlankElement('td'); - $td->attr['bgcolor'] = 'Color'; - $td->attr['height'] = 'Length'; - $td->attr['nowrap'] = 'Bool#nowrap'; - $td->attr['width'] = 'Length'; - - $ul = $this->addBlankElement('ul'); - $ul->attr['compact'] = 'Bool#compact'; - $ul->attr['type'] = 'Enum#square,disc,circle'; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Legacy module defines elements that were previously + * deprecated. + * + * @note Not all legacy elements have been implemented yet, which + * is a bit of a reverse problem as compared to browsers! In + * addition, this legacy module may implement a bit more than + * mandated by XHTML 1.1. + * + * This module can be used in combination with TransformToStrict in order + * to transform as many deprecated elements as possible, but retain + * questionably deprecated elements that do not have good alternatives + * as well as transform elements that don't have an implementation. + * See docs/ref-strictness.txt for more details. + */ + +class HTMLPurifier_HTMLModule_Legacy extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Legacy'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement( + 'basefont', + 'Inline', + 'Empty', + null, + array( + 'color' => 'Color', + 'face' => 'Text', // extremely broad, we should + 'size' => 'Text', // tighten it + 'id' => 'ID' + ) + ); + $this->addElement('center', 'Block', 'Flow', 'Common'); + $this->addElement( + 'dir', + 'Block', + 'Required: li', + 'Common', + array( + 'compact' => 'Bool#compact' + ) + ); + $this->addElement( + 'font', + 'Inline', + 'Inline', + array('Core', 'I18N'), + array( + 'color' => 'Color', + 'face' => 'Text', // extremely broad, we should + 'size' => 'Text', // tighten it + ) + ); + $this->addElement( + 'menu', + 'Block', + 'Required: li', + 'Common', + array( + 'compact' => 'Bool#compact' + ) + ); + + $s = $this->addElement('s', 'Inline', 'Inline', 'Common'); + $s->formatting = true; + + $strike = $this->addElement('strike', 'Inline', 'Inline', 'Common'); + $strike->formatting = true; + + $u = $this->addElement('u', 'Inline', 'Inline', 'Common'); + $u->formatting = true; + + // setup modifications to old elements + + $align = 'Enum#left,right,center,justify'; + + $address = $this->addBlankElement('address'); + $address->content_model = 'Inline | #PCDATA | p'; + $address->content_model_type = 'optional'; + $address->child = false; + + $blockquote = $this->addBlankElement('blockquote'); + $blockquote->content_model = 'Flow | #PCDATA'; + $blockquote->content_model_type = 'optional'; + $blockquote->child = false; + + $br = $this->addBlankElement('br'); + $br->attr['clear'] = 'Enum#left,all,right,none'; + + $caption = $this->addBlankElement('caption'); + $caption->attr['align'] = 'Enum#top,bottom,left,right'; + + $div = $this->addBlankElement('div'); + $div->attr['align'] = $align; + + $dl = $this->addBlankElement('dl'); + $dl->attr['compact'] = 'Bool#compact'; + + for ($i = 1; $i <= 6; $i++) { + $h = $this->addBlankElement("h$i"); + $h->attr['align'] = $align; + } + + $hr = $this->addBlankElement('hr'); + $hr->attr['align'] = $align; + $hr->attr['noshade'] = 'Bool#noshade'; + $hr->attr['size'] = 'Pixels'; + $hr->attr['width'] = 'Length'; + + $img = $this->addBlankElement('img'); + $img->attr['align'] = 'IAlign'; + $img->attr['border'] = 'Pixels'; + $img->attr['hspace'] = 'Pixels'; + $img->attr['vspace'] = 'Pixels'; + + // figure out this integer business + + $li = $this->addBlankElement('li'); + $li->attr['value'] = new HTMLPurifier_AttrDef_Integer(); + $li->attr['type'] = 'Enum#s:1,i,I,a,A,disc,square,circle'; + + $ol = $this->addBlankElement('ol'); + $ol->attr['compact'] = 'Bool#compact'; + $ol->attr['start'] = new HTMLPurifier_AttrDef_Integer(); + $ol->attr['type'] = 'Enum#s:1,i,I,a,A'; + + $p = $this->addBlankElement('p'); + $p->attr['align'] = $align; + + $pre = $this->addBlankElement('pre'); + $pre->attr['width'] = 'Number'; + + // script omitted + + $table = $this->addBlankElement('table'); + $table->attr['align'] = 'Enum#left,center,right'; + $table->attr['bgcolor'] = 'Color'; + + $tr = $this->addBlankElement('tr'); + $tr->attr['bgcolor'] = 'Color'; + + $th = $this->addBlankElement('th'); + $th->attr['bgcolor'] = 'Color'; + $th->attr['height'] = 'Length'; + $th->attr['nowrap'] = 'Bool#nowrap'; + $th->attr['width'] = 'Length'; + + $td = $this->addBlankElement('td'); + $td->attr['bgcolor'] = 'Color'; + $td->attr['height'] = 'Length'; + $td->attr['nowrap'] = 'Bool#nowrap'; + $td->attr['width'] = 'Length'; + + $ul = $this->addBlankElement('ul'); + $ul->attr['compact'] = 'Bool#compact'; + $ul->attr['type'] = 'Enum#square,disc,circle'; + + // "safe" modifications to "unsafe" elements + // WARNING: If you want to add support for an unsafe, legacy + // attribute, make a new TrustedLegacy module with the trusted + // bit set appropriately + + $form = $this->addBlankElement('form'); + $form->content_model = 'Flow | #PCDATA'; + $form->content_model_type = 'optional'; + $form->attr['target'] = 'FrameTarget'; + + $input = $this->addBlankElement('input'); + $input->attr['align'] = 'IAlign'; + + $legend = $this->addBlankElement('legend'); + $legend->attr['align'] = 'LAlign'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/List.php similarity index 55% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/List.php index 1d15f27293df88085fda3e9ef8aba988bfa25c18..605e37c97aa1ee546f080194f4946a75ee93a964 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/List.php @@ -1,35 +1,51 @@ -<?php - -/** - * XHTML 1.1 List Module, defines list-oriented elements. Core Module. - */ -class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule -{ - - public $name = 'List'; - - // According to the abstract schema, the List content set is a fully formed - // one or more expr, but it invariably occurs in an optional declaration - // so we're not going to do that subtlety. It might cause trouble - // if a user defines "List" and expects that multiple lists are - // allowed to be specified, but then again, that's not very intuitive. - // Furthermore, the actual XML Schema may disagree. Regardless, - // we don't have support for such nested expressions without using - // the incredibly inefficient and draconic Custom ChildDef. - - public $content_sets = array('Flow' => 'List'); - - public function setup($config) { - $this->addElement('ol', 'List', 'Required: li', 'Common'); - $this->addElement('ul', 'List', 'Required: li', 'Common'); - $this->addElement('dl', 'List', 'Required: dt | dd', 'Common'); - - $this->addElement('li', false, 'Flow', 'Common'); - - $this->addElement('dd', false, 'Flow', 'Common'); - $this->addElement('dt', false, 'Inline', 'Common'); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 List Module, defines list-oriented elements. Core Module. + */ +class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'List'; + + // According to the abstract schema, the List content set is a fully formed + // one or more expr, but it invariably occurs in an optional declaration + // so we're not going to do that subtlety. It might cause trouble + // if a user defines "List" and expects that multiple lists are + // allowed to be specified, but then again, that's not very intuitive. + // Furthermore, the actual XML Schema may disagree. Regardless, + // we don't have support for such nested expressions without using + // the incredibly inefficient and draconic Custom ChildDef. + + /** + * @type array + */ + public $content_sets = array('Flow' => 'List'); + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $ol = $this->addElement('ol', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); + $ul = $this->addElement('ul', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); + // XXX The wrap attribute is handled by MakeWellFormed. This is all + // quite unsatisfactory, because we generated this + // *specifically* for lists, and now a big chunk of the handling + // is done properly by the List ChildDef. So actually, we just + // want enough information to make autoclosing work properly, + // and then hand off the tricky stuff to the ChildDef. + $ol->wrap = 'li'; + $ul->wrap = 'li'; + $this->addElement('dl', 'List', 'Required: dt | dd', 'Common'); + + $this->addElement('li', false, 'Flow', 'Common'); + + $this->addElement('dd', false, 'Flow', 'Common'); + $this->addElement('dt', false, 'Inline', 'Common'); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Name.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Name.php new file mode 100644 index 0000000000000000000000000000000000000000..315e22a8033600c7b604631a7cd804703bba9c34 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Name.php @@ -0,0 +1,26 @@ +<?php + +class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Name'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map'); + foreach ($elements as $name) { + $element = $this->addBlankElement($name); + $element->attr['name'] = 'CDATA'; + if (!$config->get('HTML.Attr.Name.UseCDATA')) { + $element->attr_transform_post[] = new HTMLPurifier_AttrTransform_NameSync(); + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Nofollow.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Nofollow.php new file mode 100644 index 0000000000000000000000000000000000000000..c145e8e96953b92443425b03721250f9025f2127 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Nofollow.php @@ -0,0 +1,25 @@ +<?php + +/** + * Module adds the nofollow attribute transformation to a tags. It + * is enabled by HTML.Nofollow + */ +class HTMLPurifier_HTMLModule_Nofollow extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Nofollow'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $a = $this->addBlankElement('a'); + $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_Nofollow(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php index 5f1b14abb8a572f84614429a3020aefff1f6f718..7d66e114f2b70bf7b904ba5f4972890907f44dea 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php @@ -1,14 +1,20 @@ -<?php - -class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifier_HTMLModule -{ - public $name = 'NonXMLCommonAttributes'; - - public $attr_collections = array( - 'Lang' => array( - 'lang' => 'LanguageCode', - ) - ); -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'NonXMLCommonAttributes'; + + /** + * @type array + */ + public $attr_collections = array( + 'Lang' => array( + 'lang' => 'LanguageCode', + ) + ); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Object.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Object.php index 193c1011f84e532adb1ae4da33b039c43157a2c0..d388b24c7f51a097fed042f14376ae02e528e4d5 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Object.php @@ -1,47 +1,62 @@ -<?php - -/** - * XHTML 1.1 Object Module, defines elements for generic object inclusion - * @warning Users will commonly use <embed> to cater to legacy browsers: this - * module does not allow this sort of behavior - */ -class HTMLPurifier_HTMLModule_Object extends HTMLPurifier_HTMLModule -{ - - public $name = 'Object'; - public $safe = false; - - public function setup($config) { - - $this->addElement('object', 'Inline', 'Optional: #PCDATA | Flow | param', 'Common', - array( - 'archive' => 'URI', - 'classid' => 'URI', - 'codebase' => 'URI', - 'codetype' => 'Text', - 'data' => 'URI', - 'declare' => 'Bool#declare', - 'height' => 'Length', - 'name' => 'CDATA', - 'standby' => 'Text', - 'tabindex' => 'Number', - 'type' => 'ContentType', - 'width' => 'Length' - ) - ); - - $this->addElement('param', false, 'Empty', false, - array( - 'id' => 'ID', - 'name*' => 'Text', - 'type' => 'Text', - 'value' => 'Text', - 'valuetype' => 'Enum#data,ref,object' - ) - ); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Object Module, defines elements for generic object inclusion + * @warning Users will commonly use <embed> to cater to legacy browsers: this + * module does not allow this sort of behavior + */ +class HTMLPurifier_HTMLModule_Object extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Object'; + + /** + * @type bool + */ + public $safe = false; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement( + 'object', + 'Inline', + 'Optional: #PCDATA | Flow | param', + 'Common', + array( + 'archive' => 'URI', + 'classid' => 'URI', + 'codebase' => 'URI', + 'codetype' => 'Text', + 'data' => 'URI', + 'declare' => 'Bool#declare', + 'height' => 'Length', + 'name' => 'CDATA', + 'standby' => 'Text', + 'tabindex' => 'Number', + 'type' => 'ContentType', + 'width' => 'Length' + ) + ); + + $this->addElement( + 'param', + false, + 'Empty', + null, + array( + 'id' => 'ID', + 'name*' => 'Text', + 'type' => 'Text', + 'value' => 'Text', + 'valuetype' => 'Enum#data,ref,object' + ) + ); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Presentation.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Presentation.php index 8ff0b5ed7848e9872354e53ddb05d44d74f2713d..831db4cfff0629f0b2a04e3e71d8e2e2d2f2e66f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Presentation.php @@ -1,36 +1,42 @@ -<?php - -/** - * XHTML 1.1 Presentation Module, defines simple presentation-related - * markup. Text Extension Module. - * @note The official XML Schema and DTD specs further divide this into - * two modules: - * - Block Presentation (hr) - * - Inline Presentation (b, big, i, small, sub, sup, tt) - * We have chosen not to heed this distinction, as content_sets - * provides satisfactory disambiguation. - */ -class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule -{ - - public $name = 'Presentation'; - - public function setup($config) { - $this->addElement('hr', 'Block', 'Empty', 'Common'); - $this->addElement('sub', 'Inline', 'Inline', 'Common'); - $this->addElement('sup', 'Inline', 'Inline', 'Common'); - $b = $this->addElement('b', 'Inline', 'Inline', 'Common'); - $b->formatting = true; - $big = $this->addElement('big', 'Inline', 'Inline', 'Common'); - $big->formatting = true; - $i = $this->addElement('i', 'Inline', 'Inline', 'Common'); - $i->formatting = true; - $small = $this->addElement('small', 'Inline', 'Inline', 'Common'); - $small->formatting = true; - $tt = $this->addElement('tt', 'Inline', 'Inline', 'Common'); - $tt->formatting = true; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Presentation Module, defines simple presentation-related + * markup. Text Extension Module. + * @note The official XML Schema and DTD specs further divide this into + * two modules: + * - Block Presentation (hr) + * - Inline Presentation (b, big, i, small, sub, sup, tt) + * We have chosen not to heed this distinction, as content_sets + * provides satisfactory disambiguation. + */ +class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Presentation'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement('hr', 'Block', 'Empty', 'Common'); + $this->addElement('sub', 'Inline', 'Inline', 'Common'); + $this->addElement('sup', 'Inline', 'Inline', 'Common'); + $b = $this->addElement('b', 'Inline', 'Inline', 'Common'); + $b->formatting = true; + $big = $this->addElement('big', 'Inline', 'Inline', 'Common'); + $big->formatting = true; + $i = $this->addElement('i', 'Inline', 'Inline', 'Common'); + $i->formatting = true; + $small = $this->addElement('small', 'Inline', 'Inline', 'Common'); + $small->formatting = true; + $tt = $this->addElement('tt', 'Inline', 'Inline', 'Common'); + $tt->formatting = true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Proprietary.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Proprietary.php index dd36a3de0efc0d45f36dd5d9f3868f487b5d1cc5..4593fc40f3f62ab9bf2a75d4a3702c13545963ae 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Proprietary.php @@ -1,33 +1,40 @@ -<?php - -/** - * Module defines proprietary tags and attributes in HTML. - * @warning If this module is enabled, standards-compliance is off! - */ -class HTMLPurifier_HTMLModule_Proprietary extends HTMLPurifier_HTMLModule -{ - - public $name = 'Proprietary'; - - public function setup($config) { - - $this->addElement('marquee', 'Inline', 'Flow', 'Common', - array( - 'direction' => 'Enum#left,right,up,down', - 'behavior' => 'Enum#alternate', - 'width' => 'Length', - 'height' => 'Length', - 'scrolldelay' => 'Number', - 'scrollamount' => 'Number', - 'loop' => 'Number', - 'bgcolor' => 'Color', - 'hspace' => 'Pixels', - 'vspace' => 'Pixels', - ) - ); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Module defines proprietary tags and attributes in HTML. + * @warning If this module is enabled, standards-compliance is off! + */ +class HTMLPurifier_HTMLModule_Proprietary extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Proprietary'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement( + 'marquee', + 'Inline', + 'Flow', + 'Common', + array( + 'direction' => 'Enum#left,right,up,down', + 'behavior' => 'Enum#alternate', + 'width' => 'Length', + 'height' => 'Length', + 'scrolldelay' => 'Number', + 'scrollamount' => 'Number', + 'loop' => 'Number', + 'bgcolor' => 'Color', + 'hspace' => 'Pixels', + 'vspace' => 'Pixels', + ) + ); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Ruby.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Ruby.php index b26a0a30a0e1f4c3fefcddd457231d1ee1f164f0..9a2617296ac4fbbb41c64d58e0848593f3d92db5 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Ruby.php @@ -1,27 +1,36 @@ -<?php - -/** - * XHTML 1.1 Ruby Annotation Module, defines elements that indicate - * short runs of text alongside base text for annotation or pronounciation. - */ -class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule -{ - - public $name = 'Ruby'; - - public function setup($config) { - $this->addElement('ruby', 'Inline', - 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', - 'Common'); - $this->addElement('rbc', false, 'Required: rb', 'Common'); - $this->addElement('rtc', false, 'Required: rt', 'Common'); - $rb = $this->addElement('rb', false, 'Inline', 'Common'); - $rb->excludes = array('ruby' => true); - $rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number')); - $rt->excludes = array('ruby' => true); - $this->addElement('rp', false, 'Optional: #PCDATA', 'Common'); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Ruby Annotation Module, defines elements that indicate + * short runs of text alongside base text for annotation or pronounciation. + */ +class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule +{ + + /** + * @type string + */ + public $name = 'Ruby'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement( + 'ruby', + 'Inline', + 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', + 'Common' + ); + $this->addElement('rbc', false, 'Required: rb', 'Common'); + $this->addElement('rtc', false, 'Required: rt', 'Common'); + $rb = $this->addElement('rb', false, 'Inline', 'Common'); + $rb->excludes = array('ruby' => true); + $rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number')); + $rt->excludes = array('ruby' => true); + $this->addElement('rp', false, 'Optional: #PCDATA', 'Common'); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeEmbed.php similarity index 63% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeEmbed.php index 635e8f2d2b94066863d9446f5224f02cd8fbec9a..11572887dad00a549cbd6cfb1f1fe935711ce261 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeEmbed.php @@ -1,33 +1,40 @@ -<?php - -/** - * A "safe" embed module. See SafeObject. This is a proprietary element. - */ -class HTMLPurifier_HTMLModule_SafeEmbed extends HTMLPurifier_HTMLModule -{ - - public $name = 'SafeEmbed'; - - public function setup($config) { - - $max = $config->get('HTML', 'MaxImgLength'); - $embed = $this->addElement( - 'embed', 'Inline', 'Empty', 'Common', - array( - 'src*' => 'URI#embedded', - 'type' => 'Enum#application/x-shockwave-flash', - 'width' => 'Pixels#' . $max, - 'height' => 'Pixels#' . $max, - 'allowscriptaccess' => 'Enum#never', - 'allownetworking' => 'Enum#internal', - 'wmode' => 'Enum#window', - 'name' => 'ID', - ) - ); - $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed(); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * A "safe" embed module. See SafeObject. This is a proprietary element. + */ +class HTMLPurifier_HTMLModule_SafeEmbed extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'SafeEmbed'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $max = $config->get('HTML.MaxImgLength'); + $embed = $this->addElement( + 'embed', + 'Inline', + 'Empty', + 'Common', + array( + 'src*' => 'URI#embedded', + 'type' => 'Enum#application/x-shockwave-flash', + 'width' => 'Pixels#' . $max, + 'height' => 'Pixels#' . $max, + 'allowscriptaccess' => 'Enum#never', + 'allownetworking' => 'Enum#internal', + 'flashvars' => 'Text', + 'wmode' => 'Enum#window,transparent,opaque', + 'name' => 'ID', + ) + ); + $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeObject.php similarity index 62% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeObject.php index bbda7a2147e0c1e7ed86e9cf664812a1c93f1603..a061cec1520e338670ffe68fcc2f7ad334af6492 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeObject.php @@ -1,50 +1,62 @@ -<?php - -/** - * A "safe" object module. In theory, objects permitted by this module will - * be safe, and untrusted users can be allowed to embed arbitrary flash objects - * (maybe other types too, but only Flash is supported as of right now). - * Highly experimental. - */ -class HTMLPurifier_HTMLModule_SafeObject extends HTMLPurifier_HTMLModule -{ - - public $name = 'SafeObject'; - - public function setup($config) { - - // These definitions are not intrinsically safe: the attribute transforms - // are a vital part of ensuring safety. - - $max = $config->get('HTML', 'MaxImgLength'); - $object = $this->addElement( - 'object', - 'Inline', - 'Optional: param | Flow | #PCDATA', - 'Common', - array( - // While technically not required by the spec, we're forcing - // it to this value. - 'type' => 'Enum#application/x-shockwave-flash', - 'width' => 'Pixels#' . $max, - 'height' => 'Pixels#' . $max, - 'data' => 'URI#embedded' - ) - ); - $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject(); - - $param = $this->addElement('param', false, 'Empty', false, - array( - 'id' => 'ID', - 'name*' => 'Text', - 'value' => 'Text' - ) - ); - $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam(); - $this->info_injector[] = 'SafeObject'; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * A "safe" object module. In theory, objects permitted by this module will + * be safe, and untrusted users can be allowed to embed arbitrary flash objects + * (maybe other types too, but only Flash is supported as of right now). + * Highly experimental. + */ +class HTMLPurifier_HTMLModule_SafeObject extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'SafeObject'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + // These definitions are not intrinsically safe: the attribute transforms + // are a vital part of ensuring safety. + + $max = $config->get('HTML.MaxImgLength'); + $object = $this->addElement( + 'object', + 'Inline', + 'Optional: param | Flow | #PCDATA', + 'Common', + array( + // While technically not required by the spec, we're forcing + // it to this value. + 'type' => 'Enum#application/x-shockwave-flash', + 'width' => 'Pixels#' . $max, + 'height' => 'Pixels#' . $max, + 'data' => 'URI#embedded', + 'codebase' => new HTMLPurifier_AttrDef_Enum( + array( + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' + ) + ), + ) + ); + $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject(); + + $param = $this->addElement( + 'param', + false, + 'Empty', + false, + array( + 'id' => 'ID', + 'name*' => 'Text', + 'value' => 'Text' + ) + ); + $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam(); + $this->info_injector[] = 'SafeObject'; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeScripting.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeScripting.php new file mode 100644 index 0000000000000000000000000000000000000000..6e9113cb59cf2833b3d38fded099a2b4cb051c4b --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/SafeScripting.php @@ -0,0 +1,40 @@ +<?php + +/** + * A "safe" script module. No inline JS is allowed, and pointed to JS + * files must match whitelist. + */ +class HTMLPurifier_HTMLModule_SafeScripting extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'SafeScripting'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + // These definitions are not intrinsically safe: the attribute transforms + // are a vital part of ensuring safety. + + $allowed = $config->get('HTML.SafeScripting'); + $script = $this->addElement( + 'script', + 'Inline', + 'Empty', + null, + array( + // While technically not required by the spec, we're forcing + // it to this value. + 'type' => 'Enum#text/javascript', + 'src*' => new HTMLPurifier_AttrDef_Enum(array_keys($allowed)) + ) + ); + $script->attr_transform_pre[] = + $script->attr_transform_post[] = new HTMLPurifier_AttrTransform_ScriptRequired(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Scripting.php similarity index 73% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Scripting.php index cecdea6c30a88a5d6e5556fdbf450705c434f09d..18785372a7f805b8c92d831ba222089e492f1156 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Scripting.php @@ -1,54 +1,73 @@ -<?php - -/* - -WARNING: THIS MODULE IS EXTREMELY DANGEROUS AS IT ENABLES INLINE SCRIPTING -INSIDE HTML PURIFIER DOCUMENTS. USE ONLY WITH TRUSTED USER INPUT!!! - -*/ - -/** - * XHTML 1.1 Scripting module, defines elements that are used to contain - * information pertaining to executable scripts or the lack of support - * for executable scripts. - * @note This module does not contain inline scripting elements - */ -class HTMLPurifier_HTMLModule_Scripting extends HTMLPurifier_HTMLModule -{ - public $name = 'Scripting'; - public $elements = array('script', 'noscript'); - public $content_sets = array('Block' => 'script | noscript', 'Inline' => 'script | noscript'); - public $safe = false; - - public function setup($config) { - // TODO: create custom child-definition for noscript that - // auto-wraps stray #PCDATA in a similar manner to - // blockquote's custom definition (we would use it but - // blockquote's contents are optional while noscript's contents - // are required) - - // TODO: convert this to new syntax, main problem is getting - // both content sets working - - // In theory, this could be safe, but I don't see any reason to - // allow it. - $this->info['noscript'] = new HTMLPurifier_ElementDef(); - $this->info['noscript']->attr = array( 0 => array('Common') ); - $this->info['noscript']->content_model = 'Heading | List | Block'; - $this->info['noscript']->content_model_type = 'required'; - - $this->info['script'] = new HTMLPurifier_ElementDef(); - $this->info['script']->attr = array( - 'defer' => new HTMLPurifier_AttrDef_Enum(array('defer')), - 'src' => new HTMLPurifier_AttrDef_URI(true), - 'type' => new HTMLPurifier_AttrDef_Enum(array('text/javascript')) - ); - $this->info['script']->content_model = '#PCDATA'; - $this->info['script']->content_model_type = 'optional'; - $this->info['script']->attr_transform_pre['type'] = - $this->info['script']->attr_transform_post['type'] = - new HTMLPurifier_AttrTransform_ScriptRequired(); - } -} - -// vim: et sw=4 sts=4 +<?php + +/* + +WARNING: THIS MODULE IS EXTREMELY DANGEROUS AS IT ENABLES INLINE SCRIPTING +INSIDE HTML PURIFIER DOCUMENTS. USE ONLY WITH TRUSTED USER INPUT!!! + +*/ + +/** + * XHTML 1.1 Scripting module, defines elements that are used to contain + * information pertaining to executable scripts or the lack of support + * for executable scripts. + * @note This module does not contain inline scripting elements + */ +class HTMLPurifier_HTMLModule_Scripting extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Scripting'; + + /** + * @type array + */ + public $elements = array('script', 'noscript'); + + /** + * @type array + */ + public $content_sets = array('Block' => 'script | noscript', 'Inline' => 'script | noscript'); + + /** + * @type bool + */ + public $safe = false; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + // TODO: create custom child-definition for noscript that + // auto-wraps stray #PCDATA in a similar manner to + // blockquote's custom definition (we would use it but + // blockquote's contents are optional while noscript's contents + // are required) + + // TODO: convert this to new syntax, main problem is getting + // both content sets working + + // In theory, this could be safe, but I don't see any reason to + // allow it. + $this->info['noscript'] = new HTMLPurifier_ElementDef(); + $this->info['noscript']->attr = array(0 => array('Common')); + $this->info['noscript']->content_model = 'Heading | List | Block'; + $this->info['noscript']->content_model_type = 'required'; + + $this->info['script'] = new HTMLPurifier_ElementDef(); + $this->info['script']->attr = array( + 'defer' => new HTMLPurifier_AttrDef_Enum(array('defer')), + 'src' => new HTMLPurifier_AttrDef_URI(true), + 'type' => new HTMLPurifier_AttrDef_Enum(array('text/javascript')) + ); + $this->info['script']->content_model = '#PCDATA'; + $this->info['script']->content_model_type = 'optional'; + $this->info['script']->attr_transform_pre[] = + $this->info['script']->attr_transform_post[] = + new HTMLPurifier_AttrTransform_ScriptRequired(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/StyleAttribute.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/StyleAttribute.php index eb78464cc0d6ae1450b1f5c9edc3f9844a6b9f8d..f192780a0049781d793b36893f929a25fc282eba 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/StyleAttribute.php @@ -1,24 +1,33 @@ -<?php - -/** - * XHTML 1.1 Edit Module, defines editing-related elements. Text Extension - * Module. - */ -class HTMLPurifier_HTMLModule_StyleAttribute extends HTMLPurifier_HTMLModule -{ - - public $name = 'StyleAttribute'; - public $attr_collections = array( - // The inclusion routine differs from the Abstract Modules but - // is in line with the DTD and XML Schemas. - 'Style' => array('style' => false), // see constructor - 'Core' => array(0 => array('Style')) - ); - - public function setup($config) { - $this->attr_collections['Style']['style'] = new HTMLPurifier_AttrDef_CSS(); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Edit Module, defines editing-related elements. Text Extension + * Module. + */ +class HTMLPurifier_HTMLModule_StyleAttribute extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'StyleAttribute'; + + /** + * @type array + */ + public $attr_collections = array( + // The inclusion routine differs from the Abstract Modules but + // is in line with the DTD and XML Schemas. + 'Style' => array('style' => false), // see constructor + 'Core' => array(0 => array('Style')) + ); + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->attr_collections['Style']['style'] = new HTMLPurifier_AttrDef_CSS(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tables.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tables.php index f314ced3f82ea6e36346d057f6404252b78c74f1..f993e3ca1f4090ee28413849e1969ba961d18576 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tables.php @@ -1,66 +1,75 @@ -<?php - -/** - * XHTML 1.1 Tables Module, fully defines accessible table elements. - */ -class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule -{ - - public $name = 'Tables'; - - public function setup($config) { - - $this->addElement('caption', false, 'Inline', 'Common'); - - $this->addElement('table', 'Block', - new HTMLPurifier_ChildDef_Table(), 'Common', - array( - 'border' => 'Pixels', - 'cellpadding' => 'Length', - 'cellspacing' => 'Length', - 'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border', - 'rules' => 'Enum#none,groups,rows,cols,all', - 'summary' => 'Text', - 'width' => 'Length' - ) - ); - - // common attributes - $cell_align = array( - 'align' => 'Enum#left,center,right,justify,char', - 'charoff' => 'Length', - 'valign' => 'Enum#top,middle,bottom,baseline', - ); - - $cell_t = array_merge( - array( - 'abbr' => 'Text', - 'colspan' => 'Number', - 'rowspan' => 'Number', - ), - $cell_align - ); - $this->addElement('td', false, 'Flow', 'Common', $cell_t); - $this->addElement('th', false, 'Flow', 'Common', $cell_t); - - $this->addElement('tr', false, 'Required: td | th', 'Common', $cell_align); - - $cell_col = array_merge( - array( - 'span' => 'Number', - 'width' => 'MultiLength', - ), - $cell_align - ); - $this->addElement('col', false, 'Empty', 'Common', $cell_col); - $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col); - - $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align); - $this->addElement('thead', false, 'Required: tr', 'Common', $cell_align); - $this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Tables Module, fully defines accessible table elements. + */ +class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Tables'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->addElement('caption', false, 'Inline', 'Common'); + + $this->addElement( + 'table', + 'Block', + new HTMLPurifier_ChildDef_Table(), + 'Common', + array( + 'border' => 'Pixels', + 'cellpadding' => 'Length', + 'cellspacing' => 'Length', + 'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border', + 'rules' => 'Enum#none,groups,rows,cols,all', + 'summary' => 'Text', + 'width' => 'Length' + ) + ); + + // common attributes + $cell_align = array( + 'align' => 'Enum#left,center,right,justify,char', + 'charoff' => 'Length', + 'valign' => 'Enum#top,middle,bottom,baseline', + ); + + $cell_t = array_merge( + array( + 'abbr' => 'Text', + 'colspan' => 'Number', + 'rowspan' => 'Number', + // Apparently, as of HTML5 this attribute only applies + // to 'th' elements. + 'scope' => 'Enum#row,col,rowgroup,colgroup', + ), + $cell_align + ); + $this->addElement('td', false, 'Flow', 'Common', $cell_t); + $this->addElement('th', false, 'Flow', 'Common', $cell_t); + + $this->addElement('tr', false, 'Required: td | th', 'Common', $cell_align); + + $cell_col = array_merge( + array( + 'span' => 'Number', + 'width' => 'MultiLength', + ), + $cell_align + ); + $this->addElement('col', false, 'Empty', 'Common', $cell_col); + $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col); + + $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align); + $this->addElement('thead', false, 'Required: tr', 'Common', $cell_align); + $this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Target.php similarity index 74% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Target.php index 2b844ecc45dbe591d4019e93621ac8d2f68994a6..f3af048639a12518f7be93c31690bc7e0189c451 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Target.php @@ -1,23 +1,28 @@ -<?php - -/** - * XHTML 1.1 Target Module, defines target attribute in link elements. - */ -class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule -{ - - public $name = 'Target'; - - public function setup($config) { - $elements = array('a'); - foreach ($elements as $name) { - $e = $this->addBlankElement($name); - $e->attr = array( - 'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget() - ); - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Target Module, defines target attribute in link elements. + */ +class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Target'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $elements = array('a'); + foreach ($elements as $name) { + $e = $this->addBlankElement($name); + $e->attr = array( + 'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget() + ); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetBlank.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetBlank.php new file mode 100644 index 0000000000000000000000000000000000000000..757cddcda570b4b87abde4fc64d3b98fbb3956d4 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetBlank.php @@ -0,0 +1,24 @@ +<?php + +/** + * Module adds the target=blank attribute transformation to a tags. It + * is enabled by HTML.TargetBlank + */ +class HTMLPurifier_HTMLModule_TargetBlank extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'TargetBlank'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $a = $this->addBlankElement('a'); + $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoopener.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoopener.php new file mode 100644 index 0000000000000000000000000000000000000000..bc8e88d692cfb09749a559d33b6fe2fa8c5d1ee1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoopener.php @@ -0,0 +1,21 @@ +<?php + +/** + * Module adds the target-based noopener attribute transformation to a tags. It + * is enabled by HTML.TargetNoopener + */ +class HTMLPurifier_HTMLModule_TargetNoopener extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'TargetNoopener'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) { + $a = $this->addBlankElement('a'); + $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetNoopener(); + } +} diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php new file mode 100644 index 0000000000000000000000000000000000000000..9fa558c26ef70f4147bc7ca3a5121285469061f1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php @@ -0,0 +1,21 @@ +<?php + +/** + * Module adds the target-based noreferrer attribute transformation to a tags. It + * is enabled by HTML.TargetNoreferrer + */ +class HTMLPurifier_HTMLModule_TargetNoreferrer extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'TargetNoreferrer'; + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) { + $a = $this->addBlankElement('a'); + $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetNoreferrer(); + } +} diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Text.php similarity index 57% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Text.php index ae77c71886e09a10e5311eda78aeb718263c583b..11fdd8bd5ed623e26b79c383ed5a4dc011e20ad0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Text.php @@ -1,71 +1,87 @@ -<?php - -/** - * XHTML 1.1 Text Module, defines basic text containers. Core Module. - * @note In the normative XML Schema specification, this module - * is further abstracted into the following modules: - * - Block Phrasal (address, blockquote, pre, h1, h2, h3, h4, h5, h6) - * - Block Structural (div, p) - * - Inline Phrasal (abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var) - * - Inline Structural (br, span) - * This module, functionally, does not distinguish between these - * sub-modules, but the code is internally structured to reflect - * these distinctions. - */ -class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule -{ - - public $name = 'Text'; - public $content_sets = array( - 'Flow' => 'Heading | Block | Inline' - ); - - public function setup($config) { - - // Inline Phrasal ------------------------------------------------- - $this->addElement('abbr', 'Inline', 'Inline', 'Common'); - $this->addElement('acronym', 'Inline', 'Inline', 'Common'); - $this->addElement('cite', 'Inline', 'Inline', 'Common'); - $this->addElement('dfn', 'Inline', 'Inline', 'Common'); - $this->addElement('kbd', 'Inline', 'Inline', 'Common'); - $this->addElement('q', 'Inline', 'Inline', 'Common', array('cite' => 'URI')); - $this->addElement('samp', 'Inline', 'Inline', 'Common'); - $this->addElement('var', 'Inline', 'Inline', 'Common'); - - $em = $this->addElement('em', 'Inline', 'Inline', 'Common'); - $em->formatting = true; - - $strong = $this->addElement('strong', 'Inline', 'Inline', 'Common'); - $strong->formatting = true; - - $code = $this->addElement('code', 'Inline', 'Inline', 'Common'); - $code->formatting = true; - - // Inline Structural ---------------------------------------------- - $this->addElement('span', 'Inline', 'Inline', 'Common'); - $this->addElement('br', 'Inline', 'Empty', 'Core'); - - // Block Phrasal -------------------------------------------------- - $this->addElement('address', 'Block', 'Inline', 'Common'); - $this->addElement('blockquote', 'Block', 'Optional: Heading | Block | List', 'Common', array('cite' => 'URI') ); - $pre = $this->addElement('pre', 'Block', 'Inline', 'Common'); - $pre->excludes = $this->makeLookup( - 'img', 'big', 'small', 'object', 'applet', 'font', 'basefont' ); - $this->addElement('h1', 'Heading', 'Inline', 'Common'); - $this->addElement('h2', 'Heading', 'Inline', 'Common'); - $this->addElement('h3', 'Heading', 'Inline', 'Common'); - $this->addElement('h4', 'Heading', 'Inline', 'Common'); - $this->addElement('h5', 'Heading', 'Inline', 'Common'); - $this->addElement('h6', 'Heading', 'Inline', 'Common'); - - // Block Structural ----------------------------------------------- - $p = $this->addElement('p', 'Block', 'Inline', 'Common'); - $p->autoclose = array_flip(array("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "ol", "p", "ul")); - - $this->addElement('div', 'Block', 'Flow', 'Common'); - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * XHTML 1.1 Text Module, defines basic text containers. Core Module. + * @note In the normative XML Schema specification, this module + * is further abstracted into the following modules: + * - Block Phrasal (address, blockquote, pre, h1, h2, h3, h4, h5, h6) + * - Block Structural (div, p) + * - Inline Phrasal (abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var) + * - Inline Structural (br, span) + * This module, functionally, does not distinguish between these + * sub-modules, but the code is internally structured to reflect + * these distinctions. + */ +class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'Text'; + + /** + * @type array + */ + public $content_sets = array( + 'Flow' => 'Heading | Block | Inline' + ); + + /** + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + // Inline Phrasal ------------------------------------------------- + $this->addElement('abbr', 'Inline', 'Inline', 'Common'); + $this->addElement('acronym', 'Inline', 'Inline', 'Common'); + $this->addElement('cite', 'Inline', 'Inline', 'Common'); + $this->addElement('dfn', 'Inline', 'Inline', 'Common'); + $this->addElement('kbd', 'Inline', 'Inline', 'Common'); + $this->addElement('q', 'Inline', 'Inline', 'Common', array('cite' => 'URI')); + $this->addElement('samp', 'Inline', 'Inline', 'Common'); + $this->addElement('var', 'Inline', 'Inline', 'Common'); + + $em = $this->addElement('em', 'Inline', 'Inline', 'Common'); + $em->formatting = true; + + $strong = $this->addElement('strong', 'Inline', 'Inline', 'Common'); + $strong->formatting = true; + + $code = $this->addElement('code', 'Inline', 'Inline', 'Common'); + $code->formatting = true; + + // Inline Structural ---------------------------------------------- + $this->addElement('span', 'Inline', 'Inline', 'Common'); + $this->addElement('br', 'Inline', 'Empty', 'Core'); + + // Block Phrasal -------------------------------------------------- + $this->addElement('address', 'Block', 'Inline', 'Common'); + $this->addElement('blockquote', 'Block', 'Optional: Heading | Block | List', 'Common', array('cite' => 'URI')); + $pre = $this->addElement('pre', 'Block', 'Inline', 'Common'); + $pre->excludes = $this->makeLookup( + 'img', + 'big', + 'small', + 'object', + 'applet', + 'font', + 'basefont' + ); + $this->addElement('h1', 'Heading', 'Inline', 'Common'); + $this->addElement('h2', 'Heading', 'Inline', 'Common'); + $this->addElement('h3', 'Heading', 'Inline', 'Common'); + $this->addElement('h4', 'Heading', 'Inline', 'Common'); + $this->addElement('h5', 'Heading', 'Inline', 'Common'); + $this->addElement('h6', 'Heading', 'Inline', 'Common'); + + // Block Structural ----------------------------------------------- + $p = $this->addElement('p', 'Block', 'Inline', 'Common'); + $p->autoclose = array_flip( + array("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "ol", "p", "ul") + ); + + $this->addElement('div', 'Block', 'Flow', 'Common'); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy.php similarity index 74% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy.php index c9d470648561416bb64b322e51df04c7e12f41a0..f482a3741fe5d9dbc054d7046a58d3a27a05f2bf 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy.php @@ -1,207 +1,230 @@ -<?php - -/** - * Abstract class for a set of proprietary modules that clean up (tidy) - * poorly written HTML. - * @todo Figure out how to protect some of these methods/properties - */ -class HTMLPurifier_HTMLModule_Tidy extends HTMLPurifier_HTMLModule -{ - - /** - * List of supported levels. Index zero is a special case "no fixes" - * level. - */ - public $levels = array(0 => 'none', 'light', 'medium', 'heavy'); - - /** - * Default level to place all fixes in. Disabled by default - */ - public $defaultLevel = null; - - /** - * Lists of fixes used by getFixesForLevel(). Format is: - * HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2'); - */ - public $fixesForLevel = array( - 'light' => array(), - 'medium' => array(), - 'heavy' => array() - ); - - /** - * Lazy load constructs the module by determining the necessary - * fixes to create and then delegating to the populate() function. - * @todo Wildcard matching and error reporting when an added or - * subtracted fix has no effect. - */ - public function setup($config) { - - // create fixes, initialize fixesForLevel - $fixes = $this->makeFixes(); - $this->makeFixesForLevel($fixes); - - // figure out which fixes to use - $level = $config->get('HTML', 'TidyLevel'); - $fixes_lookup = $this->getFixesForLevel($level); - - // get custom fix declarations: these need namespace processing - $add_fixes = $config->get('HTML', 'TidyAdd'); - $remove_fixes = $config->get('HTML', 'TidyRemove'); - - foreach ($fixes as $name => $fix) { - // needs to be refactored a little to implement globbing - if ( - isset($remove_fixes[$name]) || - (!isset($add_fixes[$name]) && !isset($fixes_lookup[$name])) - ) { - unset($fixes[$name]); - } - } - - // populate this module with necessary fixes - $this->populate($fixes); - - } - - /** - * Retrieves all fixes per a level, returning fixes for that specific - * level as well as all levels below it. - * @param $level String level identifier, see $levels for valid values - * @return Lookup up table of fixes - */ - public function getFixesForLevel($level) { - if ($level == $this->levels[0]) { - return array(); - } - $activated_levels = array(); - for ($i = 1, $c = count($this->levels); $i < $c; $i++) { - $activated_levels[] = $this->levels[$i]; - if ($this->levels[$i] == $level) break; - } - if ($i == $c) { - trigger_error( - 'Tidy level ' . htmlspecialchars($level) . ' not recognized', - E_USER_WARNING - ); - return array(); - } - $ret = array(); - foreach ($activated_levels as $level) { - foreach ($this->fixesForLevel[$level] as $fix) { - $ret[$fix] = true; - } - } - return $ret; - } - - /** - * Dynamically populates the $fixesForLevel member variable using - * the fixes array. It may be custom overloaded, used in conjunction - * with $defaultLevel, or not used at all. - */ - public function makeFixesForLevel($fixes) { - if (!isset($this->defaultLevel)) return; - if (!isset($this->fixesForLevel[$this->defaultLevel])) { - trigger_error( - 'Default level ' . $this->defaultLevel . ' does not exist', - E_USER_ERROR - ); - return; - } - $this->fixesForLevel[$this->defaultLevel] = array_keys($fixes); - } - - /** - * Populates the module with transforms and other special-case code - * based on a list of fixes passed to it - * @param $lookup Lookup table of fixes to activate - */ - public function populate($fixes) { - foreach ($fixes as $name => $fix) { - // determine what the fix is for - list($type, $params) = $this->getFixType($name); - switch ($type) { - case 'attr_transform_pre': - case 'attr_transform_post': - $attr = $params['attr']; - if (isset($params['element'])) { - $element = $params['element']; - if (empty($this->info[$element])) { - $e = $this->addBlankElement($element); - } else { - $e = $this->info[$element]; - } - } else { - $type = "info_$type"; - $e = $this; - } - // PHP does some weird parsing when I do - // $e->$type[$attr], so I have to assign a ref. - $f =& $e->$type; - $f[$attr] = $fix; - break; - case 'tag_transform': - $this->info_tag_transform[$params['element']] = $fix; - break; - case 'child': - case 'content_model_type': - $element = $params['element']; - if (empty($this->info[$element])) { - $e = $this->addBlankElement($element); - } else { - $e = $this->info[$element]; - } - $e->$type = $fix; - break; - default: - trigger_error("Fix type $type not supported", E_USER_ERROR); - break; - } - } - } - - /** - * Parses a fix name and determines what kind of fix it is, as well - * as other information defined by the fix - * @param $name String name of fix - * @return array(string $fix_type, array $fix_parameters) - * @note $fix_parameters is type dependant, see populate() for usage - * of these parameters - */ - public function getFixType($name) { - // parse it - $property = $attr = null; - if (strpos($name, '#') !== false) list($name, $property) = explode('#', $name); - if (strpos($name, '@') !== false) list($name, $attr) = explode('@', $name); - - // figure out the parameters - $params = array(); - if ($name !== '') $params['element'] = $name; - if (!is_null($attr)) $params['attr'] = $attr; - - // special case: attribute transform - if (!is_null($attr)) { - if (is_null($property)) $property = 'pre'; - $type = 'attr_transform_' . $property; - return array($type, $params); - } - - // special case: tag transform - if (is_null($property)) { - return array('tag_transform', $params); - } - - return array($property, $params); - - } - - /** - * Defines all fixes the module will perform in a compact - * associative array of fix name to fix implementation. - */ - public function makeFixes() {} - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Abstract class for a set of proprietary modules that clean up (tidy) + * poorly written HTML. + * @todo Figure out how to protect some of these methods/properties + */ +class HTMLPurifier_HTMLModule_Tidy extends HTMLPurifier_HTMLModule +{ + /** + * List of supported levels. + * Index zero is a special case "no fixes" level. + * @type array + */ + public $levels = array(0 => 'none', 'light', 'medium', 'heavy'); + + /** + * Default level to place all fixes in. + * Disabled by default. + * @type string + */ + public $defaultLevel = null; + + /** + * Lists of fixes used by getFixesForLevel(). + * Format is: + * HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2'); + * @type array + */ + public $fixesForLevel = array( + 'light' => array(), + 'medium' => array(), + 'heavy' => array() + ); + + /** + * Lazy load constructs the module by determining the necessary + * fixes to create and then delegating to the populate() function. + * @param HTMLPurifier_Config $config + * @todo Wildcard matching and error reporting when an added or + * subtracted fix has no effect. + */ + public function setup($config) + { + // create fixes, initialize fixesForLevel + $fixes = $this->makeFixes(); + $this->makeFixesForLevel($fixes); + + // figure out which fixes to use + $level = $config->get('HTML.TidyLevel'); + $fixes_lookup = $this->getFixesForLevel($level); + + // get custom fix declarations: these need namespace processing + $add_fixes = $config->get('HTML.TidyAdd'); + $remove_fixes = $config->get('HTML.TidyRemove'); + + foreach ($fixes as $name => $fix) { + // needs to be refactored a little to implement globbing + if (isset($remove_fixes[$name]) || + (!isset($add_fixes[$name]) && !isset($fixes_lookup[$name]))) { + unset($fixes[$name]); + } + } + + // populate this module with necessary fixes + $this->populate($fixes); + } + + /** + * Retrieves all fixes per a level, returning fixes for that specific + * level as well as all levels below it. + * @param string $level level identifier, see $levels for valid values + * @return array Lookup up table of fixes + */ + public function getFixesForLevel($level) + { + if ($level == $this->levels[0]) { + return array(); + } + $activated_levels = array(); + for ($i = 1, $c = count($this->levels); $i < $c; $i++) { + $activated_levels[] = $this->levels[$i]; + if ($this->levels[$i] == $level) { + break; + } + } + if ($i == $c) { + trigger_error( + 'Tidy level ' . htmlspecialchars($level) . ' not recognized', + E_USER_WARNING + ); + return array(); + } + $ret = array(); + foreach ($activated_levels as $level) { + foreach ($this->fixesForLevel[$level] as $fix) { + $ret[$fix] = true; + } + } + return $ret; + } + + /** + * Dynamically populates the $fixesForLevel member variable using + * the fixes array. It may be custom overloaded, used in conjunction + * with $defaultLevel, or not used at all. + * @param array $fixes + */ + public function makeFixesForLevel($fixes) + { + if (!isset($this->defaultLevel)) { + return; + } + if (!isset($this->fixesForLevel[$this->defaultLevel])) { + trigger_error( + 'Default level ' . $this->defaultLevel . ' does not exist', + E_USER_ERROR + ); + return; + } + $this->fixesForLevel[$this->defaultLevel] = array_keys($fixes); + } + + /** + * Populates the module with transforms and other special-case code + * based on a list of fixes passed to it + * @param array $fixes Lookup table of fixes to activate + */ + public function populate($fixes) + { + foreach ($fixes as $name => $fix) { + // determine what the fix is for + list($type, $params) = $this->getFixType($name); + switch ($type) { + case 'attr_transform_pre': + case 'attr_transform_post': + $attr = $params['attr']; + if (isset($params['element'])) { + $element = $params['element']; + if (empty($this->info[$element])) { + $e = $this->addBlankElement($element); + } else { + $e = $this->info[$element]; + } + } else { + $type = "info_$type"; + $e = $this; + } + // PHP does some weird parsing when I do + // $e->$type[$attr], so I have to assign a ref. + $f =& $e->$type; + $f[$attr] = $fix; + break; + case 'tag_transform': + $this->info_tag_transform[$params['element']] = $fix; + break; + case 'child': + case 'content_model_type': + $element = $params['element']; + if (empty($this->info[$element])) { + $e = $this->addBlankElement($element); + } else { + $e = $this->info[$element]; + } + $e->$type = $fix; + break; + default: + trigger_error("Fix type $type not supported", E_USER_ERROR); + break; + } + } + } + + /** + * Parses a fix name and determines what kind of fix it is, as well + * as other information defined by the fix + * @param $name String name of fix + * @return array(string $fix_type, array $fix_parameters) + * @note $fix_parameters is type dependant, see populate() for usage + * of these parameters + */ + public function getFixType($name) + { + // parse it + $property = $attr = null; + if (strpos($name, '#') !== false) { + list($name, $property) = explode('#', $name); + } + if (strpos($name, '@') !== false) { + list($name, $attr) = explode('@', $name); + } + + // figure out the parameters + $params = array(); + if ($name !== '') { + $params['element'] = $name; + } + if (!is_null($attr)) { + $params['attr'] = $attr; + } + + // special case: attribute transform + if (!is_null($attr)) { + if (is_null($property)) { + $property = 'pre'; + } + $type = 'attr_transform_' . $property; + return array($type, $params); + } + + // special case: tag transform + if (is_null($property)) { + return array('tag_transform', $params); + } + + return array($property, $params); + + } + + /** + * Defines all fixes the module will perform in a compact + * associative array of fix name to fix implementation. + * @return array + */ + public function makeFixes() + { + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Name.php similarity index 77% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Name.php index 61ff85ce2fa66e66bf1227b35c506ceb9ca2c365..bb47bafd2c400641ddf97083bd52784d299212d0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Name.php @@ -1,24 +1,33 @@ -<?php - -/** - * Name is deprecated, but allowed in strict doctypes, so onl - */ -class HTMLPurifier_HTMLModule_Tidy_Name extends HTMLPurifier_HTMLModule_Tidy -{ - public $name = 'Tidy_Name'; - public $defaultLevel = 'heavy'; - public function makeFixes() { - - $r = array(); - - // @name for img, a ----------------------------------------------- - // Technically, it's allowed even on strict, so we allow authors to use - // it. However, it's deprecated in future versions of XHTML. - $r['img@name'] = - $r['a@name'] = new HTMLPurifier_AttrTransform_Name(); - - return $r; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Name is deprecated, but allowed in strict doctypes, so onl + */ +class HTMLPurifier_HTMLModule_Tidy_Name extends HTMLPurifier_HTMLModule_Tidy +{ + /** + * @type string + */ + public $name = 'Tidy_Name'; + + /** + * @type string + */ + public $defaultLevel = 'heavy'; + + /** + * @return array + */ + public function makeFixes() + { + $r = array(); + // @name for img, a ----------------------------------------------- + // Technically, it's allowed even on strict, so we allow authors to use + // it. However, it's deprecated in future versions of XHTML. + $r['img@name'] = + $r['a@name'] = new HTMLPurifier_AttrTransform_Name(); + return $r; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php index 85fa90a942d89a5b1c5240c508d07e4980ce4951..638cb54199fbbd963b8945986773df2227abbdca 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php @@ -1,23 +1,34 @@ -<?php - -class HTMLPurifier_HTMLModule_Tidy_Proprietary extends HTMLPurifier_HTMLModule_Tidy -{ - - public $name = 'Tidy_Proprietary'; - public $defaultLevel = 'light'; - - public function makeFixes() { - $r = array(); - $r['table@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['td@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['th@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['tr@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['thead@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['tfoot@background'] = new HTMLPurifier_AttrTransform_Background(); - $r['tbody@background'] = new HTMLPurifier_AttrTransform_Background(); - return $r; - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_Tidy_Proprietary extends HTMLPurifier_HTMLModule_Tidy +{ + + /** + * @type string + */ + public $name = 'Tidy_Proprietary'; + + /** + * @type string + */ + public $defaultLevel = 'light'; + + /** + * @return array + */ + public function makeFixes() + { + $r = array(); + $r['table@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['td@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['th@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['tr@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['thead@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['tfoot@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['tbody@background'] = new HTMLPurifier_AttrTransform_Background(); + $r['table@height'] = new HTMLPurifier_AttrTransform_Length('height'); + return $r; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Strict.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Strict.php new file mode 100644 index 0000000000000000000000000000000000000000..ba3260e6fdaf829f086b5033cacc8b4ce3eddd66 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Strict.php @@ -0,0 +1,43 @@ +<?php + +class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 +{ + /** + * @type string + */ + public $name = 'Tidy_Strict'; + + /** + * @type string + */ + public $defaultLevel = 'light'; + + /** + * @return array + */ + public function makeFixes() + { + $r = parent::makeFixes(); + $r['blockquote#content_model_type'] = 'strictblockquote'; + return $r; + } + + /** + * @type bool + */ + public $defines_child_def = true; + + /** + * @param HTMLPurifier_ElementDef $def + * @return HTMLPurifier_ChildDef_StrictBlockquote + */ + public function getChildDef($def) + { + if ($def->content_model_type != 'strictblockquote') { + return parent::getChildDef($def); + } + return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php similarity index 70% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php index 9960b1dd10b18103d9069ce100a0b38d5a742692..79411d257c90a28b5d32c0aa2b6532862c8e9905 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php @@ -1,9 +1,16 @@ -<?php - -class HTMLPurifier_HTMLModule_Tidy_Transitional extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 -{ - public $name = 'Tidy_Transitional'; - public $defaultLevel = 'heavy'; -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_Tidy_Transitional extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 +{ + /** + * @type string + */ + public $name = 'Tidy_Transitional'; + + /** + * @type string + */ + public $defaultLevel = 'heavy'; +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php similarity index 62% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php index db5a378e53973ccba20b749a3a50e4320bb775d2..935ad7f528bff6dacf6d2ea2aed398ec8f9650a7 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php @@ -1,17 +1,26 @@ -<?php - -class HTMLPurifier_HTMLModule_Tidy_XHTML extends HTMLPurifier_HTMLModule_Tidy -{ - - public $name = 'Tidy_XHTML'; - public $defaultLevel = 'medium'; - - public function makeFixes() { - $r = array(); - $r['@lang'] = new HTMLPurifier_AttrTransform_Lang(); - return $r; - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_Tidy_XHTML extends HTMLPurifier_HTMLModule_Tidy +{ + /** + * @type string + */ + public $name = 'Tidy_XHTML'; + + /** + * @type string + */ + public $defaultLevel = 'medium'; + + /** + * @return array + */ + public function makeFixes() + { + $r = array(); + $r['@lang'] = new HTMLPurifier_AttrTransform_Lang(); + return $r; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php new file mode 100644 index 0000000000000000000000000000000000000000..17164fb6d3cf12c652dd47d5b1d9898de2343003 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php @@ -0,0 +1,179 @@ +<?php + +class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule_Tidy +{ + + /** + * @return array + */ + public function makeFixes() + { + $r = array(); + + // == deprecated tag transforms =================================== + + $r['font'] = new HTMLPurifier_TagTransform_Font(); + $r['menu'] = new HTMLPurifier_TagTransform_Simple('ul'); + $r['dir'] = new HTMLPurifier_TagTransform_Simple('ul'); + $r['center'] = new HTMLPurifier_TagTransform_Simple('div', 'text-align:center;'); + $r['u'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:underline;'); + $r['s'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:line-through;'); + $r['strike'] = new HTMLPurifier_TagTransform_Simple('span', 'text-decoration:line-through;'); + + // == deprecated attribute transforms ============================= + + $r['caption@align'] = + new HTMLPurifier_AttrTransform_EnumToCSS( + 'align', + array( + // we're following IE's behavior, not Firefox's, due + // to the fact that no one supports caption-side:right, + // W3C included (with CSS 2.1). This is a slightly + // unreasonable attribute! + 'left' => 'text-align:left;', + 'right' => 'text-align:right;', + 'top' => 'caption-side:top;', + 'bottom' => 'caption-side:bottom;' // not supported by IE + ) + ); + + // @align for img ------------------------------------------------- + $r['img@align'] = + new HTMLPurifier_AttrTransform_EnumToCSS( + 'align', + array( + 'left' => 'float:left;', + 'right' => 'float:right;', + 'top' => 'vertical-align:top;', + 'middle' => 'vertical-align:middle;', + 'bottom' => 'vertical-align:baseline;', + ) + ); + + // @align for table ----------------------------------------------- + $r['table@align'] = + new HTMLPurifier_AttrTransform_EnumToCSS( + 'align', + array( + 'left' => 'float:left;', + 'center' => 'margin-left:auto;margin-right:auto;', + 'right' => 'float:right;' + ) + ); + + // @align for hr ----------------------------------------------- + $r['hr@align'] = + new HTMLPurifier_AttrTransform_EnumToCSS( + 'align', + array( + // we use both text-align and margin because these work + // for different browsers (IE and Firefox, respectively) + // and the melange makes for a pretty cross-compatible + // solution + 'left' => 'margin-left:0;margin-right:auto;text-align:left;', + 'center' => 'margin-left:auto;margin-right:auto;text-align:center;', + 'right' => 'margin-left:auto;margin-right:0;text-align:right;' + ) + ); + + // @align for h1, h2, h3, h4, h5, h6, p, div ---------------------- + // {{{ + $align_lookup = array(); + $align_values = array('left', 'right', 'center', 'justify'); + foreach ($align_values as $v) { + $align_lookup[$v] = "text-align:$v;"; + } + // }}} + $r['h1@align'] = + $r['h2@align'] = + $r['h3@align'] = + $r['h4@align'] = + $r['h5@align'] = + $r['h6@align'] = + $r['p@align'] = + $r['div@align'] = + new HTMLPurifier_AttrTransform_EnumToCSS('align', $align_lookup); + + // @bgcolor for table, tr, td, th --------------------------------- + $r['table@bgcolor'] = + $r['td@bgcolor'] = + $r['th@bgcolor'] = + new HTMLPurifier_AttrTransform_BgColor(); + + // @border for img ------------------------------------------------ + $r['img@border'] = new HTMLPurifier_AttrTransform_Border(); + + // @clear for br -------------------------------------------------- + $r['br@clear'] = + new HTMLPurifier_AttrTransform_EnumToCSS( + 'clear', + array( + 'left' => 'clear:left;', + 'right' => 'clear:right;', + 'all' => 'clear:both;', + 'none' => 'clear:none;', + ) + ); + + // @height for td, th --------------------------------------------- + $r['td@height'] = + $r['th@height'] = + new HTMLPurifier_AttrTransform_Length('height'); + + // @hspace for img ------------------------------------------------ + $r['img@hspace'] = new HTMLPurifier_AttrTransform_ImgSpace('hspace'); + + // @noshade for hr ------------------------------------------------ + // this transformation is not precise but often good enough. + // different browsers use different styles to designate noshade + $r['hr@noshade'] = + new HTMLPurifier_AttrTransform_BoolToCSS( + 'noshade', + 'color:#808080;background-color:#808080;border:0;' + ); + + // @nowrap for td, th --------------------------------------------- + $r['td@nowrap'] = + $r['th@nowrap'] = + new HTMLPurifier_AttrTransform_BoolToCSS( + 'nowrap', + 'white-space:nowrap;' + ); + + // @size for hr -------------------------------------------------- + $r['hr@size'] = new HTMLPurifier_AttrTransform_Length('size', 'height'); + + // @type for li, ol, ul ------------------------------------------- + // {{{ + $ul_types = array( + 'disc' => 'list-style-type:disc;', + 'square' => 'list-style-type:square;', + 'circle' => 'list-style-type:circle;' + ); + $ol_types = array( + '1' => 'list-style-type:decimal;', + 'i' => 'list-style-type:lower-roman;', + 'I' => 'list-style-type:upper-roman;', + 'a' => 'list-style-type:lower-alpha;', + 'A' => 'list-style-type:upper-alpha;' + ); + $li_types = $ul_types + $ol_types; + // }}} + + $r['ul@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $ul_types); + $r['ol@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $ol_types, true); + $r['li@type'] = new HTMLPurifier_AttrTransform_EnumToCSS('type', $li_types, true); + + // @vspace for img ------------------------------------------------ + $r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace'); + + // @width for hr, td, th ------------------------------------------ + $r['td@width'] = + $r['th@width'] = + $r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width'); + + return $r; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php similarity index 75% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php index 9c0e031984169829c67bc74493d8f886f67a17ca..27a353db34d9c2217ed2bc1263351ef73b3423df 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php @@ -1,14 +1,20 @@ -<?php - -class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModule -{ - public $name = 'XMLCommonAttributes'; - - public $attr_collections = array( - 'Lang' => array( - 'xml:lang' => 'LanguageCode', - ) - ); -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModule +{ + /** + * @type string + */ + public $name = 'XMLCommonAttributes'; + + /** + * @type array + */ + public $attr_collections = array( + 'Lang' => array( + 'xml:lang' => 'LanguageCode', + ) + ); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModuleManager.php similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php rename to libraries/htmlpurifier410/library/HTMLPurifier/HTMLModuleManager.php index 78f38781d80421567fb9387caa2b662a15ce07de..7b5a8786895761cfd95fedf8fb2834499cfa0720 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/HTMLModuleManager.php @@ -1,403 +1,467 @@ -<?php - -class HTMLPurifier_HTMLModuleManager -{ - - /** - * Instance of HTMLPurifier_DoctypeRegistry - */ - public $doctypes; - - /** - * Instance of current doctype - */ - public $doctype; - - /** - * Instance of HTMLPurifier_AttrTypes - */ - public $attrTypes; - - /** - * Active instances of modules for the specified doctype are - * indexed, by name, in this array. - */ - public $modules = array(); - - /** - * Array of recognized HTMLPurifier_Module instances, indexed by - * module's class name. This array is usually lazy loaded, but a - * user can overload a module by pre-emptively registering it. - */ - public $registeredModules = array(); - - /** - * List of extra modules that were added by the user using addModule(). - * These get unconditionally merged into the current doctype, whatever - * it may be. - */ - public $userModules = array(); - - /** - * Associative array of element name to list of modules that have - * definitions for the element; this array is dynamically filled. - */ - public $elementLookup = array(); - - /** List of prefixes we should use for registering small names */ - public $prefixes = array('HTMLPurifier_HTMLModule_'); - - public $contentSets; /**< Instance of HTMLPurifier_ContentSets */ - public $attrCollections; /**< Instance of HTMLPurifier_AttrCollections */ - - /** If set to true, unsafe elements and attributes will be allowed */ - public $trusted = false; - - public function __construct() { - - // editable internal objects - $this->attrTypes = new HTMLPurifier_AttrTypes(); - $this->doctypes = new HTMLPurifier_DoctypeRegistry(); - - // setup basic modules - $common = array( - 'CommonAttributes', 'Text', 'Hypertext', 'List', - 'Presentation', 'Edit', 'Bdo', 'Tables', 'Image', - 'StyleAttribute', - // Unsafe: - 'Scripting', 'Object', 'Forms', - // Sorta legacy, but present in strict: - 'Name', - ); - $transitional = array('Legacy', 'Target'); - $xml = array('XMLCommonAttributes'); - $non_xml = array('NonXMLCommonAttributes'); - - // setup basic doctypes - $this->doctypes->register( - 'HTML 4.01 Transitional', false, - array_merge($common, $transitional, $non_xml), - array('Tidy_Transitional', 'Tidy_Proprietary'), - array(), - '-//W3C//DTD HTML 4.01 Transitional//EN', - 'http://www.w3.org/TR/html4/loose.dtd' - ); - - $this->doctypes->register( - 'HTML 4.01 Strict', false, - array_merge($common, $non_xml), - array('Tidy_Strict', 'Tidy_Proprietary', 'Tidy_Name'), - array(), - '-//W3C//DTD HTML 4.01//EN', - 'http://www.w3.org/TR/html4/strict.dtd' - ); - - $this->doctypes->register( - 'XHTML 1.0 Transitional', true, - array_merge($common, $transitional, $xml, $non_xml), - array('Tidy_Transitional', 'Tidy_XHTML', 'Tidy_Proprietary', 'Tidy_Name'), - array(), - '-//W3C//DTD XHTML 1.0 Transitional//EN', - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' - ); - - $this->doctypes->register( - 'XHTML 1.0 Strict', true, - array_merge($common, $xml, $non_xml), - array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Strict', 'Tidy_Proprietary', 'Tidy_Name'), - array(), - '-//W3C//DTD XHTML 1.0 Strict//EN', - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd' - ); - - $this->doctypes->register( - 'XHTML 1.1', true, - array_merge($common, $xml, array('Ruby')), - array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Proprietary', 'Tidy_Strict', 'Tidy_Name'), // Tidy_XHTML1_1 - array(), - '-//W3C//DTD XHTML 1.1//EN', - 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' - ); - - } - - /** - * Registers a module to the recognized module list, useful for - * overloading pre-existing modules. - * @param $module Mixed: string module name, with or without - * HTMLPurifier_HTMLModule prefix, or instance of - * subclass of HTMLPurifier_HTMLModule. - * @param $overload Boolean whether or not to overload previous modules. - * If this is not set, and you do overload a module, - * HTML Purifier will complain with a warning. - * @note This function will not call autoload, you must instantiate - * (and thus invoke) autoload outside the method. - * @note If a string is passed as a module name, different variants - * will be tested in this order: - * - Check for HTMLPurifier_HTMLModule_$name - * - Check all prefixes with $name in order they were added - * - Check for literal object name - * - Throw fatal error - * If your object name collides with an internal class, specify - * your module manually. All modules must have been included - * externally: registerModule will not perform inclusions for you! - */ - public function registerModule($module, $overload = false) { - if (is_string($module)) { - // attempt to load the module - $original_module = $module; - $ok = false; - foreach ($this->prefixes as $prefix) { - $module = $prefix . $original_module; - if (class_exists($module)) { - $ok = true; - break; - } - } - if (!$ok) { - $module = $original_module; - if (!class_exists($module)) { - trigger_error($original_module . ' module does not exist', - E_USER_ERROR); - return; - } - } - $module = new $module(); - } - if (empty($module->name)) { - trigger_error('Module instance of ' . get_class($module) . ' must have name'); - return; - } - if (!$overload && isset($this->registeredModules[$module->name])) { - trigger_error('Overloading ' . $module->name . ' without explicit overload parameter', E_USER_WARNING); - } - $this->registeredModules[$module->name] = $module; - } - - /** - * Adds a module to the current doctype by first registering it, - * and then tacking it on to the active doctype - */ - public function addModule($module) { - $this->registerModule($module); - if (is_object($module)) $module = $module->name; - $this->userModules[] = $module; - } - - /** - * Adds a class prefix that registerModule() will use to resolve a - * string name to a concrete class - */ - public function addPrefix($prefix) { - $this->prefixes[] = $prefix; - } - - /** - * Performs processing on modules, after being called you may - * use getElement() and getElements() - * @param $config Instance of HTMLPurifier_Config - */ - public function setup($config) { - - $this->trusted = $config->get('HTML', 'Trusted'); - - // generate - $this->doctype = $this->doctypes->make($config); - $modules = $this->doctype->modules; - - // take out the default modules that aren't allowed - $lookup = $config->get('HTML', 'AllowedModules'); - $special_cases = $config->get('HTML', 'CoreModules'); - - if (is_array($lookup)) { - foreach ($modules as $k => $m) { - if (isset($special_cases[$m])) continue; - if (!isset($lookup[$m])) unset($modules[$k]); - } - } - - // add proprietary module (this gets special treatment because - // it is completely removed from doctypes, etc.) - if ($config->get('HTML', 'Proprietary')) { - $modules[] = 'Proprietary'; - } - - // add SafeObject/Safeembed modules - if ($config->get('HTML', 'SafeObject')) { - $modules[] = 'SafeObject'; - } - if ($config->get('HTML', 'SafeEmbed')) { - $modules[] = 'SafeEmbed'; - } - - // merge in custom modules - $modules = array_merge($modules, $this->userModules); - - foreach ($modules as $module) { - $this->processModule($module); - $this->modules[$module]->setup($config); - } - - foreach ($this->doctype->tidyModules as $module) { - $this->processModule($module); - $this->modules[$module]->setup($config); - } - - // prepare any injectors - foreach ($this->modules as $module) { - $n = array(); - foreach ($module->info_injector as $i => $injector) { - if (!is_object($injector)) { - $class = "HTMLPurifier_Injector_$injector"; - $injector = new $class; - } - $n[$injector->name] = $injector; - } - $module->info_injector = $n; - } - - // setup lookup table based on all valid modules - foreach ($this->modules as $module) { - foreach ($module->info as $name => $def) { - if (!isset($this->elementLookup[$name])) { - $this->elementLookup[$name] = array(); - } - $this->elementLookup[$name][] = $module->name; - } - } - - // note the different choice - $this->contentSets = new HTMLPurifier_ContentSets( - // content set assembly deals with all possible modules, - // not just ones deemed to be "safe" - $this->modules - ); - $this->attrCollections = new HTMLPurifier_AttrCollections( - $this->attrTypes, - // there is no way to directly disable a global attribute, - // but using AllowedAttributes or simply not including - // the module in your custom doctype should be sufficient - $this->modules - ); - } - - /** - * Takes a module and adds it to the active module collection, - * registering it if necessary. - */ - public function processModule($module) { - if (!isset($this->registeredModules[$module]) || is_object($module)) { - $this->registerModule($module); - } - $this->modules[$module] = $this->registeredModules[$module]; - } - - /** - * Retrieves merged element definitions. - * @return Array of HTMLPurifier_ElementDef - */ - public function getElements() { - - $elements = array(); - foreach ($this->modules as $module) { - if (!$this->trusted && !$module->safe) continue; - foreach ($module->info as $name => $v) { - if (isset($elements[$name])) continue; - $elements[$name] = $this->getElement($name); - } - } - - // remove dud elements, this happens when an element that - // appeared to be safe actually wasn't - foreach ($elements as $n => $v) { - if ($v === false) unset($elements[$n]); - } - - return $elements; - - } - - /** - * Retrieves a single merged element definition - * @param $name Name of element - * @param $trusted Boolean trusted overriding parameter: set to true - * if you want the full version of an element - * @return Merged HTMLPurifier_ElementDef - * @note You may notice that modules are getting iterated over twice (once - * in getElements() and once here). This - * is because - */ - public function getElement($name, $trusted = null) { - - if (!isset($this->elementLookup[$name])) { - return false; - } - - // setup global state variables - $def = false; - if ($trusted === null) $trusted = $this->trusted; - - // iterate through each module that has registered itself to this - // element - foreach($this->elementLookup[$name] as $module_name) { - - $module = $this->modules[$module_name]; - - // refuse to create/merge from a module that is deemed unsafe-- - // pretend the module doesn't exist--when trusted mode is not on. - if (!$trusted && !$module->safe) { - continue; - } - - // clone is used because, ideally speaking, the original - // definition should not be modified. Usually, this will - // make no difference, but for consistency's sake - $new_def = clone $module->info[$name]; - - if (!$def && $new_def->standalone) { - $def = $new_def; - } elseif ($def) { - // This will occur even if $new_def is standalone. In practice, - // this will usually result in a full replacement. - $def->mergeIn($new_def); - } else { - // :TODO: - // non-standalone definitions that don't have a standalone - // to merge into could be deferred to the end - continue; - } - - // attribute value expansions - $this->attrCollections->performInclusions($def->attr); - $this->attrCollections->expandIdentifiers($def->attr, $this->attrTypes); - - // descendants_are_inline, for ChildDef_Chameleon - if (is_string($def->content_model) && - strpos($def->content_model, 'Inline') !== false) { - if ($name != 'del' && $name != 'ins') { - // this is for you, ins/del - $def->descendants_are_inline = true; - } - } - - $this->contentSets->generateChildDef($def, $module); - } - - // This can occur if there is a blank definition, but no base to - // mix it in with - if (!$def) return false; - - // add information on required attributes - foreach ($def->attr as $attr_name => $attr_def) { - if ($attr_def->required) { - $def->required_attr[] = $attr_name; - } - } - - return $def; - - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_HTMLModuleManager +{ + + /** + * @type HTMLPurifier_DoctypeRegistry + */ + public $doctypes; + + /** + * Instance of current doctype. + * @type string + */ + public $doctype; + + /** + * @type HTMLPurifier_AttrTypes + */ + public $attrTypes; + + /** + * Active instances of modules for the specified doctype are + * indexed, by name, in this array. + * @type HTMLPurifier_HTMLModule[] + */ + public $modules = array(); + + /** + * Array of recognized HTMLPurifier_HTMLModule instances, + * indexed by module's class name. This array is usually lazy loaded, but a + * user can overload a module by pre-emptively registering it. + * @type HTMLPurifier_HTMLModule[] + */ + public $registeredModules = array(); + + /** + * List of extra modules that were added by the user + * using addModule(). These get unconditionally merged into the current doctype, whatever + * it may be. + * @type HTMLPurifier_HTMLModule[] + */ + public $userModules = array(); + + /** + * Associative array of element name to list of modules that have + * definitions for the element; this array is dynamically filled. + * @type array + */ + public $elementLookup = array(); + + /** + * List of prefixes we should use for registering small names. + * @type array + */ + public $prefixes = array('HTMLPurifier_HTMLModule_'); + + /** + * @type HTMLPurifier_ContentSets + */ + public $contentSets; + + /** + * @type HTMLPurifier_AttrCollections + */ + public $attrCollections; + + /** + * If set to true, unsafe elements and attributes will be allowed. + * @type bool + */ + public $trusted = false; + + public function __construct() + { + // editable internal objects + $this->attrTypes = new HTMLPurifier_AttrTypes(); + $this->doctypes = new HTMLPurifier_DoctypeRegistry(); + + // setup basic modules + $common = array( + 'CommonAttributes', 'Text', 'Hypertext', 'List', + 'Presentation', 'Edit', 'Bdo', 'Tables', 'Image', + 'StyleAttribute', + // Unsafe: + 'Scripting', 'Object', 'Forms', + // Sorta legacy, but present in strict: + 'Name', + ); + $transitional = array('Legacy', 'Target', 'Iframe'); + $xml = array('XMLCommonAttributes'); + $non_xml = array('NonXMLCommonAttributes'); + + // setup basic doctypes + $this->doctypes->register( + 'HTML 4.01 Transitional', + false, + array_merge($common, $transitional, $non_xml), + array('Tidy_Transitional', 'Tidy_Proprietary'), + array(), + '-//W3C//DTD HTML 4.01 Transitional//EN', + 'http://www.w3.org/TR/html4/loose.dtd' + ); + + $this->doctypes->register( + 'HTML 4.01 Strict', + false, + array_merge($common, $non_xml), + array('Tidy_Strict', 'Tidy_Proprietary', 'Tidy_Name'), + array(), + '-//W3C//DTD HTML 4.01//EN', + 'http://www.w3.org/TR/html4/strict.dtd' + ); + + $this->doctypes->register( + 'XHTML 1.0 Transitional', + true, + array_merge($common, $transitional, $xml, $non_xml), + array('Tidy_Transitional', 'Tidy_XHTML', 'Tidy_Proprietary', 'Tidy_Name'), + array(), + '-//W3C//DTD XHTML 1.0 Transitional//EN', + 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' + ); + + $this->doctypes->register( + 'XHTML 1.0 Strict', + true, + array_merge($common, $xml, $non_xml), + array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Strict', 'Tidy_Proprietary', 'Tidy_Name'), + array(), + '-//W3C//DTD XHTML 1.0 Strict//EN', + 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd' + ); + + $this->doctypes->register( + 'XHTML 1.1', + true, + // Iframe is a real XHTML 1.1 module, despite being + // "transitional"! + array_merge($common, $xml, array('Ruby', 'Iframe')), + array('Tidy_Strict', 'Tidy_XHTML', 'Tidy_Proprietary', 'Tidy_Strict', 'Tidy_Name'), // Tidy_XHTML1_1 + array(), + '-//W3C//DTD XHTML 1.1//EN', + 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' + ); + + } + + /** + * Registers a module to the recognized module list, useful for + * overloading pre-existing modules. + * @param $module Mixed: string module name, with or without + * HTMLPurifier_HTMLModule prefix, or instance of + * subclass of HTMLPurifier_HTMLModule. + * @param $overload Boolean whether or not to overload previous modules. + * If this is not set, and you do overload a module, + * HTML Purifier will complain with a warning. + * @note This function will not call autoload, you must instantiate + * (and thus invoke) autoload outside the method. + * @note If a string is passed as a module name, different variants + * will be tested in this order: + * - Check for HTMLPurifier_HTMLModule_$name + * - Check all prefixes with $name in order they were added + * - Check for literal object name + * - Throw fatal error + * If your object name collides with an internal class, specify + * your module manually. All modules must have been included + * externally: registerModule will not perform inclusions for you! + */ + public function registerModule($module, $overload = false) + { + if (is_string($module)) { + // attempt to load the module + $original_module = $module; + $ok = false; + foreach ($this->prefixes as $prefix) { + $module = $prefix . $original_module; + if (class_exists($module)) { + $ok = true; + break; + } + } + if (!$ok) { + $module = $original_module; + if (!class_exists($module)) { + trigger_error( + $original_module . ' module does not exist', + E_USER_ERROR + ); + return; + } + } + $module = new $module(); + } + if (empty($module->name)) { + trigger_error('Module instance of ' . get_class($module) . ' must have name'); + return; + } + if (!$overload && isset($this->registeredModules[$module->name])) { + trigger_error('Overloading ' . $module->name . ' without explicit overload parameter', E_USER_WARNING); + } + $this->registeredModules[$module->name] = $module; + } + + /** + * Adds a module to the current doctype by first registering it, + * and then tacking it on to the active doctype + */ + public function addModule($module) + { + $this->registerModule($module); + if (is_object($module)) { + $module = $module->name; + } + $this->userModules[] = $module; + } + + /** + * Adds a class prefix that registerModule() will use to resolve a + * string name to a concrete class + */ + public function addPrefix($prefix) + { + $this->prefixes[] = $prefix; + } + + /** + * Performs processing on modules, after being called you may + * use getElement() and getElements() + * @param HTMLPurifier_Config $config + */ + public function setup($config) + { + $this->trusted = $config->get('HTML.Trusted'); + + // generate + $this->doctype = $this->doctypes->make($config); + $modules = $this->doctype->modules; + + // take out the default modules that aren't allowed + $lookup = $config->get('HTML.AllowedModules'); + $special_cases = $config->get('HTML.CoreModules'); + + if (is_array($lookup)) { + foreach ($modules as $k => $m) { + if (isset($special_cases[$m])) { + continue; + } + if (!isset($lookup[$m])) { + unset($modules[$k]); + } + } + } + + // custom modules + if ($config->get('HTML.Proprietary')) { + $modules[] = 'Proprietary'; + } + if ($config->get('HTML.SafeObject')) { + $modules[] = 'SafeObject'; + } + if ($config->get('HTML.SafeEmbed')) { + $modules[] = 'SafeEmbed'; + } + if ($config->get('HTML.SafeScripting') !== array()) { + $modules[] = 'SafeScripting'; + } + if ($config->get('HTML.Nofollow')) { + $modules[] = 'Nofollow'; + } + if ($config->get('HTML.TargetBlank')) { + $modules[] = 'TargetBlank'; + } + // NB: HTML.TargetNoreferrer and HTML.TargetNoopener must be AFTER HTML.TargetBlank + // so that its post-attr-transform gets run afterwards. + if ($config->get('HTML.TargetNoreferrer')) { + $modules[] = 'TargetNoreferrer'; + } + if ($config->get('HTML.TargetNoopener')) { + $modules[] = 'TargetNoopener'; + } + + // merge in custom modules + $modules = array_merge($modules, $this->userModules); + + foreach ($modules as $module) { + $this->processModule($module); + $this->modules[$module]->setup($config); + } + + foreach ($this->doctype->tidyModules as $module) { + $this->processModule($module); + $this->modules[$module]->setup($config); + } + + // prepare any injectors + foreach ($this->modules as $module) { + $n = array(); + foreach ($module->info_injector as $injector) { + if (!is_object($injector)) { + $class = "HTMLPurifier_Injector_$injector"; + $injector = new $class; + } + $n[$injector->name] = $injector; + } + $module->info_injector = $n; + } + + // setup lookup table based on all valid modules + foreach ($this->modules as $module) { + foreach ($module->info as $name => $def) { + if (!isset($this->elementLookup[$name])) { + $this->elementLookup[$name] = array(); + } + $this->elementLookup[$name][] = $module->name; + } + } + + // note the different choice + $this->contentSets = new HTMLPurifier_ContentSets( + // content set assembly deals with all possible modules, + // not just ones deemed to be "safe" + $this->modules + ); + $this->attrCollections = new HTMLPurifier_AttrCollections( + $this->attrTypes, + // there is no way to directly disable a global attribute, + // but using AllowedAttributes or simply not including + // the module in your custom doctype should be sufficient + $this->modules + ); + } + + /** + * Takes a module and adds it to the active module collection, + * registering it if necessary. + */ + public function processModule($module) + { + if (!isset($this->registeredModules[$module]) || is_object($module)) { + $this->registerModule($module); + } + $this->modules[$module] = $this->registeredModules[$module]; + } + + /** + * Retrieves merged element definitions. + * @return Array of HTMLPurifier_ElementDef + */ + public function getElements() + { + $elements = array(); + foreach ($this->modules as $module) { + if (!$this->trusted && !$module->safe) { + continue; + } + foreach ($module->info as $name => $v) { + if (isset($elements[$name])) { + continue; + } + $elements[$name] = $this->getElement($name); + } + } + + // remove dud elements, this happens when an element that + // appeared to be safe actually wasn't + foreach ($elements as $n => $v) { + if ($v === false) { + unset($elements[$n]); + } + } + + return $elements; + + } + + /** + * Retrieves a single merged element definition + * @param string $name Name of element + * @param bool $trusted Boolean trusted overriding parameter: set to true + * if you want the full version of an element + * @return HTMLPurifier_ElementDef Merged HTMLPurifier_ElementDef + * @note You may notice that modules are getting iterated over twice (once + * in getElements() and once here). This + * is because + */ + public function getElement($name, $trusted = null) + { + if (!isset($this->elementLookup[$name])) { + return false; + } + + // setup global state variables + $def = false; + if ($trusted === null) { + $trusted = $this->trusted; + } + + // iterate through each module that has registered itself to this + // element + foreach ($this->elementLookup[$name] as $module_name) { + $module = $this->modules[$module_name]; + + // refuse to create/merge from a module that is deemed unsafe-- + // pretend the module doesn't exist--when trusted mode is not on. + if (!$trusted && !$module->safe) { + continue; + } + + // clone is used because, ideally speaking, the original + // definition should not be modified. Usually, this will + // make no difference, but for consistency's sake + $new_def = clone $module->info[$name]; + + if (!$def && $new_def->standalone) { + $def = $new_def; + } elseif ($def) { + // This will occur even if $new_def is standalone. In practice, + // this will usually result in a full replacement. + $def->mergeIn($new_def); + } else { + // :TODO: + // non-standalone definitions that don't have a standalone + // to merge into could be deferred to the end + // HOWEVER, it is perfectly valid for a non-standalone + // definition to lack a standalone definition, even + // after all processing: this allows us to safely + // specify extra attributes for elements that may not be + // enabled all in one place. In particular, this might + // be the case for trusted elements. WARNING: care must + // be taken that the /extra/ definitions are all safe. + continue; + } + + // attribute value expansions + $this->attrCollections->performInclusions($def->attr); + $this->attrCollections->expandIdentifiers($def->attr, $this->attrTypes); + + // descendants_are_inline, for ChildDef_Chameleon + if (is_string($def->content_model) && + strpos($def->content_model, 'Inline') !== false) { + if ($name != 'del' && $name != 'ins') { + // this is for you, ins/del + $def->descendants_are_inline = true; + } + } + + $this->contentSets->generateChildDef($def, $module); + } + + // This can occur if there is a blank definition, but no base to + // mix it in with + if (!$def) { + return false; + } + + // add information on required attributes + foreach ($def->attr as $attr_name => $attr_def) { + if ($attr_def->required) { + $def->required_attr[] = $attr_name; + } + } + return $def; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/IDAccumulator.php b/libraries/htmlpurifier410/library/HTMLPurifier/IDAccumulator.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/IDAccumulator.php rename to libraries/htmlpurifier410/library/HTMLPurifier/IDAccumulator.php index d546cd751c5b48cd156a6393358a3e9aa47f4559..bf399af4abd47193cca792adf23cb784cb90848c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/IDAccumulator.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/IDAccumulator.php @@ -1,53 +1,57 @@ -<?php - -/** - * Component of HTMLPurifier_AttrContext that accumulates IDs to prevent dupes - * @note In Slashdot-speak, dupe means duplicate. - * @note The default constructor does not accept $config or $context objects: - * use must use the static build() factory method to perform initialization. - */ -class HTMLPurifier_IDAccumulator -{ - - /** - * Lookup table of IDs we've accumulated. - * @public - */ - public $ids = array(); - - /** - * Builds an IDAccumulator, also initializing the default blacklist - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return Fully initialized HTMLPurifier_IDAccumulator - */ - public static function build($config, $context) { - $id_accumulator = new HTMLPurifier_IDAccumulator(); - $id_accumulator->load($config->get('Attr', 'IDBlacklist')); - return $id_accumulator; - } - - /** - * Add an ID to the lookup table. - * @param $id ID to be added. - * @return Bool status, true if success, false if there's a dupe - */ - public function add($id) { - if (isset($this->ids[$id])) return false; - return $this->ids[$id] = true; - } - - /** - * Load a list of IDs into the lookup table - * @param $array_of_ids Array of IDs to load - * @note This function doesn't care about duplicates - */ - public function load($array_of_ids) { - foreach ($array_of_ids as $id) { - $this->ids[$id] = true; - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Component of HTMLPurifier_AttrContext that accumulates IDs to prevent dupes + * @note In Slashdot-speak, dupe means duplicate. + * @note The default constructor does not accept $config or $context objects: + * use must use the static build() factory method to perform initialization. + */ +class HTMLPurifier_IDAccumulator +{ + + /** + * Lookup table of IDs we've accumulated. + * @public + */ + public $ids = array(); + + /** + * Builds an IDAccumulator, also initializing the default blacklist + * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config + * @param HTMLPurifier_Context $context Instance of HTMLPurifier_Context + * @return HTMLPurifier_IDAccumulator Fully initialized HTMLPurifier_IDAccumulator + */ + public static function build($config, $context) + { + $id_accumulator = new HTMLPurifier_IDAccumulator(); + $id_accumulator->load($config->get('Attr.IDBlacklist')); + return $id_accumulator; + } + + /** + * Add an ID to the lookup table. + * @param string $id ID to be added. + * @return bool status, true if success, false if there's a dupe + */ + public function add($id) + { + if (isset($this->ids[$id])) { + return false; + } + return $this->ids[$id] = true; + } + + /** + * Load a list of IDs into the lookup table + * @param $array_of_ids Array of IDs to load + * @note This function doesn't care about duplicates + */ + public function load($array_of_ids) + { + foreach ($array_of_ids as $id) { + $this->ids[$id] = true; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector.php index bc093b805c730f2b75beff10b400459ef546eda6..24a4bc1fe36c931793b0c31e770f7615a234ce27 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector.php @@ -1,233 +1,283 @@ -<?php - -/** - * Injects tokens into the document while parsing for well-formedness. - * This enables "formatter-like" functionality such as auto-paragraphing, - * smiley-ification and linkification to take place. - * - * A note on how handlers create changes; this is done by assigning a new - * value to the $token reference. These values can take a variety of forms and - * are best described HTMLPurifier_Strategy_MakeWellFormed->processToken() - * documentation. - * - * @todo Allow injectors to request a re-run on their output. This - * would help if an operation is recursive. - */ -abstract class HTMLPurifier_Injector -{ - - /** - * Advisory name of injector, this is for friendly error messages - */ - public $name; - - /** - * Instance of HTMLPurifier_HTMLDefinition - */ - protected $htmlDefinition; - - /** - * Reference to CurrentNesting variable in Context. This is an array - * list of tokens that we are currently "inside" - */ - protected $currentNesting; - - /** - * Reference to InputTokens variable in Context. This is an array - * list of the input tokens that are being processed. - */ - protected $inputTokens; - - /** - * Reference to InputIndex variable in Context. This is an integer - * array index for $this->inputTokens that indicates what token - * is currently being processed. - */ - protected $inputIndex; - - /** - * Array of elements and attributes this injector creates and therefore - * need to be allowed by the definition. Takes form of - * array('element' => array('attr', 'attr2'), 'element2') - */ - public $needed = array(); - - /** - * Index of inputTokens to rewind to. - */ - protected $rewind = false; - - /** - * Rewind to a spot to re-perform processing. This is useful if you - * deleted a node, and now need to see if this change affected any - * earlier nodes. Rewinding does not affect other injectors, and can - * result in infinite loops if not used carefully. - * @warning HTML Purifier will prevent you from fast-forwarding with this - * function. - */ - public function rewind($index) { - $this->rewind = $index; - } - - /** - * Retrieves rewind, and then unsets it. - */ - public function getRewind() { - $r = $this->rewind; - $this->rewind = false; - return $r; - } - - /** - * Prepares the injector by giving it the config and context objects: - * this allows references to important variables to be made within - * the injector. This function also checks if the HTML environment - * will work with the Injector (see checkNeeded()). - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return Boolean false if success, string of missing needed element/attribute if failure - */ - public function prepare($config, $context) { - $this->htmlDefinition = $config->getHTMLDefinition(); - // Even though this might fail, some unit tests ignore this and - // still test checkNeeded, so be careful. Maybe get rid of that - // dependency. - $result = $this->checkNeeded($config); - if ($result !== false) return $result; - $this->currentNesting =& $context->get('CurrentNesting'); - $this->inputTokens =& $context->get('InputTokens'); - $this->inputIndex =& $context->get('InputIndex'); - return false; - } - - /** - * This function checks if the HTML environment - * will work with the Injector: if p tags are not allowed, the - * Auto-Paragraphing injector should not be enabled. - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @return Boolean false if success, string of missing needed element/attribute if failure - */ - public function checkNeeded($config) { - $def = $config->getHTMLDefinition(); - foreach ($this->needed as $element => $attributes) { - if (is_int($element)) $element = $attributes; - if (!isset($def->info[$element])) return $element; - if (!is_array($attributes)) continue; - foreach ($attributes as $name) { - if (!isset($def->info[$element]->attr[$name])) return "$element.$name"; - } - } - return false; - } - - /** - * Tests if the context node allows a certain element - * @param $name Name of element to test for - * @return True if element is allowed, false if it is not - */ - public function allowsElement($name) { - if (!empty($this->currentNesting)) { - $parent_token = array_pop($this->currentNesting); - $this->currentNesting[] = $parent_token; - $parent = $this->htmlDefinition->info[$parent_token->name]; - } else { - $parent = $this->htmlDefinition->info_parent_def; - } - if (!isset($parent->child->elements[$name]) || isset($parent->excludes[$name])) { - return false; - } - return true; - } - - /** - * Iterator function, which starts with the next token and continues until - * you reach the end of the input tokens. - * @warning Please prevent previous references from interfering with this - * functions by setting $i = null beforehand! - * @param &$i Current integer index variable for inputTokens - * @param &$current Current token variable. Do NOT use $token, as that variable is also a reference - */ - protected function forward(&$i, &$current) { - if ($i === null) $i = $this->inputIndex + 1; - else $i++; - if (!isset($this->inputTokens[$i])) return false; - $current = $this->inputTokens[$i]; - return true; - } - - /** - * Similar to _forward, but accepts a third parameter $nesting (which - * should be initialized at 0) and stops when we hit the end tag - * for the node $this->inputIndex starts in. - */ - protected function forwardUntilEndToken(&$i, &$current, &$nesting) { - $result = $this->forward($i, $current); - if (!$result) return false; - if ($nesting === null) $nesting = 0; - if ($current instanceof HTMLPurifier_Token_Start) $nesting++; - elseif ($current instanceof HTMLPurifier_Token_End) { - if ($nesting <= 0) return false; - $nesting--; - } - return true; - } - - /** - * Iterator function, starts with the previous token and continues until - * you reach the beginning of input tokens. - * @warning Please prevent previous references from interfering with this - * functions by setting $i = null beforehand! - * @param &$i Current integer index variable for inputTokens - * @param &$current Current token variable. Do NOT use $token, as that variable is also a reference - */ - protected function backward(&$i, &$current) { - if ($i === null) $i = $this->inputIndex - 1; - else $i--; - if ($i < 0) return false; - $current = $this->inputTokens[$i]; - return true; - } - - /** - * Initializes the iterator at the current position. Use in a do {} while; - * loop to force the _forward and _backward functions to start at the - * current location. - * @warning Please prevent previous references from interfering with this - * functions by setting $i = null beforehand! - * @param &$i Current integer index variable for inputTokens - * @param &$current Current token variable. Do NOT use $token, as that variable is also a reference - */ - protected function current(&$i, &$current) { - if ($i === null) $i = $this->inputIndex; - $current = $this->inputTokens[$i]; - } - - /** - * Handler that is called when a text token is processed - */ - public function handleText(&$token) {} - - /** - * Handler that is called when a start or empty token is processed - */ - public function handleElement(&$token) {} - - /** - * Handler that is called when an end token is processed - */ - public function handleEnd(&$token) { - $this->notifyEnd($token); - } - - /** - * Notifier that is called when an end token is processed - * @note This differs from handlers in that the token is read-only - * @deprecated - */ - public function notifyEnd($token) {} - - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Injects tokens into the document while parsing for well-formedness. + * This enables "formatter-like" functionality such as auto-paragraphing, + * smiley-ification and linkification to take place. + * + * A note on how handlers create changes; this is done by assigning a new + * value to the $token reference. These values can take a variety of forms and + * are best described HTMLPurifier_Strategy_MakeWellFormed->processToken() + * documentation. + * + * @todo Allow injectors to request a re-run on their output. This + * would help if an operation is recursive. + */ +abstract class HTMLPurifier_Injector +{ + + /** + * Advisory name of injector, this is for friendly error messages. + * @type string + */ + public $name; + + /** + * @type HTMLPurifier_HTMLDefinition + */ + protected $htmlDefinition; + + /** + * Reference to CurrentNesting variable in Context. This is an array + * list of tokens that we are currently "inside" + * @type array + */ + protected $currentNesting; + + /** + * Reference to current token. + * @type HTMLPurifier_Token + */ + protected $currentToken; + + /** + * Reference to InputZipper variable in Context. + * @type HTMLPurifier_Zipper + */ + protected $inputZipper; + + /** + * Array of elements and attributes this injector creates and therefore + * need to be allowed by the definition. Takes form of + * array('element' => array('attr', 'attr2'), 'element2') + * @type array + */ + public $needed = array(); + + /** + * Number of elements to rewind backwards (relative). + * @type bool|int + */ + protected $rewindOffset = false; + + /** + * Rewind to a spot to re-perform processing. This is useful if you + * deleted a node, and now need to see if this change affected any + * earlier nodes. Rewinding does not affect other injectors, and can + * result in infinite loops if not used carefully. + * @param bool|int $offset + * @warning HTML Purifier will prevent you from fast-forwarding with this + * function. + */ + public function rewindOffset($offset) + { + $this->rewindOffset = $offset; + } + + /** + * Retrieves rewind offset, and then unsets it. + * @return bool|int + */ + public function getRewindOffset() + { + $r = $this->rewindOffset; + $this->rewindOffset = false; + return $r; + } + + /** + * Prepares the injector by giving it the config and context objects: + * this allows references to important variables to be made within + * the injector. This function also checks if the HTML environment + * will work with the Injector (see checkNeeded()). + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool|string Boolean false if success, string of missing needed element/attribute if failure + */ + public function prepare($config, $context) + { + $this->htmlDefinition = $config->getHTMLDefinition(); + // Even though this might fail, some unit tests ignore this and + // still test checkNeeded, so be careful. Maybe get rid of that + // dependency. + $result = $this->checkNeeded($config); + if ($result !== false) { + return $result; + } + $this->currentNesting =& $context->get('CurrentNesting'); + $this->currentToken =& $context->get('CurrentToken'); + $this->inputZipper =& $context->get('InputZipper'); + return false; + } + + /** + * This function checks if the HTML environment + * will work with the Injector: if p tags are not allowed, the + * Auto-Paragraphing injector should not be enabled. + * @param HTMLPurifier_Config $config + * @return bool|string Boolean false if success, string of missing needed element/attribute if failure + */ + public function checkNeeded($config) + { + $def = $config->getHTMLDefinition(); + foreach ($this->needed as $element => $attributes) { + if (is_int($element)) { + $element = $attributes; + } + if (!isset($def->info[$element])) { + return $element; + } + if (!is_array($attributes)) { + continue; + } + foreach ($attributes as $name) { + if (!isset($def->info[$element]->attr[$name])) { + return "$element.$name"; + } + } + } + return false; + } + + /** + * Tests if the context node allows a certain element + * @param string $name Name of element to test for + * @return bool True if element is allowed, false if it is not + */ + public function allowsElement($name) + { + if (!empty($this->currentNesting)) { + $parent_token = array_pop($this->currentNesting); + $this->currentNesting[] = $parent_token; + $parent = $this->htmlDefinition->info[$parent_token->name]; + } else { + $parent = $this->htmlDefinition->info_parent_def; + } + if (!isset($parent->child->elements[$name]) || isset($parent->excludes[$name])) { + return false; + } + // check for exclusion + if (!empty($this->currentNesting)) { + for ($i = count($this->currentNesting) - 2; $i >= 0; $i--) { + $node = $this->currentNesting[$i]; + $def = $this->htmlDefinition->info[$node->name]; + if (isset($def->excludes[$name])) { + return false; + } + } + } + return true; + } + + /** + * Iterator function, which starts with the next token and continues until + * you reach the end of the input tokens. + * @warning Please prevent previous references from interfering with this + * functions by setting $i = null beforehand! + * @param int $i Current integer index variable for inputTokens + * @param HTMLPurifier_Token $current Current token variable. + * Do NOT use $token, as that variable is also a reference + * @return bool + */ + protected function forward(&$i, &$current) + { + if ($i === null) { + $i = count($this->inputZipper->back) - 1; + } else { + $i--; + } + if ($i < 0) { + return false; + } + $current = $this->inputZipper->back[$i]; + return true; + } + + /** + * Similar to _forward, but accepts a third parameter $nesting (which + * should be initialized at 0) and stops when we hit the end tag + * for the node $this->inputIndex starts in. + * @param int $i Current integer index variable for inputTokens + * @param HTMLPurifier_Token $current Current token variable. + * Do NOT use $token, as that variable is also a reference + * @param int $nesting + * @return bool + */ + protected function forwardUntilEndToken(&$i, &$current, &$nesting) + { + $result = $this->forward($i, $current); + if (!$result) { + return false; + } + if ($nesting === null) { + $nesting = 0; + } + if ($current instanceof HTMLPurifier_Token_Start) { + $nesting++; + } elseif ($current instanceof HTMLPurifier_Token_End) { + if ($nesting <= 0) { + return false; + } + $nesting--; + } + return true; + } + + /** + * Iterator function, starts with the previous token and continues until + * you reach the beginning of input tokens. + * @warning Please prevent previous references from interfering with this + * functions by setting $i = null beforehand! + * @param int $i Current integer index variable for inputTokens + * @param HTMLPurifier_Token $current Current token variable. + * Do NOT use $token, as that variable is also a reference + * @return bool + */ + protected function backward(&$i, &$current) + { + if ($i === null) { + $i = count($this->inputZipper->front) - 1; + } else { + $i--; + } + if ($i < 0) { + return false; + } + $current = $this->inputZipper->front[$i]; + return true; + } + + /** + * Handler that is called when a text token is processed + */ + public function handleText(&$token) + { + } + + /** + * Handler that is called when a start or empty token is processed + */ + public function handleElement(&$token) + { + } + + /** + * Handler that is called when an end token is processed + */ + public function handleEnd(&$token) + { + $this->notifyEnd($token); + } + + /** + * Notifier that is called when an end token is processed + * @param HTMLPurifier_Token $token Current token variable. + * @note This differs from handlers in that the token is read-only + * @deprecated + */ + public function notifyEnd($token) + { + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/AutoParagraph.php similarity index 81% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector/AutoParagraph.php index 8cc952549cc4c05e523d6c9ef0c60c4da4aaf49e..d3ec44f1c27e407936956d554a683ef314fe6ac9 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/AutoParagraph.php @@ -1,340 +1,356 @@ -<?php - -/** - * Injector that auto paragraphs text in the root node based on - * double-spacing. - * @todo Ensure all states are unit tested, including variations as well. - * @todo Make a graph of the flow control for this Injector. - */ -class HTMLPurifier_Injector_AutoParagraph extends HTMLPurifier_Injector -{ - - public $name = 'AutoParagraph'; - public $needed = array('p'); - - private function _pStart() { - $par = new HTMLPurifier_Token_Start('p'); - $par->armor['MakeWellFormed_TagClosedError'] = true; - return $par; - } - - public function handleText(&$token) { - $text = $token->data; - // Does the current parent allow <p> tags? - if ($this->allowsElement('p')) { - if (empty($this->currentNesting) || strpos($text, "\n\n") !== false) { - // Note that we have differing behavior when dealing with text - // in the anonymous root node, or a node inside the document. - // If the text as a double-newline, the treatment is the same; - // if it doesn't, see the next if-block if you're in the document. - - $i = $nesting = null; - if (!$this->forwardUntilEndToken($i, $current, $nesting) && $token->is_whitespace) { - // State 1.1: ... ^ (whitespace, then document end) - // ---- - // This is a degenerate case - } else { - // State 1.2: PAR1 - // ---- - - // State 1.3: PAR1\n\nPAR2 - // ------------ - - // State 1.4: <div>PAR1\n\nPAR2 (see State 2) - // ------------ - $token = array($this->_pStart()); - $this->_splitText($text, $token); - } - } else { - // State 2: <div>PAR1... (similar to 1.4) - // ---- - - // We're in an element that allows paragraph tags, but we're not - // sure if we're going to need them. - if ($this->_pLookAhead()) { - // State 2.1: <div>PAR1<b>PAR1\n\nPAR2 - // ---- - // Note: This will always be the first child, since any - // previous inline element would have triggered this very - // same routine, and found the double newline. One possible - // exception would be a comment. - $token = array($this->_pStart(), $token); - } else { - // State 2.2.1: <div>PAR1<div> - // ---- - - // State 2.2.2: <div>PAR1<b>PAR1</b></div> - // ---- - } - } - // Is the current parent a <p> tag? - } elseif ( - !empty($this->currentNesting) && - $this->currentNesting[count($this->currentNesting)-1]->name == 'p' - ) { - // State 3.1: ...<p>PAR1 - // ---- - - // State 3.2: ...<p>PAR1\n\nPAR2 - // ------------ - $token = array(); - $this->_splitText($text, $token); - // Abort! - } else { - // State 4.1: ...<b>PAR1 - // ---- - - // State 4.2: ...<b>PAR1\n\nPAR2 - // ------------ - } - } - - public function handleElement(&$token) { - // We don't have to check if we're already in a <p> tag for block - // tokens, because the tag would have been autoclosed by MakeWellFormed. - if ($this->allowsElement('p')) { - if (!empty($this->currentNesting)) { - if ($this->_isInline($token)) { - // State 1: <div>...<b> - // --- - - // Check if this token is adjacent to the parent token - // (seek backwards until token isn't whitespace) - $i = null; - $this->backward($i, $prev); - - if (!$prev instanceof HTMLPurifier_Token_Start) { - // Token wasn't adjacent - - if ( - $prev instanceof HTMLPurifier_Token_Text && - substr($prev->data, -2) === "\n\n" - ) { - // State 1.1.4: <div><p>PAR1</p>\n\n<b> - // --- - - // Quite frankly, this should be handled by splitText - $token = array($this->_pStart(), $token); - } else { - // State 1.1.1: <div><p>PAR1</p><b> - // --- - - // State 1.1.2: <div><br /><b> - // --- - - // State 1.1.3: <div>PAR<b> - // --- - } - - } else { - // State 1.2.1: <div><b> - // --- - - // Lookahead to see if <p> is needed. - if ($this->_pLookAhead()) { - // State 1.3.1: <div><b>PAR1\n\nPAR2 - // --- - $token = array($this->_pStart(), $token); - } else { - // State 1.3.2: <div><b>PAR1</b></div> - // --- - - // State 1.3.3: <div><b>PAR1</b><div></div>\n\n</div> - // --- - } - } - } else { - // State 2.3: ...<div> - // ----- - } - } else { - if ($this->_isInline($token)) { - // State 3.1: <b> - // --- - // This is where the {p} tag is inserted, not reflected in - // inputTokens yet, however. - $token = array($this->_pStart(), $token); - } else { - // State 3.2: <div> - // ----- - } - - $i = null; - if ($this->backward($i, $prev)) { - if ( - !$prev instanceof HTMLPurifier_Token_Text - ) { - // State 3.1.1: ...</p>{p}<b> - // --- - - // State 3.2.1: ...</p><div> - // ----- - - if (!is_array($token)) $token = array($token); - array_unshift($token, new HTMLPurifier_Token_Text("\n\n")); - } else { - // State 3.1.2: ...</p>\n\n{p}<b> - // --- - - // State 3.2.2: ...</p>\n\n<div> - // ----- - - // Note: PAR<ELEM> cannot occur because PAR would have been - // wrapped in <p> tags. - } - } - } - } else { - // State 2.2: <ul><li> - // ---- - - // State 2.4: <p><b> - // --- - } - } - - /** - * Splits up a text in paragraph tokens and appends them - * to the result stream that will replace the original - * @param $data String text data that will be processed - * into paragraphs - * @param $result Reference to array of tokens that the - * tags will be appended onto - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - */ - private function _splitText($data, &$result) { - $raw_paragraphs = explode("\n\n", $data); - $paragraphs = array(); // without empty paragraphs - $needs_start = false; - $needs_end = false; - - $c = count($raw_paragraphs); - if ($c == 1) { - // There were no double-newlines, abort quickly. In theory this - // should never happen. - $result[] = new HTMLPurifier_Token_Text($data); - return; - } - for ($i = 0; $i < $c; $i++) { - $par = $raw_paragraphs[$i]; - if (trim($par) !== '') { - $paragraphs[] = $par; - } else { - if ($i == 0) { - // Double newline at the front - if (empty($result)) { - // The empty result indicates that the AutoParagraph - // injector did not add any start paragraph tokens. - // This means that we have been in a paragraph for - // a while, and the newline means we should start a new one. - $result[] = new HTMLPurifier_Token_End('p'); - $result[] = new HTMLPurifier_Token_Text("\n\n"); - // However, the start token should only be added if - // there is more processing to be done (i.e. there are - // real paragraphs in here). If there are none, the - // next start paragraph tag will be handled by the - // next call to the injector - $needs_start = true; - } else { - // We just started a new paragraph! - // Reinstate a double-newline for presentation's sake, since - // it was in the source code. - array_unshift($result, new HTMLPurifier_Token_Text("\n\n")); - } - } elseif ($i + 1 == $c) { - // Double newline at the end - // There should be a trailing </p> when we're finally done. - $needs_end = true; - } - } - } - - // Check if this was just a giant blob of whitespace. Move this earlier, - // perhaps? - if (empty($paragraphs)) { - return; - } - - // Add the start tag indicated by \n\n at the beginning of $data - if ($needs_start) { - $result[] = $this->_pStart(); - } - - // Append the paragraphs onto the result - foreach ($paragraphs as $par) { - $result[] = new HTMLPurifier_Token_Text($par); - $result[] = new HTMLPurifier_Token_End('p'); - $result[] = new HTMLPurifier_Token_Text("\n\n"); - $result[] = $this->_pStart(); - } - - // Remove trailing start token; Injector will handle this later if - // it was indeed needed. This prevents from needing to do a lookahead, - // at the cost of a lookbehind later. - array_pop($result); - - // If there is no need for an end tag, remove all of it and let - // MakeWellFormed close it later. - if (!$needs_end) { - array_pop($result); // removes \n\n - array_pop($result); // removes </p> - } - - } - - /** - * Returns true if passed token is inline (and, ergo, allowed in - * paragraph tags) - */ - private function _isInline($token) { - return isset($this->htmlDefinition->info['p']->child->elements[$token->name]); - } - - /** - * Looks ahead in the token list and determines whether or not we need - * to insert a <p> tag. - */ - private function _pLookAhead() { - $this->current($i, $current); - if ($current instanceof HTMLPurifier_Token_Start) $nesting = 1; - else $nesting = 0; - $ok = false; - while ($this->forwardUntilEndToken($i, $current, $nesting)) { - $result = $this->_checkNeedsP($current); - if ($result !== null) { - $ok = $result; - break; - } - } - return $ok; - } - - /** - * Determines if a particular token requires an earlier inline token - * to get a paragraph. This should be used with _forwardUntilEndToken - */ - private function _checkNeedsP($current) { - if ($current instanceof HTMLPurifier_Token_Start){ - if (!$this->_isInline($current)) { - // <div>PAR1<div> - // ---- - // Terminate early, since we hit a block element - return false; - } - } elseif ($current instanceof HTMLPurifier_Token_Text) { - if (strpos($current->data, "\n\n") !== false) { - // <div>PAR1<b>PAR1\n\nPAR2 - // ---- - return true; - } else { - // <div>PAR1<b>PAR1... - // ---- - } - } - return null; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Injector that auto paragraphs text in the root node based on + * double-spacing. + * @todo Ensure all states are unit tested, including variations as well. + * @todo Make a graph of the flow control for this Injector. + */ +class HTMLPurifier_Injector_AutoParagraph extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'AutoParagraph'; + + /** + * @type array + */ + public $needed = array('p'); + + /** + * @return HTMLPurifier_Token_Start + */ + private function _pStart() + { + $par = new HTMLPurifier_Token_Start('p'); + $par->armor['MakeWellFormed_TagClosedError'] = true; + return $par; + } + + /** + * @param HTMLPurifier_Token_Text $token + */ + public function handleText(&$token) + { + $text = $token->data; + // Does the current parent allow <p> tags? + if ($this->allowsElement('p')) { + if (empty($this->currentNesting) || strpos($text, "\n\n") !== false) { + // Note that we have differing behavior when dealing with text + // in the anonymous root node, or a node inside the document. + // If the text as a double-newline, the treatment is the same; + // if it doesn't, see the next if-block if you're in the document. + + $i = $nesting = null; + if (!$this->forwardUntilEndToken($i, $current, $nesting) && $token->is_whitespace) { + // State 1.1: ... ^ (whitespace, then document end) + // ---- + // This is a degenerate case + } else { + if (!$token->is_whitespace || $this->_isInline($current)) { + // State 1.2: PAR1 + // ---- + + // State 1.3: PAR1\n\nPAR2 + // ------------ + + // State 1.4: <div>PAR1\n\nPAR2 (see State 2) + // ------------ + $token = array($this->_pStart()); + $this->_splitText($text, $token); + } else { + // State 1.5: \n<hr /> + // -- + } + } + } else { + // State 2: <div>PAR1... (similar to 1.4) + // ---- + + // We're in an element that allows paragraph tags, but we're not + // sure if we're going to need them. + if ($this->_pLookAhead()) { + // State 2.1: <div>PAR1<b>PAR1\n\nPAR2 + // ---- + // Note: This will always be the first child, since any + // previous inline element would have triggered this very + // same routine, and found the double newline. One possible + // exception would be a comment. + $token = array($this->_pStart(), $token); + } else { + // State 2.2.1: <div>PAR1<div> + // ---- + + // State 2.2.2: <div>PAR1<b>PAR1</b></div> + // ---- + } + } + // Is the current parent a <p> tag? + } elseif (!empty($this->currentNesting) && + $this->currentNesting[count($this->currentNesting) - 1]->name == 'p') { + // State 3.1: ...<p>PAR1 + // ---- + + // State 3.2: ...<p>PAR1\n\nPAR2 + // ------------ + $token = array(); + $this->_splitText($text, $token); + // Abort! + } else { + // State 4.1: ...<b>PAR1 + // ---- + + // State 4.2: ...<b>PAR1\n\nPAR2 + // ------------ + } + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleElement(&$token) + { + // We don't have to check if we're already in a <p> tag for block + // tokens, because the tag would have been autoclosed by MakeWellFormed. + if ($this->allowsElement('p')) { + if (!empty($this->currentNesting)) { + if ($this->_isInline($token)) { + // State 1: <div>...<b> + // --- + // Check if this token is adjacent to the parent token + // (seek backwards until token isn't whitespace) + $i = null; + $this->backward($i, $prev); + + if (!$prev instanceof HTMLPurifier_Token_Start) { + // Token wasn't adjacent + if ($prev instanceof HTMLPurifier_Token_Text && + substr($prev->data, -2) === "\n\n" + ) { + // State 1.1.4: <div><p>PAR1</p>\n\n<b> + // --- + // Quite frankly, this should be handled by splitText + $token = array($this->_pStart(), $token); + } else { + // State 1.1.1: <div><p>PAR1</p><b> + // --- + // State 1.1.2: <div><br /><b> + // --- + // State 1.1.3: <div>PAR<b> + // --- + } + } else { + // State 1.2.1: <div><b> + // --- + // Lookahead to see if <p> is needed. + if ($this->_pLookAhead()) { + // State 1.3.1: <div><b>PAR1\n\nPAR2 + // --- + $token = array($this->_pStart(), $token); + } else { + // State 1.3.2: <div><b>PAR1</b></div> + // --- + + // State 1.3.3: <div><b>PAR1</b><div></div>\n\n</div> + // --- + } + } + } else { + // State 2.3: ...<div> + // ----- + } + } else { + if ($this->_isInline($token)) { + // State 3.1: <b> + // --- + // This is where the {p} tag is inserted, not reflected in + // inputTokens yet, however. + $token = array($this->_pStart(), $token); + } else { + // State 3.2: <div> + // ----- + } + + $i = null; + if ($this->backward($i, $prev)) { + if (!$prev instanceof HTMLPurifier_Token_Text) { + // State 3.1.1: ...</p>{p}<b> + // --- + // State 3.2.1: ...</p><div> + // ----- + if (!is_array($token)) { + $token = array($token); + } + array_unshift($token, new HTMLPurifier_Token_Text("\n\n")); + } else { + // State 3.1.2: ...</p>\n\n{p}<b> + // --- + // State 3.2.2: ...</p>\n\n<div> + // ----- + // Note: PAR<ELEM> cannot occur because PAR would have been + // wrapped in <p> tags. + } + } + } + } else { + // State 2.2: <ul><li> + // ---- + // State 2.4: <p><b> + // --- + } + } + + /** + * Splits up a text in paragraph tokens and appends them + * to the result stream that will replace the original + * @param string $data String text data that will be processed + * into paragraphs + * @param HTMLPurifier_Token[] $result Reference to array of tokens that the + * tags will be appended onto + */ + private function _splitText($data, &$result) + { + $raw_paragraphs = explode("\n\n", $data); + $paragraphs = array(); // without empty paragraphs + $needs_start = false; + $needs_end = false; + + $c = count($raw_paragraphs); + if ($c == 1) { + // There were no double-newlines, abort quickly. In theory this + // should never happen. + $result[] = new HTMLPurifier_Token_Text($data); + return; + } + for ($i = 0; $i < $c; $i++) { + $par = $raw_paragraphs[$i]; + if (trim($par) !== '') { + $paragraphs[] = $par; + } else { + if ($i == 0) { + // Double newline at the front + if (empty($result)) { + // The empty result indicates that the AutoParagraph + // injector did not add any start paragraph tokens. + // This means that we have been in a paragraph for + // a while, and the newline means we should start a new one. + $result[] = new HTMLPurifier_Token_End('p'); + $result[] = new HTMLPurifier_Token_Text("\n\n"); + // However, the start token should only be added if + // there is more processing to be done (i.e. there are + // real paragraphs in here). If there are none, the + // next start paragraph tag will be handled by the + // next call to the injector + $needs_start = true; + } else { + // We just started a new paragraph! + // Reinstate a double-newline for presentation's sake, since + // it was in the source code. + array_unshift($result, new HTMLPurifier_Token_Text("\n\n")); + } + } elseif ($i + 1 == $c) { + // Double newline at the end + // There should be a trailing </p> when we're finally done. + $needs_end = true; + } + } + } + + // Check if this was just a giant blob of whitespace. Move this earlier, + // perhaps? + if (empty($paragraphs)) { + return; + } + + // Add the start tag indicated by \n\n at the beginning of $data + if ($needs_start) { + $result[] = $this->_pStart(); + } + + // Append the paragraphs onto the result + foreach ($paragraphs as $par) { + $result[] = new HTMLPurifier_Token_Text($par); + $result[] = new HTMLPurifier_Token_End('p'); + $result[] = new HTMLPurifier_Token_Text("\n\n"); + $result[] = $this->_pStart(); + } + + // Remove trailing start token; Injector will handle this later if + // it was indeed needed. This prevents from needing to do a lookahead, + // at the cost of a lookbehind later. + array_pop($result); + + // If there is no need for an end tag, remove all of it and let + // MakeWellFormed close it later. + if (!$needs_end) { + array_pop($result); // removes \n\n + array_pop($result); // removes </p> + } + } + + /** + * Returns true if passed token is inline (and, ergo, allowed in + * paragraph tags) + * @param HTMLPurifier_Token $token + * @return bool + */ + private function _isInline($token) + { + return isset($this->htmlDefinition->info['p']->child->elements[$token->name]); + } + + /** + * Looks ahead in the token list and determines whether or not we need + * to insert a <p> tag. + * @return bool + */ + private function _pLookAhead() + { + if ($this->currentToken instanceof HTMLPurifier_Token_Start) { + $nesting = 1; + } else { + $nesting = 0; + } + $ok = false; + $i = null; + while ($this->forwardUntilEndToken($i, $current, $nesting)) { + $result = $this->_checkNeedsP($current); + if ($result !== null) { + $ok = $result; + break; + } + } + return $ok; + } + + /** + * Determines if a particular token requires an earlier inline token + * to get a paragraph. This should be used with _forwardUntilEndToken + * @param HTMLPurifier_Token $current + * @return bool + */ + private function _checkNeedsP($current) + { + if ($current instanceof HTMLPurifier_Token_Start) { + if (!$this->_isInline($current)) { + // <div>PAR1<div> + // ---- + // Terminate early, since we hit a block element + return false; + } + } elseif ($current instanceof HTMLPurifier_Token_Text) { + if (strpos($current->data, "\n\n") !== false) { + // <div>PAR1<b>PAR1\n\nPAR2 + // ---- + return true; + } else { + // <div>PAR1<b>PAR1... + // ---- + } + } + return null; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/DisplayLinkURI.php similarity index 61% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector/DisplayLinkURI.php index 9dce9bd0857f3b80fead39894609a7f49413be9b..9f9044829deb08dd18082130be59683f62c33296 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/DisplayLinkURI.php @@ -1,26 +1,40 @@ -<?php - -/** - * Injector that displays the URL of an anchor instead of linking to it, in addition to showing the text of the link. - */ -class HTMLPurifier_Injector_DisplayLinkURI extends HTMLPurifier_Injector -{ - - public $name = 'DisplayLinkURI'; - public $needed = array('a'); - - public function handleElement(&$token) { - } - - public function handleEnd(&$token) { - if (isset($token->start->attr['href'])){ - $url = $token->start->attr['href']; - unset($token->start->attr['href']); - $token = array($token, new HTMLPurifier_Token_Text(" ($url)")); - } else { - // nothing to display - } - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Injector that displays the URL of an anchor instead of linking to it, in addition to showing the text of the link. + */ +class HTMLPurifier_Injector_DisplayLinkURI extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'DisplayLinkURI'; + + /** + * @type array + */ + public $needed = array('a'); + + /** + * @param $token + */ + public function handleElement(&$token) + { + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleEnd(&$token) + { + if (isset($token->start->attr['href'])) { + $url = $token->start->attr['href']; + unset($token->start->attr['href']); + $token = array($token, new HTMLPurifier_Token_Text(" ($url)")); + } else { + // nothing to display + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/Linkify.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector/Linkify.php index 296dac282996255c811ab9908c9ed6f512ab924d..531dde4acf1248b61b3c5563a8e7dc6b798d028c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/Linkify.php @@ -1,46 +1,64 @@ -<?php - -/** - * Injector that converts http, https and ftp text URLs to actual links. - */ -class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector -{ - - public $name = 'Linkify'; - public $needed = array('a' => array('href')); - - public function handleText(&$token) { - if (!$this->allowsElement('a')) return; - - if (strpos($token->data, '://') === false) { - // our really quick heuristic failed, abort - // this may not work so well if we want to match things like - // "google.com", but then again, most people don't - return; - } - - // there is/are URL(s). Let's split the string: - // Note: this regex is extremely permissive - $bits = preg_split('#((?:https?|ftp)://[^\s\'"<>()]+)#S', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE); - - $token = array(); - - // $i = index - // $c = count - // $l = is link - for ($i = 0, $c = count($bits), $l = false; $i < $c; $i++, $l = !$l) { - if (!$l) { - if ($bits[$i] === '') continue; - $token[] = new HTMLPurifier_Token_Text($bits[$i]); - } else { - $token[] = new HTMLPurifier_Token_Start('a', array('href' => $bits[$i])); - $token[] = new HTMLPurifier_Token_Text($bits[$i]); - $token[] = new HTMLPurifier_Token_End('a'); - } - } - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Injector that converts http, https and ftp text URLs to actual links. + */ +class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'Linkify'; + + /** + * @type array + */ + public $needed = array('a' => array('href')); + + /** + * @param HTMLPurifier_Token $token + */ + public function handleText(&$token) + { + if (!$this->allowsElement('a')) { + return; + } + + if (strpos($token->data, '://') === false) { + // our really quick heuristic failed, abort + // this may not work so well if we want to match things like + // "google.com", but then again, most people don't + return; + } + + // there is/are URL(s). Let's split the string. + // We use this regex: + // https://gist.github.com/gruber/249502 + // but with @cscott's backtracking fix and also + // the Unicode characters un-Unicodified. + $bits = preg_split( + '/\\b((?:[a-z][\\w\\-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'".,<>?\x{00ab}\x{00bb}\x{201c}\x{201d}\x{2018}\x{2019}]))/iu', + $token->data, -1, PREG_SPLIT_DELIM_CAPTURE); + + + $token = array(); + + // $i = index + // $c = count + // $l = is link + for ($i = 0, $c = count($bits), $l = false; $i < $c; $i++, $l = !$l) { + if (!$l) { + if ($bits[$i] === '') { + continue; + } + $token[] = new HTMLPurifier_Token_Text($bits[$i]); + } else { + $token[] = new HTMLPurifier_Token_Start('a', array('href' => $bits[$i])); + $token[] = new HTMLPurifier_Token_Text($bits[$i]); + $token[] = new HTMLPurifier_Token_End('a'); + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/PurifierLinkify.php similarity index 52% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector/PurifierLinkify.php index 3c706a33aff4934e0d49c54ad6ded042687e2840..d7dd7d972ae54cabb78d32f95d4e0b555395ca2a 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/PurifierLinkify.php @@ -1,45 +1,71 @@ -<?php - -/** - * Injector that converts configuration directive syntax %Namespace.Directive - * to links - */ -class HTMLPurifier_Injector_PurifierLinkify extends HTMLPurifier_Injector -{ - - public $name = 'PurifierLinkify'; - public $docURL; - public $needed = array('a' => array('href')); - - public function prepare($config, $context) { - $this->docURL = $config->get('AutoFormatParam', 'PurifierLinkifyDocURL'); - return parent::prepare($config, $context); - } - - public function handleText(&$token) { - if (!$this->allowsElement('a')) return; - if (strpos($token->data, '%') === false) return; - - $bits = preg_split('#%([a-z0-9]+\.[a-z0-9]+)#Si', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE); - $token = array(); - - // $i = index - // $c = count - // $l = is link - for ($i = 0, $c = count($bits), $l = false; $i < $c; $i++, $l = !$l) { - if (!$l) { - if ($bits[$i] === '') continue; - $token[] = new HTMLPurifier_Token_Text($bits[$i]); - } else { - $token[] = new HTMLPurifier_Token_Start('a', - array('href' => str_replace('%s', $bits[$i], $this->docURL))); - $token[] = new HTMLPurifier_Token_Text('%' . $bits[$i]); - $token[] = new HTMLPurifier_Token_End('a'); - } - } - - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Injector that converts configuration directive syntax %Namespace.Directive + * to links + */ +class HTMLPurifier_Injector_PurifierLinkify extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'PurifierLinkify'; + + /** + * @type string + */ + public $docURL; + + /** + * @type array + */ + public $needed = array('a' => array('href')); + + /** + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function prepare($config, $context) + { + $this->docURL = $config->get('AutoFormat.PurifierLinkify.DocURL'); + return parent::prepare($config, $context); + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleText(&$token) + { + if (!$this->allowsElement('a')) { + return; + } + if (strpos($token->data, '%') === false) { + return; + } + + $bits = preg_split('#%([a-z0-9]+\.[a-z0-9]+)#Si', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE); + $token = array(); + + // $i = index + // $c = count + // $l = is link + for ($i = 0, $c = count($bits), $l = false; $i < $c; $i++, $l = !$l) { + if (!$l) { + if ($bits[$i] === '') { + continue; + } + $token[] = new HTMLPurifier_Token_Text($bits[$i]); + } else { + $token[] = new HTMLPurifier_Token_Start( + 'a', + array('href' => str_replace('%s', $bits[$i], $this->docURL)) + ); + $token[] = new HTMLPurifier_Token_Text('%' . $bits[$i]); + $token[] = new HTMLPurifier_Token_End('a'); + } + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveEmpty.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveEmpty.php new file mode 100644 index 0000000000000000000000000000000000000000..aae2dca1a7636f4c95173475dc0a1bbd5e8e1420 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveEmpty.php @@ -0,0 +1,112 @@ +<?php + +class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector +{ + /** + * @type HTMLPurifier_Context + */ + private $context; + + /** + * @type HTMLPurifier_Config + */ + private $config; + + /** + * @type HTMLPurifier_AttrValidator + */ + private $attrValidator; + + /** + * @type bool + */ + private $removeNbsp; + + /** + * @type bool + */ + private $removeNbspExceptions; + + /** + * Cached contents of %AutoFormat.RemoveEmpty.Predicate + * @type array + */ + private $exclude; + + /** + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return void + */ + public function prepare($config, $context) + { + parent::prepare($config, $context); + $this->config = $config; + $this->context = $context; + $this->removeNbsp = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp'); + $this->removeNbspExceptions = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions'); + $this->exclude = $config->get('AutoFormat.RemoveEmpty.Predicate'); + foreach ($this->exclude as $key => $attrs) { + if (!is_array($attrs)) { + // HACK, see HTMLPurifier/Printer/ConfigForm.php + $this->exclude[$key] = explode(';', $attrs); + } + } + $this->attrValidator = new HTMLPurifier_AttrValidator(); + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleElement(&$token) + { + if (!$token instanceof HTMLPurifier_Token_Start) { + return; + } + $next = false; + $deleted = 1; // the current tag + for ($i = count($this->inputZipper->back) - 1; $i >= 0; $i--, $deleted++) { + $next = $this->inputZipper->back[$i]; + if ($next instanceof HTMLPurifier_Token_Text) { + if ($next->is_whitespace) { + continue; + } + if ($this->removeNbsp && !isset($this->removeNbspExceptions[$token->name])) { + $plain = str_replace("\xC2\xA0", "", $next->data); + $isWsOrNbsp = $plain === '' || ctype_space($plain); + if ($isWsOrNbsp) { + continue; + } + } + } + break; + } + if (!$next || ($next instanceof HTMLPurifier_Token_End && $next->name == $token->name)) { + $this->attrValidator->validateToken($token, $this->config, $this->context); + $token->armor['ValidateAttributes'] = true; + if (isset($this->exclude[$token->name])) { + $r = true; + foreach ($this->exclude[$token->name] as $elem) { + if (!isset($token->attr[$elem])) $r = false; + } + if ($r) return; + } + if (isset($token->attr['id']) || isset($token->attr['name'])) { + return; + } + $token = $deleted + 1; + for ($b = 0, $c = count($this->inputZipper->front); $b < $c; $b++) { + $prev = $this->inputZipper->front[$b]; + if ($prev instanceof HTMLPurifier_Token_Text && $prev->is_whitespace) { + continue; + } + break; + } + // This is safe because we removed the token that triggered this. + $this->rewindOffset($b+$deleted); + return; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php new file mode 100644 index 0000000000000000000000000000000000000000..270b7f828c03273b8198d2f24f4c8fa9574582fa --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php @@ -0,0 +1,84 @@ +<?php + +/** + * Injector that removes spans with no attributes + */ +class HTMLPurifier_Injector_RemoveSpansWithoutAttributes extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'RemoveSpansWithoutAttributes'; + + /** + * @type array + */ + public $needed = array('span'); + + /** + * @type HTMLPurifier_AttrValidator + */ + private $attrValidator; + + /** + * Used by AttrValidator. + * @type HTMLPurifier_Config + */ + private $config; + + /** + * @type HTMLPurifier_Context + */ + private $context; + + public function prepare($config, $context) + { + $this->attrValidator = new HTMLPurifier_AttrValidator(); + $this->config = $config; + $this->context = $context; + return parent::prepare($config, $context); + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleElement(&$token) + { + if ($token->name !== 'span' || !$token instanceof HTMLPurifier_Token_Start) { + return; + } + + // We need to validate the attributes now since this doesn't normally + // happen until after MakeWellFormed. If all the attributes are removed + // the span needs to be removed too. + $this->attrValidator->validateToken($token, $this->config, $this->context); + $token->armor['ValidateAttributes'] = true; + + if (!empty($token->attr)) { + return; + } + + $nesting = 0; + while ($this->forwardUntilEndToken($i, $current, $nesting)) { + } + + if ($current instanceof HTMLPurifier_Token_End && $current->name === 'span') { + // Mark closing span tag for deletion + $current->markForDeletion = true; + // Delete open span tag + $token = false; + } + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleEnd(&$token) + { + if ($token->markForDeletion) { + $token = false; + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/SafeObject.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Injector/SafeObject.php index 34158286858c6dcb65d85f866fadbf03a47ef988..0b051101d3d150fb86addc804bee973ff65b021b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Injector/SafeObject.php @@ -1,87 +1,124 @@ -<?php - -/** - * Adds important param elements to inside of object in order to make - * things safe. - */ -class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector -{ - public $name = 'SafeObject'; - public $needed = array('object', 'param'); - - protected $objectStack = array(); - protected $paramStack = array(); - - // Keep this synchronized with AttrTransform/SafeParam.php - protected $addParam = array( - 'allowScriptAccess' => 'never', - 'allowNetworking' => 'internal', - ); - protected $allowedParam = array( - 'wmode' => true, - 'movie' => true, - ); - - public function prepare($config, $context) { - parent::prepare($config, $context); - } - - public function handleElement(&$token) { - if ($token->name == 'object') { - $this->objectStack[] = $token; - $this->paramStack[] = array(); - $new = array($token); - foreach ($this->addParam as $name => $value) { - $new[] = new HTMLPurifier_Token_Empty('param', array('name' => $name, 'value' => $value)); - } - $token = $new; - } elseif ($token->name == 'param') { - $nest = count($this->currentNesting) - 1; - if ($nest >= 0 && $this->currentNesting[$nest]->name === 'object') { - $i = count($this->objectStack) - 1; - if (!isset($token->attr['name'])) { - $token = false; - return; - } - $n = $token->attr['name']; - // We need this fix because YouTube doesn't supply a data - // attribute, which we need if a type is specified. This is - // *very* Flash specific. - if (!isset($this->objectStack[$i]->attr['data']) && $token->attr['name'] == 'movie') { - $this->objectStack[$i]->attr['data'] = $token->attr['value']; - } - // Check if the parameter is the correct value but has not - // already been added - if ( - !isset($this->paramStack[$i][$n]) && - isset($this->addParam[$n]) && - $token->attr['name'] === $this->addParam[$n] - ) { - // keep token, and add to param stack - $this->paramStack[$i][$n] = true; - } elseif (isset($this->allowedParam[$n])) { - // keep token, don't do anything to it - // (could possibly check for duplicates here) - } else { - $token = false; - } - } else { - // not directly inside an object, DENY! - $token = false; - } - } - } - - public function handleEnd(&$token) { - // This is the WRONG way of handling the object and param stacks; - // we should be inserting them directly on the relevant object tokens - // so that the global stack handling handles it. - if ($token->name == 'object') { - array_pop($this->objectStack); - array_pop($this->paramStack); - } - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Adds important param elements to inside of object in order to make + * things safe. + */ +class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector +{ + /** + * @type string + */ + public $name = 'SafeObject'; + + /** + * @type array + */ + public $needed = array('object', 'param'); + + /** + * @type array + */ + protected $objectStack = array(); + + /** + * @type array + */ + protected $paramStack = array(); + + /** + * Keep this synchronized with AttrTransform/SafeParam.php. + * @type array + */ + protected $addParam = array( + 'allowScriptAccess' => 'never', + 'allowNetworking' => 'internal', + ); + + /** + * These are all lower-case keys. + * @type array + */ + protected $allowedParam = array( + 'wmode' => true, + 'movie' => true, + 'flashvars' => true, + 'src' => true, + 'allowfullscreen' => true, // if omitted, assume to be 'false' + ); + + /** + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return void + */ + public function prepare($config, $context) + { + parent::prepare($config, $context); + } + + /** + * @param HTMLPurifier_Token $token + */ + public function handleElement(&$token) + { + if ($token->name == 'object') { + $this->objectStack[] = $token; + $this->paramStack[] = array(); + $new = array($token); + foreach ($this->addParam as $name => $value) { + $new[] = new HTMLPurifier_Token_Empty('param', array('name' => $name, 'value' => $value)); + } + $token = $new; + } elseif ($token->name == 'param') { + $nest = count($this->currentNesting) - 1; + if ($nest >= 0 && $this->currentNesting[$nest]->name === 'object') { + $i = count($this->objectStack) - 1; + if (!isset($token->attr['name'])) { + $token = false; + return; + } + $n = $token->attr['name']; + // We need this fix because YouTube doesn't supply a data + // attribute, which we need if a type is specified. This is + // *very* Flash specific. + if (!isset($this->objectStack[$i]->attr['data']) && + ($token->attr['name'] == 'movie' || $token->attr['name'] == 'src') + ) { + $this->objectStack[$i]->attr['data'] = $token->attr['value']; + } + // Check if the parameter is the correct value but has not + // already been added + if (!isset($this->paramStack[$i][$n]) && + isset($this->addParam[$n]) && + $token->attr['name'] === $this->addParam[$n]) { + // keep token, and add to param stack + $this->paramStack[$i][$n] = true; + } elseif (isset($this->allowedParam[strtolower($n)])) { + // keep token, don't do anything to it + // (could possibly check for duplicates here) + // Note: In principle, parameters should be case sensitive. + // But it seems they are not really; so accept any case. + } else { + $token = false; + } + } else { + // not directly inside an object, DENY! + $token = false; + } + } + } + + public function handleEnd(&$token) + { + // This is the WRONG way of handling the object and param stacks; + // we should be inserting them directly on the relevant object tokens + // so that the global stack handling handles it. + if ($token->name == 'object') { + array_pop($this->objectStack); + array_pop($this->paramStack); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Language.php b/libraries/htmlpurifier410/library/HTMLPurifier/Language.php similarity index 65% rename from libraries/htmlpurifier/library/HTMLPurifier/Language.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Language.php index 3e2be03b584578bc944c389a0b80b49220399186..35a13f785d0f6a1c47a328da632773508ba99719 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Language.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Language.php @@ -1,163 +1,204 @@ -<?php - -/** - * Represents a language and defines localizable string formatting and - * other functions, as well as the localized messages for HTML Purifier. - */ -class HTMLPurifier_Language -{ - - /** - * ISO 639 language code of language. Prefers shortest possible version - */ - public $code = 'en'; - - /** - * Fallback language code - */ - public $fallback = false; - - /** - * Array of localizable messages - */ - public $messages = array(); - - /** - * Array of localizable error codes - */ - public $errorNames = array(); - - /** - * True if no message file was found for this language, so English - * is being used instead. Check this if you'd like to notify the - * user that they've used a non-supported language. - */ - public $error = false; - - /** - * Has the language object been loaded yet? - * @todo Make it private, fix usage in HTMLPurifier_LanguageTest - */ - public $_loaded = false; - - /** - * Instances of HTMLPurifier_Config and HTMLPurifier_Context - */ - protected $config, $context; - - public function __construct($config, $context) { - $this->config = $config; - $this->context = $context; - } - - /** - * Loads language object with necessary info from factory cache - * @note This is a lazy loader - */ - public function load() { - if ($this->_loaded) return; - $factory = HTMLPurifier_LanguageFactory::instance(); - $factory->loadLanguage($this->code); - foreach ($factory->keys as $key) { - $this->$key = $factory->cache[$this->code][$key]; - } - $this->_loaded = true; - } - - /** - * Retrieves a localised message. - * @param $key string identifier of message - * @return string localised message - */ - public function getMessage($key) { - if (!$this->_loaded) $this->load(); - if (!isset($this->messages[$key])) return "[$key]"; - return $this->messages[$key]; - } - - /** - * Retrieves a localised error name. - * @param $int integer error number, corresponding to PHP's error - * reporting - * @return string localised message - */ - public function getErrorName($int) { - if (!$this->_loaded) $this->load(); - if (!isset($this->errorNames[$int])) return "[Error: $int]"; - return $this->errorNames[$int]; - } - - /** - * Converts an array list into a string readable representation - */ - public function listify($array) { - $sep = $this->getMessage('Item separator'); - $sep_last = $this->getMessage('Item separator last'); - $ret = ''; - for ($i = 0, $c = count($array); $i < $c; $i++) { - if ($i == 0) { - } elseif ($i + 1 < $c) { - $ret .= $sep; - } else { - $ret .= $sep_last; - } - $ret .= $array[$i]; - } - return $ret; - } - - /** - * Formats a localised message with passed parameters - * @param $key string identifier of message - * @param $args Parameters to substitute in - * @return string localised message - * @todo Implement conditionals? Right now, some messages make - * reference to line numbers, but those aren't always available - */ - public function formatMessage($key, $args = array()) { - if (!$this->_loaded) $this->load(); - if (!isset($this->messages[$key])) return "[$key]"; - $raw = $this->messages[$key]; - $subst = array(); - $generator = false; - foreach ($args as $i => $value) { - if (is_object($value)) { - if ($value instanceof HTMLPurifier_Token) { - // factor this out some time - if (!$generator) $generator = $this->context->get('Generator'); - if (isset($value->name)) $subst['$'.$i.'.Name'] = $value->name; - if (isset($value->data)) $subst['$'.$i.'.Data'] = $value->data; - $subst['$'.$i.'.Compact'] = - $subst['$'.$i.'.Serialized'] = $generator->generateFromToken($value); - // a more complex algorithm for compact representation - // could be introduced for all types of tokens. This - // may need to be factored out into a dedicated class - if (!empty($value->attr)) { - $stripped_token = clone $value; - $stripped_token->attr = array(); - $subst['$'.$i.'.Compact'] = $generator->generateFromToken($stripped_token); - } - $subst['$'.$i.'.Line'] = $value->line ? $value->line : 'unknown'; - } - continue; - } elseif (is_array($value)) { - $keys = array_keys($value); - if (array_keys($keys) === $keys) { - // list - $subst['$'.$i] = $this->listify($value); - } else { - // associative array - // no $i implementation yet, sorry - $subst['$'.$i.'.Keys'] = $this->listify($keys); - $subst['$'.$i.'.Values'] = $this->listify(array_values($value)); - } - continue; - } - $subst['$' . $i] = $value; - } - return strtr($raw, $subst); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Represents a language and defines localizable string formatting and + * other functions, as well as the localized messages for HTML Purifier. + */ +class HTMLPurifier_Language +{ + + /** + * ISO 639 language code of language. Prefers shortest possible version. + * @type string + */ + public $code = 'en'; + + /** + * Fallback language code. + * @type bool|string + */ + public $fallback = false; + + /** + * Array of localizable messages. + * @type array + */ + public $messages = array(); + + /** + * Array of localizable error codes. + * @type array + */ + public $errorNames = array(); + + /** + * True if no message file was found for this language, so English + * is being used instead. Check this if you'd like to notify the + * user that they've used a non-supported language. + * @type bool + */ + public $error = false; + + /** + * Has the language object been loaded yet? + * @type bool + * @todo Make it private, fix usage in HTMLPurifier_LanguageTest + */ + public $_loaded = false; + + /** + * @type HTMLPurifier_Config + */ + protected $config; + + /** + * @type HTMLPurifier_Context + */ + protected $context; + + /** + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + */ + public function __construct($config, $context) + { + $this->config = $config; + $this->context = $context; + } + + /** + * Loads language object with necessary info from factory cache + * @note This is a lazy loader + */ + public function load() + { + if ($this->_loaded) { + return; + } + $factory = HTMLPurifier_LanguageFactory::instance(); + $factory->loadLanguage($this->code); + foreach ($factory->keys as $key) { + $this->$key = $factory->cache[$this->code][$key]; + } + $this->_loaded = true; + } + + /** + * Retrieves a localised message. + * @param string $key string identifier of message + * @return string localised message + */ + public function getMessage($key) + { + if (!$this->_loaded) { + $this->load(); + } + if (!isset($this->messages[$key])) { + return "[$key]"; + } + return $this->messages[$key]; + } + + /** + * Retrieves a localised error name. + * @param int $int error number, corresponding to PHP's error reporting + * @return string localised message + */ + public function getErrorName($int) + { + if (!$this->_loaded) { + $this->load(); + } + if (!isset($this->errorNames[$int])) { + return "[Error: $int]"; + } + return $this->errorNames[$int]; + } + + /** + * Converts an array list into a string readable representation + * @param array $array + * @return string + */ + public function listify($array) + { + $sep = $this->getMessage('Item separator'); + $sep_last = $this->getMessage('Item separator last'); + $ret = ''; + for ($i = 0, $c = count($array); $i < $c; $i++) { + if ($i == 0) { + } elseif ($i + 1 < $c) { + $ret .= $sep; + } else { + $ret .= $sep_last; + } + $ret .= $array[$i]; + } + return $ret; + } + + /** + * Formats a localised message with passed parameters + * @param string $key string identifier of message + * @param array $args Parameters to substitute in + * @return string localised message + * @todo Implement conditionals? Right now, some messages make + * reference to line numbers, but those aren't always available + */ + public function formatMessage($key, $args = array()) + { + if (!$this->_loaded) { + $this->load(); + } + if (!isset($this->messages[$key])) { + return "[$key]"; + } + $raw = $this->messages[$key]; + $subst = array(); + $generator = false; + foreach ($args as $i => $value) { + if (is_object($value)) { + if ($value instanceof HTMLPurifier_Token) { + // factor this out some time + if (!$generator) { + $generator = $this->context->get('Generator'); + } + if (isset($value->name)) { + $subst['$'.$i.'.Name'] = $value->name; + } + if (isset($value->data)) { + $subst['$'.$i.'.Data'] = $value->data; + } + $subst['$'.$i.'.Compact'] = + $subst['$'.$i.'.Serialized'] = $generator->generateFromToken($value); + // a more complex algorithm for compact representation + // could be introduced for all types of tokens. This + // may need to be factored out into a dedicated class + if (!empty($value->attr)) { + $stripped_token = clone $value; + $stripped_token->attr = array(); + $subst['$'.$i.'.Compact'] = $generator->generateFromToken($stripped_token); + } + $subst['$'.$i.'.Line'] = $value->line ? $value->line : 'unknown'; + } + continue; + } elseif (is_array($value)) { + $keys = array_keys($value); + if (array_keys($keys) === $keys) { + // list + $subst['$'.$i] = $this->listify($value); + } else { + // associative array + // no $i implementation yet, sorry + $subst['$'.$i.'.Keys'] = $this->listify($keys); + $subst['$'.$i.'.Values'] = $this->listify(array_values($value)); + } + continue; + } + $subst['$' . $i] = $value; + } + return strtr($raw, $subst); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php b/libraries/htmlpurifier410/library/HTMLPurifier/Language/classes/en-x-test.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Language/classes/en-x-test.php index d52fcb7ac182678c7edcc123aeba30310563aecb..a6f8d1634373db753bb45411e91947322d41d9ac 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Language/classes/en-x-test.php @@ -1,12 +1,9 @@ -<?php - -// private class for unit testing - -class HTMLPurifier_Language_en_x_test extends HTMLPurifier_Language -{ - - - -} - -// vim: et sw=4 sts=4 +<?php + +// private class for unit testing + +class HTMLPurifier_Language_en_x_test extends HTMLPurifier_Language +{ +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-test.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-test.php index 1c046f379ef6fe9f8d568b796a7b7168ed5e982f..e6a174a07535c05572c280744bce88b2b8efbda1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-test.php @@ -1,11 +1,11 @@ -<?php - -// private language message file for unit testing purposes - -$fallback = 'en'; - -$messages = array( - 'HTMLPurifier' => 'HTML Purifier X' -); - -// vim: et sw=4 sts=4 +<?php + +// private language message file for unit testing purposes + +$fallback = 'en'; + +$messages = array( + 'HTMLPurifier' => 'HTML Purifier X' +); + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-testmini.php similarity index 95% rename from libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-testmini.php index 806c83fbf751d137927f0ef6d7c7cf0d1d144473..ed8560fd586342a349c11528542bdcc3c3a015a1 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en-x-testmini.php @@ -1,12 +1,12 @@ -<?php - -// private language message file for unit testing purposes -// this language file has no class associated with it - -$fallback = 'en'; - -$messages = array( - 'HTMLPurifier' => 'HTML Purifier XNone' -); - -// vim: et sw=4 sts=4 +<?php + +// private language message file for unit testing purposes +// this language file has no class associated with it + +$fallback = 'en'; + +$messages = array( + 'HTMLPurifier' => 'HTML Purifier XNone' +); + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en.php b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en.php new file mode 100644 index 0000000000000000000000000000000000000000..1fa30bdfedd18e4c746c2a9857d1b3cd716f640f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Language/messages/en.php @@ -0,0 +1,55 @@ +<?php + +$fallback = false; + +$messages = array( + + 'HTMLPurifier' => 'HTML Purifier', +// for unit testing purposes + 'LanguageFactoryTest: Pizza' => 'Pizza', + 'LanguageTest: List' => '$1', + 'LanguageTest: Hash' => '$1.Keys; $1.Values', + 'Item separator' => ', ', + 'Item separator last' => ' and ', // non-Harvard style + + 'ErrorCollector: No errors' => 'No errors detected. However, because error reporting is still incomplete, there may have been errors that the error collector was not notified of; please inspect the output HTML carefully.', + 'ErrorCollector: At line' => ' at line $line', + 'ErrorCollector: Incidental errors' => 'Incidental errors', + 'Lexer: Unclosed comment' => 'Unclosed comment', + 'Lexer: Unescaped lt' => 'Unescaped less-than sign (<) should be <', + 'Lexer: Missing gt' => 'Missing greater-than sign (>), previous less-than sign (<) should be escaped', + 'Lexer: Missing attribute key' => 'Attribute declaration has no key', + 'Lexer: Missing end quote' => 'Attribute declaration has no end quote', + 'Lexer: Extracted body' => 'Removed document metadata tags', + 'Strategy_RemoveForeignElements: Tag transform' => '<$1> element transformed into $CurrentToken.Serialized', + 'Strategy_RemoveForeignElements: Missing required attribute' => '$CurrentToken.Compact element missing required attribute $1', + 'Strategy_RemoveForeignElements: Foreign element to text' => 'Unrecognized $CurrentToken.Serialized tag converted to text', + 'Strategy_RemoveForeignElements: Foreign element removed' => 'Unrecognized $CurrentToken.Serialized tag removed', + 'Strategy_RemoveForeignElements: Comment removed' => 'Comment containing "$CurrentToken.Data" removed', + 'Strategy_RemoveForeignElements: Foreign meta element removed' => 'Unrecognized $CurrentToken.Serialized meta tag and all descendants removed', + 'Strategy_RemoveForeignElements: Token removed to end' => 'Tags and text starting from $1 element where removed to end', + 'Strategy_RemoveForeignElements: Trailing hyphen in comment removed' => 'Trailing hyphen(s) in comment removed', + 'Strategy_RemoveForeignElements: Hyphens in comment collapsed' => 'Double hyphens in comments are not allowed, and were collapsed into single hyphens', + 'Strategy_MakeWellFormed: Unnecessary end tag removed' => 'Unnecessary $CurrentToken.Serialized tag removed', + 'Strategy_MakeWellFormed: Unnecessary end tag to text' => 'Unnecessary $CurrentToken.Serialized tag converted to text', + 'Strategy_MakeWellFormed: Tag auto closed' => '$1.Compact started on line $1.Line auto-closed by $CurrentToken.Compact', + 'Strategy_MakeWellFormed: Tag carryover' => '$1.Compact started on line $1.Line auto-continued into $CurrentToken.Compact', + 'Strategy_MakeWellFormed: Stray end tag removed' => 'Stray $CurrentToken.Serialized tag removed', + 'Strategy_MakeWellFormed: Stray end tag to text' => 'Stray $CurrentToken.Serialized tag converted to text', + 'Strategy_MakeWellFormed: Tag closed by element end' => '$1.Compact tag started on line $1.Line closed by end of $CurrentToken.Serialized', + 'Strategy_MakeWellFormed: Tag closed by document end' => '$1.Compact tag started on line $1.Line closed by end of document', + 'Strategy_FixNesting: Node removed' => '$CurrentToken.Compact node removed', + 'Strategy_FixNesting: Node excluded' => '$CurrentToken.Compact node removed due to descendant exclusion by ancestor element', + 'Strategy_FixNesting: Node reorganized' => 'Contents of $CurrentToken.Compact node reorganized to enforce its content model', + 'Strategy_FixNesting: Node contents removed' => 'Contents of $CurrentToken.Compact node removed', + 'AttrValidator: Attributes transformed' => 'Attributes on $CurrentToken.Compact transformed from $1.Keys to $2.Keys', + 'AttrValidator: Attribute removed' => '$CurrentAttr.Name attribute on $CurrentToken.Compact removed', +); + +$errorNames = array( + E_ERROR => 'Error', + E_WARNING => 'Warning', + E_NOTICE => 'Notice' +); + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/LanguageFactory.php b/libraries/htmlpurifier410/library/HTMLPurifier/LanguageFactory.php similarity index 73% rename from libraries/htmlpurifier/library/HTMLPurifier/LanguageFactory.php rename to libraries/htmlpurifier410/library/HTMLPurifier/LanguageFactory.php index baa4422ebfa14c32067ea8df3aaf059863ad6aa7..e3e7a3b8d721ac99161320005eec2fd583159baa 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/LanguageFactory.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/LanguageFactory.php @@ -1,198 +1,209 @@ -<?php - -/** - * Class responsible for generating HTMLPurifier_Language objects, managing - * caching and fallbacks. - * @note Thanks to MediaWiki for the general logic, although this version - * has been entirely rewritten - * @todo Serialized cache for languages - */ -class HTMLPurifier_LanguageFactory -{ - - /** - * Cache of language code information used to load HTMLPurifier_Language objects - * Structure is: $factory->cache[$language_code][$key] = $value - * @value array map - */ - public $cache; - - /** - * Valid keys in the HTMLPurifier_Language object. Designates which - * variables to slurp out of a message file. - * @value array list - */ - public $keys = array('fallback', 'messages', 'errorNames'); - - /** - * Instance of HTMLPurifier_AttrDef_Lang to validate language codes - * @value object HTMLPurifier_AttrDef_Lang - */ - protected $validator; - - /** - * Cached copy of dirname(__FILE__), directory of current file without - * trailing slash - * @value string filename - */ - protected $dir; - - /** - * Keys whose contents are a hash map and can be merged - * @value array lookup - */ - protected $mergeable_keys_map = array('messages' => true, 'errorNames' => true); - - /** - * Keys whose contents are a list and can be merged - * @value array lookup - */ - protected $mergeable_keys_list = array(); - - /** - * Retrieve sole instance of the factory. - * @param $prototype Optional prototype to overload sole instance with, - * or bool true to reset to default factory. - */ - public static function instance($prototype = null) { - static $instance = null; - if ($prototype !== null) { - $instance = $prototype; - } elseif ($instance === null || $prototype == true) { - $instance = new HTMLPurifier_LanguageFactory(); - $instance->setup(); - } - return $instance; - } - - /** - * Sets up the singleton, much like a constructor - * @note Prevents people from getting this outside of the singleton - */ - public function setup() { - $this->validator = new HTMLPurifier_AttrDef_Lang(); - $this->dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier'; - } - - /** - * Creates a language object, handles class fallbacks - * @param $config Instance of HTMLPurifier_Config - * @param $context Instance of HTMLPurifier_Context - * @param $code Code to override configuration with. Private parameter. - */ - public function create($config, $context, $code = false) { - - // validate language code - if ($code === false) { - $code = $this->validator->validate( - $config->get('Core', 'Language'), $config, $context - ); - } else { - $code = $this->validator->validate($code, $config, $context); - } - if ($code === false) $code = 'en'; // malformed code becomes English - - $pcode = str_replace('-', '_', $code); // make valid PHP classname - static $depth = 0; // recursion protection - - if ($code == 'en') { - $lang = new HTMLPurifier_Language($config, $context); - } else { - $class = 'HTMLPurifier_Language_' . $pcode; - $file = $this->dir . '/Language/classes/' . $code . '.php'; - if (file_exists($file) || class_exists($class, false)) { - $lang = new $class($config, $context); - } else { - // Go fallback - $raw_fallback = $this->getFallbackFor($code); - $fallback = $raw_fallback ? $raw_fallback : 'en'; - $depth++; - $lang = $this->create($config, $context, $fallback); - if (!$raw_fallback) { - $lang->error = true; - } - $depth--; - } - } - - $lang->code = $code; - - return $lang; - - } - - /** - * Returns the fallback language for language - * @note Loads the original language into cache - * @param $code string language code - */ - public function getFallbackFor($code) { - $this->loadLanguage($code); - return $this->cache[$code]['fallback']; - } - - /** - * Loads language into the cache, handles message file and fallbacks - * @param $code string language code - */ - public function loadLanguage($code) { - static $languages_seen = array(); // recursion guard - - // abort if we've already loaded it - if (isset($this->cache[$code])) return; - - // generate filename - $filename = $this->dir . '/Language/messages/' . $code . '.php'; - - // default fallback : may be overwritten by the ensuing include - $fallback = ($code != 'en') ? 'en' : false; - - // load primary localisation - if (!file_exists($filename)) { - // skip the include: will rely solely on fallback - $filename = $this->dir . '/Language/messages/en.php'; - $cache = array(); - } else { - include $filename; - $cache = compact($this->keys); - } - - // load fallback localisation - if (!empty($fallback)) { - - // infinite recursion guard - if (isset($languages_seen[$code])) { - trigger_error('Circular fallback reference in language ' . - $code, E_USER_ERROR); - $fallback = 'en'; - } - $language_seen[$code] = true; - - // load the fallback recursively - $this->loadLanguage($fallback); - $fallback_cache = $this->cache[$fallback]; - - // merge fallback with current language - foreach ( $this->keys as $key ) { - if (isset($cache[$key]) && isset($fallback_cache[$key])) { - if (isset($this->mergeable_keys_map[$key])) { - $cache[$key] = $cache[$key] + $fallback_cache[$key]; - } elseif (isset($this->mergeable_keys_list[$key])) { - $cache[$key] = array_merge( $fallback_cache[$key], $cache[$key] ); - } - } else { - $cache[$key] = $fallback_cache[$key]; - } - } - - } - - // save to cache for later retrieval - $this->cache[$code] = $cache; - - return; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Class responsible for generating HTMLPurifier_Language objects, managing + * caching and fallbacks. + * @note Thanks to MediaWiki for the general logic, although this version + * has been entirely rewritten + * @todo Serialized cache for languages + */ +class HTMLPurifier_LanguageFactory +{ + + /** + * Cache of language code information used to load HTMLPurifier_Language objects. + * Structure is: $factory->cache[$language_code][$key] = $value + * @type array + */ + public $cache; + + /** + * Valid keys in the HTMLPurifier_Language object. Designates which + * variables to slurp out of a message file. + * @type array + */ + public $keys = array('fallback', 'messages', 'errorNames'); + + /** + * Instance to validate language codes. + * @type HTMLPurifier_AttrDef_Lang + * + */ + protected $validator; + + /** + * Cached copy of dirname(__FILE__), directory of current file without + * trailing slash. + * @type string + */ + protected $dir; + + /** + * Keys whose contents are a hash map and can be merged. + * @type array + */ + protected $mergeable_keys_map = array('messages' => true, 'errorNames' => true); + + /** + * Keys whose contents are a list and can be merged. + * @value array lookup + */ + protected $mergeable_keys_list = array(); + + /** + * Retrieve sole instance of the factory. + * @param HTMLPurifier_LanguageFactory $prototype Optional prototype to overload sole instance with, + * or bool true to reset to default factory. + * @return HTMLPurifier_LanguageFactory + */ + public static function instance($prototype = null) + { + static $instance = null; + if ($prototype !== null) { + $instance = $prototype; + } elseif ($instance === null || $prototype == true) { + $instance = new HTMLPurifier_LanguageFactory(); + $instance->setup(); + } + return $instance; + } + + /** + * Sets up the singleton, much like a constructor + * @note Prevents people from getting this outside of the singleton + */ + public function setup() + { + $this->validator = new HTMLPurifier_AttrDef_Lang(); + $this->dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier'; + } + + /** + * Creates a language object, handles class fallbacks + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @param bool|string $code Code to override configuration with. Private parameter. + * @return HTMLPurifier_Language + */ + public function create($config, $context, $code = false) + { + // validate language code + if ($code === false) { + $code = $this->validator->validate( + $config->get('Core.Language'), + $config, + $context + ); + } else { + $code = $this->validator->validate($code, $config, $context); + } + if ($code === false) { + $code = 'en'; // malformed code becomes English + } + + $pcode = str_replace('-', '_', $code); // make valid PHP classname + static $depth = 0; // recursion protection + + if ($code == 'en') { + $lang = new HTMLPurifier_Language($config, $context); + } else { + $class = 'HTMLPurifier_Language_' . $pcode; + $file = $this->dir . '/Language/classes/' . $code . '.php'; + if (file_exists($file) || class_exists($class, false)) { + $lang = new $class($config, $context); + } else { + // Go fallback + $raw_fallback = $this->getFallbackFor($code); + $fallback = $raw_fallback ? $raw_fallback : 'en'; + $depth++; + $lang = $this->create($config, $context, $fallback); + if (!$raw_fallback) { + $lang->error = true; + } + $depth--; + } + } + $lang->code = $code; + return $lang; + } + + /** + * Returns the fallback language for language + * @note Loads the original language into cache + * @param string $code language code + * @return string|bool + */ + public function getFallbackFor($code) + { + $this->loadLanguage($code); + return $this->cache[$code]['fallback']; + } + + /** + * Loads language into the cache, handles message file and fallbacks + * @param string $code language code + */ + public function loadLanguage($code) + { + static $languages_seen = array(); // recursion guard + + // abort if we've already loaded it + if (isset($this->cache[$code])) { + return; + } + + // generate filename + $filename = $this->dir . '/Language/messages/' . $code . '.php'; + + // default fallback : may be overwritten by the ensuing include + $fallback = ($code != 'en') ? 'en' : false; + + // load primary localisation + if (!file_exists($filename)) { + // skip the include: will rely solely on fallback + $filename = $this->dir . '/Language/messages/en.php'; + $cache = array(); + } else { + include $filename; + $cache = compact($this->keys); + } + + // load fallback localisation + if (!empty($fallback)) { + + // infinite recursion guard + if (isset($languages_seen[$code])) { + trigger_error( + 'Circular fallback reference in language ' . + $code, + E_USER_ERROR + ); + $fallback = 'en'; + } + $language_seen[$code] = true; + + // load the fallback recursively + $this->loadLanguage($fallback); + $fallback_cache = $this->cache[$fallback]; + + // merge fallback with current language + foreach ($this->keys as $key) { + if (isset($cache[$key]) && isset($fallback_cache[$key])) { + if (isset($this->mergeable_keys_map[$key])) { + $cache[$key] = $cache[$key] + $fallback_cache[$key]; + } elseif (isset($this->mergeable_keys_list[$key])) { + $cache[$key] = array_merge($fallback_cache[$key], $cache[$key]); + } + } else { + $cache[$key] = $fallback_cache[$key]; + } + } + } + + // save to cache for later retrieval + $this->cache[$code] = $cache; + return; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Length.php b/libraries/htmlpurifier410/library/HTMLPurifier/Length.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/Length.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Length.php index 8d2a46b7da9322fa88b30ead08ed6b63ef4f7c6c..9cc1bc750b647a3da1a684167d906da1a2a54a0c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Length.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Length.php @@ -1,115 +1,162 @@ -<?php - -/** - * Represents a measurable length, with a string numeric magnitude - * and a unit. This object is immutable. - */ -class HTMLPurifier_Length -{ - - /** - * String numeric magnitude. - */ - protected $n; - - /** - * String unit. False is permitted if $n = 0. - */ - protected $unit; - - /** - * Whether or not this length is valid. Null if not calculated yet. - */ - protected $isValid; - - /** - * Lookup array of units recognized by CSS 2.1 - */ - protected static $allowedUnits = array( - 'em' => true, 'ex' => true, 'px' => true, 'in' => true, - 'cm' => true, 'mm' => true, 'pt' => true, 'pc' => true - ); - - /** - * @param number $n Magnitude - * @param string $u Unit - */ - public function __construct($n = '0', $u = false) { - $this->n = (string) $n; - $this->unit = $u !== false ? (string) $u : false; - } - - /** - * @param string $s Unit string, like '2em' or '3.4in' - * @warning Does not perform validation. - */ - static public function make($s) { - if ($s instanceof HTMLPurifier_Length) return $s; - $n_length = strspn($s, '1234567890.+-'); - $n = substr($s, 0, $n_length); - $unit = substr($s, $n_length); - if ($unit === '') $unit = false; - return new HTMLPurifier_Length($n, $unit); - } - - /** - * Validates the number and unit. - */ - protected function validate() { - // Special case: - if ($this->n === '+0' || $this->n === '-0') $this->n = '0'; - if ($this->n === '0' && $this->unit === false) return true; - if (!ctype_lower($this->unit)) $this->unit = strtolower($this->unit); - if (!isset(HTMLPurifier_Length::$allowedUnits[$this->unit])) return false; - // Hack: - $def = new HTMLPurifier_AttrDef_CSS_Number(); - $result = $def->validate($this->n, false, false); - if ($result === false) return false; - $this->n = $result; - return true; - } - - /** - * Returns string representation of number. - */ - public function toString() { - if (!$this->isValid()) return false; - return $this->n . $this->unit; - } - - /** - * Retrieves string numeric magnitude. - */ - public function getN() {return $this->n;} - - /** - * Retrieves string unit. - */ - public function getUnit() {return $this->unit;} - - /** - * Returns true if this length unit is valid. - */ - public function isValid() { - if ($this->isValid === null) $this->isValid = $this->validate(); - return $this->isValid; - } - - /** - * Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal. - * @warning If both values are too large or small, this calculation will - * not work properly - */ - public function compareTo($l) { - if ($l === false) return false; - if ($l->unit !== $this->unit) { - $converter = new HTMLPurifier_UnitConverter(); - $l = $converter->convert($l, $this->unit); - if ($l === false) return false; - } - return $this->n - $l->n; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Represents a measurable length, with a string numeric magnitude + * and a unit. This object is immutable. + */ +class HTMLPurifier_Length +{ + + /** + * String numeric magnitude. + * @type string + */ + protected $n; + + /** + * String unit. False is permitted if $n = 0. + * @type string|bool + */ + protected $unit; + + /** + * Whether or not this length is valid. Null if not calculated yet. + * @type bool + */ + protected $isValid; + + /** + * Array Lookup array of units recognized by CSS 3 + * @type array + */ + protected static $allowedUnits = array( + 'em' => true, 'ex' => true, 'px' => true, 'in' => true, + 'cm' => true, 'mm' => true, 'pt' => true, 'pc' => true, + 'ch' => true, 'rem' => true, 'vw' => true, 'vh' => true, + 'vmin' => true, 'vmax' => true + ); + + /** + * @param string $n Magnitude + * @param bool|string $u Unit + */ + public function __construct($n = '0', $u = false) + { + $this->n = (string) $n; + $this->unit = $u !== false ? (string) $u : false; + } + + /** + * @param string $s Unit string, like '2em' or '3.4in' + * @return HTMLPurifier_Length + * @warning Does not perform validation. + */ + public static function make($s) + { + if ($s instanceof HTMLPurifier_Length) { + return $s; + } + $n_length = strspn($s, '1234567890.+-'); + $n = substr($s, 0, $n_length); + $unit = substr($s, $n_length); + if ($unit === '') { + $unit = false; + } + return new HTMLPurifier_Length($n, $unit); + } + + /** + * Validates the number and unit. + * @return bool + */ + protected function validate() + { + // Special case: + if ($this->n === '+0' || $this->n === '-0') { + $this->n = '0'; + } + if ($this->n === '0' && $this->unit === false) { + return true; + } + if (!ctype_lower($this->unit)) { + $this->unit = strtolower($this->unit); + } + if (!isset(HTMLPurifier_Length::$allowedUnits[$this->unit])) { + return false; + } + // Hack: + $def = new HTMLPurifier_AttrDef_CSS_Number(); + $result = $def->validate($this->n, false, false); + if ($result === false) { + return false; + } + $this->n = $result; + return true; + } + + /** + * Returns string representation of number. + * @return string + */ + public function toString() + { + if (!$this->isValid()) { + return false; + } + return $this->n . $this->unit; + } + + /** + * Retrieves string numeric magnitude. + * @return string + */ + public function getN() + { + return $this->n; + } + + /** + * Retrieves string unit. + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Returns true if this length unit is valid. + * @return bool + */ + public function isValid() + { + if ($this->isValid === null) { + $this->isValid = $this->validate(); + } + return $this->isValid; + } + + /** + * Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal. + * @param HTMLPurifier_Length $l + * @return int + * @warning If both values are too large or small, this calculation will + * not work properly + */ + public function compareTo($l) + { + if ($l === false) { + return false; + } + if ($l->unit !== $this->unit) { + $converter = new HTMLPurifier_UnitConverter(); + $l = $converter->convert($l, $this->unit); + if ($l === false) { + return false; + } + } + return $this->n - $l->n; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Lexer.php b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer.php new file mode 100644 index 0000000000000000000000000000000000000000..1f48ab58cf2d672f793b9294899f7bd41dbdcef8 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer.php @@ -0,0 +1,382 @@ +<?php + +/** + * Forgivingly lexes HTML (SGML-style) markup into tokens. + * + * A lexer parses a string of SGML-style markup and converts them into + * corresponding tokens. It doesn't check for well-formedness, although its + * internal mechanism may make this automatic (such as the case of + * HTMLPurifier_Lexer_DOMLex). There are several implementations to choose + * from. + * + * A lexer is HTML-oriented: it might work with XML, but it's not + * recommended, as we adhere to a subset of the specification for optimization + * reasons. This might change in the future. Also, most tokenizers are not + * expected to handle DTDs or PIs. + * + * This class should not be directly instantiated, but you may use create() to + * retrieve a default copy of the lexer. Being a supertype, this class + * does not actually define any implementation, but offers commonly used + * convenience functions for subclasses. + * + * @note The unit tests will instantiate this class for testing purposes, as + * many of the utility functions require a class to be instantiated. + * This means that, even though this class is not runnable, it will + * not be declared abstract. + * + * @par + * + * @note + * We use tokens rather than create a DOM representation because DOM would: + * + * @par + * -# Require more processing and memory to create, + * -# Is not streamable, and + * -# Has the entire document structure (html and body not needed). + * + * @par + * However, DOM is helpful in that it makes it easy to move around nodes + * without a lot of lookaheads to see when a tag is closed. This is a + * limitation of the token system and some workarounds would be nice. + */ +class HTMLPurifier_Lexer +{ + + /** + * Whether or not this lexer implements line-number/column-number tracking. + * If it does, set to true. + */ + public $tracksLineNumbers = false; + + // -- STATIC ---------------------------------------------------------- + + /** + * Retrieves or sets the default Lexer as a Prototype Factory. + * + * By default HTMLPurifier_Lexer_DOMLex will be returned. There are + * a few exceptions involving special features that only DirectLex + * implements. + * + * @note The behavior of this class has changed, rather than accepting + * a prototype object, it now accepts a configuration object. + * To specify your own prototype, set %Core.LexerImpl to it. + * This change in behavior de-singletonizes the lexer object. + * + * @param HTMLPurifier_Config $config + * @return HTMLPurifier_Lexer + * @throws HTMLPurifier_Exception + */ + public static function create($config) + { + if (!($config instanceof HTMLPurifier_Config)) { + $lexer = $config; + trigger_error( + "Passing a prototype to + HTMLPurifier_Lexer::create() is deprecated, please instead + use %Core.LexerImpl", + E_USER_WARNING + ); + } else { + $lexer = $config->get('Core.LexerImpl'); + } + + $needs_tracking = + $config->get('Core.MaintainLineNumbers') || + $config->get('Core.CollectErrors'); + + $inst = null; + if (is_object($lexer)) { + $inst = $lexer; + } else { + if (is_null($lexer)) { + do { + // auto-detection algorithm + if ($needs_tracking) { + $lexer = 'DirectLex'; + break; + } + + if (class_exists('DOMDocument', false) && + method_exists('DOMDocument', 'loadHTML') && + !extension_loaded('domxml') + ) { + // check for DOM support, because while it's part of the + // core, it can be disabled compile time. Also, the PECL + // domxml extension overrides the default DOM, and is evil + // and nasty and we shan't bother to support it + $lexer = 'DOMLex'; + } else { + $lexer = 'DirectLex'; + } + } while (0); + } // do..while so we can break + + // instantiate recognized string names + switch ($lexer) { + case 'DOMLex': + $inst = new HTMLPurifier_Lexer_DOMLex(); + break; + case 'DirectLex': + $inst = new HTMLPurifier_Lexer_DirectLex(); + break; + case 'PH5P': + $inst = new HTMLPurifier_Lexer_PH5P(); + break; + default: + throw new HTMLPurifier_Exception( + "Cannot instantiate unrecognized Lexer type " . + htmlspecialchars($lexer) + ); + } + } + + if (!$inst) { + throw new HTMLPurifier_Exception('No lexer was instantiated'); + } + + // once PHP DOM implements native line numbers, or we + // hack out something using XSLT, remove this stipulation + if ($needs_tracking && !$inst->tracksLineNumbers) { + throw new HTMLPurifier_Exception( + 'Cannot use lexer that does not support line numbers with ' . + 'Core.MaintainLineNumbers or Core.CollectErrors (use DirectLex instead)' + ); + } + + return $inst; + + } + + // -- CONVENIENCE MEMBERS --------------------------------------------- + + public function __construct() + { + $this->_entity_parser = new HTMLPurifier_EntityParser(); + } + + /** + * Most common entity to raw value conversion table for special entities. + * @type array + */ + protected $_special_entity2str = + array( + '"' => '"', + '&' => '&', + '<' => '<', + '>' => '>', + ''' => "'", + ''' => "'", + ''' => "'" + ); + + public function parseText($string, $config) { + return $this->parseData($string, false, $config); + } + + public function parseAttr($string, $config) { + return $this->parseData($string, true, $config); + } + + /** + * Parses special entities into the proper characters. + * + * This string will translate escaped versions of the special characters + * into the correct ones. + * + * @param string $string String character data to be parsed. + * @return string Parsed character data. + */ + public function parseData($string, $is_attr, $config) + { + // following functions require at least one character + if ($string === '') { + return ''; + } + + // subtracts amps that cannot possibly be escaped + $num_amp = substr_count($string, '&') - substr_count($string, '& ') - + ($string[strlen($string) - 1] === '&' ? 1 : 0); + + if (!$num_amp) { + return $string; + } // abort if no entities + $num_esc_amp = substr_count($string, '&'); + $string = strtr($string, $this->_special_entity2str); + + // code duplication for sake of optimization, see above + $num_amp_2 = substr_count($string, '&') - substr_count($string, '& ') - + ($string[strlen($string) - 1] === '&' ? 1 : 0); + + if ($num_amp_2 <= $num_esc_amp) { + return $string; + } + + // hmm... now we have some uncommon entities. Use the callback. + if ($config->get('Core.LegacyEntityDecoder')) { + $string = $this->_entity_parser->substituteSpecialEntities($string); + } else { + if ($is_attr) { + $string = $this->_entity_parser->substituteAttrEntities($string); + } else { + $string = $this->_entity_parser->substituteTextEntities($string); + } + } + return $string; + } + + /** + * Lexes an HTML string into tokens. + * @param $string String HTML. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] array representation of HTML. + */ + public function tokenizeHTML($string, $config, $context) + { + trigger_error('Call to abstract class', E_USER_ERROR); + } + + /** + * Translates CDATA sections into regular sections (through escaping). + * @param string $string HTML string to process. + * @return string HTML with CDATA sections escaped. + */ + protected static function escapeCDATA($string) + { + return preg_replace_callback( + '/<!\[CDATA\[(.+?)\]\]>/s', + array('HTMLPurifier_Lexer', 'CDATACallback'), + $string + ); + } + + /** + * Special CDATA case that is especially convoluted for <script> + * @param string $string HTML string to process. + * @return string HTML with CDATA sections escaped. + */ + protected static function escapeCommentedCDATA($string) + { + return preg_replace_callback( + '#<!--//--><!\[CDATA\[//><!--(.+?)//--><!\]\]>#s', + array('HTMLPurifier_Lexer', 'CDATACallback'), + $string + ); + } + + /** + * Special Internet Explorer conditional comments should be removed. + * @param string $string HTML string to process. + * @return string HTML with conditional comments removed. + */ + protected static function removeIEConditional($string) + { + return preg_replace( + '#<!--\[if [^>]+\]>.*?<!\[endif\]-->#si', // probably should generalize for all strings + '', + $string + ); + } + + /** + * Callback function for escapeCDATA() that does the work. + * + * @warning Though this is public in order to let the callback happen, + * calling it directly is not recommended. + * @param array $matches PCRE matches array, with index 0 the entire match + * and 1 the inside of the CDATA section. + * @return string Escaped internals of the CDATA section. + */ + protected static function CDATACallback($matches) + { + // not exactly sure why the character set is needed, but whatever + return htmlspecialchars($matches[1], ENT_COMPAT, 'UTF-8'); + } + + /** + * Takes a piece of HTML and normalizes it by converting entities, fixing + * encoding, extracting bits, and other good stuff. + * @param string $html HTML. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + * @todo Consider making protected + */ + public function normalize($html, $config, $context) + { + // normalize newlines to \n + if ($config->get('Core.NormalizeNewlines')) { + $html = str_replace("\r\n", "\n", $html); + $html = str_replace("\r", "\n", $html); + } + + if ($config->get('HTML.Trusted')) { + // escape convoluted CDATA + $html = $this->escapeCommentedCDATA($html); + } + + // escape CDATA + $html = $this->escapeCDATA($html); + + $html = $this->removeIEConditional($html); + + // extract body from document if applicable + if ($config->get('Core.ConvertDocumentToFragment')) { + $e = false; + if ($config->get('Core.CollectErrors')) { + $e =& $context->get('ErrorCollector'); + } + $new_html = $this->extractBody($html); + if ($e && $new_html != $html) { + $e->send(E_WARNING, 'Lexer: Extracted body'); + } + $html = $new_html; + } + + // expand entities that aren't the big five + if ($config->get('Core.LegacyEntityDecoder')) { + $html = $this->_entity_parser->substituteNonSpecialEntities($html); + } + + // clean into wellformed UTF-8 string for an SGML context: this has + // to be done after entity expansion because the entities sometimes + // represent non-SGML characters (horror, horror!) + $html = HTMLPurifier_Encoder::cleanUTF8($html); + + // if processing instructions are to removed, remove them now + if ($config->get('Core.RemoveProcessingInstructions')) { + $html = preg_replace('#<\?.+?\?>#s', '', $html); + } + + $hidden_elements = $config->get('Core.HiddenElements'); + if ($config->get('Core.AggressivelyRemoveScript') && + !($config->get('HTML.Trusted') || !$config->get('Core.RemoveScriptContents') + || empty($hidden_elements["script"]))) { + $html = preg_replace('#<script[^>]*>.*?</script>#i', '', $html); + } + + return $html; + } + + /** + * Takes a string of HTML (fragment or document) and returns the content + * @todo Consider making protected + */ + public function extractBody($html) + { + $matches = array(); + $result = preg_match('|(.*?)<body[^>]*>(.*)</body>|is', $html, $matches); + if ($result) { + // Make sure it's not in a comment + $comment_start = strrpos($matches[1], '<!--'); + $comment_end = strrpos($matches[1], '-->'); + if ($comment_start === false || + ($comment_end !== false && $comment_end > $comment_start)) { + return $matches[2]; + } + } + return $html; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DOMLex.php b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DOMLex.php new file mode 100644 index 0000000000000000000000000000000000000000..de352589c79da032c8f07274608dff0f26ec6110 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DOMLex.php @@ -0,0 +1,328 @@ +<?php + +/** + * Parser that uses PHP 5's DOM extension (part of the core). + * + * In PHP 5, the DOM XML extension was revamped into DOM and added to the core. + * It gives us a forgiving HTML parser, which we use to transform the HTML + * into a DOM, and then into the tokens. It is blazingly fast (for large + * documents, it performs twenty times faster than + * HTMLPurifier_Lexer_DirectLex,and is the default choice for PHP 5. + * + * @note Any empty elements will have empty tokens associated with them, even if + * this is prohibited by the spec. This is cannot be fixed until the spec + * comes into play. + * + * @note PHP's DOM extension does not actually parse any entities, we use + * our own function to do that. + * + * @warning DOM tends to drop whitespace, which may wreak havoc on indenting. + * If this is a huge problem, due to the fact that HTML is hand + * edited and you are unable to get a parser cache that caches the + * the output of HTML Purifier while keeping the original HTML lying + * around, you may want to run Tidy on the resulting output or use + * HTMLPurifier_DirectLex + */ + +class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer +{ + + /** + * @type HTMLPurifier_TokenFactory + */ + private $factory; + + public function __construct() + { + // setup the factory + parent::__construct(); + $this->factory = new HTMLPurifier_TokenFactory(); + } + + /** + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] + */ + public function tokenizeHTML($html, $config, $context) + { + $html = $this->normalize($html, $config, $context); + + // attempt to armor stray angled brackets that cannot possibly + // form tags and thus are probably being used as emoticons + if ($config->get('Core.AggressivelyFixLt')) { + $char = '[^a-z!\/]'; + $comment = "/<!--(.*?)(-->|\z)/is"; + $html = preg_replace_callback($comment, array($this, 'callbackArmorCommentEntities'), $html); + do { + $old = $html; + $html = preg_replace("/<($char)/i", '<\\1', $html); + } while ($html !== $old); + $html = preg_replace_callback($comment, array($this, 'callbackUndoCommentSubst'), $html); // fix comments + } + + // preprocess html, essential for UTF-8 + $html = $this->wrapHTML($html, $config, $context); + + $doc = new DOMDocument(); + $doc->encoding = 'UTF-8'; // theoretically, the above has this covered + + set_error_handler(array($this, 'muteErrorHandler')); + $doc->loadHTML($html); + restore_error_handler(); + + $body = $doc->getElementsByTagName('html')->item(0)-> // <html> + getElementsByTagName('body')->item(0); // <body> + + $div = $body->getElementsByTagName('div')->item(0); // <div> + $tokens = array(); + $this->tokenizeDOM($div, $tokens, $config); + // If the div has a sibling, that means we tripped across + // a premature </div> tag. So remove the div we parsed, + // and then tokenize the rest of body. We can't tokenize + // the sibling directly as we'll lose the tags in that case. + if ($div->nextSibling) { + $body->removeChild($div); + $this->tokenizeDOM($body, $tokens, $config); + } + return $tokens; + } + + /** + * Iterative function that tokenizes a node, putting it into an accumulator. + * To iterate is human, to recurse divine - L. Peter Deutsch + * @param DOMNode $node DOMNode to be tokenized. + * @param HTMLPurifier_Token[] $tokens Array-list of already tokenized tokens. + * @return HTMLPurifier_Token of node appended to previously passed tokens. + */ + protected function tokenizeDOM($node, &$tokens, $config) + { + $level = 0; + $nodes = array($level => new HTMLPurifier_Queue(array($node))); + $closingNodes = array(); + do { + while (!$nodes[$level]->isEmpty()) { + $node = $nodes[$level]->shift(); // FIFO + $collect = $level > 0 ? true : false; + $needEndingTag = $this->createStartNode($node, $tokens, $collect, $config); + if ($needEndingTag) { + $closingNodes[$level][] = $node; + } + if ($node->childNodes && $node->childNodes->length) { + $level++; + $nodes[$level] = new HTMLPurifier_Queue(); + foreach ($node->childNodes as $childNode) { + $nodes[$level]->push($childNode); + } + } + } + $level--; + if ($level && isset($closingNodes[$level])) { + while ($node = array_pop($closingNodes[$level])) { + $this->createEndNode($node, $tokens); + } + } + } while ($level > 0); + } + + /** + * Portably retrieve the tag name of a node; deals with older versions + * of libxml like 2.7.6 + * @param DOMNode $node + */ + protected function getTagName($node) + { + if (property_exists($node, 'tagName')) { + return $node->tagName; + } else if (property_exists($node, 'nodeName')) { + return $node->nodeName; + } else if (property_exists($node, 'localName')) { + return $node->localName; + } + return null; + } + + /** + * Portably retrieve the data of a node; deals with older versions + * of libxml like 2.7.6 + * @param DOMNode $node + */ + protected function getData($node) + { + if (property_exists($node, 'data')) { + return $node->data; + } else if (property_exists($node, 'nodeValue')) { + return $node->nodeValue; + } else if (property_exists($node, 'textContent')) { + return $node->textContent; + } + return null; + } + + + /** + * @param DOMNode $node DOMNode to be tokenized. + * @param HTMLPurifier_Token[] $tokens Array-list of already tokenized tokens. + * @param bool $collect Says whether or start and close are collected, set to + * false at first recursion because it's the implicit DIV + * tag you're dealing with. + * @return bool if the token needs an endtoken + * @todo data and tagName properties don't seem to exist in DOMNode? + */ + protected function createStartNode($node, &$tokens, $collect, $config) + { + // intercept non element nodes. WE MUST catch all of them, + // but we're not getting the character reference nodes because + // those should have been preprocessed + if ($node->nodeType === XML_TEXT_NODE) { + $data = $this->getData($node); // Handle variable data property + if ($data !== null) { + $tokens[] = $this->factory->createText($data); + } + return false; + } elseif ($node->nodeType === XML_CDATA_SECTION_NODE) { + // undo libxml's special treatment of <script> and <style> tags + $last = end($tokens); + $data = $node->data; + // (note $node->tagname is already normalized) + if ($last instanceof HTMLPurifier_Token_Start && ($last->name == 'script' || $last->name == 'style')) { + $new_data = trim($data); + if (substr($new_data, 0, 4) === '<!--') { + $data = substr($new_data, 4); + if (substr($data, -3) === '-->') { + $data = substr($data, 0, -3); + } else { + // Highly suspicious! Not sure what to do... + } + } + } + $tokens[] = $this->factory->createText($this->parseText($data, $config)); + return false; + } elseif ($node->nodeType === XML_COMMENT_NODE) { + // this is code is only invoked for comments in script/style in versions + // of libxml pre-2.6.28 (regular comments, of course, are still + // handled regularly) + $tokens[] = $this->factory->createComment($node->data); + return false; + } elseif ($node->nodeType !== XML_ELEMENT_NODE) { + // not-well tested: there may be other nodes we have to grab + return false; + } + $attr = $node->hasAttributes() ? $this->transformAttrToAssoc($node->attributes) : array(); + $tag_name = $this->getTagName($node); // Handle variable tagName property + if (empty($tag_name)) { + return (bool) $node->childNodes->length; + } + // We still have to make sure that the element actually IS empty + if (!$node->childNodes->length) { + if ($collect) { + $tokens[] = $this->factory->createEmpty($tag_name, $attr); + } + return false; + } else { + if ($collect) { + $tokens[] = $this->factory->createStart($tag_name, $attr); + } + return true; + } + } + + /** + * @param DOMNode $node + * @param HTMLPurifier_Token[] $tokens + */ + protected function createEndNode($node, &$tokens) + { + $tag_name = $this->getTagName($node); // Handle variable tagName property + $tokens[] = $this->factory->createEnd($tag_name); + } + + /** + * Converts a DOMNamedNodeMap of DOMAttr objects into an assoc array. + * + * @param DOMNamedNodeMap $node_map DOMNamedNodeMap of DOMAttr objects. + * @return array Associative array of attributes. + */ + protected function transformAttrToAssoc($node_map) + { + // NamedNodeMap is documented very well, so we're using undocumented + // features, namely, the fact that it implements Iterator and + // has a ->length attribute + if ($node_map->length === 0) { + return array(); + } + $array = array(); + foreach ($node_map as $attr) { + $array[$attr->name] = $attr->value; + } + return $array; + } + + /** + * An error handler that mutes all errors + * @param int $errno + * @param string $errstr + */ + public function muteErrorHandler($errno, $errstr) + { + } + + /** + * Callback function for undoing escaping of stray angled brackets + * in comments + * @param array $matches + * @return string + */ + public function callbackUndoCommentSubst($matches) + { + return '<!--' . strtr($matches[1], array('&' => '&', '<' => '<')) . $matches[2]; + } + + /** + * Callback function that entity-izes ampersands in comments so that + * callbackUndoCommentSubst doesn't clobber them + * @param array $matches + * @return string + */ + public function callbackArmorCommentEntities($matches) + { + return '<!--' . str_replace('&', '&', $matches[1]) . $matches[2]; + } + + /** + * Wraps an HTML fragment in the necessary HTML + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + protected function wrapHTML($html, $config, $context, $use_div = true) + { + $def = $config->getDefinition('HTML'); + $ret = ''; + + if (!empty($def->doctype->dtdPublic) || !empty($def->doctype->dtdSystem)) { + $ret .= '<!DOCTYPE html '; + if (!empty($def->doctype->dtdPublic)) { + $ret .= 'PUBLIC "' . $def->doctype->dtdPublic . '" '; + } + if (!empty($def->doctype->dtdSystem)) { + $ret .= '"' . $def->doctype->dtdSystem . '" '; + } + $ret .= '>'; + } + + $ret .= '<html><head>'; + $ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; + // No protection if $html contains a stray </div>! + $ret .= '</head><body>'; + if ($use_div) $ret .= '<div>'; + $ret .= $html; + if ($use_div) $ret .= '</div>'; + $ret .= '</body></html>'; + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DirectLex.php similarity index 71% rename from libraries/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DirectLex.php index bfca4533d8c0447f564695f31df8159754bbb063..39d22f35536eaa682272652797909ef20aa070b0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/DirectLex.php @@ -1,490 +1,539 @@ -<?php - -/** - * Our in-house implementation of a parser. - * - * A pure PHP parser, DirectLex has absolutely no dependencies, making - * it a reasonably good default for PHP4. Written with efficiency in mind, - * it can be four times faster than HTMLPurifier_Lexer_PEARSax3, although it - * pales in comparison to HTMLPurifier_Lexer_DOMLex. - * - * @todo Reread XML spec and document differences. - */ -class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer -{ - - public $tracksLineNumbers = true; - - /** - * Whitespace characters for str(c)spn. - */ - protected $_whitespace = "\x20\x09\x0D\x0A"; - - /** - * Callback function for script CDATA fudge - * @param $matches, in form of array(opening tag, contents, closing tag) - */ - protected function scriptCallback($matches) { - return $matches[1] . htmlspecialchars($matches[2], ENT_COMPAT, 'UTF-8') . $matches[3]; - } - - public function tokenizeHTML($html, $config, $context) { - - // special normalization for script tags without any armor - // our "armor" heurstic is a < sign any number of whitespaces after - // the first script tag - if ($config->get('HTML', 'Trusted')) { - $html = preg_replace_callback('#(<script[^>]*>)(\s*[^<].+?)(</script>)#si', - array($this, 'scriptCallback'), $html); - } - - $html = $this->normalize($html, $config, $context); - - $cursor = 0; // our location in the text - $inside_tag = false; // whether or not we're parsing the inside of a tag - $array = array(); // result array - - // This is also treated to mean maintain *column* numbers too - $maintain_line_numbers = $config->get('Core', 'MaintainLineNumbers'); - - if ($maintain_line_numbers === null) { - // automatically determine line numbering by checking - // if error collection is on - $maintain_line_numbers = $config->get('Core', 'CollectErrors'); - } - - if ($maintain_line_numbers) { - $current_line = 1; - $current_col = 0; - $length = strlen($html); - } else { - $current_line = false; - $current_col = false; - $length = false; - } - $context->register('CurrentLine', $current_line); - $context->register('CurrentCol', $current_col); - $nl = "\n"; - // how often to manually recalculate. This will ALWAYS be right, - // but it's pretty wasteful. Set to 0 to turn off - $synchronize_interval = $config->get('Core', 'DirectLexLineNumberSyncInterval'); - - $e = false; - if ($config->get('Core', 'CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - // for testing synchronization - $loops = 0; - - while(++$loops) { - - // $cursor is either at the start of a token, or inside of - // a tag (i.e. there was a < immediately before it), as indicated - // by $inside_tag - - if ($maintain_line_numbers) { - - // $rcursor, however, is always at the start of a token. - $rcursor = $cursor - (int) $inside_tag; - - // Column number is cheap, so we calculate it every round. - // We're interested at the *end* of the newline string, so - // we need to add strlen($nl) == 1 to $nl_pos before subtracting it - // from our "rcursor" position. - $nl_pos = strrpos($html, $nl, $rcursor - $length); - $current_col = $rcursor - (is_bool($nl_pos) ? 0 : $nl_pos + 1); - - // recalculate lines - if ( - $synchronize_interval && // synchronization is on - $cursor > 0 && // cursor is further than zero - $loops % $synchronize_interval === 0 // time to synchronize! - ) { - $current_line = 1 + $this->substrCount($html, $nl, 0, $cursor); - } - - } - - $position_next_lt = strpos($html, '<', $cursor); - $position_next_gt = strpos($html, '>', $cursor); - - // triggers on "<b>asdf</b>" but not "asdf <b></b>" - // special case to set up context - if ($position_next_lt === $cursor) { - $inside_tag = true; - $cursor++; - } - - if (!$inside_tag && $position_next_lt !== false) { - // We are not inside tag and there still is another tag to parse - $token = new - HTMLPurifier_Token_Text( - $this->parseData( - substr( - $html, $cursor, $position_next_lt - $cursor - ) - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_lt - $cursor); - } - $array[] = $token; - $cursor = $position_next_lt + 1; - $inside_tag = true; - continue; - } elseif (!$inside_tag) { - // We are not inside tag but there are no more tags - // If we're already at the end, break - if ($cursor === strlen($html)) break; - // Create Text of rest of string - $token = new - HTMLPurifier_Token_Text( - $this->parseData( - substr( - $html, $cursor - ) - ) - ); - if ($maintain_line_numbers) $token->rawPosition($current_line, $current_col); - $array[] = $token; - break; - } elseif ($inside_tag && $position_next_gt !== false) { - // We are in tag and it is well formed - // Grab the internals of the tag - $strlen_segment = $position_next_gt - $cursor; - - if ($strlen_segment < 1) { - // there's nothing to process! - $token = new HTMLPurifier_Token_Text('<'); - $cursor++; - continue; - } - - $segment = substr($html, $cursor, $strlen_segment); - - if ($segment === false) { - // somehow, we attempted to access beyond the end of - // the string, defense-in-depth, reported by Nate Abele - break; - } - - // Check if it's a comment - if ( - substr($segment, 0, 3) === '!--' - ) { - // re-determine segment length, looking for --> - $position_comment_end = strpos($html, '-->', $cursor); - if ($position_comment_end === false) { - // uh oh, we have a comment that extends to - // infinity. Can't be helped: set comment - // end position to end of string - if ($e) $e->send(E_WARNING, 'Lexer: Unclosed comment'); - $position_comment_end = strlen($html); - $end = true; - } else { - $end = false; - } - $strlen_segment = $position_comment_end - $cursor; - $segment = substr($html, $cursor, $strlen_segment); - $token = new - HTMLPurifier_Token_Comment( - substr( - $segment, 3, $strlen_segment - 3 - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $strlen_segment); - } - $array[] = $token; - $cursor = $end ? $position_comment_end : $position_comment_end + 3; - $inside_tag = false; - continue; - } - - // Check if it's an end tag - $is_end_tag = (strpos($segment,'/') === 0); - if ($is_end_tag) { - $type = substr($segment, 1); - $token = new HTMLPurifier_Token_End($type); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - $cursor = $position_next_gt + 1; - continue; - } - - // Check leading character is alnum, if not, we may - // have accidently grabbed an emoticon. Translate into - // text and go our merry way - if (!ctype_alpha($segment[0])) { - // XML: $segment[0] !== '_' && $segment[0] !== ':' - if ($e) $e->send(E_NOTICE, 'Lexer: Unescaped lt'); - $token = new HTMLPurifier_Token_Text('<'); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - continue; - } - - // Check if it is explicitly self closing, if so, remove - // trailing slash. Remember, we could have a tag like <br>, so - // any later token processing scripts must convert improperly - // classified EmptyTags from StartTags. - $is_self_closing = (strrpos($segment,'/') === $strlen_segment-1); - if ($is_self_closing) { - $strlen_segment--; - $segment = substr($segment, 0, $strlen_segment); - } - - // Check if there are any attributes - $position_first_space = strcspn($segment, $this->_whitespace); - - if ($position_first_space >= $strlen_segment) { - if ($is_self_closing) { - $token = new HTMLPurifier_Token_Empty($segment); - } else { - $token = new HTMLPurifier_Token_Start($segment); - } - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - $cursor = $position_next_gt + 1; - continue; - } - - // Grab out all the data - $type = substr($segment, 0, $position_first_space); - $attribute_string = - trim( - substr( - $segment, $position_first_space - ) - ); - if ($attribute_string) { - $attr = $this->parseAttributeString( - $attribute_string - , $config, $context - ); - } else { - $attr = array(); - } - - if ($is_self_closing) { - $token = new HTMLPurifier_Token_Empty($type, $attr); - } else { - $token = new HTMLPurifier_Token_Start($type, $attr); - } - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $cursor = $position_next_gt + 1; - $inside_tag = false; - continue; - } else { - // inside tag, but there's no ending > sign - if ($e) $e->send(E_WARNING, 'Lexer: Missing gt'); - $token = new - HTMLPurifier_Token_Text( - '<' . - $this->parseData( - substr($html, $cursor) - ) - ); - if ($maintain_line_numbers) $token->rawPosition($current_line, $current_col); - // no cursor scroll? Hmm... - $array[] = $token; - break; - } - break; - } - - $context->destroy('CurrentLine'); - $context->destroy('CurrentCol'); - return $array; - } - - /** - * PHP 5.0.x compatible substr_count that implements offset and length - */ - protected function substrCount($haystack, $needle, $offset, $length) { - static $oldVersion; - if ($oldVersion === null) { - $oldVersion = version_compare(PHP_VERSION, '5.1', '<'); - } - if ($oldVersion) { - $haystack = substr($haystack, $offset, $length); - return substr_count($haystack, $needle); - } else { - return substr_count($haystack, $needle, $offset, $length); - } - } - - /** - * Takes the inside of an HTML tag and makes an assoc array of attributes. - * - * @param $string Inside of tag excluding name. - * @returns Assoc array of attributes. - */ - public function parseAttributeString($string, $config, $context) { - $string = (string) $string; // quick typecast - - if ($string == '') return array(); // no attributes - - $e = false; - if ($config->get('Core', 'CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - // let's see if we can abort as quickly as possible - // one equal sign, no spaces => one attribute - $num_equal = substr_count($string, '='); - $has_space = strpos($string, ' '); - if ($num_equal === 0 && !$has_space) { - // bool attribute - return array($string => $string); - } elseif ($num_equal === 1 && !$has_space) { - // only one attribute - list($key, $quoted_value) = explode('=', $string); - $quoted_value = trim($quoted_value); - if (!$key) { - if ($e) $e->send(E_ERROR, 'Lexer: Missing attribute key'); - return array(); - } - if (!$quoted_value) return array($key => ''); - $first_char = @$quoted_value[0]; - $last_char = @$quoted_value[strlen($quoted_value)-1]; - - $same_quote = ($first_char == $last_char); - $open_quote = ($first_char == '"' || $first_char == "'"); - - if ( $same_quote && $open_quote) { - // well behaved - $value = substr($quoted_value, 1, strlen($quoted_value) - 2); - } else { - // not well behaved - if ($open_quote) { - if ($e) $e->send(E_ERROR, 'Lexer: Missing end quote'); - $value = substr($quoted_value, 1); - } else { - $value = $quoted_value; - } - } - if ($value === false) $value = ''; - return array($key => $value); - } - - // setup loop environment - $array = array(); // return assoc array of attributes - $cursor = 0; // current position in string (moves forward) - $size = strlen($string); // size of the string (stays the same) - - // if we have unquoted attributes, the parser expects a terminating - // space, so let's guarantee that there's always a terminating space. - $string .= ' '; - - while(true) { - - if ($cursor >= $size) { - break; - } - - $cursor += ($value = strspn($string, $this->_whitespace, $cursor)); - // grab the key - - $key_begin = $cursor; //we're currently at the start of the key - - // scroll past all characters that are the key (not whitespace or =) - $cursor += strcspn($string, $this->_whitespace . '=', $cursor); - - $key_end = $cursor; // now at the end of the key - - $key = substr($string, $key_begin, $key_end - $key_begin); - - if (!$key) { - if ($e) $e->send(E_ERROR, 'Lexer: Missing attribute key'); - $cursor += strcspn($string, $this->_whitespace, $cursor + 1); // prevent infinite loop - continue; // empty key - } - - // scroll past all whitespace - $cursor += strspn($string, $this->_whitespace, $cursor); - - if ($cursor >= $size) { - $array[$key] = $key; - break; - } - - // if the next character is an equal sign, we've got a regular - // pair, otherwise, it's a bool attribute - $first_char = @$string[$cursor]; - - if ($first_char == '=') { - // key="value" - - $cursor++; - $cursor += strspn($string, $this->_whitespace, $cursor); - - if ($cursor === false) { - $array[$key] = ''; - break; - } - - // we might be in front of a quote right now - - $char = @$string[$cursor]; - - if ($char == '"' || $char == "'") { - // it's quoted, end bound is $char - $cursor++; - $value_begin = $cursor; - $cursor = strpos($string, $char, $cursor); - $value_end = $cursor; - } else { - // it's not quoted, end bound is whitespace - $value_begin = $cursor; - $cursor += strcspn($string, $this->_whitespace, $cursor); - $value_end = $cursor; - } - - // we reached a premature end - if ($cursor === false) { - $cursor = $size; - $value_end = $cursor; - } - - $value = substr($string, $value_begin, $value_end - $value_begin); - if ($value === false) $value = ''; - $array[$key] = $this->parseData($value); - $cursor++; - - } else { - // boolattr - if ($key !== '') { - $array[$key] = $key; - } else { - // purely theoretical - if ($e) $e->send(E_ERROR, 'Lexer: Missing attribute key'); - } - - } - } - return $array; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Our in-house implementation of a parser. + * + * A pure PHP parser, DirectLex has absolutely no dependencies, making + * it a reasonably good default for PHP4. Written with efficiency in mind, + * it can be four times faster than HTMLPurifier_Lexer_PEARSax3, although it + * pales in comparison to HTMLPurifier_Lexer_DOMLex. + * + * @todo Reread XML spec and document differences. + */ +class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer +{ + /** + * @type bool + */ + public $tracksLineNumbers = true; + + /** + * Whitespace characters for str(c)spn. + * @type string + */ + protected $_whitespace = "\x20\x09\x0D\x0A"; + + /** + * Callback function for script CDATA fudge + * @param array $matches, in form of array(opening tag, contents, closing tag) + * @return string + */ + protected function scriptCallback($matches) + { + return $matches[1] . htmlspecialchars($matches[2], ENT_COMPAT, 'UTF-8') . $matches[3]; + } + + /** + * @param String $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array|HTMLPurifier_Token[] + */ + public function tokenizeHTML($html, $config, $context) + { + // special normalization for script tags without any armor + // our "armor" heurstic is a < sign any number of whitespaces after + // the first script tag + if ($config->get('HTML.Trusted')) { + $html = preg_replace_callback( + '#(<script[^>]*>)(\s*[^<].+?)(</script>)#si', + array($this, 'scriptCallback'), + $html + ); + } + + $html = $this->normalize($html, $config, $context); + + $cursor = 0; // our location in the text + $inside_tag = false; // whether or not we're parsing the inside of a tag + $array = array(); // result array + + // This is also treated to mean maintain *column* numbers too + $maintain_line_numbers = $config->get('Core.MaintainLineNumbers'); + + if ($maintain_line_numbers === null) { + // automatically determine line numbering by checking + // if error collection is on + $maintain_line_numbers = $config->get('Core.CollectErrors'); + } + + if ($maintain_line_numbers) { + $current_line = 1; + $current_col = 0; + $length = strlen($html); + } else { + $current_line = false; + $current_col = false; + $length = false; + } + $context->register('CurrentLine', $current_line); + $context->register('CurrentCol', $current_col); + $nl = "\n"; + // how often to manually recalculate. This will ALWAYS be right, + // but it's pretty wasteful. Set to 0 to turn off + $synchronize_interval = $config->get('Core.DirectLexLineNumberSyncInterval'); + + $e = false; + if ($config->get('Core.CollectErrors')) { + $e =& $context->get('ErrorCollector'); + } + + // for testing synchronization + $loops = 0; + + while (++$loops) { + // $cursor is either at the start of a token, or inside of + // a tag (i.e. there was a < immediately before it), as indicated + // by $inside_tag + + if ($maintain_line_numbers) { + // $rcursor, however, is always at the start of a token. + $rcursor = $cursor - (int)$inside_tag; + + // Column number is cheap, so we calculate it every round. + // We're interested at the *end* of the newline string, so + // we need to add strlen($nl) == 1 to $nl_pos before subtracting it + // from our "rcursor" position. + $nl_pos = strrpos($html, $nl, $rcursor - $length); + $current_col = $rcursor - (is_bool($nl_pos) ? 0 : $nl_pos + 1); + + // recalculate lines + if ($synchronize_interval && // synchronization is on + $cursor > 0 && // cursor is further than zero + $loops % $synchronize_interval === 0) { // time to synchronize! + $current_line = 1 + $this->substrCount($html, $nl, 0, $cursor); + } + } + + $position_next_lt = strpos($html, '<', $cursor); + $position_next_gt = strpos($html, '>', $cursor); + + // triggers on "<b>asdf</b>" but not "asdf <b></b>" + // special case to set up context + if ($position_next_lt === $cursor) { + $inside_tag = true; + $cursor++; + } + + if (!$inside_tag && $position_next_lt !== false) { + // We are not inside tag and there still is another tag to parse + $token = new + HTMLPurifier_Token_Text( + $this->parseText( + substr( + $html, + $cursor, + $position_next_lt - $cursor + ), $config + ) + ); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $position_next_lt - $cursor); + } + $array[] = $token; + $cursor = $position_next_lt + 1; + $inside_tag = true; + continue; + } elseif (!$inside_tag) { + // We are not inside tag but there are no more tags + // If we're already at the end, break + if ($cursor === strlen($html)) { + break; + } + // Create Text of rest of string + $token = new + HTMLPurifier_Token_Text( + $this->parseText( + substr( + $html, + $cursor + ), $config + ) + ); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + } + $array[] = $token; + break; + } elseif ($inside_tag && $position_next_gt !== false) { + // We are in tag and it is well formed + // Grab the internals of the tag + $strlen_segment = $position_next_gt - $cursor; + + if ($strlen_segment < 1) { + // there's nothing to process! + $token = new HTMLPurifier_Token_Text('<'); + $cursor++; + continue; + } + + $segment = substr($html, $cursor, $strlen_segment); + + if ($segment === false) { + // somehow, we attempted to access beyond the end of + // the string, defense-in-depth, reported by Nate Abele + break; + } + + // Check if it's a comment + if (substr($segment, 0, 3) === '!--') { + // re-determine segment length, looking for --> + $position_comment_end = strpos($html, '-->', $cursor); + if ($position_comment_end === false) { + // uh oh, we have a comment that extends to + // infinity. Can't be helped: set comment + // end position to end of string + if ($e) { + $e->send(E_WARNING, 'Lexer: Unclosed comment'); + } + $position_comment_end = strlen($html); + $end = true; + } else { + $end = false; + } + $strlen_segment = $position_comment_end - $cursor; + $segment = substr($html, $cursor, $strlen_segment); + $token = new + HTMLPurifier_Token_Comment( + substr( + $segment, + 3, + $strlen_segment - 3 + ) + ); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $strlen_segment); + } + $array[] = $token; + $cursor = $end ? $position_comment_end : $position_comment_end + 3; + $inside_tag = false; + continue; + } + + // Check if it's an end tag + $is_end_tag = (strpos($segment, '/') === 0); + if ($is_end_tag) { + $type = substr($segment, 1); + $token = new HTMLPurifier_Token_End($type); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); + } + $array[] = $token; + $inside_tag = false; + $cursor = $position_next_gt + 1; + continue; + } + + // Check leading character is alnum, if not, we may + // have accidently grabbed an emoticon. Translate into + // text and go our merry way + if (!ctype_alpha($segment[0])) { + // XML: $segment[0] !== '_' && $segment[0] !== ':' + if ($e) { + $e->send(E_NOTICE, 'Lexer: Unescaped lt'); + } + $token = new HTMLPurifier_Token_Text('<'); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); + } + $array[] = $token; + $inside_tag = false; + continue; + } + + // Check if it is explicitly self closing, if so, remove + // trailing slash. Remember, we could have a tag like <br>, so + // any later token processing scripts must convert improperly + // classified EmptyTags from StartTags. + $is_self_closing = (strrpos($segment, '/') === $strlen_segment - 1); + if ($is_self_closing) { + $strlen_segment--; + $segment = substr($segment, 0, $strlen_segment); + } + + // Check if there are any attributes + $position_first_space = strcspn($segment, $this->_whitespace); + + if ($position_first_space >= $strlen_segment) { + if ($is_self_closing) { + $token = new HTMLPurifier_Token_Empty($segment); + } else { + $token = new HTMLPurifier_Token_Start($segment); + } + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); + } + $array[] = $token; + $inside_tag = false; + $cursor = $position_next_gt + 1; + continue; + } + + // Grab out all the data + $type = substr($segment, 0, $position_first_space); + $attribute_string = + trim( + substr( + $segment, + $position_first_space + ) + ); + if ($attribute_string) { + $attr = $this->parseAttributeString( + $attribute_string, + $config, + $context + ); + } else { + $attr = array(); + } + + if ($is_self_closing) { + $token = new HTMLPurifier_Token_Empty($type, $attr); + } else { + $token = new HTMLPurifier_Token_Start($type, $attr); + } + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); + } + $array[] = $token; + $cursor = $position_next_gt + 1; + $inside_tag = false; + continue; + } else { + // inside tag, but there's no ending > sign + if ($e) { + $e->send(E_WARNING, 'Lexer: Missing gt'); + } + $token = new + HTMLPurifier_Token_Text( + '<' . + $this->parseText( + substr($html, $cursor), $config + ) + ); + if ($maintain_line_numbers) { + $token->rawPosition($current_line, $current_col); + } + // no cursor scroll? Hmm... + $array[] = $token; + break; + } + break; + } + + $context->destroy('CurrentLine'); + $context->destroy('CurrentCol'); + return $array; + } + + /** + * PHP 5.0.x compatible substr_count that implements offset and length + * @param string $haystack + * @param string $needle + * @param int $offset + * @param int $length + * @return int + */ + protected function substrCount($haystack, $needle, $offset, $length) + { + static $oldVersion; + if ($oldVersion === null) { + $oldVersion = version_compare(PHP_VERSION, '5.1', '<'); + } + if ($oldVersion) { + $haystack = substr($haystack, $offset, $length); + return substr_count($haystack, $needle); + } else { + return substr_count($haystack, $needle, $offset, $length); + } + } + + /** + * Takes the inside of an HTML tag and makes an assoc array of attributes. + * + * @param string $string Inside of tag excluding name. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array Assoc array of attributes. + */ + public function parseAttributeString($string, $config, $context) + { + $string = (string)$string; // quick typecast + + if ($string == '') { + return array(); + } // no attributes + + $e = false; + if ($config->get('Core.CollectErrors')) { + $e =& $context->get('ErrorCollector'); + } + + // let's see if we can abort as quickly as possible + // one equal sign, no spaces => one attribute + $num_equal = substr_count($string, '='); + $has_space = strpos($string, ' '); + if ($num_equal === 0 && !$has_space) { + // bool attribute + return array($string => $string); + } elseif ($num_equal === 1 && !$has_space) { + // only one attribute + list($key, $quoted_value) = explode('=', $string); + $quoted_value = trim($quoted_value); + if (!$key) { + if ($e) { + $e->send(E_ERROR, 'Lexer: Missing attribute key'); + } + return array(); + } + if (!$quoted_value) { + return array($key => ''); + } + $first_char = @$quoted_value[0]; + $last_char = @$quoted_value[strlen($quoted_value) - 1]; + + $same_quote = ($first_char == $last_char); + $open_quote = ($first_char == '"' || $first_char == "'"); + + if ($same_quote && $open_quote) { + // well behaved + $value = substr($quoted_value, 1, strlen($quoted_value) - 2); + } else { + // not well behaved + if ($open_quote) { + if ($e) { + $e->send(E_ERROR, 'Lexer: Missing end quote'); + } + $value = substr($quoted_value, 1); + } else { + $value = $quoted_value; + } + } + if ($value === false) { + $value = ''; + } + return array($key => $this->parseAttr($value, $config)); + } + + // setup loop environment + $array = array(); // return assoc array of attributes + $cursor = 0; // current position in string (moves forward) + $size = strlen($string); // size of the string (stays the same) + + // if we have unquoted attributes, the parser expects a terminating + // space, so let's guarantee that there's always a terminating space. + $string .= ' '; + + $old_cursor = -1; + while ($cursor < $size) { + if ($old_cursor >= $cursor) { + throw new Exception("Infinite loop detected"); + } + $old_cursor = $cursor; + + $cursor += ($value = strspn($string, $this->_whitespace, $cursor)); + // grab the key + + $key_begin = $cursor; //we're currently at the start of the key + + // scroll past all characters that are the key (not whitespace or =) + $cursor += strcspn($string, $this->_whitespace . '=', $cursor); + + $key_end = $cursor; // now at the end of the key + + $key = substr($string, $key_begin, $key_end - $key_begin); + + if (!$key) { + if ($e) { + $e->send(E_ERROR, 'Lexer: Missing attribute key'); + } + $cursor += 1 + strcspn($string, $this->_whitespace, $cursor + 1); // prevent infinite loop + continue; // empty key + } + + // scroll past all whitespace + $cursor += strspn($string, $this->_whitespace, $cursor); + + if ($cursor >= $size) { + $array[$key] = $key; + break; + } + + // if the next character is an equal sign, we've got a regular + // pair, otherwise, it's a bool attribute + $first_char = @$string[$cursor]; + + if ($first_char == '=') { + // key="value" + + $cursor++; + $cursor += strspn($string, $this->_whitespace, $cursor); + + if ($cursor === false) { + $array[$key] = ''; + break; + } + + // we might be in front of a quote right now + + $char = @$string[$cursor]; + + if ($char == '"' || $char == "'") { + // it's quoted, end bound is $char + $cursor++; + $value_begin = $cursor; + $cursor = strpos($string, $char, $cursor); + $value_end = $cursor; + } else { + // it's not quoted, end bound is whitespace + $value_begin = $cursor; + $cursor += strcspn($string, $this->_whitespace, $cursor); + $value_end = $cursor; + } + + // we reached a premature end + if ($cursor === false) { + $cursor = $size; + $value_end = $cursor; + } + + $value = substr($string, $value_begin, $value_end - $value_begin); + if ($value === false) { + $value = ''; + } + $array[$key] = $this->parseAttr($value, $config); + $cursor++; + } else { + // boolattr + if ($key !== '') { + $array[$key] = $key; + } else { + // purely theoretical + if ($e) { + $e->send(E_ERROR, 'Lexer: Missing attribute key'); + } + } + } + } + return $array; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/PH5P.php b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/PH5P.php new file mode 100644 index 0000000000000000000000000000000000000000..6b281a5428e86a614fefa39b4c2c7741e2e6f3ac --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Lexer/PH5P.php @@ -0,0 +1,4788 @@ +<?php + +/** + * Experimental HTML5-based parser using Jeroen van der Meer's PH5P library. + * Occupies space in the HTML5 pseudo-namespace, which may cause conflicts. + * + * @note + * Recent changes to PHP's DOM extension have resulted in some fatal + * error conditions with the original version of PH5P. Pending changes, + * this lexer will punt to DirectLex if DOM throws an exception. + */ + +class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex +{ + /** + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] + */ + public function tokenizeHTML($html, $config, $context) + { + $new_html = $this->normalize($html, $config, $context); + $new_html = $this->wrapHTML($new_html, $config, $context, false /* no div */); + try { + $parser = new HTML5($new_html); + $doc = $parser->save(); + } catch (DOMException $e) { + // Uh oh, it failed. Punt to DirectLex. + $lexer = new HTMLPurifier_Lexer_DirectLex(); + $context->register('PH5PError', $e); // save the error, so we can detect it + return $lexer->tokenizeHTML($html, $config, $context); // use original HTML + } + $tokens = array(); + $this->tokenizeDOM( + $doc->getElementsByTagName('html')->item(0)-> // <html> + getElementsByTagName('body')->item(0) // <body> + , + $tokens, $config + ); + return $tokens; + } +} + +/* + +Copyright 2007 Jeroen van der Meer <http://jero.net/> + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ + +class HTML5 +{ + private $data; + private $char; + private $EOF; + private $state; + private $tree; + private $token; + private $content_model; + private $escape = false; + private $entities = array( + 'AElig;', + 'AElig', + 'AMP;', + 'AMP', + 'Aacute;', + 'Aacute', + 'Acirc;', + 'Acirc', + 'Agrave;', + 'Agrave', + 'Alpha;', + 'Aring;', + 'Aring', + 'Atilde;', + 'Atilde', + 'Auml;', + 'Auml', + 'Beta;', + 'COPY;', + 'COPY', + 'Ccedil;', + 'Ccedil', + 'Chi;', + 'Dagger;', + 'Delta;', + 'ETH;', + 'ETH', + 'Eacute;', + 'Eacute', + 'Ecirc;', + 'Ecirc', + 'Egrave;', + 'Egrave', + 'Epsilon;', + 'Eta;', + 'Euml;', + 'Euml', + 'GT;', + 'GT', + 'Gamma;', + 'Iacute;', + 'Iacute', + 'Icirc;', + 'Icirc', + 'Igrave;', + 'Igrave', + 'Iota;', + 'Iuml;', + 'Iuml', + 'Kappa;', + 'LT;', + 'LT', + 'Lambda;', + 'Mu;', + 'Ntilde;', + 'Ntilde', + 'Nu;', + 'OElig;', + 'Oacute;', + 'Oacute', + 'Ocirc;', + 'Ocirc', + 'Ograve;', + 'Ograve', + 'Omega;', + 'Omicron;', + 'Oslash;', + 'Oslash', + 'Otilde;', + 'Otilde', + 'Ouml;', + 'Ouml', + 'Phi;', + 'Pi;', + 'Prime;', + 'Psi;', + 'QUOT;', + 'QUOT', + 'REG;', + 'REG', + 'Rho;', + 'Scaron;', + 'Sigma;', + 'THORN;', + 'THORN', + 'TRADE;', + 'Tau;', + 'Theta;', + 'Uacute;', + 'Uacute', + 'Ucirc;', + 'Ucirc', + 'Ugrave;', + 'Ugrave', + 'Upsilon;', + 'Uuml;', + 'Uuml', + 'Xi;', + 'Yacute;', + 'Yacute', + 'Yuml;', + 'Zeta;', + 'aacute;', + 'aacute', + 'acirc;', + 'acirc', + 'acute;', + 'acute', + 'aelig;', + 'aelig', + 'agrave;', + 'agrave', + 'alefsym;', + 'alpha;', + 'amp;', + 'amp', + 'and;', + 'ang;', + 'apos;', + 'aring;', + 'aring', + 'asymp;', + 'atilde;', + 'atilde', + 'auml;', + 'auml', + 'bdquo;', + 'beta;', + 'brvbar;', + 'brvbar', + 'bull;', + 'cap;', + 'ccedil;', + 'ccedil', + 'cedil;', + 'cedil', + 'cent;', + 'cent', + 'chi;', + 'circ;', + 'clubs;', + 'cong;', + 'copy;', + 'copy', + 'crarr;', + 'cup;', + 'curren;', + 'curren', + 'dArr;', + 'dagger;', + 'darr;', + 'deg;', + 'deg', + 'delta;', + 'diams;', + 'divide;', + 'divide', + 'eacute;', + 'eacute', + 'ecirc;', + 'ecirc', + 'egrave;', + 'egrave', + 'empty;', + 'emsp;', + 'ensp;', + 'epsilon;', + 'equiv;', + 'eta;', + 'eth;', + 'eth', + 'euml;', + 'euml', + 'euro;', + 'exist;', + 'fnof;', + 'forall;', + 'frac12;', + 'frac12', + 'frac14;', + 'frac14', + 'frac34;', + 'frac34', + 'frasl;', + 'gamma;', + 'ge;', + 'gt;', + 'gt', + 'hArr;', + 'harr;', + 'hearts;', + 'hellip;', + 'iacute;', + 'iacute', + 'icirc;', + 'icirc', + 'iexcl;', + 'iexcl', + 'igrave;', + 'igrave', + 'image;', + 'infin;', + 'int;', + 'iota;', + 'iquest;', + 'iquest', + 'isin;', + 'iuml;', + 'iuml', + 'kappa;', + 'lArr;', + 'lambda;', + 'lang;', + 'laquo;', + 'laquo', + 'larr;', + 'lceil;', + 'ldquo;', + 'le;', + 'lfloor;', + 'lowast;', + 'loz;', + 'lrm;', + 'lsaquo;', + 'lsquo;', + 'lt;', + 'lt', + 'macr;', + 'macr', + 'mdash;', + 'micro;', + 'micro', + 'middot;', + 'middot', + 'minus;', + 'mu;', + 'nabla;', + 'nbsp;', + 'nbsp', + 'ndash;', + 'ne;', + 'ni;', + 'not;', + 'not', + 'notin;', + 'nsub;', + 'ntilde;', + 'ntilde', + 'nu;', + 'oacute;', + 'oacute', + 'ocirc;', + 'ocirc', + 'oelig;', + 'ograve;', + 'ograve', + 'oline;', + 'omega;', + 'omicron;', + 'oplus;', + 'or;', + 'ordf;', + 'ordf', + 'ordm;', + 'ordm', + 'oslash;', + 'oslash', + 'otilde;', + 'otilde', + 'otimes;', + 'ouml;', + 'ouml', + 'para;', + 'para', + 'part;', + 'permil;', + 'perp;', + 'phi;', + 'pi;', + 'piv;', + 'plusmn;', + 'plusmn', + 'pound;', + 'pound', + 'prime;', + 'prod;', + 'prop;', + 'psi;', + 'quot;', + 'quot', + 'rArr;', + 'radic;', + 'rang;', + 'raquo;', + 'raquo', + 'rarr;', + 'rceil;', + 'rdquo;', + 'real;', + 'reg;', + 'reg', + 'rfloor;', + 'rho;', + 'rlm;', + 'rsaquo;', + 'rsquo;', + 'sbquo;', + 'scaron;', + 'sdot;', + 'sect;', + 'sect', + 'shy;', + 'shy', + 'sigma;', + 'sigmaf;', + 'sim;', + 'spades;', + 'sub;', + 'sube;', + 'sum;', + 'sup1;', + 'sup1', + 'sup2;', + 'sup2', + 'sup3;', + 'sup3', + 'sup;', + 'supe;', + 'szlig;', + 'szlig', + 'tau;', + 'there4;', + 'theta;', + 'thetasym;', + 'thinsp;', + 'thorn;', + 'thorn', + 'tilde;', + 'times;', + 'times', + 'trade;', + 'uArr;', + 'uacute;', + 'uacute', + 'uarr;', + 'ucirc;', + 'ucirc', + 'ugrave;', + 'ugrave', + 'uml;', + 'uml', + 'upsih;', + 'upsilon;', + 'uuml;', + 'uuml', + 'weierp;', + 'xi;', + 'yacute;', + 'yacute', + 'yen;', + 'yen', + 'yuml;', + 'yuml', + 'zeta;', + 'zwj;', + 'zwnj;' + ); + + const PCDATA = 0; + const RCDATA = 1; + const CDATA = 2; + const PLAINTEXT = 3; + + const DOCTYPE = 0; + const STARTTAG = 1; + const ENDTAG = 2; + const COMMENT = 3; + const CHARACTR = 4; + const EOF = 5; + + public function __construct($data) + { + $this->data = $data; + $this->char = -1; + $this->EOF = strlen($data); + $this->tree = new HTML5TreeConstructer; + $this->content_model = self::PCDATA; + + $this->state = 'data'; + + while ($this->state !== null) { + $this->{$this->state . 'State'}(); + } + } + + public function save() + { + return $this->tree->save(); + } + + private function char() + { + return ($this->char < $this->EOF) + ? $this->data[$this->char] + : false; + } + + private function character($s, $l = 0) + { + if ($s + $l < $this->EOF) { + if ($l === 0) { + return $this->data[$s]; + } else { + return substr($this->data, $s, $l); + } + } + } + + private function characters($char_class, $start) + { + return preg_replace('#^([' . $char_class . ']+).*#s', '\\1', substr($this->data, $start)); + } + + private function dataState() + { + // Consume the next input character + $this->char++; + $char = $this->char(); + + if ($char === '&' && ($this->content_model === self::PCDATA || $this->content_model === self::RCDATA)) { + /* U+0026 AMPERSAND (&) + When the content model flag is set to one of the PCDATA or RCDATA + states: switch to the entity data state. Otherwise: treat it as per + the "anything else" entry below. */ + $this->state = 'entityData'; + + } elseif ($char === '-') { + /* If the content model flag is set to either the RCDATA state or + the CDATA state, and the escape flag is false, and there are at + least three characters before this one in the input stream, and the + last four characters in the input stream, including this one, are + U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, + and U+002D HYPHEN-MINUS ("<!--"), then set the escape flag to true. */ + if (($this->content_model === self::RCDATA || $this->content_model === + self::CDATA) && $this->escape === false && + $this->char >= 3 && $this->character($this->char - 4, 4) === '<!--' + ) { + $this->escape = true; + } + + /* In any case, emit the input character as a character token. Stay + in the data state. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => $char + ) + ); + + /* U+003C LESS-THAN SIGN (<) */ + } elseif ($char === '<' && ($this->content_model === self::PCDATA || + (($this->content_model === self::RCDATA || + $this->content_model === self::CDATA) && $this->escape === false)) + ) { + /* When the content model flag is set to the PCDATA state: switch + to the tag open state. + + When the content model flag is set to either the RCDATA state or + the CDATA state and the escape flag is false: switch to the tag + open state. + + Otherwise: treat it as per the "anything else" entry below. */ + $this->state = 'tagOpen'; + + /* U+003E GREATER-THAN SIGN (>) */ + } elseif ($char === '>') { + /* If the content model flag is set to either the RCDATA state or + the CDATA state, and the escape flag is true, and the last three + characters in the input stream including this one are U+002D + HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN ("-->"), + set the escape flag to false. */ + if (($this->content_model === self::RCDATA || + $this->content_model === self::CDATA) && $this->escape === true && + $this->character($this->char, 3) === '-->' + ) { + $this->escape = false; + } + + /* In any case, emit the input character as a character token. + Stay in the data state. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => $char + ) + ); + + } elseif ($this->char === $this->EOF) { + /* EOF + Emit an end-of-file token. */ + $this->EOF(); + + } elseif ($this->content_model === self::PLAINTEXT) { + /* When the content model flag is set to the PLAINTEXT state + THIS DIFFERS GREATLY FROM THE SPEC: Get the remaining characters of + the text and emit it as a character token. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => substr($this->data, $this->char) + ) + ); + + $this->EOF(); + + } else { + /* Anything else + THIS DIFFERS GREATLY FROM THE SPEC: Get as many character that + otherwise would also be treated as a character token and emit it + as a single character token. Stay in the data state. */ + $len = strcspn($this->data, '<&', $this->char); + $char = substr($this->data, $this->char, $len); + $this->char += $len - 1; + + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => $char + ) + ); + + $this->state = 'data'; + } + } + + private function entityDataState() + { + // Attempt to consume an entity. + $entity = $this->entity(); + + // If nothing is returned, emit a U+0026 AMPERSAND character token. + // Otherwise, emit the character token that was returned. + $char = (!$entity) ? '&' : $entity; + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => $char + ) + ); + + // Finally, switch to the data state. + $this->state = 'data'; + } + + private function tagOpenState() + { + switch ($this->content_model) { + case self::RCDATA: + case self::CDATA: + /* If the next input character is a U+002F SOLIDUS (/) character, + consume it and switch to the close tag open state. If the next + input character is not a U+002F SOLIDUS (/) character, emit a + U+003C LESS-THAN SIGN character token and switch to the data + state to process the next input character. */ + if ($this->character($this->char + 1) === '/') { + $this->char++; + $this->state = 'closeTagOpen'; + + } else { + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => '<' + ) + ); + + $this->state = 'data'; + } + break; + + case self::PCDATA: + // If the content model flag is set to the PCDATA state + // Consume the next input character: + $this->char++; + $char = $this->char(); + + if ($char === '!') { + /* U+0021 EXCLAMATION MARK (!) + Switch to the markup declaration open state. */ + $this->state = 'markupDeclarationOpen'; + + } elseif ($char === '/') { + /* U+002F SOLIDUS (/) + Switch to the close tag open state. */ + $this->state = 'closeTagOpen'; + + } elseif (preg_match('/^[A-Za-z]$/', $char)) { + /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z + Create a new start tag token, set its tag name to the lowercase + version of the input character (add 0x0020 to the character's code + point), then switch to the tag name state. (Don't emit the token + yet; further details will be filled in before it is emitted.) */ + $this->token = array( + 'name' => strtolower($char), + 'type' => self::STARTTAG, + 'attr' => array() + ); + + $this->state = 'tagName'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Parse error. Emit a U+003C LESS-THAN SIGN character token and a + U+003E GREATER-THAN SIGN character token. Switch to the data state. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => '<>' + ) + ); + + $this->state = 'data'; + + } elseif ($char === '?') { + /* U+003F QUESTION MARK (?) + Parse error. Switch to the bogus comment state. */ + $this->state = 'bogusComment'; + + } else { + /* Anything else + Parse error. Emit a U+003C LESS-THAN SIGN character token and + reconsume the current input character in the data state. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => '<' + ) + ); + + $this->char--; + $this->state = 'data'; + } + break; + } + } + + private function closeTagOpenState() + { + $next_node = strtolower($this->characters('A-Za-z', $this->char + 1)); + $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName; + + if (($this->content_model === self::RCDATA || $this->content_model === self::CDATA) && + (!$the_same || ($the_same && (!preg_match( + '/[\t\n\x0b\x0c >\/]/', + $this->character($this->char + 1 + strlen($next_node)) + ) || $this->EOF === $this->char))) + ) { + /* If the content model flag is set to the RCDATA or CDATA states then + examine the next few characters. If they do not match the tag name of + the last start tag token emitted (case insensitively), or if they do but + they are not immediately followed by one of the following characters: + * U+0009 CHARACTER TABULATION + * U+000A LINE FEED (LF) + * U+000B LINE TABULATION + * U+000C FORM FEED (FF) + * U+0020 SPACE + * U+003E GREATER-THAN SIGN (>) + * U+002F SOLIDUS (/) + * EOF + ...then there is a parse error. Emit a U+003C LESS-THAN SIGN character + token, a U+002F SOLIDUS character token, and switch to the data state + to process the next input character. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => '</' + ) + ); + + $this->state = 'data'; + + } else { + /* Otherwise, if the content model flag is set to the PCDATA state, + or if the next few characters do match that tag name, consume the + next input character: */ + $this->char++; + $char = $this->char(); + + if (preg_match('/^[A-Za-z]$/', $char)) { + /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z + Create a new end tag token, set its tag name to the lowercase version + of the input character (add 0x0020 to the character's code point), then + switch to the tag name state. (Don't emit the token yet; further details + will be filled in before it is emitted.) */ + $this->token = array( + 'name' => strtolower($char), + 'type' => self::ENDTAG + ); + + $this->state = 'tagName'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Parse error. Switch to the data state. */ + $this->state = 'data'; + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit a U+003C LESS-THAN SIGN character token and a U+002F + SOLIDUS character token. Reconsume the EOF character in the data state. */ + $this->emitToken( + array( + 'type' => self::CHARACTR, + 'data' => '</' + ) + ); + + $this->char--; + $this->state = 'data'; + + } else { + /* Parse error. Switch to the bogus comment state. */ + $this->state = 'bogusComment'; + } + } + } + + private function tagNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } elseif ($char === '/') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } else { + /* Anything else + Append the current input character to the current tag token's tag name. + Stay in the tag name state. */ + $this->token['name'] .= strtolower($char); + $this->state = 'tagName'; + } + } + + private function beforeAttributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($char === '/') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Stay in the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Start a new attribute in the current tag token. Set that attribute's + name to the current input character, and its value to the empty string. + Switch to the attribute name state. */ + $this->token['attr'][] = array( + 'name' => strtolower($char), + 'value' => null + ); + + $this->state = 'attributeName'; + } + } + + private function attributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute name state. */ + $this->state = 'afterAttributeName'; + + } elseif ($char === '=') { + /* U+003D EQUALS SIGN (=) + Switch to the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($char === '/' && $this->character($this->char + 1) !== '>') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's name. + Stay in the attribute name state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['name'] .= strtolower($char); + + $this->state = 'attributeName'; + } + } + + private function afterAttributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the after attribute name state. */ + $this->state = 'afterAttributeName'; + + } elseif ($char === '=') { + /* U+003D EQUALS SIGN (=) + Switch to the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($char === '/' && $this->character($this->char + 1) !== '>') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the + before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Start a new attribute in the current tag token. Set that attribute's + name to the current input character, and its value to the empty string. + Switch to the attribute name state. */ + $this->token['attr'][] = array( + 'name' => strtolower($char), + 'value' => null + ); + + $this->state = 'attributeName'; + } + } + + private function beforeAttributeValueState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif ($char === '"') { + /* U+0022 QUOTATION MARK (") + Switch to the attribute value (double-quoted) state. */ + $this->state = 'attributeValueDoubleQuoted'; + + } elseif ($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the attribute value (unquoted) state and reconsume + this input character. */ + $this->char--; + $this->state = 'attributeValueUnquoted'; + + } elseif ($char === '\'') { + /* U+0027 APOSTROPHE (') + Switch to the attribute value (single-quoted) state. */ + $this->state = 'attributeValueSingleQuoted'; + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Switch to the attribute value (unquoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueUnquoted'; + } + } + + private function attributeValueDoubleQuotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if ($char === '"') { + /* U+0022 QUOTATION MARK (") + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState('double'); + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the character + in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (double-quoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueDoubleQuoted'; + } + } + + private function attributeValueSingleQuotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if ($char === '\'') { + /* U+0022 QUOTATION MARK (') + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState('single'); + + } elseif ($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the character + in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (single-quoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueSingleQuoted'; + } + } + + private function attributeValueUnquotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif ($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState(); + + } elseif ($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (unquoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueUnquoted'; + } + } + + private function entityInAttributeValueState() + { + // Attempt to consume an entity. + $entity = $this->entity(); + + // If nothing is returned, append a U+0026 AMPERSAND character to the + // current attribute's value. Otherwise, emit the character token that + // was returned. + $char = (!$entity) + ? '&' + : $entity; + + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + } + + private function bogusCommentState() + { + /* Consume every character up to the first U+003E GREATER-THAN SIGN + character (>) or the end of the file (EOF), whichever comes first. Emit + a comment token whose data is the concatenation of all the characters + starting from and including the character that caused the state machine + to switch into the bogus comment state, up to and including the last + consumed character before the U+003E character, if any, or up to the + end of the file otherwise. (If the comment was started by the end of + the file (EOF), the token is empty.) */ + $data = $this->characters('^>', $this->char); + $this->emitToken( + array( + 'data' => $data, + 'type' => self::COMMENT + ) + ); + + $this->char += strlen($data); + + /* Switch to the data state. */ + $this->state = 'data'; + + /* If the end of the file was reached, reconsume the EOF character. */ + if ($this->char === $this->EOF) { + $this->char = $this->EOF - 1; + } + } + + private function markupDeclarationOpenState() + { + /* If the next two characters are both U+002D HYPHEN-MINUS (-) + characters, consume those two characters, create a comment token whose + data is the empty string, and switch to the comment state. */ + if ($this->character($this->char + 1, 2) === '--') { + $this->char += 2; + $this->state = 'comment'; + $this->token = array( + 'data' => null, + 'type' => self::COMMENT + ); + + /* Otherwise if the next seven chacacters are a case-insensitive match + for the word "DOCTYPE", then consume those characters and switch to the + DOCTYPE state. */ + } elseif (strtolower($this->character($this->char + 1, 7)) === 'doctype') { + $this->char += 7; + $this->state = 'doctype'; + + /* Otherwise, is is a parse error. Switch to the bogus comment state. + The next character that is consumed, if any, is the first character + that will be in the comment. */ + } else { + $this->char++; + $this->state = 'bogusComment'; + } + } + + private function commentState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + /* U+002D HYPHEN-MINUS (-) */ + if ($char === '-') { + /* Switch to the comment dash state */ + $this->state = 'commentDash'; + + /* EOF */ + } elseif ($this->char === $this->EOF) { + /* Parse error. Emit the comment token. Reconsume the EOF character + in the data state. */ + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + /* Anything else */ + } else { + /* Append the input character to the comment token's data. Stay in + the comment state. */ + $this->token['data'] .= $char; + } + } + + private function commentDashState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + /* U+002D HYPHEN-MINUS (-) */ + if ($char === '-') { + /* Switch to the comment end state */ + $this->state = 'commentEnd'; + + /* EOF */ + } elseif ($this->char === $this->EOF) { + /* Parse error. Emit the comment token. Reconsume the EOF character + in the data state. */ + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + /* Anything else */ + } else { + /* Append a U+002D HYPHEN-MINUS (-) character and the input + character to the comment token's data. Switch to the comment state. */ + $this->token['data'] .= '-' . $char; + $this->state = 'comment'; + } + } + + private function commentEndState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if ($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($char === '-') { + $this->token['data'] .= '-'; + + } elseif ($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['data'] .= '--' . $char; + $this->state = 'comment'; + } + } + + private function doctypeState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + $this->state = 'beforeDoctypeName'; + + } else { + $this->char--; + $this->state = 'beforeDoctypeName'; + } + } + + private function beforeDoctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + // Stay in the before DOCTYPE name state. + + } elseif (preg_match('/^[a-z]$/', $char)) { + $this->token = array( + 'name' => strtoupper($char), + 'type' => self::DOCTYPE, + 'error' => true + ); + + $this->state = 'doctypeName'; + + } elseif ($char === '>') { + $this->emitToken( + array( + 'name' => null, + 'type' => self::DOCTYPE, + 'error' => true + ) + ); + + $this->state = 'data'; + + } elseif ($this->char === $this->EOF) { + $this->emitToken( + array( + 'name' => null, + 'type' => self::DOCTYPE, + 'error' => true + ) + ); + + $this->char--; + $this->state = 'data'; + + } else { + $this->token = array( + 'name' => $char, + 'type' => self::DOCTYPE, + 'error' => true + ); + + $this->state = 'doctypeName'; + } + } + + private function doctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + $this->state = 'AfterDoctypeName'; + + } elseif ($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif (preg_match('/^[a-z]$/', $char)) { + $this->token['name'] .= strtoupper($char); + + } elseif ($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['name'] .= $char; + } + + $this->token['error'] = ($this->token['name'] === 'HTML') + ? false + : true; + } + + private function afterDoctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + // Stay in the DOCTYPE name state. + + } elseif ($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['error'] = true; + $this->state = 'bogusDoctype'; + } + } + + private function bogusDoctypeState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if ($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif ($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + // Stay in the bogus DOCTYPE state. + } + } + + private function entity() + { + $start = $this->char; + + // This section defines how to consume an entity. This definition is + // used when parsing entities in text and in attributes. + + // The behaviour depends on the identity of the next character (the + // one immediately after the U+0026 AMPERSAND character): + + switch ($this->character($this->char + 1)) { + // U+0023 NUMBER SIGN (#) + case '#': + + // The behaviour further depends on the character after the + // U+0023 NUMBER SIGN: + switch ($this->character($this->char + 1)) { + // U+0078 LATIN SMALL LETTER X + // U+0058 LATIN CAPITAL LETTER X + case 'x': + case 'X': + // Follow the steps below, but using the range of + // characters U+0030 DIGIT ZERO through to U+0039 DIGIT + // NINE, U+0061 LATIN SMALL LETTER A through to U+0066 + // LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER + // A, through to U+0046 LATIN CAPITAL LETTER F (in other + // words, 0-9, A-F, a-f). + $char = 1; + $char_class = '0-9A-Fa-f'; + break; + + // Anything else + default: + // Follow the steps below, but using the range of + // characters U+0030 DIGIT ZERO through to U+0039 DIGIT + // NINE (i.e. just 0-9). + $char = 0; + $char_class = '0-9'; + break; + } + + // Consume as many characters as match the range of characters + // given above. + $this->char++; + $e_name = $this->characters($char_class, $this->char + $char + 1); + $entity = $this->character($start, $this->char); + $cond = strlen($e_name) > 0; + + // The rest of the parsing happens below. + break; + + // Anything else + default: + // Consume the maximum number of characters possible, with the + // consumed characters case-sensitively matching one of the + // identifiers in the first column of the entities table. + + $e_name = $this->characters('0-9A-Za-z;', $this->char + 1); + $len = strlen($e_name); + + for ($c = 1; $c <= $len; $c++) { + $id = substr($e_name, 0, $c); + $this->char++; + + if (in_array($id, $this->entities)) { + if ($e_name[$c - 1] !== ';') { + if ($c < $len && $e_name[$c] == ';') { + $this->char++; // consume extra semicolon + } + } + $entity = $id; + break; + } + } + + $cond = isset($entity); + // The rest of the parsing happens below. + break; + } + + if (!$cond) { + // If no match can be made, then this is a parse error. No + // characters are consumed, and nothing is returned. + $this->char = $start; + return false; + } + + // Return a character token for the character corresponding to the + // entity name (as given by the second column of the entities table). + return html_entity_decode('&' . rtrim($entity, ';') . ';', ENT_QUOTES, 'UTF-8'); + } + + private function emitToken($token) + { + $emit = $this->tree->emitToken($token); + + if (is_int($emit)) { + $this->content_model = $emit; + + } elseif ($token['type'] === self::ENDTAG) { + $this->content_model = self::PCDATA; + } + } + + private function EOF() + { + $this->state = null; + $this->tree->emitToken( + array( + 'type' => self::EOF + ) + ); + } +} + +class HTML5TreeConstructer +{ + public $stack = array(); + + private $phase; + private $mode; + private $dom; + private $foster_parent = null; + private $a_formatting = array(); + + private $head_pointer = null; + private $form_pointer = null; + + private $scoping = array('button', 'caption', 'html', 'marquee', 'object', 'table', 'td', 'th'); + private $formatting = array( + 'a', + 'b', + 'big', + 'em', + 'font', + 'i', + 'nobr', + 's', + 'small', + 'strike', + 'strong', + 'tt', + 'u' + ); + private $special = array( + 'address', + 'area', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'center', + 'col', + 'colgroup', + 'dd', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'hr', + 'iframe', + 'image', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'menu', + 'meta', + 'noembed', + 'noframes', + 'noscript', + 'ol', + 'optgroup', + 'option', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'select', + 'spacer', + 'style', + 'tbody', + 'textarea', + 'tfoot', + 'thead', + 'title', + 'tr', + 'ul', + 'wbr' + ); + + // The different phases. + const INIT_PHASE = 0; + const ROOT_PHASE = 1; + const MAIN_PHASE = 2; + const END_PHASE = 3; + + // The different insertion modes for the main phase. + const BEFOR_HEAD = 0; + const IN_HEAD = 1; + const AFTER_HEAD = 2; + const IN_BODY = 3; + const IN_TABLE = 4; + const IN_CAPTION = 5; + const IN_CGROUP = 6; + const IN_TBODY = 7; + const IN_ROW = 8; + const IN_CELL = 9; + const IN_SELECT = 10; + const AFTER_BODY = 11; + const IN_FRAME = 12; + const AFTR_FRAME = 13; + + // The different types of elements. + const SPECIAL = 0; + const SCOPING = 1; + const FORMATTING = 2; + const PHRASING = 3; + + const MARKER = 0; + + public function __construct() + { + $this->phase = self::INIT_PHASE; + $this->mode = self::BEFOR_HEAD; + $this->dom = new DOMDocument; + + $this->dom->encoding = 'UTF-8'; + $this->dom->preserveWhiteSpace = true; + $this->dom->substituteEntities = true; + $this->dom->strictErrorChecking = false; + } + + // Process tag tokens + public function emitToken($token) + { + switch ($this->phase) { + case self::INIT_PHASE: + return $this->initPhase($token); + break; + case self::ROOT_PHASE: + return $this->rootElementPhase($token); + break; + case self::MAIN_PHASE: + return $this->mainPhase($token); + break; + case self::END_PHASE : + return $this->trailingEndPhase($token); + break; + } + } + + private function initPhase($token) + { + /* Initially, the tree construction stage must handle each token + emitted from the tokenisation stage as follows: */ + + /* A DOCTYPE token that is marked as being in error + A comment token + A start tag token + An end tag token + A character token that is not one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE + An end-of-file token */ + if ((isset($token['error']) && $token['error']) || + $token['type'] === HTML5::COMMENT || + $token['type'] === HTML5::STARTTAG || + $token['type'] === HTML5::ENDTAG || + $token['type'] === HTML5::EOF || + ($token['type'] === HTML5::CHARACTR && isset($token['data']) && + !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) + ) { + /* This specification does not define how to handle this case. In + particular, user agents may ignore the entirety of this specification + altogether for such documents, and instead invoke special parse modes + with a greater emphasis on backwards compatibility. */ + + $this->phase = self::ROOT_PHASE; + return $this->rootElementPhase($token); + + /* A DOCTYPE token marked as being correct */ + } elseif (isset($token['error']) && !$token['error']) { + /* Append a DocumentType node to the Document node, with the name + attribute set to the name given in the DOCTYPE token (which will be + "HTML"), and the other attributes specific to DocumentType objects + set to null, empty lists, or the empty string as appropriate. */ + $doctype = new DOMDocumentType(null, null, 'HTML'); + + /* Then, switch to the root element phase of the tree construction + stage. */ + $this->phase = self::ROOT_PHASE; + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif (isset($token['data']) && preg_match( + '/^[\t\n\x0b\x0c ]+$/', + $token['data'] + ) + ) { + /* Append that character to the Document node. */ + $text = $this->dom->createTextNode($token['data']); + $this->dom->appendChild($text); + } + } + + private function rootElementPhase($token) + { + /* After the initial phase, as each token is emitted from the tokenisation + stage, it must be processed as described in this section. */ + + /* A DOCTYPE token */ + if ($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the Document object with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->dom->appendChild($comment); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append that character to the Document node. */ + $text = $this->dom->createTextNode($token['data']); + $this->dom->appendChild($text); + + /* A character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED + (FF), or U+0020 SPACE + A start tag token + An end tag token + An end-of-file token */ + } elseif (($token['type'] === HTML5::CHARACTR && + !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || + $token['type'] === HTML5::STARTTAG || + $token['type'] === HTML5::ENDTAG || + $token['type'] === HTML5::EOF + ) { + /* Create an HTMLElement node with the tag name html, in the HTML + namespace. Append it to the Document object. Switch to the main + phase and reprocess the current token. */ + $html = $this->dom->createElement('html'); + $this->dom->appendChild($html); + $this->stack[] = $html; + + $this->phase = self::MAIN_PHASE; + return $this->mainPhase($token); + } + } + + private function mainPhase($token) + { + /* Tokens in the main phase must be handled as follows: */ + + /* A DOCTYPE token */ + if ($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A start tag token with the tag name "html" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') { + /* If this start tag token was not the first start tag token, then + it is a parse error. */ + + /* For each attribute on the token, check to see if the attribute + is already present on the top element of the stack of open elements. + If it is not, add the attribute and its corresponding value to that + element. */ + foreach ($token['attr'] as $attr) { + if (!$this->stack[0]->hasAttribute($attr['name'])) { + $this->stack[0]->setAttribute($attr['name'], $attr['value']); + } + } + + /* An end-of-file token */ + } elseif ($token['type'] === HTML5::EOF) { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Anything else. */ + } else { + /* Depends on the insertion mode: */ + switch ($this->mode) { + case self::BEFOR_HEAD: + return $this->beforeHead($token); + break; + case self::IN_HEAD: + return $this->inHead($token); + break; + case self::AFTER_HEAD: + return $this->afterHead($token); + break; + case self::IN_BODY: + return $this->inBody($token); + break; + case self::IN_TABLE: + return $this->inTable($token); + break; + case self::IN_CAPTION: + return $this->inCaption($token); + break; + case self::IN_CGROUP: + return $this->inColumnGroup($token); + break; + case self::IN_TBODY: + return $this->inTableBody($token); + break; + case self::IN_ROW: + return $this->inRow($token); + break; + case self::IN_CELL: + return $this->inCell($token); + break; + case self::IN_SELECT: + return $this->inSelect($token); + break; + case self::AFTER_BODY: + return $this->afterBody($token); + break; + case self::IN_FRAME: + return $this->inFrameset($token); + break; + case self::AFTR_FRAME: + return $this->afterFrameset($token); + break; + case self::END_PHASE: + return $this->trailingEndPhase($token); + break; + } + } + } + + private function beforeHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token with the tag name "head" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') { + /* Create an element for the token, append the new element to the + current node and push it onto the stack of open elements. */ + $element = $this->insertElement($token); + + /* Set the head element pointer to this new element node. */ + $this->head_pointer = $element; + + /* Change the insertion mode to "in head". */ + $this->mode = self::IN_HEAD; + + /* A start tag token whose tag name is one of: "base", "link", "meta", + "script", "style", "title". Or an end tag with the tag name "html". + Or a character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. Or any other start tag token */ + } elseif ($token['type'] === HTML5::STARTTAG || + ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') || + ($token['type'] === HTML5::CHARACTR && !preg_match( + '/^[\t\n\x0b\x0c ]$/', + $token['data'] + )) + ) { + /* Act as if a start tag token with the tag name "head" and no + attributes had been seen, then reprocess the current token. */ + $this->beforeHead( + array( + 'name' => 'head', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + return $this->inHead($token); + + /* Any other end tag */ + } elseif ($token['type'] === HTML5::ENDTAG) { + /* Parse error. Ignore the token. */ + } + } + + private function inHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. + + THIS DIFFERS FROM THE SPEC: If the current node is either a title, style + or script element, append the character to the current node regardless + of its content. */ + if (($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || ( + $token['type'] === HTML5::CHARACTR && in_array( + end($this->stack)->nodeName, + array('title', 'style', 'script') + )) + ) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + } elseif ($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('title', 'style', 'script')) + ) { + array_pop($this->stack); + return HTML5::PCDATA; + + /* A start tag with the tag name "title" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'title') { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if ($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + } else { + $element = $this->insertElement($token); + } + + /* Switch the tokeniser's content model flag to the RCDATA state. */ + return HTML5::RCDATA; + + /* A start tag with the tag name "style" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'style') { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if ($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + } else { + $this->insertElement($token); + } + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + + /* A start tag with the tag name "script" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'script') { + /* Create an element for the token. */ + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + + /* A start tag with the tag name "base", "link", or "meta" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array('base', 'link', 'meta') + ) + ) { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if ($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + array_pop($this->stack); + + } else { + $this->insertElement($token); + } + + /* An end tag with the tag name "head" */ + } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { + /* If the current node is a head element, pop the current node off + the stack of open elements. */ + if ($this->head_pointer->isSameNode(end($this->stack))) { + array_pop($this->stack); + + /* Otherwise, this is a parse error. */ + } else { + // k + } + + /* Change the insertion mode to "after head". */ + $this->mode = self::AFTER_HEAD; + + /* A start tag with the tag name "head" or an end tag except "html". */ + } elseif (($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') || + ($token['type'] === HTML5::ENDTAG && $token['name'] !== 'html') + ) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* If the current node is a head element, act as if an end tag + token with the tag name "head" had been seen. */ + if ($this->head_pointer->isSameNode(end($this->stack))) { + $this->inHead( + array( + 'name' => 'head', + 'type' => HTML5::ENDTAG + ) + ); + + /* Otherwise, change the insertion mode to "after head". */ + } else { + $this->mode = self::AFTER_HEAD; + } + + /* Then, reprocess the current token. */ + return $this->afterHead($token); + } + } + + private function afterHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token with the tag name "body" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'body') { + /* Insert a body element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in body". */ + $this->mode = self::IN_BODY; + + /* A start tag token with the tag name "frameset" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'frameset') { + /* Insert a frameset element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in frameset". */ + $this->mode = self::IN_FRAME; + + /* A start tag token whose tag name is one of: "base", "link", "meta", + "script", "style", "title" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array('base', 'link', 'meta', 'script', 'style', 'title') + ) + ) { + /* Parse error. Switch the insertion mode back to "in head" and + reprocess the token. */ + $this->mode = self::IN_HEAD; + return $this->inHead($token); + + /* Anything else */ + } else { + /* Act as if a start tag token with the tag name "body" and no + attributes had been seen, and then reprocess the current token. */ + $this->afterHead( + array( + 'name' => 'body', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + return $this->inBody($token); + } + } + + private function inBody($token) + { + /* Handle the token as follows: */ + + switch ($token['type']) { + /* A character token */ + case HTML5::CHARACTR: + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Append the token's character to the current node. */ + $this->insertText($token['data']); + break; + + /* A comment token */ + case HTML5::COMMENT: + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + break; + + case HTML5::STARTTAG: + switch ($token['name']) { + /* A start tag token whose tag name is one of: "script", + "style" */ + case 'script': + case 'style': + /* Process the token as if the insertion mode had been "in + head". */ + return $this->inHead($token); + break; + + /* A start tag token whose tag name is one of: "base", "link", + "meta", "title" */ + case 'base': + case 'link': + case 'meta': + case 'title': + /* Parse error. Process the token as if the insertion mode + had been "in head". */ + return $this->inHead($token); + break; + + /* A start tag token with the tag name "body" */ + case 'body': + /* Parse error. If the second element on the stack of open + elements is not a body element, or, if the stack of open + elements has only one node on it, then ignore the token. + (innerHTML case) */ + if (count($this->stack) === 1 || $this->stack[1]->nodeName !== 'body') { + // Ignore + + /* Otherwise, for each attribute on the token, check to see + if the attribute is already present on the body element (the + second element) on the stack of open elements. If it is not, + add the attribute and its corresponding value to that + element. */ + } else { + foreach ($token['attr'] as $attr) { + if (!$this->stack[1]->hasAttribute($attr['name'])) { + $this->stack[1]->setAttribute($attr['name'], $attr['value']); + } + } + } + break; + + /* A start tag whose tag name is one of: "address", + "blockquote", "center", "dir", "div", "dl", "fieldset", + "listing", "menu", "ol", "p", "ul" */ + case 'address': + case 'blockquote': + case 'center': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'listing': + case 'menu': + case 'ol': + case 'p': + case 'ul': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + break; + + /* A start tag whose tag name is "form" */ + case 'form': + /* If the form element pointer is not null, ignore the + token with a parse error. */ + if ($this->form_pointer !== null) { + // Ignore. + + /* Otherwise: */ + } else { + /* If the stack of open elements has a p element in + scope, then act as if an end tag with the tag name p + had been seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token, and set the + form element pointer to point to the element created. */ + $element = $this->insertElement($token); + $this->form_pointer = $element; + } + break; + + /* A start tag whose tag name is "li", "dd" or "dt" */ + case 'li': + case 'dd': + case 'dt': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + $stack_length = count($this->stack) - 1; + + for ($n = $stack_length; 0 <= $n; $n--) { + /* 1. Initialise node to be the current node (the + bottommost node of the stack). */ + $stop = false; + $node = $this->stack[$n]; + $cat = $this->getElementCategory($node->tagName); + + /* 2. If node is an li, dd or dt element, then pop all + the nodes from the current node up to node, including + node, then stop this algorithm. */ + if ($token['name'] === $node->tagName || ($token['name'] !== 'li' + && ($node->tagName === 'dd' || $node->tagName === 'dt')) + ) { + for ($x = $stack_length; $x >= $n; $x--) { + array_pop($this->stack); + } + + break; + } + + /* 3. If node is not in the formatting category, and is + not in the phrasing category, and is not an address or + div element, then stop this algorithm. */ + if ($cat !== self::FORMATTING && $cat !== self::PHRASING && + $node->tagName !== 'address' && $node->tagName !== 'div' + ) { + break; + } + } + + /* Finally, insert an HTML element with the same tag + name as the token's. */ + $this->insertElement($token); + break; + + /* A start tag token whose tag name is "plaintext" */ + case 'plaintext': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + return HTML5::PLAINTEXT; + break; + + /* A start tag whose tag name is one of: "h1", "h2", "h3", "h4", + "h5", "h6" */ + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* If the stack of open elements has in scope an element whose + tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then + this is a parse error; pop elements from the stack until an + element with one of those tag names has been popped from the + stack. */ + while ($this->elementInScope(array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))) { + array_pop($this->stack); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + break; + + /* A start tag whose tag name is "a" */ + case 'a': + /* If the list of active formatting elements contains + an element whose tag name is "a" between the end of the + list and the last marker on the list (or the start of + the list if there is no marker on the list), then this + is a parse error; act as if an end tag with the tag name + "a" had been seen, then remove that element from the list + of active formatting elements and the stack of open + elements if the end tag didn't already remove it (it + might not have if the element is not in table scope). */ + $leng = count($this->a_formatting); + + for ($n = $leng - 1; $n >= 0; $n--) { + if ($this->a_formatting[$n] === self::MARKER) { + break; + + } elseif ($this->a_formatting[$n]->nodeName === 'a') { + $this->emitToken( + array( + 'name' => 'a', + 'type' => HTML5::ENDTAG + ) + ); + break; + } + } + + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $el = $this->insertElement($token); + + /* Add that element to the list of active formatting + elements. */ + $this->a_formatting[] = $el; + break; + + /* A start tag whose tag name is one of: "b", "big", "em", "font", + "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ + case 'b': + case 'big': + case 'em': + case 'font': + case 'i': + case 'nobr': + case 's': + case 'small': + case 'strike': + case 'strong': + case 'tt': + case 'u': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $el = $this->insertElement($token); + + /* Add that element to the list of active formatting + elements. */ + $this->a_formatting[] = $el; + break; + + /* A start tag token whose tag name is "button" */ + case 'button': + /* If the stack of open elements has a button element in scope, + then this is a parse error; act as if an end tag with the tag + name "button" had been seen, then reprocess the token. (We don't + do that. Unnecessary.) */ + if ($this->elementInScope('button')) { + $this->inBody( + array( + 'name' => 'button', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + break; + + /* A start tag token whose tag name is one of: "marquee", "object" */ + case 'marquee': + case 'object': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + break; + + /* A start tag token whose tag name is "xmp" */ + case 'xmp': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Switch the content model flag to the CDATA state. */ + return HTML5::CDATA; + break; + + /* A start tag whose tag name is "table" */ + case 'table': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in table". */ + $this->mode = self::IN_TABLE; + break; + + /* A start tag whose tag name is one of: "area", "basefont", + "bgsound", "br", "embed", "img", "param", "spacer", "wbr" */ + case 'area': + case 'basefont': + case 'bgsound': + case 'br': + case 'embed': + case 'img': + case 'param': + case 'spacer': + case 'wbr': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "hr" */ + case 'hr': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if ($this->elementInScope('p')) { + $this->emitToken( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "image" */ + case 'image': + /* Parse error. Change the token's tag name to "img" and + reprocess it. (Don't ask.) */ + $token['name'] = 'img'; + return $this->inBody($token); + break; + + /* A start tag whose tag name is "input" */ + case 'input': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an input element for the token. */ + $element = $this->insertElement($token, false); + + /* If the form element pointer is not null, then associate the + input element with the form element pointed to by the form + element pointer. */ + $this->form_pointer !== null + ? $this->form_pointer->appendChild($element) + : end($this->stack)->appendChild($element); + + /* Pop that input element off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "isindex" */ + case 'isindex': + /* Parse error. */ + // w/e + + /* If the form element pointer is not null, + then ignore the token. */ + if ($this->form_pointer === null) { + /* Act as if a start tag token with the tag name "form" had + been seen. */ + $this->inBody( + array( + 'name' => 'body', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + /* Act as if a start tag token with the tag name "hr" had + been seen. */ + $this->inBody( + array( + 'name' => 'hr', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + /* Act as if a start tag token with the tag name "p" had + been seen. */ + $this->inBody( + array( + 'name' => 'p', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + /* Act as if a start tag token with the tag name "label" + had been seen. */ + $this->inBody( + array( + 'name' => 'label', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + /* Act as if a stream of character tokens had been seen. */ + $this->insertText( + 'This is a searchable index. ' . + 'Insert your search keywords here: ' + ); + + /* Act as if a start tag token with the tag name "input" + had been seen, with all the attributes from the "isindex" + token, except with the "name" attribute set to the value + "isindex" (ignoring any explicit "name" attribute). */ + $attr = $token['attr']; + $attr[] = array('name' => 'name', 'value' => 'isindex'); + + $this->inBody( + array( + 'name' => 'input', + 'type' => HTML5::STARTTAG, + 'attr' => $attr + ) + ); + + /* Act as if a stream of character tokens had been seen + (see below for what they should say). */ + $this->insertText( + 'This is a searchable index. ' . + 'Insert your search keywords here: ' + ); + + /* Act as if an end tag token with the tag name "label" + had been seen. */ + $this->inBody( + array( + 'name' => 'label', + 'type' => HTML5::ENDTAG + ) + ); + + /* Act as if an end tag token with the tag name "p" had + been seen. */ + $this->inBody( + array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + ) + ); + + /* Act as if a start tag token with the tag name "hr" had + been seen. */ + $this->inBody( + array( + 'name' => 'hr', + 'type' => HTML5::ENDTAG + ) + ); + + /* Act as if an end tag token with the tag name "form" had + been seen. */ + $this->inBody( + array( + 'name' => 'form', + 'type' => HTML5::ENDTAG + ) + ); + } + break; + + /* A start tag whose tag name is "textarea" */ + case 'textarea': + $this->insertElement($token); + + /* Switch the tokeniser's content model flag to the + RCDATA state. */ + return HTML5::RCDATA; + break; + + /* A start tag whose tag name is one of: "iframe", "noembed", + "noframes" */ + case 'iframe': + case 'noembed': + case 'noframes': + $this->insertElement($token); + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + break; + + /* A start tag whose tag name is "select" */ + case 'select': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in select". */ + $this->mode = self::IN_SELECT; + break; + + /* A start or end tag whose tag name is one of: "caption", "col", + "colgroup", "frame", "frameset", "head", "option", "optgroup", + "tbody", "td", "tfoot", "th", "thead", "tr". */ + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'frameset': + case 'head': + case 'option': + case 'optgroup': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // Parse error. Ignore the token. + break; + + /* A start or end tag whose tag name is one of: "event-source", + "section", "nav", "article", "aside", "header", "footer", + "datagrid", "command" */ + case 'event-source': + case 'section': + case 'nav': + case 'article': + case 'aside': + case 'header': + case 'footer': + case 'datagrid': + case 'command': + // Work in progress! + break; + + /* A start tag token not covered by the previous entries */ + default: + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + $this->insertElement($token, true, true); + break; + } + break; + + case HTML5::ENDTAG: + switch ($token['name']) { + /* An end tag with the tag name "body" */ + case 'body': + /* If the second element in the stack of open elements is + not a body element, this is a parse error. Ignore the token. + (innerHTML case) */ + if (count($this->stack) < 2 || $this->stack[1]->nodeName !== 'body') { + // Ignore. + + /* If the current node is not the body element, then this + is a parse error. */ + } elseif (end($this->stack)->nodeName !== 'body') { + // Parse error. + } + + /* Change the insertion mode to "after body". */ + $this->mode = self::AFTER_BODY; + break; + + /* An end tag with the tag name "html" */ + case 'html': + /* Act as if an end tag with tag name "body" had been seen, + then, if that token wasn't ignored, reprocess the current + token. */ + $this->inBody( + array( + 'name' => 'body', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->afterBody($token); + break; + + /* An end tag whose tag name is one of: "address", "blockquote", + "center", "dir", "div", "dl", "fieldset", "listing", "menu", + "ol", "pre", "ul" */ + case 'address': + case 'blockquote': + case 'center': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'listing': + case 'menu': + case 'ol': + case 'pre': + case 'ul': + /* If the stack of open elements has an element in scope + with the same tag name as that of the token, then generate + implied end tags. */ + if ($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with + the same tag name as that of the token, then this + is a parse error. */ + // w/e + + /* If the stack of open elements has an element in + scope with the same tag name as that of the token, + then pop elements from this stack until an element + with that tag name has been popped from the stack. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is "form" */ + case 'form': + /* If the stack of open elements has an element in scope + with the same tag name as that of the token, then generate + implied end tags. */ + if ($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + } + + if (end($this->stack)->nodeName !== $token['name']) { + /* Now, if the current node is not an element with the + same tag name as that of the token, then this is a parse + error. */ + // w/e + + } else { + /* Otherwise, if the current node is an element with + the same tag name as that of the token pop that element + from the stack. */ + array_pop($this->stack); + } + + /* In any case, set the form element pointer to null. */ + $this->form_pointer = null; + break; + + /* An end tag whose tag name is "p" */ + case 'p': + /* If the stack of open elements has a p element in scope, + then generate implied end tags, except for p elements. */ + if ($this->elementInScope('p')) { + $this->generateImpliedEndTags(array('p')); + + /* If the current node is not a p element, then this is + a parse error. */ + // k + + /* If the stack of open elements has a p element in + scope, then pop elements from this stack until the stack + no longer has a p element in scope. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->elementInScope('p')) { + array_pop($this->stack); + + } else { + break; + } + } + } + break; + + /* An end tag whose tag name is "dd", "dt", or "li" */ + case 'dd': + case 'dt': + case 'li': + /* If the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then + generate implied end tags, except for elements with the + same tag name as the token. */ + if ($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(array($token['name'])); + + /* If the current node is not an element with the same + tag name as the token, then this is a parse error. */ + // w/e + + /* If the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then + pop elements from this stack until an element with that + tag name has been popped from the stack. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is one of: "h1", "h2", "h3", "h4", + "h5", "h6" */ + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + $elements = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); + + /* If the stack of open elements has in scope an element whose + tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then + generate implied end tags. */ + if ($this->elementInScope($elements)) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with the same + tag name as that of the token, then this is a parse error. */ + // w/e + + /* If the stack of open elements has in scope an element + whose tag name is one of "h1", "h2", "h3", "h4", "h5", or + "h6", then pop elements from the stack until an element + with one of those tag names has been popped from the stack. */ + while ($this->elementInScope($elements)) { + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is one of: "a", "b", "big", "em", + "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ + case 'a': + case 'b': + case 'big': + case 'em': + case 'font': + case 'i': + case 'nobr': + case 's': + case 'small': + case 'strike': + case 'strong': + case 'tt': + case 'u': + /* 1. Let the formatting element be the last element in + the list of active formatting elements that: + * is between the end of the list and the last scope + marker in the list, if any, or the start of the list + otherwise, and + * has the same tag name as the token. + */ + while (true) { + for ($a = count($this->a_formatting) - 1; $a >= 0; $a--) { + if ($this->a_formatting[$a] === self::MARKER) { + break; + + } elseif ($this->a_formatting[$a]->tagName === $token['name']) { + $formatting_element = $this->a_formatting[$a]; + $in_stack = in_array($formatting_element, $this->stack, true); + $fe_af_pos = $a; + break; + } + } + + /* If there is no such node, or, if that node is + also in the stack of open elements but the element + is not in scope, then this is a parse error. Abort + these steps. The token is ignored. */ + if (!isset($formatting_element) || ($in_stack && + !$this->elementInScope($token['name'])) + ) { + break; + + /* Otherwise, if there is such a node, but that node + is not in the stack of open elements, then this is a + parse error; remove the element from the list, and + abort these steps. */ + } elseif (isset($formatting_element) && !$in_stack) { + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + break; + } + + /* 2. Let the furthest block be the topmost node in the + stack of open elements that is lower in the stack + than the formatting element, and is not an element in + the phrasing or formatting categories. There might + not be one. */ + $fe_s_pos = array_search($formatting_element, $this->stack, true); + $length = count($this->stack); + + for ($s = $fe_s_pos + 1; $s < $length; $s++) { + $category = $this->getElementCategory($this->stack[$s]->nodeName); + + if ($category !== self::PHRASING && $category !== self::FORMATTING) { + $furthest_block = $this->stack[$s]; + } + } + + /* 3. If there is no furthest block, then the UA must + skip the subsequent steps and instead just pop all + the nodes from the bottom of the stack of open + elements, from the current node up to the formatting + element, and remove the formatting element from the + list of active formatting elements. */ + if (!isset($furthest_block)) { + for ($n = $length - 1; $n >= $fe_s_pos; $n--) { + array_pop($this->stack); + } + + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + break; + } + + /* 4. Let the common ancestor be the element + immediately above the formatting element in the stack + of open elements. */ + $common_ancestor = $this->stack[$fe_s_pos - 1]; + + /* 5. If the furthest block has a parent node, then + remove the furthest block from its parent node. */ + if ($furthest_block->parentNode !== null) { + $furthest_block->parentNode->removeChild($furthest_block); + } + + /* 6. Let a bookmark note the position of the + formatting element in the list of active formatting + elements relative to the elements on either side + of it in the list. */ + $bookmark = $fe_af_pos; + + /* 7. Let node and last node be the furthest block. + Follow these steps: */ + $node = $furthest_block; + $last_node = $furthest_block; + + while (true) { + for ($n = array_search($node, $this->stack, true) - 1; $n >= 0; $n--) { + /* 7.1 Let node be the element immediately + prior to node in the stack of open elements. */ + $node = $this->stack[$n]; + + /* 7.2 If node is not in the list of active + formatting elements, then remove node from + the stack of open elements and then go back + to step 1. */ + if (!in_array($node, $this->a_formatting, true)) { + unset($this->stack[$n]); + $this->stack = array_merge($this->stack); + + } else { + break; + } + } + + /* 7.3 Otherwise, if node is the formatting + element, then go to the next step in the overall + algorithm. */ + if ($node === $formatting_element) { + break; + + /* 7.4 Otherwise, if last node is the furthest + block, then move the aforementioned bookmark to + be immediately after the node in the list of + active formatting elements. */ + } elseif ($last_node === $furthest_block) { + $bookmark = array_search($node, $this->a_formatting, true) + 1; + } + + /* 7.5 If node has any children, perform a + shallow clone of node, replace the entry for + node in the list of active formatting elements + with an entry for the clone, replace the entry + for node in the stack of open elements with an + entry for the clone, and let node be the clone. */ + if ($node->hasChildNodes()) { + $clone = $node->cloneNode(); + $s_pos = array_search($node, $this->stack, true); + $a_pos = array_search($node, $this->a_formatting, true); + + $this->stack[$s_pos] = $clone; + $this->a_formatting[$a_pos] = $clone; + $node = $clone; + } + + /* 7.6 Insert last node into node, first removing + it from its previous parent node if any. */ + if ($last_node->parentNode !== null) { + $last_node->parentNode->removeChild($last_node); + } + + $node->appendChild($last_node); + + /* 7.7 Let last node be node. */ + $last_node = $node; + } + + /* 8. Insert whatever last node ended up being in + the previous step into the common ancestor node, + first removing it from its previous parent node if + any. */ + if ($last_node->parentNode !== null) { + $last_node->parentNode->removeChild($last_node); + } + + $common_ancestor->appendChild($last_node); + + /* 9. Perform a shallow clone of the formatting + element. */ + $clone = $formatting_element->cloneNode(); + + /* 10. Take all of the child nodes of the furthest + block and append them to the clone created in the + last step. */ + while ($furthest_block->hasChildNodes()) { + $child = $furthest_block->firstChild; + $furthest_block->removeChild($child); + $clone->appendChild($child); + } + + /* 11. Append that clone to the furthest block. */ + $furthest_block->appendChild($clone); + + /* 12. Remove the formatting element from the list + of active formatting elements, and insert the clone + into the list of active formatting elements at the + position of the aforementioned bookmark. */ + $fe_af_pos = array_search($formatting_element, $this->a_formatting, true); + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + + $af_part1 = array_slice($this->a_formatting, 0, $bookmark - 1); + $af_part2 = array_slice($this->a_formatting, $bookmark, count($this->a_formatting)); + $this->a_formatting = array_merge($af_part1, array($clone), $af_part2); + + /* 13. Remove the formatting element from the stack + of open elements, and insert the clone into the stack + of open elements immediately after (i.e. in a more + deeply nested position than) the position of the + furthest block in that stack. */ + $fe_s_pos = array_search($formatting_element, $this->stack, true); + $fb_s_pos = array_search($furthest_block, $this->stack, true); + unset($this->stack[$fe_s_pos]); + + $s_part1 = array_slice($this->stack, 0, $fb_s_pos); + $s_part2 = array_slice($this->stack, $fb_s_pos + 1, count($this->stack)); + $this->stack = array_merge($s_part1, array($clone), $s_part2); + + /* 14. Jump back to step 1 in this series of steps. */ + unset($formatting_element, $fe_af_pos, $fe_s_pos, $furthest_block); + } + break; + + /* An end tag token whose tag name is one of: "button", + "marquee", "object" */ + case 'button': + case 'marquee': + case 'object': + /* If the stack of open elements has an element in scope whose + tag name matches the tag name of the token, then generate implied + tags. */ + if ($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with the same + tag name as the token, then this is a parse error. */ + // k + + /* Now, if the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then pop + elements from the stack until that element has been popped from + the stack, and clear the list of active formatting elements up + to the last marker. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + + $marker = end(array_keys($this->a_formatting, self::MARKER, true)); + + for ($n = count($this->a_formatting) - 1; $n > $marker; $n--) { + array_pop($this->a_formatting); + } + } + break; + + /* Or an end tag whose tag name is one of: "area", "basefont", + "bgsound", "br", "embed", "hr", "iframe", "image", "img", + "input", "isindex", "noembed", "noframes", "param", "select", + "spacer", "table", "textarea", "wbr" */ + case 'area': + case 'basefont': + case 'bgsound': + case 'br': + case 'embed': + case 'hr': + case 'iframe': + case 'image': + case 'img': + case 'input': + case 'isindex': + case 'noembed': + case 'noframes': + case 'param': + case 'select': + case 'spacer': + case 'table': + case 'textarea': + case 'wbr': + // Parse error. Ignore the token. + break; + + /* An end tag token not covered by the previous entries */ + default: + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + /* Initialise node to be the current node (the bottommost + node of the stack). */ + $node = end($this->stack); + + /* If node has the same tag name as the end tag token, + then: */ + if ($token['name'] === $node->nodeName) { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* If the tag name of the end tag token does not + match the tag name of the current node, this is a + parse error. */ + // k + + /* Pop all the nodes from the current node up to + node, including node, then stop this algorithm. */ + for ($x = count($this->stack) - $n; $x >= $n; $x--) { + array_pop($this->stack); + } + + } else { + $category = $this->getElementCategory($node); + + if ($category !== self::SPECIAL && $category !== self::SCOPING) { + /* Otherwise, if node is in neither the formatting + category nor the phrasing category, then this is a + parse error. Stop this algorithm. The end tag token + is ignored. */ + return false; + } + } + } + break; + } + break; + } + } + + private function inTable($token) + { + $clear = array('html', 'table'); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $text = $this->dom->createTextNode($token['data']); + end($this->stack)->appendChild($text); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + end($this->stack)->appendChild($comment); + + /* A start tag whose tag name is "caption" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'caption' + ) { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + + /* Insert an HTML element for the token, then switch the + insertion mode to "in caption". */ + $this->insertElement($token); + $this->mode = self::IN_CAPTION; + + /* A start tag whose tag name is "colgroup" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'colgroup' + ) { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the + insertion mode to "in column group". */ + $this->insertElement($token); + $this->mode = self::IN_CGROUP; + + /* A start tag whose tag name is "col" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'col' + ) { + $this->inTable( + array( + 'name' => 'colgroup', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + $this->inColumnGroup($token); + + /* A start tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array('tbody', 'tfoot', 'thead') + ) + ) { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the insertion + mode to "in table body". */ + $this->insertElement($token); + $this->mode = self::IN_TBODY; + + /* A start tag whose tag name is one of: "td", "th", "tr" */ + } elseif ($token['type'] === HTML5::STARTTAG && + in_array($token['name'], array('td', 'th', 'tr')) + ) { + /* Act as if a start tag token with the tag name "tbody" had been + seen, then reprocess the current token. */ + $this->inTable( + array( + 'name' => 'tbody', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + return $this->inTableBody($token); + + /* A start tag whose tag name is "table" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'table' + ) { + /* Parse error. Act as if an end tag token with the tag name "table" + had been seen, then, if that token wasn't ignored, reprocess the + current token. */ + $this->inTable( + array( + 'name' => 'table', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->mainPhase($token); + + /* An end tag whose tag name is "table" */ + } elseif ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'table' + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if (!$this->elementInScope($token['name'], true)) { + return false; + + /* Otherwise: */ + } else { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Now, if the current node is not a table element, then this + is a parse error. */ + // w/e + + /* Pop elements from this stack until a table element has been + popped from the stack. */ + while (true) { + $current = end($this->stack)->nodeName; + array_pop($this->stack); + + if ($current === 'table') { + break; + } + } + + /* Reset the insertion mode appropriately. */ + $this->resetInsertionMode(); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array( + 'body', + 'caption', + 'col', + 'colgroup', + 'html', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'tr' + ) + ) + ) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* Parse error. Process the token as if the insertion mode was "in + body", with the following exception: */ + + /* If the current node is a table, tbody, tfoot, thead, or tr + element, then, whenever a node would be inserted into the current + node, it must instead be inserted into the foster parent element. */ + if (in_array( + end($this->stack)->nodeName, + array('table', 'tbody', 'tfoot', 'thead', 'tr') + ) + ) { + /* The foster parent element is the parent element of the last + table element in the stack of open elements, if there is a + table element and it has such a parent element. If there is no + table element in the stack of open elements (innerHTML case), + then the foster parent element is the first element in the + stack of open elements (the html element). Otherwise, if there + is a table element in the stack of open elements, but the last + table element in the stack of open elements has no parent, or + its parent node is not an element, then the foster parent + element is the element before the last table element in the + stack of open elements. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->stack[$n]->nodeName === 'table') { + $table = $this->stack[$n]; + break; + } + } + + if (isset($table) && $table->parentNode !== null) { + $this->foster_parent = $table->parentNode; + + } elseif (!isset($table)) { + $this->foster_parent = $this->stack[0]; + + } elseif (isset($table) && ($table->parentNode === null || + $table->parentNode->nodeType !== XML_ELEMENT_NODE) + ) { + $this->foster_parent = $this->stack[$n - 1]; + } + } + + $this->inBody($token); + } + } + + private function inCaption($token) + { + /* An end tag whose tag name is "caption" */ + if ($token['type'] === HTML5::ENDTAG && $token['name'] === 'caption') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore + + /* Otherwise: */ + } else { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Now, if the current node is not a caption element, then this + is a parse error. */ + // w/e + + /* Pop elements from this stack until a caption element has + been popped from the stack. */ + while (true) { + $node = end($this->stack)->nodeName; + array_pop($this->stack); + + if ($node === 'caption') { + break; + } + } + + /* Clear the list of active formatting elements up to the last + marker. */ + $this->clearTheActiveFormattingElementsUpToTheLastMarker(); + + /* Switch the insertion mode to "in table". */ + $this->mode = self::IN_TABLE; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr", or an end tag whose tag + name is "table" */ + } elseif (($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array( + 'caption', + 'col', + 'colgroup', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'tr' + ) + )) || ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'table') + ) { + /* Parse error. Act as if an end tag with the tag name "caption" + had been seen, then, if that token wasn't ignored, reprocess the + current token. */ + $this->inCaption( + array( + 'name' => 'caption', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->inTable($token); + + /* An end tag whose tag name is one of: "body", "col", "colgroup", + "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array( + 'body', + 'col', + 'colgroup', + 'html', + 'tbody', + 'tfoot', + 'th', + 'thead', + 'tr' + ) + ) + ) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in body". */ + $this->inBody($token); + } + } + + private function inColumnGroup($token) + { + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $text = $this->dom->createTextNode($token['data']); + end($this->stack)->appendChild($text); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + end($this->stack)->appendChild($comment); + + /* A start tag whose tag name is "col" */ + } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'col') { + /* Insert a col element for the token. Immediately pop the current + node off the stack of open elements. */ + $this->insertElement($token); + array_pop($this->stack); + + /* An end tag whose tag name is "colgroup" */ + } elseif ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'colgroup' + ) { + /* If the current node is the root html element, then this is a + parse error, ignore the token. (innerHTML case) */ + if (end($this->stack)->nodeName === 'html') { + // Ignore + + /* Otherwise, pop the current node (which will be a colgroup + element) from the stack of open elements. Switch the insertion + mode to "in table". */ + } else { + array_pop($this->stack); + $this->mode = self::IN_TABLE; + } + + /* An end tag whose tag name is "col" */ + } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'col') { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Act as if an end tag with the tag name "colgroup" had been seen, + and then, if that token wasn't ignored, reprocess the current token. */ + $this->inColumnGroup( + array( + 'name' => 'colgroup', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->inTable($token); + } + } + + private function inTableBody($token) + { + $clear = array('tbody', 'tfoot', 'thead', 'html'); + + /* A start tag whose tag name is "tr" */ + if ($token['type'] === HTML5::STARTTAG && $token['name'] === 'tr') { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Insert a tr element for the token, then switch the insertion + mode to "in row". */ + $this->insertElement($token); + $this->mode = self::IN_ROW; + + /* A start tag whose tag name is one of: "th", "td" */ + } elseif ($token['type'] === HTML5::STARTTAG && + ($token['name'] === 'th' || $token['name'] === 'td') + ) { + /* Parse error. Act as if a start tag with the tag name "tr" had + been seen, then reprocess the current token. */ + $this->inTableBody( + array( + 'name' => 'tr', + 'type' => HTML5::STARTTAG, + 'attr' => array() + ) + ); + + return $this->inRow($token); + + /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif ($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('tbody', 'tfoot', 'thead')) + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore + + /* Otherwise: */ + } else { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Pop the current node from the stack of open elements. Switch + the insertion mode to "in table". */ + array_pop($this->stack); + $this->mode = self::IN_TABLE; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "tfoot", "thead", or an end tag whose tag name is "table" */ + } elseif (($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'tfoor', 'thead') + )) || + ($token['type'] === HTML5::STARTTAG && $token['name'] === 'table') + ) { + /* If the stack of open elements does not have a tbody, thead, or + tfoot element in table scope, this is a parse error. Ignore the + token. (innerHTML case) */ + if (!$this->elementInScope(array('tbody', 'thead', 'tfoot'), true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Act as if an end tag with the same tag name as the current + node ("tbody", "tfoot", or "thead") had been seen, then + reprocess the current token. */ + $this->inTableBody( + array( + 'name' => end($this->stack)->nodeName, + 'type' => HTML5::ENDTAG + ) + ); + + return $this->mainPhase($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "td", "th", "tr" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr') + ) + ) { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in table". */ + $this->inTable($token); + } + } + + private function inRow($token) + { + $clear = array('tr', 'html'); + + /* A start tag whose tag name is one of: "th", "td" */ + if ($token['type'] === HTML5::STARTTAG && + ($token['name'] === 'th' || $token['name'] === 'td') + ) { + /* Clear the stack back to a table row context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the insertion + mode to "in cell". */ + $this->insertElement($token); + $this->mode = self::IN_CELL; + + /* Insert a marker at the end of the list of active formatting + elements. */ + $this->a_formatting[] = self::MARKER; + + /* An end tag whose tag name is "tr" */ + } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'tr') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Clear the stack back to a table row context. */ + $this->clearStackToTableContext($clear); + + /* Pop the current node (which will be a tr element) from the + stack of open elements. Switch the insertion mode to "in table + body". */ + array_pop($this->stack); + $this->mode = self::IN_TBODY; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "tfoot", "thead", "tr" or an end tag whose tag name is "table" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'tfoot', 'thead', 'tr') + ) + ) { + /* Act as if an end tag with the tag name "tr" had been seen, then, + if that token wasn't ignored, reprocess the current token. */ + $this->inRow( + array( + 'name' => 'tr', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->inCell($token); + + /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif ($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('tbody', 'tfoot', 'thead')) + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Otherwise, act as if an end tag with the tag name "tr" had + been seen, then reprocess the current token. */ + $this->inRow( + array( + 'name' => 'tr', + 'type' => HTML5::ENDTAG + ) + ); + + return $this->inCell($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "td", "th" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr') + ) + ) { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in table". */ + $this->inTable($token); + } + } + + private function inCell($token) + { + /* An end tag whose tag name is one of: "td", "th" */ + if ($token['type'] === HTML5::ENDTAG && + ($token['name'] === 'td' || $token['name'] === 'th') + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as that of the token, then this is a + parse error and the token must be ignored. */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Generate implied end tags, except for elements with the same + tag name as the token. */ + $this->generateImpliedEndTags(array($token['name'])); + + /* Now, if the current node is not an element with the same tag + name as the token, then this is a parse error. */ + // k + + /* Pop elements from this stack until an element with the same + tag name as the token has been popped from the stack. */ + while (true) { + $node = end($this->stack)->nodeName; + array_pop($this->stack); + + if ($node === $token['name']) { + break; + } + } + + /* Clear the list of active formatting elements up to the last + marker. */ + $this->clearTheActiveFormattingElementsUpToTheLastMarker(); + + /* Switch the insertion mode to "in row". (The current node + will be a tr element at this point.) */ + $this->mode = self::IN_ROW; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array( + 'caption', + 'col', + 'colgroup', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'tr' + ) + ) + ) { + /* If the stack of open elements does not have a td or th element + in table scope, then this is a parse error; ignore the token. + (innerHTML case) */ + if (!$this->elementInScope(array('td', 'th'), true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif ($token['type'] === HTML5::STARTTAG && in_array( + $token['name'], + array( + 'caption', + 'col', + 'colgroup', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'tr' + ) + ) + ) { + /* If the stack of open elements does not have a td or th element + in table scope, then this is a parse error; ignore the token. + (innerHTML case) */ + if (!$this->elementInScope(array('td', 'th'), true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array('body', 'caption', 'col', 'colgroup', 'html') + ) + ) { + /* Parse error. Ignore the token. */ + + /* An end tag whose tag name is one of: "table", "tbody", "tfoot", + "thead", "tr" */ + } elseif ($token['type'] === HTML5::ENDTAG && in_array( + $token['name'], + array('table', 'tbody', 'tfoot', 'thead', 'tr') + ) + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as that of the token (which can only + happen for "tbody", "tfoot" and "thead", or, in the innerHTML case), + then this is a parse error and the token must be ignored. */ + if (!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in body". */ + $this->inBody($token); + } + } + + private function inSelect($token) + { + /* Handle the token as follows: */ + + /* A character token */ + if ($token['type'] === HTML5::CHARACTR) { + /* Append the token's character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token whose tag name is "option" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'option' + ) { + /* If the current node is an option element, act as if an end tag + with the tag name "option" had been seen. */ + if (end($this->stack)->nodeName === 'option') { + $this->inSelect( + array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* A start tag token whose tag name is "optgroup" */ + } elseif ($token['type'] === HTML5::STARTTAG && + $token['name'] === 'optgroup' + ) { + /* If the current node is an option element, act as if an end tag + with the tag name "option" had been seen. */ + if (end($this->stack)->nodeName === 'option') { + $this->inSelect( + array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* If the current node is an optgroup element, act as if an end tag + with the tag name "optgroup" had been seen. */ + if (end($this->stack)->nodeName === 'optgroup') { + $this->inSelect( + array( + 'name' => 'optgroup', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* An end tag token whose tag name is "optgroup" */ + } elseif ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'optgroup' + ) { + /* First, if the current node is an option element, and the node + immediately before it in the stack of open elements is an optgroup + element, then act as if an end tag with the tag name "option" had + been seen. */ + $elements_in_stack = count($this->stack); + + if ($this->stack[$elements_in_stack - 1]->nodeName === 'option' && + $this->stack[$elements_in_stack - 2]->nodeName === 'optgroup' + ) { + $this->inSelect( + array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + ) + ); + } + + /* If the current node is an optgroup element, then pop that node + from the stack of open elements. Otherwise, this is a parse error, + ignore the token. */ + if ($this->stack[$elements_in_stack - 1] === 'optgroup') { + array_pop($this->stack); + } + + /* An end tag token whose tag name is "option" */ + } elseif ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'option' + ) { + /* If the current node is an option element, then pop that node + from the stack of open elements. Otherwise, this is a parse error, + ignore the token. */ + if (end($this->stack)->nodeName === 'option') { + array_pop($this->stack); + } + + /* An end tag whose tag name is "select" */ + } elseif ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'select' + ) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if (!$this->elementInScope($token['name'], true)) { + // w/e + + /* Otherwise: */ + } else { + /* Pop elements from the stack of open elements until a select + element has been popped from the stack. */ + while (true) { + $current = end($this->stack)->nodeName; + array_pop($this->stack); + + if ($current === 'select') { + break; + } + } + + /* Reset the insertion mode appropriately. */ + $this->resetInsertionMode(); + } + + /* A start tag whose tag name is "select" */ + } elseif ($token['name'] === 'select' && + $token['type'] === HTML5::STARTTAG + ) { + /* Parse error. Act as if the token had been an end tag with the + tag name "select" instead. */ + $this->inSelect( + array( + 'name' => 'select', + 'type' => HTML5::ENDTAG + ) + ); + + /* An end tag whose tag name is one of: "caption", "table", "tbody", + "tfoot", "thead", "tr", "td", "th" */ + } elseif (in_array( + $token['name'], + array( + 'caption', + 'table', + 'tbody', + 'tfoot', + 'thead', + 'tr', + 'td', + 'th' + ) + ) && $token['type'] === HTML5::ENDTAG + ) { + /* Parse error. */ + // w/e + + /* If the stack of open elements has an element in table scope with + the same tag name as that of the token, then act as if an end tag + with the tag name "select" had been seen, and reprocess the token. + Otherwise, ignore the token. */ + if ($this->elementInScope($token['name'], true)) { + $this->inSelect( + array( + 'name' => 'select', + 'type' => HTML5::ENDTAG + ) + ); + + $this->mainPhase($token); + } + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function afterBody($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Process the token as it would be processed if the insertion mode + was "in body". */ + $this->inBody($token); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the first element in the stack of open + elements (the html element), with the data attribute set to the + data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->stack[0]->appendChild($comment); + + /* An end tag with the tag name "html" */ + } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') { + /* If the parser was originally created in order to handle the + setting of an element's innerHTML attribute, this is a parse error; + ignore the token. (The element will be an html element in this + case.) (innerHTML case) */ + + /* Otherwise, switch to the trailing end phase. */ + $this->phase = self::END_PHASE; + + /* Anything else */ + } else { + /* Parse error. Set the insertion mode to "in body" and reprocess + the token. */ + $this->mode = self::IN_BODY; + return $this->inBody($token); + } + } + + private function inFrameset($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag with the tag name "frameset" */ + } elseif ($token['name'] === 'frameset' && + $token['type'] === HTML5::STARTTAG + ) { + $this->insertElement($token); + + /* An end tag with the tag name "frameset" */ + } elseif ($token['name'] === 'frameset' && + $token['type'] === HTML5::ENDTAG + ) { + /* If the current node is the root html element, then this is a + parse error; ignore the token. (innerHTML case) */ + if (end($this->stack)->nodeName === 'html') { + // Ignore + + } else { + /* Otherwise, pop the current node from the stack of open + elements. */ + array_pop($this->stack); + + /* If the parser was not originally created in order to handle + the setting of an element's innerHTML attribute (innerHTML case), + and the current node is no longer a frameset element, then change + the insertion mode to "after frameset". */ + $this->mode = self::AFTR_FRAME; + } + + /* A start tag with the tag name "frame" */ + } elseif ($token['name'] === 'frame' && + $token['type'] === HTML5::STARTTAG + ) { + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + + /* A start tag with the tag name "noframes" */ + } elseif ($token['name'] === 'noframes' && + $token['type'] === HTML5::STARTTAG + ) { + /* Process the token as if the insertion mode had been "in body". */ + $this->inBody($token); + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function afterFrameset($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ + if ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* An end tag with the tag name "html" */ + } elseif ($token['name'] === 'html' && + $token['type'] === HTML5::ENDTAG + ) { + /* Switch to the trailing end phase. */ + $this->phase = self::END_PHASE; + + /* A start tag with the tag name "noframes" */ + } elseif ($token['name'] === 'noframes' && + $token['type'] === HTML5::STARTTAG + ) { + /* Process the token as if the insertion mode had been "in body". */ + $this->inBody($token); + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function trailingEndPhase($token) + { + /* After the main phase, as each token is emitted from the tokenisation + stage, it must be processed as described in this section. */ + + /* A DOCTYPE token */ + if ($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A comment token */ + } elseif ($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the Document object with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->dom->appendChild($comment); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif ($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) + ) { + /* Process the token as it would be processed in the main phase. */ + $this->mainPhase($token); + + /* A character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. Or a start tag token. Or an end tag token. */ + } elseif (($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || + $token['type'] === HTML5::STARTTAG || $token['type'] === HTML5::ENDTAG + ) { + /* Parse error. Switch back to the main phase and reprocess the + token. */ + $this->phase = self::MAIN_PHASE; + return $this->mainPhase($token); + + /* An end-of-file token */ + } elseif ($token['type'] === HTML5::EOF) { + /* OMG DONE!! */ + } + } + + private function insertElement($token, $append = true, $check = false) + { + // Proprietary workaround for libxml2's limitations with tag names + if ($check) { + // Slightly modified HTML5 tag-name modification, + // removing anything that's not an ASCII letter, digit, or hyphen + $token['name'] = preg_replace('/[^a-z0-9-]/i', '', $token['name']); + // Remove leading hyphens and numbers + $token['name'] = ltrim($token['name'], '-0..9'); + // In theory, this should ever be needed, but just in case + if ($token['name'] === '') { + $token['name'] = 'span'; + } // arbitrary generic choice + } + + $el = $this->dom->createElement($token['name']); + + foreach ($token['attr'] as $attr) { + if (!$el->hasAttribute($attr['name'])) { + $el->setAttribute($attr['name'], $attr['value']); + } + } + + $this->appendToRealParent($el); + $this->stack[] = $el; + + return $el; + } + + private function insertText($data) + { + $text = $this->dom->createTextNode($data); + $this->appendToRealParent($text); + } + + private function insertComment($data) + { + $comment = $this->dom->createComment($data); + $this->appendToRealParent($comment); + } + + private function appendToRealParent($node) + { + if ($this->foster_parent === null) { + end($this->stack)->appendChild($node); + + } elseif ($this->foster_parent !== null) { + /* If the foster parent element is the parent element of the + last table element in the stack of open elements, then the new + node must be inserted immediately before the last table element + in the stack of open elements in the foster parent element; + otherwise, the new node must be appended to the foster parent + element. */ + for ($n = count($this->stack) - 1; $n >= 0; $n--) { + if ($this->stack[$n]->nodeName === 'table' && + $this->stack[$n]->parentNode !== null + ) { + $table = $this->stack[$n]; + break; + } + } + + if (isset($table) && $this->foster_parent->isSameNode($table->parentNode)) { + $this->foster_parent->insertBefore($node, $table); + } else { + $this->foster_parent->appendChild($node); + } + + $this->foster_parent = null; + } + } + + private function elementInScope($el, $table = false) + { + if (is_array($el)) { + foreach ($el as $element) { + if ($this->elementInScope($element, $table)) { + return true; + } + } + + return false; + } + + $leng = count($this->stack); + + for ($n = 0; $n < $leng; $n++) { + /* 1. Initialise node to be the current node (the bottommost node of + the stack). */ + $node = $this->stack[$leng - 1 - $n]; + + if ($node->tagName === $el) { + /* 2. If node is the target node, terminate in a match state. */ + return true; + + } elseif ($node->tagName === 'table') { + /* 3. Otherwise, if node is a table element, terminate in a failure + state. */ + return false; + + } elseif ($table === true && in_array( + $node->tagName, + array( + 'caption', + 'td', + 'th', + 'button', + 'marquee', + 'object' + ) + ) + ) { + /* 4. Otherwise, if the algorithm is the "has an element in scope" + variant (rather than the "has an element in table scope" variant), + and node is one of the following, terminate in a failure state. */ + return false; + + } elseif ($node === $node->ownerDocument->documentElement) { + /* 5. Otherwise, if node is an html element (root element), terminate + in a failure state. (This can only happen if the node is the topmost + node of the stack of open elements, and prevents the next step from + being invoked if there are no more elements in the stack.) */ + return false; + } + + /* Otherwise, set node to the previous entry in the stack of open + elements and return to step 2. (This will never fail, since the loop + will always terminate in the previous step if the top of the stack + is reached.) */ + } + } + + private function reconstructActiveFormattingElements() + { + /* 1. If there are no entries in the list of active formatting elements, + then there is nothing to reconstruct; stop this algorithm. */ + $formatting_elements = count($this->a_formatting); + + if ($formatting_elements === 0) { + return false; + } + + /* 3. Let entry be the last (most recently added) element in the list + of active formatting elements. */ + $entry = end($this->a_formatting); + + /* 2. If the last (most recently added) entry in the list of active + formatting elements is a marker, or if it is an element that is in the + stack of open elements, then there is nothing to reconstruct; stop this + algorithm. */ + if ($entry === self::MARKER || in_array($entry, $this->stack, true)) { + return false; + } + + for ($a = $formatting_elements - 1; $a >= 0; true) { + /* 4. If there are no entries before entry in the list of active + formatting elements, then jump to step 8. */ + if ($a === 0) { + $step_seven = false; + break; + } + + /* 5. Let entry be the entry one earlier than entry in the list of + active formatting elements. */ + $a--; + $entry = $this->a_formatting[$a]; + + /* 6. If entry is neither a marker nor an element that is also in + thetack of open elements, go to step 4. */ + if ($entry === self::MARKER || in_array($entry, $this->stack, true)) { + break; + } + } + + while (true) { + /* 7. Let entry be the element one later than entry in the list of + active formatting elements. */ + if (isset($step_seven) && $step_seven === true) { + $a++; + $entry = $this->a_formatting[$a]; + } + + /* 8. Perform a shallow clone of the element entry to obtain clone. */ + $clone = $entry->cloneNode(); + + /* 9. Append clone to the current node and push it onto the stack + of open elements so that it is the new current node. */ + end($this->stack)->appendChild($clone); + $this->stack[] = $clone; + + /* 10. Replace the entry for entry in the list with an entry for + clone. */ + $this->a_formatting[$a] = $clone; + + /* 11. If the entry for clone in the list of active formatting + elements is not the last entry in the list, return to step 7. */ + if (end($this->a_formatting) !== $clone) { + $step_seven = true; + } else { + break; + } + } + } + + private function clearTheActiveFormattingElementsUpToTheLastMarker() + { + /* When the steps below require the UA to clear the list of active + formatting elements up to the last marker, the UA must perform the + following steps: */ + + while (true) { + /* 1. Let entry be the last (most recently added) entry in the list + of active formatting elements. */ + $entry = end($this->a_formatting); + + /* 2. Remove entry from the list of active formatting elements. */ + array_pop($this->a_formatting); + + /* 3. If entry was a marker, then stop the algorithm at this point. + The list has been cleared up to the last marker. */ + if ($entry === self::MARKER) { + break; + } + } + } + + private function generateImpliedEndTags($exclude = array()) + { + /* When the steps below require the UA to generate implied end tags, + then, if the current node is a dd element, a dt element, an li element, + a p element, a td element, a th element, or a tr element, the UA must + act as if an end tag with the respective tag name had been seen and + then generate implied end tags again. */ + $node = end($this->stack); + $elements = array_diff(array('dd', 'dt', 'li', 'p', 'td', 'th', 'tr'), $exclude); + + while (in_array(end($this->stack)->nodeName, $elements)) { + array_pop($this->stack); + } + } + + private function getElementCategory($node) + { + $name = $node->tagName; + if (in_array($name, $this->special)) { + return self::SPECIAL; + } elseif (in_array($name, $this->scoping)) { + return self::SCOPING; + } elseif (in_array($name, $this->formatting)) { + return self::FORMATTING; + } else { + return self::PHRASING; + } + } + + private function clearStackToTableContext($elements) + { + /* When the steps above require the UA to clear the stack back to a + table context, it means that the UA must, while the current node is not + a table element or an html element, pop elements from the stack of open + elements. If this causes any elements to be popped from the stack, then + this is a parse error. */ + while (true) { + $node = end($this->stack)->nodeName; + + if (in_array($node, $elements)) { + break; + } else { + array_pop($this->stack); + } + } + } + + private function resetInsertionMode() + { + /* 1. Let last be false. */ + $last = false; + $leng = count($this->stack); + + for ($n = $leng - 1; $n >= 0; $n--) { + /* 2. Let node be the last node in the stack of open elements. */ + $node = $this->stack[$n]; + + /* 3. If node is the first node in the stack of open elements, then + set last to true. If the element whose innerHTML attribute is being + set is neither a td element nor a th element, then set node to the + element whose innerHTML attribute is being set. (innerHTML case) */ + if ($this->stack[0]->isSameNode($node)) { + $last = true; + } + + /* 4. If node is a select element, then switch the insertion mode to + "in select" and abort these steps. (innerHTML case) */ + if ($node->nodeName === 'select') { + $this->mode = self::IN_SELECT; + break; + + /* 5. If node is a td or th element, then switch the insertion mode + to "in cell" and abort these steps. */ + } elseif ($node->nodeName === 'td' || $node->nodeName === 'th') { + $this->mode = self::IN_CELL; + break; + + /* 6. If node is a tr element, then switch the insertion mode to + "in row" and abort these steps. */ + } elseif ($node->nodeName === 'tr') { + $this->mode = self::IN_ROW; + break; + + /* 7. If node is a tbody, thead, or tfoot element, then switch the + insertion mode to "in table body" and abort these steps. */ + } elseif (in_array($node->nodeName, array('tbody', 'thead', 'tfoot'))) { + $this->mode = self::IN_TBODY; + break; + + /* 8. If node is a caption element, then switch the insertion mode + to "in caption" and abort these steps. */ + } elseif ($node->nodeName === 'caption') { + $this->mode = self::IN_CAPTION; + break; + + /* 9. If node is a colgroup element, then switch the insertion mode + to "in column group" and abort these steps. (innerHTML case) */ + } elseif ($node->nodeName === 'colgroup') { + $this->mode = self::IN_CGROUP; + break; + + /* 10. If node is a table element, then switch the insertion mode + to "in table" and abort these steps. */ + } elseif ($node->nodeName === 'table') { + $this->mode = self::IN_TABLE; + break; + + /* 11. If node is a head element, then switch the insertion mode + to "in body" ("in body"! not "in head"!) and abort these steps. + (innerHTML case) */ + } elseif ($node->nodeName === 'head') { + $this->mode = self::IN_BODY; + break; + + /* 12. If node is a body element, then switch the insertion mode to + "in body" and abort these steps. */ + } elseif ($node->nodeName === 'body') { + $this->mode = self::IN_BODY; + break; + + /* 13. If node is a frameset element, then switch the insertion + mode to "in frameset" and abort these steps. (innerHTML case) */ + } elseif ($node->nodeName === 'frameset') { + $this->mode = self::IN_FRAME; + break; + + /* 14. If node is an html element, then: if the head element + pointer is null, switch the insertion mode to "before head", + otherwise, switch the insertion mode to "after head". In either + case, abort these steps. (innerHTML case) */ + } elseif ($node->nodeName === 'html') { + $this->mode = ($this->head_pointer === null) + ? self::BEFOR_HEAD + : self::AFTER_HEAD; + + break; + + /* 15. If last is true, then set the insertion mode to "in body" + and abort these steps. (innerHTML case) */ + } elseif ($last) { + $this->mode = self::IN_BODY; + break; + } + } + } + + private function closeCell() + { + /* If the stack of open elements has a td or th element in table scope, + then act as if an end tag token with that tag name had been seen. */ + foreach (array('td', 'th') as $cell) { + if ($this->elementInScope($cell, true)) { + $this->inCell( + array( + 'name' => $cell, + 'type' => HTML5::ENDTAG + ) + ); + + break; + } + } + } + + public function save() + { + return $this->dom; + } +} diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Node.php b/libraries/htmlpurifier410/library/HTMLPurifier/Node.php new file mode 100644 index 0000000000000000000000000000000000000000..d7dcf62398751db8c4422a3a0e9c0be377890dc1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Node.php @@ -0,0 +1,49 @@ +<?php + +/** + * Abstract base node class that all others inherit from. + * + * Why do we not use the DOM extension? (1) It is not always available, + * (2) it has funny constraints on the data it can represent, + * whereas we want a maximally flexible representation, and (3) its + * interface is a bit cumbersome. + */ +abstract class HTMLPurifier_Node +{ + /** + * Line number of the start token in the source document + * @type int + */ + public $line; + + /** + * Column number of the start token in the source document. Null if unknown. + * @type int + */ + public $col; + + /** + * Lookup array of processing that this token is exempt from. + * Currently, valid values are "ValidateAttributes". + * @type array + */ + public $armor = array(); + + /** + * When true, this node should be ignored as non-existent. + * + * Who is responsible for ignoring dead nodes? FixNesting is + * responsible for removing them before passing on to child + * validators. + */ + public $dead = false; + + /** + * Returns a pair of start and end tokens, where the end token + * is null if it is not necessary. Does not include children. + * @type array + */ + abstract public function toTokenPair(); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Node/Comment.php b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Comment.php new file mode 100644 index 0000000000000000000000000000000000000000..11f3245d856e1bdefa3db82f53e20623712fd42c --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Comment.php @@ -0,0 +1,36 @@ +<?php + +/** + * Concrete comment node class. + */ +class HTMLPurifier_Node_Comment extends HTMLPurifier_Node +{ + /** + * Character data within comment. + * @type string + */ + public $data; + + /** + * @type bool + */ + public $is_whitespace = true; + + /** + * Transparent constructor. + * + * @param string $data String comment data. + * @param int $line + * @param int $col + */ + public function __construct($data, $line = null, $col = null) + { + $this->data = $data; + $this->line = $line; + $this->col = $col; + } + + public function toTokenPair() { + return array(new HTMLPurifier_Token_Comment($this->data, $this->line, $this->col), null); + } +} diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Node/Element.php b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Element.php new file mode 100644 index 0000000000000000000000000000000000000000..7db4d0253f8baf5fe837cb59dae5df7f4faa551f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Element.php @@ -0,0 +1,59 @@ +<?php + +/** + * Concrete element node class. + */ +class HTMLPurifier_Node_Element extends HTMLPurifier_Node +{ + /** + * The lower-case name of the tag, like 'a', 'b' or 'blockquote'. + * + * @note Strictly speaking, XML tags are case sensitive, so we shouldn't + * be lower-casing them, but these tokens cater to HTML tags, which are + * insensitive. + * @type string + */ + public $name; + + /** + * Associative array of the node's attributes. + * @type array + */ + public $attr = array(); + + /** + * List of child elements. + * @type array + */ + public $children = array(); + + /** + * Does this use the <a></a> form or the </a> form, i.e. + * is it a pair of start/end tokens or an empty token. + * @bool + */ + public $empty = false; + + public $endCol = null, $endLine = null, $endArmor = array(); + + public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) { + $this->name = $name; + $this->attr = $attr; + $this->line = $line; + $this->col = $col; + $this->armor = $armor; + } + + public function toTokenPair() { + // XXX inefficiency here, normalization is not necessary + if ($this->empty) { + return array(new HTMLPurifier_Token_Empty($this->name, $this->attr, $this->line, $this->col, $this->armor), null); + } else { + $start = new HTMLPurifier_Token_Start($this->name, $this->attr, $this->line, $this->col, $this->armor); + $end = new HTMLPurifier_Token_End($this->name, array(), $this->endLine, $this->endCol, $this->endArmor); + //$end->start = $start; + return array($start, $end); + } + } +} + diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Node/Text.php b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..f51d861af2e664d608c3cb9ad8d3a06a63dd8929 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Node/Text.php @@ -0,0 +1,54 @@ +<?php + +/** + * Concrete text token class. + * + * Text tokens comprise of regular parsed character data (PCDATA) and raw + * character data (from the CDATA sections). Internally, their + * data is parsed with all entities expanded. Surprisingly, the text token + * does have a "tag name" called #PCDATA, which is how the DTD represents it + * in permissible child nodes. + */ +class HTMLPurifier_Node_Text extends HTMLPurifier_Node +{ + + /** + * PCDATA tag name compatible with DTD, see + * HTMLPurifier_ChildDef_Custom for details. + * @type string + */ + public $name = '#PCDATA'; + + /** + * @type string + */ + public $data; + /**< Parsed character data of text. */ + + /** + * @type bool + */ + public $is_whitespace; + + /**< Bool indicating if node is whitespace. */ + + /** + * Constructor, accepts data and determines if it is whitespace. + * @param string $data String parsed character data. + * @param int $line + * @param int $col + */ + public function __construct($data, $is_whitespace, $line = null, $col = null) + { + $this->data = $data; + $this->is_whitespace = $is_whitespace; + $this->line = $line; + $this->col = $col; + } + + public function toTokenPair() { + return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/PercentEncoder.php b/libraries/htmlpurifier410/library/HTMLPurifier/PercentEncoder.php similarity index 76% rename from libraries/htmlpurifier/library/HTMLPurifier/PercentEncoder.php rename to libraries/htmlpurifier410/library/HTMLPurifier/PercentEncoder.php index a43c44f4c5861aae5208698b6a2fce093bf31b54..fb9fd1fc9575d01459120d5ee29a4af495c964b0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/PercentEncoder.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/PercentEncoder.php @@ -1,98 +1,111 @@ -<?php - -/** - * Class that handles operations involving percent-encoding in URIs. - * - * @warning - * Be careful when reusing instances of PercentEncoder. The object - * you use for normalize() SHOULD NOT be used for encode(), or - * vice-versa. - */ -class HTMLPurifier_PercentEncoder -{ - - /** - * Reserved characters to preserve when using encode(). - */ - protected $preserve = array(); - - /** - * String of characters that should be preserved while using encode(). - */ - public function __construct($preserve = false) { - // unreserved letters, ought to const-ify - for ($i = 48; $i <= 57; $i++) $this->preserve[$i] = true; // digits - for ($i = 65; $i <= 90; $i++) $this->preserve[$i] = true; // upper-case - for ($i = 97; $i <= 122; $i++) $this->preserve[$i] = true; // lower-case - $this->preserve[45] = true; // Dash - - $this->preserve[46] = true; // Period . - $this->preserve[95] = true; // Underscore _ - $this->preserve[126]= true; // Tilde ~ - - // extra letters not to escape - if ($preserve !== false) { - for ($i = 0, $c = strlen($preserve); $i < $c; $i++) { - $this->preserve[ord($preserve[$i])] = true; - } - } - } - - /** - * Our replacement for urlencode, it encodes all non-reserved characters, - * as well as any extra characters that were instructed to be preserved. - * @note - * Assumes that the string has already been normalized, making any - * and all percent escape sequences valid. Percents will not be - * re-escaped, regardless of their status in $preserve - * @param $string String to be encoded - * @return Encoded string. - */ - public function encode($string) { - $ret = ''; - for ($i = 0, $c = strlen($string); $i < $c; $i++) { - if ($string[$i] !== '%' && !isset($this->preserve[$int = ord($string[$i])]) ) { - $ret .= '%' . sprintf('%02X', $int); - } else { - $ret .= $string[$i]; - } - } - return $ret; - } - - /** - * Fix up percent-encoding by decoding unreserved characters and normalizing. - * @warning This function is affected by $preserve, even though the - * usual desired behavior is for this not to preserve those - * characters. Be careful when reusing instances of PercentEncoder! - * @param $string String to normalize - */ - public function normalize($string) { - if ($string == '') return ''; - $parts = explode('%', $string); - $ret = array_shift($parts); - foreach ($parts as $part) { - $length = strlen($part); - if ($length < 2) { - $ret .= '%25' . $part; - continue; - } - $encoding = substr($part, 0, 2); - $text = substr($part, 2); - if (!ctype_xdigit($encoding)) { - $ret .= '%25' . $part; - continue; - } - $int = hexdec($encoding); - if (isset($this->preserve[$int])) { - $ret .= chr($int) . $text; - continue; - } - $encoding = strtoupper($encoding); - $ret .= '%' . $encoding . $text; - } - return $ret; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Class that handles operations involving percent-encoding in URIs. + * + * @warning + * Be careful when reusing instances of PercentEncoder. The object + * you use for normalize() SHOULD NOT be used for encode(), or + * vice-versa. + */ +class HTMLPurifier_PercentEncoder +{ + + /** + * Reserved characters to preserve when using encode(). + * @type array + */ + protected $preserve = array(); + + /** + * String of characters that should be preserved while using encode(). + * @param bool $preserve + */ + public function __construct($preserve = false) + { + // unreserved letters, ought to const-ify + for ($i = 48; $i <= 57; $i++) { // digits + $this->preserve[$i] = true; + } + for ($i = 65; $i <= 90; $i++) { // upper-case + $this->preserve[$i] = true; + } + for ($i = 97; $i <= 122; $i++) { // lower-case + $this->preserve[$i] = true; + } + $this->preserve[45] = true; // Dash - + $this->preserve[46] = true; // Period . + $this->preserve[95] = true; // Underscore _ + $this->preserve[126]= true; // Tilde ~ + + // extra letters not to escape + if ($preserve !== false) { + for ($i = 0, $c = strlen($preserve); $i < $c; $i++) { + $this->preserve[ord($preserve[$i])] = true; + } + } + } + + /** + * Our replacement for urlencode, it encodes all non-reserved characters, + * as well as any extra characters that were instructed to be preserved. + * @note + * Assumes that the string has already been normalized, making any + * and all percent escape sequences valid. Percents will not be + * re-escaped, regardless of their status in $preserve + * @param string $string String to be encoded + * @return string Encoded string. + */ + public function encode($string) + { + $ret = ''; + for ($i = 0, $c = strlen($string); $i < $c; $i++) { + if ($string[$i] !== '%' && !isset($this->preserve[$int = ord($string[$i])])) { + $ret .= '%' . sprintf('%02X', $int); + } else { + $ret .= $string[$i]; + } + } + return $ret; + } + + /** + * Fix up percent-encoding by decoding unreserved characters and normalizing. + * @warning This function is affected by $preserve, even though the + * usual desired behavior is for this not to preserve those + * characters. Be careful when reusing instances of PercentEncoder! + * @param string $string String to normalize + * @return string + */ + public function normalize($string) + { + if ($string == '') { + return ''; + } + $parts = explode('%', $string); + $ret = array_shift($parts); + foreach ($parts as $part) { + $length = strlen($part); + if ($length < 2) { + $ret .= '%25' . $part; + continue; + } + $encoding = substr($part, 0, 2); + $text = substr($part, 2); + if (!ctype_xdigit($encoding)) { + $ret .= '%25' . $part; + continue; + } + $int = hexdec($encoding); + if (isset($this->preserve[$int])) { + $ret .= chr($int) . $text; + continue; + } + $encoding = strtoupper($encoding); + $ret .= '%' . $encoding . $text; + } + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer.php b/libraries/htmlpurifier410/library/HTMLPurifier/Printer.php similarity index 52% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer.php index e7eb82e83e480d9d55bacf38a2a12e1cbfd8b23e..16acd4157400c42c5aeeb3feb768afbdbc355edc 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer.php @@ -1,176 +1,218 @@ -<?php - -// OUT OF DATE, NEEDS UPDATING! -// USE XMLWRITER! - -class HTMLPurifier_Printer -{ - - /** - * Instance of HTMLPurifier_Generator for HTML generation convenience funcs - */ - protected $generator; - - /** - * Instance of HTMLPurifier_Config, for easy access - */ - protected $config; - - /** - * Initialize $generator. - */ - public function __construct() { - } - - /** - * Give generator necessary configuration if possible - */ - public function prepareGenerator($config) { - $all = $config->getAll(); - $context = new HTMLPurifier_Context(); - $this->generator = new HTMLPurifier_Generator($config, $context); - } - - /** - * Main function that renders object or aspect of that object - * @note Parameters vary depending on printer - */ - // function render() {} - - /** - * Returns a start tag - * @param $tag Tag name - * @param $attr Attribute array - */ - protected function start($tag, $attr = array()) { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Start($tag, $attr ? $attr : array()) - ); - } - - /** - * Returns an end teg - * @param $tag Tag name - */ - protected function end($tag) { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_End($tag) - ); - } - - /** - * Prints a complete element with content inside - * @param $tag Tag name - * @param $contents Element contents - * @param $attr Tag attributes - * @param $escape Bool whether or not to escape contents - */ - protected function element($tag, $contents, $attr = array(), $escape = true) { - return $this->start($tag, $attr) . - ($escape ? $this->escape($contents) : $contents) . - $this->end($tag); - } - - protected function elementEmpty($tag, $attr = array()) { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Empty($tag, $attr) - ); - } - - protected function text($text) { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Text($text) - ); - } - - /** - * Prints a simple key/value row in a table. - * @param $name Key - * @param $value Value - */ - protected function row($name, $value) { - if (is_bool($value)) $value = $value ? 'On' : 'Off'; - return - $this->start('tr') . "\n" . - $this->element('th', $name) . "\n" . - $this->element('td', $value) . "\n" . - $this->end('tr') - ; - } - - /** - * Escapes a string for HTML output. - * @param $string String to escape - */ - protected function escape($string) { - $string = HTMLPurifier_Encoder::cleanUTF8($string); - $string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8'); - return $string; - } - - /** - * Takes a list of strings and turns them into a single list - * @param $array List of strings - * @param $polite Bool whether or not to add an end before the last - */ - protected function listify($array, $polite = false) { - if (empty($array)) return 'None'; - $ret = ''; - $i = count($array); - foreach ($array as $value) { - $i--; - $ret .= $value; - if ($i > 0 && !($polite && $i == 1)) $ret .= ', '; - if ($polite && $i == 1) $ret .= 'and '; - } - return $ret; - } - - /** - * Retrieves the class of an object without prefixes, as well as metadata - * @param $obj Object to determine class of - * @param $prefix Further prefix to remove - */ - protected function getClass($obj, $sec_prefix = '') { - static $five = null; - if ($five === null) $five = version_compare(PHP_VERSION, '5', '>='); - $prefix = 'HTMLPurifier_' . $sec_prefix; - if (!$five) $prefix = strtolower($prefix); - $class = str_replace($prefix, '', get_class($obj)); - $lclass = strtolower($class); - $class .= '('; - switch ($lclass) { - case 'enum': - $values = array(); - foreach ($obj->valid_values as $value => $bool) { - $values[] = $value; - } - $class .= implode(', ', $values); - break; - case 'css_composite': - $values = array(); - foreach ($obj->defs as $def) { - $values[] = $this->getClass($def, $sec_prefix); - } - $class .= implode(', ', $values); - break; - case 'css_multiple': - $class .= $this->getClass($obj->single, $sec_prefix) . ', '; - $class .= $obj->max; - break; - case 'css_denyelementdecorator': - $class .= $this->getClass($obj->def, $sec_prefix) . ', '; - $class .= $obj->element; - break; - case 'css_importantdecorator': - $class .= $this->getClass($obj->def, $sec_prefix); - if ($obj->allow) $class .= ', !important'; - break; - } - $class .= ')'; - return $class; - } - -} - -// vim: et sw=4 sts=4 +<?php + +// OUT OF DATE, NEEDS UPDATING! +// USE XMLWRITER! + +class HTMLPurifier_Printer +{ + + /** + * For HTML generation convenience funcs. + * @type HTMLPurifier_Generator + */ + protected $generator; + + /** + * For easy access. + * @type HTMLPurifier_Config + */ + protected $config; + + /** + * Initialize $generator. + */ + public function __construct() + { + } + + /** + * Give generator necessary configuration if possible + * @param HTMLPurifier_Config $config + */ + public function prepareGenerator($config) + { + $all = $config->getAll(); + $context = new HTMLPurifier_Context(); + $this->generator = new HTMLPurifier_Generator($config, $context); + } + + /** + * Main function that renders object or aspect of that object + * @note Parameters vary depending on printer + */ + // function render() {} + + /** + * Returns a start tag + * @param string $tag Tag name + * @param array $attr Attribute array + * @return string + */ + protected function start($tag, $attr = array()) + { + return $this->generator->generateFromToken( + new HTMLPurifier_Token_Start($tag, $attr ? $attr : array()) + ); + } + + /** + * Returns an end tag + * @param string $tag Tag name + * @return string + */ + protected function end($tag) + { + return $this->generator->generateFromToken( + new HTMLPurifier_Token_End($tag) + ); + } + + /** + * Prints a complete element with content inside + * @param string $tag Tag name + * @param string $contents Element contents + * @param array $attr Tag attributes + * @param bool $escape whether or not to escape contents + * @return string + */ + protected function element($tag, $contents, $attr = array(), $escape = true) + { + return $this->start($tag, $attr) . + ($escape ? $this->escape($contents) : $contents) . + $this->end($tag); + } + + /** + * @param string $tag + * @param array $attr + * @return string + */ + protected function elementEmpty($tag, $attr = array()) + { + return $this->generator->generateFromToken( + new HTMLPurifier_Token_Empty($tag, $attr) + ); + } + + /** + * @param string $text + * @return string + */ + protected function text($text) + { + return $this->generator->generateFromToken( + new HTMLPurifier_Token_Text($text) + ); + } + + /** + * Prints a simple key/value row in a table. + * @param string $name Key + * @param mixed $value Value + * @return string + */ + protected function row($name, $value) + { + if (is_bool($value)) { + $value = $value ? 'On' : 'Off'; + } + return + $this->start('tr') . "\n" . + $this->element('th', $name) . "\n" . + $this->element('td', $value) . "\n" . + $this->end('tr'); + } + + /** + * Escapes a string for HTML output. + * @param string $string String to escape + * @return string + */ + protected function escape($string) + { + $string = HTMLPurifier_Encoder::cleanUTF8($string); + $string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8'); + return $string; + } + + /** + * Takes a list of strings and turns them into a single list + * @param string[] $array List of strings + * @param bool $polite Bool whether or not to add an end before the last + * @return string + */ + protected function listify($array, $polite = false) + { + if (empty($array)) { + return 'None'; + } + $ret = ''; + $i = count($array); + foreach ($array as $value) { + $i--; + $ret .= $value; + if ($i > 0 && !($polite && $i == 1)) { + $ret .= ', '; + } + if ($polite && $i == 1) { + $ret .= 'and '; + } + } + return $ret; + } + + /** + * Retrieves the class of an object without prefixes, as well as metadata + * @param object $obj Object to determine class of + * @param string $sec_prefix Further prefix to remove + * @return string + */ + protected function getClass($obj, $sec_prefix = '') + { + static $five = null; + if ($five === null) { + $five = version_compare(PHP_VERSION, '5', '>='); + } + $prefix = 'HTMLPurifier_' . $sec_prefix; + if (!$five) { + $prefix = strtolower($prefix); + } + $class = str_replace($prefix, '', get_class($obj)); + $lclass = strtolower($class); + $class .= '('; + switch ($lclass) { + case 'enum': + $values = array(); + foreach ($obj->valid_values as $value => $bool) { + $values[] = $value; + } + $class .= implode(', ', $values); + break; + case 'css_composite': + $values = array(); + foreach ($obj->defs as $def) { + $values[] = $this->getClass($def, $sec_prefix); + } + $class .= implode(', ', $values); + break; + case 'css_multiple': + $class .= $this->getClass($obj->single, $sec_prefix) . ', '; + $class .= $obj->max; + break; + case 'css_denyelementdecorator': + $class .= $this->getClass($obj->def, $sec_prefix) . ', '; + $class .= $obj->element; + break; + case 'css_importantdecorator': + $class .= $this->getClass($obj->def, $sec_prefix); + if ($obj->allow) { + $class .= ', !important'; + } + break; + } + $class .= ')'; + return $class; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/CSSDefinition.php similarity index 82% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer/CSSDefinition.php index 81f9865901db1214522c53eec4aea48eda63319c..afc8c18ab96ea056bc59436fb96dd818a0588042 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/CSSDefinition.php @@ -1,38 +1,44 @@ -<?php - -class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer -{ - - protected $def; - - public function render($config) { - $this->def = $config->getCSSDefinition(); - $ret = ''; - - $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); - $ret .= $this->start('table'); - - $ret .= $this->element('caption', 'Properties ($info)'); - - $ret .= $this->start('thead'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Property', array('class' => 'heavy')); - $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;')); - $ret .= $this->end('tr'); - $ret .= $this->end('thead'); - - ksort($this->def->info); - foreach ($this->def->info as $property => $obj) { - $name = $this->getClass($obj, 'AttrDef_'); - $ret .= $this->row($property, $name); - } - - $ret .= $this->end('table'); - $ret .= $this->end('div'); - - return $ret; - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer +{ + /** + * @type HTMLPurifier_CSSDefinition + */ + protected $def; + + /** + * @param HTMLPurifier_Config $config + * @return string + */ + public function render($config) + { + $this->def = $config->getCSSDefinition(); + $ret = ''; + + $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); + $ret .= $this->start('table'); + + $ret .= $this->element('caption', 'Properties ($info)'); + + $ret .= $this->start('thead'); + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Property', array('class' => 'heavy')); + $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;')); + $ret .= $this->end('tr'); + $ret .= $this->end('thead'); + + ksort($this->def->info); + foreach ($this->def->info as $property => $obj) { + $name = $this->getClass($obj, 'AttrDef_'); + $ret .= $this->row($property, $name); + } + + $ret .= $this->end('table'); + $ret .= $this->end('div'); + + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.css similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.css index 3ff1a88aa4251bcd9ae678952672f33d6cb7a16b..7af30fc3a06ef8e313f61d753fff1a900236a933 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.css @@ -1,10 +1,10 @@ - -.hp-config {} - -.hp-config tbody th {text-align:right; padding-right:0.5em;} -.hp-config thead, .hp-config .namespace {background:#3C578C; color:#FFF;} -.hp-config .namespace th {text-align:center;} -.hp-config .verbose {display:none;} -.hp-config .controls {text-align:center;} - -/* vim: et sw=4 sts=4 */ + +.hp-config {} + +.hp-config tbody th {text-align:right; padding-right:0.5em;} +.hp-config thead, .hp-config .namespace {background:#3C578C; color:#FFF;} +.hp-config .namespace th {text-align:center;} +.hp-config .verbose {display:none;} +.hp-config .controls {text-align:center;} + +/* vim: et sw=4 sts=4 */ diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.js similarity index 96% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.js index cba00c9b80b9cfd379696958a0b5fafeee90a50d..83e065531417f7f72cdae27dddfc5ede27131244 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.js @@ -1,5 +1,5 @@ -function toggleWriteability(id_of_patient, checked) { - document.getElementById(id_of_patient).disabled = checked; -} - -// vim: et sw=4 sts=4 +function toggleWriteability(id_of_patient, checked) { + document.getElementById(id_of_patient).disabled = checked; +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.php similarity index 57% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.php index 744dec6597361baa34328773bba6ec2a8516fd1e..3bc417366f21618cf24b80cd61438d9dd17a9d32 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/ConfigForm.php @@ -1,368 +1,451 @@ -<?php - -/** - * @todo Rewrite to use Interchange objects - */ -class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer -{ - - /** - * Printers for specific fields - */ - protected $fields = array(); - - /** - * Documentation URL, can have fragment tagged on end - */ - protected $docURL; - - /** - * Name of form element to stuff config in - */ - protected $name; - - /** - * Whether or not to compress directive names, clipping them off - * after a certain amount of letters. False to disable or integer letters - * before clipping. - */ - protected $compress = false; - - /** - * @param $name Form element name for directives to be stuffed into - * @param $doc_url String documentation URL, will have fragment tagged on - * @param $compress Integer max length before compressing a directive name, set to false to turn off - */ - public function __construct( - $name, $doc_url = null, $compress = false - ) { - parent::__construct(); - $this->docURL = $doc_url; - $this->name = $name; - $this->compress = $compress; - // initialize sub-printers - $this->fields[0] = new HTMLPurifier_Printer_ConfigForm_default(); - $this->fields[HTMLPurifier_VarParser::BOOL] = new HTMLPurifier_Printer_ConfigForm_bool(); - } - - /** - * Sets default column and row size for textareas in sub-printers - * @param $cols Integer columns of textarea, null to use default - * @param $rows Integer rows of textarea, null to use default - */ - public function setTextareaDimensions($cols = null, $rows = null) { - if ($cols) $this->fields['default']->cols = $cols; - if ($rows) $this->fields['default']->rows = $rows; - } - - /** - * Retrieves styling, in case it is not accessible by webserver - */ - public static function getCSS() { - return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css'); - } - - /** - * Retrieves JavaScript, in case it is not accessible by webserver - */ - public static function getJavaScript() { - return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js'); - } - - /** - * Returns HTML output for a configuration form - * @param $config Configuration object of current form state, or an array - * where [0] has an HTML namespace and [1] is being rendered. - * @param $allowed Optional namespace(s) and directives to restrict form to. - */ - public function render($config, $allowed = true, $render_controls = true) { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - - $this->config = $config; - $this->genConfig = $gen_config; - $this->prepareGenerator($gen_config); - - $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $config->def); - $all = array(); - foreach ($allowed as $key) { - list($ns, $directive) = $key; - $all[$ns][$directive] = $config->get($ns, $directive); - } - - $ret = ''; - $ret .= $this->start('table', array('class' => 'hp-config')); - $ret .= $this->start('thead'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Directive', array('class' => 'hp-directive')); - $ret .= $this->element('th', 'Value', array('class' => 'hp-value')); - $ret .= $this->end('tr'); - $ret .= $this->end('thead'); - foreach ($all as $ns => $directives) { - $ret .= $this->renderNamespace($ns, $directives); - } - if ($render_controls) { - $ret .= $this->start('tbody'); - $ret .= $this->start('tr'); - $ret .= $this->start('td', array('colspan' => 2, 'class' => 'controls')); - $ret .= $this->elementEmpty('input', array('type' => 'submit', 'value' => 'Submit')); - $ret .= '[<a href="?">Reset</a>]'; - $ret .= $this->end('td'); - $ret .= $this->end('tr'); - $ret .= $this->end('tbody'); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders a single namespace - * @param $ns String namespace name - * @param $directive Associative array of directives to values - */ - protected function renderNamespace($ns, $directives) { - $ret = ''; - $ret .= $this->start('tbody', array('class' => 'namespace')); - $ret .= $this->start('tr'); - $ret .= $this->element('th', $ns, array('colspan' => 2)); - $ret .= $this->end('tr'); - $ret .= $this->end('tbody'); - $ret .= $this->start('tbody'); - foreach ($directives as $directive => $value) { - $ret .= $this->start('tr'); - $ret .= $this->start('th'); - if ($this->docURL) { - $url = str_replace('%s', urlencode("$ns.$directive"), $this->docURL); - $ret .= $this->start('a', array('href' => $url)); - } - $attr = array('for' => "{$this->name}:$ns.$directive"); - - // crop directive name if it's too long - if (!$this->compress || (strlen($directive) < $this->compress)) { - $directive_disp = $directive; - } else { - $directive_disp = substr($directive, 0, $this->compress - 2) . '...'; - $attr['title'] = $directive; - } - - $ret .= $this->element( - 'label', - $directive_disp, - // component printers must create an element with this id - $attr - ); - if ($this->docURL) $ret .= $this->end('a'); - $ret .= $this->end('th'); - - $ret .= $this->start('td'); - $def = $this->config->def->info[$ns][$directive]; - if (is_int($def)) { - $allow_null = $def < 0; - $type = abs($def); - } else { - $type = $def->type; - $allow_null = isset($def->allow_null); - } - if (!isset($this->fields[$type])) $type = 0; // default - $type_obj = $this->fields[$type]; - if ($allow_null) { - $type_obj = new HTMLPurifier_Printer_ConfigForm_NullDecorator($type_obj); - } - $ret .= $type_obj->render($ns, $directive, $value, $this->name, array($this->genConfig, $this->config)); - $ret .= $this->end('td'); - $ret .= $this->end('tr'); - } - $ret .= $this->end('tbody'); - return $ret; - } - -} - -/** - * Printer decorator for directives that accept null - */ -class HTMLPurifier_Printer_ConfigForm_NullDecorator extends HTMLPurifier_Printer { - /** - * Printer being decorated - */ - protected $obj; - /** - * @param $obj Printer to decorate - */ - public function __construct($obj) { - parent::__construct(); - $this->obj = $obj; - } - public function render($ns, $directive, $value, $name, $config) { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - - $ret = ''; - $ret .= $this->start('label', array('for' => "$name:Null_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' Null/Disabled'); - $ret .= $this->end('label'); - $attr = array( - 'type' => 'checkbox', - 'value' => '1', - 'class' => 'null-toggle', - 'name' => "$name"."[Null_$ns.$directive]", - 'id' => "$name:Null_$ns.$directive", - 'onclick' => "toggleWriteability('$name:$ns.$directive',checked)" // INLINE JAVASCRIPT!!!! - ); - if ($this->obj instanceof HTMLPurifier_Printer_ConfigForm_bool) { - // modify inline javascript slightly - $attr['onclick'] = "toggleWriteability('$name:Yes_$ns.$directive',checked);toggleWriteability('$name:No_$ns.$directive',checked)"; - } - if ($value === null) $attr['checked'] = 'checked'; - $ret .= $this->elementEmpty('input', $attr); - $ret .= $this->text(' or '); - $ret .= $this->elementEmpty('br'); - $ret .= $this->obj->render($ns, $directive, $value, $name, array($gen_config, $config)); - return $ret; - } -} - -/** - * Swiss-army knife configuration form field printer - */ -class HTMLPurifier_Printer_ConfigForm_default extends HTMLPurifier_Printer { - public $cols = 18; - public $rows = 5; - public function render($ns, $directive, $value, $name, $config) { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - // this should probably be split up a little - $ret = ''; - $def = $config->def->info[$ns][$directive]; - if (is_int($def)) { - $type = abs($def); - } else { - $type = $def->type; - } - if (is_array($value)) { - switch ($type) { - case HTMLPurifier_VarParser::LOOKUP: - $array = $value; - $value = array(); - foreach ($array as $val => $b) { - $value[] = $val; - } - case HTMLPurifier_VarParser::ALIST: - $value = implode(PHP_EOL, $value); - break; - case HTMLPurifier_VarParser::HASH: - $nvalue = ''; - foreach ($value as $i => $v) { - $nvalue .= "$i:$v" . PHP_EOL; - } - $value = $nvalue; - break; - default: - $value = ''; - } - } - if ($type === HTMLPurifier_VarParser::MIXED) { - return 'Not supported'; - $value = serialize($value); - } - $attr = array( - 'name' => "$name"."[$ns.$directive]", - 'id' => "$name:$ns.$directive" - ); - if ($value === null) $attr['disabled'] = 'disabled'; - if (isset($def->allowed)) { - $ret .= $this->start('select', $attr); - foreach ($def->allowed as $val => $b) { - $attr = array(); - if ($value == $val) $attr['selected'] = 'selected'; - $ret .= $this->element('option', $val, $attr); - } - $ret .= $this->end('select'); - } elseif ( - $type === HTMLPurifier_VarParser::TEXT || - $type === HTMLPurifier_VarParser::ITEXT || - $type === HTMLPurifier_VarParser::ALIST || - $type === HTMLPurifier_VarParser::HASH || - $type === HTMLPurifier_VarParser::LOOKUP - ) { - $attr['cols'] = $this->cols; - $attr['rows'] = $this->rows; - $ret .= $this->start('textarea', $attr); - $ret .= $this->text($value); - $ret .= $this->end('textarea'); - } else { - $attr['value'] = $value; - $attr['type'] = 'text'; - $ret .= $this->elementEmpty('input', $attr); - } - return $ret; - } -} - -/** - * Bool form field printer - */ -class HTMLPurifier_Printer_ConfigForm_bool extends HTMLPurifier_Printer { - public function render($ns, $directive, $value, $name, $config) { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - $ret = ''; - $ret .= $this->start('div', array('id' => "$name:$ns.$directive")); - - $ret .= $this->start('label', array('for' => "$name:Yes_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' Yes'); - $ret .= $this->end('label'); - - $attr = array( - 'type' => 'radio', - 'name' => "$name"."[$ns.$directive]", - 'id' => "$name:Yes_$ns.$directive", - 'value' => '1' - ); - if ($value === true) $attr['checked'] = 'checked'; - if ($value === null) $attr['disabled'] = 'disabled'; - $ret .= $this->elementEmpty('input', $attr); - - $ret .= $this->start('label', array('for' => "$name:No_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' No'); - $ret .= $this->end('label'); - - $attr = array( - 'type' => 'radio', - 'name' => "$name"."[$ns.$directive]", - 'id' => "$name:No_$ns.$directive", - 'value' => '0' - ); - if ($value === false) $attr['checked'] = 'checked'; - if ($value === null) $attr['disabled'] = 'disabled'; - $ret .= $this->elementEmpty('input', $attr); - - $ret .= $this->end('div'); - - return $ret; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * @todo Rewrite to use Interchange objects + */ +class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer +{ + + /** + * Printers for specific fields. + * @type HTMLPurifier_Printer[] + */ + protected $fields = array(); + + /** + * Documentation URL, can have fragment tagged on end. + * @type string + */ + protected $docURL; + + /** + * Name of form element to stuff config in. + * @type string + */ + protected $name; + + /** + * Whether or not to compress directive names, clipping them off + * after a certain amount of letters. False to disable or integer letters + * before clipping. + * @type bool + */ + protected $compress = false; + + /** + * @param string $name Form element name for directives to be stuffed into + * @param string $doc_url String documentation URL, will have fragment tagged on + * @param bool $compress Integer max length before compressing a directive name, set to false to turn off + */ + public function __construct( + $name, + $doc_url = null, + $compress = false + ) { + parent::__construct(); + $this->docURL = $doc_url; + $this->name = $name; + $this->compress = $compress; + // initialize sub-printers + $this->fields[0] = new HTMLPurifier_Printer_ConfigForm_default(); + $this->fields[HTMLPurifier_VarParser::BOOL] = new HTMLPurifier_Printer_ConfigForm_bool(); + } + + /** + * Sets default column and row size for textareas in sub-printers + * @param $cols Integer columns of textarea, null to use default + * @param $rows Integer rows of textarea, null to use default + */ + public function setTextareaDimensions($cols = null, $rows = null) + { + if ($cols) { + $this->fields['default']->cols = $cols; + } + if ($rows) { + $this->fields['default']->rows = $rows; + } + } + + /** + * Retrieves styling, in case it is not accessible by webserver + */ + public static function getCSS() + { + return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css'); + } + + /** + * Retrieves JavaScript, in case it is not accessible by webserver + */ + public static function getJavaScript() + { + return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js'); + } + + /** + * Returns HTML output for a configuration form + * @param HTMLPurifier_Config|array $config Configuration object of current form state, or an array + * where [0] has an HTML namespace and [1] is being rendered. + * @param array|bool $allowed Optional namespace(s) and directives to restrict form to. + * @param bool $render_controls + * @return string + */ + public function render($config, $allowed = true, $render_controls = true) + { + if (is_array($config) && isset($config[0])) { + $gen_config = $config[0]; + $config = $config[1]; + } else { + $gen_config = $config; + } + + $this->config = $config; + $this->genConfig = $gen_config; + $this->prepareGenerator($gen_config); + + $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $config->def); + $all = array(); + foreach ($allowed as $key) { + list($ns, $directive) = $key; + $all[$ns][$directive] = $config->get($ns . '.' . $directive); + } + + $ret = ''; + $ret .= $this->start('table', array('class' => 'hp-config')); + $ret .= $this->start('thead'); + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Directive', array('class' => 'hp-directive')); + $ret .= $this->element('th', 'Value', array('class' => 'hp-value')); + $ret .= $this->end('tr'); + $ret .= $this->end('thead'); + foreach ($all as $ns => $directives) { + $ret .= $this->renderNamespace($ns, $directives); + } + if ($render_controls) { + $ret .= $this->start('tbody'); + $ret .= $this->start('tr'); + $ret .= $this->start('td', array('colspan' => 2, 'class' => 'controls')); + $ret .= $this->elementEmpty('input', array('type' => 'submit', 'value' => 'Submit')); + $ret .= '[<a href="?">Reset</a>]'; + $ret .= $this->end('td'); + $ret .= $this->end('tr'); + $ret .= $this->end('tbody'); + } + $ret .= $this->end('table'); + return $ret; + } + + /** + * Renders a single namespace + * @param $ns String namespace name + * @param array $directives array of directives to values + * @return string + */ + protected function renderNamespace($ns, $directives) + { + $ret = ''; + $ret .= $this->start('tbody', array('class' => 'namespace')); + $ret .= $this->start('tr'); + $ret .= $this->element('th', $ns, array('colspan' => 2)); + $ret .= $this->end('tr'); + $ret .= $this->end('tbody'); + $ret .= $this->start('tbody'); + foreach ($directives as $directive => $value) { + $ret .= $this->start('tr'); + $ret .= $this->start('th'); + if ($this->docURL) { + $url = str_replace('%s', urlencode("$ns.$directive"), $this->docURL); + $ret .= $this->start('a', array('href' => $url)); + } + $attr = array('for' => "{$this->name}:$ns.$directive"); + + // crop directive name if it's too long + if (!$this->compress || (strlen($directive) < $this->compress)) { + $directive_disp = $directive; + } else { + $directive_disp = substr($directive, 0, $this->compress - 2) . '...'; + $attr['title'] = $directive; + } + + $ret .= $this->element( + 'label', + $directive_disp, + // component printers must create an element with this id + $attr + ); + if ($this->docURL) { + $ret .= $this->end('a'); + } + $ret .= $this->end('th'); + + $ret .= $this->start('td'); + $def = $this->config->def->info["$ns.$directive"]; + if (is_int($def)) { + $allow_null = $def < 0; + $type = abs($def); + } else { + $type = $def->type; + $allow_null = isset($def->allow_null); + } + if (!isset($this->fields[$type])) { + $type = 0; + } // default + $type_obj = $this->fields[$type]; + if ($allow_null) { + $type_obj = new HTMLPurifier_Printer_ConfigForm_NullDecorator($type_obj); + } + $ret .= $type_obj->render($ns, $directive, $value, $this->name, array($this->genConfig, $this->config)); + $ret .= $this->end('td'); + $ret .= $this->end('tr'); + } + $ret .= $this->end('tbody'); + return $ret; + } + +} + +/** + * Printer decorator for directives that accept null + */ +class HTMLPurifier_Printer_ConfigForm_NullDecorator extends HTMLPurifier_Printer +{ + /** + * Printer being decorated + * @type HTMLPurifier_Printer + */ + protected $obj; + + /** + * @param HTMLPurifier_Printer $obj Printer to decorate + */ + public function __construct($obj) + { + parent::__construct(); + $this->obj = $obj; + } + + /** + * @param string $ns + * @param string $directive + * @param string $value + * @param string $name + * @param HTMLPurifier_Config|array $config + * @return string + */ + public function render($ns, $directive, $value, $name, $config) + { + if (is_array($config) && isset($config[0])) { + $gen_config = $config[0]; + $config = $config[1]; + } else { + $gen_config = $config; + } + $this->prepareGenerator($gen_config); + + $ret = ''; + $ret .= $this->start('label', array('for' => "$name:Null_$ns.$directive")); + $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); + $ret .= $this->text(' Null/Disabled'); + $ret .= $this->end('label'); + $attr = array( + 'type' => 'checkbox', + 'value' => '1', + 'class' => 'null-toggle', + 'name' => "$name" . "[Null_$ns.$directive]", + 'id' => "$name:Null_$ns.$directive", + 'onclick' => "toggleWriteability('$name:$ns.$directive',checked)" // INLINE JAVASCRIPT!!!! + ); + if ($this->obj instanceof HTMLPurifier_Printer_ConfigForm_bool) { + // modify inline javascript slightly + $attr['onclick'] = + "toggleWriteability('$name:Yes_$ns.$directive',checked);" . + "toggleWriteability('$name:No_$ns.$directive',checked)"; + } + if ($value === null) { + $attr['checked'] = 'checked'; + } + $ret .= $this->elementEmpty('input', $attr); + $ret .= $this->text(' or '); + $ret .= $this->elementEmpty('br'); + $ret .= $this->obj->render($ns, $directive, $value, $name, array($gen_config, $config)); + return $ret; + } +} + +/** + * Swiss-army knife configuration form field printer + */ +class HTMLPurifier_Printer_ConfigForm_default extends HTMLPurifier_Printer +{ + /** + * @type int + */ + public $cols = 18; + + /** + * @type int + */ + public $rows = 5; + + /** + * @param string $ns + * @param string $directive + * @param string $value + * @param string $name + * @param HTMLPurifier_Config|array $config + * @return string + */ + public function render($ns, $directive, $value, $name, $config) + { + if (is_array($config) && isset($config[0])) { + $gen_config = $config[0]; + $config = $config[1]; + } else { + $gen_config = $config; + } + $this->prepareGenerator($gen_config); + // this should probably be split up a little + $ret = ''; + $def = $config->def->info["$ns.$directive"]; + if (is_int($def)) { + $type = abs($def); + } else { + $type = $def->type; + } + if (is_array($value)) { + switch ($type) { + case HTMLPurifier_VarParser::LOOKUP: + $array = $value; + $value = array(); + foreach ($array as $val => $b) { + $value[] = $val; + } + //TODO does this need a break? + case HTMLPurifier_VarParser::ALIST: + $value = implode(PHP_EOL, $value); + break; + case HTMLPurifier_VarParser::HASH: + $nvalue = ''; + foreach ($value as $i => $v) { + if (is_array($v)) { + // HACK + $v = implode(";", $v); + } + $nvalue .= "$i:$v" . PHP_EOL; + } + $value = $nvalue; + break; + default: + $value = ''; + } + } + if ($type === HTMLPurifier_VarParser::MIXED) { + return 'Not supported'; + $value = serialize($value); + } + $attr = array( + 'name' => "$name" . "[$ns.$directive]", + 'id' => "$name:$ns.$directive" + ); + if ($value === null) { + $attr['disabled'] = 'disabled'; + } + if (isset($def->allowed)) { + $ret .= $this->start('select', $attr); + foreach ($def->allowed as $val => $b) { + $attr = array(); + if ($value == $val) { + $attr['selected'] = 'selected'; + } + $ret .= $this->element('option', $val, $attr); + } + $ret .= $this->end('select'); + } elseif ($type === HTMLPurifier_VarParser::TEXT || + $type === HTMLPurifier_VarParser::ITEXT || + $type === HTMLPurifier_VarParser::ALIST || + $type === HTMLPurifier_VarParser::HASH || + $type === HTMLPurifier_VarParser::LOOKUP) { + $attr['cols'] = $this->cols; + $attr['rows'] = $this->rows; + $ret .= $this->start('textarea', $attr); + $ret .= $this->text($value); + $ret .= $this->end('textarea'); + } else { + $attr['value'] = $value; + $attr['type'] = 'text'; + $ret .= $this->elementEmpty('input', $attr); + } + return $ret; + } +} + +/** + * Bool form field printer + */ +class HTMLPurifier_Printer_ConfigForm_bool extends HTMLPurifier_Printer +{ + /** + * @param string $ns + * @param string $directive + * @param string $value + * @param string $name + * @param HTMLPurifier_Config|array $config + * @return string + */ + public function render($ns, $directive, $value, $name, $config) + { + if (is_array($config) && isset($config[0])) { + $gen_config = $config[0]; + $config = $config[1]; + } else { + $gen_config = $config; + } + $this->prepareGenerator($gen_config); + $ret = ''; + $ret .= $this->start('div', array('id' => "$name:$ns.$directive")); + + $ret .= $this->start('label', array('for' => "$name:Yes_$ns.$directive")); + $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); + $ret .= $this->text(' Yes'); + $ret .= $this->end('label'); + + $attr = array( + 'type' => 'radio', + 'name' => "$name" . "[$ns.$directive]", + 'id' => "$name:Yes_$ns.$directive", + 'value' => '1' + ); + if ($value === true) { + $attr['checked'] = 'checked'; + } + if ($value === null) { + $attr['disabled'] = 'disabled'; + } + $ret .= $this->elementEmpty('input', $attr); + + $ret .= $this->start('label', array('for' => "$name:No_$ns.$directive")); + $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); + $ret .= $this->text(' No'); + $ret .= $this->end('label'); + + $attr = array( + 'type' => 'radio', + 'name' => "$name" . "[$ns.$directive]", + 'id' => "$name:No_$ns.$directive", + 'value' => '0' + ); + if ($value === false) { + $attr['checked'] = 'checked'; + } + if ($value === null) { + $attr['disabled'] = 'disabled'; + } + $ret .= $this->elementEmpty('input', $attr); + + $ret .= $this->end('div'); + + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/HTMLDefinition.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Printer/HTMLDefinition.php index 8a8f126b81f037cc4a2574e469f5ef0cded11eba..679d19ba3a1c4fd0607e3d09afb4064f305b0c2e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Printer/HTMLDefinition.php @@ -1,272 +1,324 @@ -<?php - -class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer -{ - - /** - * Instance of HTMLPurifier_HTMLDefinition, for easy access - */ - protected $def; - - public function render($config) { - $ret = ''; - $this->config =& $config; - - $this->def = $config->getHTMLDefinition(); - - $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); - - $ret .= $this->renderDoctype(); - $ret .= $this->renderEnvironment(); - $ret .= $this->renderContentSets(); - $ret .= $this->renderInfo(); - - $ret .= $this->end('div'); - - return $ret; - } - - /** - * Renders the Doctype table - */ - protected function renderDoctype() { - $doctype = $this->def->doctype; - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Doctype'); - $ret .= $this->row('Name', $doctype->name); - $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No'); - $ret .= $this->row('Default Modules', implode($doctype->modules, ', ')); - $ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', ')); - $ret .= $this->end('table'); - return $ret; - } - - - /** - * Renders environment table, which is miscellaneous info - */ - protected function renderEnvironment() { - $def = $this->def; - - $ret = ''; - - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Environment'); - - $ret .= $this->row('Parent of fragment', $def->info_parent); - $ret .= $this->renderChildren($def->info_parent_def->child); - $ret .= $this->row('Block wrap name', $def->info_block_wrapper); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Global attributes'); - $ret .= $this->element('td', $this->listifyAttr($def->info_global_attr),0,0); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Tag transforms'); - $list = array(); - foreach ($def->info_tag_transform as $old => $new) { - $new = $this->getClass($new, 'TagTransform_'); - $list[] = "<$old> with $new"; - } - $ret .= $this->element('td', $this->listify($list)); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Pre-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_pre)); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Post-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_post)); - $ret .= $this->end('tr'); - - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders the Content Sets table - */ - protected function renderContentSets() { - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Content Sets'); - foreach ($this->def->info_content_sets as $name => $lookup) { - $ret .= $this->heavyHeader($name); - $ret .= $this->start('tr'); - $ret .= $this->element('td', $this->listifyTagLookup($lookup)); - $ret .= $this->end('tr'); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders the Elements ($info) table - */ - protected function renderInfo() { - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Elements ($info)'); - ksort($this->def->info); - $ret .= $this->heavyHeader('Allowed tags', 2); - $ret .= $this->start('tr'); - $ret .= $this->element('td', $this->listifyTagLookup($this->def->info), array('colspan' => 2)); - $ret .= $this->end('tr'); - foreach ($this->def->info as $name => $def) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', "<$name>", array('class'=>'heavy', 'colspan' => 2)); - $ret .= $this->end('tr'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Inline content'); - $ret .= $this->element('td', $def->descendants_are_inline ? 'Yes' : 'No'); - $ret .= $this->end('tr'); - if (!empty($def->excludes)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Excludes'); - $ret .= $this->element('td', $this->listifyTagLookup($def->excludes)); - $ret .= $this->end('tr'); - } - if (!empty($def->attr_transform_pre)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Pre-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_pre)); - $ret .= $this->end('tr'); - } - if (!empty($def->attr_transform_post)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Post-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_post)); - $ret .= $this->end('tr'); - } - if (!empty($def->auto_close)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Auto closed by'); - $ret .= $this->element('td', $this->listifyTagLookup($def->auto_close)); - $ret .= $this->end('tr'); - } - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Allowed attributes'); - $ret .= $this->element('td',$this->listifyAttr($def->attr), array(), 0); - $ret .= $this->end('tr'); - - if (!empty($def->required_attr)) { - $ret .= $this->row('Required attributes', $this->listify($def->required_attr)); - } - - $ret .= $this->renderChildren($def->child); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders a row describing the allowed children of an element - * @param $def HTMLPurifier_ChildDef of pertinent element - */ - protected function renderChildren($def) { - $context = new HTMLPurifier_Context(); - $ret = ''; - $ret .= $this->start('tr'); - $elements = array(); - $attr = array(); - if (isset($def->elements)) { - if ($def->type == 'strictblockquote') { - $def->validateChildren(array(), $this->config, $context); - } - $elements = $def->elements; - } - if ($def->type == 'chameleon') { - $attr['rowspan'] = 2; - } elseif ($def->type == 'empty') { - $elements = array(); - } elseif ($def->type == 'table') { - $elements = array_flip(array('col', 'caption', 'colgroup', 'thead', - 'tfoot', 'tbody', 'tr')); - } - $ret .= $this->element('th', 'Allowed children', $attr); - - if ($def->type == 'chameleon') { - - $ret .= $this->element('td', - '<em>Block</em>: ' . - $this->escape($this->listifyTagLookup($def->block->elements)),0,0); - $ret .= $this->end('tr'); - $ret .= $this->start('tr'); - $ret .= $this->element('td', - '<em>Inline</em>: ' . - $this->escape($this->listifyTagLookup($def->inline->elements)),0,0); - - } elseif ($def->type == 'custom') { - - $ret .= $this->element('td', '<em>'.ucfirst($def->type).'</em>: ' . - $def->dtd_regex); - - } else { - $ret .= $this->element('td', - '<em>'.ucfirst($def->type).'</em>: ' . - $this->escape($this->listifyTagLookup($elements)),0,0); - } - $ret .= $this->end('tr'); - return $ret; - } - - /** - * Listifies a tag lookup table. - * @param $array Tag lookup array in form of array('tagname' => true) - */ - protected function listifyTagLookup($array) { - ksort($array); - $list = array(); - foreach ($array as $name => $discard) { - if ($name !== '#PCDATA' && !isset($this->def->info[$name])) continue; - $list[] = $name; - } - return $this->listify($list); - } - - /** - * Listifies a list of objects by retrieving class names and internal state - * @param $array List of objects - * @todo Also add information about internal state - */ - protected function listifyObjectList($array) { - ksort($array); - $list = array(); - foreach ($array as $discard => $obj) { - $list[] = $this->getClass($obj, 'AttrTransform_'); - } - return $this->listify($list); - } - - /** - * Listifies a hash of attributes to AttrDef classes - * @param $array Array hash in form of array('attrname' => HTMLPurifier_AttrDef) - */ - protected function listifyAttr($array) { - ksort($array); - $list = array(); - foreach ($array as $name => $obj) { - if ($obj === false) continue; - $list[] = "$name = <i>" . $this->getClass($obj, 'AttrDef_') . '</i>'; - } - return $this->listify($list); - } - - /** - * Creates a heavy header row - */ - protected function heavyHeader($text, $num = 1) { - $ret = ''; - $ret .= $this->start('tr'); - $ret .= $this->element('th', $text, array('colspan' => $num, 'class' => 'heavy')); - $ret .= $this->end('tr'); - return $ret; - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer +{ + + /** + * @type HTMLPurifier_HTMLDefinition, for easy access + */ + protected $def; + + /** + * @param HTMLPurifier_Config $config + * @return string + */ + public function render($config) + { + $ret = ''; + $this->config =& $config; + + $this->def = $config->getHTMLDefinition(); + + $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); + + $ret .= $this->renderDoctype(); + $ret .= $this->renderEnvironment(); + $ret .= $this->renderContentSets(); + $ret .= $this->renderInfo(); + + $ret .= $this->end('div'); + + return $ret; + } + + /** + * Renders the Doctype table + * @return string + */ + protected function renderDoctype() + { + $doctype = $this->def->doctype; + $ret = ''; + $ret .= $this->start('table'); + $ret .= $this->element('caption', 'Doctype'); + $ret .= $this->row('Name', $doctype->name); + $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No'); + $ret .= $this->row('Default Modules', implode($doctype->modules, ', ')); + $ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', ')); + $ret .= $this->end('table'); + return $ret; + } + + + /** + * Renders environment table, which is miscellaneous info + * @return string + */ + protected function renderEnvironment() + { + $def = $this->def; + + $ret = ''; + + $ret .= $this->start('table'); + $ret .= $this->element('caption', 'Environment'); + + $ret .= $this->row('Parent of fragment', $def->info_parent); + $ret .= $this->renderChildren($def->info_parent_def->child); + $ret .= $this->row('Block wrap name', $def->info_block_wrapper); + + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Global attributes'); + $ret .= $this->element('td', $this->listifyAttr($def->info_global_attr), null, 0); + $ret .= $this->end('tr'); + + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Tag transforms'); + $list = array(); + foreach ($def->info_tag_transform as $old => $new) { + $new = $this->getClass($new, 'TagTransform_'); + $list[] = "<$old> with $new"; + } + $ret .= $this->element('td', $this->listify($list)); + $ret .= $this->end('tr'); + + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Pre-AttrTransform'); + $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_pre)); + $ret .= $this->end('tr'); + + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Post-AttrTransform'); + $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_post)); + $ret .= $this->end('tr'); + + $ret .= $this->end('table'); + return $ret; + } + + /** + * Renders the Content Sets table + * @return string + */ + protected function renderContentSets() + { + $ret = ''; + $ret .= $this->start('table'); + $ret .= $this->element('caption', 'Content Sets'); + foreach ($this->def->info_content_sets as $name => $lookup) { + $ret .= $this->heavyHeader($name); + $ret .= $this->start('tr'); + $ret .= $this->element('td', $this->listifyTagLookup($lookup)); + $ret .= $this->end('tr'); + } + $ret .= $this->end('table'); + return $ret; + } + + /** + * Renders the Elements ($info) table + * @return string + */ + protected function renderInfo() + { + $ret = ''; + $ret .= $this->start('table'); + $ret .= $this->element('caption', 'Elements ($info)'); + ksort($this->def->info); + $ret .= $this->heavyHeader('Allowed tags', 2); + $ret .= $this->start('tr'); + $ret .= $this->element('td', $this->listifyTagLookup($this->def->info), array('colspan' => 2)); + $ret .= $this->end('tr'); + foreach ($this->def->info as $name => $def) { + $ret .= $this->start('tr'); + $ret .= $this->element('th', "<$name>", array('class' => 'heavy', 'colspan' => 2)); + $ret .= $this->end('tr'); + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Inline content'); + $ret .= $this->element('td', $def->descendants_are_inline ? 'Yes' : 'No'); + $ret .= $this->end('tr'); + if (!empty($def->excludes)) { + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Excludes'); + $ret .= $this->element('td', $this->listifyTagLookup($def->excludes)); + $ret .= $this->end('tr'); + } + if (!empty($def->attr_transform_pre)) { + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Pre-AttrTransform'); + $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_pre)); + $ret .= $this->end('tr'); + } + if (!empty($def->attr_transform_post)) { + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Post-AttrTransform'); + $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_post)); + $ret .= $this->end('tr'); + } + if (!empty($def->auto_close)) { + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Auto closed by'); + $ret .= $this->element('td', $this->listifyTagLookup($def->auto_close)); + $ret .= $this->end('tr'); + } + $ret .= $this->start('tr'); + $ret .= $this->element('th', 'Allowed attributes'); + $ret .= $this->element('td', $this->listifyAttr($def->attr), array(), 0); + $ret .= $this->end('tr'); + + if (!empty($def->required_attr)) { + $ret .= $this->row('Required attributes', $this->listify($def->required_attr)); + } + + $ret .= $this->renderChildren($def->child); + } + $ret .= $this->end('table'); + return $ret; + } + + /** + * Renders a row describing the allowed children of an element + * @param HTMLPurifier_ChildDef $def HTMLPurifier_ChildDef of pertinent element + * @return string + */ + protected function renderChildren($def) + { + $context = new HTMLPurifier_Context(); + $ret = ''; + $ret .= $this->start('tr'); + $elements = array(); + $attr = array(); + if (isset($def->elements)) { + if ($def->type == 'strictblockquote') { + $def->validateChildren(array(), $this->config, $context); + } + $elements = $def->elements; + } + if ($def->type == 'chameleon') { + $attr['rowspan'] = 2; + } elseif ($def->type == 'empty') { + $elements = array(); + } elseif ($def->type == 'table') { + $elements = array_flip( + array( + 'col', + 'caption', + 'colgroup', + 'thead', + 'tfoot', + 'tbody', + 'tr' + ) + ); + } + $ret .= $this->element('th', 'Allowed children', $attr); + + if ($def->type == 'chameleon') { + + $ret .= $this->element( + 'td', + '<em>Block</em>: ' . + $this->escape($this->listifyTagLookup($def->block->elements)), + null, + 0 + ); + $ret .= $this->end('tr'); + $ret .= $this->start('tr'); + $ret .= $this->element( + 'td', + '<em>Inline</em>: ' . + $this->escape($this->listifyTagLookup($def->inline->elements)), + null, + 0 + ); + + } elseif ($def->type == 'custom') { + + $ret .= $this->element( + 'td', + '<em>' . ucfirst($def->type) . '</em>: ' . + $def->dtd_regex + ); + + } else { + $ret .= $this->element( + 'td', + '<em>' . ucfirst($def->type) . '</em>: ' . + $this->escape($this->listifyTagLookup($elements)), + null, + 0 + ); + } + $ret .= $this->end('tr'); + return $ret; + } + + /** + * Listifies a tag lookup table. + * @param array $array Tag lookup array in form of array('tagname' => true) + * @return string + */ + protected function listifyTagLookup($array) + { + ksort($array); + $list = array(); + foreach ($array as $name => $discard) { + if ($name !== '#PCDATA' && !isset($this->def->info[$name])) { + continue; + } + $list[] = $name; + } + return $this->listify($list); + } + + /** + * Listifies a list of objects by retrieving class names and internal state + * @param array $array List of objects + * @return string + * @todo Also add information about internal state + */ + protected function listifyObjectList($array) + { + ksort($array); + $list = array(); + foreach ($array as $obj) { + $list[] = $this->getClass($obj, 'AttrTransform_'); + } + return $this->listify($list); + } + + /** + * Listifies a hash of attributes to AttrDef classes + * @param array $array Array hash in form of array('attrname' => HTMLPurifier_AttrDef) + * @return string + */ + protected function listifyAttr($array) + { + ksort($array); + $list = array(); + foreach ($array as $name => $obj) { + if ($obj === false) { + continue; + } + $list[] = "$name = <i>" . $this->getClass($obj, 'AttrDef_') . '</i>'; + } + return $this->listify($list); + } + + /** + * Creates a heavy header row + * @param string $text + * @param int $num + * @return string + */ + protected function heavyHeader($text, $num = 1) + { + $ret = ''; + $ret .= $this->start('tr'); + $ret .= $this->element('th', $text, array('colspan' => $num, 'class' => 'heavy')); + $ret .= $this->end('tr'); + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/PropertyList.php b/libraries/htmlpurifier410/library/HTMLPurifier/PropertyList.php new file mode 100644 index 0000000000000000000000000000000000000000..d27fd53ec1a4a7c265672c2d9564fc2dd401c4be --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/PropertyList.php @@ -0,0 +1,122 @@ +<?php + +/** + * Generic property list implementation + */ +class HTMLPurifier_PropertyList +{ + /** + * Internal data-structure for properties. + * @type array + */ + protected $data = array(); + + /** + * Parent plist. + * @type HTMLPurifier_PropertyList + */ + protected $parent; + + /** + * Cache. + * @type array + */ + protected $cache; + + /** + * @param HTMLPurifier_PropertyList $parent Parent plist + */ + public function __construct($parent = null) + { + $this->parent = $parent; + } + + /** + * Recursively retrieves the value for a key + * @param string $name + * @throws HTMLPurifier_Exception + */ + public function get($name) + { + if ($this->has($name)) { + return $this->data[$name]; + } + // possible performance bottleneck, convert to iterative if necessary + if ($this->parent) { + return $this->parent->get($name); + } + throw new HTMLPurifier_Exception("Key '$name' not found"); + } + + /** + * Sets the value of a key, for this plist + * @param string $name + * @param mixed $value + */ + public function set($name, $value) + { + $this->data[$name] = $value; + } + + /** + * Returns true if a given key exists + * @param string $name + * @return bool + */ + public function has($name) + { + return array_key_exists($name, $this->data); + } + + /** + * Resets a value to the value of it's parent, usually the default. If + * no value is specified, the entire plist is reset. + * @param string $name + */ + public function reset($name = null) + { + if ($name == null) { + $this->data = array(); + } else { + unset($this->data[$name]); + } + } + + /** + * Squashes this property list and all of its property lists into a single + * array, and returns the array. This value is cached by default. + * @param bool $force If true, ignores the cache and regenerates the array. + * @return array + */ + public function squash($force = false) + { + if ($this->cache !== null && !$force) { + return $this->cache; + } + if ($this->parent) { + return $this->cache = array_merge($this->parent->squash($force), $this->data); + } else { + return $this->cache = $this->data; + } + } + + /** + * Returns the parent plist. + * @return HTMLPurifier_PropertyList + */ + public function getParent() + { + return $this->parent; + } + + /** + * Sets the parent plist. + * @param HTMLPurifier_PropertyList $plist Parent plist + */ + public function setParent($plist) + { + $this->parent = $plist; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php b/libraries/htmlpurifier410/library/HTMLPurifier/PropertyListIterator.php similarity index 57% rename from libraries/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php rename to libraries/htmlpurifier410/library/HTMLPurifier/PropertyListIterator.php index 8f250443e41f0aa6c0f468cf825a2c94e743a350..1e707e2ae3e78643ed0fbf1f28f6361c4af97aa3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/PropertyListIterator.php @@ -1,32 +1,42 @@ -<?php - -/** - * Property list iterator. Do not instantiate this class directly. - */ -class HTMLPurifier_PropertyListIterator extends FilterIterator -{ - - protected $l; - protected $filter; - - /** - * @param $data Array of data to iterate over - * @param $filter Optional prefix to only allow values of - */ - public function __construct(Iterator $iterator, $filter = null) { - parent::__construct($iterator); - $this->l = strlen($filter); - $this->filter = $filter; - } - - public function accept() { - $key = $this->getInnerIterator()->key(); - if( strncmp($key, $this->filter, $this->l) !== 0 ) { - return false; - } - return true; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Property list iterator. Do not instantiate this class directly. + */ +class HTMLPurifier_PropertyListIterator extends FilterIterator +{ + + /** + * @type int + */ + protected $l; + /** + * @type string + */ + protected $filter; + + /** + * @param Iterator $iterator Array of data to iterate over + * @param string $filter Optional prefix to only allow values of + */ + public function __construct(Iterator $iterator, $filter = null) + { + parent::__construct($iterator); + $this->l = strlen($filter); + $this->filter = $filter; + } + + /** + * @return bool + */ + public function accept() + { + $key = $this->getInnerIterator()->key(); + if (strncmp($key, $this->filter, $this->l) !== 0) { + return false; + } + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Queue.php b/libraries/htmlpurifier410/library/HTMLPurifier/Queue.php new file mode 100644 index 0000000000000000000000000000000000000000..a75894d45119eb942cdf53e9624234ce772f49ef --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Queue.php @@ -0,0 +1,56 @@ +<?php + +/** + * A simple array-backed queue, based off of the classic Okasaki + * persistent amortized queue. The basic idea is to maintain two + * stacks: an input stack and an output stack. When the output + * stack runs out, reverse the input stack and use it as the output + * stack. + * + * We don't use the SPL implementation because it's only supported + * on PHP 5.3 and later. + * + * Exercise: Prove that push/pop on this queue take amortized O(1) time. + * + * Exercise: Extend this queue to be a deque, while preserving amortized + * O(1) time. Some care must be taken on rebalancing to avoid quadratic + * behaviour caused by repeatedly shuffling data from the input stack + * to the output stack and back. + */ +class HTMLPurifier_Queue { + private $input; + private $output; + + public function __construct($input = array()) { + $this->input = $input; + $this->output = array(); + } + + /** + * Shifts an element off the front of the queue. + */ + public function shift() { + if (empty($this->output)) { + $this->output = array_reverse($this->input); + $this->input = array(); + } + if (empty($this->output)) { + return NULL; + } + return array_pop($this->output); + } + + /** + * Pushes an element onto the front of the queue. + */ + public function push($x) { + array_push($this->input, $x); + } + + /** + * Checks if it's empty. + */ + public function isEmpty() { + return empty($this->input) && empty($this->output); + } +} diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier/Strategy.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Strategy.php index 2462865210ce62d64b9d2a270fa55355708fd0aa..291eb83c93196df794afaa5c444338bb700b05b3 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy.php @@ -1,26 +1,26 @@ -<?php - -/** - * Supertype for classes that define a strategy for modifying/purifying tokens. - * - * While HTMLPurifier's core purpose is fixing HTML into something proper, - * strategies provide plug points for extra configuration or even extra - * features, such as custom tags, custom parsing of text, etc. - */ - - -abstract class HTMLPurifier_Strategy -{ - - /** - * Executes the strategy on the tokens. - * - * @param $tokens Array of HTMLPurifier_Token objects to be operated on. - * @param $config Configuration options - * @returns Processed array of token objects. - */ - abstract public function execute($tokens, $config, $context); - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Supertype for classes that define a strategy for modifying/purifying tokens. + * + * While HTMLPurifier's core purpose is fixing HTML into something proper, + * strategies provide plug points for extra configuration or even extra + * features, such as custom tags, custom parsing of text, etc. + */ + + +abstract class HTMLPurifier_Strategy +{ + + /** + * Executes the strategy on the tokens. + * + * @param HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token objects to be operated on. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] Processed array of token objects. + */ + abstract public function execute($tokens, $config, $context); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Composite.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Composite.php index 816490b7996ade532876d42861524db931c7b1b9..9de812dff714393eb1520de2d512dd844672ae30 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Composite.php @@ -1,25 +1,30 @@ -<?php - -/** - * Composite strategy that runs multiple strategies on tokens. - */ -abstract class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Strategy -{ - - /** - * List of strategies to run tokens through. - */ - protected $strategies = array(); - - abstract public function __construct(); - - public function execute($tokens, $config, $context) { - foreach ($this->strategies as $strategy) { - $tokens = $strategy->execute($tokens, $config, $context); - } - return $tokens; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Composite strategy that runs multiple strategies on tokens. + */ +abstract class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Strategy +{ + + /** + * List of strategies to run tokens through. + * @type HTMLPurifier_Strategy[] + */ + protected $strategies = array(); + + /** + * @param HTMLPurifier_Token[] $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] + */ + public function execute($tokens, $config, $context) + { + foreach ($this->strategies as $strategy) { + $tokens = $strategy->execute($tokens, $config, $context); + } + return $tokens; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/Core.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Core.php similarity index 89% rename from libraries/htmlpurifier/library/HTMLPurifier/Strategy/Core.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Core.php index d90e15860640a437e14ecfba34ba2c46fabd9d51..077521523c6043d78248ced99d0ed1bfb9aed016 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/Core.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/Core.php @@ -1,18 +1,17 @@ -<?php - -/** - * Core strategy composed of the big four strategies. - */ -class HTMLPurifier_Strategy_Core extends HTMLPurifier_Strategy_Composite -{ - - public function __construct() { - $this->strategies[] = new HTMLPurifier_Strategy_RemoveForeignElements(); - $this->strategies[] = new HTMLPurifier_Strategy_MakeWellFormed(); - $this->strategies[] = new HTMLPurifier_Strategy_FixNesting(); - $this->strategies[] = new HTMLPurifier_Strategy_ValidateAttributes(); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Core strategy composed of the big four strategies. + */ +class HTMLPurifier_Strategy_Core extends HTMLPurifier_Strategy_Composite +{ + public function __construct() + { + $this->strategies[] = new HTMLPurifier_Strategy_RemoveForeignElements(); + $this->strategies[] = new HTMLPurifier_Strategy_MakeWellFormed(); + $this->strategies[] = new HTMLPurifier_Strategy_FixNesting(); + $this->strategies[] = new HTMLPurifier_Strategy_ValidateAttributes(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/FixNesting.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/FixNesting.php new file mode 100644 index 0000000000000000000000000000000000000000..8b1eb20fb026e6927cafb31a016bf6070f180e0c --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/FixNesting.php @@ -0,0 +1,181 @@ +<?php + +/** + * Takes a well formed list of tokens and fixes their nesting. + * + * HTML elements dictate which elements are allowed to be their children, + * for example, you can't have a p tag in a span tag. Other elements have + * much more rigorous definitions: tables, for instance, require a specific + * order for their elements. There are also constraints not expressible by + * document type definitions, such as the chameleon nature of ins/del + * tags and global child exclusions. + * + * The first major objective of this strategy is to iterate through all + * the nodes and determine whether or not their children conform to the + * element's definition. If they do not, the child definition may + * optionally supply an amended list of elements that is valid or + * require that the entire node be deleted (and the previous node + * rescanned). + * + * The second objective is to ensure that explicitly excluded elements of + * an element do not appear in its children. Code that accomplishes this + * task is pervasive through the strategy, though the two are distinct tasks + * and could, theoretically, be seperated (although it's not recommended). + * + * @note Whether or not unrecognized children are silently dropped or + * translated into text depends on the child definitions. + * + * @todo Enable nodes to be bubbled out of the structure. This is + * easier with our new algorithm. + */ + +class HTMLPurifier_Strategy_FixNesting extends HTMLPurifier_Strategy +{ + + /** + * @param HTMLPurifier_Token[] $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array|HTMLPurifier_Token[] + */ + public function execute($tokens, $config, $context) + { + + //####################################################################// + // Pre-processing + + // O(n) pass to convert to a tree, so that we can efficiently + // refer to substrings + $top_node = HTMLPurifier_Arborize::arborize($tokens, $config, $context); + + // get a copy of the HTML definition + $definition = $config->getHTMLDefinition(); + + $excludes_enabled = !$config->get('Core.DisableExcludes'); + + // setup the context variable 'IsInline', for chameleon processing + // is 'false' when we are not inline, 'true' when it must always + // be inline, and an integer when it is inline for a certain + // branch of the document tree + $is_inline = $definition->info_parent_def->descendants_are_inline; + $context->register('IsInline', $is_inline); + + // setup error collector + $e =& $context->get('ErrorCollector', true); + + //####################################################################// + // Loop initialization + + // stack that contains all elements that are excluded + // it is organized by parent elements, similar to $stack, + // but it is only populated when an element with exclusions is + // processed, i.e. there won't be empty exclusions. + $exclude_stack = array($definition->info_parent_def->excludes); + + // variable that contains the start token while we are processing + // nodes. This enables error reporting to do its job + $node = $top_node; + // dummy token + list($token, $d) = $node->toTokenPair(); + $context->register('CurrentNode', $node); + $context->register('CurrentToken', $token); + + //####################################################################// + // Loop + + // We need to implement a post-order traversal iteratively, to + // avoid running into stack space limits. This is pretty tricky + // to reason about, so we just manually stack-ify the recursive + // variant: + // + // function f($node) { + // foreach ($node->children as $child) { + // f($child); + // } + // validate($node); + // } + // + // Thus, we will represent a stack frame as array($node, + // $is_inline, stack of children) + // e.g. array_reverse($node->children) - already processed + // children. + + $parent_def = $definition->info_parent_def; + $stack = array( + array($top_node, + $parent_def->descendants_are_inline, + $parent_def->excludes, // exclusions + 0) + ); + + while (!empty($stack)) { + list($node, $is_inline, $excludes, $ix) = array_pop($stack); + // recursive call + $go = false; + $def = empty($stack) ? $definition->info_parent_def : $definition->info[$node->name]; + while (isset($node->children[$ix])) { + $child = $node->children[$ix++]; + if ($child instanceof HTMLPurifier_Node_Element) { + $go = true; + $stack[] = array($node, $is_inline, $excludes, $ix); + $stack[] = array($child, + // ToDo: I don't think it matters if it's def or + // child_def, but double check this... + $is_inline || $def->descendants_are_inline, + empty($def->excludes) ? $excludes + : array_merge($excludes, $def->excludes), + 0); + break; + } + }; + if ($go) continue; + list($token, $d) = $node->toTokenPair(); + // base case + if ($excludes_enabled && isset($excludes[$node->name])) { + $node->dead = true; + if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded'); + } else { + // XXX I suppose it would be slightly more efficient to + // avoid the allocation here and have children + // strategies handle it + $children = array(); + foreach ($node->children as $child) { + if (!$child->dead) $children[] = $child; + } + $result = $def->child->validateChildren($children, $config, $context); + if ($result === true) { + // nop + $node->children = $children; + } elseif ($result === false) { + $node->dead = true; + if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node removed'); + } else { + $node->children = $result; + if ($e) { + // XXX This will miss mutations of internal nodes. Perhaps defer to the child validators + if (empty($result) && !empty($children)) { + $e->send(E_ERROR, 'Strategy_FixNesting: Node contents removed'); + } else if ($result != $children) { + $e->send(E_WARNING, 'Strategy_FixNesting: Node reorganized'); + } + } + } + } + } + + //####################################################################// + // Post-processing + + // remove context variables + $context->destroy('IsInline'); + $context->destroy('CurrentNode'); + $context->destroy('CurrentToken'); + + //####################################################################// + // Return + + return HTMLPurifier_Arborize::flatten($node, $config, $context); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/MakeWellFormed.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/MakeWellFormed.php new file mode 100644 index 0000000000000000000000000000000000000000..144122f0ed39b47a777efce34c6ea5744032a339 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/MakeWellFormed.php @@ -0,0 +1,659 @@ +<?php + +/** + * Takes tokens makes them well-formed (balance end tags, etc.) + * + * Specification of the armor attributes this strategy uses: + * + * - MakeWellFormed_TagClosedError: This armor field is used to + * suppress tag closed errors for certain tokens [TagClosedSuppress], + * in particular, if a tag was generated automatically by HTML + * Purifier, we may rely on our infrastructure to close it for us + * and shouldn't report an error to the user [TagClosedAuto]. + */ +class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy +{ + + /** + * Array stream of tokens being processed. + * @type HTMLPurifier_Token[] + */ + protected $tokens; + + /** + * Current token. + * @type HTMLPurifier_Token + */ + protected $token; + + /** + * Zipper managing the true state. + * @type HTMLPurifier_Zipper + */ + protected $zipper; + + /** + * Current nesting of elements. + * @type array + */ + protected $stack; + + /** + * Injectors active in this stream processing. + * @type HTMLPurifier_Injector[] + */ + protected $injectors; + + /** + * Current instance of HTMLPurifier_Config. + * @type HTMLPurifier_Config + */ + protected $config; + + /** + * Current instance of HTMLPurifier_Context. + * @type HTMLPurifier_Context + */ + protected $context; + + /** + * @param HTMLPurifier_Token[] $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] + * @throws HTMLPurifier_Exception + */ + public function execute($tokens, $config, $context) + { + $definition = $config->getHTMLDefinition(); + + // local variables + $generator = new HTMLPurifier_Generator($config, $context); + $escape_invalid_tags = $config->get('Core.EscapeInvalidTags'); + // used for autoclose early abortion + $global_parent_allowed_elements = $definition->info_parent_def->child->getAllowedElements($config); + $e = $context->get('ErrorCollector', true); + $i = false; // injector index + list($zipper, $token) = HTMLPurifier_Zipper::fromArray($tokens); + if ($token === NULL) { + return array(); + } + $reprocess = false; // whether or not to reprocess the same token + $stack = array(); + + // member variables + $this->stack =& $stack; + $this->tokens =& $tokens; + $this->token =& $token; + $this->zipper =& $zipper; + $this->config = $config; + $this->context = $context; + + // context variables + $context->register('CurrentNesting', $stack); + $context->register('InputZipper', $zipper); + $context->register('CurrentToken', $token); + + // -- begin INJECTOR -- + + $this->injectors = array(); + + $injectors = $config->getBatch('AutoFormat'); + $def_injectors = $definition->info_injector; + $custom_injectors = $injectors['Custom']; + unset($injectors['Custom']); // special case + foreach ($injectors as $injector => $b) { + // XXX: Fix with a legitimate lookup table of enabled filters + if (strpos($injector, '.') !== false) { + continue; + } + $injector = "HTMLPurifier_Injector_$injector"; + if (!$b) { + continue; + } + $this->injectors[] = new $injector; + } + foreach ($def_injectors as $injector) { + // assumed to be objects + $this->injectors[] = $injector; + } + foreach ($custom_injectors as $injector) { + if (!$injector) { + continue; + } + if (is_string($injector)) { + $injector = "HTMLPurifier_Injector_$injector"; + $injector = new $injector; + } + $this->injectors[] = $injector; + } + + // give the injectors references to the definition and context + // variables for performance reasons + foreach ($this->injectors as $ix => $injector) { + $error = $injector->prepare($config, $context); + if (!$error) { + continue; + } + array_splice($this->injectors, $ix, 1); // rm the injector + trigger_error("Cannot enable {$injector->name} injector because $error is not allowed", E_USER_WARNING); + } + + // -- end INJECTOR -- + + // a note on reprocessing: + // In order to reduce code duplication, whenever some code needs + // to make HTML changes in order to make things "correct", the + // new HTML gets sent through the purifier, regardless of its + // status. This means that if we add a start token, because it + // was totally necessary, we don't have to update nesting; we just + // punt ($reprocess = true; continue;) and it does that for us. + + // isset is in loop because $tokens size changes during loop exec + for (;; + // only increment if we don't need to reprocess + $reprocess ? $reprocess = false : $token = $zipper->next($token)) { + + // check for a rewind + if (is_int($i)) { + // possibility: disable rewinding if the current token has a + // rewind set on it already. This would offer protection from + // infinite loop, but might hinder some advanced rewinding. + $rewind_offset = $this->injectors[$i]->getRewindOffset(); + if (is_int($rewind_offset)) { + for ($j = 0; $j < $rewind_offset; $j++) { + if (empty($zipper->front)) break; + $token = $zipper->prev($token); + // indicate that other injectors should not process this token, + // but we need to reprocess it. See Note [Injector skips] + unset($token->skip[$i]); + $token->rewind = $i; + if ($token instanceof HTMLPurifier_Token_Start) { + array_pop($this->stack); + } elseif ($token instanceof HTMLPurifier_Token_End) { + $this->stack[] = $token->start; + } + } + } + $i = false; + } + + // handle case of document end + if ($token === NULL) { + // kill processing if stack is empty + if (empty($this->stack)) { + break; + } + + // peek + $top_nesting = array_pop($this->stack); + $this->stack[] = $top_nesting; + + // send error [TagClosedSuppress] + if ($e && !isset($top_nesting->armor['MakeWellFormed_TagClosedError'])) { + $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by document end', $top_nesting); + } + + // append, don't splice, since this is the end + $token = new HTMLPurifier_Token_End($top_nesting->name); + + // punt! + $reprocess = true; + continue; + } + + //echo '<br>'; printZipper($zipper, $token);//printTokens($this->stack); + //flush(); + + // quick-check: if it's not a tag, no need to process + if (empty($token->is_tag)) { + if ($token instanceof HTMLPurifier_Token_Text) { + foreach ($this->injectors as $i => $injector) { + if (isset($token->skip[$i])) { + // See Note [Injector skips] + continue; + } + if ($token->rewind !== null && $token->rewind !== $i) { + continue; + } + // XXX fuckup + $r = $token; + $injector->handleText($r); + $token = $this->processToken($r, $i); + $reprocess = true; + break; + } + } + // another possibility is a comment + continue; + } + + if (isset($definition->info[$token->name])) { + $type = $definition->info[$token->name]->child->type; + } else { + $type = false; // Type is unknown, treat accordingly + } + + // quick tag checks: anything that's *not* an end tag + $ok = false; + if ($type === 'empty' && $token instanceof HTMLPurifier_Token_Start) { + // claims to be a start tag but is empty + $token = new HTMLPurifier_Token_Empty( + $token->name, + $token->attr, + $token->line, + $token->col, + $token->armor + ); + $ok = true; + } elseif ($type && $type !== 'empty' && $token instanceof HTMLPurifier_Token_Empty) { + // claims to be empty but really is a start tag + // NB: this assignment is required + $old_token = $token; + $token = new HTMLPurifier_Token_End($token->name); + $token = $this->insertBefore( + new HTMLPurifier_Token_Start($old_token->name, $old_token->attr, $old_token->line, $old_token->col, $old_token->armor) + ); + // punt (since we had to modify the input stream in a non-trivial way) + $reprocess = true; + continue; + } elseif ($token instanceof HTMLPurifier_Token_Empty) { + // real empty token + $ok = true; + } elseif ($token instanceof HTMLPurifier_Token_Start) { + // start tag + + // ...unless they also have to close their parent + if (!empty($this->stack)) { + + // Performance note: you might think that it's rather + // inefficient, recalculating the autoclose information + // for every tag that a token closes (since when we + // do an autoclose, we push a new token into the + // stream and then /process/ that, before + // re-processing this token.) But this is + // necessary, because an injector can make an + // arbitrary transformations to the autoclosing + // tokens we introduce, so things may have changed + // in the meantime. Also, doing the inefficient thing is + // "easy" to reason about (for certain perverse definitions + // of "easy") + + $parent = array_pop($this->stack); + $this->stack[] = $parent; + + $parent_def = null; + $parent_elements = null; + $autoclose = false; + if (isset($definition->info[$parent->name])) { + $parent_def = $definition->info[$parent->name]; + $parent_elements = $parent_def->child->getAllowedElements($config); + $autoclose = !isset($parent_elements[$token->name]); + } + + if ($autoclose && $definition->info[$token->name]->wrap) { + // Check if an element can be wrapped by another + // element to make it valid in a context (for + // example, <ul><ul> needs a <li> in between) + $wrapname = $definition->info[$token->name]->wrap; + $wrapdef = $definition->info[$wrapname]; + $elements = $wrapdef->child->getAllowedElements($config); + if (isset($elements[$token->name]) && isset($parent_elements[$wrapname])) { + $newtoken = new HTMLPurifier_Token_Start($wrapname); + $token = $this->insertBefore($newtoken); + $reprocess = true; + continue; + } + } + + $carryover = false; + if ($autoclose && $parent_def->formatting) { + $carryover = true; + } + + if ($autoclose) { + // check if this autoclose is doomed to fail + // (this rechecks $parent, which his harmless) + $autoclose_ok = isset($global_parent_allowed_elements[$token->name]); + if (!$autoclose_ok) { + foreach ($this->stack as $ancestor) { + $elements = $definition->info[$ancestor->name]->child->getAllowedElements($config); + if (isset($elements[$token->name])) { + $autoclose_ok = true; + break; + } + if ($definition->info[$token->name]->wrap) { + $wrapname = $definition->info[$token->name]->wrap; + $wrapdef = $definition->info[$wrapname]; + $wrap_elements = $wrapdef->child->getAllowedElements($config); + if (isset($wrap_elements[$token->name]) && isset($elements[$wrapname])) { + $autoclose_ok = true; + break; + } + } + } + } + if ($autoclose_ok) { + // errors need to be updated + $new_token = new HTMLPurifier_Token_End($parent->name); + $new_token->start = $parent; + // [TagClosedSuppress] + if ($e && !isset($parent->armor['MakeWellFormed_TagClosedError'])) { + if (!$carryover) { + $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag auto closed', $parent); + } else { + $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag carryover', $parent); + } + } + if ($carryover) { + $element = clone $parent; + // [TagClosedAuto] + $element->armor['MakeWellFormed_TagClosedError'] = true; + $element->carryover = true; + $token = $this->processToken(array($new_token, $token, $element)); + } else { + $token = $this->insertBefore($new_token); + } + } else { + $token = $this->remove(); + } + $reprocess = true; + continue; + } + + } + $ok = true; + } + + if ($ok) { + foreach ($this->injectors as $i => $injector) { + if (isset($token->skip[$i])) { + // See Note [Injector skips] + continue; + } + if ($token->rewind !== null && $token->rewind !== $i) { + continue; + } + $r = $token; + $injector->handleElement($r); + $token = $this->processToken($r, $i); + $reprocess = true; + break; + } + if (!$reprocess) { + // ah, nothing interesting happened; do normal processing + if ($token instanceof HTMLPurifier_Token_Start) { + $this->stack[] = $token; + } elseif ($token instanceof HTMLPurifier_Token_End) { + throw new HTMLPurifier_Exception( + 'Improper handling of end tag in start code; possible error in MakeWellFormed' + ); + } + } + continue; + } + + // sanity check: we should be dealing with a closing tag + if (!$token instanceof HTMLPurifier_Token_End) { + throw new HTMLPurifier_Exception('Unaccounted for tag token in input stream, bug in HTML Purifier'); + } + + // make sure that we have something open + if (empty($this->stack)) { + if ($escape_invalid_tags) { + if ($e) { + $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag to text'); + } + $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token)); + } else { + if ($e) { + $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag removed'); + } + $token = $this->remove(); + } + $reprocess = true; + continue; + } + + // first, check for the simplest case: everything closes neatly. + // Eventually, everything passes through here; if there are problems + // we modify the input stream accordingly and then punt, so that + // the tokens get processed again. + $current_parent = array_pop($this->stack); + if ($current_parent->name == $token->name) { + $token->start = $current_parent; + foreach ($this->injectors as $i => $injector) { + if (isset($token->skip[$i])) { + // See Note [Injector skips] + continue; + } + if ($token->rewind !== null && $token->rewind !== $i) { + continue; + } + $r = $token; + $injector->handleEnd($r); + $token = $this->processToken($r, $i); + $this->stack[] = $current_parent; + $reprocess = true; + break; + } + continue; + } + + // okay, so we're trying to close the wrong tag + + // undo the pop previous pop + $this->stack[] = $current_parent; + + // scroll back the entire nest, trying to find our tag. + // (feature could be to specify how far you'd like to go) + $size = count($this->stack); + // -2 because -1 is the last element, but we already checked that + $skipped_tags = false; + for ($j = $size - 2; $j >= 0; $j--) { + if ($this->stack[$j]->name == $token->name) { + $skipped_tags = array_slice($this->stack, $j); + break; + } + } + + // we didn't find the tag, so remove + if ($skipped_tags === false) { + if ($escape_invalid_tags) { + if ($e) { + $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag to text'); + } + $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token)); + } else { + if ($e) { + $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag removed'); + } + $token = $this->remove(); + } + $reprocess = true; + continue; + } + + // do errors, in REVERSE $j order: a,b,c with </a></b></c> + $c = count($skipped_tags); + if ($e) { + for ($j = $c - 1; $j > 0; $j--) { + // notice we exclude $j == 0, i.e. the current ending tag, from + // the errors... [TagClosedSuppress] + if (!isset($skipped_tags[$j]->armor['MakeWellFormed_TagClosedError'])) { + $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by element end', $skipped_tags[$j]); + } + } + } + + // insert tags, in FORWARD $j order: c,b,a with </a></b></c> + $replace = array($token); + for ($j = 1; $j < $c; $j++) { + // ...as well as from the insertions + $new_token = new HTMLPurifier_Token_End($skipped_tags[$j]->name); + $new_token->start = $skipped_tags[$j]; + array_unshift($replace, $new_token); + if (isset($definition->info[$new_token->name]) && $definition->info[$new_token->name]->formatting) { + // [TagClosedAuto] + $element = clone $skipped_tags[$j]; + $element->carryover = true; + $element->armor['MakeWellFormed_TagClosedError'] = true; + $replace[] = $element; + } + } + $token = $this->processToken($replace); + $reprocess = true; + continue; + } + + $context->destroy('CurrentToken'); + $context->destroy('CurrentNesting'); + $context->destroy('InputZipper'); + + unset($this->injectors, $this->stack, $this->tokens); + return $zipper->toArray($token); + } + + /** + * Processes arbitrary token values for complicated substitution patterns. + * In general: + * + * If $token is an array, it is a list of tokens to substitute for the + * current token. These tokens then get individually processed. If there + * is a leading integer in the list, that integer determines how many + * tokens from the stream should be removed. + * + * If $token is a regular token, it is swapped with the current token. + * + * If $token is false, the current token is deleted. + * + * If $token is an integer, that number of tokens (with the first token + * being the current one) will be deleted. + * + * @param HTMLPurifier_Token|array|int|bool $token Token substitution value + * @param HTMLPurifier_Injector|int $injector Injector that performed the substitution; default is if + * this is not an injector related operation. + * @throws HTMLPurifier_Exception + */ + protected function processToken($token, $injector = -1) + { + // Zend OpCache miscompiles $token = array($token), so + // avoid this pattern. See: https://github.com/ezyang/htmlpurifier/issues/108 + + // normalize forms of token + if (is_object($token)) { + $tmp = $token; + $token = array(1, $tmp); + } + if (is_int($token)) { + $tmp = $token; + $token = array($tmp); + } + if ($token === false) { + $token = array(1); + } + if (!is_array($token)) { + throw new HTMLPurifier_Exception('Invalid token type from injector'); + } + if (!is_int($token[0])) { + array_unshift($token, 1); + } + if ($token[0] === 0) { + throw new HTMLPurifier_Exception('Deleting zero tokens is not valid'); + } + + // $token is now an array with the following form: + // array(number nodes to delete, new node 1, new node 2, ...) + + $delete = array_shift($token); + list($old, $r) = $this->zipper->splice($this->token, $delete, $token); + + if ($injector > -1) { + // See Note [Injector skips] + // Determine appropriate skips. Here's what the code does: + // *If* we deleted one or more tokens, copy the skips + // of those tokens into the skips of the new tokens (in $token). + // Also, mark the newly inserted tokens as having come from + // $injector. + $oldskip = isset($old[0]) ? $old[0]->skip : array(); + foreach ($token as $object) { + $object->skip = $oldskip; + $object->skip[$injector] = true; + } + } + + return $r; + + } + + /** + * Inserts a token before the current token. Cursor now points to + * this token. You must reprocess after this. + * @param HTMLPurifier_Token $token + */ + private function insertBefore($token) + { + // NB not $this->zipper->insertBefore(), due to positioning + // differences + $splice = $this->zipper->splice($this->token, 0, array($token)); + + return $splice[1]; + } + + /** + * Removes current token. Cursor now points to new token occupying previously + * occupied space. You must reprocess after this. + */ + private function remove() + { + return $this->zipper->delete(); + } +} + +// Note [Injector skips] +// ~~~~~~~~~~~~~~~~~~~~~ +// When I originally designed this class, the idea behind the 'skip' +// property of HTMLPurifier_Token was to help avoid infinite loops +// in injector processing. For example, suppose you wrote an injector +// that bolded swear words. Naively, you might write it so that +// whenever you saw ****, you replaced it with <strong>****</strong>. +// +// When this happens, we will reprocess all of the tokens with the +// other injectors. Now there is an opportunity for infinite loop: +// if we rerun the swear-word injector on these tokens, we might +// see **** and then reprocess again to get +// <strong><strong>****</strong></strong> ad infinitum. +// +// Thus, the idea of a skip is that once we process a token with +// an injector, we mark all of those tokens as having "come from" +// the injector, and we never run the injector again on these +// tokens. +// +// There were two more complications, however: +// +// - With HTMLPurifier_Injector_RemoveEmpty, we noticed that if +// you had <b><i></i></b>, after you removed the <i></i>, you +// really would like this injector to go back and reprocess +// the <b> tag, discovering that it is now empty and can be +// removed. So we reintroduced the possibility of infinite looping +// by adding a "rewind" function, which let you go back to an +// earlier point in the token stream and reprocess it with injectors. +// Needless to say, we need to UN-skip the token so it gets +// reprocessed. +// +// - Suppose that you successfuly process a token, replace it with +// one with your skip mark, but now another injector wants to +// process the skipped token with another token. Should you continue +// to skip that new token, or reprocess it? If you reprocess, +// you can end up with an infinite loop where one injector converts +// <a> to <b>, and then another injector converts it back. So +// we inherit the skips, but for some reason, I thought that we +// should inherit the skip from the first token of the token +// that we deleted. Why? Well, it seems to work OK. +// +// If I were to redesign this functionality, I would absolutely not +// go about doing it this way: the semantics are just not very well +// defined, and in any case you probably wanted to operate on trees, +// not token streams. + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/RemoveForeignElements.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Strategy/RemoveForeignElements.php index d30e456db3337a16d136e505c2aeeb67414764b9..d1adf59f2f1edad2f19c15d6acc28ccde29e0186 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/RemoveForeignElements.php @@ -1,171 +1,207 @@ -<?php - -/** - * Removes all unrecognized tags from the list of tokens. - * - * This strategy iterates through all the tokens and removes unrecognized - * tokens. If a token is not recognized but a TagTransform is defined for - * that element, the element will be transformed accordingly. - */ - -class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy -{ - - public function execute($tokens, $config, $context) { - $definition = $config->getHTMLDefinition(); - $generator = new HTMLPurifier_Generator($config, $context); - $result = array(); - - $escape_invalid_tags = $config->get('Core', 'EscapeInvalidTags'); - $remove_invalid_img = $config->get('Core', 'RemoveInvalidImg'); - - // currently only used to determine if comments should be kept - $trusted = $config->get('HTML', 'Trusted'); - - $remove_script_contents = $config->get('Core', 'RemoveScriptContents'); - $hidden_elements = $config->get('Core', 'HiddenElements'); - - // remove script contents compatibility - if ($remove_script_contents === true) { - $hidden_elements['script'] = true; - } elseif ($remove_script_contents === false && isset($hidden_elements['script'])) { - unset($hidden_elements['script']); - } - - $attr_validator = new HTMLPurifier_AttrValidator(); - - // removes tokens until it reaches a closing tag with its value - $remove_until = false; - - // converts comments into text tokens when this is equal to a tag name - $textify_comments = false; - - $token = false; - $context->register('CurrentToken', $token); - - $e = false; - if ($config->get('Core', 'CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - foreach($tokens as $token) { - if ($remove_until) { - if (empty($token->is_tag) || $token->name !== $remove_until) { - continue; - } - } - if (!empty( $token->is_tag )) { - // DEFINITION CALL - - // before any processing, try to transform the element - if ( - isset($definition->info_tag_transform[$token->name]) - ) { - $original_name = $token->name; - // there is a transformation for this tag - // DEFINITION CALL - $token = $definition-> - info_tag_transform[$token->name]-> - transform($token, $config, $context); - if ($e) $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Tag transform', $original_name); - } - - if (isset($definition->info[$token->name])) { - - // mostly everything's good, but - // we need to make sure required attributes are in order - if ( - ($token instanceof HTMLPurifier_Token_Start || $token instanceof HTMLPurifier_Token_Empty) && - $definition->info[$token->name]->required_attr && - ($token->name != 'img' || $remove_invalid_img) // ensure config option still works - ) { - $attr_validator->validateToken($token, $config, $context); - $ok = true; - foreach ($definition->info[$token->name]->required_attr as $name) { - if (!isset($token->attr[$name])) { - $ok = false; - break; - } - } - if (!$ok) { - if ($e) $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Missing required attribute', $name); - continue; - } - $token->armor['ValidateAttributes'] = true; - } - - if (isset($hidden_elements[$token->name]) && $token instanceof HTMLPurifier_Token_Start) { - $textify_comments = $token->name; - } elseif ($token->name === $textify_comments && $token instanceof HTMLPurifier_Token_End) { - $textify_comments = false; - } - - } elseif ($escape_invalid_tags) { - // invalid tag, generate HTML representation and insert in - if ($e) $e->send(E_WARNING, 'Strategy_RemoveForeignElements: Foreign element to text'); - $token = new HTMLPurifier_Token_Text( - $generator->generateFromToken($token) - ); - } else { - // check if we need to destroy all of the tag's children - // CAN BE GENERICIZED - if (isset($hidden_elements[$token->name])) { - if ($token instanceof HTMLPurifier_Token_Start) { - $remove_until = $token->name; - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - // do nothing: we're still looking - } else { - $remove_until = false; - } - if ($e) $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign meta element removed'); - } else { - if ($e) $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign element removed'); - } - continue; - } - } elseif ($token instanceof HTMLPurifier_Token_Comment) { - // textify comments in script tags when they are allowed - if ($textify_comments !== false) { - $data = $token->data; - $token = new HTMLPurifier_Token_Text($data); - } elseif ($trusted) { - // keep, but perform comment cleaning - if ($e) { - // perform check whether or not there's a trailing hyphen - if (substr($token->data, -1) == '-') { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Trailing hyphen in comment removed'); - } - } - $token->data = rtrim($token->data, '-'); - $found_double_hyphen = false; - while (strpos($token->data, '--') !== false) { - if ($e && !$found_double_hyphen) { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Hyphens in comment collapsed'); - } - $found_double_hyphen = true; // prevent double-erroring - $token->data = str_replace('--', '-', $token->data); - } - } else { - // strip comments - if ($e) $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); - continue; - } - } elseif ($token instanceof HTMLPurifier_Token_Text) { - } else { - continue; - } - $result[] = $token; - } - if ($remove_until && $e) { - // we removed tokens until the end, throw error - $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Token removed to end', $remove_until); - } - - $context->destroy('CurrentToken'); - - return $result; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Removes all unrecognized tags from the list of tokens. + * + * This strategy iterates through all the tokens and removes unrecognized + * tokens. If a token is not recognized but a TagTransform is defined for + * that element, the element will be transformed accordingly. + */ + +class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy +{ + + /** + * @param HTMLPurifier_Token[] $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return array|HTMLPurifier_Token[] + */ + public function execute($tokens, $config, $context) + { + $definition = $config->getHTMLDefinition(); + $generator = new HTMLPurifier_Generator($config, $context); + $result = array(); + + $escape_invalid_tags = $config->get('Core.EscapeInvalidTags'); + $remove_invalid_img = $config->get('Core.RemoveInvalidImg'); + + // currently only used to determine if comments should be kept + $trusted = $config->get('HTML.Trusted'); + $comment_lookup = $config->get('HTML.AllowedComments'); + $comment_regexp = $config->get('HTML.AllowedCommentsRegexp'); + $check_comments = $comment_lookup !== array() || $comment_regexp !== null; + + $remove_script_contents = $config->get('Core.RemoveScriptContents'); + $hidden_elements = $config->get('Core.HiddenElements'); + + // remove script contents compatibility + if ($remove_script_contents === true) { + $hidden_elements['script'] = true; + } elseif ($remove_script_contents === false && isset($hidden_elements['script'])) { + unset($hidden_elements['script']); + } + + $attr_validator = new HTMLPurifier_AttrValidator(); + + // removes tokens until it reaches a closing tag with its value + $remove_until = false; + + // converts comments into text tokens when this is equal to a tag name + $textify_comments = false; + + $token = false; + $context->register('CurrentToken', $token); + + $e = false; + if ($config->get('Core.CollectErrors')) { + $e =& $context->get('ErrorCollector'); + } + + foreach ($tokens as $token) { + if ($remove_until) { + if (empty($token->is_tag) || $token->name !== $remove_until) { + continue; + } + } + if (!empty($token->is_tag)) { + // DEFINITION CALL + + // before any processing, try to transform the element + if (isset($definition->info_tag_transform[$token->name])) { + $original_name = $token->name; + // there is a transformation for this tag + // DEFINITION CALL + $token = $definition-> + info_tag_transform[$token->name]->transform($token, $config, $context); + if ($e) { + $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Tag transform', $original_name); + } + } + + if (isset($definition->info[$token->name])) { + // mostly everything's good, but + // we need to make sure required attributes are in order + if (($token instanceof HTMLPurifier_Token_Start || $token instanceof HTMLPurifier_Token_Empty) && + $definition->info[$token->name]->required_attr && + ($token->name != 'img' || $remove_invalid_img) // ensure config option still works + ) { + $attr_validator->validateToken($token, $config, $context); + $ok = true; + foreach ($definition->info[$token->name]->required_attr as $name) { + if (!isset($token->attr[$name])) { + $ok = false; + break; + } + } + if (!$ok) { + if ($e) { + $e->send( + E_ERROR, + 'Strategy_RemoveForeignElements: Missing required attribute', + $name + ); + } + continue; + } + $token->armor['ValidateAttributes'] = true; + } + + if (isset($hidden_elements[$token->name]) && $token instanceof HTMLPurifier_Token_Start) { + $textify_comments = $token->name; + } elseif ($token->name === $textify_comments && $token instanceof HTMLPurifier_Token_End) { + $textify_comments = false; + } + + } elseif ($escape_invalid_tags) { + // invalid tag, generate HTML representation and insert in + if ($e) { + $e->send(E_WARNING, 'Strategy_RemoveForeignElements: Foreign element to text'); + } + $token = new HTMLPurifier_Token_Text( + $generator->generateFromToken($token) + ); + } else { + // check if we need to destroy all of the tag's children + // CAN BE GENERICIZED + if (isset($hidden_elements[$token->name])) { + if ($token instanceof HTMLPurifier_Token_Start) { + $remove_until = $token->name; + } elseif ($token instanceof HTMLPurifier_Token_Empty) { + // do nothing: we're still looking + } else { + $remove_until = false; + } + if ($e) { + $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign meta element removed'); + } + } else { + if ($e) { + $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign element removed'); + } + } + continue; + } + } elseif ($token instanceof HTMLPurifier_Token_Comment) { + // textify comments in script tags when they are allowed + if ($textify_comments !== false) { + $data = $token->data; + $token = new HTMLPurifier_Token_Text($data); + } elseif ($trusted || $check_comments) { + // always cleanup comments + $trailing_hyphen = false; + if ($e) { + // perform check whether or not there's a trailing hyphen + if (substr($token->data, -1) == '-') { + $trailing_hyphen = true; + } + } + $token->data = rtrim($token->data, '-'); + $found_double_hyphen = false; + while (strpos($token->data, '--') !== false) { + $found_double_hyphen = true; + $token->data = str_replace('--', '-', $token->data); + } + if ($trusted || !empty($comment_lookup[trim($token->data)]) || + ($comment_regexp !== null && preg_match($comment_regexp, trim($token->data)))) { + // OK good + if ($e) { + if ($trailing_hyphen) { + $e->send( + E_NOTICE, + 'Strategy_RemoveForeignElements: Trailing hyphen in comment removed' + ); + } + if ($found_double_hyphen) { + $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Hyphens in comment collapsed'); + } + } + } else { + if ($e) { + $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); + } + continue; + } + } else { + // strip comments + if ($e) { + $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); + } + continue; + } + } elseif ($token instanceof HTMLPurifier_Token_Text) { + } else { + continue; + } + $result[] = $token; + } + if ($remove_until && $e) { + // we removed tokens until the end, throw error + $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Token removed to end', $remove_until); + } + $context->destroy('CurrentToken'); + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/ValidateAttributes.php similarity index 62% rename from libraries/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Strategy/ValidateAttributes.php index c3328a9d44199d596371976e9da5209d0f8f52a3..428f975fc9919efeacfbee094a38a77c4acb660b 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Strategy/ValidateAttributes.php @@ -1,39 +1,45 @@ -<?php - -/** - * Validate all attributes in the tokens. - */ - -class HTMLPurifier_Strategy_ValidateAttributes extends HTMLPurifier_Strategy -{ - - public function execute($tokens, $config, $context) { - - // setup validator - $validator = new HTMLPurifier_AttrValidator(); - - $token = false; - $context->register('CurrentToken', $token); - - foreach ($tokens as $key => $token) { - - // only process tokens that have attributes, - // namely start and empty tags - if (!$token instanceof HTMLPurifier_Token_Start && !$token instanceof HTMLPurifier_Token_Empty) continue; - - // skip tokens that are armored - if (!empty($token->armor['ValidateAttributes'])) continue; - - // note that we have no facilities here for removing tokens - $validator->validateToken($token, $config, $context); - - $tokens[$key] = $token; // for PHP 4 - } - $context->destroy('CurrentToken'); - - return $tokens; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validate all attributes in the tokens. + */ + +class HTMLPurifier_Strategy_ValidateAttributes extends HTMLPurifier_Strategy +{ + + /** + * @param HTMLPurifier_Token[] $tokens + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token[] + */ + public function execute($tokens, $config, $context) + { + // setup validator + $validator = new HTMLPurifier_AttrValidator(); + + $token = false; + $context->register('CurrentToken', $token); + + foreach ($tokens as $key => $token) { + + // only process tokens that have attributes, + // namely start and empty tags + if (!$token instanceof HTMLPurifier_Token_Start && !$token instanceof HTMLPurifier_Token_Empty) { + continue; + } + + // skip tokens that are armored + if (!empty($token->armor['ValidateAttributes'])) { + continue; + } + + // note that we have no facilities here for removing tokens + $validator->validateToken($token, $config, $context); + } + $context->destroy('CurrentToken'); + return $tokens; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/StringHash.php b/libraries/htmlpurifier410/library/HTMLPurifier/StringHash.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/StringHash.php rename to libraries/htmlpurifier410/library/HTMLPurifier/StringHash.php index 62085c5c2ffff64f770973190fbb0ad737a2c9d6..8d0740cdc3edb0f70b15dd3d6ae72f1738da94fb 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/StringHash.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/StringHash.php @@ -1,39 +1,47 @@ -<?php - -/** - * This is in almost every respect equivalent to an array except - * that it keeps track of which keys were accessed. - * - * @warning For the sake of backwards compatibility with early versions - * of PHP 5, you must not use the $hash[$key] syntax; if you do - * our version of offsetGet is never called. - */ -class HTMLPurifier_StringHash extends ArrayObject -{ - protected $accessed = array(); - - /** - * Retrieves a value, and logs the access. - */ - public function offsetGet($index) { - $this->accessed[$index] = true; - return parent::offsetGet($index); - } - - /** - * Returns a lookup array of all array indexes that have been accessed. - * @return Array in form array($index => true). - */ - public function getAccessed() { - return $this->accessed; - } - - /** - * Resets the access array. - */ - public function resetAccessed() { - $this->accessed = array(); - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * This is in almost every respect equivalent to an array except + * that it keeps track of which keys were accessed. + * + * @warning For the sake of backwards compatibility with early versions + * of PHP 5, you must not use the $hash[$key] syntax; if you do + * our version of offsetGet is never called. + */ +class HTMLPurifier_StringHash extends ArrayObject +{ + /** + * @type array + */ + protected $accessed = array(); + + /** + * Retrieves a value, and logs the access. + * @param mixed $index + * @return mixed + */ + public function offsetGet($index) + { + $this->accessed[$index] = true; + return parent::offsetGet($index); + } + + /** + * Returns a lookup array of all array indexes that have been accessed. + * @return array in form array($index => true). + */ + public function getAccessed() + { + return $this->accessed; + } + + /** + * Resets the access array. + */ + public function resetAccessed() + { + $this->accessed = array(); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/StringHashParser.php b/libraries/htmlpurifier410/library/HTMLPurifier/StringHashParser.php similarity index 71% rename from libraries/htmlpurifier/library/HTMLPurifier/StringHashParser.php rename to libraries/htmlpurifier410/library/HTMLPurifier/StringHashParser.php index f3e70c712f077cc2c3f0325df1075e1985647b15..05abd837e7b003caeb869704190a383f0d7f21be 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/StringHashParser.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/StringHashParser.php @@ -1,110 +1,136 @@ -<?php - -/** - * Parses string hash files. File format is as such: - * - * DefaultKeyValue - * KEY: Value - * KEY2: Value2 - * --MULTILINE-KEY-- - * Multiline - * value. - * - * Which would output something similar to: - * - * array( - * 'ID' => 'DefaultKeyValue', - * 'KEY' => 'Value', - * 'KEY2' => 'Value2', - * 'MULTILINE-KEY' => "Multiline\nvalue.\n", - * ) - * - * We use this as an easy to use file-format for configuration schema - * files, but the class itself is usage agnostic. - * - * You can use ---- to forcibly terminate parsing of a single string-hash; - * this marker is used in multi string-hashes to delimit boundaries. - */ -class HTMLPurifier_StringHashParser -{ - - public $default = 'ID'; - - /** - * Parses a file that contains a single string-hash. - */ - public function parseFile($file) { - if (!file_exists($file)) return false; - $fh = fopen($file, 'r'); - if (!$fh) return false; - $ret = $this->parseHandle($fh); - fclose($fh); - return $ret; - } - - /** - * Parses a file that contains multiple string-hashes delimited by '----' - */ - public function parseMultiFile($file) { - if (!file_exists($file)) return false; - $ret = array(); - $fh = fopen($file, 'r'); - if (!$fh) return false; - while (!feof($fh)) { - $ret[] = $this->parseHandle($fh); - } - fclose($fh); - return $ret; - } - - /** - * Internal parser that acepts a file handle. - * @note While it's possible to simulate in-memory parsing by using - * custom stream wrappers, if such a use-case arises we should - * factor out the file handle into its own class. - * @param $fh File handle with pointer at start of valid string-hash - * block. - */ - protected function parseHandle($fh) { - $state = false; - $single = false; - $ret = array(); - do { - $line = fgets($fh); - if ($line === false) break; - $line = rtrim($line, "\n\r"); - if (!$state && $line === '') continue; - if ($line === '----') break; - if (strncmp('--#', $line, 3) === 0) { - // Comment - continue; - } elseif (strncmp('--', $line, 2) === 0) { - // Multiline declaration - $state = trim($line, '- '); - if (!isset($ret[$state])) $ret[$state] = ''; - continue; - } elseif (!$state) { - $single = true; - if (strpos($line, ':') !== false) { - // Single-line declaration - list($state, $line) = explode(':', $line, 2); - $line = trim($line); - } else { - // Use default declaration - $state = $this->default; - } - } - if ($single) { - $ret[$state] = $line; - $single = false; - $state = false; - } else { - $ret[$state] .= "$line\n"; - } - } while (!feof($fh)); - return $ret; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Parses string hash files. File format is as such: + * + * DefaultKeyValue + * KEY: Value + * KEY2: Value2 + * --MULTILINE-KEY-- + * Multiline + * value. + * + * Which would output something similar to: + * + * array( + * 'ID' => 'DefaultKeyValue', + * 'KEY' => 'Value', + * 'KEY2' => 'Value2', + * 'MULTILINE-KEY' => "Multiline\nvalue.\n", + * ) + * + * We use this as an easy to use file-format for configuration schema + * files, but the class itself is usage agnostic. + * + * You can use ---- to forcibly terminate parsing of a single string-hash; + * this marker is used in multi string-hashes to delimit boundaries. + */ +class HTMLPurifier_StringHashParser +{ + + /** + * @type string + */ + public $default = 'ID'; + + /** + * Parses a file that contains a single string-hash. + * @param string $file + * @return array + */ + public function parseFile($file) + { + if (!file_exists($file)) { + return false; + } + $fh = fopen($file, 'r'); + if (!$fh) { + return false; + } + $ret = $this->parseHandle($fh); + fclose($fh); + return $ret; + } + + /** + * Parses a file that contains multiple string-hashes delimited by '----' + * @param string $file + * @return array + */ + public function parseMultiFile($file) + { + if (!file_exists($file)) { + return false; + } + $ret = array(); + $fh = fopen($file, 'r'); + if (!$fh) { + return false; + } + while (!feof($fh)) { + $ret[] = $this->parseHandle($fh); + } + fclose($fh); + return $ret; + } + + /** + * Internal parser that acepts a file handle. + * @note While it's possible to simulate in-memory parsing by using + * custom stream wrappers, if such a use-case arises we should + * factor out the file handle into its own class. + * @param resource $fh File handle with pointer at start of valid string-hash + * block. + * @return array + */ + protected function parseHandle($fh) + { + $state = false; + $single = false; + $ret = array(); + do { + $line = fgets($fh); + if ($line === false) { + break; + } + $line = rtrim($line, "\n\r"); + if (!$state && $line === '') { + continue; + } + if ($line === '----') { + break; + } + if (strncmp('--#', $line, 3) === 0) { + // Comment + continue; + } elseif (strncmp('--', $line, 2) === 0) { + // Multiline declaration + $state = trim($line, '- '); + if (!isset($ret[$state])) { + $ret[$state] = ''; + } + continue; + } elseif (!$state) { + $single = true; + if (strpos($line, ':') !== false) { + // Single-line declaration + list($state, $line) = explode(':', $line, 2); + $line = trim($line); + } else { + // Use default declaration + $state = $this->default; + } + } + if ($single) { + $ret[$state] = $line; + $single = false; + $state = false; + } else { + $ret[$state] .= "$line\n"; + } + } while (!feof($fh)); + return $ret; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform.php b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/TagTransform.php rename to libraries/htmlpurifier410/library/HTMLPurifier/TagTransform.php index 210a44721769223bf25c9ec531874fc5de1eb5c2..0f481bfd1553b16336b294583cf2b74cdabb49ca 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform.php @@ -1,36 +1,37 @@ -<?php - -/** - * Defines a mutation of an obsolete tag into a valid tag. - */ -abstract class HTMLPurifier_TagTransform -{ - - /** - * Tag name to transform the tag to. - */ - public $transform_to; - - /** - * Transforms the obsolete tag into the valid tag. - * @param $tag Tag to be transformed. - * @param $config Mandatory HTMLPurifier_Config object - * @param $context Mandatory HTMLPurifier_Context object - */ - abstract public function transform($tag, $config, $context); - - /** - * Prepends CSS properties to the style attribute, creating the - * attribute if it doesn't exist. - * @warning Copied over from AttrTransform, be sure to keep in sync - * @param $attr Attribute array to process (passed by reference) - * @param $css CSS to prepend - */ - protected function prependCSS(&$attr, $css) { - $attr['style'] = isset($attr['style']) ? $attr['style'] : ''; - $attr['style'] = $css . $attr['style']; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Defines a mutation of an obsolete tag into a valid tag. + */ +abstract class HTMLPurifier_TagTransform +{ + + /** + * Tag name to transform the tag to. + * @type string + */ + public $transform_to; + + /** + * Transforms the obsolete tag into the valid tag. + * @param HTMLPurifier_Token_Tag $tag Tag to be transformed. + * @param HTMLPurifier_Config $config Mandatory HTMLPurifier_Config object + * @param HTMLPurifier_Context $context Mandatory HTMLPurifier_Context object + */ + abstract public function transform($tag, $config, $context); + + /** + * Prepends CSS properties to the style attribute, creating the + * attribute if it doesn't exist. + * @warning Copied over from AttrTransform, be sure to keep in sync + * @param array $attr Attribute array to process (passed by reference) + * @param string $css CSS to prepend + */ + protected function prependCSS(&$attr, $css) + { + $attr['style'] = isset($attr['style']) ? $attr['style'] : ''; + $attr['style'] = $css . $attr['style']; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Font.php similarity index 69% rename from libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php rename to libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Font.php index ed2463786db064c1799d63945f066a335695c863..2a186515e238bd9f17c22afc0292d53a9fd96423 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Font.php @@ -1,96 +1,114 @@ -<?php - -/** - * Transforms FONT tags to the proper form (SPAN with CSS styling) - * - * This transformation takes the three proprietary attributes of FONT and - * transforms them into their corresponding CSS attributes. These are color, - * face, and size. - * - * @note Size is an interesting case because it doesn't map cleanly to CSS. - * Thanks to - * http://style.cleverchimp.com/font_size_intervals/altintervals.html - * for reasonable mappings. - * @warning This doesn't work completely correctly; specifically, this - * TagTransform operates before well-formedness is enforced, so - * the "active formatting elements" algorithm doesn't get applied. - */ -class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform -{ - - public $transform_to = 'span'; - - protected $_size_lookup = array( - '0' => 'xx-small', - '1' => 'xx-small', - '2' => 'small', - '3' => 'medium', - '4' => 'large', - '5' => 'x-large', - '6' => 'xx-large', - '7' => '300%', - '-1' => 'smaller', - '-2' => '60%', - '+1' => 'larger', - '+2' => '150%', - '+3' => '200%', - '+4' => '300%' - ); - - public function transform($tag, $config, $context) { - - if ($tag instanceof HTMLPurifier_Token_End) { - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - return $new_tag; - } - - $attr = $tag->attr; - $prepend_style = ''; - - // handle color transform - if (isset($attr['color'])) { - $prepend_style .= 'color:' . $attr['color'] . ';'; - unset($attr['color']); - } - - // handle face transform - if (isset($attr['face'])) { - $prepend_style .= 'font-family:' . $attr['face'] . ';'; - unset($attr['face']); - } - - // handle size transform - if (isset($attr['size'])) { - // normalize large numbers - if ($attr['size']{0} == '+' || $attr['size']{0} == '-') { - $size = (int) $attr['size']; - if ($size < -2) $attr['size'] = '-2'; - if ($size > 4) $attr['size'] = '+4'; - } else { - $size = (int) $attr['size']; - if ($size > 7) $attr['size'] = '7'; - } - if (isset($this->_size_lookup[$attr['size']])) { - $prepend_style .= 'font-size:' . - $this->_size_lookup[$attr['size']] . ';'; - } - unset($attr['size']); - } - - if ($prepend_style) { - $attr['style'] = isset($attr['style']) ? - $prepend_style . $attr['style'] : - $prepend_style; - } - - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - $new_tag->attr = $attr; - - return $new_tag; - - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Transforms FONT tags to the proper form (SPAN with CSS styling) + * + * This transformation takes the three proprietary attributes of FONT and + * transforms them into their corresponding CSS attributes. These are color, + * face, and size. + * + * @note Size is an interesting case because it doesn't map cleanly to CSS. + * Thanks to + * http://style.cleverchimp.com/font_size_intervals/altintervals.html + * for reasonable mappings. + * @warning This doesn't work completely correctly; specifically, this + * TagTransform operates before well-formedness is enforced, so + * the "active formatting elements" algorithm doesn't get applied. + */ +class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform +{ + /** + * @type string + */ + public $transform_to = 'span'; + + /** + * @type array + */ + protected $_size_lookup = array( + '0' => 'xx-small', + '1' => 'xx-small', + '2' => 'small', + '3' => 'medium', + '4' => 'large', + '5' => 'x-large', + '6' => 'xx-large', + '7' => '300%', + '-1' => 'smaller', + '-2' => '60%', + '+1' => 'larger', + '+2' => '150%', + '+3' => '200%', + '+4' => '300%' + ); + + /** + * @param HTMLPurifier_Token_Tag $tag + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_Token_End|string + */ + public function transform($tag, $config, $context) + { + if ($tag instanceof HTMLPurifier_Token_End) { + $new_tag = clone $tag; + $new_tag->name = $this->transform_to; + return $new_tag; + } + + $attr = $tag->attr; + $prepend_style = ''; + + // handle color transform + if (isset($attr['color'])) { + $prepend_style .= 'color:' . $attr['color'] . ';'; + unset($attr['color']); + } + + // handle face transform + if (isset($attr['face'])) { + $prepend_style .= 'font-family:' . $attr['face'] . ';'; + unset($attr['face']); + } + + // handle size transform + if (isset($attr['size'])) { + // normalize large numbers + if ($attr['size'] !== '') { + if ($attr['size']{0} == '+' || $attr['size']{0} == '-') { + $size = (int)$attr['size']; + if ($size < -2) { + $attr['size'] = '-2'; + } + if ($size > 4) { + $attr['size'] = '+4'; + } + } else { + $size = (int)$attr['size']; + if ($size > 7) { + $attr['size'] = '7'; + } + } + } + if (isset($this->_size_lookup[$attr['size']])) { + $prepend_style .= 'font-size:' . + $this->_size_lookup[$attr['size']] . ';'; + } + unset($attr['size']); + } + + if ($prepend_style) { + $attr['style'] = isset($attr['style']) ? + $prepend_style . $attr['style'] : + $prepend_style; + } + + $new_tag = clone $tag; + $new_tag->name = $this->transform_to; + $new_tag->attr = $attr; + + return $new_tag; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Simple.php similarity index 59% rename from libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php rename to libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Simple.php index 0e36130f2538be1990b71823a289bdeaf8ed0bc8..d21b634e943763aca682f8f714422d7bc6c5b86f 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/TagTransform/Simple.php @@ -1,35 +1,44 @@ -<?php - -/** - * Simple transformation, just change tag name to something else, - * and possibly add some styling. This will cover most of the deprecated - * tag cases. - */ -class HTMLPurifier_TagTransform_Simple extends HTMLPurifier_TagTransform -{ - - protected $style; - - /** - * @param $transform_to Tag name to transform to. - * @param $style CSS style to add to the tag - */ - public function __construct($transform_to, $style = null) { - $this->transform_to = $transform_to; - $this->style = $style; - } - - public function transform($tag, $config, $context) { - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - if (!is_null($this->style) && - ($new_tag instanceof HTMLPurifier_Token_Start || $new_tag instanceof HTMLPurifier_Token_Empty) - ) { - $this->prependCSS($new_tag->attr, $this->style); - } - return $new_tag; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Simple transformation, just change tag name to something else, + * and possibly add some styling. This will cover most of the deprecated + * tag cases. + */ +class HTMLPurifier_TagTransform_Simple extends HTMLPurifier_TagTransform +{ + /** + * @type string + */ + protected $style; + + /** + * @param string $transform_to Tag name to transform to. + * @param string $style CSS style to add to the tag + */ + public function __construct($transform_to, $style = null) + { + $this->transform_to = $transform_to; + $this->style = $style; + } + + /** + * @param HTMLPurifier_Token_Tag $tag + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function transform($tag, $config, $context) + { + $new_tag = clone $tag; + $new_tag->name = $this->transform_to; + if (!is_null($this->style) && + ($new_tag instanceof HTMLPurifier_Token_Start || $new_tag instanceof HTMLPurifier_Token_Empty) + ) { + $this->prependCSS($new_tag->attr, $this->style); + } + return $new_tag; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Token.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token.php new file mode 100644 index 0000000000000000000000000000000000000000..a765cf10e7cde6b15fba2ddd84f911767afc899a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token.php @@ -0,0 +1,100 @@ +<?php + +/** + * Abstract base token class that all others inherit from. + */ +abstract class HTMLPurifier_Token +{ + /** + * Line number node was on in source document. Null if unknown. + * @type int + */ + public $line; + + /** + * Column of line node was on in source document. Null if unknown. + * @type int + */ + public $col; + + /** + * Lookup array of processing that this token is exempt from. + * Currently, valid values are "ValidateAttributes" and + * "MakeWellFormed_TagClosedError" + * @type array + */ + public $armor = array(); + + /** + * Used during MakeWellFormed. See Note [Injector skips] + * @type + */ + public $skip; + + /** + * @type + */ + public $rewind; + + /** + * @type + */ + public $carryover; + + /** + * @param string $n + * @return null|string + */ + public function __get($n) + { + if ($n === 'type') { + trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE); + switch (get_class($this)) { + case 'HTMLPurifier_Token_Start': + return 'start'; + case 'HTMLPurifier_Token_Empty': + return 'empty'; + case 'HTMLPurifier_Token_End': + return 'end'; + case 'HTMLPurifier_Token_Text': + return 'text'; + case 'HTMLPurifier_Token_Comment': + return 'comment'; + default: + return null; + } + } + } + + /** + * Sets the position of the token in the source document. + * @param int $l + * @param int $c + */ + public function position($l = null, $c = null) + { + $this->line = $l; + $this->col = $c; + } + + /** + * Convenience function for DirectLex settings line/col position. + * @param int $l + * @param int $c + */ + public function rawPosition($l, $c) + { + if ($c === -1) { + $l++; + } + $this->line = $l; + $this->col = $c; + } + + /** + * Converts a token into its corresponding node. + */ + abstract public function toNode(); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Token/Comment.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Comment.php new file mode 100644 index 0000000000000000000000000000000000000000..3fd273b1668d2e92143a7225b1058ee446ebd7ec --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Comment.php @@ -0,0 +1,38 @@ +<?php + +/** + * Concrete comment token class. Generally will be ignored. + */ +class HTMLPurifier_Token_Comment extends HTMLPurifier_Token +{ + /** + * Character data within comment. + * @type string + */ + public $data; + + /** + * @type bool + */ + public $is_whitespace = true; + + /** + * Transparent constructor. + * + * @param string $data String comment data. + * @param int $line + * @param int $col + */ + public function __construct($data, $line = null, $col = null) + { + $this->data = $data; + $this->line = $line; + $this->col = $col; + } + + public function toNode() { + return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/Empty.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Empty.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/Token/Empty.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Token/Empty.php index 2a82b47ad127036a1fe276a4b5308384f0599985..bd35024ab86f2d774bfe9d1cb1624012df092d52 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/Empty.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Empty.php @@ -1,11 +1,15 @@ -<?php - -/** - * Concrete empty token class. - */ -class HTMLPurifier_Token_Empty extends HTMLPurifier_Token_Tag -{ - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Concrete empty token class. + */ +class HTMLPurifier_Token_Empty extends HTMLPurifier_Token_Tag +{ + public function toNode() { + $n = parent::toNode(); + $n->empty = true; + return $n; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/End.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/End.php similarity index 56% rename from libraries/htmlpurifier/library/HTMLPurifier/Token/End.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Token/End.php index 353e79daf7357bdc55b5a1339558ac5838cf9a39..99c34e750e3b9ac0accf37717447ef135eff8cf6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/End.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/End.php @@ -1,19 +1,24 @@ -<?php - -/** - * Concrete end token class. - * - * @warning This class accepts attributes even though end tags cannot. This - * is for optimization reasons, as under normal circumstances, the Lexers - * do not pass attributes. - */ -class HTMLPurifier_Token_End extends HTMLPurifier_Token_Tag -{ - /** - * Token that started this node. Added by MakeWellFormed. Please - * do not edit this! - */ - public $start; -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Concrete end token class. + * + * @warning This class accepts attributes even though end tags cannot. This + * is for optimization reasons, as under normal circumstances, the Lexers + * do not pass attributes. + */ +class HTMLPurifier_Token_End extends HTMLPurifier_Token_Tag +{ + /** + * Token that started this node. + * Added by MakeWellFormed. Please do not edit this! + * @type HTMLPurifier_Token + */ + public $start; + + public function toNode() { + throw new Exception("HTMLPurifier_Token_End->toNode not supported!"); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/Start.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Start.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/Token/Start.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Token/Start.php index e0e14fc624ab6a4279d7595d7beb483da0a83a7f..574745b60735e59567dbb2afc8f85c81d003030e 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/Start.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Start.php @@ -1,11 +1,10 @@ -<?php - -/** - * Concrete start token class. - */ -class HTMLPurifier_Token_Start extends HTMLPurifier_Token_Tag -{ - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Concrete start token class. + */ +class HTMLPurifier_Token_Start extends HTMLPurifier_Token_Tag +{ +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/Tag.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Tag.php similarity index 70% rename from libraries/htmlpurifier/library/HTMLPurifier/Token/Tag.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Token/Tag.php index 798be028ee6394ab904f9e67b2ba1e8f8a70ae24..284e32ee30dad64d60e8177f56afb5863ab5c82c 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/Tag.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Tag.php @@ -1,56 +1,68 @@ -<?php - -/** - * Abstract class of a tag token (start, end or empty), and its behavior. - */ -class HTMLPurifier_Token_Tag extends HTMLPurifier_Token -{ - /** - * Static bool marker that indicates the class is a tag. - * - * This allows us to check objects with <tt>!empty($obj->is_tag)</tt> - * without having to use a function call <tt>is_a()</tt>. - */ - public $is_tag = true; - - /** - * The lower-case name of the tag, like 'a', 'b' or 'blockquote'. - * - * @note Strictly speaking, XML tags are case sensitive, so we shouldn't - * be lower-casing them, but these tokens cater to HTML tags, which are - * insensitive. - */ - public $name; - - /** - * Associative array of the tag's attributes. - */ - public $attr = array(); - - /** - * Non-overloaded constructor, which lower-cases passed tag name. - * - * @param $name String name. - * @param $attr Associative array of attributes. - */ - public function __construct($name, $attr = array(), $line = null, $col = null) { - $this->name = ctype_lower($name) ? $name : strtolower($name); - foreach ($attr as $key => $value) { - // normalization only necessary when key is not lowercase - if (!ctype_lower($key)) { - $new_key = strtolower($key); - if (!isset($attr[$new_key])) { - $attr[$new_key] = $attr[$key]; - } - if ($new_key !== $key) { - unset($attr[$key]); - } - } - } - $this->attr = $attr; - $this->line = $line; - $this->col = $col; - } -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Abstract class of a tag token (start, end or empty), and its behavior. + */ +abstract class HTMLPurifier_Token_Tag extends HTMLPurifier_Token +{ + /** + * Static bool marker that indicates the class is a tag. + * + * This allows us to check objects with <tt>!empty($obj->is_tag)</tt> + * without having to use a function call <tt>is_a()</tt>. + * @type bool + */ + public $is_tag = true; + + /** + * The lower-case name of the tag, like 'a', 'b' or 'blockquote'. + * + * @note Strictly speaking, XML tags are case sensitive, so we shouldn't + * be lower-casing them, but these tokens cater to HTML tags, which are + * insensitive. + * @type string + */ + public $name; + + /** + * Associative array of the tag's attributes. + * @type array + */ + public $attr = array(); + + /** + * Non-overloaded constructor, which lower-cases passed tag name. + * + * @param string $name String name. + * @param array $attr Associative array of attributes. + * @param int $line + * @param int $col + * @param array $armor + */ + public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) + { + $this->name = ctype_lower($name) ? $name : strtolower($name); + foreach ($attr as $key => $value) { + // normalization only necessary when key is not lowercase + if (!ctype_lower($key)) { + $new_key = strtolower($key); + if (!isset($attr[$new_key])) { + $attr[$new_key] = $attr[$key]; + } + if ($new_key !== $key) { + unset($attr[$key]); + } + } + } + $this->attr = $attr; + $this->line = $line; + $this->col = $col; + $this->armor = $armor; + } + + public function toNode() { + return new HTMLPurifier_Node_Element($this->name, $this->attr, $this->line, $this->col, $this->armor); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/Token/Text.php b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Text.php similarity index 52% rename from libraries/htmlpurifier/library/HTMLPurifier/Token/Text.php rename to libraries/htmlpurifier410/library/HTMLPurifier/Token/Text.php index 82efd823d6b60fd1be94f23159e0a4beb63b4953..ff45125a514ff72c80a5800b4e752be6a1c97985 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/Token/Text.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Token/Text.php @@ -1,33 +1,53 @@ -<?php - -/** - * Concrete text token class. - * - * Text tokens comprise of regular parsed character data (PCDATA) and raw - * character data (from the CDATA sections). Internally, their - * data is parsed with all entities expanded. Surprisingly, the text token - * does have a "tag name" called #PCDATA, which is how the DTD represents it - * in permissible child nodes. - */ -class HTMLPurifier_Token_Text extends HTMLPurifier_Token -{ - - public $name = '#PCDATA'; /**< PCDATA tag name compatible with DTD. */ - public $data; /**< Parsed character data of text. */ - public $is_whitespace; /**< Bool indicating if node is whitespace. */ - - /** - * Constructor, accepts data and determines if it is whitespace. - * - * @param $data String parsed character data. - */ - public function __construct($data, $line = null, $col = null) { - $this->data = $data; - $this->is_whitespace = ctype_space($data); - $this->line = $line; - $this->col = $col; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Concrete text token class. + * + * Text tokens comprise of regular parsed character data (PCDATA) and raw + * character data (from the CDATA sections). Internally, their + * data is parsed with all entities expanded. Surprisingly, the text token + * does have a "tag name" called #PCDATA, which is how the DTD represents it + * in permissible child nodes. + */ +class HTMLPurifier_Token_Text extends HTMLPurifier_Token +{ + + /** + * @type string + */ + public $name = '#PCDATA'; + /**< PCDATA tag name compatible with DTD. */ + + /** + * @type string + */ + public $data; + /**< Parsed character data of text. */ + + /** + * @type bool + */ + public $is_whitespace; + + /**< Bool indicating if node is whitespace. */ + + /** + * Constructor, accepts data and determines if it is whitespace. + * @param string $data String parsed character data. + * @param int $line + * @param int $col + */ + public function __construct($data, $line = null, $col = null) + { + $this->data = $data; + $this->is_whitespace = ctype_space($data); + $this->line = $line; + $this->col = $col; + } + + public function toNode() { + return new HTMLPurifier_Node_Text($this->data, $this->is_whitespace, $this->line, $this->col); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/TokenFactory.php b/libraries/htmlpurifier410/library/HTMLPurifier/TokenFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..e016b80ea6c2601fd1581213276d3add427bbd73 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/TokenFactory.php @@ -0,0 +1,118 @@ +<?php + +/** + * Factory for token generation. + * + * @note Doing some benchmarking indicates that the new operator is much + * slower than the clone operator (even discounting the cost of the + * constructor). This class is for that optimization. + * Other then that, there's not much point as we don't + * maintain parallel HTMLPurifier_Token hierarchies (the main reason why + * you'd want to use an abstract factory). + * @todo Port DirectLex to use this + */ +class HTMLPurifier_TokenFactory +{ + // p stands for prototype + + /** + * @type HTMLPurifier_Token_Start + */ + private $p_start; + + /** + * @type HTMLPurifier_Token_End + */ + private $p_end; + + /** + * @type HTMLPurifier_Token_Empty + */ + private $p_empty; + + /** + * @type HTMLPurifier_Token_Text + */ + private $p_text; + + /** + * @type HTMLPurifier_Token_Comment + */ + private $p_comment; + + /** + * Generates blank prototypes for cloning. + */ + public function __construct() + { + $this->p_start = new HTMLPurifier_Token_Start('', array()); + $this->p_end = new HTMLPurifier_Token_End(''); + $this->p_empty = new HTMLPurifier_Token_Empty('', array()); + $this->p_text = new HTMLPurifier_Token_Text(''); + $this->p_comment = new HTMLPurifier_Token_Comment(''); + } + + /** + * Creates a HTMLPurifier_Token_Start. + * @param string $name Tag name + * @param array $attr Associative array of attributes + * @return HTMLPurifier_Token_Start Generated HTMLPurifier_Token_Start + */ + public function createStart($name, $attr = array()) + { + $p = clone $this->p_start; + $p->__construct($name, $attr); + return $p; + } + + /** + * Creates a HTMLPurifier_Token_End. + * @param string $name Tag name + * @return HTMLPurifier_Token_End Generated HTMLPurifier_Token_End + */ + public function createEnd($name) + { + $p = clone $this->p_end; + $p->__construct($name); + return $p; + } + + /** + * Creates a HTMLPurifier_Token_Empty. + * @param string $name Tag name + * @param array $attr Associative array of attributes + * @return HTMLPurifier_Token_Empty Generated HTMLPurifier_Token_Empty + */ + public function createEmpty($name, $attr = array()) + { + $p = clone $this->p_empty; + $p->__construct($name, $attr); + return $p; + } + + /** + * Creates a HTMLPurifier_Token_Text. + * @param string $data Data of text token + * @return HTMLPurifier_Token_Text Generated HTMLPurifier_Token_Text + */ + public function createText($data) + { + $p = clone $this->p_text; + $p->__construct($data); + return $p; + } + + /** + * Creates a HTMLPurifier_Token_Comment. + * @param string $data Data of comment token + * @return HTMLPurifier_Token_Comment Generated HTMLPurifier_Token_Comment + */ + public function createComment($data) + { + $p = clone $this->p_comment; + $p->__construct($data); + return $p; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URI.php b/libraries/htmlpurifier410/library/HTMLPurifier/URI.php new file mode 100644 index 0000000000000000000000000000000000000000..1a4705a0c27e74125eeb9c6f93faa3aa281cff55 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URI.php @@ -0,0 +1,316 @@ +<?php + +/** + * HTML Purifier's internal representation of a URI. + * @note + * Internal data-structures are completely escaped. If the data needs + * to be used in a non-URI context (which is very unlikely), be sure + * to decode it first. The URI may not necessarily be well-formed until + * validate() is called. + */ +class HTMLPurifier_URI +{ + /** + * @type string + */ + public $scheme; + + /** + * @type string + */ + public $userinfo; + + /** + * @type string + */ + public $host; + + /** + * @type int + */ + public $port; + + /** + * @type string + */ + public $path; + + /** + * @type string + */ + public $query; + + /** + * @type string + */ + public $fragment; + + /** + * @param string $scheme + * @param string $userinfo + * @param string $host + * @param int $port + * @param string $path + * @param string $query + * @param string $fragment + * @note Automatically normalizes scheme and port + */ + public function __construct($scheme, $userinfo, $host, $port, $path, $query, $fragment) + { + $this->scheme = is_null($scheme) || ctype_lower($scheme) ? $scheme : strtolower($scheme); + $this->userinfo = $userinfo; + $this->host = $host; + $this->port = is_null($port) ? $port : (int)$port; + $this->path = $path; + $this->query = $query; + $this->fragment = $fragment; + } + + /** + * Retrieves a scheme object corresponding to the URI's scheme/default + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_URIScheme Scheme object appropriate for validating this URI + */ + public function getSchemeObj($config, $context) + { + $registry = HTMLPurifier_URISchemeRegistry::instance(); + if ($this->scheme !== null) { + $scheme_obj = $registry->getScheme($this->scheme, $config, $context); + if (!$scheme_obj) { + return false; + } // invalid scheme, clean it out + } else { + // no scheme: retrieve the default one + $def = $config->getDefinition('URI'); + $scheme_obj = $def->getDefaultScheme($config, $context); + if (!$scheme_obj) { + if ($def->defaultScheme !== null) { + // something funky happened to the default scheme object + trigger_error( + 'Default scheme object "' . $def->defaultScheme . '" was not readable', + E_USER_WARNING + ); + } // suppress error if it's null + return false; + } + } + return $scheme_obj; + } + + /** + * Generic validation method applicable for all schemes. May modify + * this URI in order to get it into a compliant form. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool True if validation/filtering succeeds, false if failure + */ + public function validate($config, $context) + { + // ABNF definitions from RFC 3986 + $chars_sub_delims = '!$&\'()*+,;='; + $chars_gen_delims = ':/?#[]@'; + $chars_pchar = $chars_sub_delims . ':@'; + + // validate host + if (!is_null($this->host)) { + $host_def = new HTMLPurifier_AttrDef_URI_Host(); + $this->host = $host_def->validate($this->host, $config, $context); + if ($this->host === false) { + $this->host = null; + } + } + + // validate scheme + // NOTE: It's not appropriate to check whether or not this + // scheme is in our registry, since a URIFilter may convert a + // URI that we don't allow into one we do. So instead, we just + // check if the scheme can be dropped because there is no host + // and it is our default scheme. + if (!is_null($this->scheme) && is_null($this->host) || $this->host === '') { + // support for relative paths is pretty abysmal when the + // scheme is present, so axe it when possible + $def = $config->getDefinition('URI'); + if ($def->defaultScheme === $this->scheme) { + $this->scheme = null; + } + } + + // validate username + if (!is_null($this->userinfo)) { + $encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . ':'); + $this->userinfo = $encoder->encode($this->userinfo); + } + + // validate port + if (!is_null($this->port)) { + if ($this->port < 1 || $this->port > 65535) { + $this->port = null; + } + } + + // validate path + $segments_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/'); + if (!is_null($this->host)) { // this catches $this->host === '' + // path-abempty (hier and relative) + // http://www.example.com/my/path + // //www.example.com/my/path (looks odd, but works, and + // recognized by most browsers) + // (this set is valid or invalid on a scheme by scheme + // basis, so we'll deal with it later) + // file:///my/path + // ///my/path + $this->path = $segments_encoder->encode($this->path); + } elseif ($this->path !== '') { + if ($this->path[0] === '/') { + // path-absolute (hier and relative) + // http:/my/path + // /my/path + if (strlen($this->path) >= 2 && $this->path[1] === '/') { + // This could happen if both the host gets stripped + // out + // http://my/path + // //my/path + $this->path = ''; + } else { + $this->path = $segments_encoder->encode($this->path); + } + } elseif (!is_null($this->scheme)) { + // path-rootless (hier) + // http:my/path + // Short circuit evaluation means we don't need to check nz + $this->path = $segments_encoder->encode($this->path); + } else { + // path-noscheme (relative) + // my/path + // (once again, not checking nz) + $segment_nc_encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . '@'); + $c = strpos($this->path, '/'); + if ($c !== false) { + $this->path = + $segment_nc_encoder->encode(substr($this->path, 0, $c)) . + $segments_encoder->encode(substr($this->path, $c)); + } else { + $this->path = $segment_nc_encoder->encode($this->path); + } + } + } else { + // path-empty (hier and relative) + $this->path = ''; // just to be safe + } + + // qf = query and fragment + $qf_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/?'); + + if (!is_null($this->query)) { + $this->query = $qf_encoder->encode($this->query); + } + + if (!is_null($this->fragment)) { + $this->fragment = $qf_encoder->encode($this->fragment); + } + return true; + } + + /** + * Convert URI back to string + * @return string URI appropriate for output + */ + public function toString() + { + // reconstruct authority + $authority = null; + // there is a rendering difference between a null authority + // (http:foo-bar) and an empty string authority + // (http:///foo-bar). + if (!is_null($this->host)) { + $authority = ''; + if (!is_null($this->userinfo)) { + $authority .= $this->userinfo . '@'; + } + $authority .= $this->host; + if (!is_null($this->port)) { + $authority .= ':' . $this->port; + } + } + + // Reconstruct the result + // One might wonder about parsing quirks from browsers after + // this reconstruction. Unfortunately, parsing behavior depends + // on what *scheme* was employed (file:///foo is handled *very* + // differently than http:///foo), so unfortunately we have to + // defer to the schemes to do the right thing. + $result = ''; + if (!is_null($this->scheme)) { + $result .= $this->scheme . ':'; + } + if (!is_null($authority)) { + $result .= '//' . $authority; + } + $result .= $this->path; + if (!is_null($this->query)) { + $result .= '?' . $this->query; + } + if (!is_null($this->fragment)) { + $result .= '#' . $this->fragment; + } + + return $result; + } + + /** + * Returns true if this URL might be considered a 'local' URL given + * the current context. This is true when the host is null, or + * when it matches the host supplied to the configuration. + * + * Note that this does not do any scheme checking, so it is mostly + * only appropriate for metadata that doesn't care about protocol + * security. isBenign is probably what you actually want. + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function isLocal($config, $context) + { + if ($this->host === null) { + return true; + } + $uri_def = $config->getDefinition('URI'); + if ($uri_def->host === $this->host) { + return true; + } + return false; + } + + /** + * Returns true if this URL should be considered a 'benign' URL, + * that is: + * + * - It is a local URL (isLocal), and + * - It has a equal or better level of security + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function isBenign($config, $context) + { + if (!$this->isLocal($config, $context)) { + return false; + } + + $scheme_obj = $this->getSchemeObj($config, $context); + if (!$scheme_obj) { + return false; + } // conservative approach + + $current_scheme_obj = $config->getDefinition('URI')->getDefaultScheme($config, $context); + if ($current_scheme_obj->secure) { + if (!$scheme_obj->secure) { + return false; + } + } + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIDefinition.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIDefinition.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier/URIDefinition.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIDefinition.php index 183fcfc7e749acfa10d8a89b09a5e82eed2a20a5..dbc2a752ef889f1b316f87a18264481f3dea7934 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIDefinition.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIDefinition.php @@ -1,93 +1,112 @@ -<?php - -class HTMLPurifier_URIDefinition extends HTMLPurifier_Definition -{ - - public $type = 'URI'; - protected $filters = array(); - protected $postFilters = array(); - protected $registeredFilters = array(); - - /** - * HTMLPurifier_URI object of the base specified at %URI.Base - */ - public $base; - - /** - * String host to consider "home" base, derived off of $base - */ - public $host; - - /** - * Name of default scheme based on %URI.DefaultScheme and %URI.Base - */ - public $defaultScheme; - - public function __construct() { - $this->registerFilter(new HTMLPurifier_URIFilter_DisableExternal()); - $this->registerFilter(new HTMLPurifier_URIFilter_DisableExternalResources()); - $this->registerFilter(new HTMLPurifier_URIFilter_HostBlacklist()); - $this->registerFilter(new HTMLPurifier_URIFilter_MakeAbsolute()); - $this->registerFilter(new HTMLPurifier_URIFilter_Munge()); - } - - public function registerFilter($filter) { - $this->registeredFilters[$filter->name] = $filter; - } - - public function addFilter($filter, $config) { - $r = $filter->prepare($config); - if ($r === false) return; // null is ok, for backwards compat - if ($filter->post) { - $this->postFilters[$filter->name] = $filter; - } else { - $this->filters[$filter->name] = $filter; - } - } - - protected function doSetup($config) { - $this->setupMemberVariables($config); - $this->setupFilters($config); - } - - protected function setupFilters($config) { - foreach ($this->registeredFilters as $name => $filter) { - $conf = $config->get('URI', $name); - if ($conf !== false && $conf !== null) { - $this->addFilter($filter, $config); - } - } - unset($this->registeredFilters); - } - - protected function setupMemberVariables($config) { - $this->host = $config->get('URI', 'Host'); - $base_uri = $config->get('URI', 'Base'); - if (!is_null($base_uri)) { - $parser = new HTMLPurifier_URIParser(); - $this->base = $parser->parse($base_uri); - $this->defaultScheme = $this->base->scheme; - if (is_null($this->host)) $this->host = $this->base->host; - } - if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get('URI', 'DefaultScheme'); - } - - public function filter(&$uri, $config, $context) { - foreach ($this->filters as $name => $f) { - $result = $f->filter($uri, $config, $context); - if (!$result) return false; - } - return true; - } - - public function postFilter(&$uri, $config, $context) { - foreach ($this->postFilters as $name => $f) { - $result = $f->filter($uri, $config, $context); - if (!$result) return false; - } - return true; - } - -} - -// vim: et sw=4 sts=4 +<?php + +class HTMLPurifier_URIDefinition extends HTMLPurifier_Definition +{ + + public $type = 'URI'; + protected $filters = array(); + protected $postFilters = array(); + protected $registeredFilters = array(); + + /** + * HTMLPurifier_URI object of the base specified at %URI.Base + */ + public $base; + + /** + * String host to consider "home" base, derived off of $base + */ + public $host; + + /** + * Name of default scheme based on %URI.DefaultScheme and %URI.Base + */ + public $defaultScheme; + + public function __construct() + { + $this->registerFilter(new HTMLPurifier_URIFilter_DisableExternal()); + $this->registerFilter(new HTMLPurifier_URIFilter_DisableExternalResources()); + $this->registerFilter(new HTMLPurifier_URIFilter_DisableResources()); + $this->registerFilter(new HTMLPurifier_URIFilter_HostBlacklist()); + $this->registerFilter(new HTMLPurifier_URIFilter_SafeIframe()); + $this->registerFilter(new HTMLPurifier_URIFilter_MakeAbsolute()); + $this->registerFilter(new HTMLPurifier_URIFilter_Munge()); + } + + public function registerFilter($filter) + { + $this->registeredFilters[$filter->name] = $filter; + } + + public function addFilter($filter, $config) + { + $r = $filter->prepare($config); + if ($r === false) return; // null is ok, for backwards compat + if ($filter->post) { + $this->postFilters[$filter->name] = $filter; + } else { + $this->filters[$filter->name] = $filter; + } + } + + protected function doSetup($config) + { + $this->setupMemberVariables($config); + $this->setupFilters($config); + } + + protected function setupFilters($config) + { + foreach ($this->registeredFilters as $name => $filter) { + if ($filter->always_load) { + $this->addFilter($filter, $config); + } else { + $conf = $config->get('URI.' . $name); + if ($conf !== false && $conf !== null) { + $this->addFilter($filter, $config); + } + } + } + unset($this->registeredFilters); + } + + protected function setupMemberVariables($config) + { + $this->host = $config->get('URI.Host'); + $base_uri = $config->get('URI.Base'); + if (!is_null($base_uri)) { + $parser = new HTMLPurifier_URIParser(); + $this->base = $parser->parse($base_uri); + $this->defaultScheme = $this->base->scheme; + if (is_null($this->host)) $this->host = $this->base->host; + } + if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get('URI.DefaultScheme'); + } + + public function getDefaultScheme($config, $context) + { + return HTMLPurifier_URISchemeRegistry::instance()->getScheme($this->defaultScheme, $config, $context); + } + + public function filter(&$uri, $config, $context) + { + foreach ($this->filters as $name => $f) { + $result = $f->filter($uri, $config, $context); + if (!$result) return false; + } + return true; + } + + public function postFilter(&$uri, $config, $context) + { + foreach ($this->postFilters as $name => $f) { + $result = $f->filter($uri, $config, $context); + if (!$result) return false; + } + return true; + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..0333ea3415135d97abdcc75f521e7c231a2b66fa --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter.php @@ -0,0 +1,74 @@ +<?php + +/** + * Chainable filters for custom URI processing. + * + * These filters can perform custom actions on a URI filter object, + * including transformation or blacklisting. A filter named Foo + * must have a corresponding configuration directive %URI.Foo, + * unless always_load is specified to be true. + * + * The following contexts may be available while URIFilters are being + * processed: + * + * - EmbeddedURI: true if URI is an embedded resource that will + * be loaded automatically on page load + * - CurrentToken: a reference to the token that is currently + * being processed + * - CurrentAttr: the name of the attribute that is currently being + * processed + * - CurrentCSSProperty: the name of the CSS property that is + * currently being processed (if applicable) + * + * @warning This filter is called before scheme object validation occurs. + * Make sure, if you require a specific scheme object, you + * you check that it exists. This allows filters to convert + * proprietary URI schemes into regular ones. + */ +abstract class HTMLPurifier_URIFilter +{ + + /** + * Unique identifier of filter. + * @type string + */ + public $name; + + /** + * True if this filter should be run after scheme validation. + * @type bool + */ + public $post = false; + + /** + * True if this filter should always be loaded. + * This permits a filter to be named Foo without the corresponding + * %URI.Foo directive existing. + * @type bool + */ + public $always_load = false; + + /** + * Performs initialization for the filter. If the filter returns + * false, this means that it shouldn't be considered active. + * @param HTMLPurifier_Config $config + * @return bool + */ + public function prepare($config) + { + return true; + } + + /** + * Filter a URI object + * @param HTMLPurifier_URI $uri Reference to URI object variable + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool Whether or not to continue processing: false indicates + * URL is no good, true indicates continue processing. Note that + * all changes are committed directly on the URI object + */ + abstract public function filter(&$uri, $config, $context); +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternal.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternal.php new file mode 100644 index 0000000000000000000000000000000000000000..52e12977eaa09ceff6f03701dc2fcd3ee797ba35 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternal.php @@ -0,0 +1,54 @@ +<?php + +class HTMLPurifier_URIFilter_DisableExternal extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'DisableExternal'; + + /** + * @type array + */ + protected $ourHostParts = false; + + /** + * @param HTMLPurifier_Config $config + * @return void + */ + public function prepare($config) + { + $our_host = $config->getDefinition('URI')->host; + if ($our_host !== null) { + $this->ourHostParts = array_reverse(explode('.', $our_host)); + } + } + + /** + * @param HTMLPurifier_URI $uri Reference + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + if (is_null($uri->host)) { + return true; + } + if ($this->ourHostParts === false) { + return false; + } + $host_parts = array_reverse(explode('.', $uri->host)); + foreach ($this->ourHostParts as $i => $x) { + if (!isset($host_parts[$i])) { + return false; + } + if ($host_parts[$i] != $this->ourHostParts[$i]) { + return false; + } + } + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternalResources.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternalResources.php new file mode 100644 index 0000000000000000000000000000000000000000..22697d71ec3593dfe99bbece8b7fffe3a3bec655 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableExternalResources.php @@ -0,0 +1,25 @@ +<?php + +class HTMLPurifier_URIFilter_DisableExternalResources extends HTMLPurifier_URIFilter_DisableExternal +{ + /** + * @type string + */ + public $name = 'DisableExternalResources'; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + if (!$context->get('EmbeddedURI', true)) { + return true; + } + return parent::filter($uri, $config, $context); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableResources.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableResources.php new file mode 100644 index 0000000000000000000000000000000000000000..bdae9552954140247aa56d6bb596f5b942a26b9a --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/DisableResources.php @@ -0,0 +1,22 @@ +<?php + +class HTMLPurifier_URIFilter_DisableResources extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'DisableResources'; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + return !$context->get('EmbeddedURI', true); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/HostBlacklist.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/HostBlacklist.php new file mode 100644 index 0000000000000000000000000000000000000000..54980b6eb077df4cc9866882bcc48cadcbce8107 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/HostBlacklist.php @@ -0,0 +1,46 @@ +<?php + +// It's not clear to me whether or not Punycode means that hostnames +// do not have canonical forms anymore. As far as I can tell, it's +// not a problem (punycoding should be identity when no Unicode +// points are involved), but I'm not 100% sure +class HTMLPurifier_URIFilter_HostBlacklist extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'HostBlacklist'; + + /** + * @type array + */ + protected $blacklist = array(); + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function prepare($config) + { + $this->blacklist = $config->get('URI.HostBlacklist'); + return true; + } + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + foreach ($this->blacklist as $blacklisted_host_fragment) { + if (strpos($uri->host, $blacklisted_host_fragment) !== false) { + return false; + } + } + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/MakeAbsolute.php similarity index 68% rename from libraries/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/MakeAbsolute.php index f46ab2630d443bf990ec42dab7ab37cfacb163ab..c873bce963d33620e84781b6f48d8dec453cb642 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/MakeAbsolute.php @@ -1,114 +1,158 @@ -<?php - -// does not support network paths - -class HTMLPurifier_URIFilter_MakeAbsolute extends HTMLPurifier_URIFilter -{ - public $name = 'MakeAbsolute'; - protected $base; - protected $basePathStack = array(); - public function prepare($config) { - $def = $config->getDefinition('URI'); - $this->base = $def->base; - if (is_null($this->base)) { - trigger_error('URI.MakeAbsolute is being ignored due to lack of value for URI.Base configuration', E_USER_WARNING); - return false; - } - $this->base->fragment = null; // fragment is invalid for base URI - $stack = explode('/', $this->base->path); - array_pop($stack); // discard last segment - $stack = $this->_collapseStack($stack); // do pre-parsing - $this->basePathStack = $stack; - return true; - } - public function filter(&$uri, $config, $context) { - if (is_null($this->base)) return true; // abort early - if ( - $uri->path === '' && is_null($uri->scheme) && - is_null($uri->host) && is_null($uri->query) && is_null($uri->fragment) - ) { - // reference to current document - $uri = clone $this->base; - return true; - } - if (!is_null($uri->scheme)) { - // absolute URI already: don't change - if (!is_null($uri->host)) return true; - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) { - // scheme not recognized - return false; - } - if (!$scheme_obj->hierarchical) { - // non-hierarchal URI with explicit scheme, don't change - return true; - } - // special case: had a scheme but always is hierarchical and had no authority - } - if (!is_null($uri->host)) { - // network path, don't bother - return true; - } - if ($uri->path === '') { - $uri->path = $this->base->path; - } elseif ($uri->path[0] !== '/') { - // relative path, needs more complicated processing - $stack = explode('/', $uri->path); - $new_stack = array_merge($this->basePathStack, $stack); - if ($new_stack[0] !== '' && !is_null($this->base->host)) { - array_unshift($new_stack, ''); - } - $new_stack = $this->_collapseStack($new_stack); - $uri->path = implode('/', $new_stack); - } else { - // absolute path, but still we should collapse - $uri->path = implode('/', $this->_collapseStack(explode('/', $uri->path))); - } - // re-combine - $uri->scheme = $this->base->scheme; - if (is_null($uri->userinfo)) $uri->userinfo = $this->base->userinfo; - if (is_null($uri->host)) $uri->host = $this->base->host; - if (is_null($uri->port)) $uri->port = $this->base->port; - return true; - } - - /** - * Resolve dots and double-dots in a path stack - */ - private function _collapseStack($stack) { - $result = array(); - $is_folder = false; - for ($i = 0; isset($stack[$i]); $i++) { - $is_folder = false; - // absorb an internally duplicated slash - if ($stack[$i] == '' && $i && isset($stack[$i+1])) continue; - if ($stack[$i] == '..') { - if (!empty($result)) { - $segment = array_pop($result); - if ($segment === '' && empty($result)) { - // error case: attempted to back out too far: - // restore the leading slash - $result[] = ''; - } elseif ($segment === '..') { - $result[] = '..'; // cannot remove .. with .. - } - } else { - // relative path, preserve the double-dots - $result[] = '..'; - } - $is_folder = true; - continue; - } - if ($stack[$i] == '.') { - // silently absorb - $is_folder = true; - continue; - } - $result[] = $stack[$i]; - } - if ($is_folder) $result[] = ''; - return $result; - } -} - -// vim: et sw=4 sts=4 +<?php + +// does not support network paths + +class HTMLPurifier_URIFilter_MakeAbsolute extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'MakeAbsolute'; + + /** + * @type + */ + protected $base; + + /** + * @type array + */ + protected $basePathStack = array(); + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function prepare($config) + { + $def = $config->getDefinition('URI'); + $this->base = $def->base; + if (is_null($this->base)) { + trigger_error( + 'URI.MakeAbsolute is being ignored due to lack of ' . + 'value for URI.Base configuration', + E_USER_WARNING + ); + return false; + } + $this->base->fragment = null; // fragment is invalid for base URI + $stack = explode('/', $this->base->path); + array_pop($stack); // discard last segment + $stack = $this->_collapseStack($stack); // do pre-parsing + $this->basePathStack = $stack; + return true; + } + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + if (is_null($this->base)) { + return true; + } // abort early + if ($uri->path === '' && is_null($uri->scheme) && + is_null($uri->host) && is_null($uri->query) && is_null($uri->fragment)) { + // reference to current document + $uri = clone $this->base; + return true; + } + if (!is_null($uri->scheme)) { + // absolute URI already: don't change + if (!is_null($uri->host)) { + return true; + } + $scheme_obj = $uri->getSchemeObj($config, $context); + if (!$scheme_obj) { + // scheme not recognized + return false; + } + if (!$scheme_obj->hierarchical) { + // non-hierarchal URI with explicit scheme, don't change + return true; + } + // special case: had a scheme but always is hierarchical and had no authority + } + if (!is_null($uri->host)) { + // network path, don't bother + return true; + } + if ($uri->path === '') { + $uri->path = $this->base->path; + } elseif ($uri->path[0] !== '/') { + // relative path, needs more complicated processing + $stack = explode('/', $uri->path); + $new_stack = array_merge($this->basePathStack, $stack); + if ($new_stack[0] !== '' && !is_null($this->base->host)) { + array_unshift($new_stack, ''); + } + $new_stack = $this->_collapseStack($new_stack); + $uri->path = implode('/', $new_stack); + } else { + // absolute path, but still we should collapse + $uri->path = implode('/', $this->_collapseStack(explode('/', $uri->path))); + } + // re-combine + $uri->scheme = $this->base->scheme; + if (is_null($uri->userinfo)) { + $uri->userinfo = $this->base->userinfo; + } + if (is_null($uri->host)) { + $uri->host = $this->base->host; + } + if (is_null($uri->port)) { + $uri->port = $this->base->port; + } + return true; + } + + /** + * Resolve dots and double-dots in a path stack + * @param array $stack + * @return array + */ + private function _collapseStack($stack) + { + $result = array(); + $is_folder = false; + for ($i = 0; isset($stack[$i]); $i++) { + $is_folder = false; + // absorb an internally duplicated slash + if ($stack[$i] == '' && $i && isset($stack[$i + 1])) { + continue; + } + if ($stack[$i] == '..') { + if (!empty($result)) { + $segment = array_pop($result); + if ($segment === '' && empty($result)) { + // error case: attempted to back out too far: + // restore the leading slash + $result[] = ''; + } elseif ($segment === '..') { + $result[] = '..'; // cannot remove .. with .. + } + } else { + // relative path, preserve the double-dots + $result[] = '..'; + } + $is_folder = true; + continue; + } + if ($stack[$i] == '.') { + // silently absorb + $is_folder = true; + continue; + } + $result[] = $stack[$i]; + } + if ($is_folder) { + $result[] = ''; + } + return $result; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/Munge.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/Munge.php new file mode 100644 index 0000000000000000000000000000000000000000..4b4f0cf72d1e883c29c240eb730613eea59c9d3e --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/Munge.php @@ -0,0 +1,115 @@ +<?php + +class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'Munge'; + + /** + * @type bool + */ + public $post = true; + + /** + * @type string + */ + private $target; + + /** + * @type HTMLPurifier_URIParser + */ + private $parser; + + /** + * @type bool + */ + private $doEmbed; + + /** + * @type string + */ + private $secretKey; + + /** + * @type array + */ + protected $replace = array(); + + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function prepare($config) + { + $this->target = $config->get('URI.' . $this->name); + $this->parser = new HTMLPurifier_URIParser(); + $this->doEmbed = $config->get('URI.MungeResources'); + $this->secretKey = $config->get('URI.MungeSecretKey'); + if ($this->secretKey && !function_exists('hash_hmac')) { + throw new Exception("Cannot use %URI.MungeSecretKey without hash_hmac support."); + } + return true; + } + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + if ($context->get('EmbeddedURI', true) && !$this->doEmbed) { + return true; + } + + $scheme_obj = $uri->getSchemeObj($config, $context); + if (!$scheme_obj) { + return true; + } // ignore unknown schemes, maybe another postfilter did it + if (!$scheme_obj->browsable) { + return true; + } // ignore non-browseable schemes, since we can't munge those in a reasonable way + if ($uri->isBenign($config, $context)) { + return true; + } // don't redirect if a benign URL + + $this->makeReplace($uri, $config, $context); + $this->replace = array_map('rawurlencode', $this->replace); + + $new_uri = strtr($this->target, $this->replace); + $new_uri = $this->parser->parse($new_uri); + // don't redirect if the target host is the same as the + // starting host + if ($uri->host === $new_uri->host) { + return true; + } + $uri = $new_uri; // overwrite + return true; + } + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + */ + protected function makeReplace($uri, $config, $context) + { + $string = $uri->toString(); + // always available + $this->replace['%s'] = $string; + $this->replace['%r'] = $context->get('EmbeddedURI', true); + $token = $context->get('CurrentToken', true); + $this->replace['%n'] = $token ? $token->name : null; + $this->replace['%m'] = $context->get('CurrentAttr', true); + $this->replace['%p'] = $context->get('CurrentCSSProperty', true); + // not always available + if ($this->secretKey) { + $this->replace['%t'] = hash_hmac("sha256", $string, $this->secretKey); + } + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/SafeIframe.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/SafeIframe.php new file mode 100644 index 0000000000000000000000000000000000000000..5ecb9567bacb7264012c7386124b22ee19a797ad --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIFilter/SafeIframe.php @@ -0,0 +1,68 @@ +<?php + +/** + * Implements safety checks for safe iframes. + * + * @warning This filter is *critical* for ensuring that %HTML.SafeIframe + * works safely. + */ +class HTMLPurifier_URIFilter_SafeIframe extends HTMLPurifier_URIFilter +{ + /** + * @type string + */ + public $name = 'SafeIframe'; + + /** + * @type bool + */ + public $always_load = true; + + /** + * @type string + */ + protected $regexp = null; + + // XXX: The not so good bit about how this is all set up now is we + // can't check HTML.SafeIframe in the 'prepare' step: we have to + // defer till the actual filtering. + /** + * @param HTMLPurifier_Config $config + * @return bool + */ + public function prepare($config) + { + $this->regexp = $config->get('URI.SafeIframeRegexp'); + return true; + } + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function filter(&$uri, $config, $context) + { + // check if filter not applicable + if (!$config->get('HTML.SafeIframe')) { + return true; + } + // check if the filter should actually trigger + if (!$context->get('EmbeddedURI', true)) { + return true; + } + $token = $context->get('CurrentToken', true); + if (!($token && $token->name == 'iframe')) { + return true; + } + // check if we actually have some whitelists enabled + if ($this->regexp === null) { + return false; + } + // actually check the whitelists + return preg_match($this->regexp, $uri->toString()); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIParser.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIParser.php similarity index 91% rename from libraries/htmlpurifier/library/HTMLPurifier/URIParser.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIParser.php index 7179e4ab8991077aa2ff4b3a4fca0a4eafd416e0..699978dcb9a33d15d0e16271857d60886d0bd338 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIParser.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIParser.php @@ -1,70 +1,71 @@ -<?php - -/** - * Parses a URI into the components and fragment identifier as specified - * by RFC 3986. - */ -class HTMLPurifier_URIParser -{ - - /** - * Instance of HTMLPurifier_PercentEncoder to do normalization with. - */ - protected $percentEncoder; - - public function __construct() { - $this->percentEncoder = new HTMLPurifier_PercentEncoder(); - } - - /** - * Parses a URI. - * @param $uri string URI to parse - * @return HTMLPurifier_URI representation of URI. This representation has - * not been validated yet and may not conform to RFC. - */ - public function parse($uri) { - - $uri = $this->percentEncoder->normalize($uri); - - // Regexp is as per Appendix B. - // Note that ["<>] are an addition to the RFC's recommended - // characters, because they represent external delimeters. - $r_URI = '!'. - '(([^:/?#"<>]+):)?'. // 2. Scheme - '(//([^/?#"<>]*))?'. // 4. Authority - '([^?#"<>]*)'. // 5. Path - '(\?([^#"<>]*))?'. // 7. Query - '(#([^"<>]*))?'. // 8. Fragment - '!'; - - $matches = array(); - $result = preg_match($r_URI, $uri, $matches); - - if (!$result) return false; // *really* invalid URI - - // seperate out parts - $scheme = !empty($matches[1]) ? $matches[2] : null; - $authority = !empty($matches[3]) ? $matches[4] : null; - $path = $matches[5]; // always present, can be empty - $query = !empty($matches[6]) ? $matches[7] : null; - $fragment = !empty($matches[8]) ? $matches[9] : null; - - // further parse authority - if ($authority !== null) { - $r_authority = "/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/"; - $matches = array(); - preg_match($r_authority, $authority, $matches); - $userinfo = !empty($matches[1]) ? $matches[2] : null; - $host = !empty($matches[3]) ? $matches[3] : ''; - $port = !empty($matches[4]) ? (int) $matches[5] : null; - } else { - $port = $host = $userinfo = null; - } - - return new HTMLPurifier_URI( - $scheme, $userinfo, $host, $port, $path, $query, $fragment); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Parses a URI into the components and fragment identifier as specified + * by RFC 3986. + */ +class HTMLPurifier_URIParser +{ + + /** + * Instance of HTMLPurifier_PercentEncoder to do normalization with. + */ + protected $percentEncoder; + + public function __construct() + { + $this->percentEncoder = new HTMLPurifier_PercentEncoder(); + } + + /** + * Parses a URI. + * @param $uri string URI to parse + * @return HTMLPurifier_URI representation of URI. This representation has + * not been validated yet and may not conform to RFC. + */ + public function parse($uri) + { + $uri = $this->percentEncoder->normalize($uri); + + // Regexp is as per Appendix B. + // Note that ["<>] are an addition to the RFC's recommended + // characters, because they represent external delimeters. + $r_URI = '!'. + '(([a-zA-Z0-9\.\+\-]+):)?'. // 2. Scheme + '(//([^/?#"<>]*))?'. // 4. Authority + '([^?#"<>]*)'. // 5. Path + '(\?([^#"<>]*))?'. // 7. Query + '(#([^"<>]*))?'. // 8. Fragment + '!'; + + $matches = array(); + $result = preg_match($r_URI, $uri, $matches); + + if (!$result) return false; // *really* invalid URI + + // seperate out parts + $scheme = !empty($matches[1]) ? $matches[2] : null; + $authority = !empty($matches[3]) ? $matches[4] : null; + $path = $matches[5]; // always present, can be empty + $query = !empty($matches[6]) ? $matches[7] : null; + $fragment = !empty($matches[8]) ? $matches[9] : null; + + // further parse authority + if ($authority !== null) { + $r_authority = "/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/"; + $matches = array(); + preg_match($r_authority, $authority, $matches); + $userinfo = !empty($matches[1]) ? $matches[2] : null; + $host = !empty($matches[3]) ? $matches[3] : ''; + $port = !empty($matches[4]) ? (int) $matches[5] : null; + } else { + $port = $host = $userinfo = null; + } + + return new HTMLPurifier_URI( + $scheme, $userinfo, $host, $port, $path, $query, $fragment); + } + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme.php new file mode 100644 index 0000000000000000000000000000000000000000..03602abe6d28a1e399a32d604da8f2f42a2680e1 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme.php @@ -0,0 +1,102 @@ +<?php + +/** + * Validator for the components of a URI for a specific scheme + */ +abstract class HTMLPurifier_URIScheme +{ + + /** + * Scheme's default port (integer). If an explicit port number is + * specified that coincides with the default port, it will be + * elided. + * @type int + */ + public $default_port = null; + + /** + * Whether or not URIs of this scheme are locatable by a browser + * http and ftp are accessible, while mailto and news are not. + * @type bool + */ + public $browsable = false; + + /** + * Whether or not data transmitted over this scheme is encrypted. + * https is secure, http is not. + * @type bool + */ + public $secure = false; + + /** + * Whether or not the URI always uses <hier_part>, resolves edge cases + * with making relative URIs absolute + * @type bool + */ + public $hierarchical = false; + + /** + * Whether or not the URI may omit a hostname when the scheme is + * explicitly specified, ala file:///path/to/file. As of writing, + * 'file' is the only scheme that browsers support his properly. + * @type bool + */ + public $may_omit_host = false; + + /** + * Validates the components of a URI for a specific scheme. + * @param HTMLPurifier_URI $uri Reference to a HTMLPurifier_URI object + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool success or failure + */ + abstract public function doValidate(&$uri, $config, $context); + + /** + * Public interface for validating components of a URI. Performs a + * bunch of default actions. Don't overload this method. + * @param HTMLPurifier_URI $uri Reference to a HTMLPurifier_URI object + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool success or failure + */ + public function validate(&$uri, $config, $context) + { + if ($this->default_port == $uri->port) { + $uri->port = null; + } + // kludge: browsers do funny things when the scheme but not the + // authority is set + if (!$this->may_omit_host && + // if the scheme is present, a missing host is always in error + (!is_null($uri->scheme) && ($uri->host === '' || is_null($uri->host))) || + // if the scheme is not present, a *blank* host is in error, + // since this translates into '///path' which most browsers + // interpret as being 'http://path'. + (is_null($uri->scheme) && $uri->host === '') + ) { + do { + if (is_null($uri->scheme)) { + if (substr($uri->path, 0, 2) != '//') { + $uri->host = null; + break; + } + // URI is '////path', so we cannot nullify the + // host to preserve semantics. Try expanding the + // hostname instead (fall through) + } + // first see if we can manually insert a hostname + $host = $config->get('URI.Host'); + if (!is_null($host)) { + $uri->host = $host; + } else { + // we can't do anything sensible, reject the URL. + return false; + } + } while (false); + } + return $this->doValidate($uri, $config, $context); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/data.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/data.php new file mode 100644 index 0000000000000000000000000000000000000000..f854ba05278260f5d45cfca2b688f087c1974484 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/data.php @@ -0,0 +1,136 @@ +<?php + +/** + * Implements data: URI for base64 encoded images supported by GD. + */ +class HTMLPurifier_URIScheme_data extends HTMLPurifier_URIScheme +{ + /** + * @type bool + */ + public $browsable = true; + + /** + * @type array + */ + public $allowed_types = array( + // you better write validation code for other types if you + // decide to allow them + 'image/jpeg' => true, + 'image/gif' => true, + 'image/png' => true, + ); + // this is actually irrelevant since we only write out the path + // component + /** + * @type bool + */ + public $may_omit_host = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $result = explode(',', $uri->path, 2); + $is_base64 = false; + $charset = null; + $content_type = null; + if (count($result) == 2) { + list($metadata, $data) = $result; + // do some legwork on the metadata + $metas = explode(';', $metadata); + while (!empty($metas)) { + $cur = array_shift($metas); + if ($cur == 'base64') { + $is_base64 = true; + break; + } + if (substr($cur, 0, 8) == 'charset=') { + // doesn't match if there are arbitrary spaces, but + // whatever dude + if ($charset !== null) { + continue; + } // garbage + $charset = substr($cur, 8); // not used + } else { + if ($content_type !== null) { + continue; + } // garbage + $content_type = $cur; + } + } + } else { + $data = $result[0]; + } + if ($content_type !== null && empty($this->allowed_types[$content_type])) { + return false; + } + if ($charset !== null) { + // error; we don't allow plaintext stuff + $charset = null; + } + $data = rawurldecode($data); + if ($is_base64) { + $raw_data = base64_decode($data); + } else { + $raw_data = $data; + } + if ( strlen($raw_data) < 12 ) { + // error; exif_imagetype throws exception with small files, + // and this likely indicates a corrupt URI/failed parse anyway + return false; + } + // XXX probably want to refactor this into a general mechanism + // for filtering arbitrary content types + if (function_exists('sys_get_temp_dir')) { + $file = tempnam(sys_get_temp_dir(), ""); + } else { + $file = tempnam("/tmp", ""); + } + file_put_contents($file, $raw_data); + if (function_exists('exif_imagetype')) { + $image_code = exif_imagetype($file); + unlink($file); + } elseif (function_exists('getimagesize')) { + set_error_handler(array($this, 'muteErrorHandler')); + $info = getimagesize($file); + restore_error_handler(); + unlink($file); + if ($info == false) { + return false; + } + $image_code = $info[2]; + } else { + trigger_error("could not find exif_imagetype or getimagesize functions", E_USER_ERROR); + } + $real_content_type = image_type_to_mime_type($image_code); + if ($real_content_type != $content_type) { + // we're nice guys; if the content type is something else we + // support, change it over + if (empty($this->allowed_types[$real_content_type])) { + return false; + } + $content_type = $real_content_type; + } + // ok, it's kosher, rewrite what we need + $uri->userinfo = null; + $uri->host = null; + $uri->port = null; + $uri->fragment = null; + $uri->query = null; + $uri->path = "$content_type;base64," . base64_encode($raw_data); + return true; + } + + /** + * @param int $errno + * @param string $errstr + */ + public function muteErrorHandler($errno, $errstr) + { + } +} diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/file.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/file.php new file mode 100644 index 0000000000000000000000000000000000000000..a220a6ad40803e4057b18da4cba4227b7042f8f7 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/file.php @@ -0,0 +1,44 @@ +<?php + +/** + * Validates file as defined by RFC 1630 and RFC 1738. + */ +class HTMLPurifier_URIScheme_file extends HTMLPurifier_URIScheme +{ + /** + * Generally file:// URLs are not accessible from most + * machines, so placing them as an img src is incorrect. + * @type bool + */ + public $browsable = false; + + /** + * Basically the *only* URI scheme for which this is true, since + * accessing files on the local machine is very common. In fact, + * browsers on some operating systems don't understand the + * authority, though I hear it is used on Windows to refer to + * network shares. + * @type bool + */ + public $may_omit_host = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + // Authentication method is not supported + $uri->userinfo = null; + // file:// makes no provisions for accessing the resource + $uri->port = null; + // While it seems to work on Firefox, the querystring has + // no possible effect and is thus stripped. + $uri->query = null; + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/ftp.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/ftp.php index 5849bf7ff056b4e99fd8b90cfc8566c364dde8f7..8e7fb8c3432a497cdc697f8fadbcbce5df1464a0 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/ftp.php @@ -1,43 +1,58 @@ -<?php - -/** - * Validates ftp (File Transfer Protocol) URIs as defined by generic RFC 1738. - */ -class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme { - - public $default_port = 21; - public $browsable = true; // usually - public $hierarchical = true; - - public function validate(&$uri, $config, $context) { - parent::validate($uri, $config, $context); - $uri->query = null; - - // typecode check - $semicolon_pos = strrpos($uri->path, ';'); // reverse - if ($semicolon_pos !== false) { - $type = substr($uri->path, $semicolon_pos + 1); // no semicolon - $uri->path = substr($uri->path, 0, $semicolon_pos); - $type_ret = ''; - if (strpos($type, '=') !== false) { - // figure out whether or not the declaration is correct - list($key, $typecode) = explode('=', $type, 2); - if ($key !== 'type') { - // invalid key, tack it back on encoded - $uri->path .= '%3B' . $type; - } elseif ($typecode === 'a' || $typecode === 'i' || $typecode === 'd') { - $type_ret = ";type=$typecode"; - } - } else { - $uri->path .= '%3B' . $type; - } - $uri->path = str_replace(';', '%3B', $uri->path); - $uri->path .= $type_ret; - } - - return true; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates ftp (File Transfer Protocol) URIs as defined by generic RFC 1738. + */ +class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme +{ + /** + * @type int + */ + public $default_port = 21; + + /** + * @type bool + */ + public $browsable = true; // usually + + /** + * @type bool + */ + public $hierarchical = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->query = null; + + // typecode check + $semicolon_pos = strrpos($uri->path, ';'); // reverse + if ($semicolon_pos !== false) { + $type = substr($uri->path, $semicolon_pos + 1); // no semicolon + $uri->path = substr($uri->path, 0, $semicolon_pos); + $type_ret = ''; + if (strpos($type, '=') !== false) { + // figure out whether or not the declaration is correct + list($key, $typecode) = explode('=', $type, 2); + if ($key !== 'type') { + // invalid key, tack it back on encoded + $uri->path .= '%3B' . $type; + } elseif ($typecode === 'a' || $typecode === 'i' || $typecode === 'd') { + $type_ret = ";type=$typecode"; + } + } else { + $uri->path .= '%3B' . $type; + } + $uri->path = str_replace(';', '%3B', $uri->path); + $uri->path .= $type_ret; + } + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/http.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/http.php new file mode 100644 index 0000000000000000000000000000000000000000..63c8c928e2956d60a528f0cbc62d6a2b431ebb60 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/http.php @@ -0,0 +1,36 @@ +<?php + +/** + * Validates http (HyperText Transfer Protocol) as defined by RFC 2616 + */ +class HTMLPurifier_URIScheme_http extends HTMLPurifier_URIScheme +{ + /** + * @type int + */ + public $default_port = 80; + + /** + * @type bool + */ + public $browsable = true; + + /** + * @type bool + */ + public $hierarchical = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->userinfo = null; + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/https.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/https.php similarity index 61% rename from libraries/htmlpurifier/library/HTMLPurifier/URIScheme/https.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/https.php index 29e380919f0d746e2e7d41c27002f2582b9a4826..4de39090d5f716bed65b38a70957dfc2563d27a6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/https.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/https.php @@ -1,12 +1,18 @@ -<?php - -/** - * Validates https (Secure HTTP) according to http scheme. - */ -class HTMLPurifier_URIScheme_https extends HTMLPurifier_URIScheme_http { - - public $default_port = 443; - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Validates https (Secure HTTP) according to http scheme. + */ +class HTMLPurifier_URIScheme_https extends HTMLPurifier_URIScheme_http +{ + /** + * @type int + */ + public $default_port = 443; + /** + * @type bool + */ + public $secure = true; +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/mailto.php similarity index 60% rename from libraries/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/mailto.php index c1e2cd5aae16eb3a37619b139c19246539c602c4..b8a40d7e0966f7241cdf0c2ffe0a632bbe9f50f7 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/mailto.php @@ -1,27 +1,40 @@ -<?php - -// VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the -// email is valid, but be careful! - -/** - * Validates mailto (for E-mail) according to RFC 2368 - * @todo Validate the email address - * @todo Filter allowed query parameters - */ - -class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme { - - public $browsable = false; - - public function validate(&$uri, $config, $context) { - parent::validate($uri, $config, $context); - $uri->userinfo = null; - $uri->host = null; - $uri->port = null; - // we need to validate path against RFC 2368's addr-spec - return true; - } - -} - -// vim: et sw=4 sts=4 +<?php + +// VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the +// email is valid, but be careful! + +/** + * Validates mailto (for E-mail) according to RFC 2368 + * @todo Validate the email address + * @todo Filter allowed query parameters + */ + +class HTMLPurifier_URIScheme_mailto extends HTMLPurifier_URIScheme +{ + /** + * @type bool + */ + public $browsable = false; + + /** + * @type bool + */ + public $may_omit_host = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->userinfo = null; + $uri->host = null; + $uri->port = null; + // we need to validate path against RFC 2368's addr-spec + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/news.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/news.php new file mode 100644 index 0000000000000000000000000000000000000000..22c9ebc53cb9490f7d610f22c632d53e9219a36f --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/news.php @@ -0,0 +1,35 @@ +<?php + +/** + * Validates news (Usenet) as defined by generic RFC 1738 + */ +class HTMLPurifier_URIScheme_news extends HTMLPurifier_URIScheme +{ + /** + * @type bool + */ + public $browsable = false; + + /** + * @type bool + */ + public $may_omit_host = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->userinfo = null; + $uri->host = null; + $uri->port = null; + $uri->query = null; + // typecode check needed on path + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/nntp.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/nntp.php new file mode 100644 index 0000000000000000000000000000000000000000..803ed1381911409e5f9f8089a94f394afe9afb83 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/nntp.php @@ -0,0 +1,32 @@ +<?php + +/** + * Validates nntp (Network News Transfer Protocol) as defined by generic RFC 1738 + */ +class HTMLPurifier_URIScheme_nntp extends HTMLPurifier_URIScheme +{ + /** + * @type int + */ + public $default_port = 119; + + /** + * @type bool + */ + public $browsable = false; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->userinfo = null; + $uri->query = null; + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/tel.php b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/tel.php new file mode 100644 index 0000000000000000000000000000000000000000..02f223bb3b1d02a273e7351b87958c38a55d5b98 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URIScheme/tel.php @@ -0,0 +1,46 @@ +<?php + +/** + * Validates tel (for phone numbers). + * + * The relevant specifications for this protocol are RFC 3966 and RFC 5341, + * but this class takes a much simpler approach: we normalize phone + * numbers so that they only include (possibly) a leading plus, + * and then any number of digits and x'es. + */ + +class HTMLPurifier_URIScheme_tel extends HTMLPurifier_URIScheme +{ + /** + * @type bool + */ + public $browsable = false; + + /** + * @type bool + */ + public $may_omit_host = true; + + /** + * @param HTMLPurifier_URI $uri + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return bool + */ + public function doValidate(&$uri, $config, $context) + { + $uri->userinfo = null; + $uri->host = null; + $uri->port = null; + + // Delete all non-numeric characters, non-x characters + // from phone number, EXCEPT for a leading plus sign. + $uri->path = preg_replace('/(?!^\+)[^\dx]/', '', + // Normalize e(x)tension to lower-case + str_replace('X', 'x', $uri->path)); + + return true; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php b/libraries/htmlpurifier410/library/HTMLPurifier/URISchemeRegistry.php similarity index 51% rename from libraries/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php rename to libraries/htmlpurifier410/library/HTMLPurifier/URISchemeRegistry.php index d24732c1829b894e0c43c24e2382974f3ce722f3..24280638a21e171160d536a5aa6568288160ffbe 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/URISchemeRegistry.php @@ -1,69 +1,81 @@ -<?php - -/** - * Registry for retrieving specific URI scheme validator objects. - */ -class HTMLPurifier_URISchemeRegistry -{ - - /** - * Retrieve sole instance of the registry. - * @param $prototype Optional prototype to overload sole instance with, - * or bool true to reset to default registry. - * @note Pass a registry object $prototype with a compatible interface and - * the function will copy it and return it all further times. - */ - public static function instance($prototype = null) { - static $instance = null; - if ($prototype !== null) { - $instance = $prototype; - } elseif ($instance === null || $prototype == true) { - $instance = new HTMLPurifier_URISchemeRegistry(); - } - return $instance; - } - - /** - * Cache of retrieved schemes. - */ - protected $schemes = array(); - - /** - * Retrieves a scheme validator object - * @param $scheme String scheme name like http or mailto - * @param $config HTMLPurifier_Config object - * @param $config HTMLPurifier_Context object - */ - public function getScheme($scheme, $config, $context) { - if (!$config) $config = HTMLPurifier_Config::createDefault(); - $null = null; // for the sake of passing by reference - - // important, otherwise attacker could include arbitrary file - $allowed_schemes = $config->get('URI', 'AllowedSchemes'); - if (!$config->get('URI', 'OverrideAllowedSchemes') && - !isset($allowed_schemes[$scheme]) - ) { - return $null; - } - - if (isset($this->schemes[$scheme])) return $this->schemes[$scheme]; - if (!isset($allowed_schemes[$scheme])) return $null; - - $class = 'HTMLPurifier_URIScheme_' . $scheme; - if (!class_exists($class)) return $null; - $this->schemes[$scheme] = new $class(); - return $this->schemes[$scheme]; - } - - /** - * Registers a custom scheme to the cache, bypassing reflection. - * @param $scheme Scheme name - * @param $scheme_obj HTMLPurifier_URIScheme object - */ - public function register($scheme, $scheme_obj) { - $this->schemes[$scheme] = $scheme_obj; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Registry for retrieving specific URI scheme validator objects. + */ +class HTMLPurifier_URISchemeRegistry +{ + + /** + * Retrieve sole instance of the registry. + * @param HTMLPurifier_URISchemeRegistry $prototype Optional prototype to overload sole instance with, + * or bool true to reset to default registry. + * @return HTMLPurifier_URISchemeRegistry + * @note Pass a registry object $prototype with a compatible interface and + * the function will copy it and return it all further times. + */ + public static function instance($prototype = null) + { + static $instance = null; + if ($prototype !== null) { + $instance = $prototype; + } elseif ($instance === null || $prototype == true) { + $instance = new HTMLPurifier_URISchemeRegistry(); + } + return $instance; + } + + /** + * Cache of retrieved schemes. + * @type HTMLPurifier_URIScheme[] + */ + protected $schemes = array(); + + /** + * Retrieves a scheme validator object + * @param string $scheme String scheme name like http or mailto + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return HTMLPurifier_URIScheme + */ + public function getScheme($scheme, $config, $context) + { + if (!$config) { + $config = HTMLPurifier_Config::createDefault(); + } + + // important, otherwise attacker could include arbitrary file + $allowed_schemes = $config->get('URI.AllowedSchemes'); + if (!$config->get('URI.OverrideAllowedSchemes') && + !isset($allowed_schemes[$scheme]) + ) { + return; + } + + if (isset($this->schemes[$scheme])) { + return $this->schemes[$scheme]; + } + if (!isset($allowed_schemes[$scheme])) { + return; + } + + $class = 'HTMLPurifier_URIScheme_' . $scheme; + if (!class_exists($class)) { + return; + } + $this->schemes[$scheme] = new $class(); + return $this->schemes[$scheme]; + } + + /** + * Registers a custom scheme to the cache, bypassing reflection. + * @param string $scheme Scheme name + * @param HTMLPurifier_URIScheme $scheme_obj + */ + public function register($scheme, $scheme_obj) + { + $this->schemes[$scheme] = $scheme_obj; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/UnitConverter.php b/libraries/htmlpurifier410/library/HTMLPurifier/UnitConverter.php similarity index 72% rename from libraries/htmlpurifier/library/HTMLPurifier/UnitConverter.php rename to libraries/htmlpurifier410/library/HTMLPurifier/UnitConverter.php index 545d426220665b2c661d9068db1930e0eeac2ff0..e663b327173a7c4a520f52081a0d6064c85f19c6 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/UnitConverter.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/UnitConverter.php @@ -1,254 +1,307 @@ -<?php - -/** - * Class for converting between different unit-lengths as specified by - * CSS. - */ -class HTMLPurifier_UnitConverter -{ - - const ENGLISH = 1; - const METRIC = 2; - const DIGITAL = 3; - - /** - * Units information array. Units are grouped into measuring systems - * (English, Metric), and are assigned an integer representing - * the conversion factor between that unit and the smallest unit in - * the system. Numeric indexes are actually magical constants that - * encode conversion data from one system to the next, with a O(n^2) - * constraint on memory (this is generally not a problem, since - * the number of measuring systems is small.) - */ - protected static $units = array( - self::ENGLISH => array( - 'px' => 3, // This is as per CSS 2.1 and Firefox. Your mileage may vary - 'pt' => 4, - 'pc' => 48, - 'in' => 288, - self::METRIC => array('pt', '0.352777778', 'mm'), - ), - self::METRIC => array( - 'mm' => 1, - 'cm' => 10, - self::ENGLISH => array('mm', '2.83464567', 'pt'), - ), - ); - - /** - * Minimum bcmath precision for output. - */ - protected $outputPrecision; - - /** - * Bcmath precision for internal calculations. - */ - protected $internalPrecision; - - /** - * Whether or not BCMath is available - */ - private $bcmath; - - public function __construct($output_precision = 4, $internal_precision = 10, $force_no_bcmath = false) { - $this->outputPrecision = $output_precision; - $this->internalPrecision = $internal_precision; - $this->bcmath = !$force_no_bcmath && function_exists('bcmul'); - } - - /** - * Converts a length object of one unit into another unit. - * @param HTMLPurifier_Length $length - * Instance of HTMLPurifier_Length to convert. You must validate() - * it before passing it here! - * @param string $to_unit - * Unit to convert to. - * @note - * About precision: This conversion function pays very special - * attention to the incoming precision of values and attempts - * to maintain a number of significant figure. Results are - * fairly accurate up to nine digits. Some caveats: - * - If a number is zero-padded as a result of this significant - * figure tracking, the zeroes will be eliminated. - * - If a number contains less than four sigfigs ($outputPrecision) - * and this causes some decimals to be excluded, those - * decimals will be added on. - */ - public function convert($length, $to_unit) { - - if (!$length->isValid()) return false; - - $n = $length->getN(); - $unit = $length->getUnit(); - - if ($n === '0' || $unit === false) { - return new HTMLPurifier_Length('0', false); - } - - $state = $dest_state = false; - foreach (self::$units as $k => $x) { - if (isset($x[$unit])) $state = $k; - if (isset($x[$to_unit])) $dest_state = $k; - } - if (!$state || !$dest_state) return false; - - // Some calculations about the initial precision of the number; - // this will be useful when we need to do final rounding. - $sigfigs = $this->getSigFigs($n); - if ($sigfigs < $this->outputPrecision) $sigfigs = $this->outputPrecision; - - // BCMath's internal precision deals only with decimals. Use - // our default if the initial number has no decimals, or increase - // it by how ever many decimals, thus, the number of guard digits - // will always be greater than or equal to internalPrecision. - $log = (int) floor(log(abs($n), 10)); - $cp = ($log < 0) ? $this->internalPrecision - $log : $this->internalPrecision; // internal precision - - for ($i = 0; $i < 2; $i++) { - - // Determine what unit IN THIS SYSTEM we need to convert to - if ($dest_state === $state) { - // Simple conversion - $dest_unit = $to_unit; - } else { - // Convert to the smallest unit, pending a system shift - $dest_unit = self::$units[$state][$dest_state][0]; - } - - // Do the conversion if necessary - if ($dest_unit !== $unit) { - $factor = $this->div(self::$units[$state][$unit], self::$units[$state][$dest_unit], $cp); - $n = $this->mul($n, $factor, $cp); - $unit = $dest_unit; - } - - // Output was zero, so bail out early. Shouldn't ever happen. - if ($n === '') { - $n = '0'; - $unit = $to_unit; - break; - } - - // It was a simple conversion, so bail out - if ($dest_state === $state) { - break; - } - - if ($i !== 0) { - // Conversion failed! Apparently, the system we forwarded - // to didn't have this unit. This should never happen! - return false; - } - - // Pre-condition: $i == 0 - - // Perform conversion to next system of units - $n = $this->mul($n, self::$units[$state][$dest_state][1], $cp); - $unit = self::$units[$state][$dest_state][2]; - $state = $dest_state; - - // One more loop around to convert the unit in the new system. - - } - - // Post-condition: $unit == $to_unit - if ($unit !== $to_unit) return false; - - // Useful for debugging: - //echo "<pre>n"; - //echo "$n\nsigfigs = $sigfigs\nnew_log = $new_log\nlog = $log\nrp = $rp\n</pre>\n"; - - $n = $this->round($n, $sigfigs); - if (strpos($n, '.') !== false) $n = rtrim($n, '0'); - $n = rtrim($n, '.'); - - return new HTMLPurifier_Length($n, $unit); - } - - /** - * Returns the number of significant figures in a string number. - * @param string $n Decimal number - * @return int number of sigfigs - */ - public function getSigFigs($n) { - $n = ltrim($n, '0+-'); - $dp = strpos($n, '.'); // decimal position - if ($dp === false) { - $sigfigs = strlen(rtrim($n, '0')); - } else { - $sigfigs = strlen(ltrim($n, '0.')); // eliminate extra decimal character - if ($dp !== 0) $sigfigs--; - } - return $sigfigs; - } - - /** - * Adds two numbers, using arbitrary precision when available. - */ - private function add($s1, $s2, $scale) { - if ($this->bcmath) return bcadd($s1, $s2, $scale); - else return $this->scale($s1 + $s2, $scale); - } - - /** - * Multiples two numbers, using arbitrary precision when available. - */ - private function mul($s1, $s2, $scale) { - if ($this->bcmath) return bcmul($s1, $s2, $scale); - else return $this->scale($s1 * $s2, $scale); - } - - /** - * Divides two numbers, using arbitrary precision when available. - */ - private function div($s1, $s2, $scale) { - if ($this->bcmath) return bcdiv($s1, $s2, $scale); - else return $this->scale($s1 / $s2, $scale); - } - - /** - * Rounds a number according to the number of sigfigs it should have, - * using arbitrary precision when available. - */ - private function round($n, $sigfigs) { - $new_log = (int) floor(log(abs($n), 10)); // Number of digits left of decimal - 1 - $rp = $sigfigs - $new_log - 1; // Number of decimal places needed - $neg = $n < 0 ? '-' : ''; // Negative sign - if ($this->bcmath) { - if ($rp >= 0) { - $n = bcadd($n, $neg . '0.' . str_repeat('0', $rp) . '5', $rp + 1); - $n = bcdiv($n, '1', $rp); - } else { - // This algorithm partially depends on the standardized - // form of numbers that comes out of bcmath. - $n = bcadd($n, $neg . '5' . str_repeat('0', $new_log - $sigfigs), 0); - $n = substr($n, 0, $sigfigs + strlen($neg)) . str_repeat('0', $new_log - $sigfigs + 1); - } - return $n; - } else { - return $this->scale(round($n, $sigfigs - $new_log - 1), $rp + 1); - } - } - - /** - * Scales a float to $scale digits right of decimal point, like BCMath. - */ - private function scale($r, $scale) { - if ($scale < 0) { - // The f sprintf type doesn't support negative numbers, so we - // need to cludge things manually. First get the string. - $r = sprintf('%.0f', (float) $r); - // Due to floating point precision loss, $r will more than likely - // look something like 4652999999999.9234. We grab one more digit - // than we need to precise from $r and then use that to round - // appropriately. - $precise = (string) round(substr($r, 0, strlen($r) + $scale), -1); - // Now we return it, truncating the zero that was rounded off. - return substr($precise, 0, -1) . str_repeat('0', -$scale + 1); - } - return sprintf('%.' . $scale . 'f', (float) $r); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Class for converting between different unit-lengths as specified by + * CSS. + */ +class HTMLPurifier_UnitConverter +{ + + const ENGLISH = 1; + const METRIC = 2; + const DIGITAL = 3; + + /** + * Units information array. Units are grouped into measuring systems + * (English, Metric), and are assigned an integer representing + * the conversion factor between that unit and the smallest unit in + * the system. Numeric indexes are actually magical constants that + * encode conversion data from one system to the next, with a O(n^2) + * constraint on memory (this is generally not a problem, since + * the number of measuring systems is small.) + */ + protected static $units = array( + self::ENGLISH => array( + 'px' => 3, // This is as per CSS 2.1 and Firefox. Your mileage may vary + 'pt' => 4, + 'pc' => 48, + 'in' => 288, + self::METRIC => array('pt', '0.352777778', 'mm'), + ), + self::METRIC => array( + 'mm' => 1, + 'cm' => 10, + self::ENGLISH => array('mm', '2.83464567', 'pt'), + ), + ); + + /** + * Minimum bcmath precision for output. + * @type int + */ + protected $outputPrecision; + + /** + * Bcmath precision for internal calculations. + * @type int + */ + protected $internalPrecision; + + /** + * Whether or not BCMath is available. + * @type bool + */ + private $bcmath; + + public function __construct($output_precision = 4, $internal_precision = 10, $force_no_bcmath = false) + { + $this->outputPrecision = $output_precision; + $this->internalPrecision = $internal_precision; + $this->bcmath = !$force_no_bcmath && function_exists('bcmul'); + } + + /** + * Converts a length object of one unit into another unit. + * @param HTMLPurifier_Length $length + * Instance of HTMLPurifier_Length to convert. You must validate() + * it before passing it here! + * @param string $to_unit + * Unit to convert to. + * @return HTMLPurifier_Length|bool + * @note + * About precision: This conversion function pays very special + * attention to the incoming precision of values and attempts + * to maintain a number of significant figure. Results are + * fairly accurate up to nine digits. Some caveats: + * - If a number is zero-padded as a result of this significant + * figure tracking, the zeroes will be eliminated. + * - If a number contains less than four sigfigs ($outputPrecision) + * and this causes some decimals to be excluded, those + * decimals will be added on. + */ + public function convert($length, $to_unit) + { + if (!$length->isValid()) { + return false; + } + + $n = $length->getN(); + $unit = $length->getUnit(); + + if ($n === '0' || $unit === false) { + return new HTMLPurifier_Length('0', false); + } + + $state = $dest_state = false; + foreach (self::$units as $k => $x) { + if (isset($x[$unit])) { + $state = $k; + } + if (isset($x[$to_unit])) { + $dest_state = $k; + } + } + if (!$state || !$dest_state) { + return false; + } + + // Some calculations about the initial precision of the number; + // this will be useful when we need to do final rounding. + $sigfigs = $this->getSigFigs($n); + if ($sigfigs < $this->outputPrecision) { + $sigfigs = $this->outputPrecision; + } + + // BCMath's internal precision deals only with decimals. Use + // our default if the initial number has no decimals, or increase + // it by how ever many decimals, thus, the number of guard digits + // will always be greater than or equal to internalPrecision. + $log = (int)floor(log(abs($n), 10)); + $cp = ($log < 0) ? $this->internalPrecision - $log : $this->internalPrecision; // internal precision + + for ($i = 0; $i < 2; $i++) { + + // Determine what unit IN THIS SYSTEM we need to convert to + if ($dest_state === $state) { + // Simple conversion + $dest_unit = $to_unit; + } else { + // Convert to the smallest unit, pending a system shift + $dest_unit = self::$units[$state][$dest_state][0]; + } + + // Do the conversion if necessary + if ($dest_unit !== $unit) { + $factor = $this->div(self::$units[$state][$unit], self::$units[$state][$dest_unit], $cp); + $n = $this->mul($n, $factor, $cp); + $unit = $dest_unit; + } + + // Output was zero, so bail out early. Shouldn't ever happen. + if ($n === '') { + $n = '0'; + $unit = $to_unit; + break; + } + + // It was a simple conversion, so bail out + if ($dest_state === $state) { + break; + } + + if ($i !== 0) { + // Conversion failed! Apparently, the system we forwarded + // to didn't have this unit. This should never happen! + return false; + } + + // Pre-condition: $i == 0 + + // Perform conversion to next system of units + $n = $this->mul($n, self::$units[$state][$dest_state][1], $cp); + $unit = self::$units[$state][$dest_state][2]; + $state = $dest_state; + + // One more loop around to convert the unit in the new system. + + } + + // Post-condition: $unit == $to_unit + if ($unit !== $to_unit) { + return false; + } + + // Useful for debugging: + //echo "<pre>n"; + //echo "$n\nsigfigs = $sigfigs\nnew_log = $new_log\nlog = $log\nrp = $rp\n</pre>\n"; + + $n = $this->round($n, $sigfigs); + if (strpos($n, '.') !== false) { + $n = rtrim($n, '0'); + } + $n = rtrim($n, '.'); + + return new HTMLPurifier_Length($n, $unit); + } + + /** + * Returns the number of significant figures in a string number. + * @param string $n Decimal number + * @return int number of sigfigs + */ + public function getSigFigs($n) + { + $n = ltrim($n, '0+-'); + $dp = strpos($n, '.'); // decimal position + if ($dp === false) { + $sigfigs = strlen(rtrim($n, '0')); + } else { + $sigfigs = strlen(ltrim($n, '0.')); // eliminate extra decimal character + if ($dp !== 0) { + $sigfigs--; + } + } + return $sigfigs; + } + + /** + * Adds two numbers, using arbitrary precision when available. + * @param string $s1 + * @param string $s2 + * @param int $scale + * @return string + */ + private function add($s1, $s2, $scale) + { + if ($this->bcmath) { + return bcadd($s1, $s2, $scale); + } else { + return $this->scale((float)$s1 + (float)$s2, $scale); + } + } + + /** + * Multiples two numbers, using arbitrary precision when available. + * @param string $s1 + * @param string $s2 + * @param int $scale + * @return string + */ + private function mul($s1, $s2, $scale) + { + if ($this->bcmath) { + return bcmul($s1, $s2, $scale); + } else { + return $this->scale((float)$s1 * (float)$s2, $scale); + } + } + + /** + * Divides two numbers, using arbitrary precision when available. + * @param string $s1 + * @param string $s2 + * @param int $scale + * @return string + */ + private function div($s1, $s2, $scale) + { + if ($this->bcmath) { + return bcdiv($s1, $s2, $scale); + } else { + return $this->scale((float)$s1 / (float)$s2, $scale); + } + } + + /** + * Rounds a number according to the number of sigfigs it should have, + * using arbitrary precision when available. + * @param float $n + * @param int $sigfigs + * @return string + */ + private function round($n, $sigfigs) + { + $new_log = (int)floor(log(abs($n), 10)); // Number of digits left of decimal - 1 + $rp = $sigfigs - $new_log - 1; // Number of decimal places needed + $neg = $n < 0 ? '-' : ''; // Negative sign + if ($this->bcmath) { + if ($rp >= 0) { + $n = bcadd($n, $neg . '0.' . str_repeat('0', $rp) . '5', $rp + 1); + $n = bcdiv($n, '1', $rp); + } else { + // This algorithm partially depends on the standardized + // form of numbers that comes out of bcmath. + $n = bcadd($n, $neg . '5' . str_repeat('0', $new_log - $sigfigs), 0); + $n = substr($n, 0, $sigfigs + strlen($neg)) . str_repeat('0', $new_log - $sigfigs + 1); + } + return $n; + } else { + return $this->scale(round($n, $sigfigs - $new_log - 1), $rp + 1); + } + } + + /** + * Scales a float to $scale digits right of decimal point, like BCMath. + * @param float $r + * @param int $scale + * @return string + */ + private function scale($r, $scale) + { + if ($scale < 0) { + // The f sprintf type doesn't support negative numbers, so we + // need to cludge things manually. First get the string. + $r = sprintf('%.0f', (float)$r); + // Due to floating point precision loss, $r will more than likely + // look something like 4652999999999.9234. We grab one more digit + // than we need to precise from $r and then use that to round + // appropriately. + $precise = (string)round(substr($r, 0, strlen($r) + $scale), -1); + // Now we return it, truncating the zero that was rounded off. + return substr($precise, 0, -1) . str_repeat('0', -$scale + 1); + } + return sprintf('%.' . $scale . 'f', (float)$r); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/VarParser.php b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser.php new file mode 100644 index 0000000000000000000000000000000000000000..4bf7771a1fb53233d32ef7a4f79d21baa67f9a06 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser.php @@ -0,0 +1,198 @@ +<?php + +/** + * Parses string representations into their corresponding native PHP + * variable type. The base implementation does a simple type-check. + */ +class HTMLPurifier_VarParser +{ + + const STRING = 1; + const ISTRING = 2; + const TEXT = 3; + const ITEXT = 4; + const INT = 5; + const FLOAT = 6; + const BOOL = 7; + const LOOKUP = 8; + const ALIST = 9; + const HASH = 10; + const MIXED = 11; + + /** + * Lookup table of allowed types. Mainly for backwards compatibility, but + * also convenient for transforming string type names to the integer constants. + */ + public static $types = array( + 'string' => self::STRING, + 'istring' => self::ISTRING, + 'text' => self::TEXT, + 'itext' => self::ITEXT, + 'int' => self::INT, + 'float' => self::FLOAT, + 'bool' => self::BOOL, + 'lookup' => self::LOOKUP, + 'list' => self::ALIST, + 'hash' => self::HASH, + 'mixed' => self::MIXED + ); + + /** + * Lookup table of types that are string, and can have aliases or + * allowed value lists. + */ + public static $stringTypes = array( + self::STRING => true, + self::ISTRING => true, + self::TEXT => true, + self::ITEXT => true, + ); + + /** + * Validate a variable according to type. + * It may return NULL as a valid type if $allow_null is true. + * + * @param mixed $var Variable to validate + * @param int $type Type of variable, see HTMLPurifier_VarParser->types + * @param bool $allow_null Whether or not to permit null as a value + * @return string Validated and type-coerced variable + * @throws HTMLPurifier_VarParserException + */ + final public function parse($var, $type, $allow_null = false) + { + if (is_string($type)) { + if (!isset(HTMLPurifier_VarParser::$types[$type])) { + throw new HTMLPurifier_VarParserException("Invalid type '$type'"); + } else { + $type = HTMLPurifier_VarParser::$types[$type]; + } + } + $var = $this->parseImplementation($var, $type, $allow_null); + if ($allow_null && $var === null) { + return null; + } + // These are basic checks, to make sure nothing horribly wrong + // happened in our implementations. + switch ($type) { + case (self::STRING): + case (self::ISTRING): + case (self::TEXT): + case (self::ITEXT): + if (!is_string($var)) { + break; + } + if ($type == self::ISTRING || $type == self::ITEXT) { + $var = strtolower($var); + } + return $var; + case (self::INT): + if (!is_int($var)) { + break; + } + return $var; + case (self::FLOAT): + if (!is_float($var)) { + break; + } + return $var; + case (self::BOOL): + if (!is_bool($var)) { + break; + } + return $var; + case (self::LOOKUP): + case (self::ALIST): + case (self::HASH): + if (!is_array($var)) { + break; + } + if ($type === self::LOOKUP) { + foreach ($var as $k) { + if ($k !== true) { + $this->error('Lookup table contains value other than true'); + } + } + } elseif ($type === self::ALIST) { + $keys = array_keys($var); + if (array_keys($keys) !== $keys) { + $this->error('Indices for list are not uniform'); + } + } + return $var; + case (self::MIXED): + return $var; + default: + $this->errorInconsistent(get_class($this), $type); + } + $this->errorGeneric($var, $type); + } + + /** + * Actually implements the parsing. Base implementation does not + * do anything to $var. Subclasses should overload this! + * @param mixed $var + * @param int $type + * @param bool $allow_null + * @return string + */ + protected function parseImplementation($var, $type, $allow_null) + { + return $var; + } + + /** + * Throws an exception. + * @throws HTMLPurifier_VarParserException + */ + protected function error($msg) + { + throw new HTMLPurifier_VarParserException($msg); + } + + /** + * Throws an inconsistency exception. + * @note This should not ever be called. It would be called if we + * extend the allowed values of HTMLPurifier_VarParser without + * updating subclasses. + * @param string $class + * @param int $type + * @throws HTMLPurifier_Exception + */ + protected function errorInconsistent($class, $type) + { + throw new HTMLPurifier_Exception( + "Inconsistency in $class: " . HTMLPurifier_VarParser::getTypeName($type) . + " not implemented" + ); + } + + /** + * Generic error for if a type didn't work. + * @param mixed $var + * @param int $type + */ + protected function errorGeneric($var, $type) + { + $vtype = gettype($var); + $this->error("Expected type " . HTMLPurifier_VarParser::getTypeName($type) . ", got $vtype"); + } + + /** + * @param int $type + * @return string + */ + public static function getTypeName($type) + { + static $lookup; + if (!$lookup) { + // Lazy load the alternative lookup table + $lookup = array_flip(HTMLPurifier_VarParser::$types); + } + if (!isset($lookup[$type])) { + return 'unknown'; + } + return $lookup[$type]; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Flexible.php similarity index 55% rename from libraries/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php rename to libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Flexible.php index c954250e9f001f7be6079b80aa472e0e6c759168..b2ed860ac07c5ed437780a4c8eec431c5650e027 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Flexible.php @@ -1,96 +1,130 @@ -<?php - -/** - * Performs safe variable parsing based on types which can be used by - * users. This may not be able to represent all possible data inputs, - * however. - */ -class HTMLPurifier_VarParser_Flexible extends HTMLPurifier_VarParser -{ - - protected function parseImplementation($var, $type, $allow_null) { - if ($allow_null && $var === null) return null; - switch ($type) { - // Note: if code "breaks" from the switch, it triggers a generic - // exception to be thrown. Specific errors can be specifically - // done here. - case self::MIXED : - case self::ISTRING : - case self::STRING : - case self::TEXT : - case self::ITEXT : - return $var; - case self::INT : - if (is_string($var) && ctype_digit($var)) $var = (int) $var; - return $var; - case self::FLOAT : - if ((is_string($var) && is_numeric($var)) || is_int($var)) $var = (float) $var; - return $var; - case self::BOOL : - if (is_int($var) && ($var === 0 || $var === 1)) { - $var = (bool) $var; - } elseif (is_string($var)) { - if ($var == 'on' || $var == 'true' || $var == '1') { - $var = true; - } elseif ($var == 'off' || $var == 'false' || $var == '0') { - $var = false; - } else { - throw new HTMLPurifier_VarParserException("Unrecognized value '$var' for $type"); - } - } - return $var; - case self::ALIST : - case self::HASH : - case self::LOOKUP : - if (is_string($var)) { - // special case: technically, this is an array with - // a single empty string item, but having an empty - // array is more intuitive - if ($var == '') return array(); - if (strpos($var, "\n") === false && strpos($var, "\r") === false) { - // simplistic string to array method that only works - // for simple lists of tag names or alphanumeric characters - $var = explode(',',$var); - } else { - $var = preg_split('/(,|[\n\r]+)/', $var); - } - // remove spaces - foreach ($var as $i => $j) $var[$i] = trim($j); - if ($type === self::HASH) { - // key:value,key2:value2 - $nvar = array(); - foreach ($var as $keypair) { - $c = explode(':', $keypair, 2); - if (!isset($c[1])) continue; - $nvar[$c[0]] = $c[1]; - } - $var = $nvar; - } - } - if (!is_array($var)) break; - $keys = array_keys($var); - if ($keys === array_keys($keys)) { - if ($type == self::ALIST) return $var; - elseif ($type == self::LOOKUP) { - $new = array(); - foreach ($var as $key) { - $new[$key] = true; - } - return $new; - } else break; - } - if ($type === self::LOOKUP) { - foreach ($var as $key => $value) { - $var[$key] = true; - } - } - return $var; - default: - $this->errorInconsistent(__CLASS__, $type); - } - $this->errorGeneric($var, $type); - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Performs safe variable parsing based on types which can be used by + * users. This may not be able to represent all possible data inputs, + * however. + */ +class HTMLPurifier_VarParser_Flexible extends HTMLPurifier_VarParser +{ + /** + * @param mixed $var + * @param int $type + * @param bool $allow_null + * @return array|bool|float|int|mixed|null|string + * @throws HTMLPurifier_VarParserException + */ + protected function parseImplementation($var, $type, $allow_null) + { + if ($allow_null && $var === null) { + return null; + } + switch ($type) { + // Note: if code "breaks" from the switch, it triggers a generic + // exception to be thrown. Specific errors can be specifically + // done here. + case self::MIXED: + case self::ISTRING: + case self::STRING: + case self::TEXT: + case self::ITEXT: + return $var; + case self::INT: + if (is_string($var) && ctype_digit($var)) { + $var = (int)$var; + } + return $var; + case self::FLOAT: + if ((is_string($var) && is_numeric($var)) || is_int($var)) { + $var = (float)$var; + } + return $var; + case self::BOOL: + if (is_int($var) && ($var === 0 || $var === 1)) { + $var = (bool)$var; + } elseif (is_string($var)) { + if ($var == 'on' || $var == 'true' || $var == '1') { + $var = true; + } elseif ($var == 'off' || $var == 'false' || $var == '0') { + $var = false; + } else { + throw new HTMLPurifier_VarParserException("Unrecognized value '$var' for $type"); + } + } + return $var; + case self::ALIST: + case self::HASH: + case self::LOOKUP: + if (is_string($var)) { + // special case: technically, this is an array with + // a single empty string item, but having an empty + // array is more intuitive + if ($var == '') { + return array(); + } + if (strpos($var, "\n") === false && strpos($var, "\r") === false) { + // simplistic string to array method that only works + // for simple lists of tag names or alphanumeric characters + $var = explode(',', $var); + } else { + $var = preg_split('/(,|[\n\r]+)/', $var); + } + // remove spaces + foreach ($var as $i => $j) { + $var[$i] = trim($j); + } + if ($type === self::HASH) { + // key:value,key2:value2 + $nvar = array(); + foreach ($var as $keypair) { + $c = explode(':', $keypair, 2); + if (!isset($c[1])) { + continue; + } + $nvar[trim($c[0])] = trim($c[1]); + } + $var = $nvar; + } + } + if (!is_array($var)) { + break; + } + $keys = array_keys($var); + if ($keys === array_keys($keys)) { + if ($type == self::ALIST) { + return $var; + } elseif ($type == self::LOOKUP) { + $new = array(); + foreach ($var as $key) { + $new[$key] = true; + } + return $new; + } else { + break; + } + } + if ($type === self::ALIST) { + trigger_error("Array list did not have consecutive integer indexes", E_USER_WARNING); + return array_values($var); + } + if ($type === self::LOOKUP) { + foreach ($var as $key => $value) { + if ($value !== true) { + trigger_error( + "Lookup array has non-true value at key '$key'; " . + "maybe your input array was not indexed numerically", + E_USER_WARNING + ); + } + $var[$key] = true; + } + } + return $var; + default: + $this->errorInconsistent(__CLASS__, $type); + } + $this->errorGeneric($var, $type); + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/VarParser/Native.php b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Native.php similarity index 64% rename from libraries/htmlpurifier/library/HTMLPurifier/VarParser/Native.php rename to libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Native.php index b02a6de54ca269f744ab60a9d6ba1374894a9d43..c28055b5ed120f46076bd73cdfd14bbbb1d4c0ec 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/VarParser/Native.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/VarParser/Native.php @@ -1,26 +1,38 @@ -<?php - -/** - * This variable parser uses PHP's internal code engine. Because it does - * this, it can represent all inputs; however, it is dangerous and cannot - * be used by users. - */ -class HTMLPurifier_VarParser_Native extends HTMLPurifier_VarParser -{ - - protected function parseImplementation($var, $type, $allow_null) { - return $this->evalExpression($var); - } - - protected function evalExpression($expr) { - $var = null; - $result = eval("\$var = $expr;"); - if ($result === false) { - throw new HTMLPurifier_VarParserException("Fatal error in evaluated code"); - } - return $var; - } - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * This variable parser uses PHP's internal code engine. Because it does + * this, it can represent all inputs; however, it is dangerous and cannot + * be used by users. + */ +class HTMLPurifier_VarParser_Native extends HTMLPurifier_VarParser +{ + + /** + * @param mixed $var + * @param int $type + * @param bool $allow_null + * @return null|string + */ + protected function parseImplementation($var, $type, $allow_null) + { + return $this->evalExpression($var); + } + + /** + * @param string $expr + * @return mixed + * @throws HTMLPurifier_VarParserException + */ + protected function evalExpression($expr) + { + $var = null; + $result = eval("\$var = $expr;"); + if ($result === false) { + throw new HTMLPurifier_VarParserException("Fatal error in evaluated code"); + } + return $var; + } +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier/library/HTMLPurifier/VarParserException.php b/libraries/htmlpurifier410/library/HTMLPurifier/VarParserException.php similarity index 93% rename from libraries/htmlpurifier/library/HTMLPurifier/VarParserException.php rename to libraries/htmlpurifier410/library/HTMLPurifier/VarParserException.php index 5df3414959b9e8d231315269301317b38acb6eb0..82e465d6a9c4a18c976f5be0f115ae23e5c2ba07 100644 --- a/libraries/htmlpurifier/library/HTMLPurifier/VarParserException.php +++ b/libraries/htmlpurifier410/library/HTMLPurifier/VarParserException.php @@ -1,11 +1,11 @@ -<?php - -/** - * Exception type for HTMLPurifier_VarParser - */ -class HTMLPurifier_VarParserException extends HTMLPurifier_Exception -{ - -} - -// vim: et sw=4 sts=4 +<?php + +/** + * Exception type for HTMLPurifier_VarParser + */ +class HTMLPurifier_VarParserException extends HTMLPurifier_Exception +{ + +} + +// vim: et sw=4 sts=4 diff --git a/libraries/htmlpurifier410/library/HTMLPurifier/Zipper.php b/libraries/htmlpurifier410/library/HTMLPurifier/Zipper.php new file mode 100644 index 0000000000000000000000000000000000000000..a358fff02744b65092484afedf61ec91fb4e8409 --- /dev/null +++ b/libraries/htmlpurifier410/library/HTMLPurifier/Zipper.php @@ -0,0 +1,157 @@ +<?php + +/** + * A zipper is a purely-functional data structure which contains + * a focus that can be efficiently manipulated. It is known as + * a "one-hole context". This mutable variant implements a zipper + * for a list as a pair of two arrays, laid out as follows: + * + * Base list: 1 2 3 4 [ ] 6 7 8 9 + * Front list: 1 2 3 4 + * Back list: 9 8 7 6 + * + * User is expected to keep track of the "current element" and properly + * fill it back in as necessary. (ToDo: Maybe it's more user friendly + * to implicitly track the current element?) + * + * Nota bene: the current class gets confused if you try to store NULLs + * in the list. + */ + +class HTMLPurifier_Zipper +{ + public $front, $back; + + public function __construct($front, $back) { + $this->front = $front; + $this->back = $back; + } + + /** + * Creates a zipper from an array, with a hole in the + * 0-index position. + * @param Array to zipper-ify. + * @return Tuple of zipper and element of first position. + */ + static public function fromArray($array) { + $z = new self(array(), array_reverse($array)); + $t = $z->delete(); // delete the "dummy hole" + return array($z, $t); + } + + /** + * Convert zipper back into a normal array, optionally filling in + * the hole with a value. (Usually you should supply a $t, unless you + * are at the end of the array.) + */ + public function toArray($t = NULL) { + $a = $this->front; + if ($t !== NULL) $a[] = $t; + for ($i = count($this->back)-1; $i >= 0; $i--) { + $a[] = $this->back[$i]; + } + return $a; + } + + /** + * Move hole to the next element. + * @param $t Element to fill hole with + * @return Original contents of new hole. + */ + public function next($t) { + if ($t !== NULL) array_push($this->front, $t); + return empty($this->back) ? NULL : array_pop($this->back); + } + + /** + * Iterated hole advancement. + * @param $t Element to fill hole with + * @param $i How many forward to advance hole + * @return Original contents of new hole, i away + */ + public function advance($t, $n) { + for ($i = 0; $i < $n; $i++) { + $t = $this->next($t); + } + return $t; + } + + /** + * Move hole to the previous element + * @param $t Element to fill hole with + * @return Original contents of new hole. + */ + public function prev($t) { + if ($t !== NULL) array_push($this->back, $t); + return empty($this->front) ? NULL : array_pop($this->front); + } + + /** + * Delete contents of current hole, shifting hole to + * next element. + * @return Original contents of new hole. + */ + public function delete() { + return empty($this->back) ? NULL : array_pop($this->back); + } + + /** + * Returns true if we are at the end of the list. + * @return bool + */ + public function done() { + return empty($this->back); + } + + /** + * Insert element before hole. + * @param Element to insert + */ + public function insertBefore($t) { + if ($t !== NULL) array_push($this->front, $t); + } + + /** + * Insert element after hole. + * @param Element to insert + */ + public function insertAfter($t) { + if ($t !== NULL) array_push($this->back, $t); + } + + /** + * Splice in multiple elements at hole. Functional specification + * in terms of array_splice: + * + * $arr1 = $arr; + * $old1 = array_splice($arr1, $i, $delete, $replacement); + * + * list($z, $t) = HTMLPurifier_Zipper::fromArray($arr); + * $t = $z->advance($t, $i); + * list($old2, $t) = $z->splice($t, $delete, $replacement); + * $arr2 = $z->toArray($t); + * + * assert($old1 === $old2); + * assert($arr1 === $arr2); + * + * NB: the absolute index location after this operation is + * *unchanged!* + * + * @param Current contents of hole. + */ + public function splice($t, $delete, $replacement) { + // delete + $old = array(); + $r = $t; + for ($i = $delete; $i > 0; $i--) { + $old[] = $r; + $r = $this->delete(); + } + // insert + for ($i = count($replacement)-1; $i >= 0; $i--) { + $this->insertAfter($r); + $r = $replacement[$i]; + } + return array($old, $r); + } +} diff --git a/libraries/jquery/colorpicker/index.html b/libraries/jquery/colorpicker/index.html deleted file mode 100755 index e1ad5782dafc52b554a9c76374599803735f9a0a..0000000000000000000000000000000000000000 --- a/libraries/jquery/colorpicker/index.html +++ /dev/null @@ -1,184 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <link rel="stylesheet" href="css/colorpicker.css" type="text/css" /> - <link rel="stylesheet" media="screen" type="text/css" href="css/layout.css" /> - <title>ColorPicker - jQuery plugin</title> - <script type="text/javascript" src="js/jquery.js"></script> - <script type="text/javascript" src="js/colorpicker.js"></script> - <script type="text/javascript" src="js/eye.js"></script> - <script type="text/javascript" src="js/utils.js"></script> - <script type="text/javascript" src="js/layout.js?ver=1.0.2"></script> -</head> -<body> - <div class="wrapper"> - <h1>Color Picker - jQuery plugin</h1> - <ul class="navigationTabs"> - <li><a href="#about" rel="about">About</a></li> - <li><a href="#download" rel="download">Download</a></li> - <li><a href="#implement" rel="implement">Implement</a></li> - </ul> - <div class="tabsContent"> - <div class="tab"> - <h2>About</h2> - <p>A simple component to select color in the same way you select color in Adobe Photoshop</p> - <h3>Last update</h3> - <p>23.05.2009 - Check Download tab</p> - <h3>Features</h3> - <ul> - <li>Flat mode - as element in page</li> - <li>Powerful controls for color selection</li> - <li>Easy to customize the look by changing some images</li> - <li>Fits into the viewport</li> - </ul> - <h3>License</h3> - <p>Dual licensed under the MIT and GPL licenses.</p> - <h3>Examples</h3> - <p>Flat mode.</p> - <p id="colorpickerHolder"> - </p> - <pre> -$('#colorpickerHolder').ColorPicker({flat: true}); - </pre> - <p>Custom skin and using flat mode to display the color picker in a custom widget.</p> - <div id="customWidget"> - <div id="colorSelector2"><div style="background-color: #00ff00"></div></div> - <div id="colorpickerHolder2"> - </div> - </div> - - <p>Attached to an text field and using callback functions to update the color with field's value and set the value back in the field by submiting the color.</p> - <p><input type="text" maxlength="6" size="6" id="colorpickerField1" value="00ff00" /></p> - <p><input type="text" maxlength="6" size="6" id="colorpickerField3" value="0000ff" /></p> - <p><input type="text" maxlength="6" size="6" id="colorpickerField2" value="ff0000" /></p> - <pre>$('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({ - onSubmit: function(hsb, hex, rgb, el) { - $(el).val(hex); - $(el).ColorPickerHide(); - }, - onBeforeShow: function () { - $(this).ColorPickerSetColor(this.value); - } -}) -.bind('keyup', function(){ - $(this).ColorPickerSetColor(this.value); -}); -</pre> - <p>Attached to DOMElement and using callbacks to live preview the color and adding animation.</p> - <p> - <div id="colorSelector"><div style="background-color: #0000ff"></div></div> - </p> - <pre> -$('#colorSelector').ColorPicker({ - color: '#0000ff', - onShow: function (colpkr) { - $(colpkr).fadeIn(500); - return false; - }, - onHide: function (colpkr) { - $(colpkr).fadeOut(500); - return false; - }, - onChange: function (hsb, hex, rgb) { - $('#colorSelector div').css('backgroundColor', '#' + hex); - } -}); -</pre> - </div> - <div class="tab"> - <h2>Download</h2> - <p><a href="colorpicker.zip">colorpicker.zip (73 kb)</a>: jQuery, Javscript files, CSS files, images, examples and instructions.</p> - <h3>Changelog</h3> - <dl> - <dt>23.05.2009</dt> - <dd>Added: close on color selection example</dd> - <dd>Added: restore original color option</dd> - <dd>Changed: color update on key up event</dd> - <dd>Fixed: colorpicker hide and show methods</dd> - <dd>Fixed: reference to options. Multiple fields with colorpickers is possible now.</dd> - <dd>Fixed: RGB to HSB convertion</dd> - <dt>22.08.2008</dt> - <dd>Fixed bug: where some events were not canceled right on Safari</dd> - <dd>Fixed bug: where teh view port was not detected right on Safari</dd> - <dt>16-07-2008</dt> - <dd>Fixed bug where the letter 'F' could not be typed in the Hex field</dd> - <dd>Fixed bug where the changes on Hex field where not parsed</dd> - <dd>Added new option 'livePreview'</dd> - <dt>08-07-2008</dt> - <dd>Fixed typo in the code, both JavaScript and CSS</dd> - <dd>Changed the cursor for some elements</dd> - <dd>Added new demo explaining how to implement custom skin</dd> - <dt>07.07.2008</dt> - <dd>The first release.</dd> - </dl> - </div> - <div class="tab"> - <h2>Implement</h2> - <p>Attach the Javascript and CSS files to your document. Edit CSS file and fix the paths to images and change colors to fit your site theme.</p> - <pre> -<link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" /> -<script type="text/javascript" src="js/colorpicker.js"></script> - </pre> - <h3>Invocation code</h3> - <p>All you have to do is to select the elements in a jQuery way and call the plugin.</p> - <pre> - $('input').ColorPicker(options); - </pre> - <h3>Options</h3> - <p>A hash of parameters. All parameters are optional.</p> - <table> - <tr> - <td><strong>eventName</strong></td> - <td>string</td> - <td>The desired event to trigger the colorpicker. Default: 'click'</td> - </tr> - <tr> - <td><strong>color</strong></td> - <td>string or hash</td> - <td>The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000'</td> - </tr> - <tr> - <td><strong>flat</strong></td> - <td>boolean</td> - <td>Whatever if the color picker is appended to the element or triggered by an event. Default false</td> - </tr> - <tr> - <td><strong>livePreview</strong></td> - <td>boolean</td> - <td>Whatever if the color values are filled in the fields while changing values on selector or a field. If false it may improve speed. Default true</td> - </tr> - <tr> - <td><strong>onShow</strong></td> - <td>function</td> - <td>Callback function triggered when the color picker is shown</td> - </tr> - <tr> - <td><strong>onBeforeShow</strong></td> - <td>function</td> - <td>Callback function triggered before the color picker is shown</td> - </tr> - <tr> - <td><strong>onHide</strong></td> - <td>function</td> - <td>Callback function triggered when the color picker is hidden</td> - </tr> - <tr> - <td><strong>onChange</strong></td> - <td>function</td> - <td>Callback function triggered when the color is changed</td> - </tr> - <tr> - <td><strong>onSubmit</strong></td> - <td>function</td> - <td>Callback function triggered when the color it is chosen</td> - </tr> - </table> - <h3>Set color</h3> - <p>If you want to set a new color.</p> - <pre>$('input').ColorPickerSetColor(color);</pre> - <p>The 'color' argument is the same format as the option color, string for hex color or hash for RGB and HSB ({r:255, r:0, b:0}).</p> - </div> - </div> - </div> -</body> -</html> diff --git a/libraries/jquery/jquery-ui/third-party/jQuery-UI-Date-Range-Picker/index.html b/libraries/jquery/jquery-ui/third-party/jQuery-UI-Date-Range-Picker/index.html deleted file mode 100644 index 1aa877e45679fff0357bd6cb88785b348c58cd86..0000000000000000000000000000000000000000 --- a/libraries/jquery/jquery-ui/third-party/jQuery-UI-Date-Range-Picker/index.html +++ /dev/null @@ -1,66 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <title>Themeroller-Ready jQuery UI Range Picker</title> - <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/redmond/jquery-ui.css" type="text/css" /> - <link rel="stylesheet" href="css/ui.daterangepicker.css" type="text/css" /> - - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script> - <script type="text/javascript" src="js/date.js"></script> - <script type="text/javascript" src="js/daterangepicker.jQuery.js"></script> - <script type="text/javascript"> - $(function(){ - $('#rangeA').daterangepicker(); - $('#rangeBa, #rangeBb').daterangepicker(); - $('#rangeC').daterangepicker({arrows: true}); - $('#rangeD').daterangepicker(); - $('#rangeE').daterangepicker({constrainDates: true}); - }); - </script> - - <!-- from here down, demo-related styles and scripts --> - <!-- from here down, demo-related styles and scripts --> - <link rel="shortcut icon" href="/images/favicon2.ico" type="image/x-icon" /> - <link href="/style/demoPages" media="screen" rel="Stylesheet" type="text/css" /> - - <style type="text/css"> - body { font-size: 62.5%; } - input {width: 196px; height: 1.1em; display:block;} - h2 { clear: both; padding: 2em 0 0; } - #rangeBa,#rangeBb { float: left; margin-right: 10px; } - </style> - </head> - <body> - -<h2>Default Rangepicker</h2> -<div> - <input type="text" value="4/23/99" id="rangeA" /> -</div> - -<h2>2 inputs Rangepicker</h2> -<div> - <input type="text" value="4/23/99" id="rangeBa" /> - <input type="text" value="4/23/99" id="rangeBb" /> -</div> - -<h2>Rangepicker with arrows</h2> -<div> - <input type="text" value="4/23/99" id="rangeC" /> -</div> - -<h2>Rangepicker opening to the right</h2> -<div style="float: right;"> - <input type="text" value="4/23/99" id="rangeD" /> -</div> - -<h2>Rangepicker with contraints</h2> -<div> - <input type="text" value="4/23/99" id="rangeE" /> -</div> - - -</html> - - diff --git a/libraries/jquery/timepicker/index.html b/libraries/jquery/timepicker/index.html deleted file mode 100644 index 06b225f926194fa0906ade20c55f88c00ac96ab5..0000000000000000000000000000000000000000 --- a/libraries/jquery/timepicker/index.html +++ /dev/null @@ -1,307 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset='utf-8'> - - <title>Timepicker for jQuery – Demos and Documentation</title> - <meta name="description" content="A lightweight, customizable jQuery timepicker plugin inspired by Google Calendar. Add a user-friendly timepicker dropdown to your app in minutes." /> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> - - <script type="text/javascript" src="jquery.timepicker.js"></script> - <link rel="stylesheet" type="text/css" href="jquery.timepicker.css" /> - - <script type="text/javascript" src="lib/base.js"></script> - <link rel="stylesheet" type="text/css" href="lib/base.css" /> - -</head> - -<body> - - <div id="container"> - - - <h1><a href="https://github.com/jonthornton/jquery-timepicker">jquery.timepicker</a></h1> - <div class="description"> - A lightweight, customizable jQuery timepicker plugin inspired by Google Calendar. - </div> - - <p>Use this plugin to unobtrusively add a timepicker dropdown to your forms. It's lightweight (2.5kb minified and gzipped) and easy to customize. - <a href="https://github.com/jonthornton/jquery-timepicker">View the source code on GitHub</a> or <a href="https://github.com/jonthornton/jquery-timepicker/zipball/master">download (zip)</a>. - </p> - - <p><a href="https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery">Full documentation available here</a></p> - - <div class="example"> - <script> - $(function() { - $('#basicExample').timepicker(); - }); - </script> - - <h3>Basic Example</h3> - <p><input id="basicExample" type="text" class="time" /></p> - - <pre class="code" data-language="javascript">$('#basicExample').timepicker();</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#defaultValueExample').timepicker({ 'scrollDefaultNow': true }) - }); - </script> - - <h3>Scroll Default Example</h3> - <p>Set the scroll position to local time if no value selected.</p> - <p><input id="defaultValueExample" type="text" class="time" /></p> - - <pre class="code" data-language="javascript">$('#defaultValueExample').timepicker({ 'scrollDefaultNow': true });</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#setTimeExample').timepicker(); - $('#setTimeButton').on('click', function (){ - $('#setTimeExample').timepicker('setTime', new Date()); - }); - }); - </script> - - <h3>Set Time Example</h3> - <p>Dynamically set the time using a Javascript Date object.</p> - <p> - <input id="setTimeExample" type="text" class="time" /> - <button id="setTimeButton">Set current time</button> - </p> - - <pre class="code" data-language="javascript">$('#setTimeExample').timepicker(); -$('#setTimeButton').on('click', function (){ - $('#setTimeExample').timepicker('setTime', new Date()); -});</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#durationExample').timepicker({ 'minTime': '2:00pm', 'maxTime': '11:30pm', 'showDuration': true }); - }); - </script> - - <h3>Duration Example</h3> - <p>Set a starting time and see duration from that starting time. You can optionally set an maxTime as well.</p> - <p><input id="durationExample" type="text" class="time" /></p> - - <pre class="code" data-language="javascript">$('#durationExample').timepicker({ - 'minTime': '2:00pm', - 'maxTime': '11:30pm', - 'showDuration': true -});</pre> - </div> - - - - - <div class="example"> - <script> - $(function() { - $('#onselectExample').timepicker(); - $('#onselectExample').on('changeTime', function() { - $('#onselectTarget').text($(this).val()); - }); - }); - </script> - - <h3>Event Example</h3> - <p>Trigger an event after selecting a value. Fires before the input onchange event.</p> - <p> - <input id="onselectExample" type="text" class="time" /> - <span id="onselectTarget" style="margin-left: 30px;"></span> - </p> - - <pre class="code" data-language="javascript">$('#onselectExample').timepicker(); -$('#onselectExample').on('changeTime', function() { - $('#onselectTarget').text($(this).val()); -});</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' }); - $('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' }); - }); - </script> - - <h3>timeFormat Example</h3> - <p>timepicker.jquery uses the time portion of <a href="http://php.net/manual/en/function.date.php">PHP's date formatting commands</a>.</p> - <p><input id="timeformatExample1" type="text" class="time" /> <input id="timeformatExample2" type="text" class="time" /></p> - - <pre class="code" data-language="javascript">$('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' }); -$('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' });</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#stepExample1').timepicker({ 'step': 15 }); - $('#stepExample2').timepicker({ 'step': 60 }); - }); - </script> - - <h3>Step Example</h3> - <p>Generate drop-down options with varying levels of precision.</p> - <p><input id="stepExample1" type="text" class="time" /> <input id="stepExample2" type="text" class="time" /></p> - - <pre class="code" data-language="javascript">$('#stepExample1').timepicker({ 'step': 15 }); -$('#stepExample2').timepicker({ 'step': 60 });</pre> - </div> - - - - - - <div class="example"> - <script> - $(function() { - $('#selectButton').click(function(e) { - e.preventDefault(); - $('#selectExample').timepicker(); - $(this).hide(); - }); - }); - </script> - - <h3>Select Example</h3> - <p>Use jquery-timepicker with <select> elements too.</p> - <p><select id="selectExample" class="time"> - <option value="12:00am">12:00am</option> - <option value="1:00am">1:00am</option> - <option value="2:00am">2:00am</option> - <option value="3:00am">3:00am</option> - <option value="4:00am">4:00am</option> - <option value="5:00am">5:00am</option> - <option value="6:00am">6:00am</option> - <option value="7:00am">7:00am</option> - <option value="8:00am">8:00am</option> - <option value="9:00am">9:00am</option> - <option value="10:00am">10:00am</option> - <option value="11:00am">11:00am</option> - <option value="12:00pm">12:00pm</option> - <option value="1:00pm">1:00pm</option> - <option value="2:00pm">2:00pm</option> - <option value="3:00pm">3:00pm</option> - <option value="4:00pm">4:00pm</option> - <option value="5:00pm">5:00pm</option> - <option value="6:00pm">6:00pm</option> - <option value="7:00pm">7:00pm</option> - <option value="8:00pm">8:00pm</option> - <option value="9:00pm">9:00pm</option> - <option value="10:00pm">10:00pm</option> - <option value="11:00pm">11:00pm</option> - </select> <button id="selectButton">Convert to timepicker</button></p> - - <pre class="code" data-language="javascript">$('#selectButton').click(function(e) { - e.preventDefault(); - $('#selectExample').timepicker(); - $(this).hide(); -});</pre> - </div> - - - - - - <div class="example"> - <script src="lib/datepair.js"></script> - <h3>Datepair Example</h3> - - <p class="datepair" data-language="javascript"> - <input type="text" class="date start" /> - <input type="text" class="time start" /> to - <input type="text" class="time end" /> - <input type="text" class="date end" /> - </p> - - <p>Datepair source available <a href="http://jonthornton.github.com/jquery-timepicker/lib/datepair.js">here</a>.</p> - </div> - - - - - - <div class="example" style="background: #ffd;"> - <h2>Want to get paid to work on stuff like this?</h2> - - <p>Shameless plug: <a href="http://www.parkwhiz.com">ParkWhiz</a> is looking for talented - <a href="http://www.parkwhiz.com/about/jobs/designer/">designers</a> - and <a href="http://www.parkwhiz.com/about/jobs/developer/">developers</a> to help us drag the parking industry - out of the Stone Age. Visit ParkWhiz's <a href="http://www.parkwhiz.com/about/jobs/">jobs page</a> or email - <a href="mailto:jobs@parkwhiz.com">jobs@parkwhiz.com</a> and introduce yourself!</p> - </div> - - <h2>Contact</h2> - <p><a href="http://jonthornton.com">Jon Thornton</a> — [lastname].[firstname]@gmail.com</p> - - - <h2>Download</h2> - <p> - You can download this project in either - <a href="https://github.com/jonthornton/jquery-timepicker/zipball/master">zip</a> or - <a href="https://github.com/jonthornton/jquery-timepicker/tarball/master">tar formats</a>. <br /> - Get the source code on GitHub: <a href="https://github.com/jonthornton/jquery-timepicker">jonthornton/jquery.timepicker</a> - </p> - <div class="p">You can also clone the project with <a href="http://git-scm.com">Git</a> - by running: - <pre>$ git clone git://github.com/jonthornton/jquery-timepicker</pre> - </div> - - <div class="footer"> - © 2012 <a href="http://jonthornton.com">Jon Thornton</a>, contributions from - <a href="https://github.com/fojas">Anthony Fojas</a>, <a href="https://github.com/vinc3m1">Vince Mi</a>, - <a href="https://github.com/websirnik">Nikita Korotaev</a>, <a href="https://github.com/Spoon88">Spoon88</a>, - <a href="https://github.com/elarkin">elarkin</a>, , <a href="https://github.com/lodewijk">lodewijk</a>, - <a href="https://github.com/jayzawrotny">jayzawrotny</a>, <a href="https://github.com/dmzza">David Mazza</a>, - <a href="https://github.com/exabytes18">Matt Jurik</a>, <a href="https://github.com/philfreo">Phil Freo</a>, - <a href="https://github.com/orloffv">orloffv</a>, <a href="https://github.com/patdenice">patdenice</a>, - <a href="https://github.com/nervetattoo">Raymond Julin</a> - </div> - - </div> - -<script type="text/javascript"> - - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-15605525-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - -</script> - -</body> -</html> diff --git a/log4php.properties b/log4php.properties index 149fb54660eca23da4536e1ccf722c002a6cac52..65596188204449c147f2368df391575ed65448ef 100644 --- a/log4php.properties +++ b/log4php.properties @@ -18,7 +18,7 @@ log4php.appender.A3.File=logs/installation.log log4php.rootLogger=FATAL,A1 log4php.appender.A1=LoggerAppenderRollingFile -log4php.appender.A1.MaxFileSize=3MB +log4php.appender.A1.MaxFileSize=10MB log4php.appender.A1.MaxBackupIndex=10 log4php.appender.A1.layout=LoggerLayoutTTCC log4php.appender.A1.layout.ContextPrinting="true" diff --git a/modules/Accounts/Accounts.php b/modules/Accounts/Accounts.php index 821a5534f1ed57fa9f7beb4d784b6bcf5e533b31..80b094869766f351732b3db7613d41541861f3b6 100644 --- a/modules/Accounts/Accounts.php +++ b/modules/Accounts/Accounts.php @@ -102,11 +102,14 @@ class Accounts extends CRMEntity { 'Project' => array('table_name' => 'vtiger_project', 'table_index' => 'projectid', 'rel_index' => 'linktoaccountscontacts'), 'PurchaseOrder' => array('table_name' => 'vtiger_purchaseorder', 'table_index' => 'purchaseorderid', 'rel_index' => 'accountid'), ); - + function __construct() + { + $this->log =LoggerManager::getLogger('account'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Accounts'); + } function Accounts() { - $this->log =LoggerManager::getLogger('account'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Accounts'); + self::__construct(); } /** Function to handle module specific operations when saving a entity diff --git a/modules/Calendar/Activity.php b/modules/Calendar/Activity.php index 42a06897ea4b04378c5d61c954a84629b8bd2f0b..5ebf5fe05faab9f1718cf3eab9f36d600aad526a 100644 --- a/modules/Calendar/Activity.php +++ b/modules/Calendar/Activity.php @@ -103,11 +103,14 @@ class Activity extends CRMEntity { var $default_sort_order = 'ASC'; //var $groupTable = Array('vtiger_activitygrouprelation','activityid'); - + function __construct() + { + $this->log = LoggerManager::getLogger('Calendar'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Calendar'); + } function Activity() { - $this->log = LoggerManager::getLogger('Calendar'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Calendar'); + self::__construct(); } function save_module($module) @@ -569,7 +572,7 @@ function insertIntoRecurringTable(& $recurObj) * @param string $criteria - query string * returns activity records in array format($list) or null value */ - function get_full_list($criteria) { + function get_full_list($criteria='', $where='') { global $log; $log->debug("Entering get_full_list(".$criteria.") method ..."); $query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.setype, vtiger_activity.*, diff --git a/modules/Calendar/Appointment.php b/modules/Calendar/Appointment.php index 5730e3892d2417c90ca8fe027390f10cfa09c946..cf2fb0780368fed53dd3ecc204d183cb1551fce0 100644 --- a/modules/Calendar/Appointment.php +++ b/modules/Calendar/Appointment.php @@ -42,12 +42,15 @@ class Appointment var $shared = false; var $recurring; var $dur_hour; - + function __construct() + { + $this->participant = Array(); + $this->participant_state = Array(); + $this->description = ""; + } function Appointment() { - $this->participant = Array(); - $this->participant_state = Array(); - $this->description = ""; + self::__construct(); } /** To get the events of the specified user and shared events diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index bfd88d8bcad9f593556b0f443813c130b68e46aa..b28c142b4624358b851acc93cf63f73e78f46715 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -28,12 +28,16 @@ class Calendar /* constructor */ + function __construct($view='',$data=Array()) + { + $this->view = $view; + $this->date_time = new vt_DateTime($data,true); + $this->constructLayout(); + } //var $groupTable = Array('vtiger_activitygrouprelation','activityid'); function Calendar($view='',$data=Array()) { - $this->view = $view; - $this->date_time = new vt_DateTime($data,true); - $this->constructLayout(); + self::__construct($view,$data); } /** * Function to get calendarview Label @@ -256,17 +260,23 @@ class Layout * @param string $view - calendarview * @param string $time - time string */ - + function __construct($view,$time) + { + $this->view = $view; + $this->start_time = $time; + if ($view == 'month') { + $this->end_time = $this->start_time->getMonthendtime(); + } + if ($view == 'day') { + $this->end_time = $this->start_time->getDayendtime(); + } + if ($view == 'hour') { + $this->end_time = $this->start_time->getHourendtime(); + } + } function Layout($view,$time) { - $this->view = $view; - $this->start_time = $time; - if ( $view == 'month') - $this->end_time = $this->start_time->getMonthendtime(); - if ( $view == 'day') - $this->end_time = $this->start_time->getDayendtime(); - if ( $view == 'hour') - $this->end_time = $this->start_time->getHourendtime(); + self::__construct($view,$time); } /** diff --git a/modules/Calendar/Date.php b/modules/Calendar/Date.php index b3f9df5a5d7ab206eb07dd143cb780034ee96ef7..0bd74ac34f79588c0fa3d7e9fa9aca7a0d370b7c 100644 --- a/modules/Calendar/Date.php +++ b/modules/Calendar/Date.php @@ -39,55 +39,59 @@ class vt_DateTime * @param array $timearr - collection of string * @param string $check - check string */ + function __construct(&$timearr,$check) + { + if (! isset( $timearr) || count($timearr) == 0 ) + { + $this->setDateTime(null); + } + else if ( isset( $timearr['ts'])) + { + $this->setDateTime($timearr['ts']); + } + else + { + if(isset($timearr['hour']) && $timearr['hour'] !== '') + { + $this->hour = $timearr['hour']; + } + if(isset($timearr['min']) && $timearr['min'] !== '') + { + $this->minute = $timearr['min']; + } + if(isset($timearr['sec']) && $timearr['sec'] !== '') + { + $this->second = $timearr['sec']; + } + if(isset($timearr['day']) && $timearr['day'] !== '') + { + $this->day = $timearr['day']; + } + if(isset($timearr['week']) && $timearr['week'] !== '') + { + $this->week = $timearr['week']; + } + if(isset($timearr['month']) && $timearr['month'] !== '') + { + $this->month = $timearr['month']; + } + if(isset($timearr['year']) && $timearr['year'] >= 1970) + { + $this->year = $timearr['year']; + } + else + { + return null; + } + } + if ($check) + { + $this->getDateTime(); + } + } function vt_DateTime(&$timearr,$check) { - if (! isset( $timearr) || count($timearr) == 0 ) - { - $this->setDateTime(null); - } - else if ( isset( $timearr['ts'])) - { - $this->setDateTime($time['ts']); - } - else - { - if(isset($timearr['hour']) && $timearr['hour'] !== '') - { - $this->hour = $timearr['hour']; - } - if(isset($timearr['min']) && $timearr['min'] !== '') - { - $this->minute = $timearr['min']; - } - if(isset($timearr['sec']) && $timearr['sec'] !== '') - { - $this->second = $timearr['sec']; - } - if(isset($timearr['day']) && $timearr['day'] !== '') - { - $this->day = $timearr['day']; - } - if(isset($timearr['week']) && $timearr['week'] !== '') - { - $this->week = $timearr['week']; - } - if(isset($timearr['month']) && $timearr['month'] !== '') - { - $this->month = $timearr['month']; - } - if(isset($timearr['year']) && $timearr['year'] >= 1970) - { - $this->year = $timearr['year']; - } - else - { - return null; - } - } - if ($check) - { - $this->getDateTime(); - } + self::__construct($timearr,$check); } /** diff --git a/modules/Calendar/RepeatEvents.php b/modules/Calendar/RepeatEvents.php index 0b4d54b73cca9ea84065e773d77aa1b2df2b4123..93898a03fcbb6ba6f00b5ecd4ea7c13e402a6500 100644 --- a/modules/Calendar/RepeatEvents.php +++ b/modules/Calendar/RepeatEvents.php @@ -39,6 +39,14 @@ class Calendar_RepeatEvents { global $current_user; $format_string = 'Y-m-d H:i'; switch($current_user->date_format) { + case 'dd.mm.yyyy': $format_string = 'd.m.Y H:i'; break; + case 'mm.dd.yyyy': $format_string = 'm.d.Y H:i'; break; + case 'yyyy.mm.dd': $format_string = 'Y.m.d H:i'; break; + + case 'dd/mm/yyyy': $format_string = 'd/m/Y H:i'; break; + case 'mm/dd/yyyy': $format_string = 'm/d/Y H:i'; break; + case 'yyyy/mm/dd': $format_string = 'Y/m/d H:i'; break; + case 'dd-mm-yyyy': $format_string = 'd-m-Y H:i'; break; case 'mm-dd-yyyy': $format_string = 'm-d-Y H:i'; break; case 'yyyy-mm-dd': $format_string = 'Y-m-d H:i'; break; diff --git a/modules/Calendar/actions/ActivityReminder.php b/modules/Calendar/actions/ActivityReminder.php index 3d51ed4dceaaae4f77892aa85edb56e8917c4be4..b1a358bf5a44421e67a44bf13ad0e36a376e3547 100644 --- a/modules/Calendar/actions/ActivityReminder.php +++ b/modules/Calendar/actions/ActivityReminder.php @@ -17,22 +17,26 @@ class Calendar_ActivityReminder_Action extends Vtiger_Action_Controller{ public function requiresPermission(Vtiger_Request $request){ $permissions = parent::requiresPermission($request); - $mode = $request->getMode(); - if(!empty($mode)) { - switch ($mode) { - case 'getReminders': - $permissions[] = array('module_parameter' => 'module', 'action' => 'DetailView'); - break; - case 'postpone': - $permissions[] = array('module_parameter' => 'module', 'action' => 'EditView', 'record_parameter' => 'record'); - break; + if (vtlib_isModuleActive($request->getModule())) { + $mode = $request->getMode(); + if (!empty($mode)) { + switch ($mode) { + case 'getReminders': + $permissions[] = ['module_parameter' => 'module', 'action' => 'DetailView']; + break; - default: - break; - } - } - return $permissions; + case 'postpone': + $permissions[] = ['module_parameter' => 'module', 'action' => 'EditView', 'record_parameter' => 'record']; + break; + + default: + break; + } + } + } + + return $permissions; } public function process(Vtiger_Request $request) { diff --git a/modules/Calendar/actions/DragDropAjax.php b/modules/Calendar/actions/DragDropAjax.php index b42597544ad66bc6d1916db1a9d6a5a6d7a5549f..1b7bd4c0cc53d84b80b4fd2856b420b93e00ef0a 100755 --- a/modules/Calendar/actions/DragDropAjax.php +++ b/modules/Calendar/actions/DragDropAjax.php @@ -44,13 +44,9 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); $record->set('mode','edit'); - $startDateTime[] = $record->get('date_start'); - $startDateTime[] = $record->get('time_start'); - $startDateTime = implode(' ',$startDateTime); + $startDateTime = $this->getFormattedDateTime($record->get('date_start'), $record->get('time_start')); + $oldDateTime = $this->getFormattedDateTime($record->get('due_date'), $record->get('time_end')); - $oldDateTime[] = $record->get('due_date'); - $oldDateTime[] = $record->get('time_end'); - $oldDateTime = implode(' ',$oldDateTime); $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); $interval = strtotime($resultDateTime) - strtotime($startDateTime); @@ -68,24 +64,18 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); $recordModel->set('mode','edit'); - $startDateTime = ''; - $startDateTime[] = $recordModel->get('date_start'); - $startDateTime[] = $recordModel->get('time_start'); - $startDateTime = implode(' ',$startDateTime); + $startDateTime = $this->getFormattedDateTime($recordModel->get('date_start'), $recordModel->get('time_start')); $dueDate = strtotime($startDateTime) + $interval; $formatDate = date("Y-m-d H:i:s", $dueDate); $parts = explode(' ',$formatDate); $startDateTime = new DateTime($startDateTime); $recordModel->set('due_date',$parts[0]); - if(activitytype != 'Task') { + if($activityType != 'Task') { $recordModel->set('time_end',$parts[1]); } - $endDateTime = ''; - $endDateTime[] = $recordModel->get('due_date'); - $endDateTime[] = $recordModel->get('time_end'); - $endDateTime = implode(' ',$endDateTime); + $endDateTime = $this->getFormattedDateTime($recordModel->get('due_date'), $recordModel->get('time_end')); $endDateTime = new DateTime($endDateTime); if($startDateTime <= $endDateTime) { @@ -97,26 +87,18 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { } $result['recurringRecords'] = true; } else { - $oldDateTime = ''; - $oldDateTime[] = $record->get('due_date'); - $oldDateTime[] = $record->get('time_end'); - $oldDateTime = implode(' ',$oldDateTime); + $oldDateTime = $this->getFormattedDateTime($record->get('due_date'), $record->get('time_end')); $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); $parts = explode(' ',$resultDateTime); $record->set('due_date',$parts[0]); - if(activitytype != 'Task') { + if($activityType != 'Task') { $record->set('time_end',$parts[1]); } - $startDateTime = ''; - $startDateTime[] = $record->get('date_start'); - $startDateTime[] = $record->get('time_start'); - $startDateTime = implode(' ',$startDateTime); + $startDateTime = $this->getFormattedDateTime($record->get('date_start'), $record->get('time_start')); $startDateTime = new DateTime($startDateTime); - $endDateTime[] = $record->get('due_date'); - $endDateTime[] = $record->get('time_end'); - $endDateTime = implode(' ',$endDateTime); + $endDateTime = $this->getFormattedDateTime($record->get('due_date'), $record->get('time_end')); $endDateTime = new DateTime($endDateTime); //Checking if startDateTime is less than or equal to endDateTime if($startDateTime <= $endDateTime) { @@ -195,15 +177,11 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); $record->set('mode','edit'); - $oldStartDateTime[] = $record->get('date_start'); - $oldStartDateTime[] = $record->get('time_start'); - $oldStartDateTime = implode(' ',$oldStartDateTime); + $oldStartDateTime = $this->getFormattedDateTime($record->get('date_start'), $record->get('time_start')); $resultDateTime = $this->changeDateTime($oldStartDateTime, $dayDelta, $minuteDelta, $secondsDelta); $startDateInterval = strtotime($resultDateTime) - strtotime($oldStartDateTime); - $oldEndDateTime[] = $record->get('due_date'); - $oldEndDateTime[] = $record->get('time_end'); - $oldEndDateTime = implode(' ', $oldEndDateTime); + $oldEndDateTime = $this->getFormattedDateTime($record->get('due_date'), $record->get('time_end')); $resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta, $secondsDelta); $endDateInterval = strtotime($resultDateTime) - strtotime($oldEndDateTime); @@ -221,29 +199,23 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); $recordModel->set('mode', 'edit'); - $startDateTime = ''; - $startDateTime[] = $recordModel->get('date_start'); - $startDateTime[] = $recordModel->get('time_start'); - $startDateTime = implode(' ', $startDateTime); + $startDateTime = $this->getFormattedDateTime($recordModel->get('date_start'), $recordModel->get('time_start')); $startDate = strtotime($startDateTime) + $startDateInterval; $formatStartDate = date("Y-m-d H:i:s", $startDate); $parts = explode(' ', $formatStartDate); $startDateTime = new DateTime($startDateTime); $recordModel->set('date_start', $parts[0]); - if (activitytype != 'Task') + if ($activityType != 'Task') $recordModel->set('time_start', $parts[1]); - $endDateTime = ''; - $endDateTime[] = $recordModel->get('due_date'); - $endDateTime[] = $recordModel->get('time_end'); - $endDateTime = implode(' ', $endDateTime); + $endDateTime = $this->getFormattedDateTime($recordModel->get('due_date'), $recordModel->get('time_end')); $endDate = strtotime($endDateTime) + $endDateInterval; $formatEndDate = date("Y-m-d H:i:s", $endDate); $endDateParts = explode(' ', $formatEndDate); $endDateTime = new DateTime($endDateTime); $recordModel->set('due_date', $endDateParts[0]); - if (activitytype != 'Task') + if ($activityType != 'Task') $recordModel->set('time_end', $endDateParts[1]); $this->setRecurrenceInfo($recordModel); @@ -251,23 +223,17 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { } $result['recurringRecords'] = true; } else { - $oldStartDateTime = array(); - $oldStartDateTime[] = $record->get('date_start'); - $oldStartDateTime[] = $record->get('time_start'); - $oldStartDateTime = implode(' ', $oldStartDateTime); + $oldStartDateTime = $this->getFormattedDateTime($record->get('date_start'), $record->get('time_start')); $resultDateTime = $this->changeDateTime($oldStartDateTime,$dayDelta,$minuteDelta,$secondsDelta); $parts = explode(' ',$resultDateTime); $record->set('date_start',$parts[0]); $record->set('time_start',$parts[1]); - $oldEndDateTime = array(); - $oldEndDateTime[] = $record->get('due_date'); - $oldEndDateTime[] = $record->get('time_end'); - $oldEndDateTime = implode(' ',$oldEndDateTime); + $oldEndDateTime = $this->getFormattedDateTime($record->get('due_date'), $record->get('time_end')); $resultDateTime = $this->changeDateTime($oldEndDateTime,$dayDelta,$minuteDelta,$secondsDelta); $parts = explode(' ',$resultDateTime); $record->set('due_date',$parts[0]); - if(activitytype != 'Task') { + if($activityType != 'Task') { $record->set('time_end',$parts[1]); } diff --git a/modules/Calendar/actions/Feed.php b/modules/Calendar/actions/Feed.php index c053754e48a1480f865d2b2f600b149e4731d9ba..3df75e4b7815639e368a72cbf002b148e56f463c 100644 --- a/modules/Calendar/actions/Feed.php +++ b/modules/Calendar/actions/Feed.php @@ -53,19 +53,6 @@ class Calendar_Feed_Action extends Vtiger_BasicAjax_Action { public function _process($request) { try { - foreach ($request as $k => $v) { - if ($k == 'conditions' || $k == 'mapping') continue; - - if ($k == 'fieldname' && $v) { - $vp = explode(',', $v); - $v = array(); - foreach ($vp as $p) $v[] = $this->valForSql($p); - $request[$k] = implode(',', $v); - } else { - $request[$k] = $this->valForSql($v); - } - } - $start = $request['start']; $end = $request['end']; $type = $request['type']; diff --git a/modules/Calendar/actions/SaveAjax.php b/modules/Calendar/actions/SaveAjax.php index a82692ec96b3d793cff64bdd4fdc4a5899c4a88e..5893c853d72f27ff4b040032fe3b76666edcfe5c 100644 --- a/modules/Calendar/actions/SaveAjax.php +++ b/modules/Calendar/actions/SaveAjax.php @@ -207,4 +207,13 @@ class Calendar_SaveAjax_Action extends Vtiger_SaveAjax_Action { return $recordModel; } + + /** + * Helper API. See #1301 on code.vtiger.com + **/ + public function getFormattedDateTime($date, $time) { + return trim($date . ' ' . $time); + } + } + diff --git a/modules/Calendar/actions/SaveFollowupAjax.php b/modules/Calendar/actions/SaveFollowupAjax.php index 3e50747462c13c94e05ee7631519d40f5cba55c7..d1bf992cd51be9e8cd30bb3841e3e687e6bcaf65 100755 --- a/modules/Calendar/actions/SaveFollowupAjax.php +++ b/modules/Calendar/actions/SaveFollowupAjax.php @@ -101,9 +101,7 @@ class Calendar_SaveFollowupAjax_Action extends Calendar_SaveAjax_Action { } else{ //checking if the event can be marked as Held (status validation) - $startDateTime[] = $recordModel->get('date_start'); - $startDateTime[] = $recordModel->get('time_start'); - $startDateTime = implode(' ',$startDateTime); + $startDateTime = $this->getFormattedDateTime($recordModel->get('date_start'), $recordModel->get('time_start')); $startDateTime = new DateTime($startDateTime); $currentDateTime = date("Y-m-d H:i:s"); $currentDateTime = new DateTime($currentDateTime); diff --git a/modules/Calendar/iCal/iCalendar_components.php b/modules/Calendar/iCal/iCalendar_components.php index e916c6900bc87701900371e3ca613d09a474d779..bbaf6034b27a1edbb831816a54b70515fd5619f3 100644 --- a/modules/Calendar/iCal/iCalendar_components.php +++ b/modules/Calendar/iCal/iCalendar_components.php @@ -8,9 +8,13 @@ class iCalendar_component { var $valid_properties = NULL; var $valid_components = NULL; - function iCalendar_component() { + function __construct() + { $this->construct(); } + function iCalendar_component() { + self::__construct(); + } function construct() { // Initialize the components array diff --git a/modules/Calendar/iCal/iCalendar_properties.php b/modules/Calendar/iCal/iCalendar_properties.php index ad7eb14eb844d20ff24b57d601722b6b088c73b0..b1f320361ab2535583928cc3e148d83a8e3976ba 100644 --- a/modules/Calendar/iCal/iCalendar_properties.php +++ b/modules/Calendar/iCal/iCalendar_properties.php @@ -13,10 +13,10 @@ class iCalendar_property { var $val_default = NULL; function iCalendar_property() { - $this->construct(); + self::__construct(); } - function construct() { + function __construct() { $this->parameters = array(); } diff --git a/modules/Calendar/iCal/ical-parser-class.php b/modules/Calendar/iCal/ical-parser-class.php index ed4d3c3237e9ddf8a2abd16d2e2fcb984aa1eb22..7395c2e260669e3da5bb674e0efbffebec9a8fe5 100644 --- a/modules/Calendar/iCal/ical-parser-class.php +++ b/modules/Calendar/iCal/ical-parser-class.php @@ -4,9 +4,12 @@ class iCal { var $folders; - function iCal() { + function __construct() { $this->folders = 'cache/import/'; } + function iCal() { + self::__construct(); + } function iCalReader($filename,$root_directory='') { $iCaltoArray = $this->iCalDecoder($filename,$root_directory); diff --git a/modules/Calendar/models/FilterRecordStructure.php b/modules/Calendar/models/FilterRecordStructure.php index 0ac5d2cb80fe26cff4f79dec7203eb0c0158c984..6998207fdab90fed5363715290aba6b9abf56cb4 100644 --- a/modules/Calendar/models/FilterRecordStructure.php +++ b/modules/Calendar/models/FilterRecordStructure.php @@ -41,6 +41,25 @@ class Calendar_FilterRecordStructure_Model extends Vtiger_FilterRecordStructure_ } } + $eventsModuleModel = Vtiger_Module_Model::getInstance('Events'); + $eventsStructureModel = Vtiger_RecordStructure_Model::getInstanceForModule($eventsModuleModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER); + $blockModelList = $eventsStructureModel->getModule()->getBlocks(); + foreach ($blockModelList as $blockLabel => $blockModel) { + $fieldModelList = $blockModel->getFields(); + if ($fieldModelList) { + $values[vtranslate($blockLabel, 'Events')] = array(); + foreach ($fieldModelList as $fieldName => $fieldModel) { + if ($fieldModel->isViewableInFilterView()) { + $newFieldModel = clone $fieldModel; + if ($recordExists) { + $newFieldModel->set('fieldvalue', $recordModel->get($fieldName)); + } + $values[vtranslate($blockLabel, 'Events')][$fieldName] = $newFieldModel; + } + } + } + } + //All the reference fields should also be sent $fields = $moduleModel->getFieldsByType(array('reference')); foreach ($fields as $parentFieldName => $field) { diff --git a/modules/Calendar/models/ListView.php b/modules/Calendar/models/ListView.php index a40705d68501e2518d196e7264f5424b13e21ded..216dda81a51e94eb759d81e154b3cecbc2a1a931 100644 --- a/modules/Calendar/models/ListView.php +++ b/modules/Calendar/models/ListView.php @@ -203,8 +203,8 @@ class Calendar_ListView_Model extends Vtiger_ListView_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator)); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(empty($sortOrder)) { $sortOrder = 'DESC'; } diff --git a/modules/Calendar/models/Module.php b/modules/Calendar/models/Module.php index 4c79cd351ada8206df67288c656e40556ccb742a..adfd7ed18202e1c4030f2ce14c66174e2ac92f8f 100644 --- a/modules/Calendar/models/Module.php +++ b/modules/Calendar/models/Module.php @@ -204,7 +204,7 @@ class Calendar_Module_Model extends Vtiger_Module_Model { * Function to get export query * @return <String> query; */ - public function getExportQuery($where) { + public function getExportQuery($focus, $where) { $currentUserModel = Users_Record_Model::getCurrentUserModel(); $userId = $currentUserModel->getId(); $userGroup = new GetUserGroups(); diff --git a/modules/Calendar/uitypes/Datetime.php b/modules/Calendar/uitypes/Datetime.php index b45369c00091d86c36e0dbe6e08b24cb41e5b264..3b1c244e5e40e43d83c9c3825dba1a473a5da58e 100644 --- a/modules/Calendar/uitypes/Datetime.php +++ b/modules/Calendar/uitypes/Datetime.php @@ -10,7 +10,7 @@ class Calendar_Datetime_UIType extends Vtiger_Datetime_UIType { - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { //Since date_start and due_date fields of calendar can have time appended or removed if($this->hasTimeComponent($value)) { return self::getDisplayDateTimeValue($value); diff --git a/modules/Campaigns/Campaigns.php b/modules/Campaigns/Campaigns.php index 93fa0c1a0161c44dc97b21fe40877f429880a8ed..ef6d8ba5f3a6765df5b767757fba2ea268c3dd10 100644 --- a/modules/Campaigns/Campaigns.php +++ b/modules/Campaigns/Campaigns.php @@ -68,12 +68,14 @@ class Campaigns extends CRMEntity { // For Alphabetical search var $def_basicsearch_col = 'campaignname'; - + function __construct() { + $this->log =LoggerManager::getLogger('campaign'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Campaigns'); + } function Campaigns() { - $this->log =LoggerManager::getLogger('campaign'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Campaigns'); + self::__construct(); } /** Function to handle module specific operations when saving a entity @@ -171,7 +173,7 @@ class Campaigns extends CRMEntity { if($return_value == null) $return_value = Array(); - else if($is_CampaignStatusAllowed) { + else if($is_CampaignStatusAllowed && is_array($return_value['header'])) { $statusPos = count($return_value['header']) - 2; // Last column is for Actions, exclude that. Also the index starts from 0, so reduce one more count. $return_value = $this->add_status_popup($return_value, $statusPos, 'Accounts'); } diff --git a/modules/Contacts/Contacts.php b/modules/Contacts/Contacts.php index 1a53e84d561d641057f1c4c9d955ca7c6b503d5e..68f72ce4ff8ac2beed875f4cf32e4007731b349b 100644 --- a/modules/Contacts/Contacts.php +++ b/modules/Contacts/Contacts.php @@ -144,11 +144,13 @@ class Contacts extends CRMEntity { 'Emails' => array('table_name' => 'vtiger_seactivityrel', 'table_index' => 'crmid', 'rel_index' => 'activityid'), 'Vendors' => array('table_name' => 'vtiger_vendorcontactrel', 'table_index' => 'vendorid', 'rel_index' => 'contactid'), ); - + function __construct() { + $this->log = LoggerManager::getLogger('contact'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Contacts'); + } function Contacts() { - $this->log = LoggerManager::getLogger('contact'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Contacts'); + self::__construct(); } // Mike Crowe Mod --------------------------------------------------------Default ordering for us @@ -1535,13 +1537,6 @@ function get_contactsforol($user_name) $contents = str_replace('$support_team$',getTranslatedString('Support Team', $moduleName),$contents); $contents = str_replace('$logo$','<img src="cid:logo" />',$contents); - //Company Details - $contents = str_replace('$address$',$companyDetails['address'],$contents); - $contents = str_replace('$companyname$',$companyDetails['companyname'],$contents); - $contents = str_replace('$phone$',$companyDetails['phone'],$contents); - $contents = str_replace('$companywebsite$',$companyDetails['website'],$contents); - $contents = str_replace('$supportemail$',$HELPDESK_SUPPORT_EMAIL_ID,$contents); - if($type == "LoginDetails") { $temp=$contents; $value["subject"]=decode_html($adb->query_result($result,0,'subject')); diff --git a/modules/CustomView/CustomView.php b/modules/CustomView/CustomView.php index db8bf8c97d353c0b67214672e6dd9f6172a8827a..af3ea9c50a6ec8a4ea64fbca1272d75940fc1add 100644 --- a/modules/CustomView/CustomView.php +++ b/modules/CustomView/CustomView.php @@ -52,16 +52,19 @@ class CustomView extends CRMEntity { * @param $module -- The module Name:: Type String(optional) * @returns nothing */ + function __construct($module = "") { + global $current_user; + $this->customviewmodule = $module; + $this->escapemodule[] = $module . "_"; + $this->escapemodule[] = "_"; + $this->smownerid = $current_user->id; + $this->moduleMetaInfo = array(); + if ($module != "" && $module != 'Calendar') { + $this->meta = $this->getMeta($module, $current_user); + } + } function CustomView($module = "") { - global $current_user, $adb; - $this->customviewmodule = $module; - $this->escapemodule[] = $module . "_"; - $this->escapemodule[] = "_"; - $this->smownerid = $current_user->id; - $this->moduleMetaInfo = array(); - if ($module != "" && $module != 'Calendar') { - $this->meta = $this->getMeta($module, $current_user); - } + self::__construct($module); } /** diff --git a/modules/Documents/Documents.php b/modules/Documents/Documents.php index 4d1319a1a31c95cf96f0610b3067138b6a441961..b1c53de169278c92bc68d65ae3daa53ba8591764 100644 --- a/modules/Documents/Documents.php +++ b/modules/Documents/Documents.php @@ -70,12 +70,16 @@ class Documents extends CRMEntity { //Added these variables which are used as default order by and sortorder in ListView var $default_order_by = 'title'; var $default_sort_order = 'ASC'; + + function __construct() { + $this->log = LoggerManager::getLogger('notes'); + $this->log->debug("Entering Documents() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Documents'); + $this->log->debug("Exiting Documents method ..."); + } function Documents() { - $this->log = LoggerManager::getLogger('notes'); - $this->log->debug("Entering Documents() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Documents'); - $this->log->debug("Exiting Documents method ..."); + self::__construct(); } function save_module($module) diff --git a/modules/Documents/models/ListView.php b/modules/Documents/models/ListView.php index 0e62f6f521218f26fa4647b4193f521087538cd4..12f2120f25dd48e1419754aea330a052597ffd4d 100644 --- a/modules/Documents/models/ListView.php +++ b/modules/Documents/models/ListView.php @@ -173,8 +173,8 @@ class Documents_ListView_Model extends Vtiger_ListView_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator)); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(!empty($orderBy)){ $queryGenerator = $this->get('query_generator'); diff --git a/modules/Documents/models/Record.php b/modules/Documents/models/Record.php index c87e720781ac0bcc00de464490d6bc9df566fbae..84b46ce7a68112990c88bd1906cbd6e6a8b75a0b 100644 --- a/modules/Documents/models/Record.php +++ b/modules/Documents/models/Record.php @@ -18,7 +18,7 @@ class Documents_Record_Model extends Vtiger_Record_Model { return Vtiger_Util_Helper::getRecordName($this->getId()); } - function getDownloadFileURL() { + function getDownloadFileURL($attachmentId = false) { if ($this->get('filelocationtype') == 'I') { $fileDetails = $this->getFileDetails(); return 'index.php?module='. $this->getModuleName() .'&action=DownloadFile&record='. $this->getId() .'&fileid='. $fileDetails['attachmentsid'].'&name='. $fileDetails['name']; @@ -52,7 +52,7 @@ class Documents_Record_Model extends Vtiger_Record_Model { return $returnValue; } - function getFileDetails() { + function getFileDetails($attachmentId = false) { $db = PearDatabase::getInstance(); $fileDetails = array(); @@ -66,7 +66,7 @@ class Documents_Record_Model extends Vtiger_Record_Model { return $fileDetails; } - function downloadFile() { + function downloadFile($attachmentId = false) { $fileDetails = $this->getFileDetails(); $fileContent = false; diff --git a/modules/Documents/uitypes/Text.php b/modules/Documents/uitypes/Text.php index 03b8acbdcd367b8a3fd3eb58450b55795db36584..dc06bc03d202239c51032475573a57baea5e9c01 100644 --- a/modules/Documents/uitypes/Text.php +++ b/modules/Documents/uitypes/Text.php @@ -15,7 +15,7 @@ class Documents_Text_UIType extends Vtiger_Text_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false,$removeTags = false) { return $value; } diff --git a/modules/Documents/views/List.php b/modules/Documents/views/List.php index a40df10f0b1dceea3226f20c0b677c0bd8672de3..4cf4e20188d252f7e2ff5d981c35a81b2768f478 100644 --- a/modules/Documents/views/List.php +++ b/modules/Documents/views/List.php @@ -24,7 +24,7 @@ class Documents_List_View extends Vtiger_List_View { public function checkPermission(Vtiger_Request $request) { return parent::checkPermission($request); } - function preProcess (Vtiger_Request $request) { + function preProcess (Vtiger_Request $request, $display=true) { $viewer = $this->getViewer ($request); $moduleName = $request->getModule(); @@ -180,9 +180,9 @@ class Documents_List_View extends Vtiger_List_View { $tagParams = array(); } - $searchParams = array_merge($searchParams, $tagParams); + $searchAndTagParams = array_merge($searchParams, $tagParams); - $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchParams, $listViewModel->getModule()); + $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchAndTagParams, $listViewModel->getModule()); $listViewModel->set('search_params',$transformedSearchParams); @@ -196,6 +196,15 @@ class Documents_List_View extends Vtiger_List_View { } } + + foreach($tagParams as $fieldListGroup){ + foreach($fieldListGroup as $fieldSearchInfo){ + $fieldSearchInfo['searchValue'] = $fieldSearchInfo[2]; + $fieldSearchInfo['fieldName'] = $fieldName = $fieldSearchInfo[0]; + $fieldSearchInfo['comparator'] = $fieldSearchInfo[1]; + $tagParams[$fieldName] = $fieldSearchInfo; + } + } $folderId = $request->get('folder_id'); $folderValue = $request->get('folder_value'); @@ -280,6 +289,7 @@ class Documents_List_View extends Vtiger_List_View { $viewer->assign('IS_MODULE_EDITABLE', $listViewModel->getModule()->isPermitted('EditView')); $viewer->assign('IS_MODULE_DELETABLE', $listViewModel->getModule()->isPermitted('Delete')); $viewer->assign('SEARCH_DETAILS', $searchParams); + $viewer->assign('TAG_DETAILS', $tagParams); $viewer->assign('LIST_VIEW_MODEL', $listViewModel); $viewer->assign('NO_SEARCH_PARAMS_CACHE', $request->get('nolistcache')); $viewer->assign('VIEWID', $cvId); diff --git a/modules/Emails/Emails.php b/modules/Emails/Emails.php index f3dac4473ecedbf522c468277a292c54188eb6e3..e05b9fa3d06f81b73e48ef4091a0dd45542e4ec9 100644 --- a/modules/Emails/Emails.php +++ b/modules/Emails/Emails.php @@ -42,9 +42,9 @@ class Emails extends CRMEntity { 'Related to' => Array('seactivityrel' => 'parent_id'), 'Date Sent' => Array('activity' => 'date_start'), 'Time Sent' => Array('activity' => 'time_start'), - 'Assigned To' => Array('crmentity', 'smownerid'), - 'Access Count' => Array('email_track', 'access_count'), - 'Click Count' => Array('email_track','click_count'), + 'Assigned To' => Array('crmentity' => 'smownerid'), + 'Access Count' => Array('email_track' => 'access_count'), + 'Click Count' => Array('email_track' => 'click_count'), ); var $list_fields_name = Array( 'Subject' => 'subject', @@ -67,13 +67,16 @@ class Emails extends CRMEntity { /** This function will set the columnfields for Email module */ + function __construct() { + $this->log = LoggerManager::getLogger('email'); + $this->log->debug("Entering Emails() method ..."); + $this->log = LoggerManager::getLogger('email'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Emails'); + $this->log->debug("Exiting Email method ..."); + } function Emails() { - $this->log = LoggerManager::getLogger('email'); - $this->log->debug("Entering Emails() method ..."); - $this->log = LoggerManager::getLogger('email'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Emails'); - $this->log->debug("Exiting Email method ..."); + self::__construct(); } function save_module($module) { diff --git a/modules/Emails/class.phpmailer.php b/modules/Emails/class.phpmailer.php index 12a95875702e04a663daf65433161c74204e2f1f..6a821ec563df2213a9bbc6bdb2fa8578bc5cb5d0 100755 --- a/modules/Emails/class.phpmailer.php +++ b/modules/Emails/class.phpmailer.php @@ -45,7 +45,7 @@ class PHPMailer * The character set of the message. * @var string */ - public $CharSet = 'iso-8859-1'; + public $CharSet = 'UTF-8'; /** * The MIME Content-type of the message. @@ -656,6 +656,8 @@ class PHPMailer */ public function __construct($exceptions = null) { + global $default_charset; + $this->CharSet = $default_charset; if ($exceptions !== null) { $this->exceptions = (boolean)$exceptions; } diff --git a/modules/Emails/handlers/Tracker.php b/modules/Emails/handlers/Tracker.php new file mode 100644 index 0000000000000000000000000000000000000000..8172738fb0ceca063fb92c321ef138e69837e98c --- /dev/null +++ b/modules/Emails/handlers/Tracker.php @@ -0,0 +1,81 @@ +<?php +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ + +include_once 'modules/Users/Users.php'; +require_once 'include/events/include.inc'; +vimport('includes.runtime.LanguageHandler'); +class Emails_Tracker_Handler { + + public function process($data = array()) { + global $current_user; + $current_user = Users::getActiveAdminUser(); + + $type = $data['method']; + if($type == 'click'){ + $this->clickHandler($data); + } else if ($type == 'open'){ + $this->openHandler($data); + } + } + + protected function clickHandler($data = []) { + $redirectUrl = rawurldecode($data['redirectUrl']); + $redirectLinkName = rawurldecode($data['linkName']); + if((strpos($_SERVER['HTTP_REFERER'], vglobal('site_URL')) !== false) || (empty($_SERVER['HTTP_REFERER']) && $_REQUEST['fromcrm'])) { + if (!empty($redirectUrl)) { + return Vtiger_Functions::redirectUrl($redirectUrl); + } + exit; + } + + $parentId = $data['parentId']; + $recordId = $data['record']; + + if ($parentId && $recordId) { + $db = PearDatabase::getInstance(); + /* Currently,To track emails we insert a hidden image whose source will be tracking URL. + * When email client loads that image, email open will be tracked. But some email client doesn't load images by default and email open will not be tracked. + * If that email has some link and user clicks on that, link click will be tracked but email will still show as not read which is not correct. + * If any link is clicked on the email and that is getting tracked, we need to check if the email is marked as Open or not and if not we need to mark it as Open on click action. + */ + $result = $db->pquery("SELECT 1 FROM vtiger_email_access WHERE crmid = ? AND mailid = ? ", array($parentId, $recordId)); + if (!$db->num_rows($result)) { + $this->openHandler(array('record' => $recordId, 'parentId' => $parentId)); + } + $recordModel = Emails_Record_Model::getInstanceById($recordId); + $recordModel->trackClicks($parentId); + } + + if(!empty($redirectUrl)) { + return Vtiger_Functions::redirectUrl($redirectUrl); + } + } + + protected function openHandler($data = array()) { + $recordId = $data['record']; + $parentId = $data['parentId']; + if($recordId && $parentId){ + if((strpos($_SERVER['HTTP_REFERER'], vglobal('site_URL')) !== false) || (empty($_SERVER['HTTP_REFERER']) && $_REQUEST['fromcrm'])) { + // If a email is opened from CRM then we no need to track but need to be redirected + Vtiger_ShortURL_Helper::sendTrackerImage(); + exit; + } + $recordModel = Emails_Record_Model::getInstanceById($recordId); + + //If email is opened in last 1 hr, not tracking email open again. + if($recordModel->isEmailOpenedRecently($parentId)) { + Vtiger_ShortURL_Helper::sendTrackerImage(); + exit; + } + $recordModel->updateTrackDetails($parentId); + Vtiger_ShortURL_Helper::sendTrackerImage(); + } + } +} \ No newline at end of file diff --git a/modules/Emails/mail.php b/modules/Emails/mail.php index e6b59c7c52ad30f5cf3deead36b1fc5c71235971..5824fbdb73ad5d59e5b18475d9e3e8e41065c909 100755 --- a/modules/Emails/mail.php +++ b/modules/Emails/mail.php @@ -494,7 +494,7 @@ function getMailError($mail,$mail_status,$to) global $adb; $adb->println("Inside the function getMailError"); - $msg = array_search($mail_status,$mail->language); + $msg = array_search($mail_status,$mail->getTranslations()); $adb->println("Error message ==> ".$msg); if($msg == 'connect_host') diff --git a/modules/Emails/models/Mailer.php b/modules/Emails/models/Mailer.php index e2e7c72a1cb32a81c9b082843cf5c974e2af6610..1a42c7495e9946e628fe693b8dce55c43d84e0af 100644 --- a/modules/Emails/models/Mailer.php +++ b/modules/Emails/models/Mailer.php @@ -135,6 +135,7 @@ class Emails_Mailer_Model extends Vtiger_Mailer { public static function getProcessedContent($content) { // remove script tags from whole html content $processedContent = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $content); + $processedContent = purifyHtmlEventAttributes($processedContent,TRUE); return $processedContent; } diff --git a/modules/Emails/models/Module.php b/modules/Emails/models/Module.php index 84e21d3b5579d47bf39d79e1b2d1d6ab445356e0..505489aa2731d7e42c0362cdf128098e18e4a8a1 100644 --- a/modules/Emails/models/Module.php +++ b/modules/Emails/models/Module.php @@ -112,7 +112,7 @@ class Emails_Module_Model extends Vtiger_Module_Model{ } } $emailsResult[vtranslate($row['setype'], $row['setype'])][$row['crmid']][] = array('value' => $row['value'], - 'label' => decode_html($row['label']).' <b>('.$row['value'].')</b>', + 'label' => decode_html($row['label']).' ('.$row['value'].')', 'name' => decode_html($row['label']),); } @@ -154,7 +154,7 @@ class Emails_Module_Model extends Vtiger_Module_Model{ $emailsResult[vtranslate($moduleName, $moduleName)][$row[$moduleInstance->table_index]][] = array('value' => $emailFieldValue, 'name' => $recordLabel, - 'label' => $recordLabel . ' <b>('.$emailFieldValue.')</b>'); + 'label' => $recordLabel . ' ('.$emailFieldValue.')'); } } diff --git a/modules/Emails/models/Record.php b/modules/Emails/models/Record.php index ea6dc76dac695b34d43015ddb0f9e87e109905a4..11fe808dd6baa4a3c89b53681bc5a6a1d45212f9 100644 --- a/modules/Emails/models/Record.php +++ b/modules/Emails/models/Record.php @@ -79,6 +79,7 @@ class Emails_Record_Model extends Vtiger_Record_Model { // Merge Users module merge tags based on current user. $mergedDescription = getMergedDescription($this->get('description'), $currentUserModel->getId(), 'Users'); $mergedSubject = getMergedDescription($this->get('subject'),$currentUserModel->getId(), 'Users'); + $selectedIds = array(); // push all emails to one single array foreach($toEmailInfo as $selectedId => $selectedEmails) { @@ -95,6 +96,7 @@ class Emails_Record_Model extends Vtiger_Record_Model { // For selectedEmails check and push to emails array foreach($selectedEmails as $selectedEmail){ + $emails=array(); if(trim($selectedEmail)){ array_push($emails, $selectedEmail); } @@ -180,7 +182,7 @@ class Emails_Record_Model extends Vtiger_Record_Model { //Adding attachments to mail if(is_array($attachments)) { foreach($attachments as $attachment) { - $fileNameWithPath = $rootDirectory.$attachment['path'].$attachment['fileid']."_".$attachment['attachment']; + $fileNameWithPath = $rootDirectory.$attachment['path'].$attachment['fileid']."_".$attachment['storedname']; if(is_file($fileNameWithPath)) { $mailer->AddAttachment($fileNameWithPath, $attachment['attachment']); } @@ -277,9 +279,10 @@ class Emails_Record_Model extends Vtiger_Record_Model { for($i=0; $i<$numOfRows; $i++) { $attachmentsList[$i]['fileid'] = $db->query_result($attachmentRes, $i, 'attachmentsid'); $attachmentsList[$i]['attachment'] = decode_html($db->query_result($attachmentRes, $i, 'name')); + $attachmentsList[$i]['storedname'] = decode_html($db->query_result($attachmentRes, $i, 'storedname')); $path = $db->query_result($attachmentRes, $i, 'path'); $attachmentsList[$i]['path'] = $path; - $attachmentsList[$i]['size'] = filesize($path.$attachmentsList[$i]['fileid'].'_'.$attachmentsList[$i]['attachment']); + $attachmentsList[$i]['size'] = filesize($path.$attachmentsList[$i]['fileid'].'_'.$attachmentsList[$i]['storedname']); $attachmentsList[$i]['type'] = $db->query_result($attachmentRes, $i, 'type'); $attachmentsList[$i]['cid'] = $db->query_result($attachmentRes, $i, 'cid'); } @@ -329,6 +332,7 @@ class Emails_Record_Model extends Vtiger_Record_Model { $documentsList[$i]['path'] = $db->query_result($documentRes, $i, 'path'); $documentsList[$i]['fileid'] = $db->query_result($documentRes, $i, 'attachmentsid'); $documentsList[$i]['attachment'] = decode_html($db->query_result($documentRes, $i, 'name')); + $documentsList[$i]['storedname'] = decode_html($db->query_result($documentRes, $i, 'storedname')); $documentsList[$i]['type'] = $db->query_result($documentRes, $i, 'type'); } } @@ -618,14 +622,22 @@ class Emails_Record_Model extends Vtiger_Record_Model { public function trackClicks($parentId) { $db = PearDatabase::getInstance(); $recordId = $this->getId(); + $currentDateTime = date('Y-m-d H:i:s'); + + $db->pquery("INSERT INTO vtiger_email_access(crmid, mailid, accessdate, accesstime) VALUES(?, ?, ?, ?)", array($parentId, $recordId, date('Y-m-d'),$currentDateTime )); - $db->pquery("INSERT INTO vtiger_email_access(crmid, mailid, accessdate, accesstime) VALUES(?, ?, ?, ?)", array($parentId, $recordId, date('Y-m-d'), date('Y-m-d H:i:s'))); - - $result = $db->pquery("SELECT 1 FROM vtiger_email_track WHERE crmid = ? AND mailid = ?", array($parentId, $recordId)); - if ($db->num_rows($result) > 0) { - $db->pquery("UPDATE vtiger_email_track SET click_count = click_count+1 WHERE crmid = ? AND mailid = ?", array($parentId, $recordId)); + $result = $db->pquery("SELECT access_count,click_count FROM vtiger_email_track WHERE crmid = ? AND mailid = ?", array($parentId, $recordId)); + $accessCount = $db->query_result($result,0,'access_count'); + if ($db->num_rows($result)>0) { + $updatedAccessCount = $accessCount; + + //If click is unique (i.e first click on mail), then also increase open count to 1 + if($accessCount == 0) + $updatedAccessCount = $accessCount+1; + + $db->pquery("UPDATE vtiger_email_track SET click_count = click_count+1,access_count=? WHERE crmid = ? AND mailid = ?", array($updatedAccessCount, $parentId, $recordId)); } else { - $db->pquery("INSERT INTO vtiger_email_track(crmid, mailid, click_count) values(?, ?, ?)", array($parentId, $recordId, 1)); + $db->pquery("INSERT INTO vtiger_email_track(crmid, mailid, access_count,click_count) values(?, ?, ?,?)", array($parentId, $recordId, 1,1)); } } @@ -691,16 +703,15 @@ class Emails_Record_Model extends Vtiger_Record_Model { return $content; } - public function getTrackUrlForClicks($parentId, $redirectUrl = false) { - $siteURL = vglobal('site_URL'); - $applicationKey = vglobal('application_unique_key'); - $recordId = $this->getId(); - $trackURL = "$siteURL/modules/Emails/actions/TrackAccess.php?record=$recordId&parentId=$parentId&applicationKey=$applicationKey&method=click"; - if ($redirectUrl) { - $encodedRedirUrl = rawurlencode($redirectUrl); - $trackURL .= "&redirectUrl=$encodedRedirUrl"; - } - return $trackURL; + public function getTrackUrlForClicks($parentId, $redirectUrl = false, $linkName = false) { + $params = array(); + $recordId = $this->getId(); + if($redirectUrl) $params['redirectUrl'] = $redirectUrl; + if($linkName) $params['linkName'] = $linkName; + $params['record'] = $recordId; + $params['parentId'] = $parentId; + $params['method'] = 'click'; + return Vtiger_Functions::generateTrackingURL($params); } /** @@ -785,4 +796,21 @@ class Emails_Record_Model extends Vtiger_Record_Model { return $replyTo; } + + + /** + * Function to check if email is opened within 1 hour. + * @param <Integer> $parentId Parent record id + * @return <Boolean> Returns TRUE if opened within 1 hr else FALSE. + */ + function isEmailOpenedRecently($parentId) { + $db = PearDatabase::getInstance(); + $lastOpenTime = date('Y-m-d H:i:s', strtotime("-1 hours")); + + $result = $db->pquery("SELECT 1 FROM vtiger_email_access WHERE crmid = ? AND mailid = ? AND accesstime > ?", array($parentId, $this->getId(), $lastOpenTime)); + if($db->num_rows($result)) { + return true; + } + return false; + } } diff --git a/modules/Emails/views/MassSaveAjax.php b/modules/Emails/views/MassSaveAjax.php index 84320a36cc1d904aa70da4515b35203b0a1745a7..8b9472efca9bfaad3a1e0741437830989d716a87 100644 --- a/modules/Emails/views/MassSaveAjax.php +++ b/modules/Emails/views/MassSaveAjax.php @@ -70,6 +70,11 @@ class Emails_MassSaveAjax_View extends Vtiger_Footer_View { $existingAttachments = $request->get('attachments',array()); if(empty($recordId)) { if(is_array($existingAttachments)) { + /** + * When no document is selected from CRM in compose mail form, the $documentIds will be an empty string and not an array + * Since $documentIds is string and here we are trying to array push string it will throw fatal error. + */ + $documentIds = $documentIds ? $documentIds : array(); foreach ($existingAttachments as $index => $existingAttachInfo) { $existingAttachInfo['tmp_name'] = $existingAttachInfo['name']; $existingAttachments[$index] = $existingAttachInfo; @@ -185,6 +190,15 @@ class Emails_MassSaveAjax_View extends Vtiger_Footer_View { $date_var = date("Y-m-d H:i:s"); if(is_array($existingAttachments)) { foreach ($existingAttachments as $index => $existingAttachInfo) { + /** + * For download or send email filename should not be in encoded format (md5) + * Ex: for PDF: if filename - abc_md5(abc).pdf then raw filename - abc.pdf + * For Normal documents: rawFileName is not exist in the attachments info. So it fallback to normal filename + */ + $rawFileName = $existingAttachInfo['storedname']; + if (!$rawFileName) { + $rawFileName = $existingAttachInfo['attachment']; + } $file_name = $existingAttachInfo['attachment']; $path = $existingAttachInfo['path']; $fileId = $existingAttachInfo['fileid']; @@ -196,7 +210,7 @@ class Emails_MassSaveAjax_View extends Vtiger_Footer_View { } $oldFilePath = $path.'/'.$oldFileName; - $binFile = sanitizeUploadFileName($file_name, $upload_badext); + $binFile = sanitizeUploadFileName($rawFileName, $upload_badext); $current_id = $adb->getUniqueID("vtiger_crmentity"); diff --git a/modules/Faq/Faq.php b/modules/Faq/Faq.php index 992fd0a755419fc59b725a30f894c8a2a8d2f9eb..3cbd5f538c89a44955da23a439ccfa2909cfdc35 100755 --- a/modules/Faq/Faq.php +++ b/modules/Faq/Faq.php @@ -79,12 +79,15 @@ class Faq extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('faq'); + $this->log->debug("Entering Faq() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Faq'); + $this->log->debug("Exiting Faq method ..."); + } function Faq() { - $this->log =LoggerManager::getLogger('faq'); - $this->log->debug("Entering Faq() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Faq'); - $this->log->debug("Exiting Faq method ..."); + self::__construct(); } function save_module($module) diff --git a/modules/HelpDesk/HelpDesk.php b/modules/HelpDesk/HelpDesk.php index 0d83c3d3a9926af7b77129c90d6ffa295a1d05e7..bea2dfdab343414caa27a6a5cfbd9701325d152d 100644 --- a/modules/HelpDesk/HelpDesk.php +++ b/modules/HelpDesk/HelpDesk.php @@ -100,13 +100,16 @@ class HelpDesk extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('helpdesk'); + $this->log->debug("Entering HelpDesk() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('HelpDesk'); + $this->log->debug("Exiting HelpDesk method ..."); + } function HelpDesk() { - $this->log =LoggerManager::getLogger('helpdesk'); - $this->log->debug("Entering HelpDesk() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('HelpDesk'); - $this->log->debug("Exiting HelpDesk method ..."); + self::__construct(); } diff --git a/modules/Home/models/Module.php b/modules/Home/models/Module.php index 0e3a0034730ec2c44118b359e729eebf8c60af77..ef7a3679d39422440ad10e35881ab66c3d75ab80 100644 --- a/modules/Home/models/Module.php +++ b/modules/Home/models/Module.php @@ -214,10 +214,8 @@ class Home_Module_Model extends Vtiger_Module_Model { $params = array(); if($user != 'all' && $user != '') { - if($user === $currentUser->id) { $query .= " AND vtiger_crmentity.smownerid = ?"; $params[] = $user; - } } $query .= " ORDER BY date_start, time_start LIMIT ?, ?"; diff --git a/modules/Install/models/ConfigFileUtils.php b/modules/Install/models/ConfigFileUtils.php index b5b89fc41919dc70331407fb20d9ad06d8b75014..4eff068d46765d0150adb1663644d6b2e94bfd65 100644 --- a/modules/Install/models/ConfigFileUtils.php +++ b/modules/Install/models/ConfigFileUtils.php @@ -24,32 +24,36 @@ class Install_ConfigFileUtils_Model { private $currencyName; private $adminEmail; + function __construct($configFileParameters) { + if (isset($configFileParameters['root_directory'])){ + $this->rootDirectory = $configFileParameters['root_directory']; + } + + if (isset($configFileParameters['db_hostname'])) { + if(strpos($configFileParameters['db_hostname'], ":")) { + list($this->dbHostname,$this->dbPort) = explode(":",$configFileParameters['db_hostname']); + } else { + $this->dbHostname = $configFileParameters['db_hostname']; + } + } + + if (isset($configFileParameters['db_username'])) $this->dbUsername = $configFileParameters['db_username']; + if (isset($configFileParameters['db_password'])) $this->dbPassword = $configFileParameters['db_password']; + if (isset($configFileParameters['db_name'])) $this->dbName = $configFileParameters['db_name']; + if (isset($configFileParameters['db_type'])) $this->dbType = $configFileParameters['db_type']; + if (isset($configFileParameters['site_URL'])) $this->siteUrl = $configFileParameters['site_URL']; + if (isset($configFileParameters['admin_email'])) $this->adminEmail = $configFileParameters['admin_email']; + if (isset($configFileParameters['currency_name'])) $this->currencyName = $configFileParameters['currency_name']; + if (isset($configFileParameters['vt_charset'])) $this->vtCharset = $configFileParameters['vt_charset']; + if (isset($configFileParameters['default_language'])) $this->vtDefaultLanguage = $configFileParameters['default_language']; + + // update default port + if ($this->dbPort == '') $this->dbPort = self::getDbDefaultPort($this->dbType); + + $this->cacheDir = 'cache/'; + } function Install_ConfigFileUtils_Model($configFileParameters) { - if (isset($configFileParameters['root_directory'])) - $this->rootDirectory = $configFileParameters['root_directory']; - - if (isset($configFileParameters['db_hostname'])) { - if(strpos($configFileParameters['db_hostname'], ":")) { - list($this->dbHostname,$this->dbPort) = explode(":",$configFileParameters['db_hostname']); - } else { - $this->dbHostname = $configFileParameters['db_hostname']; - } - } - - if (isset($configFileParameters['db_username'])) $this->dbUsername = $configFileParameters['db_username']; - if (isset($configFileParameters['db_password'])) $this->dbPassword = $configFileParameters['db_password']; - if (isset($configFileParameters['db_name'])) $this->dbName = $configFileParameters['db_name']; - if (isset($configFileParameters['db_type'])) $this->dbType = $configFileParameters['db_type']; - if (isset($configFileParameters['site_URL'])) $this->siteUrl = $configFileParameters['site_URL']; - if (isset($configFileParameters['admin_email'])) $this->adminEmail = $configFileParameters['admin_email']; - if (isset($configFileParameters['currency_name'])) $this->currencyName = $configFileParameters['currency_name']; - if (isset($configFileParameters['vt_charset'])) $this->vtCharset = $configFileParameters['vt_charset']; - if (isset($configFileParameters['default_language'])) $this->vtDefaultLanguage = $configFileParameters['default_language']; - - // update default port - if ($this->dbPort == '') $this->dbPort = self::getDbDefaultPort($this->dbType); - - $this->cacheDir = 'cache/'; + self::__construct($configFileParameters); } static function getDbDefaultPort($dbType) { @@ -210,9 +214,6 @@ ini_set('memory_limit','64M'); // history_max_viewed default value = 5 \$history_max_viewed = '5'; -// default_module default value = Home -\$default_module = 'Home'; - // default_action default value = index \$default_action = 'index'; diff --git a/modules/Install/views/Index.php b/modules/Install/views/Index.php index 4e20ac2fd677a496c8768b19b074e5d5f0f747c8..54a29e5f49bfd76b83e7b3f86111cdbd0e6a9003 100644 --- a/modules/Install/views/Index.php +++ b/modules/Install/views/Index.php @@ -38,15 +38,6 @@ class Install_Index_view extends Vtiger_View_Controller { $this->applyInstallFriendlyEnv(); date_default_timezone_set('Europe/London'); // to overcome the pre configuration settings - // Added to redirect to default module if already installed - $configFileName = 'config.inc.php'; - if(is_file($configFileName) && filesize($configFileName) > 0) { - $defaultModule = vglobal('default_module'); - $defaultModuleInstance = Vtiger_Module_Model::getInstance($defaultModule); - $defaultView = $defaultModuleInstance->getDefaultViewName(); - header('Location:index.php?module='.$defaultModule.'&view='.$defaultView); - exit; - } parent::preProcess($request); $viewer = $this->getViewer($request); diff --git a/modules/Inventory/views/Detail.php b/modules/Inventory/views/Detail.php index e09bc755472cd62bb150bab5fba80649af309838..8c12acb09469bc093b60db7501902992feb9016e 100644 --- a/modules/Inventory/views/Detail.php +++ b/modules/Inventory/views/Detail.php @@ -9,7 +9,7 @@ *************************************************************************************/ class Inventory_Detail_View extends Vtiger_Detail_View { - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { $viewer = $this->getViewer($request); $viewer->assign('NO_SUMMARY', true); parent::preProcess($request); diff --git a/modules/Invoice/Invoice.php b/modules/Invoice/Invoice.php index 01b57227b8896b1b9ad4cd20382a6e0bcb0c6d47..46f8f255f99a2f296bb03e55a4a753a83a752cd9 100755 --- a/modules/Invoice/Invoice.php +++ b/modules/Invoice/Invoice.php @@ -104,12 +104,15 @@ class Invoice extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('Invoice'); + $this->log->debug("Entering Invoice() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Invoice'); + $this->log->debug("Exiting Invoice method ..."); + } function Invoice() { - $this->log =LoggerManager::getLogger('Invoice'); - $this->log->debug("Entering Invoice() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Invoice'); - $this->log->debug("Exiting Invoice method ..."); + self::__construct(); } diff --git a/modules/Leads/Leads.php b/modules/Leads/Leads.php index bd7bb6ae64d8841a7d91e71bdfcd38de2ee72f81..25f47856a2236e5c0d91c1fd928b8d34335ce6db 100755 --- a/modules/Leads/Leads.php +++ b/modules/Leads/Leads.php @@ -85,12 +85,15 @@ class Leads extends CRMEntity { var $LBL_LEAD_MAPPING = 'LBL_LEAD_MAPPING'; //var $groupTable = Array('vtiger_leadgrouprelation','leadid'); + function __construct() { + $this->log = LoggerManager::getLogger('lead'); + $this->log->debug("Entering Leads() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Leads'); + $this->log->debug("Exiting Lead method ..."); + } function Leads() { - $this->log = LoggerManager::getLogger('lead'); - $this->log->debug("Entering Leads() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Leads'); - $this->log->debug("Exiting Lead method ..."); + self::__construct(); } /** Function to handle module specific operations when saving a entity diff --git a/modules/Leads/models/Record.php b/modules/Leads/models/Record.php index eb64b553605de4ad67a194b74a4f5f9722e18897..6f33cfd4360adaf1b6d33dbe6c1ead5abd7fc67d 100644 --- a/modules/Leads/models/Record.php +++ b/modules/Leads/models/Record.php @@ -25,7 +25,9 @@ class Leads_Record_Model extends Vtiger_Record_Model { public static function getSearchResult($searchKey, $module=false) { $db = PearDatabase::getInstance(); - $deletedCondition = $this->getModule()->getDeletedRecordCondition(); + $leadsModuleModel = Vtiger_Module_Model::getInstance('Leads'); + $deletedCondition = $leadsModuleModel->getDeletedRecordCondition(); + $query = 'SELECT * FROM vtiger_crmentity INNER JOIN vtiger_leaddetails ON vtiger_leaddetails.leadid = vtiger_crmentity.crmid WHERE label LIKE ? AND '.$deletedCondition; diff --git a/modules/Migration/models/Module.php b/modules/Migration/models/Module.php index 44cef6173231d910b14f6ff0da11d83cae193031..51f9d991258ac3437a1f0f5ec3aeaddf7878406c 100644 --- a/modules/Migration/models/Module.php +++ b/modules/Migration/models/Module.php @@ -21,8 +21,12 @@ class Migration_Module_Model extends Vtiger_Module_Model { return $currentVersion; } - public static function getInstance() { - return new self(); + /** + * Static Function to get the instance of Vtiger Module Model for the given id or name + * @param mixed id or name of the module + */ + public static function getInstance($value=null) { + return new self($value); } public function getAllowedMigrationVersions(){ @@ -41,6 +45,7 @@ class Migration_Module_Model extends Vtiger_Module_Model { array('710' => '7.1.0'), array('711' => '7.1.1'), array('720' => '7.2.0'), + array('721' => '7.2.1'), ); return $versions; } diff --git a/modules/Migration/schema/600_to_610.php b/modules/Migration/schema/600_to_610.php index 23c6955e0dc4c4610c0a148479e9cd8bbd371a91..47bf493f9a0acefe977cf0147e517d43f9f238a4 100644 --- a/modules/Migration/schema/600_to_610.php +++ b/modules/Migration/schema/600_to_610.php @@ -705,7 +705,7 @@ echo "<br>Changed timezone column name for mail scanner"; $result = $adb->pquery('SELECT task_id FROM com_vtiger_workflowtasks WHERE workflow_id IN (SELECT workflow_id FROM com_vtiger_workflows WHERE module_name IN (?, ?)) AND task LIKE ?', array('Calendar', 'Events', '%VTSendNotificationTask%')); -$numOfRowas = $adb->num_rows($result); +$numOfRows = $adb->num_rows($result); for ($i = 0; $i < $numOfRows; $i++) { $tm = new VTTaskManager($adb); $task = $tm->retrieveTask($adb->query_result($result, $i, 'task_id')); diff --git a/modules/Migration/schema/660_to_700.php b/modules/Migration/schema/660_to_700.php index 0692a19241e9d871e242f67edaf94ec35f0bb86b..bbe645d9c5deddf3598961f5df9dc02813a860d5 100644 --- a/modules/Migration/schema/660_to_700.php +++ b/modules/Migration/schema/660_to_700.php @@ -432,8 +432,6 @@ if(defined('VTIGER_UPGRADE')) { if (!in_array('module', $columns)) { $db->pquery('ALTER TABLE vtiger_emailtemplates ADD COLUMN module VARCHAR(100)', array()); } - $db->pquery('UPDATE vtiger_emailtemplates SET module=? WHERE templatename IN (?,?,?) AND module IS NULL', array('Events', 'ToDo Reminder', 'Activity Reminder', 'Invite Users')); - $db->pquery('UPDATE vtiger_emailtemplates SET module=? WHERE module IS NULL', array('Contacts')); $moduleName = 'Calendar'; $reminderTemplateResult = $db->pquery('SELECT 1 FROM vtiger_emailtemplates WHERE subject=? AND systemtemplate=?', array('Reminder', '1')); @@ -1226,7 +1224,7 @@ if(defined('VTIGER_UPGRADE')) { } $modules = array(); - $ignoreModules = array('SMSNotifier', 'ModComments'); + $ignoreModules = array('SMSNotifier', 'ModComments', 'PBXManager'); $result = $db->pquery('SELECT name FROM vtiger_tab WHERE isentitytype=? AND name NOT IN ('.generateQuestionMarks($ignoreModules).')', array(1, $ignoreModules)); while ($row = $db->fetchByAssoc($result)) { $modules[] = $row['name']; @@ -2215,7 +2213,11 @@ if(defined('VTIGER_UPGRADE')) { } } } - $db->pquery("DELETE FROM $baseTableName WHERE $baseTableIndex NOT IN (SELECT crmid FROM vtiger_crmentity WHERE setype=?)", array($moduleName)); + $deleteQueryParams = array($moduleName); + if($baseTableName == 'vtiger_activity'){ + array_push($deleteQueryParams, "Emails"); + } + $db->pquery("DELETE FROM $baseTableName WHERE $baseTableIndex NOT IN (SELECT crmid FROM vtiger_crmentity WHERE setype in (". generateQuestionMarks($deleteQueryParams)."))", $deleteQueryParams); } } diff --git a/modules/Migration/schema/701_to_710.php b/modules/Migration/schema/701_to_710.php index a5340d1ca6ec85d90fbdcad533a084b96e0684a2..7562d9775ccd0776a4a41f1f55a6605a8fea3d1c 100644 --- a/modules/Migration/schema/701_to_710.php +++ b/modules/Migration/schema/701_to_710.php @@ -95,7 +95,7 @@ if (defined('VTIGER_UPGRADE')) { $customTableName = $customTable[0]; $customTableId = $customTable[1]; $customTableColumns = $db->getColumnNames($customTableName); - if (in_array($fieldName, $customTableColumns)) { + if (!empty($customTableColumns) && in_array($fieldName, $customTableColumns)) { $fieldModel = Vtiger_Field_Model::getInstance($fieldName, $moduleModel); $db->pquery("UPDATE vtiger_field SET tablename=? WHERE fieldid=?", array($baseTableName, $fieldModel->id)); $db->pquery("ALTER TABLE $baseTableName ADD COLUMN $fieldName VARCHAR(1)", array()); diff --git a/modules/Migration/schema/711_to_720.php b/modules/Migration/schema/711_to_720.php index abf2134192ac5e4cda3f6e6cb73b21587bae49ca..8ef2b7b493c6fd41c4a4f953ec57ee22a16943ee 100644 --- a/modules/Migration/schema/711_to_720.php +++ b/modules/Migration/schema/711_to_720.php @@ -13,5 +13,9 @@ if (defined('VTIGER_UPGRADE')) { $db = PearDatabase::getInstance(); // Added column storedname for vtiger_attachments to support reverse mapping. - $db->pquery('ALTER TABLE vtiger_attachments ADD COLUMN storedname varchar(255) NULL AFTER path', array()); + $columns = $db->getColumnNames('vtiger_attachments'); + $columnName = "storedname"; + if(!in_array($columnName,$columns)) { + $db->pquery('ALTER TABLE vtiger_attachments ADD COLUMN storedname varchar(255) NULL AFTER path', array()); + } } diff --git a/modules/Migration/schema/720_to_721.php b/modules/Migration/schema/720_to_721.php new file mode 100644 index 0000000000000000000000000000000000000000..14506164f678cdbd69f0a008c88c00f3aad35634 --- /dev/null +++ b/modules/Migration/schema/720_to_721.php @@ -0,0 +1,294 @@ +<?php +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + *********************************************************************************/ + +if (defined('VTIGER_UPGRADE')) { + global $current_user, $adb; + $db = PearDatabase::getInstance(); + + //Profile privileges supported for Emails Module + $actions = array('Save', 'EditView', 'Delete', 'DetailView'); + $emailsTabId = getTabid('Emails'); + + $actionIds = array(); + foreach($actions as $actionName) { + array_push($actionIds, getActionid($actionName)); + } + + $profileIdsResult = $db->pquery("SELECT DISTINCT profileid FROM vtiger_profile", array()); + $profileIdCount = $db->num_rows($profileIdsResult); + for($i = 0; $i < $profileIdCount; $i++) { + $profileId = $db->query_result($profileIdsResult, $i, 'profileid'); + foreach($actionIds as $actionId) { + $db->pquery("INSERT INTO vtiger_profile2standardpermissions VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE permissions = ?", + array($profileId, $emailsTabId, $actionId, 0, 0)); + } + echo "Emails permission for profile id :: $profileId inserted into vtiger_profile2standardpermissions table.<br>"; + } + echo 'All profiles permissions updated to Email Module'; + + $db->pquery("UPDATE vtiger_tab SET ownedby = ? WHERE tabid = ?", array(0, $emailsTabId)); + echo "ownedby value updated to 0 for Emails in vtiger_tab table.<br>"; + + vimport('~modules/Users/CreateUserPrivilegeFile.php'); + $usersResult = $db->pquery("SELECT id FROM vtiger_users", array()); + $usersCount = $db->num_rows($usersResult); + for($i = 0; $i < $usersCount; $i++) { + $userId = $db->query_result($usersResult, $i, 'id'); + createUserPrivilegesfile($userId); + createUserSharingPrivilegesfile($userId); + echo "User privilege and sharing privilege files recreated for user id :: $userId.<br>"; + } + + //Default Email reports access count column update from varchar to integer + $db->pquery('UPDATE vtiger_selectcolumn set columnname = ? where columnname=?', array('vtiger_email_track:access_count:Emails_Access_Count:access_count:I', 'vtiger_email_track:access_count:Emails_Access_Count:access_count:V')); + $db->pquery('UPDATE vtiger_relcriteria set columnname = ?, comparator = ? where columnname=?', array('vtiger_email_track:access_count:Emails_Access_Count:access_count:I', 'ny', 'vtiger_email_track:access_count:Emails_Access_Count:access_count:V')); + echo 'Email access count field data type updated to Int'; + + //References module added to Calendar parent_id field to link activites to parent record + $calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar'); + $fieldModel = $calendarModuleModel->getField('parent_id'); + $fieldId = $fieldModel->getId(); + $query = "SELECT * FROM vtiger_ws_fieldtype WHERE uitype=?"; + $result = $db->pquery($query,array($fieldModel->get('uitype'))); + $fieldTypeId = $db->query_result($result,0,'fieldtypeid'); + + $qResult = $db->pquery('SELECT type FROM vtiger_ws_referencetype WHERE fieldtypeid = ?', array($fieldTypeId)); + $existingModules = array(); + for($i=0;$i<$db->num_rows($qResult);$i++) { + $existingModules[] = $db->query_result($qResult, $i ,'type'); + } + + $newModules = array('Invoice','Quotes','PurchaseOrder','SalesOrder'); + foreach($newModules as $module) { + if(!in_array($module, $existingModules)) { + $db->pquery('INSERT INTO vtiger_ws_referencetype VALUES (?,?)', array($fieldTypeId, $module)); + echo "<br>".$module.' Reference module added'; + } + } + + //#1184 => Register field delete event handler + $em = new VTEventsManager($db); + $em->registerHandler('vtiger.field.afterdelete', 'modules/Vtiger/handlers/FieldEventHandler.php', 'FieldEventHandler'); + + $db->pquery('INSERT INTO vtiger_date_format (date_format, sortorderid, presence) VALUES (?, ?, ?)', ['dd.mm.yyyy', 3, 1]); + $db->pquery('INSERT INTO vtiger_date_format (date_format, sortorderid, presence) VALUES (?, ?, ?)', ['dd/mm/yyyy', 4, 1]); + + //#1248 => updated vtiger_systems.server_password to TEXT + $db->pquery('ALTER TABLE vtiger_systems MODIFY server_password text', array()); + + $defaultEventTemplates = array('ToDo Reminder', 'Activity Reminder', 'Invite Users'); + $updateEventParams = array('Events', 'ToDo Reminder', 'Activity Reminder', 'Invite Users'); + $db->pquery('UPDATE vtiger_emailtemplates SET module=? WHERE templatename IN ('. generateQuestionMarks($defaultEventTemplates).')', $updateEventParams); + + $defaultContactTemplates = array('Support end notification before a month', 'Support end notification before a week', 'Send Portal login details to customer', 'Thanks Note', 'Customer Login Details', 'Target Crossed!', 'Follow Up', 'Address Change', 'Accept Order', 'Goods received acknowledgement', 'Acceptance Proposal', 'Pending Invoices', 'Announcement for Release'); + $updateContactParams = array('Contacts','Support end notification before a month', 'Support end notification before a week', 'Send Portal login details to customer', 'Thanks Note', 'Customer Login Details', 'Target Crossed!', 'Follow Up', 'Address Change', 'Accept Order', 'Goods received acknowledgement', 'Acceptance Proposal', 'Pending Invoices', 'Announcement for Release'); + $db->pquery('UPDATE vtiger_emailtemplates SET module=? WHERE templatename IN ('. generateQuestionMarks($defaultContactTemplates).')', $updateContactParams); + + echo 'Email templates default moduleName updated'; + + //Migrate default module data from config editor to database + $moduleModel = Settings_Vtiger_ConfigModule_Model::getInstance(); + $configFieldData = $moduleModel->getViewableData(); + $defaultModule = $configFieldData['default_module']; + if(empty($defaultModule)){ + $defaultModule = 'Home'; + } + + $moduleInstance = Vtiger_Module_Model::getInstance('Users'); + $blockInstance = Vtiger_Block::getInstance('LBL_MORE_INFORMATION', $moduleInstance); + if ($blockInstance) { + $fieldInstance = Vtiger_Field::getInstance('defaultlandingpage', $moduleInstance); + if (!$fieldInstance) { + $fieldInstance = new Vtiger_Field(); + $fieldInstance->name = 'defaultlandingpage'; + $fieldInstance->column = 'defaultlandingpage'; + $fieldInstance->label = 'Default Landing Page'; + $fieldInstance->table = 'vtiger_users'; + $fieldInstance->columntype = 'VARCHAR(100)'; + $fieldInstance->defaultvalue = $defaultModule; + $fieldInstance->typeofdata = 'V~O'; + $fieldInstance->uitype = '32'; + $fieldInstance->presence = '0'; + + $blockInstance->addField($fieldInstance); + $configModuleInstance = Settings_Vtiger_ConfigModule_Model::getInstance(); + $defaultModules = $configModuleInstance->getPicklistValues('default_module'); + $fieldInstance->setPicklistValues($defaultModules); + echo "<br> Default landing page field added <br>"; + } + } + + $allUsers = Users_Record_Model::getAll(true); + $allUserIds = array_keys($allUsers); + + $db->pquery('UPDATE vtiger_users SET defaultlandingpage = ? WHERE id in ('. generateQuestionMarks($allUserIds) .')', array($defaultModule, $allUserIds)); + echo "Default landing page updated for all active users <br>"; + + //Recalculating user-preivilege file, as defaultlandingpage and other preference changes should be updated + foreach ($allUserIds as $userId) { + createUserPrivilegesfile($userId); + createUserSharingPrivilegesfile($userId); + } + echo "Re-calculated user privilege and sharing privileges files"; + + //Adding beforeRelate and afterRelate event handlers + $em = new VTEventsManager($db); + $em->registerHandler('vtiger.entity.beforerelate', 'modules/Vtiger/handlers/RelateEntitesHandler.php', 'RelateEntitesHandler'); + echo '<br>Succecssfully added before relate handler<br>'; + + $em->registerHandler('vtiger.entity.afterrelate', 'modules/Vtiger/handlers/RelateEntitesHandler.php', 'RelateEntitesHandler'); + echo '<br>Succecssfully added before relate handler<br>'; + + //Updating customer-portal email template + $result = $db->pquery("SELECT templateid FROM vtiger_emailtemplates WHERE subject = ?", array('Customer Portal Login Details')); + if ($db->num_rows($result)) { + $templateId = $db->query_result($result, 0, 'templateid'); + } + if(!empty($templateId)){ + $portalLoginTemplateRecord = EmailTemplates_Record_Model::getInstanceById($templateId); + $portalLoginTemplateContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> + <html> + <head> + <title></title> + </head> + <body class="scayt-enabled"> + <!-- <center> --> + <table border="0" cellpadding="0" cellspacing="0" class="borderGrey" width="600px" style="margin-left:0px;"> + <tbody> + <tr> + <td colspan="6"><!-- Begin Pre header --><!-- // End Pre header \ --></td> + </tr> + <tr style="height:50px;"> + <td colspan="6" style=" + font-family: Helvetica,Verdana,sans-serif"> + <div style="margin-bottom:10px;color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);"><br /> + Dear $contacts-firstname$ $contacts-lastname$,</div> + + <div style="margin-top:20px;margin-bottom:20px; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">As our customer, you can be assured of getting excellent support from our team. I would like to take this opportunity to introduce the portal we have setup for valuable customers like you. You can submit questions/issues via the portal, see past issues and responses. In addition, Portal provides you access to our knowledge base and documents we shared with you in the past. + </div> + + <div style="margin-top:10px;color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">$URL$ to login to the portal, with the credentials below.</div> + + <div style="margin-top:20px;color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">Your Username: $login_name$</div> + + <div style="margin-bottom:20px;color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">Your Password: $password$</div> + <div class="gmail_extra" style="margin-top:10px;color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);">Thank you,<br /> + $contacts-smownerid$</div> + + </td> + </tr> + <tr> + <td colspan="6" style="font-family: Helvetica,Verdana,sans-serif;font-size: 11px;color: #666666;"> + <table border="0" cellpadding="4" cellspacing="0" width="100%"> + <tbody> + <!--copy right data--> + <tr> + <td valign="top" style=" + padding-left: 0px; + padding-right: 0px; + width:350px"> + <div style="margin-top:20px;"><em>Powered By <a href="www.vtiger.com">Vtiger</a><div> + </td> + </tr> + <!--subscribers links--> + </tbody> + </table> + </td> + </tr> + </tbody> + </table> + <!-- </center> --> + </body> + </html>'; + $portalLoginTemplateRecord->set('body', $portalLoginTemplateContent); + $portalLoginTemplateRecord->save(); + $portalLoginTemplateId = $portalLoginTemplateRecord->getId(); + echo "Customer portal login template created.<br>"; + + //#1278 - registered new webservice api + $operationName = 'files_retrieve'; + $handler_path = 'include/Webservices/FileRetrieve.php'; + $handler_method = 'vtws_file_retrieve'; + $operation_type = 'GET'; + + $result = $db->pquery("SELECT 1 FROM vtiger_ws_operation WHERE name = ?", array($operationName)); + if(!$db->num_rows($result)) { + $operationId = vtws_addWebserviceOperation($operationName, $handler_path, $handler_method, $operation_type); + vtws_addWebserviceOperationParam($operationId, 'id', 'string', 1); + } + //4537596 - END + } + + //image uitype added for webservice fieldtype + $sql = 'INSERT INTO vtiger_ws_fieldtype(uitype,fieldtype) VALUES (?,?)'; + $params = array('69', 'image'); + $db->pquery($sql, $params); + + //add options to payment_duration field in SalesOrder module + $moduleInstance = Vtiger_Module_Model::getInstance('SalesOrder'); + $fieldInstance = Vtiger_Field_Model::getInstance('payment_duration', $moduleInstance); + $fieldInstance->setPicklistValues(array('Net 01 day', 'Net 05 days', 'Net 07 days', 'Net 10 days', 'Net 15 days')); + + $paymentList = array('Net 01 day' => '1', 'Net 05 days' => '2', 'Net 07 days' => '3', 'Net 10 days' => '4', 'Net 15 days' => '5', + 'Net 30 days' => '6', 'Net 45 days' => '7', 'Net 60 days' => '8'); + $query = 'UPDATE vtiger_payment_duration SET sortorderid = CASE payment_duration'; + foreach ($paymentList as $label => $sortOrderId) { + $query .= " WHEN '$label' THEN $sortOrderId "; + } + $query .= ' ELSE sortorderid END'; + $db->pquery($query, array()); + + //Create new read-only field to display the date of the next invoice creation in recurring sales orders. + $field = new Vtiger_Field(); + $field->name = 'last_recurring_date'; + $field->label= 'Next Invoice Date'; + $field->column = 'last_recurring_date'; + $field->table = 'vtiger_invoice_recurring_info'; + $field->displaytype = 2; + $field->uitype= 5; + $field->columntype = "date"; + $field->typeofdata = 'D~O'; + + $block = Vtiger_Block::getInstance('Recurring Invoice Information', $moduleInstance); + $block->addField($field); + + //Adding related list between Emails and Potentials + $emailRelatedModules = array('Potentials', 'HelpDesk'); + foreach ($emailRelatedModules as $key => $moduleName) { + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + if($moduleModel){ + $moduleModel->setRelatedList(Vtiger_Module_Model::getInstance('Emails'), 'Emails', 'ADD', 'get_emails'); + print("Email related list added to $moduleName"); + } + } + + //Remove unwanted Files + global $root_directory; + $filesPath = array( + "layouts/v7/modules/Mobile/simple/resources/libs/md-icons/README.md", + "layouts/v7/modules/Mobile/simple/resources/libs/md-icons/preview.html", + "/layouts/v7/lib/jquery/Lightweight-jQuery-In-page-Filtering-Plugin-instaFilta/demo.html", + "/layouts/v7/lib/vt-icons/demo.html", + "/layouts/v7/lib/jquery/daterangepicker/index.html", + "/layouts/v7/lib/jquery/jquery-ui-1.11.3.custom/index.html", + "/layouts/v7/lib/jquery/timepicker/index.html", + "/libraries/bootstrap/js/tests", + "/libraries/jquery/colorpicker/index.html", + "/libraries/jquery/jquery-ui/third-party/jQuery-UI-Date-Range-Picker/index.html", + "/libraries/jquery/timepicker/index.html", + ); + foreach ($filesPath as $path){ + $fileName = "$root_directory"."$path"; + if (file_exists($fileName)) { + shell_exec("rm -rf $fileName"); + } + } + echo "unwanted files..cleared.<br>"; +} \ No newline at end of file diff --git a/modules/PickList/PickListUtils.php b/modules/PickList/PickListUtils.php index bd5b04705bb1803bf388d1f0571459c853167e2f..2c00a7e57010e0884757d9b20924e214388985cc 100644 --- a/modules/PickList/PickListUtils.php +++ b/modules/PickList/PickListUtils.php @@ -118,7 +118,7 @@ function getAllPickListValues($fieldName,$lang = Array() ){ $arr = array(); for($i=0;$i<$count;$i++){ $pick_val = decode_html($adb->query_result($result, $i, $fieldName)); - if($lang[$pick_val] != ''){ + if(is_array($lang) && $lang[$pick_val] != ''){ $arr[$pick_val] = $lang[$pick_val]; } else{ diff --git a/modules/Portal/models/Module.php b/modules/Portal/models/Module.php index 517622b6a8dffb4d81263cf89b0f8ce3968e5757..7d8b888f4c70156b10a084afd390dea62360db61 100644 --- a/modules/Portal/models/Module.php +++ b/modules/Portal/models/Module.php @@ -21,7 +21,7 @@ class Portal_Module_Model extends Vtiger_Module_Model { return $links; } - public function saveRecord($recordId, $bookmarkName, $bookmarkUrl) { + public function saveRecord($recordId, $bookmarkName = false, $bookmarkUrl = false) { $db = PearDatabase::getInstance(); if(empty($recordId)) { $portalId = $db->getUniqueID('vtiger_portal'); diff --git a/modules/Potentials/Potentials.php b/modules/Potentials/Potentials.php index b58308fa05847f9ba8e74e77872338f1ada689f4..96e1f9a9c75b86b32edd9c9cfb0d4494cc34da1e 100644 --- a/modules/Potentials/Potentials.php +++ b/modules/Potentials/Potentials.php @@ -92,10 +92,13 @@ class Potentials extends CRMEntity { var $LBL_POTENTIAL_MAPPING = 'LBL_OPPORTUNITY_MAPPING'; //var $groupTable = Array('vtiger_potentialgrouprelation','potentialid'); - function Potentials() { - $this->log = LoggerManager::getLogger('potential'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Potentials'); + function __construct() { + $this->log = LoggerManager::getLogger('potential'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Potentials'); + } + function Potentials() { + self::__construct(); } function save_module($module) diff --git a/modules/PriceBooks/PriceBooks.php b/modules/PriceBooks/PriceBooks.php index 514e0936b2f00c75230193e7c3eb0e817269c5ba..06d5e6d202bfb197cd4ba2c3f4e655741895704a 100755 --- a/modules/PriceBooks/PriceBooks.php +++ b/modules/PriceBooks/PriceBooks.php @@ -54,12 +54,15 @@ class PriceBooks extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('pricebook'); + $this->log->debug("Entering PriceBooks() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('PriceBooks'); + $this->log->debug("Exiting PriceBook method ..."); + } function PriceBooks() { - $this->log =LoggerManager::getLogger('pricebook'); - $this->log->debug("Entering PriceBooks() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('PriceBooks'); - $this->log->debug("Exiting PriceBook method ..."); + self::__construct(); } function save_module($module) diff --git a/modules/PriceBooks/models/ListView.php b/modules/PriceBooks/models/ListView.php index f34855d36b0d3d6c4a3b2d2cf78ca1132bf6a44f..c73bd68e7d1e9939cd900c7f534f4c71dd8da7ea 100644 --- a/modules/PriceBooks/models/ListView.php +++ b/modules/PriceBooks/models/ListView.php @@ -73,8 +73,8 @@ class PriceBooks_ListView_Model extends Vtiger_ListView_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator)); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(!empty($orderBy)){ $queryGenerator = $this->get('query_generator'); diff --git a/modules/Products/Products.php b/modules/Products/Products.php index 3d24496771876d84dc1b17190dadeb06bafd50bb..4ea28bde20aea80b14076fa4e3a55920db1a3951 100755 --- a/modules/Products/Products.php +++ b/modules/Products/Products.php @@ -73,12 +73,15 @@ class Products extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('product'); + $this->log->debug("Entering Products() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Products'); + $this->log->debug("Exiting Product method ..."); + } function Products() { - $this->log =LoggerManager::getLogger('product'); - $this->log->debug("Entering Products() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Products'); - $this->log->debug("Exiting Product method ..."); + self::__construct(); } function save_module($module) diff --git a/modules/Products/models/ListView.php b/modules/Products/models/ListView.php index 7aa64ad15417fc3171199cd62b0f4604715a0f29..00a0e74b867ddf5ec037350832c1f49eb8e37cb9 100644 --- a/modules/Products/models/ListView.php +++ b/modules/Products/models/ListView.php @@ -43,8 +43,8 @@ class Products_ListView_Model extends Vtiger_ListView_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator)); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(!empty($orderBy)){ $queryGenerator = $this->get('query_generator'); diff --git a/modules/PurchaseOrder/PurchaseOrder.php b/modules/PurchaseOrder/PurchaseOrder.php index 81c15375af4e4c61f662b58413ecc3a4a5836cd9..452e3510f7cd5eabc2035f690c49bf38efb6e18f 100644 --- a/modules/PurchaseOrder/PurchaseOrder.php +++ b/modules/PurchaseOrder/PurchaseOrder.php @@ -97,10 +97,13 @@ class PurchaseOrder extends CRMEntity { * This function creates an instance of LoggerManager class using getLogger method * creates an instance for PearDatabase class and get values for column_fields array of Order class. */ + function __construct() { + $this->log =LoggerManager::getLogger('PurchaseOrder'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('PurchaseOrder'); + } function PurchaseOrder() { - $this->log =LoggerManager::getLogger('PurchaseOrder'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('PurchaseOrder'); + self::__construct(); } function save_module($module) diff --git a/modules/PurchaseOrder/actions/CompanyDetails.php b/modules/PurchaseOrder/actions/CompanyDetails.php index fdac26100b7eec861f80dd1f42c061a753281e65..8b0c14614362deb894a155beba559543fbb13d21 100644 --- a/modules/PurchaseOrder/actions/CompanyDetails.php +++ b/modules/PurchaseOrder/actions/CompanyDetails.php @@ -46,11 +46,11 @@ class PurchaseOrder_CompanyDetails_Action extends Vtiger_Action_Controller { function getCompanyDetails($request){ $companyModel = Vtiger_CompanyDetails_Model::getInstanceById(); $companyDetails = array( - 'street' => $companyModel->get('organizationname') .' '.$companyModel->get('address'), - 'city' => $companyModel->get('city'), - 'state' => $companyModel->get('state'), - 'code' => $companyModel->get('code'), - 'country' => $companyModel->get('country'), + 'street' => decode_html($companyModel->get('organizationname') .' '.$companyModel->get('address')), + 'city' => decode_html($companyModel->get('city')), + 'state' => decode_html($companyModel->get('state')), + 'code' => decode_html($companyModel->get('code')), + 'country' => decode_html($companyModel->get('country')), ); $response = new Vtiger_Response(); $response->setResult($companyDetails); diff --git a/modules/Quotes/Quotes.php b/modules/Quotes/Quotes.php index 4df4199d4381098a513385b00c4a655fc561ed09..19089618a8192db16149ac20a342cc755223cd40 100755 --- a/modules/Quotes/Quotes.php +++ b/modules/Quotes/Quotes.php @@ -104,10 +104,13 @@ class Quotes extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('quote'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Quotes'); + } function Quotes() { - $this->log =LoggerManager::getLogger('quote'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Quotes'); + self::__construct(); } function save_module() diff --git a/modules/Reports/ReportRun.php b/modules/Reports/ReportRun.php index c846d9678e63c1bae180c8045260cd4f60b4a09e..0dc0f675c63ebd64d67b21b32e31dd25e2356035 100644 --- a/modules/Reports/ReportRun.php +++ b/modules/Reports/ReportRun.php @@ -253,19 +253,19 @@ class ReportRunQueryPlanner { } } } - if (count($newAdvFilterList[$i])) { + if (!empty($newAdvFilterList) && (count($newAdvFilterList[$i]))) { $newAdvFilterList[$i]['condition'] = $advfilterlist[$i]['condition']; } if (isset($newAdvFilterList[$i]['columns'][$k - 1])) { $newAdvFilterList[$i]['columns'][$k - 1]['column_condition'] = ''; } - if (count($newAdvFilterList[$i]) != 2) { + if (!empty($newAdvFilterList) && (count($newAdvFilterList[$i]) != 2)) { unset($newAdvFilterList[$i]); } } end($newAdvFilterList); $lastConditionsGrpKey = key($newAdvFilterList); - if (count($newAdvFilterList[$lastConditionsGrpKey])) { + if (!empty($newAdvFilterList) && (count($newAdvFilterList[$lastConditionsGrpKey]))) { $newAdvFilterList[$lastConditionsGrpKey]['condition'] = ''; } @@ -325,15 +325,18 @@ class ReportRun extends CRMEntity { * To ensure single-instance is present for $reportid * as we optimize using ReportRunPlanner and setup temporary tables. */ + function __construct($reportid) { + $oReport = new Reports($reportid); + $this->reportid = $reportid; + $this->primarymodule = $oReport->primodule; + $this->secondarymodule = $oReport->secmodule; + $this->reporttype = $oReport->reporttype; + $this->reportname = $oReport->reportname; + $this->queryPlanner = new ReportRunQueryPlanner(); + $this->queryPlanner->reportRun = $this; + } function ReportRun($reportid) { - $oReport = new Reports($reportid); - $this->reportid = $reportid; - $this->primarymodule = $oReport->primodule; - $this->secondarymodule = $oReport->secmodule; - $this->reporttype = $oReport->reporttype; - $this->reportname = $oReport->reportname; - $this->queryPlanner = new ReportRunQueryPlanner(); - $this->queryPlanner->reportRun = $this; + self::__construct($reportid); } public static function getInstance($reportid) { @@ -378,7 +381,7 @@ class ReportRun extends CRMEntity { $selectedModuleFields[$module][] = $fieldname; $inventory_fields = array('serviceid'); $inventory_modules = getInventoryModules(); - if (sizeof($permitted_fields[$module]) == 0 && $is_admin == false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1) { + if (empty($permitted_fields[$module]) && $is_admin == false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1) { $permitted_fields[$module] = $this->getaccesfield($module); } if (in_array($module, $inventory_modules)) { @@ -4675,4 +4678,4 @@ class ReportRun extends CRMEntity { } -?> +?> \ No newline at end of file diff --git a/modules/Reports/ReportSharing.php b/modules/Reports/ReportSharing.php index 30fcc9daec8b9900adc04079e6f0c10bceb503ee..e29a00f3c577764ee9c223ef505a29e4498d9557 100644 --- a/modules/Reports/ReportSharing.php +++ b/modules/Reports/ReportSharing.php @@ -32,7 +32,7 @@ $report_std_filter->assign("MOD", $mod_strings); $report_std_filter->assign("APP", $app_strings); $report_std_filter->assign("IMAGE_PATH",$image_path); $report_std_filter->assign("DATEFORMAT",$current_user->date_format); -$report_std_filter->assign("JS_DATEFORMAT",parse_calendardate($app_strings['NTC_DATE_FORMAT'])); +$report_std_filter->assign('JS_DATEFORMAT', parse_calendardate()); $roleid = $current_user->column_fields['roleid']; $user_array = getAllUserName(); diff --git a/modules/Reports/Reports.php b/modules/Reports/Reports.php index 65efa848d6780969c49a20cd51a94017894d7d3f..44ceb2a5f16bd642b635f881ecf8868f3939b39c 100644 --- a/modules/Reports/Reports.php +++ b/modules/Reports/Reports.php @@ -110,87 +110,89 @@ class Reports extends CRMEntity{ * This function accepts the vtiger_reportid as argument * It sets primodule,secmodule,reporttype,reportname,reportdescription,folderid for the given vtiger_reportid */ - + function __construct($reportid="") { + global $adb,$current_user,$theme,$mod_strings; + $this->initListOfModules(); + if($reportid != "") + { + // Lookup information in cache first + $cachedInfo = VTCacheUtils::lookupReport_Info($current_user->id, $reportid); + $subordinate_users = VTCacheUtils::lookupReport_SubordinateUsers($reportid); + + $reportModel = Reports_Record_Model::getCleanInstance($reportid); + $sharingType = $reportModel->get('sharingtype'); + + if($cachedInfo === false) { + $ssql = "select vtiger_reportmodules.*,vtiger_report.* from vtiger_report inner join vtiger_reportmodules on vtiger_report.reportid = vtiger_reportmodules.reportmodulesid"; + $ssql .= " where vtiger_report.reportid = ?"; + $params = array($reportid); + + require_once('include/utils/GetUserGroups.php'); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + $userGroups = new GetUserGroups(); + $userGroups->getAllUserGroups($current_user->id); + $user_groups = $userGroups->user_groups; + if(!empty($user_groups) && $sharingType == 'Private'){ + $user_group_query = " (shareid IN (".generateQuestionMarks($user_groups).") AND setype='groups') OR"; + array_push($params, $user_groups); + } + + $non_admin_query = " vtiger_report.reportid IN (SELECT reportid from vtiger_reportsharing WHERE $user_group_query (shareid=? AND setype='users'))"; + if($sharingType == 'Private'){ + $ssql .= " and (( (".$non_admin_query.") or vtiger_report.sharingtype='Public' or vtiger_report.owner = ? or vtiger_report.owner in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'))"; + array_push($params, $current_user->id); + array_push($params, $current_user->id); + } + + $query = $adb->pquery("select userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'",array()); + $subordinate_users = Array(); + for($i=0;$i<$adb->num_rows($query);$i++){ + $subordinate_users[] = $adb->query_result($query,$i,'userid'); + } + + // Update subordinate user information for re-use + VTCacheUtils::updateReport_SubordinateUsers($reportid, $subordinate_users); + + //Report sharing for vtiger7 + $queryObj = new stdClass(); + $queryObj->query = $ssql; + $queryObj->queryParams = $params; + $queryObj = self::getReportSharingQuery($queryObj, $sharingType); + + $result = $adb->pquery($queryObj->query, $queryObj->queryParams); + if($result && $adb->num_rows($result)) { + $reportmodulesrow = $adb->fetch_array($result); + + // Update information in cache now + VTCacheUtils::updateReport_Info( + $current_user->id, $reportid, $reportmodulesrow["primarymodule"], + $reportmodulesrow["secondarymodules"], $reportmodulesrow["reporttype"], + $reportmodulesrow["reportname"], $reportmodulesrow["description"], + $reportmodulesrow["folderid"], $reportmodulesrow["owner"] + ); + } + + // Re-look at cache to maintain code-consistency below + $cachedInfo = VTCacheUtils::lookupReport_Info($current_user->id, $reportid); + } + + if($cachedInfo) { + $this->primodule = $cachedInfo["primarymodule"]; + $this->secmodule = $cachedInfo["secondarymodules"]; + $this->reporttype = $cachedInfo["reporttype"]; + $this->reportname = decode_html($cachedInfo["reportname"]); + $this->reportdescription = decode_html($cachedInfo["description"]); + $this->folderid = $cachedInfo["folderid"]; + if($is_admin==true || in_array($cachedInfo["owner"],$subordinate_users) || $cachedInfo["owner"]==$current_user->id) + $this->is_editable = 'true'; + else + $this->is_editable = 'false'; + } + } + } function Reports($reportid="") { - global $adb,$current_user,$theme,$mod_strings; - $this->initListOfModules(); - if($reportid != "") - { - // Lookup information in cache first - $cachedInfo = VTCacheUtils::lookupReport_Info($current_user->id, $reportid); - $subordinate_users = VTCacheUtils::lookupReport_SubordinateUsers($reportid); - - $reportModel = Reports_Record_Model::getCleanInstance($reportid); - $sharingType = $reportModel->get('sharingtype'); - - if($cachedInfo === false) { - $ssql = "select vtiger_reportmodules.*,vtiger_report.* from vtiger_report inner join vtiger_reportmodules on vtiger_report.reportid = vtiger_reportmodules.reportmodulesid"; - $ssql .= " where vtiger_report.reportid = ?"; - $params = array($reportid); - - require_once('include/utils/GetUserGroups.php'); - require('user_privileges/user_privileges_'.$current_user->id.'.php'); - $userGroups = new GetUserGroups(); - $userGroups->getAllUserGroups($current_user->id); - $user_groups = $userGroups->user_groups; - if(!empty($user_groups) && $sharingType == 'Private'){ - $user_group_query = " (shareid IN (".generateQuestionMarks($user_groups).") AND setype='groups') OR"; - array_push($params, $user_groups); - } - - $non_admin_query = " vtiger_report.reportid IN (SELECT reportid from vtiger_reportsharing WHERE $user_group_query (shareid=? AND setype='users'))"; - if($sharingType == 'Private'){ - $ssql .= " and (( (".$non_admin_query.") or vtiger_report.sharingtype='Public' or vtiger_report.owner = ? or vtiger_report.owner in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'))"; - array_push($params, $current_user->id); - array_push($params, $current_user->id); - } - - $query = $adb->pquery("select userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'",array()); - $subordinate_users = Array(); - for($i=0;$i<$adb->num_rows($query);$i++){ - $subordinate_users[] = $adb->query_result($query,$i,'userid'); - } - - // Update subordinate user information for re-use - VTCacheUtils::updateReport_SubordinateUsers($reportid, $subordinate_users); - - //Report sharing for vtiger7 - $queryObj = new stdClass(); - $queryObj->query = $ssql; - $queryObj->queryParams = $params; - $queryObj = self::getReportSharingQuery($queryObj, $sharingType); - - $result = $adb->pquery($queryObj->query, $queryObj->queryParams); - if($result && $adb->num_rows($result)) { - $reportmodulesrow = $adb->fetch_array($result); - - // Update information in cache now - VTCacheUtils::updateReport_Info( - $current_user->id, $reportid, $reportmodulesrow["primarymodule"], - $reportmodulesrow["secondarymodules"], $reportmodulesrow["reporttype"], - $reportmodulesrow["reportname"], $reportmodulesrow["description"], - $reportmodulesrow["folderid"], $reportmodulesrow["owner"] - ); - } - - // Re-look at cache to maintain code-consistency below - $cachedInfo = VTCacheUtils::lookupReport_Info($current_user->id, $reportid); - } - - if($cachedInfo) { - $this->primodule = $cachedInfo["primarymodule"]; - $this->secmodule = $cachedInfo["secondarymodules"]; - $this->reporttype = $cachedInfo["reporttype"]; - $this->reportname = decode_html($cachedInfo["reportname"]); - $this->reportdescription = decode_html($cachedInfo["description"]); - $this->folderid = $cachedInfo["folderid"]; - if($is_admin==true || in_array($cachedInfo["owner"],$subordinate_users) || $cachedInfo["owner"]==$current_user->id) - $this->is_editable = 'true'; - else - $this->is_editable = 'false'; - } - } + self::__construct($reportid); } // Update the module list for listing columns for report creation. diff --git a/modules/Reports/models/ListView.php b/modules/Reports/models/ListView.php index 9e3e5a7c039c69d557c55f5f194181f5f25ebcb5..6bcfb4aef0abeabc226c08002aec6f21fb3480e4 100644 --- a/modules/Reports/models/ListView.php +++ b/modules/Reports/models/ListView.php @@ -17,7 +17,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { * Function to get the list of listview links for the module * @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances */ - public function getListViewLinks() { + public function getListViewLinks($linkParams = false) { $moduleModel = $this->getModule(); $links = Vtiger_Link_Model::getAllByType($moduleModel->getId(), array('LISTVIEWBASIC')); return $links; @@ -28,7 +28,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { * @param <Array> $linkParams * @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions */ - public function getListViewMassActions() { + public function getListViewMassActions($linkParams = false) { $currentUserModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); $massActionLinks = array(); @@ -73,7 +73,8 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { * Function to get the list view header * @return <Array> - List of Vtiger_Field_Model instances */ - public function getListViewHeaders($folderId) { + public function getListViewHeaders() { + list($folderId) = func_get_args(); $headers = array( 'reportname' => array('label' => 'LBL_REPORT_NAME', 'type' => 'string'), 'description' => array('label' => 'LBL_DESCRIPTION', 'type' => 'string'), @@ -95,7 +96,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { $reportFolderModel = Reports_Folder_Model::getInstance(); $reportFolderModel->set('folderid', $this->get('folderid')); - $orderBy = $this->get('orderby'); + $orderBy = $this->getForSql('orderby'); if (!empty($orderBy) && $orderBy === 'smownerid') { $fieldModel = Vtiger_Field_Model::getInstance('assigned_user_id', $moduleModel); if ($fieldModel->getFieldDataType() == 'owner') { @@ -104,7 +105,7 @@ class Reports_ListView_Model extends Vtiger_ListView_Model { } if(!empty($orderBy)) { $reportFolderModel->set('orderby', $orderBy); - $reportFolderModel->set('sortby', $this->get('sortorder')); + $reportFolderModel->set('sortby', $this->getForSql('sortorder')); } $reportFolderModel->set('search_params', $this->get('search_params')); diff --git a/modules/Reports/models/Record.php b/modules/Reports/models/Record.php index 66259d38625465e964ea0352e10c90f0461bbe38..5862a1a7dcba0db9657bad293dab9539bb53d1f2 100644 --- a/modules/Reports/models/Record.php +++ b/modules/Reports/models/Record.php @@ -131,7 +131,7 @@ class Reports_Record_Model extends Vtiger_Record_Model { * @param <String> $module * @return <Reports_Record_Model> */ - public static function getInstanceById($recordId) { + public static function getInstanceById($recordId, $module=null) { $db = PearDatabase::getInstance(); $self = new self(); @@ -275,6 +275,9 @@ class Reports_Record_Model extends Vtiger_Record_Model { function isRecordHasViewAccess($reportType){ $db = PearDatabase::getInstance(); $current_user = vglobal('current_user'); + if(strtolower($current_user->is_admin) == "on") { + return true; + } $params = array(); $sql = ' SELECT vtiger_report.reportid,vtiger_report.reportname FROM vtiger_report '; require('user_privileges/user_privileges_'.$current_user->id.'.php'); @@ -442,12 +445,15 @@ class Reports_Record_Model extends Vtiger_Record_Model { $reportId = $this->getId(); - //When members variable is not empty, it means record shared with other users, so - //sharing type of a report should be private - $sharingType = 'Public'; + //Newly created records are always as Private, only shared users can see report + $sharingType = 'Private'; + $members = $this->get('members',array()); - if(!empty($members)){ - $sharingType = 'Private'; + + if($members && count($members) == 1){ + if($members[0] == 'All::Users'){ + $sharingType = 'Public'; + } } if(empty($reportId)) { @@ -1041,12 +1047,17 @@ class Reports_Record_Model extends Vtiger_Record_Model { $tranformedStandardFilter['comparator'] = 'bw'; $fields = explode(':',$standardFilter['columnname']); - + $standardReports = array('Last Month Activities', 'This Month Activities'); if($fields[1] == 'createdtime' || $fields[1] == 'modifiedtime' ||($fields[0] == 'vtiger_activity' && $fields[1] == 'date_start')){ - $tranformedStandardFilter['columnname'] = "$fields[0]:$fields[1]:$fields[3]:$fields[2]:DT"; - $date[] = $standardFilter['startdate'].' 00:00:00'; - $date[] = $standardFilter['enddate'].' 00:00:00'; - $tranformedStandardFilter['value'] = implode(',',$date); + if(in_array($this->get('reportname'), $standardReports)){ + $tranformedStandardFilter['columnname'] = "$fields[0]Calendar:$fields[1]:$fields[3]:$fields[2]:DT"; + $tranformedStandardFilter['comparator'] = $standardFilter['type']; + }else{ + $tranformedStandardFilter['columnname'] = "$fields[0]:$fields[1]:$fields[3]:$fields[2]:DT"; + $date[] = $standardFilter['startdate'].' 00:00:00'; + $date[] = $standardFilter['enddate'].' 00:00:00'; + $tranformedStandardFilter['value'] = implode(',',$date); + } } else{ $tranformedStandardFilter['columnname'] = "$fields[0]:$fields[1]:$fields[3]:$fields[2]:D"; $tranformedStandardFilter['value'] = $standardFilter['startdate'].','.$standardFilter['enddate']; diff --git a/modules/Reports/models/RecordStructure.php b/modules/Reports/models/RecordStructure.php index fae88533010771dbec069be723084935e660248b..f40d13f5364899c9accfe590264ff15497eb8217 100644 --- a/modules/Reports/models/RecordStructure.php +++ b/modules/Reports/models/RecordStructure.php @@ -18,7 +18,8 @@ class Reports_RecordStructure_Model extends Vtiger_RecordStructure_Model { * Function to get the values in stuctured format * @return <array> - values in structure array('block'=>array(fieldinfo)); */ - public function getStructure($moduleName) { + public function getStructure() { + list($moduleName) = func_get_args(); if (!empty($this->structuredValues[$moduleName])) { return $this->structuredValues[$moduleName]; } diff --git a/modules/Reports/views/Detail.php b/modules/Reports/views/Detail.php index df34ff09e4d4c0e16f03df560ab9623e9cd12bbc..dd2cc23a4eef30dd2f32ebfc97e3a39b77b1d77a 100644 --- a/modules/Reports/views/Detail.php +++ b/modules/Reports/views/Detail.php @@ -41,7 +41,7 @@ class Reports_Detail_View extends Vtiger_Index_View { const REPORT_LIMIT = 500; - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { $viewer = $this->getViewer($request); $moduleName = $request->getModule(); $recordId = $request->get('record'); @@ -68,7 +68,7 @@ class Reports_Detail_View extends Vtiger_Index_View { $modulesList = array($primaryModule); if(!empty($secondaryModules)){ if(stripos($secondaryModules, ':') >= 0){ - $secmodules = split(':', $secondaryModules); + $secmodules = explode(':', $secondaryModules); $modulesList = array_merge($modulesList, $secmodules); }else{ array_push($modulesList, $secondaryModules); diff --git a/modules/Reports/views/ExportReport.php b/modules/Reports/views/ExportReport.php index 997427fe11509e3c70cfabc8348378612bcae83c..0a2e9e1c87a272fcbc953a4b9da036255f9ab380 100644 --- a/modules/Reports/views/ExportReport.php +++ b/modules/Reports/views/ExportReport.php @@ -92,11 +92,13 @@ class Reports_ExportReport_View extends Vtiger_View_Controller { $primaryModule = $reportModel->getPrimaryModule(); $secondaryModules = $reportModel->getSecondaryModules(); $modulesList = array($primaryModule); - if(stripos($secondaryModules, ':') >= 0){ - $secmodules = split(':', $secondaryModules); - $modulesList = array_merge($modulesList, $secmodules); - }else{ - array_push($modulesList, $secondaryModules); + if($secondaryModules){ + if(stripos($secondaryModules, ':') >= 0){ + $secmodules = explode(':', $secondaryModules); + $modulesList = array_merge($modulesList, $secmodules); + }else{ + array_push($modulesList, $secondaryModules); + } } $currentUser = Users_Record_Model::getCurrentUserModel(); $userPrivilegesModel = Users_Privileges_Model::getInstanceById($currentUser->getId()); diff --git a/modules/Reports/views/ListAjax.php b/modules/Reports/views/ListAjax.php index 697a9bc5c36d799db284cb849a114d211f215205..f49a8887f1c52f3689024a05a103896380452e50 100644 --- a/modules/Reports/views/ListAjax.php +++ b/modules/Reports/views/ListAjax.php @@ -21,7 +21,7 @@ class Reports_ListAjax_View extends Reports_List_View { $this->exposeMethod('getPageCount'); } - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { } diff --git a/modules/SalesOrder/RecurringInvoiceHandler.php b/modules/SalesOrder/RecurringInvoiceHandler.php index 36f40d2a43035b3beb3976a64c3f16483c72fcf2..f27c726683b0d20fb1a54cf1db7a6ffb46207dc0 100644 --- a/modules/SalesOrder/RecurringInvoiceHandler.php +++ b/modules/SalesOrder/RecurringInvoiceHandler.php @@ -12,39 +12,66 @@ require_once('include/utils/utils.php'); class RecurringInvoiceHandler extends VTEventHandler { - public function handleEvent($handlerType, $entityData){ - global $log, $adb; - $moduleName = $entityData->getModuleName(); - if ($moduleName == 'SalesOrder') { - $soId = $entityData->getId(); - $data = $entityData->getData(); - if($data['enable_recurring'] == 'on' || $data['enable_recurring'] == 1) { - $frequency = $data['recurring_frequency']; - $startPeriod = getValidDBInsertDateValue($data['start_period']); - $endPeriod = getValidDBInsertDateValue($data['end_period']); - $paymentDuration = $data['payment_duration']; - $invoiceStatus = $data['invoicestatus']; - if (isset($frequency) && $frequency != '' && $frequency != '--None--') { - $check_query = "SELECT * FROM vtiger_invoice_recurring_info WHERE salesorderid=?"; - $check_res = $adb->pquery($check_query, array($soId)); - $noofrows = $adb->num_rows($check_res); - if ($noofrows > 0) { - $row = $adb->query_result_rowdata($check_res, 0); - $query = "UPDATE vtiger_invoice_recurring_info SET recurring_frequency=?, start_period=?, end_period=?, payment_duration=?, invoice_status=? WHERE salesorderid=?"; - $params = array($frequency,$startPeriod,$endPeriod,$paymentDuration,$invoiceStatus,$soId); - } else { - $query = "INSERT INTO vtiger_invoice_recurring_info VALUES (?,?,?,?,?,?,?)"; - $params = array($soId,$frequency,$startPeriod,$endPeriod,$startPeriod,$paymentDuration,$invoiceStatus); - } - $adb->pquery($query, $params); - } - } else { - $query = "DELETE FROM vtiger_invoice_recurring_info WHERE salesorderid = ?"; - $adb->pquery($query, array($soId)); + + private $entityData; + + public function handleEvent($handlerType, $entityData) { + $this->entityData = $entityData; + + if ($this->isSalesOrderModule()) { + $this->handleRecurringInvoiceGeneration(); + } + } + + private function handleRecurringInvoiceGeneration() { + if ($this->isRecurringInvoiceEnabled()) { + if (empty($this->getNextInvoiceDate()) || $this->isStartDateAfterNextInvoiceDate()) { + $this->setNextInvoiceDateEqualsToStartDate(); } + } else { + $this->deleteRecurringInvoiceData(); } } -} - - -?> \ No newline at end of file + + private function isStartDateAfterNextInvoiceDate() + { + $startPeriod = new DateTime($this->getStartDate()); + $nextInvoiceDate = new DateTime($this->getNextInvoiceDate()); + + return $startPeriod > $nextInvoiceDate; + } + + private function isSalesOrderModule() { + return $this->entityData->getModuleName() == 'SalesOrder'; + } + + private function getStartDate() + { + $data = $this->entityData->getData(); + return DateTimeField::convertToDBFormat($data['start_period']); + } + + private function getNextInvoiceDate() { + $data = $this->entityData->getData(); + return $data['last_recurring_date']; + } + + private function isRecurringInvoiceEnabled() { + $data = $this->entityData->getData(); + return !empty($data['enable_recurring']); + } + + private function setNextInvoiceDateEqualsToStartDate() + { + $db = PearDatabase::getInstance(); + $query = "UPDATE vtiger_invoice_recurring_info SET last_recurring_date = start_period WHERE salesorderid = ?"; + $db->pquery($query, [$this->entityData->getId()]); + } + + private function deleteRecurringInvoiceData() + { + $db = PearDatabase::getInstance(); + $query = "DELETE FROM vtiger_invoice_recurring_info WHERE salesorderid = ?"; + $db->pquery($query, [$this->entityData->getId()]); + } +} diff --git a/modules/SalesOrder/SalesOrder.php b/modules/SalesOrder/SalesOrder.php index 3e4b3e8bab1971a214804203f8f512173929c855..4e20c2ac8fd852651b83a84321911a949d8844a7 100644 --- a/modules/SalesOrder/SalesOrder.php +++ b/modules/SalesOrder/SalesOrder.php @@ -106,10 +106,13 @@ class SalesOrder extends CRMEntity { * This function creates an instance of LoggerManager class using getLogger method * creates an instance for PearDatabase class and get values for column_fields array of SalesOrder class. */ + function __construct() { + $this->log =LoggerManager::getLogger('SalesOrder'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('SalesOrder'); + } function SalesOrder() { - $this->log =LoggerManager::getLogger('SalesOrder'); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('SalesOrder'); + self::__construct(); } function save_module($module) diff --git a/modules/Settings/Currency/models/Record.php b/modules/Settings/Currency/models/Record.php index cacc46bc68145e790fdb5a394fa94b7ed12fd9cc..74b15c6b3dc4e34498a2b1b1ceedcc803004e95c 100644 --- a/modules/Settings/Currency/models/Record.php +++ b/modules/Settings/Currency/models/Record.php @@ -92,7 +92,8 @@ class Settings_Currency_Record_Model extends Settings_Vtiger_Record_Model{ return $id; } - public static function getInstance($id) { + public static function getInstance() { + list($id) = func_get_args(); $db = PearDatabase::getInstance(); if(Vtiger_Utils::isNumber($id)){ $query = 'SELECT * FROM ' . Settings_Currency_Module_Model::tableName . ' WHERE id=?'; diff --git a/modules/Settings/Groups/models/Record.php b/modules/Settings/Groups/models/Record.php index 8301e4a12d4c7e9c97672f6dff571c08ce518077..387fb8194ab6a8c533a72ba475c6264abf816d4d 100644 --- a/modules/Settings/Groups/models/Record.php +++ b/modules/Settings/Groups/models/Record.php @@ -346,20 +346,21 @@ class Settings_Groups_Record_Model extends Settings_Vtiger_Record_Model { * @param <Object> $value * @return Settings_Groups_Record_Model instance, if exists. Null otherwise */ - public static function getInstance($value) { - $db = PearDatabase::getInstance(); - - if (Vtiger_Utils::isNumber($value)) { - $sql = 'SELECT * FROM vtiger_groups WHERE groupid = ?'; - } else { - $sql = 'SELECT * FROM vtiger_groups WHERE groupname = ?'; - } - $params = array($value); - $result = $db->pquery($sql, $params); - if ($db->num_rows($result) > 0) { - return self::getInstanceFromQResult($result, 0); - } - return null; + public static function getInstance() { + list($value) = func_get_args(); + $db = PearDatabase::getInstance(); + + if (Vtiger_Utils::isNumber($value)) { + $sql = 'SELECT * FROM vtiger_groups WHERE groupid = ?'; + } else { + $sql = 'SELECT * FROM vtiger_groups WHERE groupname = ?'; + } + $params = array($value); + $result = $db->pquery($sql, $params); + if ($db->num_rows($result) > 0) { + return self::getInstanceFromQResult($result, 0); + } + return null; } /* Function to get the instance of the group by Name diff --git a/modules/Settings/LayoutEditor/actions/Block.php b/modules/Settings/LayoutEditor/actions/Block.php index ea3345a8ddb7d8bc25e890aed0fddaf27632e0c2..2be978d55715dbb5a0f3afcb3f00894d8f322df9 100644 --- a/modules/Settings/LayoutEditor/actions/Block.php +++ b/modules/Settings/LayoutEditor/actions/Block.php @@ -80,8 +80,8 @@ class Settings_LayoutEditor_Block_Action extends Settings_Vtiger_Index_Action { $response = new Vtiger_Response(); $blockId = $request->get('blockid'); $checkIfFieldsExists = Vtiger_Block_Model::checkFieldsExists($blockId); - if(!$checkIfFieldsExists) { - $response->setError('502','Fields not exists for the block'); + if($checkIfFieldsExists) { + $response->setError('502','Fields exist for the block'); $response->emit(); return; } diff --git a/modules/Settings/LayoutEditor/models/Module.php b/modules/Settings/LayoutEditor/models/Module.php index 65b7fc565f8b168a5c3582424a160ea95d23c80b..bedc5ffbff083888cc48a2750ccf58e2810d1acb 100644 --- a/modules/Settings/LayoutEditor/models/Module.php +++ b/modules/Settings/LayoutEditor/models/Module.php @@ -233,13 +233,12 @@ class Settings_LayoutEditor_Module_Model extends Vtiger_Module_Model { break; Case 'Currency' : $fieldLength = $params['fieldLength']; - $decimal = $params['decimal']; - $uitype = 71; - $dbfldlength = $fieldLength + $decimal + 1; - $decimal = $decimal + 3; - $type="NUMERIC(".$dbfldlength.",".$decimal.")"; //adodb type - $uichekdata='N~O'; - break; + $decimal = $params['decimal']; + $uitype = 71; + $dbfldlength = $fieldLength + $decimal; + $type="NUMERIC(".$dbfldlength.",".$decimal.")"; //adodb type + $uichekdata='N~O'; + break; Case 'Date' : $uichekdata='D~O'; $uitype = 5; diff --git a/modules/Settings/Leads/models/Field.php b/modules/Settings/Leads/models/Field.php index fb6c0d0fa57000e92c644c187edf3cccc8a0468e..4406efd64cac1a8643af3eb3047c46f608edf819 100644 --- a/modules/Settings/Leads/models/Field.php +++ b/modules/Settings/Leads/models/Field.php @@ -47,7 +47,7 @@ class Settings_Leads_Field_Model extends Vtiger_Field_Model { * @param <String> $module * @return <Settings_Leads_Field_Model> field model */ - public static function getInstance($value, $module) { + public static function getInstance($value, $module = false) { $fieldModel = parent::getInstance($value, $module); $objectProperties = get_object_vars($fieldModel); diff --git a/modules/Settings/Leads/models/Module.php b/modules/Settings/Leads/models/Module.php index f8ff555559ebb3028fb326c53a8d0d8721f682c6..6a120d1f390dc5c491975e39035f7d768ed9eb93 100644 --- a/modules/Settings/Leads/models/Module.php +++ b/modules/Settings/Leads/models/Module.php @@ -14,7 +14,7 @@ class Settings_Leads_Module_Model extends Vtiger_Module_Model { * Function to get fields of this model * @return <Array> list of field models <Settings_Leads_Field_Model> */ - public function getFields() { + public function getFields($blockInstance=false) { if (!$this->fields) { $fieldModelsList = array(); $fieldIds = $this->getMappingSupportedFieldIdsList(); diff --git a/modules/Settings/ModuleManager/actions/Basic.php b/modules/Settings/ModuleManager/actions/Basic.php index 3f488c5052ea5343151cbf1ff75f57042f059282..717195716559021bd6661d167c6005a8dd4a4753 100644 --- a/modules/Settings/ModuleManager/actions/Basic.php +++ b/modules/Settings/ModuleManager/actions/Basic.php @@ -36,7 +36,6 @@ class Settings_ModuleManager_Basic_Action extends Settings_Vtiger_IndexAjax_View }else{ $moduleManagerModel->disableModule($moduleName); } - $response = new Vtiger_Response(); $response->emit(); } diff --git a/modules/Settings/ModuleManager/models/Module.php b/modules/Settings/ModuleManager/models/Module.php index dce27bcce2267e8e27ce4dafacba3fc3c5c2afb4..10e48528a9af51d6b9f8ecb03c6c15eafa2ea7ca 100644 --- a/modules/Settings/ModuleManager/models/Module.php +++ b/modules/Settings/ModuleManager/models/Module.php @@ -66,8 +66,14 @@ class Settings_ModuleManager_Module_Model extends Vtiger_Module_Model { * Static Function to get the instance of Vtiger Module Model for all the modules * @return <Array> - List of Vtiger Module Model or sub class instances */ - public static function getAll() { - return parent::getAll(array(0,1), self::getNonVisibleModulesList()); + public static function getAll($presence = array(), $restrictedModulesList = array(),$sequenced = false) { + if(empty($presence)){ + $presence = array(0,1); + } + if(empty($restrictedModulesList)){ + $restrictedModulesList = self::getNonVisibleModulesList(); + } + return parent::getAll($presence, $restrictedModulesList); } /** diff --git a/modules/Settings/Picklist/models/Field.php b/modules/Settings/Picklist/models/Field.php index f7b64bd6b702fb1320bf7560e9b2737157b88028..87b9863491118494275856f543378299001b06dd 100644 --- a/modules/Settings/Picklist/models/Field.php +++ b/modules/Settings/Picklist/models/Field.php @@ -26,7 +26,11 @@ class Settings_Picklist_Field_Model extends Vtiger_Field_Model { * @param type $groupMode -- Intersection/Conjuction , intersection will give only picklist values that exist for all roles * @return type -- array */ - public function getPicklistValues($roleIdList, $groupMode='INTERSECTION') { + public function getPicklistValues() { + list($roleIdList, $groupMode) = func_get_args(); + if(empty($groupMode)){ + $groupMode='INTERSECTION'; + } if(!$this->isRoleBased()) { return parent::getPicklistValues(); } @@ -102,9 +106,10 @@ class Settings_Picklist_Field_Model extends Vtiger_Field_Model { * @param type $fieldName -- string * @return type -- array of values */ - public function getEditablePicklistValues($fieldName){ - $cache = Vtiger_Cache::getInstance(); - $EditablePicklistValues = $cache->get('EditablePicklistValues', $fieldName); + public function getEditablePicklistValues(){ + list($fieldName) = func_get_args(); + $cache = Vtiger_Cache::getInstance(); + $EditablePicklistValues = $cache->get('EditablePicklistValues', $fieldName); if($EditablePicklistValues) { return $EditablePicklistValues; } diff --git a/modules/Settings/Picklist/models/Module.php b/modules/Settings/Picklist/models/Module.php index 4442b0ca412f79fb318feca200754d2aefc25123..81f5e76e99a8b635bb5e9855bf4cbc2f7aec5e90 100644 --- a/modules/Settings/Picklist/models/Module.php +++ b/modules/Settings/Picklist/models/Module.php @@ -284,13 +284,15 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model { $deleteValueList[] = ' ( roleid = "'.$roleId.'" AND '.'picklistvalueid = "'.$pickListValueId.'") '; } } - $query = 'INSERT IGNORE INTO vtiger_role2picklist (roleid,picklistvalueid,picklistid) VALUES '. generateQuestionMarks($insertValueList); - $result = $db->pquery($query, $insertValueList); - - $deleteQuery = 'DELETE FROM vtiger_role2picklist WHERE '.implode(' OR ',$deleteValueList); - - $result = $db->pquery($deleteQuery,array()); + if(!empty($insertValueList)){ + $insertQuery = 'INSERT IGNORE INTO vtiger_role2picklist (roleid,picklistvalueid,picklistid) VALUES '. implode(",", $insertValueList); + $result = $db->pquery($insertQuery, array()); + } + if(!empty($deleteValueList)){ + $deleteQuery = 'DELETE FROM vtiger_role2picklist WHERE '.implode(' OR ',$deleteValueList); + $result = $db->pquery($deleteQuery,array()); + } //retaining to older value $db->dieOnError = $dieOnErrorOldValue; @@ -510,7 +512,7 @@ class Settings_Picklist_Module_Model extends Vtiger_Module_Model { $picklistNameRaw = $db->query_result($result, $i, $fieldName); $picklistName = decode_html($picklistNameRaw); // show color only for accesable picklist values - if($isRoleBasedPicklist && !isset($accessablePicklistValues[$picklistNameRaw])) { + if($isRoleBasedPicklist && !isset($accessablePicklistValues[$picklistName ])) { $color = ''; } if(!empty($color)) { diff --git a/modules/Settings/Profiles/models/Record.php b/modules/Settings/Profiles/models/Record.php index dcba26e06511c3114cb9c61d48fc72358da6e916..d4d5561ef44968d2f6a5056d2a8e47a4c3a18774 100644 --- a/modules/Settings/Profiles/models/Record.php +++ b/modules/Settings/Profiles/models/Record.php @@ -571,13 +571,13 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { //Standard permissions $i = 0; $count = count($actionsIdsList); - $params = array(); - $actionsInsertQuery .= 'INSERT INTO vtiger_profile2standardpermissions(profileid, tabid, operation, permissions) VALUES '; + $actionParams = array(); + $actionsInsertQuery = 'INSERT INTO vtiger_profile2standardpermissions(profileid, tabid, operation, permissions) VALUES '; foreach ($actionsIdsList as $actionId => $permission) { $actionEnabled = true; $permissionValue = $this->tranformInputPermissionValue($permission); - $actionsInsertQuery .= "(?, ?, ?, ?)"; - array_push($params, $profileId, $tabId, $actionId, $permissionValue); + $actionsInsertQuery .= '(?, ?, ?, ?)'; + array_push($actionParams, $profileId, $tabId, $actionId, $permissionValue); if ($i !== $count-1) { $actionsInsertQuery .= ', '; @@ -585,18 +585,18 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { $i++; } if ($actionsIdsList) { - $db->pquery($actionsInsertQuery, array()); + $db->pquery($actionsInsertQuery, $actionParams); } //Utility permissions $i = 0; $count = count($utilityIdsList); - $params = array(); - $utilityInsertQuery .= 'INSERT INTO vtiger_profile2utility(profileid, tabid, activityid, permission) VALUES '; + $utilityParams = array(); + $utilityInsertQuery = 'INSERT INTO vtiger_profile2utility(profileid, tabid, activityid, permission) VALUES '; foreach($utilityIdsList as $actionId => $permission) { $permissionValue = $this->tranformInputPermissionValue($permission); - $utilityInsertQuery .= "(?, ?, ?, ?)"; - array_push($params, $profileId, $tabId, $actionId, $permissionValue); + $utilityInsertQuery .= '(?, ?, ?, ?)'; + array_push($utilityParams, $profileId, $tabId, $actionId, $permissionValue); if ($i !== $count-1) { $utilityInsertQuery .= ', '; @@ -604,12 +604,9 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { $i++; } if ($utilityIdsList) { - $db->pquery($utilityInsertQuery, array()); + $db->pquery($utilityInsertQuery, $utilityParams); } } - } elseif ($this->isRestrictedModule($moduleModel->getName())) { - //To check the module is restricted or not(Emails, Webmails) - $actionEnabled = true; } } else { $actionEnabled = true; @@ -798,15 +795,6 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { } } - /** - * Function to check whether module is restricted for to show actions and field access - * @param <String> $moduleName - * @return <boolean> true/false - */ - public function isRestrictedModule($moduleName) { - return in_array($moduleName, array('Emails')); - } - /** * Function recalculate the sharing rules */ diff --git a/modules/Settings/Profiles/views/EditAjax.php b/modules/Settings/Profiles/views/EditAjax.php index 45f0a0f33e81286f6460acd34e40de2dafa530cb..6dbd41aba73c9a9a320bf2a0bdd8210530fe1c47 100644 --- a/modules/Settings/Profiles/views/EditAjax.php +++ b/modules/Settings/Profiles/views/EditAjax.php @@ -10,7 +10,7 @@ Class Settings_Profiles_EditAjax_View extends Settings_Profiles_Edit_View { - public function preProcess(Vtiger_Request $request) { + public function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Settings/SharingAccess/models/Module.php b/modules/Settings/SharingAccess/models/Module.php index bce41635cea08dd6513bd5b34c7980b82d7c3513..0c2c54b3e635ef7b2f80803f9238660b8c5a8014 100644 --- a/modules/Settings/SharingAccess/models/Module.php +++ b/modules/Settings/SharingAccess/models/Module.php @@ -109,7 +109,7 @@ class Settings_SharingAccess_Module_Model extends Vtiger_Module_Model { * Static Function to get the instance of Vtiger Module Model for all the modules * @return <Array> - List of Vtiger Module Model or sub class instances */ - public static function getAll($editable=false) { + public static function getAll($presence = array(), $restrictedModulesList = array(), $editable=false) { $db = PearDatabase::getInstance(); $moduleModels = array(); diff --git a/modules/Settings/Vtiger/models/ConfigModule.php b/modules/Settings/Vtiger/models/ConfigModule.php index 158cc871cb6bee0d74a68140fd4a57ff74529fbf..f316486258d21038c1f8694c1bed63a2fc3d2f1d 100644 --- a/modules/Settings/Vtiger/models/ConfigModule.php +++ b/modules/Settings/Vtiger/models/ConfigModule.php @@ -94,23 +94,6 @@ class Settings_Vtiger_ConfigModule_Model extends Settings_Vtiger_Module_Model { * @return <Array> list of module names */ public function getPicklistValues($fieldName) { - if ($fieldName === 'default_module') { - $db = PearDatabase::getInstance(); - - $presence = array(0); - $restrictedModules = array('Webmails', 'Emails', 'Integration', 'Dashboard','ModComments'); - $query = 'SELECT name, tablabel FROM vtiger_tab WHERE presence IN (' . generateQuestionMarks($presence) . ') AND isentitytype = ? AND name NOT IN (' . generateQuestionMarks($restrictedModules) . ')'; - - $result = $db->pquery($query, array($presence, '1', $restrictedModules)); - $numOfRows = $db->num_rows($result); - - $moduleData = array('Home' => 'Home'); - for ($i = 0; $i < $numOfRows; $i++) { - $row = $db->query_result_rowdata($result, $i); - $moduleData[$db->query_result($result, $i, 'name')] = $db->query_result($result, $i, 'tablabel'); - } - return $moduleData; - } return array('true', 'false'); } @@ -123,7 +106,6 @@ class Settings_Vtiger_ConfigModule_Model extends Settings_Vtiger_Module_Model { 'HELPDESK_SUPPORT_EMAIL_ID' => array('label' => 'LBL_HELPDESK_SUPPORT_EMAILID', 'fieldType' => 'input'), 'HELPDESK_SUPPORT_NAME' => array('label' => 'LBL_HELPDESK_SUPPORT_NAME', 'fieldType' => 'input'), 'upload_maxsize' => array('label' => 'LBL_MAX_UPLOAD_SIZE', 'fieldType' => 'input'), - 'default_module' => array('label' => 'LBL_DEFAULT_MODULE', 'fieldType' => 'picklist'), 'listview_max_textlength' => array('label' => 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW', 'fieldType' => 'input'), 'list_max_entries_per_page' => array('label' => 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW', 'fieldType' => 'input') ); @@ -171,8 +153,6 @@ class Settings_Vtiger_ConfigModule_Model extends Settings_Vtiger_Module_Model { return "LBL_INVALID_EMAILID"; } else if(array_key_exists('HELPDESK_SUPPORT_NAME',$updatedFields) && preg_match ('/[\'";?><]/', $updatedFields['HELPDESK_SUPPORT_NAME'])) { return "LBL_INVALID_SUPPORT_NAME"; - } else if(array_key_exists('default_module',$updatedFields) && !preg_match ('/[a-zA-z0-9]/', $updatedFields['default_module'])) { - return "LBL_INVALID_MODULE"; } else if((array_key_exists('upload_maxsize',$updatedFields) && !filter_var(ltrim($updatedFields['upload_maxsize'],'0'), FILTER_VALIDATE_INT)) || (array_key_exists('list_max_entries_per_page',$updatedFields) && !filter_var(ltrim($updatedFields['list_max_entries_per_page'], '0'), FILTER_VALIDATE_INT)) || (array_key_exists('listview_max_textlength',$updatedFields) && !filter_var(ltrim($updatedFields['listview_max_textlength'], '0'), FILTER_VALIDATE_INT))) { diff --git a/modules/Settings/Vtiger/models/Module.php b/modules/Settings/Vtiger/models/Module.php index 1c65dae1f676c7f9bb6d62786d2b732d822502e2..aa26e3527f8c1eed34b0cfce5a8fbc43200c5b69 100644 --- a/modules/Settings/Vtiger/models/Module.php +++ b/modules/Settings/Vtiger/models/Module.php @@ -104,9 +104,13 @@ class Settings_Vtiger_Module_Model extends Vtiger_Base_Model { * Function to get the instance of Settings module model * @return Settings_Vtiger_Module_Model instance */ - public static function getInstance($name='Settings:Vtiger') { - $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'Module', $name); - return new $modelClassName(); + public static function getInstance() { + list($name) = func_get_args(); + if(empty($name)){ + $name='Settings:Vtiger'; + } + $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'Module', $name); + return new $modelClassName(); } /** diff --git a/modules/Settings/Vtiger/models/OutgoingServer.php b/modules/Settings/Vtiger/models/OutgoingServer.php index be48433fa969c6eaa966d385ff04b3a7cbd7c2a3..39987f2d3aa10c6bf646a07bff95eaf4922f6d0c 100644 --- a/modules/Settings/Vtiger/models/OutgoingServer.php +++ b/modules/Settings/Vtiger/models/OutgoingServer.php @@ -80,6 +80,6 @@ class Settings_Vtiger_OutgoingServer_Model extends Settings_Vtiger_Systems_Model if($mail_status != 1 && !$this->isDefaultSettingLoaded()) { throw new Exception('Error occurred while sending mail'); } - return parent::save(); + return parent::save($request); } } diff --git a/modules/Settings/Vtiger/models/Record.php b/modules/Settings/Vtiger/models/Record.php index 6ede503b2c5f1aa2ba2f52bf2d17e9b946bb68e3..0438ff80107c9b5eaeaf0343d48006f6f7206948 100644 --- a/modules/Settings/Vtiger/models/Record.php +++ b/modules/Settings/Vtiger/models/Record.php @@ -20,7 +20,11 @@ abstract class Settings_Vtiger_Record_Model extends Vtiger_Base_Model { * Function to get the instance of Settings module model * @return Settings_Vtiger_Module_Model instance */ - public static function getInstance($name='Settings:Vtiger') { + public static function getInstance() { + list($name) = func_get_args(); + if(empty($name)){ + $name='Settings:Vtiger'; + } $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'Record', $name); return new $modelClassName(); } diff --git a/modules/Settings/Vtiger/models/Systems.php b/modules/Settings/Vtiger/models/Systems.php index ebb4fba7becf3a251af40f8324524da80c163193..d36d27fcc939ce8c88c57ef8ab6ce657fe913ec2 100644 --- a/modules/Settings/Vtiger/models/Systems.php +++ b/modules/Settings/Vtiger/models/Systems.php @@ -21,7 +21,7 @@ class Settings_Vtiger_Systems_Model extends Vtiger_Base_Model{ return ($smtp_auth_value == 'on' || $smtp_auth_value == 1 || $smtp_auth_value == 'true') ? true : false; } - public function save() { + public function save($request) { $db = PearDatabase::getInstance(); $id = $this->getId(); diff --git a/modules/Settings/Vtiger/views/IndexAjax.php b/modules/Settings/Vtiger/views/IndexAjax.php index 77169d555afda1efdf54a9fd66bfb7322e30f6a5..ccb34249f77a90d5c45f03cad8c38d3a2c3ae6c0 100644 --- a/modules/Settings/Vtiger/views/IndexAjax.php +++ b/modules/Settings/Vtiger/views/IndexAjax.php @@ -14,7 +14,7 @@ class Settings_Vtiger_IndexAjax_View extends Settings_Vtiger_Index_View { $this->exposeMethod('getSettingsShortCutBlock'); } - public function preProcess (Vtiger_Request $request) { + public function preProcess (Vtiger_Request $request, $display=true) { return; } diff --git a/modules/Settings/Workflows/models/Field.php b/modules/Settings/Workflows/models/Field.php index 89c7008154354303b56520ef4301fd2902c2e6e2..7b4a725ddedc5c24e018a45f29dd622cef6ff36a 100644 --- a/modules/Settings/Workflows/models/Field.php +++ b/modules/Settings/Workflows/models/Field.php @@ -61,7 +61,7 @@ class Settings_Workflows_Field_Model extends Vtiger_Field_Model { */ public static function getAdvancedFilterOpsByFieldType() { return array( - 'string' => array('is', 'is not', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'), + 'string' => array('is', 'is not', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'has changed to', 'has changed from', 'is empty', 'is not empty'), 'salutation' => array('is', 'is not', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'), 'text' => array('is', 'is not', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'), 'url' => array('is', 'is not', 'contains', 'does not contain', 'starts with', 'ends with', 'has changed', 'is empty', 'is not empty'), diff --git a/modules/Settings/Workflows/models/Record.php b/modules/Settings/Workflows/models/Record.php index 4d8344da905d7a6b69a9689e517b64b118952fd7..dda570b791ca30f0d91de124f20a7ff21f63a709 100644 --- a/modules/Settings/Workflows/models/Record.php +++ b/modules/Settings/Workflows/models/Record.php @@ -154,11 +154,12 @@ class Settings_Workflows_Record_Model extends Settings_Vtiger_Record_Model { return $links; } - public static function getInstance($workflowId) { - $db = PearDatabase::getInstance(); - $wm = new VTWorkflowManager($db); - $wf = $wm->retrieve($workflowId); - return self::getInstanceFromWorkflowObject($wf); + public static function getInstance() { + list($workflowId) = func_get_args(); + $db = PearDatabase::getInstance(); + $wm = new VTWorkflowManager($db); + $wf = $wm->retrieve($workflowId); + return self::getInstanceFromWorkflowObject($wf); } public static function getCleanInstance($moduleName) { @@ -468,11 +469,11 @@ class Settings_Workflows_Record_Model extends Settings_Vtiger_Record_Model { $fieldDataType = $fieldModel->getFieldDataType(); } if($value == 'true:boolean' || ($fieldModel && $fieldDataType == 'boolean' && $value == '1')) { - $value = 'LBL_ENABLED'; - } + $value = vtranslate('LBL_ENABLED', $moduleName); + } if($value == 'false:boolean' || ($fieldModel && $fieldDataType == 'boolean' && $value == '0')) { - $value = 'LBL_DISABLED'; - } + $value = vtranslate('LBL_DISABLED', $moduleName); + } if ($fieldModel && (($fieldModel->column === 'smownerid') || (($fieldModel->column === 'smgroupid')))) { if (vtws_getOwnerType($value) == 'Users') { $value = getUserFullName($value); @@ -503,7 +504,7 @@ class Settings_Workflows_Record_Model extends Settings_Vtiger_Record_Model { if($fieldLabel == '_VT_add_comment') { $fieldLabel = 'Comment'; } - $conditionList[$conditionGroup][] = $fieldLabel.' '.vtranslate($operation, $moduleName).' '.vtranslate($value, $moduleName); + $conditionList[$conditionGroup][] = $fieldLabel.' '.vtranslate($operation, 'Settings:Workflows', $value); } } diff --git a/modules/Settings/Workflows/models/TaskRecord.php b/modules/Settings/Workflows/models/TaskRecord.php index ede3c4764ced7b4696bfdd9757467a43e05ff9c9..ff3e5b3cdfcb4d1ad95729a7a8d9243b8f684a91 100644 --- a/modules/Settings/Workflows/models/TaskRecord.php +++ b/modules/Settings/Workflows/models/TaskRecord.php @@ -95,7 +95,8 @@ class Settings_Workflows_TaskRecord_Model extends Settings_Vtiger_Record_Model { return $taskModels; } - public static function getInstance($taskId, $workflowModel=null) { + public static function getInstance() { + list($taskId, $workflowModel) = func_get_args(); $db = PearDatabase::getInstance(); $tm = new VTTaskManager($db); $task = $tm->retrieveTask($taskId); diff --git a/modules/Settings/Workflows/views/Edit.php b/modules/Settings/Workflows/views/Edit.php index 13d35edbcee0c5cf7035b305bf99b5a1fce5349c..95615aa2f747eb907387d0d4f4b2622214e8f0bc 100644 --- a/modules/Settings/Workflows/views/Edit.php +++ b/modules/Settings/Workflows/views/Edit.php @@ -21,7 +21,7 @@ class Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View { } } - public function preProcess(Vtiger_Request $request) { + public function preProcess(Vtiger_Request $request, $display=true) { parent::preProcess($request); $viewer = $this->getViewer($request); diff --git a/modules/Settings/Workflows/views/EditAjax.php b/modules/Settings/Workflows/views/EditAjax.php index 4c8bd7b77af7557b76120143904ee4afacdccd9d..30b472e55e9c9b4f305295f2677753c273cac960 100644 --- a/modules/Settings/Workflows/views/EditAjax.php +++ b/modules/Settings/Workflows/views/EditAjax.php @@ -11,7 +11,7 @@ class Settings_Workflows_EditAjax_View extends Settings_Workflows_Edit_View { - public function preProcess(Vtiger_Request $request) { + public function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Users/DefaultDataPopulator.php b/modules/Users/DefaultDataPopulator.php index 4b390a8cf253a6c0672b510dfbc2657bb5848604..4afad78586e55f803464df244a06eab7c66b862c 100644 --- a/modules/Users/DefaultDataPopulator.php +++ b/modules/Users/DefaultDataPopulator.php @@ -17,9 +17,12 @@ require_once('include/utils/utils.php'); */ class DefaultDataPopulator extends CRMEntity { + function __construct() { + $this->log = LoggerManager::getLogger('DefaultDataPopulator'); + $this->db = PearDatabase::getInstance(); + } function DefaultDataPopulator() { - $this->log = LoggerManager::getLogger('DefaultDataPopulator'); - $this->db = PearDatabase::getInstance(); + self::__construct(); } var $new_schema = true; diff --git a/modules/Users/Users.php b/modules/Users/Users.php index 5aafae4603bf2cad1b008781695e5569ea54e16b..6c024b967b63c8567bdb775120487fdcf970f5f1 100755 --- a/modules/Users/Users.php +++ b/modules/Users/Users.php @@ -132,21 +132,23 @@ class Users extends CRMEntity { instantiates the Logger class and PearDatabase Class * */ - + function __construct() { + $this->log = LoggerManager::getLogger('user'); + $this->log->debug("Entering Users() method ..."); + $this->db = PearDatabase::getInstance(); + $this->DEFAULT_PASSWORD_CRYPT_TYPE = (version_compare(PHP_VERSION, '5.3.0') >= 0)? 'PHP5.3MD5': 'MD5'; + if (version_compare(PHP_VERSION, '5.5.0') >= 0) { + $this->DEFAULT_PASSWORD_CRYPT_TYPE = 'PHASH'; + } + $this->column_fields = getColumnFields('Users'); + $this->column_fields['currency_name'] = ''; + $this->column_fields['currency_code'] = ''; + $this->column_fields['currency_symbol'] = ''; + $this->column_fields['conv_rate'] = ''; + $this->log->debug("Exiting Users() method ..."); + } function Users() { - $this->log = LoggerManager::getLogger('user'); - $this->log->debug("Entering Users() method ..."); - $this->db = PearDatabase::getInstance(); - $this->DEFAULT_PASSWORD_CRYPT_TYPE = (version_compare(PHP_VERSION, '5.3.0') >= 0)? 'PHP5.3MD5': 'MD5'; - if (version_compare(PHP_VERSION, '5.5.0') >= 0) { - $this->DEFAULT_PASSWORD_CRYPT_TYPE = 'PHASH'; - } - $this->column_fields = getColumnFields('Users'); - $this->column_fields['currency_name'] = ''; - $this->column_fields['currency_code'] = ''; - $this->column_fields['currency_symbol'] = ''; - $this->column_fields['conv_rate'] = ''; - $this->log->debug("Exiting Users() method ..."); + self::__construct(); } /** @@ -860,7 +862,7 @@ class Users extends CRMEntity { if($current_user->id == $this->id) { $_SESSION['vtiger_authenticated_user_theme'] = $fldvalue; } - } elseif($uitype == 32) { + } elseif($uitype == 32 && $fieldname == 'language') { $languageList = Vtiger_Language::getAll(); $languageList = array_keys($languageList); if(!in_array($fldvalue, $languageList) || $fldvalue == '') { diff --git a/modules/Users/actions/Save.php b/modules/Users/actions/Save.php index 433479214a62bb9435fd1dd12877f31fc6e4f8e9..bbe106565344b8870df76dac3b3a789fbfc1592b 100644 --- a/modules/Users/actions/Save.php +++ b/modules/Users/actions/Save.php @@ -76,7 +76,11 @@ class Users_Save_Action extends Vtiger_Save_Action { if ($fieldName == 'roleid' && !($currentUserModel->isAdminUser())) { $fieldValue = null; } - + if($fieldName == 'signature' && $fieldValue !== null){ + $purifiedContent = vtlib_purify(decode_html($fieldValue)); + // Purify malicious html event attributes + $fieldValue = purifyHtmlEventAttributes(decode_html($purifiedContent),true); + } if($fieldValue !== null) { if(!is_array($fieldValue)) { $fieldValue = trim($fieldValue); diff --git a/modules/Users/actions/SaveAjax.php b/modules/Users/actions/SaveAjax.php index 5188833bbf57d126b0247fac44e7853ad9f0fc46..c1f555c18fd2a6fb4f8888d18a0d7f83d6ce5d0b 100644 --- a/modules/Users/actions/SaveAjax.php +++ b/modules/Users/actions/SaveAjax.php @@ -65,6 +65,9 @@ class Users_SaveAjax_Action extends Vtiger_SaveAjax_Action { if(($fieldName == 'currency_decimal_separator' || $fieldName == 'currency_grouping_separator') && ($displayValue == ' ')) { $displayValue = vtranslate('Space', 'Users'); } + if($fieldName == 'defaultlandingpage'){ + $displayValue = vtranslate($fieldValue, $fieldValue); + } $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue); } } @@ -85,9 +88,41 @@ class Users_SaveAjax_Action extends Vtiger_SaveAjax_Action { */ public function getRecordModelFromRequest(Vtiger_Request $request) { $recordModel = parent::getRecordModelFromRequest($request); - $fieldName = $request->get('field'); - $currentUserModel = Users_Record_Model::getCurrentUserModel(); + + $fieldModelList = $recordModel->getModule()->getFields(); + $validationFields = array('is_admin', 'is_owner', 'roleid', 'signature'); + foreach ($fieldModelList as $fieldName => $fieldModel) { + if(in_array($fieldName, $validationFields)){ + if ($request->has($fieldName)) { + $fieldValue = $request->get($fieldName, null); + } else { + $fieldValue = $fieldModel->getDefaultFieldValue(); + } + if($fieldValue){ + $fieldValue = Vtiger_Util_Helper::validateFieldValue($fieldValue,$fieldModel); + } + if ($fieldName === 'is_admin' && (!$currentUserModel->isAdminUser() || !$fieldValue)) { + $fieldValue = 'off'; + } + //to not update is_owner from ui + if ($fieldName == 'is_owner' || $fieldName == 'roleid') { + $fieldValue = $this->getOwnerRoleValue($request, $fieldName); + } + if ($fieldName == 'signature' && $fieldValue !== null) { + $purifiedContent = vtlib_purify(decode_html($fieldValue)); + // Purify malicious html event attributes + $fieldValue = purifyHtmlEventAttributes(decode_html($purifiedContent), true); + } + if ($fieldValue !== null) { + if (!is_array($fieldValue)) { + $fieldValue = trim($fieldValue); + } + $recordModel->set($fieldName, $fieldValue); + } + } + } + $fieldName = $request->get('field'); if ($fieldName === 'is_admin' && (!$currentUserModel->isAdminUser() || !$request->get('value'))) { $recordModel->set($fieldName, 'off'); } else if($fieldName === 'is_admin' && $currentUserModel->isAdminUser()) { @@ -97,18 +132,22 @@ class Users_SaveAjax_Action extends Vtiger_SaveAjax_Action { } if($fieldName == "is_owner" || $fieldName == "roleid") { - $recordId = $request->get('record'); - $moduleName = $request->getModule(); - if(!empty($recordId)) { - $existingRecordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); - $recordModel->set($fieldName,$existingRecordModel->get($fieldName)); - } + $fieldValue = $this->getOwnerRoleValue($request, $fieldName); + $recordModel->set($fieldName,$fieldValue); } return $recordModel; } - public function userExists(Vtiger_Request $request){ + public function getOwnerRoleValue(Vtiger_Request $request, $fieldName) { + $recordId = $request->get('record'); + $moduleName = $request->getModule(); + if(!empty($recordId)) { + $existingRecordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); + return $existingRecordModel->get($fieldName); + } + } + public function userExists(Vtiger_Request $request){ $module = $request->getModule(); $userName = $request->get('user_name'); $status = Users_Record_Model::isUserExists($userName); diff --git a/modules/Users/actions/SystemSetupSave.php b/modules/Users/actions/SystemSetupSave.php index e910c0b65cd29d362ca146e34f7ea5517169902c..287de2fccfd70ed54574347511447182a9f32e13 100644 --- a/modules/Users/actions/SystemSetupSave.php +++ b/modules/Users/actions/SystemSetupSave.php @@ -19,7 +19,7 @@ class Users_SystemSetupSave_Action extends Users_Save_Action { public function process(Vtiger_Request $request) { $moduleName = $request->getModule(); - $packages = $request->get(packages); + $packages = $request->get('packages'); $userModuleModel = Users_Module_Model::getInstance($moduleName); $userModuleModel::savePackagesInfo($packages); header ('Location: index.php?module=Users&parent=Settings&view=UserSetup'); diff --git a/modules/Users/models/Field.php b/modules/Users/models/Field.php index a7dd3518ab74a6cc3e89446ef080a104f713286d..036f35a8333d25a43e933e802d9258871b241fc7 100644 --- a/modules/Users/models/Field.php +++ b/modules/Users/models/Field.php @@ -74,8 +74,32 @@ class Users_Field_Model extends Vtiger_Field_Model { * @return <Array> List of picklist values if the field is of type picklist or multipicklist, null otherwise. */ public function getPicklistValues() { + $fieldName = $this->getName(); if($this->get('uitype') == 32) { - return Vtiger_Language_Handler::getAllLanguages(); + if($fieldName == 'language'){ + return Vtiger_Language_Handler::getAllLanguages(); + } else if($fieldName == 'defaultlandingpage'){ + $db = PearDatabase::getInstance(); + $currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); + $presence = array(0); + $restrictedModules = array('Webmails', 'Emails', 'Integration', 'Dashboard','ModComments'); + $query = 'SELECT name, tablabel, tabid FROM vtiger_tab WHERE presence IN (' . generateQuestionMarks($presence) . ') AND isentitytype = ? AND name NOT IN (' . generateQuestionMarks($restrictedModules) . ')'; + + $result = $db->pquery($query, array($presence, '1', $restrictedModules)); + $numOfRows = $db->num_rows($result); + + $moduleData = array('Home' => vtranslate('Home','Home')); + for ($i = 0; $i < $numOfRows; $i++) { + $tabId = $db->query_result($result, $i, 'tabid'); + // check the module access permission, if user has permission then show it in default module list + if($currentUserPriviligesModel->hasModulePermission($tabId)){ + $moduleName = $db->query_result($result, $i, 'name'); + $moduleLabel = $db->query_result($result, $i, 'tablabel'); + $moduleData[$moduleName] = vtranslate($moduleLabel,$moduleName); + } + } + return $moduleData; + } } else if ($this->get('uitype') == '115') { $db = PearDatabase::getInstance(); diff --git a/modules/Users/models/Module.php b/modules/Users/models/Module.php index 5658b32f4e435fc881d9d16cd73fcb45a94cce7d..f875d3c5024d4feae09f2bc8367c9c485e341ed7 100644 --- a/modules/Users/models/Module.php +++ b/modules/Users/models/Module.php @@ -105,8 +105,11 @@ class Users_Module_Model extends Vtiger_Module_Model { public function deleteRecord(Vtiger_Record_Model $recordModel) { $db = PearDatabase::getInstance(); $currentUser = Users_Record_Model::getCurrentUserModel(); - $query = "UPDATE vtiger_users SET status=?, date_modified=?, modified_user_id=? WHERE id=?"; - $db->pquery($query, array('Inactive', date('Y-m-d H:i:s'), $currentUser->getId(), $recordModel->getId()), true,"Error marking record deleted: "); + $deleteUserId = $recordModel->getId(); + if($deleteUserId != 1){ + $query = "UPDATE vtiger_users SET status=?, date_modified=?, modified_user_id=? WHERE id=?"; + $db->pquery($query, array('Inactive', date('Y-m-d H:i:s'), $currentUser->getId(), $deleteUserId), true,"Error marking record deleted: "); + } } /** diff --git a/modules/Users/models/Record.php b/modules/Users/models/Record.php index 56cfb7a67da24d65d85dc5074e60ad503ff3dc6d..206b8aac48a07bbea5c097cb9049585292f4e989 100644 --- a/modules/Users/models/Record.php +++ b/modules/Users/models/Record.php @@ -399,13 +399,16 @@ class Users_Record_Model extends Vtiger_Record_Model { //decode_html - added to handle UTF-8 characters in file names $imageOriginalName = urlencode(decode_html($imageName)); + if($url) { + $url = $site_URL.$url; + } $imageDetails[] = array( 'id' => $imageId, 'orgname' => $imageOriginalName, 'path' => $imagePath.$imageId, 'name' => $imageName, - 'url' => $site_URL.$url + 'url' => $url ); } return $imageDetails; @@ -503,13 +506,20 @@ class Users_Record_Model extends Vtiger_Record_Model { * @return <Array> */ public function getAccessibleGroups($private="",$module = false) { + global $default_charset; //TODO:Remove dependence on $_REQUEST for the module name in the below API $accessibleGroups = Vtiger_Cache::get('vtiger-'.$private, 'accessiblegroups'); if(!$accessibleGroups){ $accessibleGroups = get_group_array(false, "ACTIVE", "", $private,$module); Vtiger_Cache::set('vtiger-'.$private, 'accessiblegroups',$accessibleGroups); } - return $accessibleGroups; + if (!empty($accessibleGroups)) { + foreach ($accessibleGroups as $groupId => $groupName) { + $accessibleGroups[$groupId] = html_entity_decode($groupName, ENT_QUOTES, $default_charset); + } + } + + return $accessibleGroups; } /** diff --git a/modules/Users/views/UserSetup.php b/modules/Users/views/UserSetup.php index 03bca8c0e2fa7a08b1eef7f7516bdb7388a2929c..a1b0421de56f30bf4fb7c5e4e99ec0ce09b3fe19 100644 --- a/modules/Users/views/UserSetup.php +++ b/modules/Users/views/UserSetup.php @@ -14,7 +14,7 @@ class Users_UserSetup_View extends Vtiger_Index_View { return array(); } - public function preProcess(Vtiger_Request $request) { + public function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Vendors/Vendors.php b/modules/Vendors/Vendors.php index d76741a1f6c8f7f6743ef30ded093b4968eab647..e9cd0c16b4bc5259d0403b2ff22fbaa98b711731 100755 --- a/modules/Vendors/Vendors.php +++ b/modules/Vendors/Vendors.php @@ -64,12 +64,15 @@ class Vendors extends CRMEntity { /** Constructor which will set the column_fields in this object */ + function __construct() { + $this->log =LoggerManager::getLogger('vendor'); + $this->log->debug("Entering Vendors() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Vendors'); + $this->log->debug("Exiting Vendor method ..."); + } function Vendors() { - $this->log =LoggerManager::getLogger('vendor'); - $this->log->debug("Entering Vendors() method ..."); - $this->db = PearDatabase::getInstance(); - $this->column_fields = getColumnFields('Vendors'); - $this->log->debug("Exiting Vendor method ..."); + self::__construct(); } function save_module($module) diff --git a/modules/Vtiger/CRMEntity.php b/modules/Vtiger/CRMEntity.php index 78fe1b62e32648eb4aa4da2eb4407a39496a7bb0..f6e02223f8f2b5b3c7b803489221bda1e2e5f3ce 100644 --- a/modules/Vtiger/CRMEntity.php +++ b/modules/Vtiger/CRMEntity.php @@ -27,7 +27,7 @@ class Vtiger_CRMEntity extends CRMEntity { function __construct() { global $log; $this->column_fields = getColumnFields(get_class($this)); - $this->db = new PearDatabase(); + $this->db = PearDatabase::getInstance(); $this->log = $log; } diff --git a/modules/Vtiger/actions/MentionedUsers.php b/modules/Vtiger/actions/MentionedUsers.php index ae906ccdc52fac558b81b3e43796919eb03d28df..4f71393f7fff004afc97d9580dc76c3fd3f782d7 100644 --- a/modules/Vtiger/actions/MentionedUsers.php +++ b/modules/Vtiger/actions/MentionedUsers.php @@ -20,6 +20,7 @@ class Vtiger_MentionedUsers_Action extends Vtiger_Action_Controller { } public function process(Vtiger_Request $request) { + $mentionedUsers = []; $commentId = $request->get('crmid'); $commentRecord = Vtiger_Record_Model::getInstanceById($commentId, Vtiger_Module_Model::getInstance('ModComments')); $commentOwnerId = $commentRecord->get('creator'); diff --git a/modules/Vtiger/actions/Save.php b/modules/Vtiger/actions/Save.php index 4e3ac8e5ca92a0323d131877b1f8792933d7b071..33a714782f31ccf9128589ab8e27c16aeaa4bde3 100644 --- a/modules/Vtiger/actions/Save.php +++ b/modules/Vtiger/actions/Save.php @@ -160,6 +160,12 @@ class Vtiger_Save_Action extends Vtiger_Action_Controller { if($fieldDataType == 'time' && $fieldValue !== null){ $fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue); } + $ckeditorFields = array('commentcontent', 'notecontent'); + if((in_array($fieldName, $ckeditorFields)) && $fieldValue !== null){ + $purifiedContent = vtlib_purify(decode_html($fieldValue)); + // Purify malicious html event attributes + $fieldValue = purifyHtmlEventAttributes(decode_html($purifiedContent),true); + } if($fieldValue !== null) { if(!is_array($fieldValue) && $fieldDataType != 'currency') { $fieldValue = trim($fieldValue); diff --git a/modules/Vtiger/actions/SaveAjax.php b/modules/Vtiger/actions/SaveAjax.php index 49ec727dac8c4cbea38a539dc8272d587e736ca4..e8a8618d8cd34ecfa804945a49f2ebea04d4fc8a 100644 --- a/modules/Vtiger/actions/SaveAjax.php +++ b/modules/Vtiger/actions/SaveAjax.php @@ -106,6 +106,7 @@ class Vtiger_SaveAjax_Action extends Vtiger_Save_Action { if ($fieldDataType == 'time' && $fieldValue !== null) { $fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue); } + $fieldValue = $this->purifyCkeditorField($fieldName, $fieldValue); if ($fieldValue !== null) { if (!is_array($fieldValue)) { $fieldValue = trim($fieldValue); @@ -138,6 +139,7 @@ class Vtiger_SaveAjax_Action extends Vtiger_Save_Action { if ($fieldDataType == 'time' && $fieldValue !== null) { $fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue); } + $fieldValue = $this->purifyCkeditorField($fieldName, $fieldValue); if ($fieldValue !== null) { if (!is_array($fieldValue)) { $fieldValue = trim($fieldValue); @@ -149,4 +151,14 @@ class Vtiger_SaveAjax_Action extends Vtiger_Save_Action { return $recordModel; } + + public function purifyCkeditorField($fieldName, $fieldValue) { + $ckeditorFields = array('commentcontent', 'notecontent', 'signature'); + if((in_array($fieldName, $ckeditorFields)) && $fieldValue !== null){ + $purifiedContent = vtlib_purify(decode_html($fieldValue)); + // Purify malicious html event attributes + $fieldValue = purifyHtmlEventAttributes(decode_html($purifiedContent),true); + } + return $fieldValue; + } } diff --git a/modules/Vtiger/actions/SaveStar.php b/modules/Vtiger/actions/SaveStar.php index 1905042f1d2e71a7ea866f43fa6f33d35ec2b5c9..6e1fc40e7f68e79e018a48060718196951f727bb 100644 --- a/modules/Vtiger/actions/SaveStar.php +++ b/modules/Vtiger/actions/SaveStar.php @@ -12,7 +12,6 @@ class Vtiger_SaveStar_Action extends Vtiger_Mass_Action { var $followRecordIds = Array(); public function requiresPermission(\Vtiger_Request $request) { - $permissions = parent::requiresPermission($request); $permissions[] = array('module_parameter' => 'module', 'action' => 'DetailView', 'record_parameter' => 'record'); return $permissions; } diff --git a/modules/Vtiger/handlers/RelateEntitesHandler.php b/modules/Vtiger/handlers/RelateEntitesHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..5ec06dadad7c2b3cd45f3e76960e6208a7990766 --- /dev/null +++ b/modules/Vtiger/handlers/RelateEntitesHandler.php @@ -0,0 +1,34 @@ +<?php +/* +********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * ***********************************************************************************/ + +require_once 'include/events/VTEventHandler.inc'; + +class RelateEntitesHandler extends VTEventHandler { + + function handleEvent($eventName, $entityData) { + global $log; + $log->debug("Entering function RelateEntitesHandler ($eventName)"); + if ($eventName == 'vtiger.entity.beforerelate') { + $log->debug("Calling function triggerBeforeRelationsHandler ($eventName)"); + $this->triggerBeforeRelationsHandler($entityData); + } else if ($eventName == 'vtiger.entity.afterrelate') { + $log->debug("Calling function triggerAfterRelationHandler ($eventName)"); + $this->triggerAfterRelationHandler($entityData); + } + } + + public function triggerBeforeRelationsHandler($entityData) { + return true; + } + + public function triggerAfterRelationHandler($entityData) { + return true; + } +} \ No newline at end of file diff --git a/modules/Vtiger/helpers/ShowFile.php b/modules/Vtiger/helpers/ShowFile.php index 7ac64cc0e30a0d3905926aebb88fd2876f2322b3..5602fd04d802ed3007240da54b6cca05111dc1d3 100644 --- a/modules/Vtiger/helpers/ShowFile.php +++ b/modules/Vtiger/helpers/ShowFile.php @@ -21,8 +21,8 @@ class Vtiger_ShowFile_Helper { $query = "SELECT vtiger_attachments.* FROM vtiger_attachments INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_attachments.attachmentsid - WHERE vtiger_attachments.attachmentsid=? AND vtiger_attachments.name=? LIMIT 1"; - $result = $db->pquery($query, array($fid, $encFileName)); + WHERE vtiger_attachments.attachmentsid=? LIMIT 1"; + $result = $db->pquery($query, array($fid)); if ($result && $db->num_rows($result)) { $resultData = $db->fetch_array($result); $fileId = $resultData['attachmentsid']; @@ -30,7 +30,7 @@ class Vtiger_ShowFile_Helper { $fileName = $resultData['name']; $storedFileName = $resultData['storedname']; $fileType = $resultData['type']; - $sanitizedFileName = sanitizeUploadFileName($fileName, $upload_badext); + $sanitizedFileName = decode_html(sanitizeUploadFileName($fileName, $upload_badext)); /** * While saving the document applying decode_html to save in DB, but this is not happening for the images @@ -52,7 +52,7 @@ class Vtiger_ShowFile_Helper { } } if ($isFileExist) { - Vtiger_ShowFile_Helper::show($finalFilePath,$fileType); + Vtiger_ShowFile_Helper::show($finalFilePath,$fileType, $sanitizedFileName); } } } @@ -63,11 +63,15 @@ class Vtiger_ShowFile_Helper { * @param type $finalFilePath - the proper image folder path * @param type $fileType - image file type */ - static function show($finalFilePath, $fileType) { + static function show($finalFilePath, $fileType, $sanitizedFileName=false) { $handle = fopen($finalFilePath, "rb"); $contents = fread($handle, filesize($finalFilePath)); fclose($handle); + //added since other than image files we need file names, other wise it downloads with public.php extension which is treated as dangerous + if($sanitizedFileName) { + header("Content-Disposition: attachment; filename=\"$sanitizedFileName\""); + } header("Content-Type: $fileType;charset=UTF-8"); echo $contents; } diff --git a/modules/Vtiger/helpers/Util.php b/modules/Vtiger/helpers/Util.php index ec0091b29189b81e7026aa741f4ce4167e259322..cfc0b801210b590db8f195d2727e1d547fb34906 100644 --- a/modules/Vtiger/helpers/Util.php +++ b/modules/Vtiger/helpers/Util.php @@ -608,12 +608,12 @@ class Vtiger_Util_Helper { //Request will be having in terms of AM and PM but the database will be having in 24 hr format so converting //Database format - if($fieldInfo->getFieldDataType() == "time") { + if($fieldInfo && $fieldInfo->getFieldDataType() == "time") { $fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue); } $specialDateTimeConditions = Vtiger_Functions::getSpecialDateTimeCondtions(); - if($fieldName == 'date_start' || $fieldName == 'due_date' || $fieldInfo->getFieldDataType() == "datetime" && !in_array($operator, $specialDateTimeConditions) ) { + if($fieldName == 'date_start' || $fieldName == 'due_date' || ($fieldInfo && $fieldInfo->getFieldDataType() == "datetime") && !in_array($operator, $specialDateTimeConditions) ) { $dateValues = explode(',', $fieldValue); //Indicate whether it is fist date in the between condition $isFirstDate = true; @@ -633,7 +633,10 @@ class Vtiger_Util_Helper { $fieldValue = implode(',',$dateValues); } - $advFilterFieldInfoFormat['columnname'] = $fieldInfo->getCustomViewColumnName(); + if ($fieldInfo) { + $columnName = $fieldInfo->getCustomViewColumnName(); + } + $advFilterFieldInfoFormat['columnname'] = $columnName; $advFilterFieldInfoFormat['comparator'] = $operator; $advFilterFieldInfoFormat['value'] = $fieldValue; $advFilterFieldInfoFormat['column_condition'] = $groupConditionGlue; @@ -1155,12 +1158,20 @@ class Vtiger_Util_Helper { } break; case 'picklist' : $pickListDetails = $fieldModel->getPicklistValues(); + if($defaultValue){ + $value = $defaultValue; + break; + } foreach ($pickListDetails as $key => $value) { $value = $key; break; } break; case 'multipicklist': $pickListDetails = $fieldModel->getPicklistValues(); + if($defaultValue){ + $value = $defaultValue; + break; + } foreach ($pickListDetails as $key => $value) { $value = $key; break; @@ -1228,7 +1239,7 @@ class Vtiger_Util_Helper { public static function convertSpaceToHyphen($string) { if (!empty($string)) { - return str_replace(" ", "-", $string); + return str_replace(" ", "-", decode_html($string)); } } @@ -1254,13 +1265,13 @@ class Vtiger_Util_Helper { $fieldInfo = $fieldModel->getFieldInfo(); $editablePicklistValues = $fieldInfo['editablepicklistvalues']; if($fieldValue && $fieldDataType == 'picklist'){ - if(!empty($editablePicklistValues) && !in_array($fieldValue, $editablePicklistValues)){ + if(!empty($editablePicklistValues) && !isset($editablePicklistValues[$fieldValue])){ $fieldValue = null; } - }elseif(count($fieldValue) > 0 && $fieldDataType == 'multipicklist'){ + }elseif(!empty($fieldValue) && $fieldDataType == 'multipicklist'){ if(!empty($editablePicklistValues)){ foreach($fieldValue as $key => $value){ - if(!in_array($value, $editablePicklistValues)){ + if(!isset($editablePicklistValues[$fieldValue])){ unset($fieldValue[$key]); } } @@ -1268,4 +1279,4 @@ class Vtiger_Util_Helper { } return $fieldValue; } -} +} \ No newline at end of file diff --git a/modules/Vtiger/models/Field.php b/modules/Vtiger/models/Field.php index df0987285df9cc5e23579da26505dc883fecebcf..455c08d67fe734190383d671b28efb61479c637a 100644 --- a/modules/Vtiger/models/Field.php +++ b/modules/Vtiger/models/Field.php @@ -268,9 +268,15 @@ class Vtiger_Field_Model extends Vtiger_Field { $fieldPickListValues = array(); $picklistValues = Vtiger_Util_Helper::getPickListValues($fieldName); - foreach($picklistValues as $value) { - $fieldPickListValues[$value] = vtranslate($value,$this->getModuleName()); - } + foreach ($picklistValues as $value) { + if (!is_numeric($value)) { + $addValue = vtranslate($value, $this->getModuleName()); + } else { + $addValue = $value; + } + $fieldPickListValues[$value] = $addValue; + } + return $fieldPickListValues; } return null; diff --git a/modules/Vtiger/models/FindDuplicate.php b/modules/Vtiger/models/FindDuplicate.php index 4a46af94e09a02044f2b933d8f9e110c3c390b89..1664644efec1a58f37f03267a799e2e36cd00280 100644 --- a/modules/Vtiger/models/FindDuplicate.php +++ b/modules/Vtiger/models/FindDuplicate.php @@ -80,6 +80,7 @@ class Vtiger_FindDuplicate_Model extends Vtiger_Base_Model { $paging->set('nextPageExists', false); } $rows = count($entries); + $paging->recordCount = $rows; for ($i=0; $i<$rows; $i++) { $row = $entries[$i]; diff --git a/modules/Vtiger/models/ListView.php b/modules/Vtiger/models/ListView.php index f218a9e9474cff67a9363c929b3f93cc5cf5aae8..420319a7abb9a256eefae67abfbcd20efb9fd0fb 100644 --- a/modules/Vtiger/models/ListView.php +++ b/modules/Vtiger/models/ListView.php @@ -206,8 +206,8 @@ class Vtiger_ListView_Model extends Vtiger_Base_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator)); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(!empty($orderBy)){ $queryGenerator = $this->get('query_generator'); @@ -238,8 +238,7 @@ class Vtiger_ListView_Model extends Vtiger_Base_Model { if($orderBy == 'roleid' && $moduleName == 'Users'){ $listQuery .= ' ORDER BY vtiger_role.rolename '.' '. $sortOrder; } else { - $listQuery .= ' ORDER BY ? '.$sortOrder; - array_push($paramArray, $queryGenerator->getOrderByColumn($orderBy)); + $listQuery .= ' ORDER BY '.$queryGenerator->getOrderByColumn($orderBy).' '.$sortOrder; } if ($orderBy == 'first_name' && $moduleName == 'Users') { diff --git a/modules/Vtiger/models/Module.php b/modules/Vtiger/models/Module.php index 5ee02638af76e200f5aa14299719c58d3d0d9f79..6a94a0e66d50e975c82357f01889b558c916944d 100644 --- a/modules/Vtiger/models/Module.php +++ b/modules/Vtiger/models/Module.php @@ -889,8 +889,10 @@ class Vtiger_Module_Model extends Vtiger_Module { * @param <String> $where * @return <String> export query */ - public function getExportQuery($where,$query=false) { - $focus = CRMEntity::getInstance($this->getName()); + public function getExportQuery($focus, $where) { + if(!$focus) { + $focus = CRMEntity::getInstance($this->getName()); + } $query = $focus->create_export_query($where); return $query; } @@ -1250,6 +1252,7 @@ class Vtiger_Module_Model extends Vtiger_Module { $params[] = $id; } if($subordinateUsers) { + array_push($subordinateUsers, $currentUserModel->getId()); $ownerSql = ' smownerid IN ('. implode(',' , $subordinateUsers) .')'; } else { $ownerSql = ' smownerid = '.$currentUserModel->getId(); @@ -1274,14 +1277,14 @@ class Vtiger_Module_Model extends Vtiger_Module { if($moduleName === "Calendar"){ $basicLinks[] = array( 'linktype' => 'BASIC', - 'linklabel' => 'LBL_ADD_TASK', - 'linkurl' => $this->getCreateTaskRecordUrl(), + 'linklabel' => 'LBL_ADD_EVENT', + 'linkurl' => $this->getCreateEventRecordUrl(), 'linkicon' => 'fa-plus' ); - $basicLinks[] = array( + $basicLinks[] = array( 'linktype' => 'BASIC', - 'linklabel' => 'LBL_ADD_EVENT', - 'linkurl' => $this->getCreateEventRecordUrl(), + 'linklabel' => 'LBL_ADD_TASK', + 'linkurl' => $this->getCreateTaskRecordUrl(), 'linkicon' => 'fa-plus' ); } else { @@ -1612,96 +1615,124 @@ class Vtiger_Module_Model extends Vtiger_Module { public function getRelatedModuleRecordIds(Vtiger_Request $request, $recordIds = array(), $nonAdminCheck = false) { $db = PearDatabase::getInstance(); $relationIds = $request->get('related_modules'); - if(empty($relationIds)) return array(); - + if(empty($relationIds)) return array(); + $focus = CRMEntity::getInstance($this->getName()); $relatedModuleMapping = $focus->related_module_table_index; - - $relationFieldMapping = array(); - $queryParams = array($this->getId()); - foreach($relationIds as $reltionId) { - array_push($queryParams,$reltionId); - } - $query = "SELECT relationfieldid,related_tabid - FROM vtiger_relatedlists - WHERE vtiger_relatedlists.tabid=? AND relation_id IN (".generateQuestionMarks($relationIds).")"; - - - $relationRes = $db->pquery($query,$queryParams); - - $num_rows = $db->num_rows($relationRes); - for($i=0 ;$i<$num_rows; $i++) { - $relatedTabId = $db->query_result($relationRes,$i,'related_tabid'); - $relationfieldid = $db->query_result($relationRes,$i,'relationfieldid'); - $relatedModuleModel = Vtiger_Module_Model::getInstance($relatedTabId); - $relationFieldMapping[] = array('relatedModuleName'=>$relatedModuleModel->getName(),'relationfieldid'=>$relationfieldid); - } - + + $relationFieldMapping = array(); + $queryParams = array($this->getId()); + foreach($relationIds as $reltionId) { + array_push($queryParams,$reltionId); + } + $query = "SELECT relationfieldid,related_tabid + FROM vtiger_relatedlists + WHERE vtiger_relatedlists.tabid=? AND relation_id IN (".generateQuestionMarks($relationIds).")"; + + + $relationRes = $db->pquery($query,$queryParams); + + $num_rows = $db->num_rows($relationRes); + for($i=0 ;$i<$num_rows; $i++) { + $relatedTabId = $db->query_result($relationRes,$i,'related_tabid'); + $relationfieldid = $db->query_result($relationRes,$i,'relationfieldid'); + $relatedModuleModel = Vtiger_Module_Model::getInstance($relatedTabId); + $relationFieldMapping[] = array('relatedModuleName'=>$relatedModuleModel->getName(),'relationfieldid'=>$relationfieldid); + } + $relatedIds = array(); if(!empty($relationFieldMapping)) { - foreach ($relationFieldMapping as $mappingDetails){ + foreach ($relationFieldMapping as $mappingDetails){ //for ($i=0; $i<count($relatedModules); $i++) { $params = array(); $module = $mappingDetails['relatedModuleName']; - $relationFieldId = $mappingDetails['relationfieldid']; - $sql = "SELECT vtiger_crmentity.crmid FROM vtiger_crmentity"; - - if($nonAdminCheck) { - if(empty($relatedModuleFocus)) $relatedModuleFocus = CRMEntity::getInstance($module); - $user = Users_Record_Model::getCurrentUserModel(); - $relationAccessQuery = $relatedModuleFocus->getNonAdminAccessControlQuery($module, $user); - $sql .= ' '.$relationAccessQuery; - } - - if(empty($relationFieldId)){ - $tablename = $relatedModuleMapping[$module]['table_name']; - $tabIndex = $relatedModuleMapping[$module]['table_index']; - $relIndex = $relatedModuleMapping[$module]['rel_index']; - - //Fallback to vtiger_crmentityrel if both focus and relationfieldid is empty - if(empty($tablename)) { - $tablename = 'vtiger_crmentityrel'; - $tabIndex = 'crmid'; + $relationFieldId = $mappingDetails['relationfieldid']; + $sql = "SELECT vtiger_crmentity.crmid FROM vtiger_crmentity"; + + + if(empty($relationFieldId)){ + $tablename = $relatedModuleMapping[$module]['table_name']; + $tabIndex = $relatedModuleMapping[$module]['table_index']; + $relIndex = $relatedModuleMapping[$module]['rel_index']; + //To show related records comments in documents, should get related document records from vtiger_senotesrel. + if(empty($tablename) && $this->getName() == 'Documents') { + $tablename = 'vtiger_senotesrel'; + $tabIndex = 'crmid'; + $relIndex = 'notesid'; + //To show related Document comments in current module + } else if (empty($tablename) && $module == 'Documents') { + $tablename = 'vtiger_senotesrel'; + $tabIndex = 'notesid'; $relIndex = 'crmid'; - } - //END - - if($tablename == 'vtiger_crmentityrel'){ - $sql .= " INNER JOIN $tablename ON ($tablename.relcrmid = vtiger_crmentity.crmid OR $tablename.crmid = vtiger_crmentity.crmid) - WHERE ($tablename.crmid IN (". generateQuestionMarks($recordIds).")) OR ($tablename.relcrmid IN (". generateQuestionMarks($recordIds)."))"; - foreach ($recordIds as $key => $recordId) { + } else if(empty($tablename)) { + //Fallback to vtiger_crmentityrel if both focus and relationfieldid is empty + $tablename = 'vtiger_crmentityrel'; + $tabIndex = 'crmid'; + $relIndex = 'crmid'; + } + //END + + if($tablename == 'vtiger_crmentityrel'){ + $sql .= ' LEFT JOIN vtiger_activity ON vtiger_activity.activityid = vtiger_crmentity.crmid '; + $sql .= " INNER JOIN $tablename ON ($tablename.relcrmid = vtiger_crmentity.crmid OR $tablename.crmid = vtiger_crmentity.crmid) + WHERE ($tablename.crmid IN (". generateQuestionMarks($recordIds).")) OR ($tablename.relcrmid IN (". generateQuestionMarks($recordIds)."))"; + foreach ($recordIds as $key => $recordId) { array_push($params, $recordId); + } + } else if($module == "Contacts" && $this->getName() == "Potentials"){ + $tablename = 'vtiger_contpotentialrel'; + $tabIndex = 'contactid'; + $sql .= ' LEFT JOIN vtiger_activity ON vtiger_activity.activityid = vtiger_crmentity.crmid '; + $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid + WHERE $tablename.potentialid IN (". generateQuestionMarks($recordIds).")"; + } else { + if(in_array($tablename,array('vtiger_senotesrel'))){ + $sql .= ' LEFT JOIN vtiger_activity ON vtiger_activity.activityid = vtiger_crmentity.crmid '; + } + $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid + WHERE $tablename.$relIndex IN (". generateQuestionMarks($recordIds).")"; + } + }else{ + $fieldModel = Vtiger_Field_Model::getInstance($relationFieldId); + $relatedModuleFocus = CRMEntity::getInstance($module); + $tablename = $fieldModel->get('table'); + $relIndex = $fieldModel->get('column'); + if($tablename == $relatedModuleFocus->table_name){ + if($this->getName() == "Contacts" && $module == "Potentials"){ + $tablename = 'vtiger_contpotentialrel'; + $tabIndex = 'potentialid'; + $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid + WHERE $tablename.contactid IN (". generateQuestionMarks($recordIds).")"; + }else{ + $tabIndex = $relatedModuleFocus->table_index; + $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid + WHERE $tablename.$relIndex IN (" . generateQuestionMarks($recordIds) . ")"; } - } else { - $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid - WHERE $tablename.$relIndex IN (". generateQuestionMarks($recordIds).")"; - } - }else{ - $fieldModel = Vtiger_Field_Model::getInstance($relationFieldId); - $relatedModuleFocus = CRMEntity::getInstance($module); - $tablename = $fieldModel->get('table'); - $relIndex = $fieldModel->get('column'); - if($tablename == $relatedModuleFocus->table_name){ - $tabIndex = $relatedModuleFocus->table_index; - $sql .= " INNER JOIN $tablename ON $tablename.$tabIndex = vtiger_crmentity.crmid - WHERE $tablename.$relIndex IN (". generateQuestionMarks($recordIds).")"; - }else{ - $modulePrimaryTableName = $relatedModuleFocus->table_name; - $modulePrimaryTableIndex = $relatedModuleFocus->table_index; - $tabIndex = $relatedModuleFocus->tab_name_index[$tablename]; - $sql .= " INNER JOIN $modulePrimaryTableName ON $modulePrimaryTableName.$modulePrimaryTableIndex = vtiger_crmentity.crmid - INNER JOIN $tablename ON $tablename.$tabIndex = $modulePrimaryTableName.$modulePrimaryTableIndex - WHERE $tablename.$relIndex IN (". generateQuestionMarks($recordIds).")"; - } - } - - $sql .=' AND vtiger_crmentity.deleted = 0'; + + }else{ + $modulePrimaryTableName = $relatedModuleFocus->table_name; + $modulePrimaryTableIndex = $relatedModuleFocus->table_index; + $tabIndex = $relatedModuleFocus->tab_name_index[$tablename]; + $sql .= " INNER JOIN $modulePrimaryTableName ON $modulePrimaryTableName.$modulePrimaryTableIndex = vtiger_crmentity.crmid + INNER JOIN $tablename ON $tablename.$tabIndex = $modulePrimaryTableName.$modulePrimaryTableIndex + WHERE $tablename.$relIndex IN (". generateQuestionMarks($recordIds).")"; + } + } + if($nonAdminCheck) { + $sqlComponents = explode(" WHERE ",$sql); + if(empty($relatedModuleFocus)) $relatedModuleFocus = CRMEntity::getInstance($module); + $user = Users_Record_Model::getCurrentUserModel(); + $relationAccessQuery = $relatedModuleFocus->getNonAdminAccessControlQuery($module, $user); + $sql = $sqlComponents[0].$relationAccessQuery." WHERE ".$sqlComponents[1]; + } + + $sql .=' AND vtiger_crmentity.deleted = 0'; foreach ($recordIds as $key => $recordId) { array_push($params, $recordId); } $result1 = $db->pquery($sql, $params); - $num_rows = $db->num_rows($result1); + $num_rows = $db->num_rows($result1); //should give doc crmid. for($j=0; $j<$num_rows; $j++){ $relatedIds[] = $db->query_result($result1, $j, 'crmid'); } diff --git a/modules/Vtiger/models/Record.php b/modules/Vtiger/models/Record.php index c6d9a683f1242d36afbde66365623087ea41629d..90a10f6733cf541456f7f4be02667614d4e663e8 100644 --- a/modules/Vtiger/models/Record.php +++ b/modules/Vtiger/models/Record.php @@ -416,14 +416,17 @@ class Vtiger_Record_Model extends Vtiger_Base_Model { $url = \Vtiger_Functions::getFilePublicURL($imageId, $imageName); //decode_html - added to handle UTF-8 characters in file names $imageOriginalName = urlencode(decode_html($imageName)); - + if($url) { + $url = $site_URL.$url; + } + if(!empty($imageName)){ $imageDetails[] = array( 'id' => $imageId, 'orgname' => $imageOriginalName, 'path' => $imagePath.$imageId, 'name' => $imageName, - 'url' => $site_URL.$url + 'url' => $url ); } } @@ -684,7 +687,8 @@ class Vtiger_Record_Model extends Vtiger_Base_Model { function getCommentEnabledRelatedEntityIds($modulename, $recordId) { $user = Users_Record_Model::getCurrentUserModel(); $relatedModuleRecordIds = array(); - $restrictedFieldnames = array('modifiedby', 'created_user_id', 'assigned_user_id'); + //User fields are restricted types + $restrictedFieldUITypes = array(52, 53); $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $modulename); $moduleInstance = Vtiger_Module_Model::getInstance($modulename); $referenceFieldsModels = $moduleInstance->getFieldsByType('reference'); @@ -692,10 +696,11 @@ class Vtiger_Record_Model extends Vtiger_Base_Model { $directrelatedModuleRecordIds = array(); foreach ($referenceFieldsModels as $referenceFieldsModel) { + $relmoduleFieldUIType = $referenceFieldsModel->get('uitype'); $relmoduleFieldname = $referenceFieldsModel->get('name'); $relModuleFieldValue = $recordModel->get($relmoduleFieldname); - - if (!empty($relModuleFieldValue) && !in_array($relmoduleFieldname, $restrictedFieldnames) && isRecordExists($relModuleFieldValue)) { + + if (!empty($relModuleFieldValue) && !in_array($relmoduleFieldUIType, $restrictedFieldUITypes) && isRecordExists($relModuleFieldValue)) { $relModuleRecordModel = Vtiger_Record_Model::getInstanceById($relModuleFieldValue); $relmodule = $relModuleRecordModel->getModuleName(); @@ -712,7 +717,7 @@ class Vtiger_Record_Model extends Vtiger_Base_Model { } } } - + $moduleModel = Vtiger_Module_Model::getInstance($modulename); $relatedModuleModels = Vtiger_Relation_Model::getAllRelations($moduleModel, false); $commentEnabledModules = array(); @@ -736,5 +741,17 @@ class Vtiger_Record_Model extends Vtiger_Base_Model { return array_merge($relatedModuleRecordIds, $directrelatedModuleRecordIds, $indirectrelatedModuleRecordIds); } + + function getDownloadFileURL($attachmentId = false) { + $fileDetails = $this->getFileDetails($attachmentId); + if (is_array($fileDetails[0])) { + $fileDetails = $fileDetails[0]; + } + if (!empty($fileDetails)) { + return 'index.php?module='. $this->getModuleName() .'&action=DownloadFile&record='. $this->getId() .'&fileid='. $fileDetails['attachmentsid'].'&name='. $fileDetails['name']; + } else { + return $this->get('filename'); + } + } } diff --git a/modules/Vtiger/models/Tag.php b/modules/Vtiger/models/Tag.php index bb0a01c4daf70565226b73d9784c13b4f1025def..ac37f0577a85494fc4134f42815cf8b2b9af5da7 100644 --- a/modules/Vtiger/models/Tag.php +++ b/modules/Vtiger/models/Tag.php @@ -299,6 +299,43 @@ class Vtiger_Tag_Model extends Vtiger_Base_Model { $result = $db->pquery($checkQuery, array($tagId, $userIdToExclude)); return $db->num_rows($result) > 0 ? true : false; } + + /** + * Function used to return tags for list for records + * @param <Array> $records - record ids + * @return <Array> tags + */ + public static function getAllAccessibleTags($records) { + $tagsList = array(); + if(count($records) == 0) return $tagsList; + + $currentUser = Users_Record_Model::getCurrentUserModel(); + + $db = PearDatabase::getInstance(); + $query = "SELECT tag,object_id FROM vtiger_freetags + INNER JOIN vtiger_freetagged_objects ON vtiger_freetags.id = vtiger_freetagged_objects.tag_id + WHERE (vtiger_freetagged_objects.tagger_id = ? OR vtiger_freetags.visibility='public') + AND vtiger_freetagged_objects.object_id IN + (" . generateQuestionMarks($records) . ")"; + $params = array($currentUser->getId()); + $params = array_merge($params, $records); + + $result = $db->pquery($query , $params); + $num_rows = $db->num_rows($result); + + + for($i=0; $i<$num_rows; $i++) { + $tagName = decode_html($db->query_result($result, $i, 'tag')); + $record = decode_html($db->query_result($result, $i, 'object_id')); + + if(empty($tagsList[$record])) { + $tagsList[$record] = $tagName; + } else { + $tagsList[$record] .= ','.$tagName; + } + } + return $tagsList; + } } ?> diff --git a/modules/Vtiger/uitypes/Boolean.php b/modules/Vtiger/uitypes/Boolean.php index bcd6e5d9b25c1f3c7be7170131701f6f9caabcb0..e2f29f8f07fcab5ba9b305f04005f0e667e83186 100644 --- a/modules/Vtiger/uitypes/Boolean.php +++ b/modules/Vtiger/uitypes/Boolean.php @@ -23,7 +23,7 @@ class Vtiger_Boolean_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { if($value == 1 || $value == '1' || strtolower($value) == 'on') { return Vtiger_Language_Handler::getTranslatedString('LBL_YES', $this->get('field')->getModuleName()); } diff --git a/modules/Vtiger/uitypes/Currency.php b/modules/Vtiger/uitypes/Currency.php index acf655b9e04f3e136966685ddf973dcca60196b5..c39b03abed186d592dc5a33f5972d22bdfd27d81 100644 --- a/modules/Vtiger/uitypes/Currency.php +++ b/modules/Vtiger/uitypes/Currency.php @@ -23,7 +23,7 @@ class Vtiger_Currency_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value, $skipConversion = false) { + public function getDisplayValue($value, $skipConversion = false, $recordInstance=false) { $uiType = $this->get('field')->get('uitype'); if ($value) { if ($uiType == 72) { diff --git a/modules/Vtiger/uitypes/CurrencyList.php b/modules/Vtiger/uitypes/CurrencyList.php index 1644b16991f0319a979d8326afd2755a305d1ec0..87f4b435918ebf8951a38801abadba70d0aaadca 100644 --- a/modules/Vtiger/uitypes/CurrencyList.php +++ b/modules/Vtiger/uitypes/CurrencyList.php @@ -17,7 +17,7 @@ class Vtiger_CurrencyList_UIType extends Vtiger_Base_UIType { return 'uitypes/CurrencyList.tpl'; } - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $db = PearDatabase::getInstance(); $result = $db->pquery('SELECT currency_name FROM vtiger_currency_info WHERE currency_status = ? AND id = ?', array('Active', $value)); diff --git a/modules/Vtiger/uitypes/Datetime.php b/modules/Vtiger/uitypes/Datetime.php index 1c1d8dd240349cfba28ccedd8a40006fd1482191..51a233043c846a1f1252ed3f0293d0420cb5e385 100644 --- a/modules/Vtiger/uitypes/Datetime.php +++ b/modules/Vtiger/uitypes/Datetime.php @@ -23,7 +23,7 @@ class Vtiger_Datetime_UIType extends Vtiger_Date_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $dateValue = '--'; if ($value != '') { diff --git a/modules/Vtiger/uitypes/DocumentsFolder.php b/modules/Vtiger/uitypes/DocumentsFolder.php index c1cf8c645182edafe4fd7add3462ded35df63dc0..477d5720fb4727e6b263a8aa7ff38b509a6800e1 100644 --- a/modules/Vtiger/uitypes/DocumentsFolder.php +++ b/modules/Vtiger/uitypes/DocumentsFolder.php @@ -23,7 +23,7 @@ class Vtiger_DocumentsFolder_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $db = PearDatabase::getInstance(); $result = $db->pquery('SELECT * FROM vtiger_attachmentsfolder WHERE folderid = ?', array($value)); if($db->num_rows($result)) { diff --git a/modules/Vtiger/uitypes/Double.php b/modules/Vtiger/uitypes/Double.php index 7d9df554dc89a049894ee8e2a37f4e82455454f1..d53b532b2ae109252fc7c58fe11215e1149e706f 100644 --- a/modules/Vtiger/uitypes/Double.php +++ b/modules/Vtiger/uitypes/Double.php @@ -23,7 +23,7 @@ class Vtiger_Double_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { return decimalFormat($value); } diff --git a/modules/Vtiger/uitypes/Email.php b/modules/Vtiger/uitypes/Email.php index 3cf39170bf63e2e5347213a48f078dd1c83e5467..31cd3dc60f6ff7fed6d452396e70000728dd28fe 100644 --- a/modules/Vtiger/uitypes/Email.php +++ b/modules/Vtiger/uitypes/Email.php @@ -18,7 +18,7 @@ class Vtiger_Email_UIType extends Vtiger_Base_UIType { return 'uitypes/Email.tpl'; } - public function getDisplayValue($value, $recordId) { + public function getDisplayValue($value, $recordId = false, $recordInstance=false) { $currentUser = Users_Record_Model::getCurrentUserModel(); $internalMailer = $currentUser->get('internal_mailer'); if($value){ diff --git a/modules/Vtiger/uitypes/FileLocationType.php b/modules/Vtiger/uitypes/FileLocationType.php index 0f392c982cf943f269a526f0345470e3354547a0..7d336d5bbebf126ac6658d9e99ca61d8289dd744 100644 --- a/modules/Vtiger/uitypes/FileLocationType.php +++ b/modules/Vtiger/uitypes/FileLocationType.php @@ -23,7 +23,7 @@ class Vtiger_FileLocationType_UIType extends Vtiger_Base_UIType { * @param <String> value of field * @return <String> Converted value */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { if ($value === 'I') { $value = 'LBL_INTERNAL'; } else { diff --git a/modules/Vtiger/uitypes/Multiowner.php b/modules/Vtiger/uitypes/Multiowner.php index 110579159be7835f7dd803f85af85526e2c5dd2f..a32f3ddc6cc71a54f0be5f6d8db80e9bea226bc3 100755 --- a/modules/Vtiger/uitypes/Multiowner.php +++ b/modules/Vtiger/uitypes/Multiowner.php @@ -23,7 +23,7 @@ class Vtiger_Multiowner_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($values) { + public function getDisplayValue($values, $record=false, $recordInstance=false) { if($values == NULL && !is_array($values)) return; foreach($values as $value){ if (self::getOwnerType($value) === 'User') { diff --git a/modules/Vtiger/uitypes/Multipicklist.php b/modules/Vtiger/uitypes/Multipicklist.php index 83b4527c298631c14ca5f29758fefc27b6788cc2..f342a0f387ef7d2c7471fc5b3f78fab3294bed30 100644 --- a/modules/Vtiger/uitypes/Multipicklist.php +++ b/modules/Vtiger/uitypes/Multipicklist.php @@ -23,7 +23,7 @@ class Vtiger_Multipicklist_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $moduleName = $this->get('field')->getModuleName(); $value = explode(' |##| ', $value); diff --git a/modules/Vtiger/uitypes/Owner.php b/modules/Vtiger/uitypes/Owner.php index f62578842a886146430de2858c9bb247125ac289..9c9661a6d4241682783581f8e98d48e89c553924 100644 --- a/modules/Vtiger/uitypes/Owner.php +++ b/modules/Vtiger/uitypes/Owner.php @@ -23,7 +23,7 @@ class Vtiger_Owner_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { if (self::getOwnerType($value) === 'User') { $userModel = Users_Record_Model::getCleanInstance('Users'); $userModel->set('id', $value); diff --git a/modules/Vtiger/uitypes/Ownergroup.php b/modules/Vtiger/uitypes/Ownergroup.php index a20dffb49e5f6c078177c8aea1caa368f41103fd..c343c8833e52023096684800d75ca1c4026a943b 100644 --- a/modules/Vtiger/uitypes/Ownergroup.php +++ b/modules/Vtiger/uitypes/Ownergroup.php @@ -23,7 +23,7 @@ class Vtiger_Ownergroup_UIType extends Vtiger_Owner_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $recordModel = new Settings_Groups_Record_Model(); $recordModel->set('groupid', $value); $detailViewUrl = $recordModel->getDetailViewUrl(); diff --git a/modules/Vtiger/uitypes/Picklist.php b/modules/Vtiger/uitypes/Picklist.php index 14eaa9847c160106c89c0421c3b9fc0ee6a52662..8bf9e05682715e3d7b4989b41b725a31817cc9e4 100644 --- a/modules/Vtiger/uitypes/Picklist.php +++ b/modules/Vtiger/uitypes/Picklist.php @@ -23,7 +23,7 @@ class Vtiger_Picklist_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { return Vtiger_Language_Handler::getTranslatedString($value, $this->get('field')->getModuleName()); } diff --git a/modules/Vtiger/uitypes/Reference.php b/modules/Vtiger/uitypes/Reference.php index af07437e76ba9c11b0dc2af040e0093d20b8550d..3ac8f7e77494f1eaa18a0ebd3a7cb288fbdc94a7 100644 --- a/modules/Vtiger/uitypes/Reference.php +++ b/modules/Vtiger/uitypes/Reference.php @@ -40,7 +40,7 @@ class Vtiger_Reference_UIType extends Vtiger_Base_UIType { * @param <Integer> crmid of record * @return <String> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $referenceModule = $this->getReferenceModule($value); if($referenceModule && !empty($value)) { $referenceModuleName = $referenceModule->get('name'); @@ -54,7 +54,7 @@ class Vtiger_Reference_UIType extends Vtiger_Base_UIType { $fieldModel = $this->get('field'); $entityNames = getEntityName($referenceModuleName, array($value)); $linkValue = "<a href='index.php?module=$referenceModuleName&view=".$referenceModule->getDetailViewName()."&record=$value' - title='".vtranslate($fieldModel->get('label'), $referenceModuleName).":". $entityNames[$value] ."' " + title='".vtranslate($referenceModuleName, $referenceModuleName).":". $entityNames[$value] ."' " . "data-original-title='".vtranslate($referenceModuleName, $referenceModuleName)."'>$entityNames[$value]</a>"; return $linkValue; } diff --git a/modules/Vtiger/uitypes/Reminder.php b/modules/Vtiger/uitypes/Reminder.php index c98fb47942cafa40717c48192a9f3ec98355ab47..033d14e1e3bce88aba9dd971fa8da6e1326664fb 100644 --- a/modules/Vtiger/uitypes/Reminder.php +++ b/modules/Vtiger/uitypes/Reminder.php @@ -31,7 +31,7 @@ class Vtiger_Reminder_UIType extends Vtiger_Date_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $reminder_value = ''; $reminder_time = $this->getEditViewDisplayValue($value); if(!empty($reminder_time[0])){ diff --git a/modules/Vtiger/uitypes/Text.php b/modules/Vtiger/uitypes/Text.php index abca8ea22e261482b2dcd361a9a0edcca9b3095e..054024feaf65d0df6407e816200055fbeb023bea 100644 --- a/modules/Vtiger/uitypes/Text.php +++ b/modules/Vtiger/uitypes/Text.php @@ -15,8 +15,15 @@ class Vtiger_Text_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { - return nl2br($value); + public function getDisplayValue($value, $record=false, $recordInstance = false,$removeTags = false) { + //This API replaces newlines to html br tags, and spaces with + // It should not replace spaces within html tags + $value = decode_html(preg_replace('/\r\n|\r|\n|
|&NewLine;/','<br>',$value)); + if($removeTags){ + $value = strip_tags($value,'<br>'); + } + $value = purifyHtmlEventAttributes($value, true); + return $value; } /** diff --git a/modules/Vtiger/uitypes/Theme.php b/modules/Vtiger/uitypes/Theme.php index 53d971bd19cda72c44124f025628a8c7ec76c603..e3ed9ea7a68db551fd5221e2d2f70aad80479ef1 100644 --- a/modules/Vtiger/uitypes/Theme.php +++ b/modules/Vtiger/uitypes/Theme.php @@ -23,7 +23,7 @@ class Vtiger_Theme_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return <Object> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $allSkins = Vtiger_Theme::getAllSkins(); $skinColor = $allSkins[$value]; $value = ucfirst($value); diff --git a/modules/Vtiger/uitypes/Time.php b/modules/Vtiger/uitypes/Time.php index 801e65f9c1f1840e3d5350f0d8f22153d27302cc..4c9a9ca55a14657e703a32a9a4c098609fef0bc7 100644 --- a/modules/Vtiger/uitypes/Time.php +++ b/modules/Vtiger/uitypes/Time.php @@ -23,7 +23,7 @@ class Vtiger_Time_UIType extends Vtiger_Base_UIType { * @param <String> time * @return <String> time */ - public static function getDisplayTimeValue($time) { + public static function getDisplayTimeValue($time, $record=false, $recordInstance=false) { $date = new DateTimeField($time); return $date->getDisplayTime(); } @@ -90,7 +90,7 @@ class Vtiger_Time_UIType extends Vtiger_Base_UIType { * @param <Object> $value * @return $value */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record = false, $recordInstance=false) { $userModel = Users_Privileges_Model::getCurrentUserModel(); if($userModel->get('hour_format') == '12'){ return self::getTimeValueInAMorPM($value); diff --git a/modules/Vtiger/uitypes/Url.php b/modules/Vtiger/uitypes/Url.php index 8d0beebd0849d9a9c1aa608929c04054c343985a..5d30391abfcdb89beb5f55298e1f7fff236d0d3b 100644 --- a/modules/Vtiger/uitypes/Url.php +++ b/modules/Vtiger/uitypes/Url.php @@ -18,7 +18,7 @@ class Vtiger_Url_UIType extends Vtiger_Base_UIType { return 'uitypes/Url.tpl'; } - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $matchPattern = "^[\w]+:\/\/^"; preg_match($matchPattern, $value, $matches); if(!empty ($matches[0])) { diff --git a/modules/Vtiger/uitypes/UserReference.php b/modules/Vtiger/uitypes/UserReference.php index 7c050dee792d2e7118be52fff42640da348dbdb5..0404b7ee060a419147d77823fa8eb794444b29ef 100644 --- a/modules/Vtiger/uitypes/UserReference.php +++ b/modules/Vtiger/uitypes/UserReference.php @@ -36,7 +36,7 @@ class Vtiger_UserReference_UIType extends Vtiger_Base_UIType { * @param <Number> $recordId * @return <String> display value */ - public function getDisplayValue($value, $recordId) { + public function getDisplayValue($value, $record=false, $recordInstance=false) { $displayValue = $this->getEditViewDisplayValue($value); $currentUserModel = Users_Record_Model::getCurrentUserModel(); if ($currentUserModel->isAdminUser()) { diff --git a/modules/Vtiger/uitypes/UserRole.php b/modules/Vtiger/uitypes/UserRole.php index 423e6ac74e718b663fdfd31971d99adc0440bc40..3d30d24fca78023b96fa561783cf2145ed8063f3 100644 --- a/modules/Vtiger/uitypes/UserRole.php +++ b/modules/Vtiger/uitypes/UserRole.php @@ -36,7 +36,7 @@ class Vtiger_UserRole_UIType extends Vtiger_Base_UIType { * @param <Number> $recordId * @return <String> display value */ - public function getDisplayValue($value, $recordId) { + public function getDisplayValue($value, $recordId=false, $recordInstance=false) { $displayValue = $this->getEditViewDisplayValue($value); $currentUserModel = Users_Record_Model::getCurrentUserModel(); if ($currentUserModel->isAdminUser()) { diff --git a/modules/Vtiger/views/Basic.php b/modules/Vtiger/views/Basic.php index 9625ee4641763043c665fefa85a3a9700f0fd055..aff63cb2b799ed3c352b14c6eed22ca12d198fab 100644 --- a/modules/Vtiger/views/Basic.php +++ b/modules/Vtiger/views/Basic.php @@ -51,11 +51,12 @@ abstract class Vtiger_Basic_View extends Vtiger_Footer_View { $supportGroup = $menuGroupedByParent['SUPPORT']; unset($menuGroupedByParent['SUPPORT']); $menuGroupedByParent['SUPPORT'] = $supportGroup; + $parentApp = $request->get('app'); foreach ($menuGroupedByParent as $parentCategory => $menuList) { if($parentCategory == 'ANALYTICS' || $parentCategory == 'SETTINGS') continue; - if(count($menuList) > 0) { - if(array_key_exists($selectedModule, $menuList) && $parentCategory) { + if(!empty($menuList)) { + if(array_key_exists($selectedModule, $menuList) && ($parentCategory == $parentApp)) { $moduleFound = true; $selectedModuleMenuCategory = $parentCategory; } diff --git a/modules/Vtiger/views/BasicAjax.php b/modules/Vtiger/views/BasicAjax.php index daaf1bafe84ee253fbbbb46b305c08da43be4577..5d72bca335f407387eeb5c70701355938d535969 100644 --- a/modules/Vtiger/views/BasicAjax.php +++ b/modules/Vtiger/views/BasicAjax.php @@ -23,7 +23,7 @@ class Vtiger_BasicAjax_View extends Vtiger_Basic_View { return $permissions; } - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Vtiger/views/Detail.php b/modules/Vtiger/views/Detail.php index 6ef1158c0a80ccb5b3c4031217b569fbdf09b016..5040b7e5897e702500f9e040bc9e544da65e06e8 100644 --- a/modules/Vtiger/views/Detail.php +++ b/modules/Vtiger/views/Detail.php @@ -157,7 +157,10 @@ class Vtiger_Detail_View extends Vtiger_Index_View { $allUserTags = Vtiger_Tag_Model::getAllUserTags($currentUserModel->getId()); $viewer->assign('TAGS_LIST', $tagsList); $viewer->assign('ALL_USER_TAGS', $allUserTags); - $viewer->assign('SELECTED_MENU_CATEGORY', 'MARKETING'); + $appName = $request->get('app'); + if(!empty($appName)){ + $viewer->assign('SELECTED_MENU_CATEGORY',$appName); + } $selectedTabLabel = $request->get('tab_label'); $relationId = $request->get('relationId'); @@ -280,7 +283,7 @@ class Vtiger_Detail_View extends Vtiger_Index_View { return $headerScriptInstances; } - function showDetailViewByMode($request) { + function showDetailViewByMode(Vtiger_Request $request) { $requestMode = $request->get('requestMode'); if($requestMode == 'full') { return $this->showModuleDetailView($request); @@ -375,7 +378,7 @@ class Vtiger_Detail_View extends Vtiger_Index_View { * Function shows basic detail for the record * @param <type> $request */ - function showModuleBasicView($request) { + function showModuleBasicView(Vtiger_Request $request) { $recordId = $request->get('record'); $moduleName = $request->getModule(); diff --git a/modules/Vtiger/views/EmailsRelatedModulePopupAjax.php b/modules/Vtiger/views/EmailsRelatedModulePopupAjax.php index 8257330559c2bba89c24c2f961f8e8f49d8082e4..21ccf782b9727b4b44217f1148ed2652af976dc1 100644 --- a/modules/Vtiger/views/EmailsRelatedModulePopupAjax.php +++ b/modules/Vtiger/views/EmailsRelatedModulePopupAjax.php @@ -22,19 +22,20 @@ class Vtiger_EmailsRelatedModulePopupAjax_View extends Vtiger_EmailsRelatedModul } function postProcess(Vtiger_Request $request) { - return true; + return true; } function process (Vtiger_Request $request) { - $mode = $request->get('mode'); + $mode = $request->get('mode'); if(!empty($mode)) { - $this->invokeExposedMethod($mode, $request); + $this->invokeExposedMethod($mode, $request); return; } $viewer = $this->getViewer ($request); - $moduleName = $request->getModule(); + $moduleName = $request->getModule(); - $this->initializeListViewContents($request, $viewer); + $viewer->assign('MODULE_NAME',$moduleName); + $this->initializeListViewContents($request, $viewer); echo $viewer->view('PopupContents.tpl', $moduleName, true); } diff --git a/modules/Vtiger/views/FindDuplicates.php b/modules/Vtiger/views/FindDuplicates.php index 1f994c947d7761dcd05cb5d1cb1d513be1492790..7d3c6631fa2c6cb575f08c42da09ae235e321b86 100644 --- a/modules/Vtiger/views/FindDuplicates.php +++ b/modules/Vtiger/views/FindDuplicates.php @@ -13,7 +13,7 @@ class Vtiger_FindDuplicates_View extends Vtiger_List_View { function preProcess(Vtiger_Request $request, $display = true) { $viewer = $this->getViewer ($request); $this->initializeListViewContents($request, $viewer); - parent::preProcess($request, $display); + parent::preProcess($request, $display); } public function preProcessTplName(Vtiger_Request $request) { @@ -80,10 +80,13 @@ class Vtiger_FindDuplicates_View extends Vtiger_List_View { if(empty($pageNumber)){ $pageNumber = '1'; } - $pagingModel = new Vtiger_Paging_Model(); - $pagingModel->set('page', $pageNumber); - $pageLimit = $pagingModel->getPageLimit(); - + if (!$this->pagingModel) { + $pagingModel = new Vtiger_Paging_Model(); + $this->pagingModel = $pagingModel; + } else { + $pagingModel = $this->pagingModel; + } + $pagingModel->set('page', $pageNumber); $duplicateSearchFields = $request->get('fields'); $dataModelInstance = Vtiger_FindDuplicate_Model::getInstance($module); $dataModelInstance->set('fields', $duplicateSearchFields); @@ -104,19 +107,9 @@ class Vtiger_FindDuplicates_View extends Vtiger_List_View { $this->rows = $dataModelInstance->getRecordCount(); $viewer->assign('TOTAL_COUNT', $this->rows); } - - $rowCount = 0; - foreach($this->listViewEntries as $group) { - foreach($group as $row) { - $rowCount++; - } - } - //for calculating the page range - for($i=0; $i<$rowCount; $i++) $dummyListEntries[] = $i; - $pagingModel->calculatePageRange($dummyListEntries); - + $viewer->assign('IGNORE_EMPTY', $ignoreEmpty); - $viewer->assign('LISTVIEW_ENTRIES_COUNT', $rowCount); + $viewer->assign('LISTVIEW_ENTRIES_COUNT', $pagingModel->recordCount); $viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders); $viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries); $viewer->assign('PAGING_MODEL', $pagingModel); @@ -154,4 +147,4 @@ class Vtiger_FindDuplicates_View extends Vtiger_List_View { $response->setResult($result); $response->emit(); } -} \ No newline at end of file +} diff --git a/modules/Vtiger/views/IndexAjax.php b/modules/Vtiger/views/IndexAjax.php index f85075f52c966c42811291af8201001b54150aa1..cd8472df5a1eba4e15a9d00a28a2c5e08c0a8029 100644 --- a/modules/Vtiger/views/IndexAjax.php +++ b/modules/Vtiger/views/IndexAjax.php @@ -15,7 +15,7 @@ class Vtiger_IndexAjax_View extends Vtiger_Index_View { $this->exposeMethod('showActiveRecords'); } - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Vtiger/views/List.php b/modules/Vtiger/views/List.php index 5c56bd5ed3076fcb21a6f62539ad1163c508e2c4..c889cb7c42e8ddb7ac914bba14984c1929cef1a8 100644 --- a/modules/Vtiger/views/List.php +++ b/modules/Vtiger/views/List.php @@ -52,14 +52,14 @@ class Vtiger_List_View extends Vtiger_Index_View { if(!empty($tag)) { $listViewSessionKey .='_'.$tag; } - - $orderParams = Vtiger_ListView_Model::getSortParamsSession($listViewSessionKey); + + $this->listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId, $listHeaders); + $orderParams = $this->listViewModel->getSortParamsSession($listViewSessionKey); if(empty($listHeaders)) { $listHeaders = $orderParams['list_headers']; } - $this->listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId, $listHeaders); $linkParams = array('MODULE'=>$moduleName, 'ACTION'=>$request->get('view')); $viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($moduleName)); $this->viewName = $request->get('viewname'); @@ -174,50 +174,57 @@ class Vtiger_List_View extends Vtiger_Index_View { $tag = $request->get('tag'); $requestViewName = $request->get('viewname'); $tagSessionKey = $moduleName.'_TAG'; + + if(!$this->listViewModel) { + $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId, $listHeaders); + } else { + $listViewModel = $this->listViewModel; + } if(!empty($requestViewName) && empty($tag)) { unset($_SESSION[$tagSessionKey]); } if(empty($tag)) { - $tagSessionVal = Vtiger_ListView_Model::getSortParamsSession($tagSessionKey); + $tagSessionVal = $listViewModel->getSortParamsSession($tagSessionKey); if(!empty($tagSessionVal)) { $tag = $tagSessionVal; } }else{ - Vtiger_ListView_Model::setSortParamsSession($tagSessionKey, $tag); + $listViewModel->setSortParamsSession($tagSessionKey, $tag); } + if(empty($cvId)) { + $customView = new CustomView(); + $cvId = $customView->getViewId($moduleName); + } + $listViewSessionKey = $moduleName.'_'.$cvId; if(!empty($tag)) { $listViewSessionKey .='_'.$tag; } - if(empty($cvId)) { - $customView = new CustomView(); - $cvId = $customView->getViewId($moduleName); - } - - $orderParams = Vtiger_ListView_Model::getSortParamsSession($listViewSessionKey); + $orderParams = $listViewModel->getSortParamsSession($listViewSessionKey); if($request->get('mode') == 'removeAlphabetSearch') { - Vtiger_ListView_Model::deleteParamsSession($listViewSessionKey, array('search_key', 'search_value', 'operator')); + $listViewModel->deleteParamsSession($listViewSessionKey, array('search_key', 'search_value', 'operator')); $searchKey = ''; $searchValue = ''; $operator = ''; } if($request->get('mode') == 'removeSorting') { - Vtiger_ListView_Model::deleteParamsSession($listViewSessionKey, array('orderby', 'sortorder')); + $listViewModel->deleteParamsSession($listViewSessionKey, array('orderby', 'sortorder')); $orderBy = ''; $sortOrder = ''; } if(empty($listHeaders)) { $listHeaders = $orderParams['list_headers']; } - - if(!empty($tag) && empty($tagParams)){ - $tagParams = $orderParams['tag_params']; + + + if(!empty($tag) && empty($tagParams)){ + $tagParams = $orderParams['tag_params']; } - + if(empty($orderBy) && empty($searchValue) && empty($pageNumber)) { if($orderParams) { $pageNumber = $orderParams['page']; @@ -226,6 +233,9 @@ class Vtiger_List_View extends Vtiger_Index_View { $searchKey = $orderParams['search_key']; $searchValue = $orderParams['search_value']; $operator = $orderParams['operator']; + if(empty($tagParams)){ + $tagParams = $orderParams['tag_params']; + } if(empty($searchParams)) { $searchParams = $orderParams['search_params']; } @@ -241,7 +251,7 @@ class Vtiger_List_View extends Vtiger_Index_View { if(!empty($listHeaders)) { $params['list_headers'] = $listHeaders; } - Vtiger_ListView_Model::setSortParamsSession($listViewSessionKey, $params); + $listViewModel->setSortParamsSession($listViewSessionKey, $params); } if($sortOrder == "ASC"){ $nextSortOrder = "DESC"; @@ -257,11 +267,6 @@ class Vtiger_List_View extends Vtiger_Index_View { $pageNumber = '1'; } - if(!$this->listViewModel) { - $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId, $listHeaders); - } else { - $listViewModel = $this->listViewModel; - } $currentUser = Users_Record_Model::getCurrentUserModel(); $linkParams = array('MODULE'=>$moduleName, 'ACTION'=>$request->get('view'), 'CVID'=>$cvId); @@ -391,7 +396,10 @@ class Vtiger_List_View extends Vtiger_Index_View { $viewer->assign('ALL_USER_TAGS', $this->allUserTags); $viewer->assign('ALL_CUSTOMVIEW_MODEL', CustomView_Record_Model::getAllFilterByModule($moduleName)); $viewer->assign('CURRENT_TAG',$tag); - $viewer->assign('SELECTED_MENU_CATEGORY', 'MARKETING'); + $appName = $request->get('app'); + if(!empty($appName)){ + $viewer->assign('SELECTED_MENU_CATEGORY',$appName); + } if (PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false)) { if(!$this->listViewCount){ $this->listViewCount = $listViewModel->getListViewCount(); @@ -412,7 +420,7 @@ class Vtiger_List_View extends Vtiger_Index_View { $viewer->assign('IS_MODULE_EDITABLE', $listViewModel->getModule()->isPermitted('EditView')); $viewer->assign('IS_MODULE_DELETABLE', $listViewModel->getModule()->isPermitted('Delete')); $viewer->assign('SEARCH_DETAILS', $searchParams); - $viewer->assign('TAG_DETAILS', $tagParams); + $viewer->assign('TAG_DETAILS', $tagParams); $viewer->assign('NO_SEARCH_PARAMS_CACHE', $request->get('nolistcache')); $viewer->assign('STAR_FILTER_MODE',$starFilterMode); $viewer->assign('VIEWID', $cvId); diff --git a/modules/Vtiger/views/ListAjax.php b/modules/Vtiger/views/ListAjax.php index 36c64b25a36e4acc0f0d95b6d4cc3e7c361b4932..70463de703124206456a499377b05e3b614773bb 100644 --- a/modules/Vtiger/views/ListAjax.php +++ b/modules/Vtiger/views/ListAjax.php @@ -30,7 +30,7 @@ class Vtiger_ListAjax_View extends Vtiger_List_View { $this->exposeMethod('searchAll'); } - function preProcess(Vtiger_Request $request) { + function preProcess(Vtiger_Request $request, $display=true) { return true; } diff --git a/modules/Vtiger/views/ListViewQuickPreview.php b/modules/Vtiger/views/ListViewQuickPreview.php index 3b0761e288628a54061948bdf9d8d6eec9e9d9bc..66e2f1ba223f8f8b20cab33afd9706a98b0db29b 100644 --- a/modules/Vtiger/views/ListViewQuickPreview.php +++ b/modules/Vtiger/views/ListViewQuickPreview.php @@ -62,7 +62,10 @@ class Vtiger_ListViewQuickPreview_View extends Vtiger_Index_View { $viewer->assign('MODULE_NAME', $moduleName); $viewer->assign('SUMMARY_RECORD_STRUCTURE', $recordStrucure->getStructure()); $viewer->assign('$SOCIAL_ENABLED', false); - $viewer->assign('SELECTED_MENU_CATEGORY', 'MARKETING'); + $appName = $request->get('app'); + if(!empty($appName)){ + $viewer->assign('SELECTED_MENU_CATEGORY',$appName); + } $viewer->assign('LIST_PREVIEW', true); $pageNumber = 1; diff --git a/modules/Vtiger/views/RecordQuickPreview.php b/modules/Vtiger/views/RecordQuickPreview.php index 3a41e56d2f7bfad19d719125fa6238b915bb14c9..98a1d751e67dd2b0fd016082b64316edb42ee7fc 100644 --- a/modules/Vtiger/views/RecordQuickPreview.php +++ b/modules/Vtiger/views/RecordQuickPreview.php @@ -41,7 +41,10 @@ class Vtiger_RecordQuickPreview_View extends Vtiger_Index_View { $viewer->assign('SUMMARY_RECORD_STRUCTURE', $recordStrucure->getStructure()); $viewer->assign('$SOCIAL_ENABLED', false); $viewer->assign('LIST_PREVIEW', true); - $viewer->assign('SELECTED_MENU_CATEGORY', 'MARKETING'); + $appName = $request->get('app'); + if(!empty($appName)){ + $viewer->assign('SELECTED_MENU_CATEGORY',$appName); + } $pageNumber = 1; $limit = 5; diff --git a/modules/Vtiger/views/RelatedList.php b/modules/Vtiger/views/RelatedList.php index 6fbc3fdcfa82b8dc93df800926f3ba966d6f62ef..128457400d3c88352a0c86d4584c11ad7d5dfabe 100644 --- a/modules/Vtiger/views/RelatedList.php +++ b/modules/Vtiger/views/RelatedList.php @@ -108,7 +108,10 @@ class Vtiger_RelatedList_View extends Vtiger_Index_View { $viewer->assign('RELATED_MODULE', $relatedModuleModel); $viewer->assign('RELATED_ENTIRES_COUNT', $noOfEntries); $viewer->assign('RELATION_FIELD', $relationField); - $viewer->assign('SELECTED_MENU_CATEGORY', 'MARKETING'); + $appName = $request->get('app'); + if(!empty($appName)){ + $viewer->assign('SELECTED_MENU_CATEGORY',$appName); + } if (PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false)) { $totalCount = $relationListView->getRelatedEntriesCount(); diff --git a/modules/com_vtiger_workflow/VTWorkflowManager.inc b/modules/com_vtiger_workflow/VTWorkflowManager.inc index eed58701890b278f6bfb9cceb26296ba02e05f36..e5c9d972ba8f5a162157cb2e7f8b866651c350cc 100644 --- a/modules/com_vtiger_workflow/VTWorkflowManager.inc +++ b/modules/com_vtiger_workflow/VTWorkflowManager.inc @@ -111,7 +111,8 @@ class VTWorkflowManager{ * @return int */ function getMaxAllowedScheduledWorkflows() { - return 10; + global $max_scheduled_workflows; + return $max_scheduled_workflows; } function getWorkflowsForModule($moduleName){ @@ -122,7 +123,7 @@ class VTWorkflowManager{ } else { //my changes $result=$adb->getColumnNames("com_vtiger_workflows"); - if(in_array(defaultworkflow,$result)){ + if(in_array('defaultworkflow',$result)){ $result = $adb->pquery("select workflow_id, module_name, summary, test, execution_condition, defaultworkflow, type, filtersavedinnew from com_vtiger_workflows where module_name=? and status=?",array($moduleName,1)); } diff --git a/modules/com_vtiger_workflow/VTWorkflowUtils.php b/modules/com_vtiger_workflow/VTWorkflowUtils.php index 2448f05bdfdd59a4633cb90c3ad9db064337b1af..f671da0e226fc35ec7e82de1bc7c5736480e4152 100644 --- a/modules/com_vtiger_workflow/VTWorkflowUtils.php +++ b/modules/com_vtiger_workflow/VTWorkflowUtils.php @@ -119,7 +119,7 @@ class VTWorkflowUtils { * @params :: $modulename - name of the module */ - function checkModuleWorkflow($modulename) { + public static function checkModuleWorkflow($modulename) { $result = true; if (in_array($modulename, array('Emails', 'Faq', 'PBXManager', 'Users')) || !getTabid($modulename)) { $result = false; diff --git a/modules/com_vtiger_workflow/WorkFlowScheduler.php b/modules/com_vtiger_workflow/WorkFlowScheduler.php index 04fbda18cd62da172830aa4951ce6dd1d4b57f82..1c4e5184dcfcbe40d609f104f7be67a3fbde6c5e 100755 --- a/modules/com_vtiger_workflow/WorkFlowScheduler.php +++ b/modules/com_vtiger_workflow/WorkFlowScheduler.php @@ -215,8 +215,22 @@ class WorkFlowScheduler { if($operation == 'has changed from') continue; $value = $condition['value']; + + $fieldname = $condition['fieldname']; + preg_match('/(\w+) : \((\w+)\) (\w+)/', $condition['fieldname'], $matches); + if (count($matches) != 0) { + list($full, $referenceField, $referenceModule, $fieldname) = $matches; + } + if($referenceField) { + $moduleName = $referenceModule; + } else { + $moduleName = $queryGenerator->getModule(); + } + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + $fieldModel = $moduleModel->getField($fieldname); + if(in_array($operation, $this->_specialDateTimeOperator())) { - $value = $this->_parseValueForDate($condition); + $value = $this->_parseValueForDate($condition, $fieldModel); } $columnCondition = $condition['joincondition']; $groupId = $condition['groupid']; @@ -294,7 +308,7 @@ class WorkFlowScheduler { * @param <Array> $condition * @return <String> */ - function _parseValueForDate($condition) { + function _parseValueForDate($condition,$fieldModel = false) { $value = $condition['value']; $operation = $condition['operation']; @@ -303,6 +317,11 @@ class WorkFlowScheduler { $admin = Users::getActiveAdminUser(); $adminTimeZone = $admin->time_zone; @date_default_timezone_set($adminTimeZone); + $fieldType = array(); + if($fieldModel){ + $dataType = $fieldModel->get('typeofdata'); + $fieldType = explode('~',$dataType); + } switch($operation) { case 'less than days ago' : //between current date and (currentdate - givenValue) @@ -367,14 +386,27 @@ class WorkFlowScheduler { $value = date('Y-m-d', strtotime('-1 days')); break; - case 'less than days later' : + case 'less than days later' : $days = $condition['value']+1; - $value = date('Y-m-d', strtotime('-1 day')).','.date('Y-m-d', strtotime('+'.$days.' days')); + if($fieldType[0] == 'D'){ + $value = date('Y-m-d').','.date('Y-m-d', strtotime('+'.$days.' days')); + }else if($fieldType[0] == 'DT'){ + $value = date('Y-m-d', strtotime('-1 day')).','.date('Y-m-d', strtotime('+'.$days.' days')); + $startDate = date('Y-m-d').' '.'00:00:00'; + $endDate = date('Y-m-d',strtotime('+'.$days.' days')).' '.'23:59:59'; + $value = $startDate.','.$endDate; + }else{ + $value = date('Y-m-d', strtotime('-1 day')).','.date('Y-m-d', strtotime('+'.$days.' days')); + } break; - + case 'more than days later' : - $days = $condition['value']-1; - $value = date('Y-m-d', strtotime('+'.$days.' days')); + $days = $condition['value']-1; + if($fieldType[0] == 'DT'){ + $value = date('Y-m-d', strtotime('+'.$days.' days')).' '.'23:59:59'; + }else{ + $value = date('Y-m-d', strtotime('+'.$days.' days')); + } break; } @date_default_timezone_set($default_timezone); diff --git a/modules/com_vtiger_workflow/edittask.php b/modules/com_vtiger_workflow/edittask.php index 0c8dc2f69b0d6ac63fe6a310d0541b84ef478bf9..2f598d9866dcec854c2d28adfd510d7f025bca58 100644 --- a/modules/com_vtiger_workflow/edittask.php +++ b/modules/com_vtiger_workflow/edittask.php @@ -115,7 +115,7 @@ require_once("VTWorkflowUtils.php"); return_module_language($current_language, 'Calendar'), return_module_language($current_language, $module->name))); $smarty->assign("APP", $app_strings); - $smarty->assign("dateFormat", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + $smarty->assign('dateFormat', parse_calendardate()); $smarty->assign("IMAGE_PATH",$image_path); $smarty->assign("THEME", $theme); $smarty->assign("MODULE_NAME", $module->label); diff --git a/modules/com_vtiger_workflow/tasks/VTSendNotificationTask.inc b/modules/com_vtiger_workflow/tasks/VTSendNotificationTask.inc index 1a6f7f3ef016a36c6b6b7f8ee670fabece0c9dbe..323cc7cc1a1dd74228853edc8647b8170ec6cc43 100644 --- a/modules/com_vtiger_workflow/tasks/VTSendNotificationTask.inc +++ b/modules/com_vtiger_workflow/tasks/VTSendNotificationTask.inc @@ -54,7 +54,7 @@ class VTSendNotificationTask extends VTEmailTask { //Including email tracking details global $site_URL, $application_unique_key; $emailId = $emailFocus->id; - $trackURL = "$site_URL/modules/Emails/actions/TrackAccess.php?record=$entityId&mailid=$emailId&app_key=$application_unique_key"; + $trackURL = Vtiger_Functions::generateTrackingURL(['record'=>$entityId,'mailid'=>$emailId, 'method'=>'open']); $content = "<img src='$trackURL' alt='' width='1' height='1'>$content"; if (stripos($content, '<img src="cid:logo" />')) { @@ -79,7 +79,7 @@ class VTSendNotificationTask extends VTEmailTask { * @param <Object> $entity * @return <Array> contents */ - public function getContents($entity) { + public function getContents($entity, $entityCache=false) { if (!$this->contents) { $util = new VTWorkflowUtils(); $admin = $util->adminUser(); diff --git a/packages/vtiger/mandatory/Tooltip.zip b/packages/vtiger/mandatory/Tooltip.zip deleted file mode 100644 index 6b49680e9df0f446e864048c7b2de4e1f7e5c597..0000000000000000000000000000000000000000 Binary files a/packages/vtiger/mandatory/Tooltip.zip and /dev/null differ diff --git a/packages/vtiger/optional/BrazilianLanguagePack_bz_bz.zip b/packages/vtiger/optional/BrazilianLanguagePack_bz_bz.zip index af5eb302d82a1010cc667e0ad3ce7d39a0ff9d71..c2c545a71d8da9127017663498b9c72f7f8ec71c 100644 Binary files a/packages/vtiger/optional/BrazilianLanguagePack_bz_bz.zip and b/packages/vtiger/optional/BrazilianLanguagePack_bz_bz.zip differ diff --git a/packages/vtiger/optional/BritishLanguagePack_br_br.zip b/packages/vtiger/optional/BritishLanguagePack_br_br.zip index 379c0bd7d33b1977dd0505c6b64cb31b5fbbf5ed..2230ab0f42907607ab4dc9736e519c61252725b2 100644 Binary files a/packages/vtiger/optional/BritishLanguagePack_br_br.zip and b/packages/vtiger/optional/BritishLanguagePack_br_br.zip differ diff --git a/packages/vtiger/optional/MexicanSpanishLanguagePack_es_mx.zip b/packages/vtiger/optional/MexicanSpanishLanguagePack_es_mx.zip index e8fd38a16238295efc6efffb3bd41fc23561a27d..9d6cf43b372b72e8a4e7e8c035481180898ab852 100644 Binary files a/packages/vtiger/optional/MexicanSpanishLanguagePack_es_mx.zip and b/packages/vtiger/optional/MexicanSpanishLanguagePack_es_mx.zip differ diff --git a/pkg/vtiger/modules/Assets/modules/Assets/Assets.php b/pkg/vtiger/modules/Assets/modules/Assets/Assets.php index ba4c6b8e26914aebdfeb6a319060be3a2607266a..817ed14412f8fd645c51cf96e83d9422550ae0ca 100644 --- a/pkg/vtiger/modules/Assets/modules/Assets/Assets.php +++ b/pkg/vtiger/modules/Assets/modules/Assets/Assets.php @@ -374,13 +374,13 @@ class Assets extends CRMEntity { $assetLabel = 'Assets'; $accountInstance = Vtiger_Module::getInstance('Accounts'); - $accountInstance->setRelatedlist($assetInstance,$assetLabel,array(ADD),'get_dependents_list'); + $accountInstance->setRelatedlist($assetInstance,$assetLabel,array('ADD'),'get_dependents_list'); $productInstance = Vtiger_Module::getInstance('Products'); - $productInstance->setRelatedlist($assetInstance,$assetLabel,array(ADD),'get_dependents_list'); + $productInstance->setRelatedlist($assetInstance,$assetLabel,array('ADD'),'get_dependents_list'); $InvoiceInstance = Vtiger_Module::getInstance('Invoice'); - $InvoiceInstance->setRelatedlist($assetInstance,$assetLabel,array(ADD),'get_dependents_list'); + $InvoiceInstance->setRelatedlist($assetInstance,$assetLabel,array('ADD'),'get_dependents_list'); $result = $adb->pquery("SELECT 1 FROM vtiger_modentity_num WHERE semodule = ? AND active = 1", array($moduleName)); if (!($adb->num_rows($result))) { diff --git a/pkg/vtiger/modules/CustomerPortal/layouts/v7/modules/Settings/CustomerPortal/resources/CustomerPortal.js b/pkg/vtiger/modules/CustomerPortal/layouts/v7/modules/Settings/CustomerPortal/resources/CustomerPortal.js index 25eab0d973e0bae78c99d19a1e2a236ff7d1c401..8364d7471535c77eacbab9109b22bc15d57d3620 100644 --- a/pkg/vtiger/modules/CustomerPortal/layouts/v7/modules/Settings/CustomerPortal/resources/CustomerPortal.js +++ b/pkg/vtiger/modules/CustomerPortal/layouts/v7/modules/Settings/CustomerPortal/resources/CustomerPortal.js @@ -141,13 +141,10 @@ Vtiger.Class('Settings_Customer_Portal_Js', {}, { }); var fieldInfo = jQuery('input[name="selectedFields_'+moduleName+'"]').val(); - if (fieldInfo != 'null' && isAllMandatoryFieldsSelected(mandatoryFields, JSON.parse(fieldInfo))) { + //Removed mandatory fields checkingRinde + if (fieldInfo != 'null') { selectedFields[moduleName] = fieldInfo; - } else { - returnFormData = false; - message = app.vtranslate('JS_MANDATORY_FIELDS_MISSING'); } - var relModuleInfo = jQuery('input[name="relatedModules_'+moduleName+'"]').val(); if (typeof relModuleInfo != 'undefined') { relatedModuleInfo[moduleName] = relModuleInfo; diff --git a/pkg/vtiger/modules/CustomerPortal/modules/CustomerPortal/CustomerPortal.php b/pkg/vtiger/modules/CustomerPortal/modules/CustomerPortal/CustomerPortal.php index 8fdc5bd75d856f5149c305fc56a010dd5edd9b02..1fec60387d0d0abf284bc87d229f8b2c80179019 100644 --- a/pkg/vtiger/modules/CustomerPortal/modules/CustomerPortal/CustomerPortal.php +++ b/pkg/vtiger/modules/CustomerPortal/modules/CustomerPortal/CustomerPortal.php @@ -33,12 +33,12 @@ class CustomerPortal { $tabId = $adb->query_result($tabIdResult, 0, 'tabid'); if($tabId) { ++$i; - $adb->query("INSERT INTO vtiger_customerportal_tabs (tabid,visible,sequence) VALUES (?, ?, ?)", array($tabId,1,$i)); - $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (?, ?, ?)", array($tabId,'showrelatedinfo',1)); + $adb->pquery("INSERT INTO vtiger_customerportal_tabs(tabid,visible,sequence) VALUES (?, ?, ?)", array($tabId,1,$i)); + $adb->pquery("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (?, ?, ?)", array($tabId,'showrelatedinfo',1)); } } - $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (?, ?, ?)", array(0,'userid',1)); + $adb->pquery("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (?, ?, ?)", array(0,'userid',1)); $adb->pquery("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (?, ?, ?)", array(0,'defaultassignee',1)); // Mark the module as Standard module diff --git a/pkg/vtiger/modules/EmailTemplates/modules/EmailTemplates/models/ListView.php b/pkg/vtiger/modules/EmailTemplates/modules/EmailTemplates/models/ListView.php index 94a8e6bcd87058d7f336a6cc2c50be2d1445106b..dda938a9c050fdbe5a7bb7d1ab3c6e865f9fe3e4 100644 --- a/pkg/vtiger/modules/EmailTemplates/modules/EmailTemplates/models/ListView.php +++ b/pkg/vtiger/modules/EmailTemplates/modules/EmailTemplates/models/ListView.php @@ -53,13 +53,14 @@ class EmailTemplates_ListView_Model extends Vtiger_ListView_Model { * @param <Number> $viewId - Custom View Id * @return Vtiger_ListView_Model instance */ - public static function getInstance($moduleName, $viewId = 0) { - $db = PearDatabase::getInstance(); - $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName); - $instance = new $modelClassName(); - - $moduleModel = Vtiger_Module_Model::getInstance($moduleName); - return $instance->set('module', $moduleModel); + public static function getInstance($moduleName, $viewId='0', $listHeaders = array()) { + list($moduleName) = func_get_args(); + $db = PearDatabase::getInstance(); + $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName); + $instance = new $modelClassName(); + + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + return $instance->set('module', $moduleModel); } /** diff --git a/pkg/vtiger/modules/Google/modules/Google/helpers/Map.php b/pkg/vtiger/modules/Google/modules/Google/helpers/Map.php index 5f44821afd2fa577b0dc20277391f9620d9d3888..92a3b575baa08a7e646ef2aa7ab65fb8be62583a 100644 --- a/pkg/vtiger/modules/Google/modules/Google/helpers/Map.php +++ b/pkg/vtiger/modules/Google/modules/Google/helpers/Map.php @@ -11,6 +11,38 @@ class Google_Map_Helper { + public function __construct() { + self::initializeSchema(); + } + + /** + * Creates table if not exists + */ + private static function initializeSchema() { + if (!Vtiger_Utils::CheckTable('vtiger_google_map')) { + // create table + Vtiger_Utils::CreateTable('vtiger_google_map', '(module varchar(255), parameter_name varchar(255), parameter_field varchar(255))', true); + // fill with defaults + $db = PearDatabase::getInstance(); + $db->pquery("INSERT INTO `vtiger_google_map` (`module`, `parameter_name`, `parameter_field`) VALUES + ('Contacts', 'street', 'mailingstreet'), + ('Contacts', 'city', 'mailingcity'), + ('Contacts', 'state','mailingstate'), + ('Contacts', 'zip', 'mailingzip'), + ('Contacts', 'country', 'mailingcountry'), + ('Leads', 'street', 'lane'), + ('Leads', 'city', 'city'), + ('Leads', 'state', 'state'), + ('Leads', 'zip', 'code'), + ('Leads', 'country', 'country'), + ('Accounts', 'street', 'bill_street'), + ('Accounts', 'city', 'bill_city'), + ('Accounts', 'state', 'bill_state'), + ('Accounts', 'zip', 'bill_code'), + ('Accounts', 'country', 'bill_country');"); + } + } + /** * get the location for the record based on the module type * @param type $request @@ -40,30 +72,33 @@ class Google_Map_Helper { * @param type $module * @return type */ - static function getLocationFields($module) { - $locationFields = array(); - switch ($module) { - case 'Contacts' : $locationFields = array('street' => 'mailingstreet', - 'city' => 'mailingcity', - 'state' => 'mailingstate', - 'zip' => 'mailingzip', - 'country' => 'mailingcountry'); - break; - case 'Leads' : $locationFields = array('street' => 'lane', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'code', - 'country' => 'country'); - break; - case 'Accounts' : $locationFields = array('street' => 'bill_street', - 'city' => 'bill_city', - 'state' => 'bill_state', - 'zip' => 'bill_code', - 'country' => 'bill_country'); - break; - } - return $locationFields; - } + static function getLocationFields($module) { + self::initializeSchema(); + $db = PearDatabase::getInstance(); + $result = $db->pquery("SELECT * FROM vtiger_google_map WHERE module='$module'"); + $number = $db->num_rows($result); + $retArray = array(); + if ($number >= 1){ + // fill return array with db values + for($i=0;$i<$number;$i++) { + $row = $db->fetch_row($result); + $retArray[$row['parameter_name']] = $row['parameter_field']; + } + } else { + // in case nothing came from db + switch ($module) { + case 'Contacts': $retArray = array('street' => 'mailingstreet', 'city' => 'mailingcity', 'state' => 'mailingstate','zip' => 'mailingzip','country' => 'mailingcountry'); + break; + case 'Leads' : $retArray = array('street' => 'lane', 'city' => 'city', 'state' => 'state', 'zip' => 'code', 'country' => 'country'); + break; + case 'Accounts' : $retArray = array('street' => 'bill_street', 'city' => 'bill_city', 'state' => 'bill_state', 'zip' => 'bill_code','country' => 'bill_country'); + break; + default : $retArray = array(); + break; + } + } + return $retArray; + } } diff --git a/pkg/vtiger/modules/Import/modules/Import/actions/Data.php b/pkg/vtiger/modules/Import/modules/Import/actions/Data.php index 30175a0f2ac61514f8a5382dd22f8e01e8e799ed..0e8185214084865f27566fbf3e5063fcd04ef96e 100644 --- a/pkg/vtiger/modules/Import/modules/Import/actions/Data.php +++ b/pkg/vtiger/modules/Import/modules/Import/actions/Data.php @@ -710,9 +710,21 @@ class Import_Data_Action extends Vtiger_Action_Controller { } $userDateFormat = $current_user->column_fields['date_format']; - if ($userDateFormat == 'dd-mm-yyyy') { + if ('dd.mm.yyyy' === $userDateFormat) { + $dateFormat = 'd.m.Y'; + } else if ('mm.dd.yyyy' === $userDateFormat) { + $dateFormat = 'm.d.Y'; + } else if ('yyyy.mm.dd' === $userDateFormat) { + $dateFormat = 'Y.m.d'; + } else if ('dd/mm/yyyy' === $userDateFormat) { + $dateFormat = 'd/m/Y'; + } else if ('mm/dd/yyyy' === $userDateFormat) { + $dateFormat = 'm/d/Y'; + } else if ('yyyy/mm/dd' === $userDateFormat) { + $dateFormat = 'Y/m/d'; + } else if ('dd-mm-yyyy' === $userDateFormat) { $dateFormat = 'd-m-Y'; - } else if ($userDateFormat == 'mm-dd-yyyy') { + } else if ('mm-dd-yyyy' === $userDateFormat) { $dateFormat = 'm-d-Y'; } else { $dateFormat = 'Y-m-d'; @@ -892,11 +904,10 @@ class Import_Data_Action extends Vtiger_Action_Controller { $vtigerMailer->AddAddress($userEmail, $userName); $vtigerMailer->Subject = $emailSubject; $vtigerMailer->Body = $emailData; - $vtigerMailer->Send(); + $vtigerMailer->Send(true); $importDataController->finishImport(); } - Vtiger_Mailer::dispatchQueue(null); } public function getNumberOfRecordsToImport($user){ diff --git a/pkg/vtiger/modules/Import/modules/Import/models/ListView.php b/pkg/vtiger/modules/Import/modules/Import/models/ListView.php index 9e6714f03eefcc93eb989867ac0d575b47850f45..ab2d5c8d0c8621474e708e528754ab97a6f56734 100644 --- a/pkg/vtiger/modules/Import/modules/Import/models/ListView.php +++ b/pkg/vtiger/modules/Import/modules/Import/models/ListView.php @@ -62,8 +62,8 @@ class Import_ListView_Model extends Vtiger_ListView_Model { $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => 'c')); } - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); if(!empty($orderBy)) { $queryGenerator = $this->get('query_generator'); $fieldModels = $queryGenerator->getModuleFields(); diff --git a/pkg/vtiger/modules/MailManager/modules/MailManager/views/Folder.php b/pkg/vtiger/modules/MailManager/modules/MailManager/views/Folder.php index 83e4ca0f0e444537747f7b1cf123a7a79720f52d..9e59d3d8e4de431967ac634a6116aef6edd63af8 100644 --- a/pkg/vtiger/modules/MailManager/modules/MailManager/views/Folder.php +++ b/pkg/vtiger/modules/MailManager/modules/MailManager/views/Folder.php @@ -62,7 +62,7 @@ class MailManager_Folder_View extends MailManager_Abstract_View { $viewer->assign('FOLDER', $folder); $viewer->assign('FOLDERLIST', $folderList); $viewer->assign('SEARCHOPTIONS' ,self::getSearchOptions()); - $viewer->assign("JS_DATEFORMAT",parse_calendardate(getTranslatedString('NTC_DATE_FORMAT'))); + $viewer->assign('JS_DATEFORMAT', parse_calendardate()); $viewer->assign('USER_DATE_FORMAT', $currentUserModel->get('date_format')); $viewer->assign('MODULE', $moduleName); $response->setResult($viewer->view( 'FolderOpen.tpl', $moduleName, true )); diff --git a/pkg/vtiger/modules/ModComments/layouts/v7/modules/ModComments/FilePreview.tpl b/pkg/vtiger/modules/ModComments/layouts/v7/modules/ModComments/FilePreview.tpl index ae89e62f20f576f970c0035e0ccbdfb1cd5bb6e4..c11c208a7f7f1127c36c32b2b56cdac66e99ea16 100644 --- a/pkg/vtiger/modules/ModComments/layouts/v7/modules/ModComments/FilePreview.tpl +++ b/pkg/vtiger/modules/ModComments/layouts/v7/modules/ModComments/FilePreview.tpl @@ -52,7 +52,7 @@ {else if $OPENDOCUMENT_FILE_TYPE eq 'yes'} <iframe id="viewer" src="libraries/jquery/Viewer.js/#../../../{$DOWNLOAD_URL}" width="100%" height="100%" allowfullscreen webkitallowfullscreen></iframe> {else if $PDF_FILE_TYPE eq 'yes'} - <iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={$SITE_URL}/{$FILE_PATH}" height="100%" width="100%"></iframe> + <iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={$SITE_URL}/{$DOWNLOAD_URL|escape:'url'}" height="100%" width="100%"></iframe> {else if $IMAGE_FILE_TYPE eq 'yes'} <div style="overflow:auto;height:100%;width:100%;float:left;background-image: url({$DOWNLOAD_URL});background-color: #EEEEEE;background-position: center 25%;background-repeat: no-repeat;display: block; background-size: contain;"></div> {else if $AUDIO_FILE_TYPE eq 'yes'} diff --git a/pkg/vtiger/modules/ModComments/modules/ModComments/actions/Save.php b/pkg/vtiger/modules/ModComments/modules/ModComments/actions/Save.php index 0fbd23762d053df6976bc97a85873472d844b67e..49a586197b9858b92aef9653ad723dc823f43956 100644 --- a/pkg/vtiger/modules/ModComments/modules/ModComments/actions/Save.php +++ b/pkg/vtiger/modules/ModComments/modules/ModComments/actions/Save.php @@ -65,7 +65,6 @@ class ModComments_Save_Action extends Vtiger_Save_Action { protected function getRecordModelFromRequest(Vtiger_Request $request) { $recordModel = parent::getRecordModelFromRequest($request); - $recordModel->set('commentcontent', $request->getRaw('commentcontent')); $recordModel->set('reasontoedit', $request->getRaw('reasontoedit')); return $recordModel; diff --git a/pkg/vtiger/modules/ModComments/modules/ModComments/actions/SaveAjax.php b/pkg/vtiger/modules/ModComments/modules/ModComments/actions/SaveAjax.php index b5e7feecda33cd3f5b0ab66c404e547d60638bf8..2a44e8dab96e5828ecfffa0d70d8866d03ecd401 100644 --- a/pkg/vtiger/modules/ModComments/modules/ModComments/actions/SaveAjax.php +++ b/pkg/vtiger/modules/ModComments/modules/ModComments/actions/SaveAjax.php @@ -73,8 +73,6 @@ class ModComments_SaveAjax_Action extends Vtiger_SaveAjax_Action { */ public function getRecordModelFromRequest(Vtiger_Request $request) { $recordModel = parent::getRecordModelFromRequest($request); - - $recordModel->set('commentcontent', $request->getRaw('commentcontent')); $recordModel->set('is_private', $request->get('is_private')); return $recordModel; diff --git a/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php b/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php index 0a02da7f8c7f47c76ef8950ba740be242a4f828e..6d8807df47e7beeca77944c5be875adc1c410da6 100644 --- a/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php +++ b/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php @@ -118,14 +118,14 @@ class ModComments_Record_Model extends Vtiger_Record_Model { if (!empty($customer)) { $recordModel = Vtiger_Record_Model::getInstanceById($customer); $imageDetails = $recordModel->getImageDetails(); - if(!empty($imageDetails)) { - return $imageDetails[0]['path'].'_'.$imageDetails[0]['name']; + if (!empty($imageDetails[0]['url'])) { + return $imageDetails[0]['url']; } else return vimage_path('CustomerPortal.png'); } else { - $imagePath = $commentor->getImageDetails(); - if (!empty($imagePath[0]['name'])) { - return $imagePath[0]['path'] . '_' . $imagePath[0]['name']; + $imageDetails = $commentor->getImageDetails(); + if (!empty($imageDetails[0]['url'])) { + return $imageDetails[0]['url']; } } } elseif ($isMailConverterType) { @@ -139,7 +139,7 @@ class ModComments_Record_Model extends Vtiger_Record_Model { * @param <Integer> $record * @return ModComment_Record_Model */ - public static function getInstanceById($record) { + public static function getInstanceById($record, $module=null) { $db = PearDatabase::getInstance(); $result = $db->pquery('SELECT vtiger_modcomments.*, vtiger_crmentity.smownerid, vtiger_crmentity.createdtime, vtiger_crmentity.modifiedtime FROM vtiger_modcomments diff --git a/pkg/vtiger/modules/ModComments/modules/ModComments/views/FilePreview.php b/pkg/vtiger/modules/ModComments/modules/ModComments/views/FilePreview.php index 79081deaea5e78a4ea7be35038ea444715dd6b07..1544016154fe750cfbe853b4916cb3975115e967 100644 --- a/pkg/vtiger/modules/ModComments/modules/ModComments/views/FilePreview.php +++ b/pkg/vtiger/modules/ModComments/modules/ModComments/views/FilePreview.php @@ -48,19 +48,15 @@ class ModComments_FilePreview_View extends Vtiger_IndexAjax_View { } } - $path = $fileDetails['path'].$fileDetails['attachmentsid'].'_'.$fileDetails['name']; $type = $fileDetails['type']; $contents = $fileContent; $filename = $fileDetails['name']; $parts = explode('.', $filename); if ($recordModel->get('filename')) { - $fileDetails = $recordModel->getFileNameAndDownloadURL($recordId, $attachmentId); - } - - if (is_array($fileDetails[0])) { - $downloadUrl = $fileDetails[0]['url']; - $trimmedFileName = $fileDetails[0]['trimmedFileName']; - } + $fileDetails = $recordModel->getFileNameAndDownloadURL($recordId, $attachmentId); + $downloadUrl = $recordModel->getDownloadFileURL($attachmentId); + $trimmedFileName = $fileDetails[0]['trimmedFileName']; + } //support for plain/text document $extn = 'txt'; @@ -86,7 +82,6 @@ class ModComments_FilePreview_View extends Vtiger_IndexAjax_View { $viewer->assign('FILE_PREVIEW_NOT_SUPPORTED', 'yes'); $viewer->assign('DOWNLOAD_URL', $downloadUrl); - $viewer->assign('FILE_PATH', $path); $viewer->assign('TRIMMED_FILE_NAME', $trimmedFileName); $viewer->assign('FILE_NAME', $filename); $viewer->assign('FILE_EXTN', $extn); diff --git a/pkg/vtiger/modules/ModTracker/modules/ModTracker/ModTrackerHandler.php b/pkg/vtiger/modules/ModTracker/modules/ModTracker/ModTrackerHandler.php index d89a94b5707160dbdec7c34168bdf2d2243ff654..dc9849a147b34cbff74ce2a68028bcf4d17aec55 100644 --- a/pkg/vtiger/modules/ModTracker/modules/ModTracker/ModTrackerHandler.php +++ b/pkg/vtiger/modules/ModTracker/modules/ModTracker/ModTrackerHandler.php @@ -13,7 +13,11 @@ require_once 'data/VTEntityDelta.php'; class ModTrackerHandler extends VTEventHandler { function handleEvent($eventName, $data) { - global $adb, $current_user; + global $adb; + $current_user_id=$_SESSION["authenticated_user_id"]; + $current_user = Users_Record_Model::getInstanceById($current_user_id, 'Users'); + $curid=$current_user->get('id'); + global $current_user; $moduleName = $data->getModuleName(); $isTrackingEnabled = ModTracker::isTrackingEnabledForModule($moduleName); if(!$isTrackingEnabled) { @@ -47,7 +51,7 @@ class ModTrackerHandler extends VTEventHandler { } $adb->pquery('INSERT INTO vtiger_modtracker_basic(id, crmid, module, whodid, changedon, status) VALUES(?,?,?,?,?,?)', Array($this->id, $recordId, $moduleName, - $current_user->id, $changedOn, $status)); + $curid, $changedOn, $status)); $inserted = true; } $adb->pquery('INSERT INTO vtiger_modtracker_detail(id,fieldname,prevalue,postvalue) VALUES(?,?,?,?)', @@ -62,7 +66,7 @@ class ModTrackerHandler extends VTEventHandler { $columnFields = $data->getData(); $id = $adb->getUniqueId('vtiger_modtracker_basic'); $adb->pquery('INSERT INTO vtiger_modtracker_basic(id, crmid, module, whodid, changedon, status) - VALUES(?,?,?,?,?,?)', Array($id, $recordId, $moduleName, $current_user->id, date('Y-m-d H:i:s',time()), ModTracker::$DELETED)); + VALUES(?,?,?,?,?,?)', Array($id, $recordId, $moduleName, $curid, date('Y-m-d H:i:s',time()), ModTracker::$DELETED)); } if($eventName == 'vtiger.entity.afterrestore') { @@ -70,7 +74,7 @@ class ModTrackerHandler extends VTEventHandler { $columnFields = $data->getData(); $id = $adb->getUniqueId('vtiger_modtracker_basic'); $adb->pquery('INSERT INTO vtiger_modtracker_basic(id, crmid, module, whodid, changedon, status) - VALUES(?,?,?,?,?,?)', Array($id, $recordId, $moduleName, $current_user->id, date('Y-m-d H:i:s',time()), ModTracker::$RESTORED)); + VALUES(?,?,?,?,?,?)', Array($id, $recordId, $moduleName, $curid, date('Y-m-d H:i:s',time()), ModTracker::$RESTORED)); } } } diff --git a/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Field.php b/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Field.php index 289a8a78fe2ff73bbafa30827d48b396b660d633..23177feff11cfe30a8faa00b1c590c43c83a2d57 100644 --- a/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Field.php +++ b/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Field.php @@ -73,7 +73,7 @@ class ModTracker_Field_Model extends Vtiger_Record_Model { * @param <type> $value * @return <String> */ - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false) { return $this->getFieldInstance()->getDisplayValue($value); } diff --git a/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Relation.php b/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Relation.php index 28219de3aa56a2b80b7e9134088d833bd7a45191..dcf11bba45e5c30183284396b021fd99db15a3d7 100644 --- a/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Relation.php +++ b/pkg/vtiger/modules/ModTracker/modules/ModTracker/models/Relation.php @@ -24,6 +24,9 @@ class ModTracker_Relation_Model extends Vtiger_Record_Model { $targetId = $this->get('targetid'); $targetModule = $this->get('targetmodule'); + if(!Users_Privileges_Model::isPermitted($targetModule, 'DetailView', $targetId)) { + return false; + } $query = 'SELECT * FROM vtiger_crmentity WHERE crmid = ?'; $params = array($targetId); $result = $db->pquery($query, $params); diff --git a/pkg/vtiger/modules/PBXManager/modules/PBXManager/PBXManager.php b/pkg/vtiger/modules/PBXManager/modules/PBXManager/PBXManager.php index 4a9262e4a4eef7a43cd71b85c4564657753c480a..b7bfa4f2574b01b285f71dfb3515383470e8789e 100644 --- a/pkg/vtiger/modules/PBXManager/modules/PBXManager/PBXManager.php +++ b/pkg/vtiger/modules/PBXManager/modules/PBXManager/PBXManager.php @@ -74,10 +74,13 @@ class PBXManager extends CRMEntity { var $default_order_by = 'customernumber'; var $default_sort_order = 'ASC'; - function PBXManager(){ + function __construct() { $this->db = PearDatabase::getInstance(); $this->column_fields = getColumnFields('PBXManager'); } + function PBXManager(){ + self::__construct(); + } /** * Invoked when special actions are performed on the module. diff --git a/pkg/vtiger/modules/PBXManager/modules/PBXManager/models/Record.php b/pkg/vtiger/modules/PBXManager/modules/PBXManager/models/Record.php index a84b38329978fb752c6920a9849c835aaeb422db..6c9a106c59c6b0d3940ae15b21603633f4fa3783 100644 --- a/pkg/vtiger/modules/PBXManager/modules/PBXManager/models/Record.php +++ b/pkg/vtiger/modules/PBXManager/modules/PBXManager/models/Record.php @@ -14,7 +14,7 @@ class PBXManager_Record_Model extends Vtiger_Record_Model{ const lookuptableName = 'vtiger_pbxmanager_phonelookup'; const entitytableName = 'vtiger_crmentity'; - static function getCleanInstance(){ + static function getCleanInstance($moduleName = ''){ return new self; } @@ -26,7 +26,7 @@ class PBXManager_Record_Model extends Vtiger_Record_Model{ $db = PearDatabase::getInstance(); $query = 'SELECT * FROM '.self::moduletableName.' AS module_table INNER JOIN '.self::entitytableName.' AS entity_table WHERE module_table.callstatus IN(?,?) AND module_table.direction=? AND module_table.pbxmanagerid=entity_table.crmid AND entity_table.deleted=0'; $result = $db->pquery($query,array('ringing','in-progress','inbound')); - $recordModels = array(); + $recordModels = $recordIds = array(); $rowCount = $db->num_rows($result); for($i=0; $i<$rowCount; $i++) { $rowData = $db->query_result_rowdata($result, $i); @@ -114,7 +114,7 @@ class PBXManager_Record_Model extends Vtiger_Record_Model{ return true; } - public static function getInstanceById($phonecallsid){ + public static function getInstanceById($phonecallsid, $module=null){ $db = PearDatabase::getInstance(); $record = new self(); $query = 'SELECT * FROM '.self::moduletableName.' WHERE pbxmanagerid=?'; diff --git a/pkg/vtiger/modules/PBXManager/templates/DetailViewHeaderTitle.tpl b/pkg/vtiger/modules/PBXManager/templates/DetailViewHeaderTitle.tpl index 6b45a82f0cf1aed60c6bb348e8f027503fd99e7d..16648e7752a4ad7b98690aec2c463886ec1751e5 100644 --- a/pkg/vtiger/modules/PBXManager/templates/DetailViewHeaderTitle.tpl +++ b/pkg/vtiger/modules/PBXManager/templates/DetailViewHeaderTitle.tpl @@ -18,8 +18,8 @@ {assign var=IMAGE_DETAILS value=$MODULE_INSTANCE->getImageDetails()} {if $IMAGE_DETAILS} {foreach key=ITER item=IMAGE_INFO from=$IMAGE_DETAILS} - {if !empty($IMAGE_INFO.path)} - <img src="{$IMAGE_INFO.path}_{$IMAGE_INFO.orgname}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" > + {if !empty($IMAGE_INFO.url)} + <img src="{$IMAGE_INFO.url}" alt="{$IMAGE_INFO.orgname}" title="{$IMAGE_INFO.orgname}" > {else} <img src="{vimage_path('summary_Contact.png')}" class="summaryImg"/> {/if} diff --git a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/DetailViewHeaderTitle.tpl b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/DetailViewHeaderTitle.tpl index 36e94c580b51373c82c08070b4d3c7d987219fe6..835fdf84b0c7daa34eda83a6071048a5e3507951 100644 --- a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/DetailViewHeaderTitle.tpl +++ b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/DetailViewHeaderTitle.tpl @@ -12,7 +12,7 @@ {strip} <div class="col-lg-6 col-md-6 col-sm-6"> <div class="record-header clearfix"> - <div class="hidden-sm hidden-xs recordImage bgproject app-{$SELECTED_MENU_CATEGORY}"> + <div class="recordImage bgproject app-{$SELECTED_MENU_CATEGORY}"> <div class="name"><span><strong> <i class="vicon-project"></i> </strong></span></div> </div> <div class="recordBasicInfo"> diff --git a/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/ListViewContents.tpl b/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/ListViewContents.tpl index 9c53f01be7f0f7d0daa1c4ecf5b59bd26cf8a264..817a191c94bcf0bddc88fa0253790bb3c973f901 100644 --- a/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/ListViewContents.tpl +++ b/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/ListViewContents.tpl @@ -65,11 +65,15 @@ </tr> {if $MODULE_MODEL->isQuickSearchEnabled() && !$SEARCH_MODE_RESULTS} - <tr class="searchRow"> + <tr class="searchRow listViewSearchContainer"> <th class="inline-search-btn"> - <div class="table-actions"> - <button class="btn btn-success btn-sm" data-trigger="listSearch">{vtranslate("LBL_SEARCH",$MODULE)}</button> - </div> + <div class="table-actions"> + <button class="btn btn-sm btn-success {if count($SEARCH_DETAILS) gt 0}hide{/if}" data-trigger="listSearch"> + <i class="fa fa-search"></i> + <span class="s2-btn-text">{vtranslate("LBL_SEARCH",$MODULE)}</span> + </button> + <button class="searchAndClearButton btn btn-sm btn-danger {if count($SEARCH_DETAILS) eq 0}hide{/if}" data-trigger="clearListSearch"><i class="fa fa-close"></i> {vtranslate("LBL_CLEAR",$MODULE)}</button> + </div> </th> {foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS} <th> diff --git a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/ListView.php b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/ListView.php index bbf2864aa2adfcba7b57cbb48e83b70c0de17ddc..e968b699bb8869e9a23915397c621724563f7a09 100644 --- a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/ListView.php +++ b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/ListView.php @@ -16,22 +16,23 @@ class RecycleBin_ListView_Model extends Vtiger_ListView_Model { * @param <Number> $viewId - Custom View Id * @return Vtiger_ListView_Model instance */ - public static function getInstance($moduleName, $sourceModule) { - $db = PearDatabase::getInstance(); - $currentUser = vglobal('current_user'); + public static function getInstance($moduleName, $viewId='0', $listHeaders = array()) { + list($moduleName, $sourceModule) = func_get_args(); + $db = PearDatabase::getInstance(); + $currentUser = vglobal('current_user'); - $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName); - $instance = new $modelClassName(); + $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName); + $instance = new $modelClassName(); - $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule); - $queryGenerator = new EnhancedQueryGenerator($sourceModuleModel->get('name'), $currentUser); - $cvidObj = CustomView_Record_Model::getAllFilterByModule($sourceModuleModel->get('name')); - $cvid = $cvidObj->getId('cvid'); - $queryGenerator->initForCustomViewById($cvid); + $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule); + $queryGenerator = new EnhancedQueryGenerator($sourceModuleModel->get('name'), $currentUser); + $cvidObj = CustomView_Record_Model::getAllFilterByModule($sourceModuleModel->get('name')); + $cvid = $cvidObj->getId('cvid'); + $queryGenerator->initForCustomViewById($cvid); - $controller = new ListViewController($db, $currentUser, $queryGenerator); + $controller = new ListViewController($db, $currentUser, $queryGenerator); - return $instance->set('module', $sourceModuleModel)->set('query_generator', $queryGenerator)->set('listview_controller', $controller); + return $instance->set('module', $sourceModuleModel)->set('query_generator', $queryGenerator)->set('listview_controller', $controller); } /** @@ -48,8 +49,8 @@ class RecycleBin_ListView_Model extends Vtiger_ListView_Model { $queryGenerator = $this->get('query_generator'); $listViewContoller = $this->get('listview_controller'); - $orderBy = $this->get('orderby'); - $sortOrder = $this->get('sortorder'); + $orderBy = $this->getForSql('orderby'); + $sortOrder = $this->getForSql('sortorder'); $searchParams = $this->get('search_params'); if(empty($searchParams)) { diff --git a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php index e24f4040776aa24ce21f5ffb0c6de8f21aebcef5..d2e4f35ccc0d99f16eaf04bdf79f32c7b35843c9 100644 --- a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php +++ b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/models/Module.php @@ -149,6 +149,10 @@ class RecycleBin_Module_Model extends Vtiger_Module_Model { $query = 'DELETE FROM vtiger_relatedlists_rb WHERE entityid in('.generateQuestionMarks($recordIds).')'; $db->pquery($query, array($recordIds)); + + // Delete related mod comments + $this->deleteRelatedComments($recordIds); + $this->deleteRelatedEmails($recordIds); // TODO - Remove records from module tables and other related stores. $query = 'DELETE FROM vtiger_modtracker_basic WHERE crmid in(' . generateQuestionMarks($recordIds) . ')'; @@ -244,4 +248,34 @@ class RecycleBin_Module_Model extends Vtiger_Module_Model { public function isQuickSearchEnabled() { return true; } + + public function deleteRelatedComments($recordIds) { + $db = PearDatabase::getInstance(); + $query = 'DELETE vtiger_crmentity.* FROM vtiger_crmentity ' + . 'INNER JOIN vtiger_modcomments ON vtiger_modcomments.modcommentsid = vtiger_crmentity.crmid ' + . 'WHERE vtiger_modcomments.related_to in(' . generateQuestionMarks($recordIds) . ')'; + + $db->pquery($query, array($recordIds)); + } + + /** + * Function to remove emails related to given records + * @param type $recordIds + */ + public function deleteRelatedEmails($recordIds) { + $db = PearDatabase::getInstance(); + /** + * we have to delete emails if email is related to any $recordIds and same email is + * not related to another record + */ + $query = "DELETE vtiger_crmentity.* FROM vtiger_crmentity INNER JOIN " + . "(SELECT vtiger_crmentity.crmid AS actid,vtiger_seactivityrel.crmid AS relid " + . "FROM vtiger_crmentity INNER JOIN vtiger_seactivityrel ON " + . "vtiger_seactivityrel.activityid=vtiger_crmentity.crmid " + . "GROUP BY vtiger_seactivityrel.activityid HAVING count(vtiger_seactivityrel.activityid) = 1)" + . " AS relationdata ON relationdata.actid=vtiger_crmentity.crmid " + . "WHERE relationdata.relid IN (" . generateQuestionMarks($recordIds) . ")"; + + $db->pquery($query, array($recordIds)); + } } diff --git a/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContracts.php b/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContracts.php index d63ec22015fd984cad18cdb1f13697c9d2fc0366..4de09bc771ab2db2476379472480108cd778b6c5 100644 --- a/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContracts.php +++ b/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContracts.php @@ -532,8 +532,11 @@ class ServiceContracts extends CRMEntity { $totalUnits = decimalFormat($this->column_fields['total_units']); $contractStatus = $this->column_fields['contract_status']; + + $checkServiceContractExistence = $this->db->pquery('SELECT if (EXISTS (select vsc.servicecontractsid from vtiger_servicecontracts vsc WHERE vsc.servicecontractsid = ?), 1, 0) AS exist_sc', array($this->id)); + $ServiceContractExistFlag = isset($checkServiceContractExistence->fields['exist_sc']) ? $checkServiceContractExistence->fields['exist_sc'] : "1"; - // Update the End date if the status is Complete or if the Used Units reaches/exceeds Total Units + // Update the End date if the status is Complete or if the Used Units reaches/exceeds Total Units // We need to do this first to make sure Actual duration is computed properly if($contractStatus == 'Complete' || (!empty($usedUnits) && !empty($totalUnits) && $usedUnits >= $totalUnits)) { if(empty($endDate)) { @@ -542,7 +545,9 @@ class ServiceContracts extends CRMEntity { } } else { $endDate = null; - $this->db->pquery('UPDATE vtiger_servicecontracts SET end_date=? WHERE servicecontractsid = ?', array(null, $this->id)); + if ( $ServiceContractExistFlag !== "0") { + $this->db->pquery('UPDATE vtiger_servicecontracts SET end_date=? WHERE servicecontractsid = ?', array(null, $this->id)); + } } // Calculate the Planned Duration based on Due date and Start date. (in days) @@ -575,7 +580,9 @@ class ServiceContracts extends CRMEntity { if(count($updateCols) > 0) { $updateQuery = 'UPDATE vtiger_servicecontracts SET '. implode(",", $updateCols) .' WHERE servicecontractsid = ?'; array_push($updateParams, $this->id); - $this->db->pquery($updateQuery, $updateParams); + if ( $ServiceContractExistFlag !== "0") { + $this->db->pquery($updateQuery, $updateParams); + } } } diff --git a/pkg/vtiger/modules/Tooltip/manifest.xml b/pkg/vtiger/modules/Tooltip/manifest.xml deleted file mode 100644 index 454ea8503db16be3ef855c890d8fefdadaa4422a..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/manifest.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version='1.0'?> -<module> - <exporttime>2009-05-15 13:19:52</exporttime> - <name>Tooltip</name> - <label>Tool Tip</label> - <parent></parent> - <type>extension</type> - <version>1.2</version> - <dependencies> - <vtiger_version>5.1.0</vtiger_version> - <vtiger_max_version>7.*</vtiger_max_version> - </dependencies> - <migrations> - <migration version='1.0'> - </migration> - </migrations> - <tables> - <table> - <name>vtiger_quickview</name> - <sql><![CDATA[CREATE TABLE `vtiger_quickview` ( - `fieldid` int(19) NOT NULL, - `related_fieldid` int(19) NOT NULL, - `sequence` int(19) NOT NULL, - `currentview` int(19) NOT NULL, - KEY `fk_1_vtiger_quickview` (`fieldid`), - CONSTRAINT `fk_1_vtiger_quickview` FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8]]></sql> - </table> - </tables> - <customlinks> - <customlink> - <linktype>HEADERSCRIPT</linktype> - <linklabel>ToolTip_HeaderScript</linklabel> - <linkurl><![CDATA[modules/Tooltip/TooltipHeaderScript.js]]></linkurl> - <linkicon><![CDATA[]]></linkicon> - <sequence>0</sequence> - </customlink> - </customlinks> -</module> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/ComputeTooltip.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/ComputeTooltip.php deleted file mode 100644 index 2433ecb79a2eb7edb9e739804eb7692133f34220..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/ComputeTooltip.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -require_once 'include/utils/CommonUtils.php'; -require_once 'include/Webservices/DescribeObject.php'; -require_once 'include/Webservices/Query.php'; -require_once 'modules/Tooltip/TooltipUtils.php'; - -global $current_user,$log; - -$modname = vtlib_purify($_REQUEST['modname']); -$id = vtlib_purify($_REQUEST['id']); -$fieldname = vtlib_purify($_REQUEST['fieldname']); -$tabid = getTabid($modname); -$result = ToolTipExists($fieldname,$tabid); -if($result !== false){ -//get tooltip information - $viewid = 1; //viewid is 1 by default - $descObject = vtws_describe($modname,$current_user); - $id = vtws_getWebserviceEntityId($modname, $id); - $sql = "select * from $modname where id ='$id';"; - $result = vtws_query($sql, $current_user); - if(empty($result)){ - exit(0); - } - $result = vttooltip_processResult($result, $descObject); - $text = getToolTipText($viewid, $fieldname,$modname,$result); - $tip = getToolTip($text); - echo $tip; -}else { - echo false; -} - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/EditQuickView.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/EditQuickView.php deleted file mode 100644 index a05a06b21f994a934d7b3081650ec27f1c6a15e1..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/EditQuickView.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/*+******************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ********************************************************************************/ - -require_once 'include/utils/utils.php'; -require_once 'modules/Tooltip/TooltipUtils.php'; - -global $mod_strings; -global $app_strings; -global $app_list_strings; - -global $adb,$currentModule; -global $theme; - -$smarty=new vtigerCRM_Smarty; - -$theme_path="themes/".$theme."/"; -$image_path=$theme_path."images/"; - -$module_name = vtlib_purify($_REQUEST['module_name']); -$field_name = vtlib_purify($_REQUEST['field_name']); - -$related_fields = getFieldList($module_name,$field_name); - -$fieldlist = array(); -$tabid = getTabid($module_name); - -$sql = "select * from vtiger_field where fieldname= ? and tabid= ? and vtiger_field.presence in (0,2)"; -$result = $adb->pquery($sql,array($field_name,$tabid)); -$fieldid = $adb->query_result($result,0,"fieldid"); - -$fieldlist[$module_name] = getRelatedFieldslist($fieldid, $related_fields); -if($_REQUEST['module_name'] != ''){ - $smarty->assign("DEF_MODULE",vtlib_purify($_REQUEST['module_name'])); -}else{ - $smarty->assign("DEF_MODULE",'Accounts'); -} - -$smarty->assign("FIELDID",$fieldid); -$smarty->assign("FIELD_INFO",$module_name); -$smarty->assign("FIELD_LISTS",$fieldlist); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("CMOD", $mod_strings); -$smarty->display(vtlib_getModuleTemplate($currentModule,'EditQuickView.tpl')); - -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/QuickView.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/QuickView.php deleted file mode 100644 index 3192277d2ad20d6c82be6490a942eaf313de3897..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/QuickView.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -require_once 'include/utils/utils.php'; -require_once 'modules/Tooltip/TooltipUtils.php'; - -global $mod_strings,$app_strings,$theme,$currentModule; -$smarty=new vtigerCRM_Smarty; -$smarty->assign("MOD",$mod_strings); -$smarty->assign("APP",$app_strings); -$smarty->assign("THEME", $theme); - -$module_array=moduleList(); -$smarty->assign("MODULES",$module_array); - -if(!empty($_REQUEST['formodule'])){ - $fld_module = vtlib_purify($_REQUEST['formodule']); -} -else{ - echo "NO MODULES SELECTED"; - exit; -} -$smarty->assign("MODULE",$fld_module); - -$fieldsDropDown = QuickViewFieldList($fld_module); -$smarty->assign("FIELDNAMES",$fieldsDropDown); - -if($_REQUEST['mode'] != ''){ - $mode = $_REQUEST['mode']; -} -$smarty->assign("MODE", $mode); -$smarty->assign("FORMODULE", $fld_module); -$smarty->assign("MOD",$mod_strings); - -$smarty->display(vtlib_getModuleTemplate($currentModule,'Quickview.tpl')); -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/SaveTooltipInformation.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/SaveTooltipInformation.php deleted file mode 100644 index 2a3a15480fa485d8cd94169d122690f6d7973e8b..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/SaveTooltipInformation.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/*+******************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ********************************************************************************/ - -/** - * Created on 09-Oct-08 - * this file saves the tooltip information - */ -$fieldid = vtlib_purify($_REQUEST['fieldid']); -$sequence = 1; - -deleteOldInfo($fieldid); -echo SaveTooltipInformation($fieldid, $sequence); - - - -/** - * this function saves the tooltip information - * @param integer $fieldid - the fieldid of the field - * @param integer $view - the current view :: 1 by default - * @param integer $sequence - the starting sequence - */ -function SaveTooltipInformation($fieldid, $sequence, $view=1){ - global $adb; - - if(empty($fieldid)){ - return "FAILURE"; - }else{ - $checkedFields = array(); - if(!empty($_REQUEST['checkedFields'])){ - $checkedFields = explode(",",$_REQUEST['checkedFields']); - //add to vtiger_quickview table - foreach($checkedFields as $checkedField){ - $query = "insert into vtiger_quickview (fieldid,related_fieldid,sequence,currentview) values (?,?,?,?)"; - $adb->pquery($query,array($fieldid, $checkedField, $sequence, $view)); - $sequence++; - } - } - $data = getDetailViewForTooltip($fieldid, $checkedFields); - return $data; - } -} - -/** - * this function deletes the old information present in quickview table for that view for that field - * @param integer $fieldid - the fieldid of the field - * @param integer $view - the view for which ot remove :: 1 by default - */ -function deleteOldInfo($fieldid, $view=1){ - global $adb; - //remove from the table - $query = "delete from vtiger_quickview where fieldid = ? and currentview = ?"; - $adb->pquery($query,array($fieldid,$view)); -} - -/** - * this function returns the detailview for tooltip - * @param integer $fieldid - the fieldid of the field for which you want the detailview - * @param array $checkedFields - the fields which are selected to be displayed in quickview - * @return string $data - the formatted quickview data - */ -function getDetailViewForTooltip($fieldid, $checkedFields){ - global $app_strings; - $labels = array(); - if(!empty($checkedFields)){ - $labels = getFieldLabels($checkedFields); - } - $smarty = new vtigerCRM_Smarty; - $smarty->assign("FIELDID", $fieldid); - $smarty->assign("APP",$app_strings); - $smarty->assign("IMAGES", "themes/images/"); - $smarty->assign("LABELS", $labels); - $smarty->assign("COUNT", count($labels)); - - $data = $smarty->fetch("modules/Tooltip/DetailQuickView.tpl"); - return $data; -} - -/** - * this function accepts the fieldids array and returns an array of field labels for them - * @param array $checkedFields - the fieldids array - * @return array $data - the fieldlabels array - */ -function getFieldLabels($checkedFields){ - global $adb; - $data = array(); - - $sql = "select * from vtiger_field where fieldid in (".generateQuestionMarks($checkedFields).") and vtiger_field.presence in (0,2)"; - $result = $adb->pquery($sql,array($checkedFields)); - $count = $adb->num_rows($result); -/** - * to fix the localization of strings - * - */ - $tabid = $adb->query_result($result, 0, "tabid"); - $module = getTabModuleName($tabid); - for($i=0;$i<$count;$i++){ - $data[] = getTranslatedString($adb->query_result($result, $i, "fieldlabel"),$module); - } - return $data; -} -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.js b/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.js deleted file mode 100644 index 028240748de11ffb969c642b718a523f511b4db5..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.js +++ /dev/null @@ -1,9 +0,0 @@ -/*+******************************************************************************* - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ******************************************************************************/ - diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.php deleted file mode 100644 index 2bf0a7af6e0722ae108e5ba08cba069bc78f0082..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/Tooltip.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - - - -class Tooltip { - - /** - * Invoked when special actions are performed on the module. - * @param String Module name - * @param String Event Type - */ - function vtlib_handler($moduleName, $eventType) { - - require_once('include/utils/utils.php'); - require_once('vtlib/Vtiger/Module.php'); - global $adb,$mod_strings; - - if($eventType == 'module.postinstall') { - - // Mark the module as Standard module - $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName)); - - $name = 'LBL_TOOLTIP_MANAGEMENT'; - $blockname = 'LBL_MODULE_MANAGER'; - $icon = 'quickview.png'; - $description = 'LBL_TOOLTIP_MANAGEMENT_DESCRIPTION'; - $links = 'index.php?module=Tooltip&action=QuickView&parenttab=Settings'; - $params = array($adb->getUniqueID('vtiger_settings_field'), getSettingsBlockId($blockname), $name, $icon, $description, $links); - - $adb->pquery("INSERT INTO vtiger_settings_field (fieldid, blockid, name, iconpath, description, linkto) - VALUES (". generateQuestionMarks($params).")", $params); - } else if($eventType == 'module.disabled') { - // TODO Handle actions when this module is disabled. - $moduleInstance = Vtiger_Module::getInstance('Tooltip'); - $moduleInstance->deleteLink('HEADERSCRIPT','ToolTip_HeaderScript','modules/Tooltip/TooltipHeaderScript.js'); - } else if($eventType == 'module.enabled') { - // TODO Handle actions when this module is enabled. - $moduleInstance = Vtiger_Module::getInstance('Tooltip'); - $moduleInstance->addLink('HEADERSCRIPT','ToolTip_HeaderScript','modules/Tooltip/TooltipHeaderScript.js'); - } else if($eventType == 'module.preuninstall') { - // TODO Handle actions when this module is about to be deleted. - } else if($eventType == 'module.preupdate') { - // TODO Handle actions before this module is updated. - } else if($eventType == 'module.postupdate') { - // TODO Handle actions after this module is updated. - } - } -} -?> \ No newline at end of file diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipAjax.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipAjax.php deleted file mode 100644 index 40de3f68cba1b208f84bb74549e178127550f861..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipAjax.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -require_once('include/Ajax/CommonAjax.php'); - -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHandler.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHandler.php deleted file mode 100644 index 5468a8f354ef7d1de6714d37ef4a333ef5ffcf55..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHandler.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -class TooltipHandler extends VTEventHandler { - - function handleEvent($eventName, $data) { - - if($eventName == 'vtiger.entity.beforesave') { - // Entity is about to be saved, take required action - } - - if($eventName == 'vtiger.entity.aftersave') { - // Entity has been saved, take next action - } - } -} - -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHeaderScript.js b/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHeaderScript.js deleted file mode 100644 index d9b94567ae181858ea3c643d2909ae7fdfef3652..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipHeaderScript.js +++ /dev/null @@ -1,107 +0,0 @@ -/*+******************************************************************************* - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ******************************************************************************/ - -var TOOLTIP = { - /** Tooltip data cache (per module, per field, per record) **/ - _cache : { }, - - _status : { }, - - _mouseOverTimeOut : 500, - - _relinguishStatusControl : false, - - show : function(node, module, fieldname, recordid) { - if(TOOLTIP._status[module][recordid][fieldname]) { - if(TOOLTIP._cache[module][fieldname][recordid]) { - var tooltipdata = TOOLTIP._cache[module][fieldname][recordid]; - tooltip.tip(node,tooltipdata,recordid,fieldname); - if(!this._relinguishStatusControl) $('status').style.display = 'none'; - } - } - }, - - hide : function(element,id,fieldname) { - tooltip.untip(element,id,fieldname); - }, - - _setStatus : function(module, fieldname, recordid, statusflag) { - if(typeof(TOOLTIP._status[module]) == 'undefined') { - TOOLTIP._status[module] = {}; - } - if(typeof(TOOLTIP._status[module][recordid]) == 'undefined') { - TOOLTIP._status[module][recordid] = {}; - } - TOOLTIP._status[module][recordid][fieldname] = statusflag; - }, - - handler : function(evtparams) { - var event_type = evtparams['event']; - var module = evtparams['module']; - var fieldname = evtparams['fieldname']; - var recordid = evtparams['recordid']; - var node = evtparams['domnode']; - if ($('status').style.display == 'block') { - this._relinguishStatusControl = true; - } - if(evtparams['event'] == 'cell.onmouseover' ) { - TOOLTIP._setStatus(module, fieldname, recordid, true); - _VT__TOOLTIP__TIMER = setTimeout(function(){TOOLTIP._showForField(node, module, fieldname,recordid)},TOOLTIP._mouseOverTimeOut); - } else if(evtparams['event'] == 'cell.onmouseout' ) { - TOOLTIP._setStatus(module, fieldname, recordid, false); - TOOLTIP.hide(node, recordid, fieldname); - clearTimeout(_VT__TOOLTIP__TIMER); - } - }, - - _showForField : function(node, module, fieldname, recordid) { - if(!this._relinguishStatusControl) $('status').style.display = 'block'; - if(typeof(TOOLTIP._cache[module]) == 'undefined') { - TOOLTIP._cache[module] = {} - } - if(TOOLTIP._cache[module][fieldname] == false) { - if(!this._relinguishStatusControl) $('status').style.display = 'none'; - return; - } - - if(typeof(TOOLTIP._cache[module][fieldname]) == 'undefined') { - TOOLTIP._cache[module][fieldname] = {} - } - - if(typeof(TOOLTIP._cache[module][fieldname][recordid]) == 'undefined') { - // Cache miss - TOOLTIP._cache[module][fieldname][recordid] = false; - new Ajax.Request( - 'index.php', - {queue : {position : 'end', scope: 'command'}, - method : 'post', - postBody: 'module=Tooltip&action=TooltipAjax&file=ComputeTooltip&fieldname='+fieldname+'&id='+recordid+'&modname='+module+'&ajax=true&submode=getTooltip', - onComplete: function(response) { - var data = response.responseText; - if(data != false){ - TOOLTIP._cache[module][fieldname][recordid] = data; - TOOLTIP.show(node, module, fieldname, recordid); - if(!this._relinguishStatusControl) $('status').style.display = 'none'; - }else{ - TOOLTIP._cache[module][fieldname] = false; - if(!this._relinguishStatusControl) $('status').style.display = 'none'; - } - } - } - ); - } else { - // Cache hit - TOOLTIP.show(node, module, fieldname, recordid); - } - } - -} - -vtlib_listview.register( 'cell.onmouseover', TOOLTIP.handler); -vtlib_listview.register( 'cell.onmouseout', TOOLTIP.handler); diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipSettings.js b/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipSettings.js deleted file mode 100644 index 81f7690919525eaa1cc406886126c9c7b38c28c4..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipSettings.js +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************************* - ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - * - ********************************************************************************/ - -/** - * this function takes a fieldname and returns the fields related to it - */ -function getRelatedFieldInfo(id){ - var modulename = $('pick_module').value; - - var fieldname = id.options[id.options.selectedIndex].value; - new Ajax.Request( - 'index.php', - {queue: {position: 'end', scope: 'command'}, - method: 'post', - postBody: 'module=Tooltip&action=TooltipAjax&file=EditQuickView&field_name='+fieldname+'&module_name='+modulename+'&parenttab=Settings&ajax=true', - onComplete: function(response) { - if(response.responseText == false){ - alert(alert_arr.ERR_FIELD_SELECTION); - }else{ - var related_fields = response.responseText; - $('fieldList').innerHTML = related_fields; - } - } - } - ); -} - -/** - * this function saves the tooltip related information in the database using an ajax call - */ -function saveTooltipInformation(fieldid, checkedFields){ - new Ajax.Request( - 'index.php', - {queue: {position: 'end', scope: 'command'}, - method: 'post', - postBody: 'module=Tooltip&action=TooltipAjax&file=SaveTooltipInformation&fieldid='+fieldid+'&checkedFields='+checkedFields+'&parenttab=Settings&ajax=true', - onComplete: function(response) { - if(response.responseText == "FAILURE"){ - alert(alert_arr.ERR_FIELD_SELECTION); - return false; - }else{ - //success - var div = document.getElementById('fieldList'); - div.innerHTML = response.responseText; - } - } - } - ); -} - -/** - * this function saves the tooltip - */ -function doSaveTooltipInfo(){ - var fieldid = document.getElementById('fieldid').value; - var div = document.getElementById('fieldList'); - var fields = div.getElementsByTagName('input'); - var checkedFields = []; - - for(var i=0, j=0;i<fields.length;i++){ - if(fields[i].type == "checkbox" && fields[i].checked == true){ - checkedFields[j++] = fields[i].value; - } - } - relatedFields = checkedFields.join(","); - saveTooltipInformation(fieldid, relatedFields); -} - -/** - * this function takes a fieldid and displays the quick editview for that field - */ -function displayEditView(){ - var node = document.getElementById('pick_field'); - getRelatedFieldInfo(node); -} diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipUtils.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipUtils.php deleted file mode 100644 index c573d758803acc04e829e2c88c3a46704a4fe199..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/TooltipUtils.php +++ /dev/null @@ -1,267 +0,0 @@ -<?php -/*+******************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ********************************************************************************/ - -require_once 'include/Webservices/DescribeObject.php'; -require_once 'include/Webservices/Utils.php'; -require_once 'include/Webservices/Query.php'; -require_once 'include/utils/CommonUtils.php'; -require_once 'include/Webservices/ModuleTypes.php'; - -/** - * this function returns the fields for a given module - */ -function getFieldList($module_name, $field_name = "") { - global $adb; - $tabid = getTabid($module_name); - - $query = "select * from vtiger_field where tabid = ?"; - $params = array($tabid); - if (!empty ($field_name)) { - $query .= " and fieldname not like ?"; - $params = array($tabid,$field_name); - } - $query.= " and columnname not like 'imagename' and uitype not in (61, 122) and vtiger_field.presence in (0,2)"; - $result = $adb->pquery($query, $params); - while ($fieldinfo = $adb->fetch_array($result)) { - $fields[] = array ( - "fieldlabel" => getTranslatedString($fieldinfo['fieldlabel'], $module_name), - "fieldname" => $fieldinfo['fieldname'], - "fieldid" => $fieldinfo['fieldid'] - ); - } - return $fields; -} - -/** - * this function returns the fields related to a field - * @param array $result -- mysql query result that contains the field information - * @param array $lang_strings -- language strings array - */ -function getRelatedFieldsList($fieldid, $related_fields) { - global $adb; - $relatedFieldsArray = array(); - foreach ($related_fields as $related_field) { - $temp_relatedfield = array(); - $related_fieldid = $related_field['fieldid']; - $related_fieldname = $related_field['fieldname']; - $related_fieldlabel = $related_field['fieldlabel']; - - if (tooltip_exists($fieldid, $related_fieldid)) { - $visible = "checked"; - } else { - $visible = ""; - } - $temp_relatedfield['fieldlabel'] = $related_fieldlabel; - $temp_relatedfield['input'] = "<input type='checkbox' value='$related_fieldid' name='$related_fieldid' $visible>"; - $temp_relatedfield['fieldid'] = $related_fieldid; - $temp_relatedfield['fieldname'] = $related_fieldname; - $relatedFieldsArray[] = $temp_relatedfield; - } - - $relatedFieldsArray = array_chunk($relatedFieldsArray, 4); - return $relatedFieldsArray; -} - -/** - * function to get the module names - * @return - all module names other than Calendar and Events - */ -function moduleList() { - global $adb; - $sql = "select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_field.tabid=vtiger_tab.tabid where name not in ('Calendar','Events','Users')"; - $result = $adb->pquery($sql, array ()); - while ($moduleinfo = $adb->fetch_array($result)) { - $modulelist[$moduleinfo['name']] = getTranslatedString($moduleinfo['name']); - } - return $modulelist; -} - -/** - * this function determines if a given field has the related field already present in the tooltip - */ -function tooltip_exists($fieldid, $related_fieldid) { - global $adb; - $query = "select * from vtiger_quickview where fieldid=? and related_fieldid=?"; - $result = $adb->pquery($query, array ($fieldid,$related_fieldid)); - - if ($adb->num_rows($result) > 0) { - return true; - } else { - return false; - } -} - -/** - * function to return the tooltip information - * @param int $view - there can be multiple tooltips for a single module; this variable decides which is for which field - * @param int $tabid - tabid of the field for which the tooltip has to be fetched - * @param int $id - this is the crmid of the record - * returns the tooltip string - */ -function getToolTipText($view,$fieldname,$module,$value){ - global $adb,$app_strings; - $keys = array_keys($value[0]); - //getting the quickview list here - $fieldlabel = Array(); - $fieldid = getFieldid(getTabid($module), $fieldname); - $quickview = 'select fieldname,fieldlabel from vtiger_quickview inner join vtiger_field on vtiger_quickview.related_fieldid=vtiger_field.fieldid where vtiger_quickview.fieldid = ? and currentview= ? and vtiger_field.presence in (0,2) order by vtiger_quickview.sequence'; - $result = $adb->pquery($quickview,array($fieldid,$view)); - $count = $adb->num_rows($result); - - $text=array(); - $fieldname = Array(); - for($i=0;$i<$count;$i++){ - $fieldname = $adb->query_result($result,$i,"fieldname"); - - if(in_array($fieldname, $keys)){ - $fieldlabel = $adb->query_result($result,$i,"fieldlabel"); - $label = getTranslatedString($fieldlabel,$module); - $fieldvalue = $value[0][$fieldname]; - if(empty($fieldvalue)) { - $fieldvalue = ' '; - } - if(strlen($fieldvalue)>35){ - $fieldvalue = substr($fieldvalue,0,35).'...'; - } - $text[$label] = $fieldvalue; - } - } - return $text; -} - -/** - * this function accepts the tooltip text and returns it after formatting - * @param $text - the tooltip text which is to be formatted - * @param $format - the format in which tooltip has to be formatted; default value will be each entry in single line - */ -function getToolTip($text,$format = "default"){ - $smarty = new vtigerCRM_Smarty; - $tip = ""; - if(trim(implode('', $text)) == ''){ - return $tip; - } - - $smarty->assign("TEXT",$text); - $tip = $smarty->fetch("modules/Tooltip/$format.tpl"); - return $tip; -} - -/** - * this function checks if tooltip exists for a given field or not - */ -function ToolTipExists($fieldname,$tabid){ - if(empty($fieldname) || empty($tabid)){ - return false; - }else{ - global $adb; - $sql = "select fieldid from vtiger_field where tabid = ? and fieldname = ? and vtiger_field.presence in (0,2)"; - $result = $adb->pquery($sql,array($tabid,$fieldname)); - $count = $adb->num_rows($result); - if($count > 0){ - $fieldid = $adb->query_result($result,0,'fieldid'); - - $sql = "select * from vtiger_quickview where fieldid = ?"; - $result = $adb->pquery($sql, array($fieldid)); - - if($adb->num_rows($result) > 0){ - return $fieldid; - }else{ - return false; - } - }else{ - return false; - } - } -} - -/** - * this function processes the given result and returns the value :: for now we are getting the values for the - * reference, owner fields, booleans and currency fields; other processing might be added later if required - * @param array $result - the webservices result object - * @param array $descObj - the webservices describe object - * @return array $result - the processes webservices result object - */ -function vttooltip_processResult($result, $descObj){ - global $current_user; - foreach($descObj['fields'] as $field){ - $name = $field['name']; - $value = $result[0][$name]; - if($field['type']['name'] == 'reference'){ - $name = $field['name']; - - if(!empty($value)){ - $result[0][$name] = vtws_getName($value,$current_user); - }else{ - $result[0][$name] = ''; - } - }elseif($field['type']['name'] == 'owner'){ - list($info, $id) = explode("x",$value); - $result[0][$name] = getOwnerName($id); - }elseif($field['type']['name'] == 'boolean'){ - if($result[0][$name] == 1){ - $result[0][$name] = "on"; - }else{ - $result[0][$name] = "off"; - } - }elseif($field['type']['name'] == 'picklist'){ - $temp = ''; - foreach($field['type']['picklistValues'] as $value){ - if(strcmp($value['value'],$result[0][$name])== 0){ - $temp = $value['value']; - } - } - $result[0][$name] = $temp; - } elseif($field['type']['name'] == 'date') { - $result[0][$name] = DateTimeField::convertToUserFormat($value); - } elseif($field['type']['name'] == 'datetime') { - $date = new DateTimeField($value); - $result[0][$name] = $date->getDisplayDateTimeValue(); - } elseif($field['type']['name'] == 'time') { - $date = new DateTimeField($value); - $result[0][$name] = $date->getDisplayTime(); - } elseif($field['type']['name'] == 'currency') { - $currencyField = new CurrencyField($value); - $result[0][$name] = $currencyField->getDisplayValueWithSymbol(); - } - } - return $result; -} - - -/** - * this function returns the fields for a given module in a select dropdown format - * @param string $module - the module name - * @return the fields in a select dropdown if fields exist else a blank value - */ -function QuickViewFieldList($module){ - global $adb, $app_strings,$mod_strings; - - $tabid = getTabid($module); - - $query = "select * from vtiger_field where tabid = ? and columnname not like 'imagename' and uitype not in (61, 122) and vtiger_field.presence in (0,2)"; - $result = $adb->pquery($query,array($tabid)); - if($adb->num_rows($result)>0){ - $fieldlist = '<select onchange="getRelatedFieldInfo(this)" class="importBox" id="pick_field" name="pick_field">'; - $fieldlist.= '<option value="" disabled="true" selected>' - .$app_strings['LBL_SELECT'].' '. $mod_strings['LBL_FIELD'].' - </option>'; - while($fieldsinfo=$adb->fetch_array($result)){ - $fieldlabel = $fieldsinfo['fieldlabel']; - $fieldname = $fieldsinfo['fieldname']; - $fieldlist.= "<option value='$fieldname'>".getTranslatedString($fieldlabel, $module)."</option>"; - } - $fieldlist.= '</select>'; - return $fieldlist; - }else{ - return ''; - } -} - -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/index.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/index.php deleted file mode 100644 index 0b11eea8528842537f736de49ddcf50a35c80210..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/index.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ -global $currentModule; - -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/language/en_us.lang.php b/pkg/vtiger/modules/Tooltip/modules/Tooltip/language/en_us.lang.php deleted file mode 100644 index fe62bea2d9e67725b969f4e1c1b1d05b1f6e0932..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/language/en_us.lang.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -$mod_strings = Array ( -'Tooltip' => 'ToolTip', -'LBL_TOOLTIP_MANAGEMENT'=>'Tooltip Management', -'LBL_TOOLTIP_MANAGEMENT_DESCRIPTION'=>'Manage the tooltip information from here', -'LBL_FIELDS_IN'=>'Fields in', -'LBL_TOOLTIP_HELP_TEXT'=>'Select the fields that you would like to be displayed as tooltip', -'LBL_FIELD'=>'Field', - -); - -?> diff --git a/pkg/vtiger/modules/Tooltip/modules/Tooltip/schema.xml b/pkg/vtiger/modules/Tooltip/modules/Tooltip/schema.xml deleted file mode 100644 index ed43cabcd2cb1146830cda1a3a5ba96a40021d64..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/modules/Tooltip/schema.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0'?> -<schema> - <tables> - <table> - <name>vtiger_quickview</name> - <sql><![CDATA[CREATE TABLE `vtiger_quickview` ( - `fieldid` int(19) NOT NULL, - `related_fieldid` int(19) NOT NULL, - `sequence` int(19) NOT NULL, - `view` int(19) NOT NULL, - CONSTRAINT fk_1_vtiger_quickview FOREIGN KEY (`fieldid`) REFERENCES `vtiger_field` (`fieldid`) ON DELETE CASCADE - )]]></sql> - </table> - </tables> -</schema> diff --git a/pkg/vtiger/modules/Tooltip/templates/DetailQuickView.tpl b/pkg/vtiger/modules/Tooltip/templates/DetailQuickView.tpl deleted file mode 100644 index 11f17e95de9605feaf42b31f26bf21c55b3c1683..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/templates/DetailQuickView.tpl +++ /dev/null @@ -1,65 +0,0 @@ -<script language="JavaScript" type="text/javascript" src="modules/Tooltip/TooltipSettings.js"></script> -<br> -<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%"> -<tbody><tr> - <td valign="top"><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td> - <td valign="top" width="100%"> - <div align=center> - <table border=0 cellspacing=0 cellpadding=5 width=100% class="settingsSelUITopLine"> - </table> - - <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading"> - <tr> - <td class="small" align=right width="100%"> - <input title="edit" class="crmButton small edit" type="button" name="edit" onClick="displayEditView({$FIELDID});" value="{$APP.LBL_EDIT_BUTTON}"> - </td> - </tr> - </table> - - <div id="{$module}_fields" style="display:block"> - <table cellspacing=0 cellpadding=5 width=100% class="listTable small"> - <tr> - <td valign=top width="25%" > - {if $COUNT eq 0} - No Fields Selected. - </td> - {else} - {foreach item=label from=$LABELS name=itr} - {assign var=count value=$smarty.foreach.itr.iteration} - <table border=0 cellspacing=0 cellpadding=5 width=100% class=small> - <tr> - <td width="25%" onMouseOver="this.className='prvPrfHoverOn';" onMouseOut="this.className='prvPrfHoverOff';"> - <table cellpadding="0" cellspacing="0"> - <tr> - <td> - <img src="{'prvPrfSelectedTick.gif'|@vtiger_imageurl:$THEME}"> - - </td> - <td> - {$label} - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - <td> - {if $count mod 4 eq 0} - </td></tr><tr><td> - {/if} - {/foreach} - {/if} - </td> - </tr> - </table> - </div> - </form> - </div> - </td> - <td valign="top"> - <img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"> - </td> - </tr> -</tbody> -</table> diff --git a/pkg/vtiger/modules/Tooltip/templates/EditQuickView.tpl b/pkg/vtiger/modules/Tooltip/templates/EditQuickView.tpl deleted file mode 100644 index 02aa0ce4b02a79b6e0bad07cd2e4228bad1d1082..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/templates/EditQuickView.tpl +++ /dev/null @@ -1,65 +0,0 @@ -<script language="JavaScript" type="text/javascript" src="modules/Tooltip/TooltipSettings.js"></script> -<br> -<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%"> -<tbody><tr> - <td valign="top"><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td> - <td valign="top" width="100%"> - <div align=center> - <table border=0 cellspacing=0 cellpadding=5 width=100% class="settingsSelUITopLine"> - <form action="index.php" method="post" name="new" id="form" onsubmit="VtigerJS_DialogBox.block();"> - <input type="hidden" id="fieldid" name="fieldid" value="{$FIELDID}"> - <input type="hidden" name="" value=""> - </table> - - <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading"> - <tr> - <td class="small" align="left" nowrap> - <strong> - {$MOD.LBL_TOOLTIP_HELP_TEXT} - </strong> - </td> - <td class="small" align="right" width="100%"> - <input title="save" class="crmButton small save" type="button" name="save" onClick="doSaveTooltipInfo();" value="{$APP.LBL_SAVE_BUTTON_LABEL}"> - </td> - <td class="small" align="right"> - <input title="back" class="crmButton small cancel" type="button" name="Back" onClick="window.history.back();" value="{$APP.LBL_BACK}"> - </td> - </tr> - </table> - - {foreach key=module item=info from=$FIELD_LISTS} - <div id="{$module}_fields" style="display:block"> - <table cellspacing=0 cellpadding=5 width=100% class="listTable small"> - <tr> - <td valign=top width="25%" > - <table border=0 cellspacing=0 cellpadding=5 width=100% class=small> - {foreach item=elements name=groupfields from=$info} - <tr> - {foreach item=elementinfo name=curvalue from=$elements} - <td class="prvPrfTexture" style="width:20px"> - - </td> - <td width="5%" id="{$smarty.foreach.groupfields.iteration}_{$smarty.foreach.curvalue.iteration}"> - {$elementinfo.input} - </td> - <td width="25%" nowrap onMouseOver="this.className='prvPrfHoverOn',$('{$smarty.foreach.groupfields.iteration}_{$smarty.foreach.curvalue.iteration}').className='prvPrfHoverOn'" onMouseOut="this.className='prvPrfHoverOff',$('{$smarty.foreach.groupfields.iteration}_{$smarty.foreach.curvalue.iteration}').className='prvPrfHoverOff'"> - {$elementinfo.fieldlabel} - </td> - {/foreach} - </tr> - {/foreach} - </table> - </td> - </tr> - </table> - </div> - {/foreach} - </form> - </div> - </td> - <td valign="top"> - <img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"> - </td> - </tr> -</tbody> -</table> diff --git a/pkg/vtiger/modules/Tooltip/templates/Quickview.tpl b/pkg/vtiger/modules/Tooltip/templates/Quickview.tpl deleted file mode 100644 index a169623247d1290544b986a5ccc9fc74a4142cf8..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/templates/Quickview.tpl +++ /dev/null @@ -1,64 +0,0 @@ -<script language="JavaScript" type="text/javascript" src="modules/Tooltip/TooltipSettings.js"></script> -<br /> -<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%"> -<tbody><tr> - <td valign="top"><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td> - <td class="showPanelBg" style="padding: 10px;" valign="top" width="100%"> - <br> - - <div align=center> - {include file='SetMenu.tpl'} - <table class="settingsSelUITopLine" border="0" cellpadding="5" cellspacing="0" width="100%"> - <tbody> - <tr> - <td rowspan="2" valign="top" width="50"><img src="{'quickview.png'|@vtiger_imageurl:$THEME}" alt="{$MOD.LBL_USERS}" title="{$MOD.LBL_USERS}" border="0" height="48" width="48"></td> - <td class="heading2" valign="bottom"> - - <b><a href="index.php?module=Settings&action=ModuleManager&parenttab=Settings">{'VTLIB_LBL_MODULE_MANAGER'|@getTranslatedString:'Settings'}</a> > - <a href="index.php?module=Settings&action=ModuleManager&module_settings=true&formodule={$FORMODULE}&parenttab=Settings">{$FORMODULE|@getTranslatedString:$FORMODULE}</a> > - {$MOD.LBL_TOOLTIP_MANAGEMENT} - </tr> - - <tr> - <td class="small" valign="top">{$MOD.LBL_TOOLTIP_MANAGEMENT_DESCRIPTION}</td> - </tr> - </tbody> - </table> - - <br> - <input type="hidden" id="pick_module" value="{$MODULE}"> - <table border="0" cellpadding="10" cellspacing="0" width="100%"> - <tbody> - <tr> - <td> - <table class="tableHeading" border="0" cellpadding="5" cellspacing="0" width="100%"> - <tbody><tr> - <td width='20%'> - <strong><span id="field_info">{$APP.LBL_SELECT} {$MOD.LBL_FIELD}: </span></strong> - </td> - <td id='pick_field_list'> - {$FIELDNAMES} - </td> - </tr> - </tbody> - </table> - - - <div id="fieldList"> - </div> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - </table> - </div> - </td> - <td valign="top"><img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"></td> - </tr> -</tbody> -</table> -<br> diff --git a/pkg/vtiger/modules/Tooltip/templates/default.tpl b/pkg/vtiger/modules/Tooltip/templates/default.tpl deleted file mode 100644 index dac9c17cb8a2fed26419e1249fbd653501e7a778..0000000000000000000000000000000000000000 --- a/pkg/vtiger/modules/Tooltip/templates/default.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{*<!-- this template file creates the tooltip information from a given text. -this is the default template for tooltip. it presents the tooltip information in -a linear way, i.e. makes the fieldlabel bold and put the value after it. -e.g. <b>fieldlabel:</b> fieldvalue-->*} - -{assign var=tip value=""} -{foreach key=label item=value from=$TEXT} - {assign var=tip value="$tip<b>$label:</b> $value<br>"} -{/foreach} -{$tip} diff --git a/pkg/vtiger/modules/Webforms/settings/models/Field.php b/pkg/vtiger/modules/Webforms/settings/models/Field.php index eb1383223bf927ea6bdd7fe19072ef4ed5b995de..7037cbf1dac3423f3e38b2bd2d3e3a293a26cc57 100644 --- a/pkg/vtiger/modules/Webforms/settings/models/Field.php +++ b/pkg/vtiger/modules/Webforms/settings/models/Field.php @@ -82,7 +82,7 @@ class Settings_Webforms_Field_Model extends Vtiger_Field_Model { return $this->getPicklistValues(); } - public function getDisplayValue($value) { + public function getDisplayValue($value, $record=false, $recordInstance = false) { if ($this->getName() === 'enabled') { $moduleName = 'Settings:Webforms'; if ($value) { @@ -93,7 +93,7 @@ class Settings_Webforms_Field_Model extends Vtiger_Field_Model { return parent::getDisplayValue($value); } - public function getPermissions() { + public function getPermissions($accessmode = 'readonly') { return true; } diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/manifest.xml b/pkg/vtiger/translations/BritishLanguagePack_br_br/manifest.xml index ef66d56bddf3ebfd32e2a359fe6d35678f7abc84..a49d709f04d4e08d95bf47c15e8e328c09470139 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/manifest.xml +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/manifest.xml @@ -4,7 +4,7 @@ <name>British English</name> <label>British English</label> <prefix>en_gb</prefix> - <version>1.0.0</version> + <version>1.0.1</version> <dependencies> <vtiger_version>6.1.0</vtiger_version> <vtiger_max_version>7.*</vtiger_max_version> @@ -20,7 +20,7 @@ * All Rights Reserved. ******************************************************************************** * Language : British English - * Version : 1.0.0 + * Version : 1.0.1 * Author : Alan Lord. Libertus Solutions - http://www.libertus.co.uk ******************************************************************************** ]]></inline> diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Accounts.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Accounts.php index 71081899d0bbd3e9a59276ac9913592ad887b5cc..f59d372df3ae0a22b817e29c98c1ae2a41a8d8b8 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Accounts.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Accounts.php @@ -10,7 +10,7 @@ $languageStrings = array( 'Accounts' => 'Organisations' , 'SINGLE_Accounts' => 'Organisation' , - 'LBL_ADD_RECORD' => 'Add Organization' , + 'LBL_ADD_RECORD' => 'Add Organisation' , 'LBL_RECORDS_LIST' => 'Organisation List' , 'LBL_ACCOUNT_INFORMATION' => 'Organisation Information' , 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Show Organisation Hierarchy' , @@ -34,11 +34,11 @@ $languageStrings = array( 'Reseller' => 'Reseller' , 'LBL_START_DATE' => 'Start Date' , 'LBL_END_DATE' => 'End Date' , - 'LBL_DUPLICATES_EXIST' => 'Organization Name already exists', - 'LBL_COPY_SHIPPING_ADDRESS' => 'Copy Shipping Address' , // TODO: Review - 'LBL_COPY_BILLING_ADDRESS' => 'Copy Billing Address' , // TODO: Review + 'LBL_DUPLICATES_EXIST' => 'Organisation Name already exists', + 'LBL_COPY_SHIPPING_ADDRESS' => 'Copy Delivery Address' , // TODO: Review + 'LBL_COPY_BILLING_ADDRESS' => 'Copy Invoice Address' , // TODO: Review 'LBL_IMAGE_INFORMATION' => 'Profile Picture', - 'Organization Image' => 'Organization Image', + 'Organization Image' => 'Organisation Image', 'Type' => 'Type' , 'Other Phone' => 'Secondary Phone', @@ -48,9 +48,9 @@ $languageStrings = array( ); $jsLanguageStrings = array( 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => 'Are you sure you want to Delete?', - 'LBL_DELETE_CONFIRMATION' => 'Deleting this Organization will remove its related Opportunities & Quotes. Are you sure you want to delete this Organization?', - 'LBL_MASS_DELETE_CONFIRMATION' => 'Deleting this Organization will remove its related Opportunities & Quotes. Are you sure you want to delete this Organization?', + 'LBL_DELETE_CONFIRMATION' => 'Deleting this Organisation will remove its related Opportunities & Quotes. Are you sure you want to delete this Organisation?', + 'LBL_MASS_DELETE_CONFIRMATION' => 'Deleting this Organisation will remove its related Opportunities & Quotes. Are you sure you want to delete this Organisation?', - 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organization Name already Exists.Do you want to create a duplicate record?', + 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organisation Name already Exists.Do you want to create a duplicate record?', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Contacts.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Contacts.php index b7147edfd8b2b1ecfdc5b4dc0a31f93f061db160..27d06ef4f77ea4dd918435f1080aba0cfb522352 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Contacts.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Contacts.php @@ -15,8 +15,8 @@ $languageStrings = array( 'LBL_CONTACT_INFORMATION' => 'Contact Information' , 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Customer Portal Information' , 'LBL_IMAGE_INFORMATION' => 'Contact Image Information:' , - 'LBL_COPY_OTHER_ADDRESS' => 'Copy Other Address' , // TODO: Review - 'LBL_COPY_MAILING_ADDRESS' => 'Copy Mailing Address' , // TODO: Review + 'LBL_COPY_OTHER_ADDRESS' => 'Copy Delivery Address' , // TODO: Review + 'LBL_COPY_MAILING_ADDRESS' => 'Copy Invoice Address' , // TODO: Review 'Office Phone' => 'Office Phone' , 'Home Phone' => 'Home Phone' , 'Title' => 'Job Title' , @@ -33,13 +33,13 @@ $languageStrings = array( 'Mailing State' => 'Invoice County' , 'Mailing Zip' => 'Invoice Postcode' , 'Mailing Country' => 'Invoice Country' , - 'Mailing Po Box' => 'Mailing P.O. Box' , + 'Mailing Po Box' => 'Invoice P.O. Box' , 'Other Street' => 'Delivery Street' , 'Other City' => 'Delivery City' , 'Other State' => 'Delivery County' , 'Other Zip' => 'Delivery Postcode' , 'Other Country' => 'Delivery Country' , - 'Other Po Box' => 'Other P.O. Box' , + 'Other Po Box' => 'Delivery P.O. Box' , 'Contact Image' => 'Contact Image' , 'Mr.' => 'Mr.' , 'Ms.' => 'Ms.' , @@ -57,4 +57,4 @@ $languageStrings = array( ); $jsLanguageStrings = array( -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/PurchaseOrder.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/PurchaseOrder.php index 49152686a530ff27ad196e20a97a0365363b9533..b6d30c54aa3909f7bd2cea996345a53d57f85a66 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/PurchaseOrder.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/PurchaseOrder.php @@ -14,8 +14,8 @@ $languageStrings = array( 'LBL_SEND_MAIL_PDF' => 'Send Email with PDF' , // TODO: Review 'LBL_ADD_RECORD' => 'Add Purchase Order' , 'LBL_RECORDS_LIST' => 'Purchase Order List' , - 'LBL_COPY_SHIPPING_ADDRESS' => 'Copy Shipping Address' , // TODO: Review - 'LBL_COPY_BILLING_ADDRESS' => 'Copy Billing Address' , // TODO: Review + 'LBL_COPY_SHIPPING_ADDRESS' => 'Copy Delivery Address' , // TODO: Review + 'LBL_COPY_BILLING_ADDRESS' => 'Copy Invoice Address' , // TODO: Review 'LBL_PO_INFORMATION' => 'Purchase Order Information' , 'PurchaseOrder No' => 'Purchase Order No.' , 'Requisition No' => 'Requisition No.' , @@ -27,11 +27,11 @@ $languageStrings = array( 'LBL_LIST_PRICE' => 'List Price', 'List Price' => 'List Price', 'LBL_COPY_COMPANY_ADDRESS' => 'Copy Company Address', - 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copy Organization Address', + 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copy Organisation Address', 'LBL_SELECT_ADDRESS_OPTION' => 'Select Address to copy', - 'LBL_BILLING_ADDRESS' => 'Billing Address', + 'LBL_BILLING_ADDRESS' => 'Invoice Address', 'LBL_COMPANY_ADDRESS' => 'Company Address', - 'LBL_ACCOUNT_ADDRESS' => 'Organization Address', + 'LBL_ACCOUNT_ADDRESS' => 'Organisation Address', 'LBL_VENDOR_ADDRESS' => 'Vendor Address', 'LBL_CONTACT_ADDRESS' => 'Contact Address', @@ -42,15 +42,15 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_ORGANIZATION_NOT_FOUND'=> 'Organization empty', - 'JS_ORGANIZATION_NOT_FOUND_MESSAGE'=> 'Please select an organization before you copy address', - 'JS_ACCOUNT_NOT_FOUND' => 'Organization empty!', - 'JS_ACCOUNT_NOT_FOUND_MESSAGE' => 'Please select an organization before you copy address', + 'JS_ORGANIZATION_NOT_FOUND'=> 'Organisation empty', + 'JS_ORGANIZATION_NOT_FOUND_MESSAGE'=> 'Please select an organisation before you copy the address', + 'JS_ACCOUNT_NOT_FOUND' => 'Organisation empty!', + 'JS_ACCOUNT_NOT_FOUND_MESSAGE' => 'Please select an organisation before you copy the address', 'JS_VENDOR_NOT_FOUND' => 'Vendor Empty', - 'JS_VENDOR_NOT_FOUND_MESSAGE' => 'Please select an vendor before you copy address', + 'JS_VENDOR_NOT_FOUND_MESSAGE' => 'Please select a vendor before you copy the address', 'JS_CONTACT_NOT_FOUND' => 'Contact Empty', - 'JS_CONTACT_NOT_FOUND_MESSAGE' => 'Please select an contact before you copy address', + 'JS_CONTACT_NOT_FOUND_MESSAGE' => 'Please select a contact before you copy the address', 'JS_PLEASE_REMOVE_LINE_ITEM_THAT_IS_DELETED' => 'Please remove line item that is deleted', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php index 5a2bf40058ae64d8af6b16aa15d03d53d82f18a4..27aa2d4334ce364fbd26943e4112a6b8c6df366e 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php @@ -246,10 +246,10 @@ $languageStrings = array( 'LBL_MORE_CURRENCIES' => 'more currencies' , 'LBL_SET_TAX_FOR' => 'Set Tax for' , // TODO: Review 'LBL_GROUP_TAX' => 'Group Tax' , // TODO: Review - 'LBL_BILLING_ADDRESS_FROM' => 'Copy Billing Address from' , // TODO: Review - 'LBL_SHIPPING_ADDRESS_FROM' => 'Copy Shipping Address from' , // TODO: Review - 'LBL_COPY_SHIPPING_ADDRESS' => 'Shipping Address' , // TODO: Review - 'LBL_COPY_BILLING_ADDRESS' => 'Billing Address' , // TODO: Review + 'LBL_BILLING_ADDRESS_FROM' => 'Copy Invoice Address from' , // TODO: Review + 'LBL_SHIPPING_ADDRESS_FROM' => 'Copy Delivery Address from' , // TODO: Review + 'LBL_COPY_SHIPPING_ADDRESS' => 'Delivery Address' , // TODO: Review + 'LBL_COPY_BILLING_ADDRESS' => 'Invoice Address' , // TODO: Review 'LBL_OVERALL_DISCOUNT' => 'Overall Discount' , 'LBL_CHARGES' => 'Charges' , 'LBL_CHARGES_TOTAL' => 'Charges Total' , @@ -396,11 +396,11 @@ $languageStrings = array( 'Apparel' => 'Apparel' , 'Banking' => 'Banking' , 'Billing Address' => 'Invoice Address' , - 'Billing City' => 'Billing City' , - 'Billing Code' => 'Billing Postal Code' , - 'Billing Country' => 'Billing Country' , - 'Billing Po Box' => 'Billing P.O. Box' , - 'Billing State' => 'Billing State' , + 'Billing City' => 'Invoice City' , + 'Billing Code' => 'Invoice Postal Code' , + 'Billing Country' => 'Invoice Country' , + 'Billing Po Box' => 'Invoice P.O. Box' , + 'Billing State' => 'Invoice State' , 'Biotechnology' => 'Biotechnology' , 'FedEx' => 'FedEx' , 'UPS' => 'UPS' , @@ -458,11 +458,11 @@ $languageStrings = array( 'Contact Name' => 'Contact Name' , 'Conversion Rate' => 'Conversion Rate' , 'Shipping Address' => 'Delivery Address' , - 'Shipping City' => 'Shipping City' , - 'Shipping State' => 'Shipping State' , - 'Shipping Code' => 'Shipping Postal Code' , - 'Shipping Country' => 'Shipping Country' , - 'Shipping Po Box' => 'Shipping P.O. Box' , + 'Shipping City' => 'Delivery City' , + 'Shipping State' => 'Delivery State' , + 'Shipping Code' => 'Delivery Postal Code' , + 'Shipping Country' => 'Delivery Country' , + 'Shipping Po Box' => 'Delivery P.O. Box' , 'Country' => 'Country' , 'Created' => 'Created' , 'Approved' => 'Approved' , @@ -541,7 +541,7 @@ $languageStrings = array( 'Open Ticktes' => 'Open Tickets' , // TODO: Review 'LBL_SELECT_STATUS' => 'Select Status' , 'LBL_VTIGER_CRM_HONEST_OPEN_SOURCE' => 'vtiger CRM On Demand' , - 'SINGLE_Accounts' => 'Organization' , // TODO: Review + 'SINGLE_Accounts' => 'Organisation' , // TODO: Review 'SINGLE_Contacts' => 'Contact' , // TODO: Review 'LBL_Sun' => 'Sun' , // TODO: Review 'LBL_Mon' => 'Mon' , // TODO: Review @@ -671,7 +671,7 @@ $languageStrings = array( 'Half-Yearly' => 'Half-Yearly', 'LBL_FULLSCREEN' => 'Full Screen', 'LBL_MODULE_DISABLED' => ' Module is disabled' , - 'Organization Name' => 'Organization Name', + 'Organization Name' => 'Organisation Name', 'LBL_WEEK' => 'Week', // Convert Leads and Potentials 'LBL_CONVERT_ERROR_TITLE' => 'Modules Disabled' , @@ -770,11 +770,11 @@ $languageStrings = array( //Singular Modulenames 'SINGLE_Potentials' => 'Opportunity', 'SINGLE_HelpDesk' => 'Ticket', - 'SINGLE_Accounts' => 'Organization', + 'SINGLE_Accounts' => 'Organisation', 'SINGLE_Contacts' => 'Contact', 'SINGLE_Project' => 'Project', 'LBL_ROLLUP_COMMENTS_INFO' => "If Roll up is set to 'On' comments on related records will be shown. - For example, if you are viewing comments on an Organization record, comments added to related Contacts, Opportunities, Tickets, ..etc would also be displayed.", + For example, if you are viewing comments on an Organisation record, comments added to related Contacts, Opportunities, Tickets, ..etc would also be displayed.", 'LBL_ROLLUP_COMMENTS' => "Rollup Comments", 'group' => 'Group', 'individual' => 'Individual', @@ -1104,7 +1104,7 @@ $jsLanguageStrings = array( 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Are you sure that you want to delete?', 'OVERWRITE_EXISTING_MSG1' => 'Overwrite the existing address with the selected address?', 'OVERWRITE_EXISTING_MSG2' => 'Address Details' , - 'SINGLE_Accounts' => 'Organization' , + 'SINGLE_Accounts' => 'Organisation' , 'SINGLE_Contacts' => 'Contact' , 'LBL_DELETE_CONFIRMATION' => 'Are you sure you want to Delete?', 'LBL_MASS_DELETE_CONFIRMATION' => 'Are you sure you want to delete the selected Records?', @@ -1161,9 +1161,9 @@ $jsLanguageStrings = array( 'JS_INFORMATION' => 'Information' , // TODO: Review 'JS_DO_NOT_HAVE_AN_EMAIL_ID' => 'does not have an email address', // TODO: Review 'NONE_OF_THE_FIELD_VALUES_ARE_CHANGED_IN_MASS_EDIT' => 'None of the field values are changed in Mass Edit', // TODO: Review - 'JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS' => 'Please select an Organization to copy address', // TODO: Review + 'JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS' => 'Please select an Organisation to copy address', // TODO: Review 'JS_PLEASE_SELECT_AN_CONTACT_TO_COPY_ADDRESS' => 'Please select a Contact to copy address', // TODO: Review - 'JS_SELECTED_ACCOUNT_DOES_NOT_HAVE_AN_ADDRESS' => 'Selected Organization does not contain address to copy', // TODO: Review + 'JS_SELECTED_ACCOUNT_DOES_NOT_HAVE_AN_ADDRESS' => 'Selected Organisation does not contain address to copy', // TODO: Review 'JS_SELECTED_CONTACT_DOES_NOT_HAVE_AN_ADDRESS' => 'Selected Contact does not contain address to copy', // TODO: Review 'JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER' => 'Please enter Primary email address to enable portal user', // TODO: Review 'JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS' => 'Primary email field does not exist to enable portal user', // TODO: Review @@ -1376,10 +1376,10 @@ $jsLanguageStrings = array( 'JS_TAG_SAVED_SUCCESSFULLY' => 'Tag Saved Successfully', 'JS_SUBJECT_VALUE_CANT_BE_EMPTY' => 'Subject value cannot be empty', 'JS_PERCENTAGE_SHOULD_BE_LESS_THAN_100' => 'Percentage should be less than 100', - 'LBL_DELETE_USER_CONFIRMATION' => 'When a User is deleted, the user will be marked as "Inactive" and no new records can be assigned to the User, and the user will not be able to login. Billing will stop for this user.If you need to reactivate a deleted user, you will need to send email to support@vtiger.com.Are you sure you want to delete?', - 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organization Name already Exists.Do you want to create a duplicate record?', + 'LBL_DELETE_USER_CONFIRMATION' => 'When a user is deleted, the user will be marked as "Inactive" and no new records can be assigned to the user and the user will not be able to login. Billing will stop for this user. If you need to reactivate a deleted user, you will need to send email to support@vtiger.com. Are you sure you want to delete?', + 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organisation Name already Exists. Do you want to create a duplicate record?', 'JS_SELECT_RECORDS_TO_MERGE_FROM_SAME_GROUP' => 'You have to select the records in the same groups for merging', - 'JS_SELECT_ATLEAST_TWO_RECORD_FOR_MERGING' => 'Select atleast two records for merging', + 'JS_SELECT_ATLEAST_TWO_RECORD_FOR_MERGING' => 'Select at least two records for merging', 'JS_ALLOWED_TO_SELECT_MAX_OF_THREE_RECORDS' => 'You are allowed to select a maximum of three records', 'JS_ARE_YOU_SURE_TO_DELETE_WIDGET' => 'Are you sure to delete widget', 'JS_ARE_YOU_SURE_TO_DELETE_DASHBOARDTAB' => 'Are you sure to delete tab', diff --git a/pkg/vtiger/translations/Deutsch/modules/Accounts.php b/pkg/vtiger/translations/Deutsch/modules/Accounts.php index 72ea12e243fd5080e018ed9c2451026b07411b96..fc7fd15de7c54235be7bcce81af54a767f2dd549 100644 --- a/pkg/vtiger/translations/Deutsch/modules/Accounts.php +++ b/pkg/vtiger/translations/Deutsch/modules/Accounts.php @@ -23,7 +23,7 @@ $languageStrings = array( 'Employees' => 'Mitarbeiter' , 'Ownership' => 'Besitzer' , 'SIC Code' => 'Ust. Nr.' , - 'Other Email' => 'andere E-Mail' , + 'Other Email' => 'Rechnungs-E-Mail' , 'Analyst' => 'Analyst' , 'Competitor' => 'Wettbewerber' , 'Customer' => 'Kunde' , @@ -56,4 +56,4 @@ $jsLanguageStrings = array( 'LBL_MASS_DELETE_CONFIRMATION' => 'Durch das Entfernen der Organisation werden auch verknüpfte Verkaufschancen und Angebote entfernt. Jetzt dennoch entfernen?', 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Name der Organisation bereits Vorhanden ist.Wollen Sie einen doppelten Datensatz erstellen?', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/Deutsch/modules/Vtiger.php b/pkg/vtiger/translations/Deutsch/modules/Vtiger.php index 20502ddf0670e0a1a4b8b4865c8b6abc6a8d5655..49074a839e403c0375f82405ebebcb21db54358d 100644 --- a/pkg/vtiger/translations/Deutsch/modules/Vtiger.php +++ b/pkg/vtiger/translations/Deutsch/modules/Vtiger.php @@ -43,7 +43,7 @@ $languageStrings = array( 'LBL_MASS_EDITING' => 'Mass Editing' , 'LBL_DESELECT_ALL_RECORDS' => 'Auswahl aufheben' , 'LBL_QUICK_CREATE' => 'Schnellmenü' , - 'LBL_SEND_EMAIL' => 'Send Email' , + 'LBL_SEND_EMAIL' => 'E-Mail senden' , 'LBL_ALL_EMAILS' => 'All email accounts' , 'LBL_MUTIPLE_EMAIL_SELECT_ONE' => 'This record stores multiple email accounts. Please select the accounts to which the email should be sent to', 'LBL_GO_TO_FULL_FORM' => 'Go to full form' , @@ -144,8 +144,8 @@ $languageStrings = array( 'MailManager' => 'Mail Manager' , 'Activities' => 'Activities' , 'Portal' => 'Unsere Seiten' , - 'Email Templates' => 'Email Template' , - 'Recycle Bin' => 'Recycle Bin' , + 'Email Templates' => 'E-Mail Vorlagen' , + 'Recycle Bin' => 'Papierkorb' , 'Print Templates' => 'Druckvorlagen' , 'LBL_ADD_RECORD' => 'Add Record' , 'LBL_RECENTLY_MODIFIED' => 'Recently Modified' , @@ -174,12 +174,12 @@ $languageStrings = array( 'LBL_LESS_THAN_DAYS_LATER' => 'weniger als Tage später', 'LBL_MORE_THAN_DAYS_LATER' => 'mehr als Tage später', 'LBL_DENY' => 'Deny' , - 'LBL_EQUALS' => 'equals' , - 'LBL_NOT_EQUAL_TO' => 'not equal to' , - 'LBL_STARTS_WITH' => 'starts with' , + 'LBL_EQUALS' => 'gleich' , + 'LBL_NOT_EQUAL_TO' => 'nicht gleich' , + 'LBL_STARTS_WITH' => 'beginnt mit' , 'LBL_ENDS_WITH' => 'endet mit' , 'LBL_CONTAINS' => 'beinhaltet' , - 'LBL_DOES_NOT_CONTAIN' => 'does not contains' , + 'LBL_DOES_NOT_CONTAIN' => 'beinhaltet nicht' , 'LBL_LESS_THAN' => 'weniger als' , 'LBL_GREATER_THAN' => 'größer als' , 'LBL_LESS_THAN_OR_EQUAL' => 'weniger oder gleich' , @@ -187,17 +187,17 @@ $languageStrings = array( 'LBL_BEFORE' => 'before' , 'LBL_AFTER' => 'after' , 'LBL_BETWEEN' => 'between' , - 'LBL_IS_NOT_EMPTY' => 'nicht leer' , + 'LBL_IS_NOT_EMPTY' => 'ist nicht leer' , 'LBL_SEARCH' => 'Suchen' , 'LBL_SEARCH_IN' => 'Search In' , - 'LBL_ADD_CONDITION' => 'Add Condition' , + 'LBL_ADD_CONDITION' => 'Bedingung hinzufügen' , 'LBL_ADD_GROUP' => 'Add Group' , 'LBL_FILTER_CONDITIONS' => 'Liste AGB' , - 'LBL_ALL_CONDITIONS' => 'All Conditions' , - 'LBL_ALL_CONDITIONS_DESC' => 'All conditions must be met' , - 'LBL_ANY_CONDITIONS' => 'Any Conditions' , - 'LBL_ANY_CONDITIONS_DESC' => 'At least one of the conditions must be met', - 'LBL_SELECT_FIELD' => 'Select Field' , + 'LBL_ALL_CONDITIONS' => 'Alle Bedingungen' , + 'LBL_ALL_CONDITIONS_DESC' => 'Alle Bedingungen müssen erfüllt sein' , + 'LBL_ANY_CONDITIONS' => 'Eine Bedingung' , + 'LBL_ANY_CONDITIONS_DESC' => 'Mindestens eine Bedingung muss erfüllt sein', + 'LBL_SELECT_FIELD' => 'Feld auswählen' , 'LBL_SELECT_MODULE' => 'Select Module' , 'LBL_CREATE_NEW_FILTER' => 'Neue Liste erstellen' , 'All' => 'Alle' , @@ -265,47 +265,47 @@ $languageStrings = array( 'LBL_REFRESH' => 'Aktualisieren' , 'LBL_CLOSE' => 'Schließen' , 'LBL_ALL' => 'Alle' , - 'LBL_UPDATED' => 'Updated' , - 'LBL_FROM' => 'from' , - 'LBL_TO' => 'to' , - 'LBL_ON' => 'on' , + 'LBL_UPDATED' => 'aktualisiert' , + 'LBL_FROM' => 'von' , + 'LBL_TO' => 'zu' , + 'LBL_ON' => 'bei' , 'LBL_OF' => 'von' , 'LBL_BY' => 'von ' , - 'LBL_ADDED' => 'added' , + 'LBL_ADDED' => 'ergänzt' , 'LBL_FOR' => 'für' , 'LBL_CREATED' => 'Erstellt' , 'LBL_DELETED' => 'deleted' , 'LBL_RESTORED' => 'restored' , - 'LBL_COMMENTED' => 'commented' , + 'LBL_COMMENTED' => 'kommentiert' , 'LBL_REMOVED' => 'removed' , 'LBL_REMOVE' => 'Remove' , 'LBL_AT' => 'at' , 'LBL_MINE' => 'Mine' , 'History' => 'Historie' , 'Upcoming Tasks' => 'Upcoming Tasks' , - 'LBL_YEAR' => 'year' , - 'LBL_YEARS' => 'years' , - 'LBL_MONTH' => 'month' , - 'LBL_MONTHS' => 'months' , - 'LBL_DAY' => 'day' , - 'LBL_DAYS' => 'days' , - 'LBL_HOUR' => 'hour' , - 'LBL_HOURS' => 'hours' , - 'LBL_MINUTE' => 'minute' , - 'LBL_MINUTES' => 'minutes' , - 'LBL_SECOND' => 'second' , - 'LBL_SECONDS' => 'seconds' , - 'LBL_JUSTNOW' => 'just now' , + 'LBL_YEAR' => 'Jahr' , + 'LBL_YEARS' => 'Jahre' , + 'LBL_MONTH' => 'Monat' , + 'LBL_MONTHS' => 'Monate' , + 'LBL_DAY' => 'Tag' , + 'LBL_DAYS' => 'Tage' , + 'LBL_HOUR' => 'Stunde' , + 'LBL_HOURS' => 'Stunden' , + 'LBL_MINUTE' => 'Minute' , + 'LBL_MINUTES' => 'Minuten' , + 'LBL_SECOND' => 'Sekunde' , + 'LBL_SECONDS' => 'Sekunden' , + 'LBL_JUSTNOW' => 'gerade eben' , 'LBL_CUSTOM_INFORMATION' => 'zusätzliche Information' , 'LBL_NO_RECENT_UPDATES' => 'No recent updates' , 'LBL_NO_DATA' => 'Keine Daten gefunden' , 'LBL_PERMISSION_DENIED' => 'Permission denied' , 'LBL_HANDLER_NOT_FOUND' => 'Handler not found' , 'LBL_FILTER' => 'Verzeichnis' , - 'LBL_DUE' => 'due in' , - 'LBL_COMPLETED' => 'completed' , - 'LBL_AGO' => 'ago' , - 'LBL_CHANGED' => 'changed' , + 'LBL_DUE' => 'fällig in' , + 'LBL_COMPLETED' => 'abgeschlossen' , + 'LBL_AGO' => 'her' , + 'LBL_CHANGED' => 'geändert' , 'Single_Users' => 'Nutzer' , 'LBL_MATCHED_THIS_CRITERIA' => 'matched this criteria' , 'LBL_NO_SCHEDULED_ACTIVITIES' => 'No scheduled activities' , @@ -321,13 +321,13 @@ $languageStrings = array( 'LBL_VIEW_NAME' => 'Listenname' , 'LBL_CREATE_VIEW' => 'Creating new View' , 'LBL_BASIC_DETAILS' => 'Basic Details' , - 'LBL_CHOOSE_COLUMNS' => 'Choose Columns and Order' , + 'LBL_CHOOSE_COLUMNS' => 'Anzuzeigenden Felder und deren Reihenfolge auswählen' , 'LBL_MAX_NUMBER_FILTER_COLUMNS' => 'Max 15' , 'LBL_FILTER_ON_DATE' => 'Verzeichnis on date' , - 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Wählen Sie Liste Bedingungen' , - 'LBL_SET_AS_DEFAULT' => 'Set as Default' , + 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Bedingungen auswählen' , + 'LBL_SET_AS_DEFAULT' => 'Als Standardliste definieren' , 'LBL_LIST_IN_METRICS' => 'List in Metrics' , - 'LBL_SET_AS_PUBLIC' => ' Set as Public' , + 'LBL_SET_AS_PUBLIC' => 'Als öffentlich definieren' , 'LBL_ADD_MORE_COLUMNS' => 'Klicken Sie auf Felder auswählen' , 'LBL_CUSTOM' => 'Custom' , 'LBL_PREVIOUS_FY' => 'Previous FY' , @@ -386,19 +386,19 @@ $languageStrings = array( 'LBL_EXPORT_FORMAT' => 'Exportformat', 'LBL_EXPORT_DATA' => 'Daten exportieren', 'LBL_EXPORT_LINEITEM_CURRENCY'=>'Währung wählen (für Line-Item)', - 'LBL_ADD_MANAGE_MODULES' => 'Add / Manage Modules' , + 'LBL_ADD_MANAGE_MODULES' => 'Module hinzufügen/verwalten' , 'Account Name' => 'Organisation' , 'Add Comment' => 'Add Comment' , 'Adjustment' => 'Anpassung' , 'Annual Revenue' => 'Jahresumsatz' , 'Apparel' => 'Apparel' , 'Banking' => 'Banking' , - 'Billing Address' => 'Rechnungensadresse' , - 'Billing City' => 'Billing-Stadt' , - 'Billing Code' => 'Abrechnungscode' , - 'Billing Country' => 'Billing Land' , - 'Billing Po Box' => 'Billing Po Box' , - 'Billing State' => 'Billing Staat' , + 'Billing Address' => 'Rechnungsadresse' , + 'Billing City' => 'Rechnung Stadt' , + 'Billing Code' => 'Rechnung Postleitzahl' , + 'Billing Country' => 'Rechnung Land' , + 'Billing Po Box' => 'Rechnung Postfach' , + 'Billing State' => 'Rechnung Bundesland' , 'Biotechnology' => 'Biotechnology' , 'FedEx' => 'FedEx' , 'UPS' => 'UPS' , @@ -457,10 +457,10 @@ $languageStrings = array( 'Conversion Rate' => 'Conversion Rate' , 'Shipping Address' => 'Lieferadresse' , 'Shipping City' => 'Versand Stadt' , - 'Shipping State' => 'Verschiffen-Zustand' , + 'Shipping State' => 'Versand Bundesland' , 'Shipping Code' => 'Versand Postleitzahl' , 'Shipping Country' => 'Versand Land' , - 'Shipping Po Box' => 'Versand Po Box' , + 'Shipping Po Box' => 'Versand Postfach' , 'Country' => 'Land' , 'Created' => 'Erstellt' , 'Approved' => 'Approved' , @@ -581,7 +581,7 @@ $languageStrings = array( 'LBL_ATTACHMENT' => 'Attachment' , 'LBL_BROWSE_CRM' => 'Browse CRM' , 'LBL_SEND' => 'Send' , - 'LBL_SAVE_AS_DRAFT' => 'Save as Draft' , + 'LBL_SAVE_AS_DRAFT' => 'Entwurf speichern' , 'LBL_GO_TO_PREVIEW' => 'Go to Preview' , 'LBL_SELECT_EMAIL_TEMPLATE' => 'Select Email Template' , 'LBL_COMPOSE_EMAIL' => 'Compose Email' , @@ -874,7 +874,7 @@ $languageStrings = array( 'LBL_LAST_SAVED_ON' => 'Letzte gespeichert', 'Notebook' => 'Notepad', 'LBL_MY' => 'Meine', - 'LBL_IS_EMPTY' => 'leer ist', + 'LBL_IS_EMPTY' => 'ist leer', 'LBL_MODIFIED' => 'Geändert', 'Funnel Amount' => 'Summe durch den Verkauf der Bühne', 'LBL_TYPE_AND_SEARCH' => 'Typ und Suche', @@ -965,7 +965,7 @@ außerhalb Vtiger.', 'LBL_ADD_STAR' => 'Hinzufügen Sterne', 'LBL_REMOVE_STAR' => 'Entfernen Sterne', 'LBL_UPDATE_LIST' => 'Update-Liste', - 'LBL_SHARE_THIS_LIST' => 'Anteil der Liste', + 'LBL_SHARE_THIS_LIST' => 'Liste mit anderen teilen', 'LBL_ADD_USERS_ROLES' => 'Hinzufügen Von Benutzern, Rollen...', 'LBL_LISTS' => 'Listen', 'LBL_SEARCH_FOR_LIST' => 'Suche für die Liste', @@ -987,7 +987,7 @@ außerhalb Vtiger.', 'LBL_SEARCH_FIELDS' => 'Suchfelder', 'ExtensionStore' => 'Erweiterungen Store', 'LBL_EXTENSIONS' => 'Erweiterungen', - 'LBL_CREATE_LIST' => 'Erstellen Sie eine Neue Liste', + 'LBL_CREATE_LIST' => 'Neue Liste erstellen', 'sent' => 'Gesendet', 'accepted' => 'Angenommen', 'LBL_RECENT_COMMENTS' => 'Die Jüngsten Kommentare', @@ -1209,10 +1209,10 @@ $jsLanguageStrings = array( //For PhoneCalls 'JS_PBX_CALL_FROM' => 'Anruf von', - 'JS_PBX_INCOMING_CALL' => 'Incoming Call', - 'JS_PBX_OUTGOING_SUCCESS' => 'Nimm den Erweiterung Hörer, die Nummer wählen', - 'JS_PBX_OUTGOING_FAILURE' => 'Rufen fehlgeschlagen', - 'JS_PBX_FILL_ALL_FIELDS' => 'Bitte füllen Sie alle Felder', + 'JS_PBX_INCOMING_CALL' => 'Eingehender Anruf', + 'JS_PBX_OUTGOING_SUCCESS' => 'Anruf gestartet. Bitte Hörer abnehmen.', + 'JS_PBX_OUTGOING_FAILURE' => 'Anruf fehlgeschlagen', + 'JS_PBX_FILL_ALL_FIELDS' => 'Bitte alle Felder ausfüllen', 'JS_PBX_CAMPAIGN_NAME' => 'Campaign Name', 'JS_PBX_CAMPAIGN_NUMBER' => 'Campaign Number', 'JS_MIN_SEARCH_KEY_LENGTH' => 'Search Key should have aleast 3 characters', @@ -1499,4 +1499,4 @@ $jsLanguageStrings = array( 'JS_PASSWORD_MISMATCH_ERROR' => 'Bitte geben Sie ein Passwort. Die „neue Kennwort“ und „Kennwort bestätigen“ Werte nicht übereinstimmen.', 'JS_LIST_DELETE_CONFIRMATION' => 'Sind Sie sicher, dass Sie löschen möchten?', 'JS_WIDGET_RESIZING_WAIT_MSG' => 'Widget Inhalt lädt nach der Skalierung.', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/manifest.xml b/pkg/vtiger/translations/ItalianLanguagePack_it_it/manifest.xml index ddffd173b41b59e76b7db421dbe3eb23e208f17a..ac04a2458cb760768ebb0502d3c17c8f377f23dd 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/manifest.xml +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/manifest.xml @@ -4,7 +4,7 @@ <name>Italian</name> <label>IT Italian</label> <prefix>it_it</prefix> - <version>5.1.1</version> + <version>6.1.1</version> <dependencies> <vtiger_version>6.0.0rc</vtiger_version> <vtiger_max_version>7.*</vtiger_max_version> @@ -18,9 +18,9 @@ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. ******************************************************************************** - * Language : Italiano + * Language : Italiano9 * Version : 5.1 - * Author : traduttori di vtiger italia info@vtiger-italia.net + * Author : traduttori di vtiger italia info@vtiger-italia.net, Massimiliano Vessi (maxint@tiscali.it) ******************************************************************************** ]]></inline> </license> diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Accounts.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Accounts.php index 478c9d5ccac200347114c911e92f84447b4470a5..84f93dad9d070331e65cd838e3ed1acc1b23e71e 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Accounts.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Accounts.php @@ -10,7 +10,7 @@ $languageStrings = array( 'Accounts' => 'Aziende' , 'SINGLE_Accounts' => 'Azienda' , - 'LBL_ADD_RECORD' => 'Add Organization' , + 'LBL_ADD_RECORD' => 'Aggiungi Azienda' , 'LBL_RECORDS_LIST' => 'Lista Aziende' , 'LBL_ACCOUNT_INFORMATION' => 'Informazioni Azienda' , 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Mostra gerarchia Aziende' , @@ -21,7 +21,7 @@ $languageStrings = array( 'Ticker Symbol' => 'Simbolo Ticker' , 'Member Of' => 'Membro di' , 'Employees' => 'Impiegati' , - 'Ownership' => 'Proprietà' , + 'Ownership' => 'Proprietà ' , 'SIC Code' => 'Codice SIC' , 'Other Email' => 'Altra Email' , 'Analyst' => 'Analista' , @@ -35,11 +35,11 @@ $languageStrings = array( 'Type' => 'Tipo' , 'LBL_START_DATE' => 'Data Inizio' , 'LBL_END_DATE' => 'Data Fine' , - 'LBL_DUPLICATES_EXIST' => 'Organization Name already exists', - 'LBL_COPY_SHIPPING_ADDRESS' => 'Indirizzo Copy spedizione' , // TODO: Review + 'LBL_DUPLICATES_EXIST' => 'Nome azienda già esistente', + 'LBL_COPY_SHIPPING_ADDRESS' => 'Copia Indirizzo spedizione' , // TODO: Review 'LBL_COPY_BILLING_ADDRESS' => 'Copia indirizzo di fatturazione' , // TODO: Review - 'LBL_IMAGE_INFORMATION' => 'Picture Profile', - 'Organization Image' => 'Organizzazione Immagine', + 'LBL_IMAGE_INFORMATION' => 'Immagine Profilo', + 'Organization Image' => 'Immagine Azienda', 'Other Phone' => 'Telefono Secondario', 'Phone' => 'Telefono Principale', @@ -47,10 +47,10 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => 'Are you sure you want to Delete?', - 'LBL_DELETE_CONFIRMATION' => 'Deleting this Organization will remove its related Opportunities & Quotes. Are you sure you want to delete this Organization?', - 'LBL_MASS_DELETE_CONFIRMATION' => 'Deleting this Organization will remove its related Opportunities & Quotes. Are you sure you want to delete this Organization?', + 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => 'Sei sicuro che vuoi cancellarla?', + 'LBL_DELETE_CONFIRMATION' => 'Cancellando questa Azienda, cancellerai anche le sue oppertunità e preventivi. Sei sicuro di volercancellare questa Azienda?', + 'LBL_MASS_DELETE_CONFIRMATION' => 'Cancellando questa Azienda, cancellerai anche le sue oppertunità e preventivi. Sei sicuro di volercancellare questa Azienda?', - 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organizzazione Nome Esiste già .Vuoi creare un record duplicato?', + 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Nome dell\'Azienda già esistente. Vuoi creare un record duplicato?', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Assets.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Assets.php index ab8507b12b8d835b9a30d98343d384834e32cae0..4b2926bf08ccc1e1489e47f6b1239abc9a2aa713 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Assets.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Assets.php @@ -8,24 +8,24 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'SINGLE_Assets' => 'Asset' , - 'LBL_ADD_RECORD' => 'Add Assets' , - 'LBL_RECORDS_LIST' => 'Assets List' , - 'LBL_ASSET_INFORMATION' => 'Assest Details' , - 'Asset No' => 'Asset No' , - 'Serial Number' => 'Serial Number' , - 'Date Sold' => 'Date Sold' , - 'Date in Service' => 'Date in Service' , + 'SINGLE_Assets' => 'Reso' , + 'LBL_ADD_RECORD' => 'Aggiungi reso' , + 'LBL_RECORDS_LIST' => 'Lista resi' , + 'LBL_ASSET_INFORMATION' => 'Dettagli reso' , + 'Asset No' => 'N. reso' , + 'Serial Number' => 'Numero di serie' , + 'Date Sold' => 'Data venduto' , + 'Date in Service' => 'Data in Servizio' , 'Tag Number' => 'Tag Number' , - 'Invoice Name' => 'Invoice Name' , - 'Shipping Method' => 'Shipping Method' , - 'Shipping Tracking Number' => 'Shipping Tracking Number' , - 'Asset Name' => 'Asset Name' , + 'Invoice Name' => 'Nome fattura' , + 'Shipping Method' => 'Metodo di spedizione' , + 'Shipping Tracking Number' => 'Tracking Number spedizione' , + 'Asset Name' => 'Nome reso' , 'Customer Name' => 'Nome del Cliente' , - 'Notes' => 'Notes' , - 'In Service' => 'In Service' , - 'Out-of-service' => 'Out-of-service' , + 'Notes' => 'Note' , + 'In Service' => 'In Servizio' , + 'Out-of-service' => 'Fuori Servizio' , - 'Assets' => 'Attività ', + 'Assets' => 'Resi', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php index 20f6b6a966cd4aa0ed07552dc48d343e941be096..d4673be98e7ebdbf82bf5b481094986bde768e6f 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php @@ -8,24 +8,24 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Calendar' => 'Calendar' , - 'SINGLE_Calendar' => 'Compito' , - 'LBL_ADD_TASK' => 'Add Compito' , + 'Calendar' => 'Calendario' , + 'SINGLE_Calendar' => 'Compito' , + 'LBL_ADD_TASK' => 'Add Compito' , 'LBL_ADD_EVENT' => 'Aggiungi Evento' , 'LBL_RECORDS_LIST' => 'Vista per Lista' , 'LBL_EVENTS' => 'Eventi' , 'LBL_TODOS' => 'Compito' , - 'LBL_CALENDAR_SETTINGS' => 'Calendar Settings' , // TODO: Review - 'LBL_CALENDAR_SHARING' => 'Calendar Sharing' , // TODO: Review - 'LBL_DEFAULT_EVENT_DURATION' => 'Default Event Duration' , // TODO: Review - 'LBL_CALL' => 'Call' , // TODO: Review - 'LBL_OTHER_EVENTS' => 'Other Events' , // TODO: Review - 'LBL_MINUTES' => 'Minutes' , // TODO: Review - 'LBL_SELECT_USERS' => 'Select Users' , // TODO: Review - 'LBL_EVENT_OR_TASK' => 'Evento / Compito' , + 'LBL_CALENDAR_SETTINGS' => 'Impostazioni Calendario' , + 'LBL_CALENDAR_SHARING' => 'Condivisione Calendario' , + 'LBL_DEFAULT_EVENT_DURATION' => 'Durata Evento standard' , + 'LBL_CALL' => 'Chiamata' , + 'LBL_OTHER_EVENTS' => 'Altri eventi' , + 'LBL_MINUTES' => 'Minuti' , + 'LBL_SELECT_USERS' => 'Seleziona utenti' , + 'LBL_EVENT_OR_TASK' => 'Evento / Compito' , 'LBL_TASK_INFORMATION' => 'Compito Informazione' , 'LBL_EVENT_INFORMATION' => 'Dettagli evento' , - 'Subject' => 'Soggetto' , + 'Subject' => 'Oggetto' , 'Start Date & Time' => 'Orario e data inizio' , 'Activity Type' => 'Tipo Attività' , 'Send Notification' => 'Manda Notifica' , @@ -35,10 +35,10 @@ $languageStrings = array( 'Recurrence' => 'Ricorrenza', 'Private' => 'Privato', 'Public' => 'Pubblico', - 'LBL_ACTIVITY_TYPES' => 'Activity Types' , + 'LBL_ACTIVITY_TYPES' => 'Tipo attività ' , 'LBL_CONTACTS_SUPPORT_END_DATE' => 'Data Fine Supporto' , - 'LBL_CONTACTS_BIRTH_DAY' => 'Date of Birth' , - 'LBL_ADDED_CALENDARS' => 'Added Calendars' , // TODO: Review + 'LBL_CONTACTS_BIRTH_DAY' => 'Data di nascita' , + 'LBL_ADDED_CALENDARS' => 'Calendari aggiunti' , // TODO: Review 'Call' => 'Chiamata' , 'Meeting' => 'Riunione' , 'Task' => 'Compito' , // TODO: Review @@ -54,23 +54,23 @@ $languageStrings = array( 'LBL_EVENT' => 'Evento' , 'LBL_TASK' => 'Compito' , 'LBL_TASKS' => 'Compito', - 'LBL_CALENDAR_VIEW' => 'Calendar View' , - 'LBL_SHARED_CALENDAR' => 'Shared Calendar' , // TODO: Review - 'LBL_DAY0' => 'Sunday' , // TODO: Review - 'LBL_DAY1' => 'Monday' , // TODO: Review - 'LBL_DAY2' => 'Tuesday' , // TODO: Review - 'LBL_DAY3' => 'Wednesday' , // TODO: Review - 'LBL_DAY4' => 'Thursday' , // TODO: Review - 'LBL_DAY5' => 'Friday' , // TODO: Review - 'LBL_DAY6' => 'Saturday' , // TODO: Review - 'first' => 'First' , // TODO: Review - 'last' => 'Last' , // TODO: Review - 'LBL_DAY_OF_THE_MONTH' => 'day of the month' , // TODO: Review + 'LBL_CALENDAR_VIEW' => 'Vista Calendario' , + 'LBL_SHARED_CALENDAR' => 'Calendario Condiviso' , // TODO: Review + 'LBL_DAY0' => 'Domenica' , // TODO: Review + 'LBL_DAY1' => 'Lunedì' , // TODO: Review + 'LBL_DAY2' => 'Martedì' , // TODO: Review + 'LBL_DAY3' => 'Mercoledì' , // TODO: Review + 'LBL_DAY4' => 'Giovedì' , // TODO: Review + 'LBL_DAY5' => 'Venerdì' , // TODO: Review + 'LBL_DAY6' => 'Sabato' , // TODO: Review + 'first' => 'Primo' , // TODO: Review + 'last' => 'Ultimo' , // TODO: Review + 'LBL_DAY_OF_THE_MONTH' => 'giorno del mese' , // TODO: Review 'LBL_ON' => 'on' , // TODO: Review - 'Daily' => 'Day(s)' , // TODO: Review - 'Weekly' => 'Week(s)' , // TODO: Review - 'Monthly' => 'Month(s)' , // TODO: Review - 'Yearly' => 'Year' , // TODO: Review + 'Daily' => 'Giorni' , // TODO: Review + 'Weekly' => 'Settimane' , // TODO: Review + 'Monthly' => 'Mesi' , // TODO: Review + 'Yearly' => 'Anno' , // TODO: Review 'LBL_DEFAULT_STATUS_TYPE' => 'Predefinito Stato e tipo' , 'LBL_STATUS' => 'Stato' , 'LBL_TYPE' => 'Tipo' , @@ -152,84 +152,84 @@ $languageStrings = array( 'LBL_TOTAL_TASKS_DUPLICATED' => 'Numero di Task duplicati saltato', ); $jsLanguageStrings = array( - 'LBL_ADD_EVENT_TASK' => 'Add Event / Compito' , - 'JS_TASK_IS_SUCCESSFULLY_ADDED_TO_YOUR_CALENDAR' => 'Compito is successfully added to your Calendar', // TODO: Review - 'LBL_CANT_SELECT_CONTACT_FROM_LEADS' => 'Impossibile selezionare i contatti correlati per cavi', // TODO: Review - 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Non possiamo essere ritenuti Per Futuro', + 'LBL_ADD_EVENT_TASK' => 'Aggiungi Evento / Compito' , + 'JS_TASK_IS_SUCCESSFULLY_ADDED_TO_YOUR_CALENDAR' => 'Il Compito è stato aggiunto con successo al tuo Calendario', + 'LBL_CANT_SELECT_CONTACT_FROM_LEADS' => 'Impossibile selezionare i contatti correlati per Opportunità ', + 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Gli eventi futuri non possono essere mantenuti', //Calendar view label translation - 'LBL_MONTH' => 'Month', - 'LBL_TODAY' => 'Today', - 'LBL_DAY' => 'Day', - 'LBL_WEEK' => 'Week', + 'LBL_MONTH' => 'Mese', + 'LBL_TODAY' => 'Oggi', + 'LBL_DAY' => 'Giorno', + 'LBL_WEEK' => 'Settimana', - 'LBL_SUNDAY' => 'Sunday', - 'LBL_MONDAY' => 'Monday', - 'LBL_TUESDAY' => 'Tuesday', - 'LBL_WEDNESDAY' => 'Wednesday', - 'LBL_THURSDAY' => 'Thursday', - 'LBL_FRIDAY' => 'Friday', - 'LBL_SATURDAY' => 'Saturday', + 'LBL_SUNDAY' => 'Domenica', + 'LBL_MONDAY' => 'Lunedì', + 'LBL_TUESDAY' => 'Martedì', + 'LBL_WEDNESDAY' => 'Mercoledì', + 'LBL_THURSDAY' => 'Giovedì', + 'LBL_FRIDAY' => 'Venerdì', + 'LBL_SATURDAY' => 'Sabatp', - 'LBL_SUN' => 'Sun', - 'LBL_MON' => 'Mon', - 'LBL_TUE' => 'Tue', - 'LBL_WED' => 'Wed', - 'LBL_THU' => 'Thu', - 'LBL_FRI' => 'Fri', - 'LBL_SAT' => 'Sat', + 'LBL_SUN' => 'Dom', + 'LBL_MON' => 'Lun', + 'LBL_TUE' => 'Mar', + 'LBL_WED' => 'Mer', + 'LBL_THU' => 'Gio', + 'LBL_FRI' => 'Ven', + 'LBL_SAT' => 'Sab', - 'LBL_JANUARY' => 'January', - 'LBL_FEBRUARY' => 'February', - 'LBL_MARCH' => 'March', - 'LBL_APRIL' => 'April', - 'LBL_MAY' => 'May', - 'LBL_JUNE' => 'June', - 'LBL_JULY' => 'July', - 'LBL_AUGUST' => 'August', - 'LBL_SEPTEMBER' => 'September', - 'LBL_OCTOBER' => 'October', - 'LBL_NOVEMBER' => 'November', - 'LBL_DECEMBER' => 'December', + 'LBL_JANUARY' => 'Gennaio', + 'LBL_FEBRUARY' => 'Febbraio', + 'LBL_MARCH' => 'Marzo', + 'LBL_APRIL' => 'Aprile', + 'LBL_MAY' => 'Maggio', + 'LBL_JUNE' => 'Giugno', + 'LBL_JULY' => 'Luglio', + 'LBL_AUGUST' => 'Agosto', + 'LBL_SEPTEMBER' => 'Settembre', + 'LBL_OCTOBER' => 'Ottobre', + 'LBL_NOVEMBER' => 'Novembre', + 'LBL_DECEMBER' => 'Dicembre', - 'LBL_JAN' => 'Jan', + 'LBL_JAN' => 'Gen', 'LBL_FEB' => 'Feb', 'LBL_MAR' => 'Mar', 'LBL_APR' => 'Apr', - 'LBL_MAY' => 'May', - 'LBL_JUN' => 'Jun', - 'LBL_JUL' => 'Jul', - 'LBL_AUG' => 'Aug', - 'LBL_SEP' => 'Sep', - 'LBL_OCT' => 'Oct', + 'LBL_MAY' => 'Mag', + 'LBL_JUN' => 'Giu', + 'LBL_JUL' => 'Lug', + 'LBL_AUG' => 'Ago', + 'LBL_SEP' => 'Set', + 'LBL_OCT' => 'Ott', 'LBL_NOV' => 'Nov', - 'LBL_DEC' => 'Dec', + 'LBL_DEC' => 'Dic', - 'LBL_ALL_DAY' => 'All-Day', + 'LBL_ALL_DAY' => 'Tutto il giorno', //End //Fixing colors for Shared Calendar and My Calendar - 'JS_CALENDAR_VIEW_COLOR_UPDATED_SUCCESSFULLY' => 'Vista calendario colore aggiornato con successo', - 'JS_CALENDAR_VIEW_DELETE_CONFIRMATION' => 'Sei sicuro di voler eliminare questo punto di vista Calendar?', - 'JS_CALENDAR_VIEW_ADDED_SUCCESSFULLY' => 'Calendar View aggiunto con successo', - 'JS_CALENDAR_VIEW_DELETED_SUCCESSFULLY' => 'Calendario Vista eliminata correttamente', - 'JS_NO_CALENDAR_VIEWS_TO_ADD' => 'No Calendar View per aggiungere', + 'JS_CALENDAR_VIEW_COLOR_UPDATED_SUCCESSFULLY' => 'Vista colori calendario aggiornato con successo', + 'JS_CALENDAR_VIEW_DELETE_CONFIRMATION' => 'Sei sicuro di voler eliminare questo Vista del Calendario?', + 'JS_CALENDAR_VIEW_ADDED_SUCCESSFULLY' => 'Vista Calendario aggiunta con successo', + 'JS_CALENDAR_VIEW_DELETED_SUCCESSFULLY' => 'Vista Calendario eliminata correttamente', + 'JS_NO_CALENDAR_VIEWS_TO_ADD' => 'Nessuna Vista Calendario da aggiungere', 'JS_EDIT_CALENDAR' => 'Modifica Calendario', 'LBL_TOMORROW' => 'Domani', 'JS_EVENT_UPDATED' => 'Evento Aggiornato', 'JS_NO_EVENTS_F0R_THE_DAY' => 'Nessun evento per il giorno', 'LBL_AGENDA' => 'Agenda', - 'JS_CALENDAR_VIEW_YOU_ARE_EDITING_NOT_FOUND' => 'Visualizzazione del calendario non trovato', + 'JS_CALENDAR_VIEW_YOU_ARE_EDITING_NOT_FOUND' => 'Vista Calendario non trovata', 'JS_DELETE' => 'Eliminare', 'JS_EDIT' => 'Modifica', - 'JS_MARK_AS_HELD' => 'Marco tenuta', + 'JS_MARK_AS_HELD' => 'Segna come sospesa', 'JS_CREATE_FOLLOW_UP' => 'Creare follow-up', 'JS_RECURRING_EVENT' => 'Evento ricorrente', - 'JS_DETAILS' => 'Più Dettagli', + 'JS_DETAILS' => 'Più Dettagli', 'JS_CHECK_START_AND_END_DATE' => 'Fine-Data e Ora deve essere maggiore o uguale alla Data di Inizio e Ora', 'JS_CHECK_START_AND_END_DATE_SHOULD_BE_GREATER' => 'Fine-Data e Ora dovrebbe essere maggiore di Data di Inizio e Ora', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Campaigns.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Campaigns.php index 639226a90fb487a220dc45ca0a9d5c030e086926..9447e119dcc780597d77867a9d8d04ba18001d3a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Campaigns.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Campaigns.php @@ -10,8 +10,8 @@ $languageStrings = array( 'Campaigns' => 'Campagne' , 'SINGLE_Campaigns' => 'Campagna' , - 'LBL_ADD_RECORD' => 'Add Campaign' , - 'LBL_RECORDS_LIST' => 'Campaigns List' , + 'LBL_ADD_RECORD' => 'Aggiungi Campagna' , + 'LBL_RECORDS_LIST' => 'Lista Campaigne' , 'LBL_CAMPAIGN_INFORMATION' => 'Informazioni Campagna' , 'LBL_EXPECTATIONS_AND_ACTUALS' => 'Previsti & Effettivi' , 'Campaign Name' => 'Nome Campagna' , @@ -35,7 +35,7 @@ $languageStrings = array( 'Actual ROI' => 'ROI Effettivo' , 'Webinar' => 'Webinar' , 'Referral Program' => 'Programma di Riferimento' , - 'Advertisement' => 'Pubblicità' , + 'Advertisement' => 'Pubblicità ' , 'Banner Ads' => 'Banner' , 'Direct Mail' => 'Mail Diretta' , 'Telemarketing' => 'Telemarketing' , @@ -49,11 +49,11 @@ $languageStrings = array( 'Average' => 'Medio' , 'Poor' => 'Scarso' , '--None--' => '--Nessuno--' , - 'Contacted - Successful' => 'Contacted - Successful' , - 'Contacted - Unsuccessful' => 'Contacted - Unsuccessful' , - 'Contacted - Never Contact Again' => 'Contacted - Never Contact Again', + 'Contacted - Successful' => 'Contattati - Con Successo' , + 'Contacted - Unsuccessful' => 'Contattati - Senza Successo' , + 'Contacted - Never Contact Again' => 'Contattati - Non contattare più', ); $jsLanguageStrings = array( 'JS_APPENDED_TO_EXISTING_LIST' => "%s dalla lista selezionata verrà allegato con l'elenco esistente.", -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Contacts.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Contacts.php index 93bdd09d489d3703eb171b216414b6300d91c598..c3bace91e3ac4a8cdb6c54906ce97e63978ec887 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Contacts.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Contacts.php @@ -10,13 +10,13 @@ $languageStrings = array( 'Contacts' => 'Contatti' , 'SINGLE_Contacts' => 'Contatto' , - 'LBL_ADD_RECORD' => 'Add Contact' , - 'LBL_RECORDS_LIST' => 'Contacts List' , + 'LBL_ADD_RECORD' => 'Aggiungi Contatto' , + 'LBL_RECORDS_LIST' => 'Lista Contatti' , 'LBL_CONTACT_INFORMATION' => 'Informazioni Contatto' , 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Informazioni Portale Clienti', 'LBL_IMAGE_INFORMATION' => 'Informazioni Immagine Contatto:', - 'LBL_COPY_OTHER_ADDRESS' => 'Copia Altro indirizzo' , // TODO: Review - 'LBL_COPY_MAILING_ADDRESS' => 'Copia Indirizzo postale' , // TODO: Review + 'LBL_COPY_OTHER_ADDRESS' => 'Copia Altro indirizzo' , + 'LBL_COPY_MAILING_ADDRESS' => 'Copia Indirizzo postale' , 'Office Phone' => 'Telefono Ufficio' , 'Home Phone' => 'Telefono Casa' , 'Title' => 'Titolo' , @@ -29,13 +29,13 @@ $languageStrings = array( 'Reference' => 'Riferimento' , 'Portal User' => 'Utente Portale' , 'Mailing Street' => 'Via (spedizione)' , - 'Mailing City' => 'Città (spedizione)' , + 'Mailing City' => 'Città (spedizione)' , 'Mailing State' => 'Provincia (spedizione)' , 'Mailing Zip' => 'CAP (spedizione)' , 'Mailing Country' => 'Stato (spedizione)' , 'Mailing Po Box' => 'Casella postale di mailing' , 'Other Street' => 'Altra Via' , - 'Other City' => 'Altra Città' , + 'Other City' => 'Altra Città ' , 'Other State' => 'Altra Provincia' , 'Other Zip' => 'Altro CAP' , 'Other Country' => 'Altro Stato' , @@ -48,8 +48,8 @@ $languageStrings = array( 'Prof.' => 'Prof.' , 'User List' => 'Lista Utente' , 'Contact Id' => 'Contatto Id', - 'Support Start Date' => 'Supporto Data di inizio' , - 'Support End Date' => 'Data di supporto End' , + 'Support Start Date' => 'Inizio Data di supporto' , + 'Support End Date' => 'Fine Data di supporto' , 'LBL_TRANSACTIONS' => 'Transazioni', 'Other Phone' => 'Telefono Secondario', @@ -58,4 +58,4 @@ $languageStrings = array( ); $jsLanguageStrings = array( -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Documents.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Documents.php index 65d608acafd185fd857a5c6bca3542b4544aa508..acb25a3cc5281bbc4d3a3b7d93d406542cd11c0d 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Documents.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Documents.php @@ -9,9 +9,9 @@ ************************************************************************************/ $languageStrings = array( 'SINGLE_Documents' => 'Documento' , - 'Documents' => 'Documents' , // TODO: Review + 'Documents' => 'Documenti' , 'LBL_ADD_RECORD' => 'Add Document' , - 'LBL_RECORDS_LIST' => 'Documents List' , + 'LBL_RECORDS_LIST' => 'Lista Documenti' , 'LBL_NOTE_INFORMATION' => 'Informazioni Base' , 'LBL_FILE_INFORMATION' => 'Informazioni file' , 'LBL_DESCRIPTION' => 'Descrizione' , @@ -26,25 +26,25 @@ $languageStrings = array( 'Download Count' => 'Conteggio download' , 'Folder Name' => 'Nome cartella' , 'Document No' => '>Numero documento' , - 'Last Modified By' => 'Last Modified By' , - 'LBL_FOLDER_HAS_DOCUMENTS' => 'Please move documents from folder before deleting', + 'Last Modified By' => 'Ultima Modifica di' , + 'LBL_FOLDER_HAS_DOCUMENTS' => 'Per favore spostare i documenti dalla cartella prima di eliminarli', 'LBL_DOWNLOAD_FILE' => 'Download file' , 'LBL_CHECK_FILE_INTEGRITY' => 'Controllo di integrità ' , 'LBL_INTERNAL' => 'Interno' , 'LBL_EXTERNAL' => 'Esterno' , - 'LBL_MAX_UPLOAD_SIZE' => 'Maximum upload size' , + 'LBL_MAX_UPLOAD_SIZE' => 'Massima dimensione per i caricamenti' , 'LBL_MOVE' => 'Muovi' , 'LBL_ADD_FOLDER' => 'Aggiungi cartella' , - 'LBL_FOLDERS_LIST' => 'Folders List' , - 'LBL_FOLDERS' => 'Folders' , - 'LBL_DOCUMENTS_MOVED_SUCCESSFULLY' => 'Documents Moved Successfully', - 'LBL_DENIED_DOCUMENTS' => 'Denied Documents' , + 'LBL_FOLDERS_LIST' => 'Lista cartelle' , + 'LBL_FOLDERS' => 'Cartelle' , + 'LBL_DOCUMENTS_MOVED_SUCCESSFULLY' => 'Documenti Spostati con Successo', + 'LBL_DENIED_DOCUMENTS' => 'Documenti Negati' , 'MB' => 'MB' , 'LBL_ADD_NEW_FOLDER' => 'Aggiungi cartella' , 'LBL_FOLDER_NAME' => 'Nome cartella' , - 'LBL_FOLDER_DESCRIPTION' => 'Folder Description' , - 'LBL_FILE_AVAILABLE' => 'File is available for download', - 'LBL_FILE_NOT_AVAILABLE' => 'This Document is not available for Download', + 'LBL_FOLDER_DESCRIPTION' => 'Descrizione Cartella' , + 'LBL_FILE_AVAILABLE' => 'File disponibile per scaricamento', + 'LBL_FILE_NOT_AVAILABLE' => 'Questo documento non è disponibile per scaricamento', 'LBL_VIEW_FILE' => 'Visualizza File', 'LBL_PREVIEW_NOT_AVAILABLE' => 'Anteprima non disponibile', 'LBL_VIEW_FILE' => 'Visualizza File', @@ -77,21 +77,21 @@ $languageStrings = array( 'LBL_SELECT_A_FOLDER_TO_MOVE' => 'Si prega di selezionare una cartella di muoversi', ); $jsLanguageStrings = array( - 'JS_NEW_FOLDER' => 'New Folder' , - 'JS_MOVE_DOCUMENTS' => 'Move Documents' , - 'JS_ARE_YOU_SURE_YOU_WANT_TO_MOVE_DOCUMENTS_TO' => 'Are you sure you want to move the file(s) to', - 'JS_FOLDER' => 'folder' , - 'JS_OPERATION_DENIED' => 'Operation Denied' , - 'JS_FOLDER_IS_NOT_EMPTY' => 'Si prega Elimina / Sposta tutti i documenti contenuti nella cartella corrente prima di cancellarla', + 'JS_NEW_FOLDER' => 'Nuova Cartella' , + 'JS_MOVE_DOCUMENTS' => 'Sposta Documenti' , + 'JS_ARE_YOU_SURE_YOU_WANT_TO_MOVE_DOCUMENTS_TO' => 'Sei sicuro che vuoi spostare i file in', + 'JS_FOLDER' => 'cartella' , + 'JS_OPERATION_DENIED' => 'Operazione Negata' , + 'JS_FOLDER_IS_NOT_EMPTY' => 'Si prega Eliminare / Spostare tutti i documenti contenuti nella cartella corrente prima di cancellarla', 'JS_SPECIAL_CHARACTERS' => 'Caratteri speciali come', 'JS_NOT_ALLOWED' => 'non sono ammessi', - 'JS_DELETE_AND_TRASH_FILE_IN_DRIVE' => 'Eliminare file e trash in auto', + 'JS_DELETE_AND_TRASH_FILE_IN_DRIVE' => 'Eliminare file e cestino in Drive', 'JS_FAILED_TO_UPLOAD_FILE' => 'Impossibile caricare il file', 'JS_ARE_YOU_SURE_TO_REVOKE_ACCESS' => 'Sei sicuro di voler revocare l\'accesso?', 'JS_ACCESS_REVOKED' => 'Accesso revocato', - 'JS_DELETE_AND_TRASH_FILE_IN_DROPBOX' => 'Eliminare file e trash in dropbox', + 'JS_DELETE_AND_TRASH_FILE_IN_DROPBOX' => 'Eliminare file e cestino in dropbox', 'JS_UPLOAD_SUCCESSFUL' => 'Caricato con successo File', 'JS_UPLOAD_FAILED' => 'File Upload non riuscito', 'JS_DOCUMENT_CREATED' => 'Documento creato', 'JS_DOCUMENT_CREATION_FAILED' => 'La creazione di documenti fallita', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/EmailTemplates.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/EmailTemplates.php index 9d345dbfa978c1a86a9e7f4e94daa0ed0692dce1..df799e24dd8a531a4850c1d5a2976ea78ec6bda3 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/EmailTemplates.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/EmailTemplates.php @@ -8,25 +8,25 @@ * All Rights Reserved. *************************************************************************************/ $languageStrings = array( - 'Email Templates' => 'Email Template', - 'LBL_ADD_RECORD' => 'Add Email Template', - 'SINGLE_EmailTemplates' => 'Email Template', - 'LBL_EMAIL_TEMPLATES'=> 'Email Templates', - 'LBL_EMAIL_TEMPLATE' => 'Email Template', + 'Email Templates' => 'Modelli Email', + 'LBL_ADD_RECORD' => 'Aggiungi Modello Email', + 'SINGLE_EmailTemplates' => 'Modello Email', + 'LBL_EMAIL_TEMPLATES'=> 'Modelli Email', + 'LBL_EMAIL_TEMPLATE' => 'Modello Email', - 'LBL_TEMPLATE_NAME' => 'Template name', - 'LBL_DESCRIPTION' => 'Description', - 'LBL_SUBJECT' => 'Subject', - 'LBL_GENERAL_FIELDS' => 'General Fields', - 'LBL_SELECT_FIELD_TYPE' => 'Selezionare Module & Field', + 'LBL_TEMPLATE_NAME' => 'Nome Modello', + 'LBL_DESCRIPTION' => 'Descrizione', + 'LBL_SUBJECT' => 'Oggetto', + 'LBL_GENERAL_FIELDS' => 'Campi Generali', + 'LBL_SELECT_FIELD_TYPE' => 'Selezionare Modulo & Campo', 'LBL_MODULE_NAME' => 'Nome del modulo', - 'LBL_EMAIL_TEMPLATE_DESCRIPTION'=>'Manage templates for E-Mail module', - 'LBL_NO_PERMISSIONS_TO_DELETE_SYSTEM_TEMPLATE' => 'Non ci sono autorizzazioni per eliminare sistema Template', + 'LBL_EMAIL_TEMPLATE_DESCRIPTION'=>'Gestici modelli per modulo Email', + 'LBL_NO_PERMISSIONS_TO_DELETE_SYSTEM_TEMPLATE' => 'Non ci sono autorizzazioni per eliminare il Modello di Sistema', 'LBL_RECORD_ID' => 'ID record' , ); $jsLanguageStrings = array( - 'LBL_CUTOMER_LOGIN_DETAILS_TEMPLATE_DELETE_MESSAGE' => 'Non sarà in grado di inviare portale clienti dati d\'accesso al contatto se si elimina "Area Clienti Dettagli" template. Vuoi continuare?', - 'JS_REQUIRED_FIELD' => '* È necessaria messaggio', + 'LBL_CUTOMER_LOGIN_DETAILS_TEMPLATE_DELETE_MESSAGE' => 'Non sarà in grado di inviare portale clienti dati d\'accesso al contatto se si elimina il modello "Area Clienti Dettagli". Vuoi continuare?', + 'JS_REQUIRED_FIELD' => '* È un campo necessario', ); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Emails.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Emails.php index 0e8b06ecb4c3ceafc3be2fe65f71e0d9a9aff095..dd01e0609853ded5975d7e9919120a3a4595c1f4 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Emails.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Emails.php @@ -8,43 +8,43 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'SINGLE_Emails' => 'Email' , // TODO: Review - 'Emails' => 'Emails' , // TODO: Review - 'LBL_SELECT_EMAIL_IDS' => 'Select Email Addresses' , - 'LBL_SUBJECT' => 'Soggetto' , + 'SINGLE_Emails' => 'Email' , + 'Emails' => 'Le Email' , + 'LBL_SELECT_EMAIL_IDS' => 'Seleziona Indirizzo Email' , + 'LBL_SUBJECT' => 'Oggetto' , 'LBL_ATTACHMENT' => 'Allegato' , 'LBL_BROWSE_CRM' => 'Browse CRM' , 'LBL_SEND' => 'Invia' , - 'LBL_SAVE_AS_DRAFT' => 'Save as Draft' , - 'LBL_GO_TO_PREVIEW' => 'Go to Preview' , // TODO: Review + 'LBL_SAVE_AS_DRAFT' => 'Salva come Bozza' , + 'LBL_GO_TO_PREVIEW' => 'Vai all\'Anteprima' , 'LBL_SELECT_EMAIL_TEMPLATE' => 'Seleziona un Template Email' , 'LBL_COMPOSE_EMAIL' => 'Componi e-mail' , - 'LBL_TO' => 'To' , // TODO: Review + 'LBL_TO' => 'A' , 'LBL_CC' => 'CC :' , 'LBL_BCC' => 'CCN:' , - 'LBL_ADD_CC' => 'Add Cc' , - 'LBL_ADD_BCC' => 'Add Bcc' , - 'LBL_MAX_UPLOAD_SIZE' => 'Maximum upload size is' , - 'LBL_EXCEEDED' => 'Exceeded' , - 'LBL_FORWARD' => 'Forward' , // TODO: Review - 'LBL_PRINT' => 'Print' , // TODO: Review - 'LBL_DESCRIPTION' => 'Description' , // TODO: Review - 'LBL_FROM' => 'From' , // TODO: Review - 'LBL_INFO' => 'Info' , // TODO: Review - 'LBL_DRAFTED_ON' => 'Drafted on' , // TODO: Review - 'LBL_SENT_ON' => 'Sent on' , // TODO: Review - 'LBL_OWNER' => 'Owner' , // TODO: Review - 'Date & Time Sent' => 'Date Sent' , // TODO: Review - 'Time Start' => 'misit' , - 'LBL_EMAIL_INFORMATION' => 'E-mail Informazione', - 'LBL_EMAILTEMPLATE_WARNING' => 'Sono l unione-tag correggere', + 'LBL_ADD_CC' => 'Aggiungi Cc' , + 'LBL_ADD_BCC' => 'Aggiungi Ccn' , + 'LBL_MAX_UPLOAD_SIZE' => 'Massima dimensione per Upload è' , + 'LBL_EXCEEDED' => 'Troppo grande' , + 'LBL_FORWARD' => 'Inoltra' , + 'LBL_PRINT' => 'Stampa' , + 'LBL_DESCRIPTION' => 'Descrizione' , + 'LBL_FROM' => 'Da' , + 'LBL_INFO' => 'Info' , + 'LBL_DRAFTED_ON' => 'Bozza il' , + 'LBL_SENT_ON' => 'Spedita il' , + 'LBL_OWNER' => 'Proprietario' , + 'Date & Time Sent' => 'Data invio' , + 'Time Start' => 'Iniziato' , + 'LBL_EMAIL_INFORMATION' => 'Informazione E-mail', + 'LBL_EMAILTEMPLATE_WARNING' => 'Sono l\'unione-tag correggere', 'LBL_EMAILTEMPLATE_WARNING_CONTENT' => 'Si prega di assicurarsi che il modello selezionato dispone di unire-tag relativi al record destinatario. -                                            Se si invia una mail a piombo, ma l unione-tag appartieni Modulo di contatto (es: $contacts-lastname$), +                                            Se si invia una mail a un\'opportunità , ma l\'unione-tag appartiene al Modulo di contatto (es: $contacts-lastname$),                                             quindi non verranno uniti i valori.', 'Draft' => 'Bozza' , - 'Parent ID' => 'Parent Record', + 'Parent ID' => 'Record Padre', ); $jsLanguageStrings = array( 'JS_WARNING' => 'avviso', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Events.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Events.php index d2d411aa53232f4a114bcc369c8b63ab27802fea..b166a2bbcf1ff9f7e92150d7c53ba8219a027090 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Events.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Events.php @@ -10,24 +10,24 @@ $languageStrings = array( 'Events' => 'Eventi' , 'SINGLE_Events' => 'Evento' , - 'LBL_ADD_RECORD' => 'Add Event' , - 'LBL_RECORDS_LIST' => 'List View' , + 'LBL_ADD_RECORD' => 'Aggiungi Evento' , + 'LBL_RECORDS_LIST' => 'Vista Lista' , 'LBL_EVENTS' => 'Eventi' , 'LBL_TODOS' => 'Compito' , 'LBL_HOLD_FOLLOWUP_ON' => 'Tenere Followup On' , - 'LBL_CREATE_FOLLOWUP_EVENT' => 'Crea Follow Up Event' , + 'LBL_CREATE_FOLLOWUP_EVENT' => 'Crea Follow Up Evento' , 'LBL_EVENT_INFORMATION' => 'Dettagli evento' , - 'LBL_RECURRENCE_INFORMATION' => 'Recurrence Details' , - 'LBL_RELATED_TO' => 'Related To' , // TODO: Review + 'LBL_RECURRENCE_INFORMATION' => 'Dettagli Ricorrenza' , + 'LBL_RELATED_TO' => 'Relativo a' , 'Related To' => 'Relativi a' , 'Start Date & Time' => 'Data e Ora inizio' , 'Recurrence' => 'Ricorrenza' , - 'Send Notification' => 'Send Notification' , - 'Location' => 'Location' , - 'Send Reminder' => 'Send Reminder' , + 'Send Notification' => 'Invia Notifica' , + 'Location' => 'Luogo' , + 'Send Reminder' => 'Invia Promemoria' , 'End Date & Time' => 'Data e Ora Fine' , - 'End Date' => 'Data e Ora Fine' , - 'Activity Type' => 'Tipo Attività' , + 'End Date' => 'Data Fine' , + 'Activity Type' => 'Tipo Attività ' , 'Visibility' => 'Visibilità ' , 'Private' => 'Privato' , 'Public' => 'Pubblico' , @@ -36,42 +36,42 @@ $languageStrings = array( 'Planned' => 'Pianificato' , 'Held' => 'Tenuto' , 'Not Held' => 'Non Tenuto' , - 'LBL_DAYS' => 'Days' , - 'LBL_HOURS' => 'Hours' , - 'LBL_DAYS_TYPE' => 'Day(s)' , // TODO: Review - 'LBL_WEEKS_TYPE' => 'Week(s)' , // TODO: Review - 'LBL_MONTHS_TYPE' => 'Month(s)' , // TODO: Review - 'LBL_YEAR_TYPE' => 'Year' , // TODO: Review - 'LBL_FIRST' => 'First' , // TODO: Review - 'LBL_LAST' => 'Last' , // TODO: Review - 'LBL_SM_SUN' => 'Sun' , // TODO: Review - 'LBL_SM_MON' => 'Mon' , // TODO: Review - 'LBL_SM_TUE' => 'Tue' , // TODO: Review - 'LBL_SM_WED' => 'Wed' , // TODO: Review - 'LBL_SM_THU' => 'Thr' , // TODO: Review - 'LBL_SM_FRI' => 'Fri' , // TODO: Review - 'LBL_SM_SAT' => 'Sat' , // TODO: Review - 'LBL_DAY0' => 'Sunday' , // TODO: Review - 'LBL_DAY1' => 'Monday' , // TODO: Review - 'LBL_DAY2' => 'Tuesday' , // TODO: Review - 'LBL_DAY3' => 'Wednesday' , // TODO: Review - 'LBL_DAY4' => 'Thursday' , // TODO: Review - 'LBL_DAY5' => 'Friday' , // TODO: Review - 'LBL_DAY6' => 'Saturday' , // TODO: Review - 'Daily' => 'Day(s)' , // TODO: Review - 'Weekly' => 'Week(s)' , // TODO: Review - 'Monthly' => 'Month(s)' , // TODO: Review - 'Yearly' => 'Year' , // TODO: Review - 'LBL_REPEATEVENT' => 'Una volta ogni' , // TODO: Review - 'LBL_UNTIL' => 'Until' , // TODO: Review - 'LBL_DAY_OF_THE_MONTH' => 'day of the month' , // TODO: Review - 'LBL_ON' => 'on' , // TODO: Review - 'LBL_CALENDAR_VIEW' => 'Calendar View' , - 'LBL_INVITE_USER_BLOCK' => 'Invite' , // TODO: Review - 'LBL_INVITE_USERS' => 'Invite Users' , // TODO: Review + 'LBL_DAYS' => 'Giorni' , + 'LBL_HOURS' => 'Ore' , + 'LBL_DAYS_TYPE' => 'Giorni' , + 'LBL_WEEKS_TYPE' => 'Settimane' , + 'LBL_MONTHS_TYPE' => 'Mesi' , + 'LBL_YEAR_TYPE' => 'Anno' , + 'LBL_FIRST' => 'Primo' , + 'LBL_LAST' => 'Ultimo' , + 'LBL_SM_SUN' => 'Dom' , + 'LBL_SM_MON' => 'Lun' , + 'LBL_SM_TUE' => 'Mar' , + 'LBL_SM_WED' => 'Mer' , + 'LBL_SM_THU' => 'Gio' , + 'LBL_SM_FRI' => 'Ven' , + 'LBL_SM_SAT' => 'Sab' , + 'LBL_DAY0' => 'Domenica' , + 'LBL_DAY1' => 'Lunedì' , + 'LBL_DAY2' => 'Martedì' , + 'LBL_DAY3' => 'Mercoledì' , + 'LBL_DAY4' => 'Giovedì' , + 'LBL_DAY5' => 'Venerdì' , + 'LBL_DAY6' => 'Sabato' , + 'Daily' => 'Giorni' , + 'Weekly' => 'Settimane' , + 'Monthly' => 'Mesi' , + 'Yearly' => 'Anno' , + 'LBL_REPEATEVENT' => 'Una volta ogni' , + 'LBL_UNTIL' => 'Fino' , + 'LBL_DAY_OF_THE_MONTH' => 'giorno del mese' , + 'LBL_ON' => 'il' , + 'LBL_CALENDAR_VIEW' => 'Vista Calendario' , + 'LBL_INVITE_USER_BLOCK' => 'Invita' , + 'LBL_INVITE_USERS' => 'Invita Utenti' , 'LBL_INVITE_PEOPLE' => 'Invita persone', 'INVITATION' => ' Invito ', 'Busy' => 'Occupato', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Faq.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Faq.php index 381a3bbf7854c1f7d4fb613e9d8c0c1130d66439..a632e0080633d84079e8616009aa524924ef787d 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Faq.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Faq.php @@ -10,17 +10,17 @@ $languageStrings = array( 'Faq' => 'FAQ' , 'SINGLE_Faq' => 'Faq' , - 'LBL_RECORDS_LIST' => 'FAQs List' , - 'LBL_ADD_RECORD' => 'Add FAQ' , + 'LBL_RECORDS_LIST' => 'Lista FAQ' , + 'LBL_ADD_RECORD' => 'Aggiungi FAQ' , 'LBL_FAQ_INFORMATION' => 'Informazione Faq' , 'LBL_COMMENT_INFORMATION' => 'Informazioni Commento' , 'Question' => 'Domanda' , 'Answer' => 'Risposta' , 'Comments' => 'Commenti' , - 'Faq No' => 'No. Faq' , + 'Faq No' => 'N. Faq' , 'General' => 'Generale' , 'Draft' => 'Bozza' , 'Published' => 'Pubblicato' , 'Obsolete' => 'Obsoleto' , 'LBL_SOLUTION' => 'SOLUZIONE' , -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Google.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Google.php index 33b5acdecf8390586df62f37a866ccbd46c4ba23..5747cb37f14169dd889fc749f64a8dde2bcc9a42 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Google.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Google.php @@ -10,8 +10,8 @@ $languageStrings = array( 'Map' => "Mappa", 'EXTENTIONNAME' => "Google", - 'LBL_UPDATES_CRM' => "Aggiornamenti in CRM", - 'LBL_UPDATES_GOOGLE' => "Aggiornamenti di Google", + 'LBL_UPDATES_CRM' => "Aggiornamenti CRM", + 'LBL_UPDATES_GOOGLE' => "Aggiornamenti Google", 'LBL_UPDATED' => "Aggiornato", 'LBL_ADDED' => "Aggiunto", 'LBL_DELETED' => "Soppresso", @@ -39,10 +39,10 @@ $languageStrings = array( 'LBL_PHONE' => 'Telefono', 'LBL_URL' => 'Url', 'LBL_CUSTOM' => 'Abitudine', - 'LBL_SELECT_SYNC_DIRECTION' => 'Selezionare Sync Direction', + 'LBL_SELECT_SYNC_DIRECTION' => 'Selezionare Direzione Sincronizzazione', 'LBL_BI_DIRECTIONAL_SYNC' => 'Sincronizza in entrambe le direzioni', - 'LBL_ONLY_SYNC_FROM_GOOGLE_TO_VTIGER' => 'Da Google a Vtiger solo', - 'LBL_ONLY_SYNC_FROM_VTIGER_TO_GOOGLE' => 'Da Vtiger a Google solo', + 'LBL_ONLY_SYNC_FROM_GOOGLE_TO_VTIGER' => 'Solo da Google a Vtiger', + 'LBL_ONLY_SYNC_FROM_VTIGER_TO_GOOGLE' => 'Solo da Vtiger a Google', 'Job Title' => 'Titolo', 'Company' => 'Azienda', 'Birthday' => 'Compleanno', @@ -62,23 +62,23 @@ $languageStrings = array( 'profile' => 'Profilo', 'blog' => 'Blog', 'home-page' => 'Homepage', - 'CALENDAR_SYNC_SETTINGS' => 'Calendario impostazioni di sincronizzazione', + 'CALENDAR_SYNC_SETTINGS' => 'Impostazioni Sincronizzazione Calendario', 'LBL_SELECT_GOOGLE_CALENDAR_TO_SYNC' => 'Seleziona Google Calendar', - 'LBL_SAVE_AND_START_SYNC' => 'Salvare e Start Sync', + 'LBL_SAVE_AND_START_SYNC' => 'Salvare e Cominciare Sincronizzazione', 'LBL_PRIMARY' => 'Primario', - 'LBL_SYNC_FROM_GOOGLE_TO_VTIGER' => 'Sync da google a vtiger', - 'LBL_SYNC_FROM_VTIGER_TO_GOOGLE' => 'Sincronizza dal vtiger to google', + 'LBL_SYNC_FROM_GOOGLE_TO_VTIGER' => 'Sincronizza da google a vtiger', + 'LBL_SYNC_FROM_VTIGER_TO_GOOGLE' => 'Sincronizza da vtiger a google', 'LBL_GOOGLE_CONNECT_MSG' => 'Connettersi a un account Google per recuperare', 'LBL_SIGN_IN_WITH_GOOGLE' => 'Accedi con Google', - 'LBL_GOOGLE_ACCOUNT_DETAILS' => 'Google Account Details', + 'LBL_GOOGLE_ACCOUNT_DETAILS' => 'Dettagli Account Google', 'LBL_GOOGLE_ACCOUNT_SYNCED_WITH' => 'Google Account sincronizzati con', 'LBL_CHANGE_USER' => 'Cambia utente', 'LBL_SAVE_AND_IMPORT' => 'Salvare e Importare', - 'LBL_IMPORT_RESULTS_GOOGLE' => 'Google Importazione risultati', + 'LBL_IMPORT_RESULTS_GOOGLE' => 'Importazione risultati Google', 'LBL_REDIRECT_URL' => 'URL di reindirizzamento', - 'LBL_REDIRECT_URL_MESSAGE' => 'Copiare il seguente URL di reindirizzamento e incollare nel vostro progetto di autenticazione di Google come spettacoli di immagini', + 'LBL_REDIRECT_URL_MESSAGE' => 'Copiare il seguente URL di reindirizzamento e incollare nel vostro progetto di autenticazione di Google come mostra l\'immagine', ); $jsLanguageStrings = array( 'LBL_SYNC_BUTTON' => "Sincronizzare Ora", diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/HelpDesk.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/HelpDesk.php index 86ccff2b9a0496736552ddb580346249362814d6..ea447350d6eade6b5286f62124a733000a447f25 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/HelpDesk.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/HelpDesk.php @@ -10,18 +10,18 @@ $languageStrings = array( 'HelpDesk' => 'Assistenza Clienti' , 'SINGLE_HelpDesk' => 'Ticket' , - 'LBL_ADD_RECORD' => 'Add Ticket' , - 'LBL_RECORDS_LIST' => 'Ticket List' , + 'LBL_ADD_RECORD' => 'Aggiungi Ticket' , + 'LBL_RECORDS_LIST' => 'Lista Ticket' , 'LBL_TICKET_INFORMATION' => 'Informazioni Ticket' , 'LBL_TICKET_RESOLUTION' => 'Informazioni Soluzione' , - 'Ticket No' => 'Biglietto n.' , + 'Ticket No' => 'Ticket n.' , 'Severity' => 'Importanza' , 'Update History' => 'Storico Aggiornamenti' , 'Hours' => 'Orario' , 'Days' => 'Giorni' , 'Title' => 'Titolo' , 'Solution' => 'Soluzione' , - 'From Portal' => 'From Portal' , + 'From Portal' => 'Dal Portale' , 'Big Problem' => 'Grosso Problema' , 'Small Problem' => 'Piccolo Problema' , 'Other Problem' => 'Altro Problema' , @@ -37,21 +37,21 @@ $languageStrings = array( 'Closed' => 'Chiuso' , 'LBL_STATUS' => 'Stato' , 'LBL_SEVERITY' => 'Importanza' , - 'LBL_CONVERT_FAQ' => 'Convert to FAQ' , + 'LBL_CONVERT_FAQ' => 'Converti in FAQ' , 'LBL_RELATED_TO' => 'Relazionato a' , 'Related To' => 'Relativi a' , //added to support i18n in ticket mails 'Hi' => 'Salve', - 'Dear' => 'Gentile', - 'LBL_PORTAL_BODY_MAILINFO' => 'Il ticket è', + 'Dear' => 'Egr.', + 'LBL_PORTAL_BODY_MAILINFO' => 'Il ticket è', 'LBL_DETAIL' => 'i dettagli sono :', 'LBL_REGARDS' => 'Cordiali saluti', 'LBL_TEAM' => 'Gruppo Assistenza Clienti', 'LBL_TICKET_DETAILS' => 'Dettaglio ticket', 'created' => 'creato', 'replied' => 'risposto', - 'reply' => 'C'è una risposta a ', + 'reply' => 'C\'è una risposta a ', 'customer_portal' => 'nel Portale Clienti di vTiger', 'link' => 'Puoi usare il seguente link per visualizzare le risposte date:', 'Thanks' => 'Grazie', @@ -59,8 +59,8 @@ $languageStrings = array( //This label for customerportal. 'LBL_STATUS_CLOSED' => 'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. - 'LBL_STATUS_UPDATE' => 'Lo stato del Ticket è aggiornato a', - 'LBL_COULDNOT_CLOSED' => 'Non è stato possibile chiudere il Ticket', + 'LBL_STATUS_UPDATE' => 'Lo stato del Ticket è aggiornato a', + 'LBL_COULDNOT_CLOSED' => 'Non è stato possibile chiudere il Ticket', 'LBL_CUSTOMER_COMMENTS' => 'Il Cliente ha fornito le seguenti informazioni aggiuntive alla tua risposta:', 'LBL_RESPOND' => 'Per cortesia rispondi al Ticket qui sopra il prima possibile.', 'LBL_SUPPORT_ADMIN' => 'Amministratore del Supporto Clienti', @@ -68,15 +68,15 @@ $languageStrings = array( 'LBL_RESPONSE_TO_TICKET_NUMBER' => 'Risposta al biglietto numero', 'LBL_CUSTOMER_PORTAL' => 'sul Portale Clienti - URGENTE', 'LBL_LOGIN_DETAILS' => 'Di seguito, i dettagli del tuo Login al Portale Clienti:', - 'LBL_MAIL_COULDNOT_SENT' => 'Non è stato possibile inviare la Mail', + 'LBL_MAIL_COULDNOT_SENT' => 'Non è stato possibile inviare la Mail', 'LBL_USERNAME' => 'Nome Utente :', 'LBL_PASSWORD' => 'Password :', 'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Relativamente ai dettagli del tuo Login al Portale Clienti', 'LBL_GIVE_MAILID' => 'Prego inserire il tuo indirizzo e-mail', 'LBL_CHECK_MAILID' => 'Per cortesia controlla la tua e-mail per il Portale Clienti', - 'LBL_LOGIN_REVOKED' => 'Il tuo login è stato revocato. Si prega di contattare l'amministratore.', - 'LBL_MAIL_SENT' => 'Una mail è stata inviata al tuo indirizzo di posta con i dettagli del tuo Login al Portale Clienti', - 'LBL_ALTBODY' => 'Questo è il corpo del messaggio in testo semplice per client di posta non-HTML', + 'LBL_LOGIN_REVOKED' => 'Il tuo login è stato revocato. Si prega di contattare l\'amministratore.', + 'LBL_MAIL_SENT' => 'Una mail è stata inviata al tuo indirizzo di posta con i dettagli del tuo Login al Portale Clienti', + 'LBL_ALTBODY' => 'Questo è il corpo del messaggio in testo semplice per client di posta non-HTML', 'LBL_TICKET_NUMBER' => 'Numero Ticket', 'Contact Name' => 'Nome Del Contatto', @@ -90,4 +90,4 @@ $languageStrings = array( 'LBL_OPEN_TICKETS' => 'Biglietti Aperto', 'LBL_CREATE_TICKET' => 'Creare Biglietto', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Home.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Home.php index bd8f613ce08184dd01eace3e1450816e8a3f2100..0041789059b5c8c079753898508396b46d661de5 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Home.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Home.php @@ -12,7 +12,7 @@ $languageStrings = array( 'PLVT' => 'Migliori Opportunità ' , 'QLTQ' => 'Migliori Preventivi' , 'CVLVT' => 'Indici chiave' , - 'HLT' => 'Top Support Tickets' , + 'HLT' => 'Migliori Ticket di Supporto' , 'GRT' => 'I miei Gruppi' , 'OLTSO' => 'Ordini di Vendita Importanti', 'ILTI' => 'Fatture Importanti' , @@ -25,10 +25,10 @@ $languageStrings = array( 'LBL_SAVE_ORDER' => 'Salvare L\'Ordine', 'LBL_ADD_NEW_DASHBOARD' => 'Aggiungere un nuovo pannello', - 'LBL_MAX_CHARACTERS_ALLOWED_DASHBOARD' => 'Massimo 30 caratteri sono consentiti per il nome cruscotto.', + 'LBL_MAX_CHARACTERS_ALLOWED_DASHBOARD' => 'Sono consentiti Massimo 30 caratteri per il nome del cruscotto.', ); $jsLanguageStrings = array( 'JS_TAB_NAME_SHOULD_NOT_BE_EMPTY' => 'nome cruscotto non può non essere vuoto', 'JS_NO_DATA_AVAILABLE' => 'Nessun dato disponibile', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Import.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Import.php index bdad579cc9f8ad37cdf75cbaf569af3c2ffeba73..d3331dc4fee3061e6960408c6fa8d0247d5c1f12 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Import.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Import.php @@ -8,67 +8,67 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_IMPORT_STEP_1' => 'Step 1' , - 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Select File' , - 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => ' Supported File Type(s): .CSV, .VCF', - 'LBL_IMPORT_STEP_2' => 'Step 2' , - 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Specify Format' , - 'LBL_FILE_TYPE' => 'File Type' , - 'LBL_CHARACTER_ENCODING' => 'Character Encoding' , + 'LBL_IMPORT_STEP_1' => 'Passo 1' , + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Seleziona il File' , + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Formati file supportati: .CSV, .VCF', + 'LBL_IMPORT_STEP_2' => 'Passo 2' , + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Specificare il Formato' , + 'LBL_FILE_TYPE' => 'Tipo File' , + 'LBL_CHARACTER_ENCODING' => 'Codifica Caratteri' , 'LBL_DELIMITER' => 'Delimitatore:' , 'LBL_HAS_HEADER' => 'Ha un Header (Intestazione)' , - 'LBL_IMPORT_STEP_3' => 'Step 3' , - 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Duplicate Record Handling' , - 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Select this option to enable and set duplicate merge criteria', - 'LBL_SPECIFY_MERGE_TYPE' => 'Select how duplicate records should be handled', - 'LBL_SELECT_MERGE_FIELDS' => 'Select the matching fields to find duplicate records', + 'LBL_IMPORT_STEP_3' => 'Passo 3' , + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Gestione Duplicati' , + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Seleziona questa opzione per abilitare e impostare come gestire i duplicati', + 'LBL_SPECIFY_MERGE_TYPE' => 'Seleziona come dovrebbero essere gestiti i Duplicati', + 'LBL_SELECT_MERGE_FIELDS' => 'Seleziona i campi da incrociare per trovare i duplicati', 'LBL_AVAILABLE_FIELDS' => 'Campi disponibili' , 'LBL_SELECTED_FIELDS' => 'Campi su cui effettuare la corrispondenza', 'LBL_NEXT_BUTTON_LABEL' => 'Prossimo' , - 'LBL_IMPORT_STEP_4' => 'Step 4' , - 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Map the Columns to Module Fields', - 'LBL_FILE_COLUMN_HEADER' => 'Header' , - 'LBL_ROW_1' => 'Row 1' , - 'LBL_CRM_FIELDS' => 'CRM Fields' , - 'LBL_DEFAULT_VALUE' => 'Default Value' , - 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Save as Custom Mapping ' , + 'LBL_IMPORT_STEP_4' => 'Passo 4' , + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Associare le Colonne ai Campi dei Moduli', + 'LBL_FILE_COLUMN_HEADER' => 'Intestazione' , + 'LBL_ROW_1' => 'Riga 1' , + 'LBL_CRM_FIELDS' => 'Campi CRM' , + 'LBL_DEFAULT_VALUE' => 'Valore di Default' , + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Salva come Associazione personalizzata ' , 'LBL_IMPORT_BUTTON_LABEL' => 'Importa' , - 'LBL_RESULT' => 'Result' , - 'LBL_TOTAL_RECORDS_IMPORTED' => 'Records successfully imported', - 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Records created' , - 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Records overwritten' , - 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Records skipped' , - 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Records merged' , - 'LBL_TOTAL_RECORDS_FAILED' => 'Records failed importing' , - 'LBL_IMPORT_MORE' => 'Importa di più' , - 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Last Imported Records' , - 'LBL_UNDO_LAST_IMPORT' => 'Annulla la scorsa importazione', + 'LBL_RESULT' => 'Risultato' , + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Record impostati con Successo', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Record creati' , + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Record sovrascritti' , + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Record saltati' , + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Record uniti' , + 'LBL_TOTAL_RECORDS_FAILED' => 'Record importazione fallita' , + 'LBL_IMPORT_MORE' => 'Importa di più' , + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Gli ultimi record Importati' , + 'LBL_UNDO_LAST_IMPORT' => 'Annulla l\'ultima importazione', 'LBL_FINISH_BUTTON_LABEL' => 'Fine' , - 'LBL_UNDO_RESULT' => 'Undo Import Result' , - 'LBL_TOTAL_RECORDS' => 'Total Number of Records' , - 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Number of records deleted' , + 'LBL_UNDO_RESULT' => 'Annulla il risultato dell\'importazione' , + 'LBL_TOTAL_RECORDS' => 'Numero Totale di Record' , + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Numero di Record Cancellati' , 'LBL_OK_BUTTON_LABEL' => 'Ok' , - 'LBL_IMPORT_SCHEDULED' => 'Import Scheduled' , - 'LBL_RUNNING' => 'Running' , - 'LBL_CANCEL_IMPORT' => 'Cancel Import' , + 'LBL_IMPORT_SCHEDULED' => 'Importazione Programmata' , + 'LBL_RUNNING' => 'In Corso' , + 'LBL_CANCEL_IMPORT' => 'Cancella Importazione' , 'LBL_ERROR' => 'Errore:' , - 'LBL_CLEAR_DATA' => 'Clear Data' , - 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Unable to import more data in this batch. Please start a new import.', - 'ERR_IMPORT_INTERRUPTED' => 'Current Import has been interrupted. Please try again later', - 'ERR_FAILED_TO_LOCK_MODULE' => 'Failed to lock the module for import. Re-try again later', - 'LBL_SELECT_SAVED_MAPPING' => 'Select Saved Mapping' , - 'LBL_IMPORT_ERROR_LARGE_FILE' => 'Import Error Large file ' , // TODO: Review - 'LBL_FILE_UPLOAD_FAILED' => 'File Upload Failed' , // TODO: Review - 'LBL_IMPORT_CHANGE_UPLOAD_SIZE' => 'Import Change Upload Size' , // TODO: Review - 'LBL_IMPORT_DIRECTORY_NOT_WRITABLE' => 'Import Directory is not writable', // TODO: Review - 'LBL_IMPORT_FILE_COPY_FAILED' => 'Import File copy failed' , // TODO: Review - 'LBL_INVALID_FILE' => 'Invalid File' , // TODO: Review - 'LBL_NO_ROWS_FOUND' => 'No rows found' , // TODO: Review - 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Your import has been scheduled and will start within 15 minutes. You will receive an email after import is completed. <br> <br> - Please make sure that the Outgoing server and your email address is configured to receive email notification', // TODO: Review - 'LBL_DETAILS' => 'Details' , // TODO: Review - 'skipped' => 'Skipped Records' , // TODO: Review - 'failed' => 'Failed Records' , // TODO: Review + 'LBL_CLEAR_DATA' => 'Cancella i dati' , + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Incapace di importare altri dati in questa sessione. Per favore comincia un\'altra importazione.', // 'Unable to import more data in this batch. Please start a new import.', + 'ERR_IMPORT_INTERRUPTED' => 'L\'importazione corrente è stata interrotta. Per favore prova più tardi.', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Non sono riuscito a bloccare il Modulo per l\'importazione. Prova più tardi.', + 'LBL_SELECT_SAVED_MAPPING' => 'Selezione un\'associazione salvata' , + 'LBL_IMPORT_ERROR_LARGE_FILE' => 'Errore: file di importazione troppo grande ' , + 'LBL_FILE_UPLOAD_FAILED' => 'Upload Fallito' , + 'LBL_IMPORT_CHANGE_UPLOAD_SIZE' => 'Cambia grandezza file da importare' , // TODO: Review + 'LBL_IMPORT_DIRECTORY_NOT_WRITABLE' => 'La cartella per l\'importazione non ha i permessi di scrittura', + 'LBL_IMPORT_FILE_COPY_FAILED' => 'Copia File Import Fallita' , // TODO: Review + 'LBL_INVALID_FILE' => 'File non Valido' , + 'LBL_NO_ROWS_FOUND' => 'Nessuna riga trovata' , + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'La tua importazione è stata programmata a cominciare entro 15 minuti. Ricevera un\'emal quando sarà completata. <br> <br> + Controlla che la configurazione del Server per l\'invio della posta e il tuo indirizzo siano impostati correttamente.', // TODO: Review + 'LBL_DETAILS' => 'Dettagli' , + 'skipped' => 'Record saltati' , + 'failed' => 'Record falliti' , 'LBL_IMPORT_LINEITEMS_CURRENCY'=> 'Valuta (voci)', @@ -92,7 +92,7 @@ $languageStrings = array( 'LBL_IMPORT_COMPLETED' => 'Importazione Completata', 'LBL_IMPORT_SUMMARY' => 'Riepilogo di importazione', 'LBL_DELETION_COMPLETED' => 'La Cancellazione Completata', - 'LBL_TOTAL_RECORDS_SCANNED' => 'Totale record acquisita', + 'LBL_TOTAL_RECORDS_SCANNED' => 'Totale record acquisiti', 'LBL_SKIP_BUTTON' => 'Saltare', 'LBL_DUPLICATE_RECORD_HANDLING' => 'Duplica il record di movimentazione', 'LBL_IMPORT_FROM_VCF_FILE' => 'Importazione da file VCF', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Invoice.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Invoice.php index 58a7c0cc1f835e72794b61de0a6ab3dc04a55456..1aa9dc3de494feafffdb925cc385aaeb6432794b 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Invoice.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Invoice.php @@ -11,8 +11,8 @@ $languageStrings = array( 'Invoice' => 'Fatture' , 'SINGLE_Invoice' => 'Fattura' , 'LBL_EXPORT_TO_PDF' => 'Esporta in PDF' , - 'LBL_SEND_MAIL_PDF' => 'Send Email with PDF' , // TODO: Review - 'LBL_ADD_RECORD' => 'Add Invoice' , + 'LBL_SEND_MAIL_PDF' => 'Invia Email con PDF' , + 'LBL_ADD_RECORD' => 'Aggiungi Fattura' , 'LBL_RECORDS_LIST' => 'Lista fatture' , 'LBL_INVOICE_INFORMATION' => 'Informazioni Fattura' , 'Sales Order' => 'Ordine di Vendita' , @@ -21,19 +21,19 @@ $languageStrings = array( 'Purchase Order' => 'Ordine di Acquisto' , 'Sales Commission' => 'Commissioni Vendita' , 'Invoice No' => 'Fattura Numero' , - 'LBL_RECEIVED' => 'Received' , // TODO: Review - 'LBL_BALANCE' => 'Balance' , // TODO: Review + 'LBL_RECEIVED' => 'Ricevuta' , + 'LBL_BALANCE' => 'Saldo' , 'Sent' => 'Spedito' , 'Credit Invoice' => 'Fattura di Accredito' , 'Paid' => 'Pagato' , - 'AutoCreated' => 'AutoCreated' , + 'AutoCreated' => 'AutoCreato' , 'Cancel' => 'Annulla' , - 'LBL_NOT_A_BUNDLE' => 'Non � un Bundle', + 'LBL_NOT_A_BUNDLE' => 'Non è un Bundle', 'LBL_SUB_PRODUCTS' => 'Prodotti Sub', 'LBL_ACTION' => 'Azione', 'LBL_THIS' => 'Questo', - 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema.si prega di rimuovere o sostituire questo elemento', - 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema,si prega di rimuovere questa riga di elementi', + 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema. Si prega di rimuovere o sostituire questo elemento', + 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema, si prega di rimuovere questa riga di elementi', ); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Leads.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Leads.php index 0fc9fc5af418fedb35b8ae1cf2891dfaa0f37860..bd05a73c591c00866edccc168cc89a3f759e2f3f 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Leads.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Leads.php @@ -11,10 +11,10 @@ $languageStrings = array( 'Leads' => 'Leads' , 'SINGLE_Leads' => 'Lead' , 'LBL_RECORDS_LIST' => 'Leads List' , - 'LBL_ADD_RECORD' => 'Add Lead' , + 'LBL_ADD_RECORD' => 'Aggiungi Lead' , 'LBL_LEAD_INFORMATION' => 'Informazioni Lead' , - 'Lead No' => 'No. Lead' , - 'Company' => 'Società' , + 'Lead No' => 'N. Lead' , + 'Company' => 'Società ' , 'Designation' => 'Designazione' , 'Website' => 'Sito Web' , 'Industry' => 'Settore' , @@ -38,13 +38,13 @@ $languageStrings = array( 'Qualified' => 'Qualificato' , 'Warm' => 'Caldo' , 'LBL_CONVERT_LEAD' => 'Converti Lead:' , - 'LBL_TRANSFER_RELATED_RECORD' => 'Transfer related record to' , - 'LBL_CONVERT_LEAD_ERROR' => 'You have to enable either Organization or Contact to convert the Lead', - 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Leads Field Mapping is incomplete(Settings > Module Manager > Leads > Leads Field Mapping)', + 'LBL_TRANSFER_RELATED_RECORD' => 'Trasferisci recordo collegato a' , + 'LBL_CONVERT_LEAD_ERROR' => 'Devi aver abilitato o Aziende o Contatti per convertire il Lead', + 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'La mappatura dei campi Leads è incompleta (Impostazioni > Module Manager > Leads > Leads Field Mapping)', 'LBL_LEADS_FIELD_MAPPING' => 'Leads Field Mapping' , - 'LBL_CUSTOM_FIELD_MAPPING' => 'Piombo Mappatura conversione dati' , - 'LBL_IMAGE_INFORMATION' => 'Foto di profilo', - 'Lead Image' => 'Immagine di piombo', + 'LBL_CUSTOM_FIELD_MAPPING' => 'Mappatura personalizzata dei dati Lead' , + 'LBL_IMAGE_INFORMATION' => 'Foto del profilo', + 'Lead Image' => 'Immagine del Lead', 'Phone' => 'Telefono Principale', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/MailManager.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/MailManager.php index 7054c6ed6f98f5041bde58d71efa2fbfe317fc69..432b7602268a3b4143bcacf07000d3c205684c25 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/MailManager.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/MailManager.php @@ -11,9 +11,9 @@ $languageStrings = array( 'MailManager' => 'Mail Manager', 'LBL_Folders' => 'Cartelle', - 'LBL_Newer' => 'Newer', + 'LBL_Newer' => 'Nuovi', 'LBL_Older' => 'Maggiore', - 'LBL_No_Mails_Found' => 'Nessun mails trovato.', + 'LBL_No_Mails_Found' => 'Nessun email trovata.', 'LBL_Go_Back' => 'Indietro', 'LBL_Reply_All' => 'Rispondi a tutti', 'LBL_Reply' => 'Rispondere', @@ -24,7 +24,7 @@ $languageStrings = array( 'LBL_Mailbox' => 'Cassetta della posta', 'LBL_Outbox' => 'CRM uscita', 'LBL_Like' => 'come', - 'LBL_Mail_Server' => 'Mail Nome server o indirizzo IP', + 'LBL_Mail_Server' => 'Nome server mail o indirizzo IP', 'LBL_Refresh' => 'Aggiorna', 'LBL_Cancel' => 'Cancellare', 'LBL_Send' => 'Inviare', @@ -32,13 +32,13 @@ $languageStrings = array( 'LBL_Forward' => 'Avanti', 'LBL_Remove' => 'Rimuovere', 'LBL_Associate' => 'Associate', - 'LBL_Create_Contact' => 'Creazione di contatto', + 'LBL_Create_Contact' => 'Creazione contatto', 'LBL_No_Matching_Record_Found' => 'Non ha prodotto risultati.', 'LBL_ACTIONS' => 'Azioni', 'LBL_Search' => 'Ricerca', 'LBL_Delete' => 'Cancellare', 'LBL_Username' => 'Nome utente', - 'LBL_Your_Mailbox_Account' => 'il tuo account di cassetta postale', + 'LBL_Your_Mailbox_Account' => 'il tuo account mail', 'LBL_Password' => 'Password', 'LBL_Account_Password' => "password dell'account", 'LBL_Protocol' => 'Protocollo', @@ -55,21 +55,21 @@ $languageStrings = array( 'LBL_FROM' => 'Da', 'LBL_TO' => 'a', 'LBL_CC' => 'CC', - 'LBL_BCC' => 'BCC', + 'LBL_BCC' => 'CCN', 'LBL_Date' => 'Data', 'LBL_Attachments' => 'Allegati', - 'LBL_EMAIL_TEMPLATES_LIST' => 'Email Templates', - 'LBL_SELECT_EMAIL_TEMPLATE' => 'Selezionare Email template', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Modelli Email', + 'LBL_SELECT_EMAIL_TEMPLATE' => 'Selezionare Modello Email', 'LBL_ATTACHMENTS' => 'Allegato:', 'LBL_SELECT_DOCUMENTS' => 'Selezionare Documenti', 'LBL_IN' => 'in', 'LBL_FIND' => 'Trovare', - 'LBL_SAVE_NOW' => 'Save Now', - 'LBL_Drafts' => 'Dama', - 'LBL_NO_EMAILS_SELECTED' => 'Nessuna e-mail selezionate.', - 'LBL_SUBJECT' => 'Soggetto', + 'LBL_SAVE_NOW' => 'Salva adesso', + 'LBL_Drafts' => 'Bozza', + 'LBL_NO_EMAILS_SELECTED' => 'Nessuna e-mail selezionata.', + 'LBL_SUBJECT' => 'Oggetto', 'LBL_WRITE_ACCESS_FOR' => 'Accesso in scrittura per', - 'LBL_READ_ACCESS_FOR' => 'Leggi accesso', + 'LBL_READ_ACCESS_FOR' => 'Accesso in lettura per', 'LBL_MODULE_DENIED' => 'Modulo negato!', 'LBL_REFRESH_TIME' => 'Aggiorna Ora', 'LBL_NONE' => 'Nessuno', @@ -77,9 +77,9 @@ $languageStrings = array( 'LBL_10_MIN' => '10 Minuti', 'LBL_MOVE_TO' => 'Sposta in ...', 'LBL_MAILMANAGER_ADD_Contacts' => 'Aggiungi contatto', - 'LBL_MAILMANAGER_ADD_Accounts' => 'Aggiungi Organization', - 'LBL_MAILMANAGER_ADD_Leads' => 'Aggiungi piombo', - 'LBL_MAILMANAGER_ADD_Calendar' => 'Aggiungi evento / To Do', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Aggiungi Azienda', + 'LBL_MAILMANAGER_ADD_Leads' => 'Aggiungi Lead', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Aggiungi evento / Attività ', 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Aggiungi Ticket', 'LBL_MAILMANAGER_ADD_Emails' => 'Allega Email', 'LBL_MAILMANAGER_ADD_ModComments' => 'Aggiungi un commento', @@ -98,12 +98,12 @@ $languageStrings = array( 'LBL_MAILBOX_DETAILS' => 'Aggiungi il tuo commento qui ...', 'LBL_DELETE_Mailbox' => 'Elimina cassetta postale', 'LBL_ACCOUNT_TYPE' => 'Tipo di account', - 'LBL_MODULE_DESCRIPTION' => "Mail Manager è un client di posta elettronica integrato che consente agli utenti di eseguire azioni relative CRM on-mail in arrivo. Esso consente di creare contatti, Contatti, Organizzazioni, Trouble Ticket e Attività dalle e-mail che si ricevono nella tua casella di posta. Dovrebbe email partita id del mittente con un record in vtiger CRM, è possibile eseguire altre azioni come, Montaggio e-mail, l'aggiunta di attività , il commento e biglietteria. Inoltre, è possibile gestire la composizione, rispondere, inoltrare messaggi di posta elettronica etc.", + 'LBL_MODULE_DESCRIPTION' => "Mail Manager è un client di posta elettronica integrato che consente agli utenti di eseguire azioni relative al CRM sulle email in arrivo. Esso ti aiuta creare Contatti, Aziende, Ticket di supporto e Attività dalle e-mail che si ricevono nella tua casella di posta. L'email del mittente dovrebbe coincidere con quella inserita nei record di VTiger CRM, è possibile eseguire altre azioni come: allegare e-mail, l'aggiunta di attività , il commento e supporto. Inoltre, è possibile gestire la composizione, rispondere, inoltrare messaggi di posta elettronica etc.", 'LBL_CHOOSE_EXISTING_FOLDER' => 'Scegli una cartella esistente', - 'LBL_CHOOSE_FOLDER_DESC' => 'Copie delle mail inviate per questo account verranno salvate nel predefinito <b> Posta inviata </ ​​b> cartella. <br> Se si desidera modificare il valore predefinito inviato cartella di posta, dopo aver creato la casella di posta clicca su < b> Impostazioni </ b> e <b> Modifica </ b> la cassetta postale.', + 'LBL_CHOOSE_FOLDER_DESC' => 'Copie delle mail inviate per questo account verranno salvate nella cartella predefinita <b> Posta inviata </ ​​b>. <br> Se si desidera modificare il valore predefinito della cartella Posta inviata, dopo aver creato la casella di posta clicca su < b> Impostazioni </ b> e <b> Modifica </ b> la cassetta postale.', 'LBL_CHOOSE_FOLDER' => 'Copie delle mail inviate per questo account verranno salvati in questa cartella.', 'LBL_SELECTED_FOLDER' => 'Cartella selezionata', - 'LBL_MAILMANAGER_ADD_Potentials' => 'Aggiungi Opportunity', + 'LBL_MAILMANAGER_ADD_Potentials' => 'Aggiungi Opportunità ', 'LBL_EDIT_MAILBOX' => 'Modifica Casella Postale', 'LBL_SELECT_ACCOUNT' => 'Selezionare Account', @@ -116,28 +116,28 @@ $languageStrings = array( 'LBL_NO_MAIL_SELECTED_DESC' => 'Nessun messaggio selezionato. Fare clic su posta elettronica per l\'anteprima.', 'LBL_FILES' => 'file', 'LBL_CC_SMALL' => 'Cc', - 'LBL_BCC_SMALL' => 'Bcc', + 'LBL_BCC_SMALL' => 'Ccn', 'LBL_MARK_AS_READ' => 'Segna come già letti', 'LBL_ADD_CALENDAR' => 'Aggiungi Attività ', 'LBL_ADD_EVENTS' => 'Aggiungi Evento', 'JSLBL_ENTER_VALID_EMAIL_ADDRESS' => 'Si prega di inserire un indirizzo email valido.', - 'JSLBL_MAILS_DELETED' => 'Mail(s eliminato con successo.', - 'JSLBL_MAILS_MARKED_UNREAD' => 'Mail(s contrassegnati come non letti.', - 'JSLBL_MAILS_MARKED_READ' => 'Mail(s contrassegnati come letti.', + 'JSLBL_MAILS_DELETED' => 'Email eliminata con successo.', + 'JSLBL_MAILS_MARKED_UNREAD' => 'Email contrassegnati come non letti.', + 'JSLBL_MAILS_MARKED_READ' => 'Email contrassegnati come letti.', 'LBL_MAILMANAGER_ADD_Cases' => 'Aggiungere Caso', ); $jsLanguageStrings = array( 'JSLBL_Body_Cannot_Be_Empty' => 'Corpo non può essere vuoto', - 'JSLBL_Loading_Please_Wait' => 'Loading Attendere prego', + 'JSLBL_Loading_Please_Wait' => 'Caricamento Attendere prego', 'JSLBL_Loading' => 'Caricamento', 'JSLBL_Settings' => 'Impostazioni', 'JSLBL_Opening' => 'Apertura', 'JSLBL_Deleting' => 'Eliminazione', 'JSLBL_Updating' => 'Aggiornamento', 'JSLBL_Associating' => 'Associare', - 'JSLBL_Saving_And_Verifying' => 'Saving & Verifica', + 'JSLBL_Saving_And_Verifying' => 'Salvare & Verificare', 'JSLBL_Failed_To_Open_Mail' => 'Impossibile aprire la posta', 'JSLBL_Finding_Relation' => 'Trovare relazione', 'JSLBL_Find_Relation_Now' => 'Trova rapporto ora', @@ -146,7 +146,7 @@ $jsLanguageStrings = array( 'JSLBL_Sending' => 'Invio', 'JSLBL_Replied' => 'Risposto', 'JSLBL_Failed_To_Send_Mail' => 'Impossibile inviare la posta', - 'JSLBL_Recepient_Cannot_Be_Empty' => 'Destinatario (To) non può essere vuoto', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Destinatario (A) non può essere vuoto', 'JSLBL_Subject_Cannot_Be_Empty' => 'Oggetto non può essere vuoto', 'JSLBL_Removing' => 'Rimozione', 'JSLBL_Choose_Server_Type' => 'Scegli il tipo di server', @@ -166,15 +166,15 @@ $jsLanguageStrings = array( 'JSLBL_UPLOAD_DROPFILES' => 'Drop dei file da caricare qui', 'JSLBL_UPLOAD_FILE' => 'Caricare', 'JSLBL_UPLOAD_DELETE' => '[X]', - 'JSLBL_UPLOAD_FAILED' => 'Mancato', + 'JSLBL_UPLOAD_FAILED' => 'Fallito', 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED' => 'File Upload Limite superato!', 'JSLBL_MAIL_SENT' => 'Posta inviata', 'JSLBL_EMAIL_FORMAT_INCORRECT' => 'Si prega di fornire indirizzo email corretto', - 'JSLBL_Saving' => 'Risparmio', - 'JSLBL_SaveWith_EmptySubject' => 'Risparmia con oggetto vuoto?', + 'JSLBL_Saving' => 'Salvataggio', + 'JSLBL_SaveWith_EmptySubject' => 'Salva con senza oggetto?', 'JSLBL_Delete' => 'Cancellare', - 'JSLBL_Drafts' => 'Dama', - 'JSLBL_PASSWORD_CANNOT_BE_EMPTY' => 'La password non può essere vuoto', + 'JSLBL_Drafts' => 'Bozza', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY' => 'La password non può essere vuota', 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY' => 'Nome server non può essere vuoto', 'JSLBL_USERNAME_CANNOT_BE_EMPTY' => 'Nome utente non può essere vuoto', 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY' => 'Nome organizzazione non può essere vuoto', @@ -184,30 +184,30 @@ $jsLanguageStrings = array( 'JSLBL_TO' => 'A:', 'JSLBL_CC' => 'Cc:', 'JSLBL_FORWARD_MESSAGE_TEXT' => '---------- Messaggio inoltrato ----------', - 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL' => 'Si prega di selezionare almeno una posta', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL' => 'Si prega di selezionare almeno un indirizzo email', 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD' => 'Si prega di selezionare almeno un record', - 'JSLBL_MAIL_MOVED' => 'Mail (s) si è trasferito', - 'JSLBL_MOVING' => 'Posta Muoversi (s)', + 'JSLBL_MAIL_MOVED' => 'Email spostata', + 'JSLBL_MOVING' => 'Spostando le email', 'JSLBL_LOADING_FOLDERS' => 'Caricamento cartelle ..', 'JSLBL_ADD_COMMENT' => 'Aggiungi un commento', 'JSLBL_Yahoo' => 'Yahoo', 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Il commento non può essere vuoto', 'JSLBL_NO_EMAILS_SELECTED' => 'Nessuna e-mail selezionate.', 'JSLBL_ENTER_SOME_VALUE' => 'Inserisci qualche stringa da cercare', - 'JSLBL_DRAFT_MAIL_SAVED' => 'Mail viene salvato in Bozze', - 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Non possiamo essere ritenuti Per Futuro', - 'LBL_DELETE_CONFIRMATION' => "Sei sicuro di voler cancellare l'e-mail (s) in modo permanente?", + 'JSLBL_DRAFT_MAIL_SAVED' => 'Email salvata in Bozze', + 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Gli eventi futuri non possono essere tenuti', + 'LBL_DELETE_CONFIRMATION' => "Sei sicuro di voler cancellare l'e-mail in modo permanente?", 'JS_DELETE_MAILBOX_SETTINGS_CONFIRMATION' => 'Sei sicuro di voler eliminare?', - 'JSLBL_NO_MAIL_SELECTED_DESC' => 'Nessun messaggio selezionato. Clicca su posta elettronica per l\'anteprima.', + 'JSLBL_NO_MAIL_SELECTED_DESC' => 'Nessun messaggio selezionato. Clicca su email per l\'anteprima.', 'JSLBL_FAILED_ADDING_COMMENT' => 'Impossibile aggiungere commento', 'MailManager' => 'Gestore Di Posta Elettronica', 'JSLBL_ENTER_VALID_EMAIL_ADDRESS' => 'Si prega di inserire un indirizzo email valido.', - 'JSLBL_MAILS_DELETED' => 'Mail(s eliminato con successo.', - 'JSLBL_MAILS_MARKED_UNREAD' => 'Mail(s contrassegnati come non letti.', - 'JSLBL_MAILS_MARKED_READ' => 'Mail(s contrassegnati come letti.', + 'JSLBL_MAILS_DELETED' => 'Mail eliminata con successo.', + 'JSLBL_MAILS_MARKED_UNREAD' => 'Mail contrassegnati come non letti.', + 'JSLBL_MAILS_MARKED_READ' => 'Mail contrassegnati come letti.', ); //Special Handling: Mix of language strings are used. -$languageStrings = array_merge($languageStrings, $jsLanguageStrings); \ No newline at end of file +$languageStrings = array_merge($languageStrings, $jsLanguageStrings); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Migration.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Migration.php index 7f2ef4bf95d1700f718a64685578e03a2c586528..78394f0545d9bd241a3080cbf3a36a69557f76b2 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Migration.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Migration.php @@ -8,12 +8,12 @@ * All Rights Reserved. *************************************************************************************/ $languageStrings = array( - 'LBL_VTIGER_MIGRATION' => 'Benvenuti in materia di migrazione Vtiger', - 'LBL_MIGRATION_COMPLETED' => 'Migrazione Completato', + 'LBL_VTIGER_MIGRATION' => 'Benvenuti in migrazione Vtiger', + 'LBL_MIGRATION_COMPLETED' => 'Migrazione Completata', 'LBL_MIGRATION_WIZARD' => 'Migrazione guidata', - 'LBL_PRIDE_BEING_ASSOCIATED' => 'Siamo orgogliosi di essere associati con voi.', - 'LBL_TALK_TO_US_AT_FORUMS' => 'Hai delle domande? Trova aiuto su Vtiger <a href="http://forums.vtiger.com" target="_blank"> Discussioni </a><br>', - 'LBL_DISCUSS_WITH_US_AT_BLOGS' => 'Per saperne di più su Vtiger seguici nostra <a href="http://blogs.vtiger.com" target="_blank">Blog</a>', + 'LBL_PRIDE_BEING_ASSOCIATED' => 'Siamo orgogliosi di essere associati a voi.', + 'LBL_TALK_TO_US_AT_FORUMS' => 'Hai delle domande? Trova aiuto su Vtiger <a href="http://forums.vtiger.com" target="_blank"> Forum </a><br>', + 'LBL_DISCUSS_WITH_US_AT_BLOGS' => 'Per saperne di più su Vtiger seguici sul <a href="http://blogs.vtiger.com" target="_blank">Blog</a>', 'LBL_CRM_DOCUMENTATION' => 'Vtiger6 Aiuto - <a href="http://wiki.vtiger.com/vtiger6" target="_blank">Documentaion</a> , <a href="http://www.youtube.com/vtiger" target="_blank">Video</a> <BR>', 'LBL_THANKS' => 'Grazie per aver utilizzato <b>vtiger CRM</b>', 'LBL_WE_AIM_TO_BE_BEST' => 'Miriamo ad essere - semplicemente il migliore', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ModComments.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ModComments.php index b98d446bf09f3b561d60bc0343a2879565aa0188..a5ecb9ef905484f333247f4c865804c76b1f4e25 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ModComments.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ModComments.php @@ -8,14 +8,14 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'SINGLE_ModComments' => 'Comment' , - 'LBL_RECORDS_LIST' => 'Comments List' , - 'LBL_MODCOMMENTS_INFORMATION' => 'Comments' , - 'LBL_OTHER_INFORMATION' => 'Other Information' , - 'LBL_ADDING_COMMENT' => 'Adding Comment' , - 'LBL_WRITE_YOUR_COMMENT_HERE' => 'Enter comments here' , - 'Comment' => 'Comment' , - 'Creator' => 'Creator' , + 'SINGLE_ModComments' => 'Commento' , + 'LBL_RECORDS_LIST' => 'Lista commenti' , + 'LBL_MODCOMMENTS_INFORMATION' => 'Commenti' , + 'LBL_OTHER_INFORMATION' => 'Altre informazioni' , + 'LBL_ADDING_COMMENT' => 'Aggiungi Commento' , + 'LBL_WRITE_YOUR_COMMENT_HERE' => 'Inserisci i commenti qui' , + 'Comment' => 'Commento' , + 'Creator' => 'Creatore' , 'Related To Comments' => 'Relazionato a' , 'LBL_COMMENTED_AT' => 'Ha commentato a' , ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PBXManager.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PBXManager.php index a6b1c5f45be734f83b63f81feaa41de05fe151a0..b5a4bfffb006dd9a507dd0055ad4b8552c3ea45a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PBXManager.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PBXManager.php @@ -8,10 +8,10 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Asterisk' => 'Asterisk' , + 'Asterisk' => 'Asterisco' , 'PBXManager' => 'Gestione chiamate' , 'SINGLE_PBXManager' => 'Gestione chiamate' , - 'LBL_CALL_INFORMATION' => 'Call Details' , + 'LBL_CALL_INFORMATION' => 'Dettagli chiamata' , 'Call From' => 'Chiamata da' , 'Call To' => 'Chiamata verso' , 'Time Of Call' => 'Durata chiamata' , diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Portal.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Portal.php index dc92aaf070a78b97dcd4007a881cd732e1cbeb53..22a0a7050fb41f380b31bd7843fc3df293f2ca64 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Portal.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Portal.php @@ -10,22 +10,22 @@ $languageStrings = array( 'Portal' => 'I nostri siti', 'LBL_ADD_BOOKMARK' => 'Aggiungi segnalibro', - 'LBL_BOOKMARK_NAME' => 'Bookmark Nome', - 'LBL_BOOKMARK_URL' => 'Bookmark Url', + 'LBL_BOOKMARK_NAME' => 'Nome Segnalibro', + 'LBL_BOOKMARK_URL' => 'Url Segnalibro', 'LBL_CREATED_ON' => 'Creato il', 'SINGLE_Portal' => 'Il nostro sito', - 'LBL_EDIT_BOOKMARK' => 'Edit Bookmark', - 'LBL_ENTER_BOOKMARK_NAME' => 'Inserisci Bookmark Nome', + 'LBL_EDIT_BOOKMARK' => 'Modifica Segnalibro', + 'LBL_ENTER_BOOKMARK_NAME' => 'Inserisci Nome Segnalibro', 'LBL_ENTER_URL' => 'Inserisci Url (www.example.com)', 'LBL_ADD_NEW_BOOKMARK' => 'Aggiungi nuovo segnalibro', - 'LBL_BOOKMARK_SAVED_SUCCESSFULLY' => 'Bookmark salvato con successo', + 'LBL_BOOKMARK_SAVED_SUCCESSFULLY' => 'Segnalibro salvato con successo', 'LBL_RECORD_DELETED_SUCCESSFULLY' => 'Record eliminato correttamente', 'LBL_OUR_SITES_LIST' => 'La nostra Lista Siti', 'LBL_BOOKMARKS_LIST' => 'Lista dei segnalibri', 'LBL_BOOKMARKS_DELETED_SUCCESSFULLY' => 'Segnalibri eliminati correttamente', - 'LBL_BOOKMARK' => 'Bookmark', + 'LBL_BOOKMARK' => 'Segnalibro', 'LBL_BOOKMARKS' => 'Segnalibri', - 'HTTP_ERROR' => 'Il sito che si sta tentando di aprire non è sicuro e potrebbe non aprire. Se si desidera comunque visualizzare la pagina web quindi è possibile fare clic sul bloccante contenuto nella barra degli indirizzi e abilitarlo.', + 'HTTP_ERROR' => 'Il sito che si sta tentando di aprire non è sicuro e potrebbe non aprirsi. Se si desidera comunque visualizzare la pagina web è possibile fare clic sul blocco contenuto nella barra degli indirizzi e abilitarlo.', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Potentials.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Potentials.php index 07ccf6139bea9e8b974903ea22ffbf1b1dccaa56..1dc7dd983e6f2ac589553c90317ade3841c013e6 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Potentials.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Potentials.php @@ -8,29 +8,29 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Potentials' => 'Opportunita\'' , - 'SINGLE_Potentials' => 'Opportunità' , - 'LBL_ADD_RECORD' => 'Add Opportunity' , - 'LBL_RECORDS_LIST' => 'Opportunities List' , - 'LBL_OPPORTUNITY_INFORMATION' => 'Informazioni Opportunità', - 'Potential No' => 'No. Opportunità' , + 'Potentials' => 'Opportunità ' , + 'SINGLE_Potentials' => 'Opportunità ' , + 'LBL_ADD_RECORD' => 'Aggiungi opportunità ' , + 'LBL_RECORDS_LIST' => 'Lista opportunità ' , + 'LBL_OPPORTUNITY_INFORMATION' => 'Informazioni Opportunità ', + 'Potential No' => 'N. Opportunità ' , 'Amount' => 'Ammontare' , 'Next Step' => 'Step successivo' , 'Sales Stage' => 'Stadio di vendita' , - 'Probability' => 'Probabilità (%)' , + 'Probability' => 'Probabilità (%)' , 'Campaign Source' => 'Fonte Campagna' , - 'Forecast Amount' => 'Entrate Weighted' , - 'Funnel' => 'Sales Funnel' , - 'Potentials by Stage' => 'Opportunities by Stage' , - 'Total Revenue' => 'Revenue by Salesperson' , - 'Top Potentials' => 'Top Opportunities' , - 'Forecast' => 'Sales Forecast' , + 'Forecast Amount' => 'Entrate Stimate' , + 'Funnel' => 'Funnel Vendite' , + 'Potentials by Stage' => 'Opportunità per stadio' , + 'Total Revenue' => 'Ritorno per Venditore' , + 'Top Potentials' => 'Migliori Opportunità ' , + 'Forecast' => 'Previsione Vendite' , 'Prospecting' => 'In Prospettiva' , 'Qualification' => 'Qualificazione' , 'Needs Analysis' => 'Da Analizzare' , - 'Value Proposition' => 'Proposto il valore' , + 'Value Proposition' => 'Valore proposto' , 'Id. Decision Makers' => 'Potere decisionale' , - 'Perception Analysis' => 'Analisi di percezione' , + 'Perception Analysis' => 'Analisi della percezione' , 'Proposal/Price Quote' => 'Proposta/Preventivo Prezzo' , 'Negotiation/Review' => 'Trattativa/Revisione' , 'Closed Won' => 'Chiuso VINTO' , @@ -38,26 +38,26 @@ $languageStrings = array( '--None--' => '--Nessuno--' , 'Existing Business' => 'Business Esistente' , 'New Business' => 'Nuovo Business' , - 'LBL_EXPECTED_CLOSE_DATE_ON' => 'Expected to close on' , - 'LBL_RELATED_CONTACTS' => 'Related Contacts' , // TODO: Review - 'LBL_RELATED_PRODUCTS' => 'Related Products' , // TODO: Review - 'Related To' => 'Nome organizzazione' , + 'LBL_EXPECTED_CLOSE_DATE_ON' => 'Stima chiusura entro' , + 'LBL_RELATED_CONTACTS' => 'Contatti collegati' , + 'LBL_RELATED_PRODUCTS' => 'Prodotti collegati' , + 'Related To' => 'Nome Azienda' , 'Type' => 'Tipo' , //Convert Potentials 'LBL_CONVERT_POTENTIAL' => 'Convertire Opportunità ', - 'LBL_POTENTIALS_FIELD_MAPPING' => 'Opportunità Mapping Campo', - 'LBL_CONVERT_POTENTIALS_ERROR' => 'Devi abilitare progetto per convertire il Opportunity', + 'LBL_POTENTIALS_FIELD_MAPPING' => 'Mappatura Campo Opportunità ', + 'LBL_CONVERT_POTENTIALS_ERROR' => 'Devi abilitare Progetti per convertire l\'Opportunità ', 'LBL_POTENTIALS_FIELD_MAPPING_INCOMPLETE' => 'Opportunità campo Mapping è incompleta (Impostazioni> Gestione moduli> Opportunità > Opportunità campo Mapping)', 'LBL_CREATE_PROJECT' => 'Crea progetto', //Potentials Custom Field Mapping - 'LBL_CUSTOM_FIELD_MAPPING'=> 'Possibilità di progetto di mappatura', + 'LBL_CUSTOM_FIELD_MAPPING'=> 'Modifica la Mappatura dei Campi', 'Contact Name' => 'Nome Del Contatto', ); $jsLanguageStrings = array( - 'JS_SELECT_PROJECT_TO_CONVERT_LEAD' => 'La conversione richiede la selezione di progetti', + 'JS_SELECT_PROJECT_TO_CONVERT_LEAD' => 'Conversione richiede la selezione di Progetti', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PriceBooks.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PriceBooks.php index d28588fd848739a568aea603145bf9128fa35250..5f7537838704e53122e610b6fbc11dc76f6cf346 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PriceBooks.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PriceBooks.php @@ -10,12 +10,12 @@ $languageStrings = array( 'PriceBooks' => 'Listini' , 'SINGLE_PriceBooks' => 'Listino' , - 'LBL_ADD_RECORD' => 'Add Price Book' , - 'LBL_RECORDS_LIST' => 'Price Books List' , + 'LBL_ADD_RECORD' => 'Aggiungi Listino' , + 'LBL_RECORDS_LIST' => 'Lista Listini' , 'LBL_PRICEBOOK_INFORMATION' => 'Informazioni Listino:' , - 'LBL_EDIT_LIST_PRICE' => 'Edit List Price' , + 'LBL_EDIT_LIST_PRICE' => 'Modifica Listino' , 'Price Book Name' => 'Nome Listino' , - 'PriceBook No' => 'No Listino' , + 'PriceBook No' => 'N. Listino' , 'LBL_UNIT_PRICE' => 'Prezzo unitario', 'LBL_ADD_TO' => 'Aggiungere a', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Products.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Products.php index f6e1dbedd15aa88195e57febf5e80dbf290f3551..96e28708db6131f0631461283b14a06641a58f8a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Products.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Products.php @@ -11,17 +11,17 @@ $languageStrings = array( 'Products' => 'Prodotti' , 'SINGLE_Products' => 'Prodotto' , 'LBL_ADD_RECORD' => 'Aggiungi Prodotto' , - 'LBL_RECORDS_LIST' => 'Products List' , + 'LBL_RECORDS_LIST' => 'Lista Prodotti' , 'LBL_PRODUCT_INFORMATION' => 'Informazioni Prodotto' , 'LBL_IMAGE_INFORMATION' => 'Informazioni Immagine Prodotto:', - 'LBL_STOCK_INFORMATION' => 'Informazioni Stock:' , + 'LBL_STOCK_INFORMATION' => 'Informazioni Magazzino:' , 'LBL_MORE_CURRENCIES' => 'Altre valute' , 'LBL_PRICES' => 'Prezzo prodotti' , 'LBL_PRICE' => 'Prezzo' , 'LBL_RESET_PRICE' => 'Annulla prezzo' , 'LBL_RESET' => 'Annulla' , - 'LBL_ADD_TO_PRICEBOOKS' => 'Add to PriceBooks' , - 'Product No' => 'No. prodotto' , + 'LBL_ADD_TO_PRICEBOOKS' => 'Aggiungi ai listini' , + 'Product No' => 'N. prodotto' , 'Part Number' => 'Numero di serie' , 'Product Active' => 'Prodotto Attivo' , 'Manufacturer' => 'Produttore' , @@ -29,19 +29,19 @@ $languageStrings = array( 'Website' => 'Sito Web' , 'Mfr PartNo' => 'Numero di Serie Produttore' , 'Vendor PartNo' => 'Numero di Serie Fornitore' , - 'Usage Unit' => 'Unità Utilizzo' , + 'Usage Unit' => 'Unità utilizzata' , 'Handler' => 'Responsabile' , 'Reorder Level' => 'Livello Riordino' , 'Tax Class' => 'Classe di Tasse' , 'Serial No' => 'Numero di Serie' , - 'Qty In Stock' => 'Quantità in Stock' , + 'Qty In Stock' => 'Quantità in Stock' , 'Product Sheet' => 'Specifiche Prodotto' , - 'Qty In Demand' => 'Quantità in richiesta', + 'Qty In Demand' => 'Quantità in richiesta', 'GL Account' => 'Codice Contabile' , 'Product Image' => 'Immagine Prodotto' , 'Unit Price' => 'Prezzo Unitario' , 'Commission Rate' => 'Tasso commissione (%)' , - 'Qty/Unit' => 'Quantità/Unità', + 'Qty/Unit' => 'Quantità e Unità ', '--None--' => '--Nessuno--' , 'Hardware' => 'Hardware' , 'Software' => 'Software' , @@ -71,11 +71,11 @@ $languageStrings = array( 'Sheet' => 'Foglio' , 'Spiral Binder' => 'Raccoglitore a spirale ' , 'Sq Ft' => 'Sq Ft' , - 'LBL_CONVERSION_RATE' => 'Conversion Rate' , // TODO: Review - 'LBL_PRODUCTSMOD_DISABLED' => 'Abilita Prodotti Modulo per visualizzare i prodotti', - 'LBL_SHOW_BUNDLE_IN_INVENTORY' => 'Mostra articoli fascio di fattura/Quotes/Sales Order/Ordine di Acquisto', + 'LBL_CONVERSION_RATE' => 'Tasso di conversione' , // TODO: Review + 'LBL_PRODUCTSMOD_DISABLED' => 'Abilita Prodotti per visualizzare i prodotti', + 'LBL_SHOW_BUNDLE_IN_INVENTORY' => 'Mostra articoli Bundle in Fattura/Preventivi/Vendite/Acquisti', 'LBL_BUNDLE_TOTAL_COST' => 'Costo totale del Bundle', - 'LBL_UPDATE_BUNDLE_PRICE' => 'Aggiornamento Bundle Prezzo', + 'LBL_UPDATE_BUNDLE_PRICE' => 'Aggiornamento Prezzo Bundle', 'LBL_PRODUCT_NAME' => 'Nome Del Prodotto', 'LBL_PRICE_QUANTITY' => 'Prezzo x Quantità ', @@ -83,8 +83,8 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_SUB_PRODUCTS_WILL_BE_SHOWN_IN_INVENTORY' => 'Prodotti Sub verranno visualizzati nell"inventario', - 'JS_SUB_PRODUCTS_WILL_NOT_BE_SHOWN_IN_INVENTORY' => 'Prodotti secondari non verranno visualizzati nell"inventario', + 'JS_SUB_PRODUCTS_WILL_BE_SHOWN_IN_INVENTORY' => 'Prodotti Sub verranno visualizzati nel\'inventario', + 'JS_SUB_PRODUCTS_WILL_NOT_BE_SHOWN_IN_INVENTORY' => 'Prodotti secondari non verranno visualizzati nell\'inventario', 'JS_SUCCESSFULLY_CHANGED_BUNDLE_COST' => 'Costo totale cambiata con successo del fascio', - 'JS_DELETION_OR_IN_ACTIVATION_CHILD_PRODUCT_MESSAGE' => 'Questo prodotto fa parte di un pacchetto di prodotti. Il prezzo del pacchetto rimane invariato quando un elemento fascio viene eliminato o inattivato. Sei sicuro di voler continuare?', + 'JS_DELETION_OR_IN_ACTIVATION_CHILD_PRODUCT_MESSAGE' => 'Questo prodotto fa parte di un pacchetto di prodotti. Il prezzo del pacchetto rimane invariato quando un elemento Bundle viene eliminato o inattivato. Sei sicuro di voler continuare?', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Project.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Project.php index 135b7aafaec9e27e8d39d2e9ff0fad830b079b18..a945619f5183f1c4b87d9aaeeb5273167698d8f3 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Project.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Project.php @@ -10,42 +10,42 @@ $languageStrings = array( 'Project' => 'Progetto' , 'SINGLE_Project' => 'Progetto' , - 'LBL_ADD_RECORD' => 'Add Project' , - 'LBL_RECORDS_LIST' => 'Projects List' , + 'LBL_ADD_RECORD' => 'Aggiungi progetto' , + 'LBL_RECORDS_LIST' => 'Lista Progetti' , 'LBL_PROJECT_INFORMATION' => 'Informationi Progetto' , 'Project Name' => 'Nome Progetto' , 'Start Date' => 'Data di Inizio' , - 'Target End Date' => 'Target End Date' , - 'Actual End Date' => 'Actual End Date' , - 'Project No' => 'Project Number' , - 'Target Budget' => 'Target Budget' , - 'Project Url' => 'Project Url' , - 'Progress' => 'Progress' , + 'Target End Date' => 'Data finale obiettivo' , + 'Actual End Date' => 'Data finale effettiva' , + 'Project No' => 'N. Progetto' , + 'Target Budget' => 'Budget obiettivo' , + 'Project Url' => 'Url Progetto' , + 'Progress' => 'Progresso' , 'Type' => 'Tipo' , 'Related to' => 'Relativi a' , - 'LBL_TASKS_OPEN' => 'Tasks Open' , - 'LBL_TASKS_DUE' => 'Tasks Due' , - 'LBL_TASKS_COMPLETED' => 'Tasks Completed' , - 'LBL_PEOPLE' => 'People' , - 'LBL_CHARTS' => 'Charts' , - 'LBL_TASKS_LIST' => 'Tasks List' , // TODO: Review - 'LBL_MILESTONES' => 'Milestones' , // TODO: Review - 'LBL_TASKS' => 'Tasks' , // TODO: Review - 'LBL_STATUS_IS' => 'Status is' , // TODO: Review - 'LBL_STATUS' => 'Status' , // TODO: Review - 'LBL_TICKET_PRIORITY' => 'Priority' , // TODO: Review - 'LBL_DOWNLOAD_FILE' => 'Download File' , // TODO: Review - 'LBL_MILESTONES_LIST' => 'Lista Milestones' , + 'LBL_TASKS_OPEN' => 'Attività aperte' , + 'LBL_TASKS_DUE' => 'Attività Scadute' , + 'LBL_TASKS_COMPLETED' => 'Attività Completate' , + 'LBL_PEOPLE' => 'Persone' , + 'LBL_CHARTS' => 'Diagrammi' , + 'LBL_TASKS_LIST' => 'Lista Attività ' , + 'LBL_MILESTONES' => 'Stadio' , + 'LBL_TASKS' => 'Attività ' , + 'LBL_STATUS_IS' => 'Stato è' , + 'LBL_STATUS' => 'Stato' , + 'LBL_TICKET_PRIORITY' => 'Priorità ' , + 'LBL_DOWNLOAD_FILE' => 'Scarica File' , + 'LBL_MILESTONES_LIST' => 'Lista Stadi' , 'LBL_TASKS_HIGH' => 'Alta priorità ' , 'LBL_TASKS_NORMAL' => 'Priorità normale' , 'LBL_TASKS_LOW' => 'Bassa priorità ' , 'LBL_TASKS_OTHER' => 'Altre priorità ' , - 'LBL_SELECT_PROGRESS' => 'Progress - Tutti', + 'LBL_SELECT_PROGRESS' => 'Progresso - Tutti', 'LBL_SELECT_STATUS' => 'Stato - Tutto', //picklist values - 'prospecting' => 'Prospezione', - 'in progress' => 'In Progress', + 'prospecting' => 'Prospetti', + 'in progress' => 'In corso', 'initiated' => 'Avviato', 'waiting for feedback' => 'In attesa di un commento', 'on hold' => 'In attesa', @@ -67,10 +67,10 @@ $languageStrings = array( 'LBL_END_DATE' => 'data di fine', 'LBL_DURATION' => 'durata', 'LBL_INFO' => 'Info', - 'LBL_GANTT_INFO1' => 'Far scorrere sul lato destro del compito di ampliare la durata', - 'LBL_GANTT_INFO2' => 'Trascinare sul centro del compito sinistra o per cambiare iniziale e quella finale.', - 'LBL_EDIT_PROJECT_TASK_STATUS_COLOR' => 'Modifica del progetto Task Colore Stato', - 'LBL_SELECT_PROJECT_TASK_STATUS_COLOR' => 'Selezionare Progetto Task Colore Stato', + 'LBL_GANTT_INFO1' => 'Far scorrere sul lato destro dell\'attività per ampliare la durata', + 'LBL_GANTT_INFO2' => 'Spostare la sinistra o il centro dell\'attività per cambiare la data iniziale o finale.', + 'LBL_EDIT_PROJECT_TASK_STATUS_COLOR' => 'Modifica del Colore dello stato dell\'attività del Progetto', + 'LBL_SELECT_PROJECT_TASK_STATUS_COLOR' => 'Seleziona il colore dello stato dell\'attività del Progetto', 'LBL_SELECT_STATUS' => 'Selezionare Stato', 'LBL_EDIT_COLOR' => 'Modifica colore', ); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectMilestone.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectMilestone.php index 0c72ded4350ac2580b68a9256d5d069d15c3d210..5785c03d1b1c4cfa488f36b22565c3c366076c37 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectMilestone.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectMilestone.php @@ -8,16 +8,16 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'SINGLE_ProjectMilestone' => "Progetto Milestone", - 'LBL_ADD_RECORD' => "Aggiungi Milestone Progetto", - 'LBL_RECORDS_LIST' => "Progetto Lista Milestones", + 'SINGLE_ProjectMilestone' => "Progetto Stadio", + 'LBL_ADD_RECORD' => "Aggiungi Stadio Progetto", + 'LBL_RECORDS_LIST' => "Lista Stadi Progetto", 'LBL_PROJECTS_LIST' => "Lista Progetti", - 'LBL_TASKS_LIST' => "List Tasks", - 'LBL_MILESTONES_LIST' => "Lista Milestones", - 'LBL_PROJECT_MILESTONE_INFORMATION' => "Progetto Milestone Dettagli", - 'Project Milestone Name' => "Progetto Milestone Nome", - 'Milestone Date' => "Milestone Data", - 'Project Milestone No' => "Progetto Numero Milestone", + 'LBL_TASKS_LIST' => "List Attività ", + 'LBL_MILESTONES_LIST' => "Lista Stadi", + 'LBL_PROJECT_MILESTONE_INFORMATION' => "Dettagli Stadio del Progetto", + 'Project Milestone Name' => "Nome stadio del Progetto", + 'Milestone Date' => "Data Stadio", + 'Project Milestone No' => "N. Stadio del Progetto", 'Type' => 'Tipo' , //picklist values 'administrative' => 'Amministrativo', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectTask.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectTask.php index 97af8c00dcd7e4c360b0e0cf8047a23cd421856d..d98e6039fdc352e6f59a1dd55ae613e540c850ea 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectTask.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ProjectTask.php @@ -8,19 +8,19 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'SINGLE_ProjectTask' => "Compito del progetto", + 'SINGLE_ProjectTask' => "Attività del progetto", 'LBL_ADD_RECORD' => "Aggiungi attività di progetto", - 'LBL_RECORDS_LIST' => "Progetto Elenco attività ", - 'LBL_PROJECT_TASK_INFORMATION' => "Progetto Task Dettagli", + 'LBL_RECORDS_LIST' => "Elenco Attività del Progetto", + 'LBL_PROJECT_TASK_INFORMATION' => "Dettagli Attività del Progetto", 'LBL_PROJECTS_LIST' => "Lista Progetti", - 'LBL_TASKS_LIST' => "List Tasks", - 'LBL_MILESTONES_LIST' => "Lista Milestones", - 'Project Task Name' => "Progetto Nome attività ", - 'Project Task No' => "Progetto Task No", - 'Project Task Number' => "Progetto Numero Task", + 'LBL_TASKS_LIST' => "List Attività ", + 'LBL_MILESTONES_LIST' => "Lista Stadi", + 'Project Task Name' => "Nome attività del Progetto", + 'Project Task No' => "Attività del Progetto N.", + 'Project Task Number' => "Numero Attività del Progetto", 'Status' => "Stato", 'Priority' => "Priorità ", - 'Progress' => "Progress", + 'Progress' => "Progresso", 'Type' => "Tipo", 'Worked Hours' => "Ore lavorate", 'Start Date' => "Data di inizio", @@ -33,15 +33,15 @@ $languageStrings = array( 'normal' => 'Normale', 'high' => 'Alto', 'Created Time' => "Tempo di creazione", - 'Modified Time' => "Tempo Modified", + 'Modified Time' => "Tempo Modifica", 'description' => "Descrizione", 'Assigned To' => "Assegnato a", 'Open' => "Aprire", - 'In Progress' => "In Progress", + 'In Progress' => "In corso", 'Completed' => "Completato", 'Deferred' => "Differite", 'Canceled' => "Cancellato", - 'LBL_NO_DATE_VALUE_MSG' => 'o Attività di progetto non hanno inizio e Data / o Fine', + 'LBL_NO_DATE_VALUE_MSG' => 'o Attività del Progetto non hanno Data di Inizio e/o Fine', 'Canceled ' => 'Annullata', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PurchaseOrder.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PurchaseOrder.php index ad5121f8a6b6d100d799405941faacadea06c6b5..6a13ef2c6e42c4c5374b1360981ec579e6eb081c 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PurchaseOrder.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/PurchaseOrder.php @@ -11,35 +11,33 @@ $languageStrings = array( 'PurchaseOrder' => 'Ordini d\'acquisto' , 'SINGLE_PurchaseOrder' => 'Ordini d\'acquisto' , 'LBL_EXPORT_TO_PDF' => 'Esporta in PDF' , - 'LBL_SEND_MAIL_PDF' => 'Send Email with PDF' , // TODO: Review + 'LBL_SEND_MAIL_PDF' => 'Invia Email con PDF' , 'LBL_ADD_RECORD' => 'Add Purchase Order' , 'LBL_RECORDS_LIST' => 'Lista Ordini Acquisto' , - 'LBL_COPY_SHIPPING_ADDRESS' => 'Indirizzo Copy spedizione' , // TODO: Review - 'LBL_COPY_BILLING_ADDRESS' => 'Copia indirizzo di fatturazione' , // TODO: Review + 'LBL_COPY_SHIPPING_ADDRESS' => 'Copia Indirizzo di spedizione' , + 'LBL_COPY_BILLING_ADDRESS' => 'Copia indirizzo di fatturazione' , 'LBL_PO_INFORMATION' => 'Informazione Ordine di Acquisto ', 'PurchaseOrder No' => 'Numero Ordine di Acquisto' , 'Requisition No' => 'Numero Richiesta' , 'Tracking Number' => 'Numero Tracking' , 'Sales Commission' => 'Commissioni Vendita' , - 'LBL_PAID' => 'Paid' , // TODO: Review - 'LBL_BALANCE' => 'Balance' , // TODO: Review + 'LBL_PAID' => 'Pagato' , + 'LBL_BALANCE' => 'Saldo' , S 'Received Shipment' => 'Spedizione Ricevuta' , 'LBL_LIST_PRICE' => 'Prezzo di listino', 'List Price' => 'Prezzo di listino', - 'LBL_COPY_COMPANY_ADDRESS' => 'Copia Company Indirizzo', - 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copia Organizzazione Indirizzo', - - 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copy Organization Address', - 'LBL_SELECT_ADDRESS_OPTION' => 'Selezionare Indirizzo per copiare', + 'LBL_COPY_COMPANY_ADDRESS' => 'Copia Indirizzo Azienda', + 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copia Indirizzo Organizzazione', //TO review, Company vs Organization + 'LBL_SELECT_ADDRESS_OPTION' => 'Selezionare Indirizzo da copiare', 'LBL_BILLING_ADDRESS' => 'Indirizzo di fatturazione', - 'LBL_COMPANY_ADDRESS' => 'Azienda Indirizzo', - 'LBL_ACCOUNT_ADDRESS' => 'Organizzazione Indirizzo', - 'LBL_VENDOR_ADDRESS' => 'Venditore Indirizzo', - 'LBL_CONTACT_ADDRESS' => 'Contatto Indirizzo', + 'LBL_COMPANY_ADDRESS' => 'Indirizzo Azienda', + 'LBL_ACCOUNT_ADDRESS' => 'Indirizzo Organizzazione', + 'LBL_VENDOR_ADDRESS' => 'Indirizzo Fornitore', + 'LBL_CONTACT_ADDRESS' => 'Indirizzo Contatto', 'LBL_THIS' => 'Questo', - 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema.si prega di rimuovere o sostituire questo elemento', - 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema,si prega di rimuovere questa riga di elementi', + 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema. Si prega di rimuovere o sostituire questo elemento', + 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema, si prega di rimuovere questa riga di elementi', ); @@ -48,11 +46,11 @@ $jsLanguageStrings = array( 'JS_ORGANIZATION_NOT_FOUND_MESSAGE'=> "Si prega di selezionare una organizzazione prima di copiare l'indirizzo", 'JS_ACCOUNT_NOT_FOUND' => 'Organizzazione vuoto!!', 'JS_ACCOUNT_NOT_FOUND_MESSAGE' => "Seleziona una organizzazione prima di copiare l'indirizzo", - 'JS_VENDOR_NOT_FOUND' => 'Venditore vuoto', + 'JS_VENDOR_NOT_FOUND' => 'Fornitore vuoto', 'JS_VENDOR_NOT_FOUND_MESSAGE' => "Si prega di selezionare un fornitore prima di copiare l'indirizzo", 'JS_CONTACT_NOT_FOUND' => 'Contatto vuoto', 'JS_CONTACT_NOT_FOUND_MESSAGE' => "Si prega di selezionare un contatto prima di copiare l'indirizzo", - 'JS_PLEASE_REMOVE_LINE_ITEM_THAT_IS_DELETED' => 'Si prega di rimuovere la voce che viene eliminato', + 'JS_PLEASE_REMOVE_LINE_ITEM_THAT_IS_DELETED' => 'Si prega di rimuovere la riga di prodotto che viene eliminata', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Quotes.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Quotes.php index 440923127add791752eaf4d1c468cae322ddbcd4..7dcbb2956816f4a274c5b8ff72592ca5d5c84bfa 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Quotes.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Quotes.php @@ -11,11 +11,11 @@ $languageStrings = array( 'Quotes' => 'Preventivo' , 'SINGLE_Quotes' => 'Preventivo' , 'LBL_EXPORT_TO_PDF' => 'Esporta in PDF' , - 'LBL_SEND_MAIL_PDF' => 'Send Email with PDF' , // TODO: Review - 'LBL_ADD_RECORD' => 'Add Quote' , + 'LBL_SEND_MAIL_PDF' => 'Invia Email con PDF' , + 'LBL_ADD_RECORD' => 'Aggiungi Preventivo' , 'LBL_RECORDS_LIST' => 'Lista Preventivi' , 'LBL_QUOTE_INFORMATION' => 'Informazioni Preventivo' , - 'Quote No' => 'No. Preventivo' , + 'Quote No' => 'N. Preventivo' , 'Quote Stage' => 'Stadio Preventivo' , 'Valid Till' => 'Valido fino a' , 'Inventory Manager' => 'Responsabile inventario' , @@ -24,7 +24,7 @@ $languageStrings = array( 'Related To' => 'Relativi a' , 'LBL_THIS' => 'Questo', - 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema.si prega di rimuovere o sostituire questo elemento', - 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema,si prega di rimuovere questa riga di elementi', + 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema. Si prega di rimuovere o sostituire questo elemento', + 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema, si prega di rimuovere questa riga di elementi', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/RecycleBin.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/RecycleBin.php index a06c34ab662a2614eb8a03c4184c3335840e9022..d83f78e50ce3a009c9b0a3fbec36801a5d4331b8 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/RecycleBin.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/RecycleBin.php @@ -8,22 +8,22 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Recycle Bin' => 'Recycle Bin' , // TODO: Review - 'RecycleBin' => 'Recycle Bin' , // TODO: Review - 'LBL_SELECT_MODULE' => 'Select Module' , // TODO: Review - 'LBL_EMPTY_RECYCLEBIN' => 'Empty Recycle Bin' , // TODO: Review - 'LBL_RESTORE' => 'Restore' , // TODO: Review - 'LBL_NO_PERMITTED_MODULES' => 'No permitted modules available', // TODO: Review - 'LBL_RECORDS_LIST' => 'Recycle Bin List' , // TODO: Review - 'LBL_NO_RECORDS_FOUND' => 'No records found to Restore in module', // TODO: Review + 'Recycle Bin' => 'Cestino' , + 'RecycleBin' => 'Cestino' , + 'LBL_SELECT_MODULE' => 'Seleziona Modulo' , + 'LBL_EMPTY_RECYCLEBIN' => 'Svuota Cestino' , + 'LBL_RESTORE' => 'Ripristina' , + 'LBL_NO_PERMITTED_MODULES' => 'Nessun modulo abilitato disponibile', + 'LBL_RECORDS_LIST' => 'Lista del Cestino' , + 'LBL_NO_RECORDS_FOUND' => 'Nessuno record trovato da ripristinare nel Modulo', ); $jsLanguageStrings = array( - 'JS_MSG_EMPTY_RB_CONFIRMATION' => 'Are you sure you want to permanently remove all the deleted records from your database?', // TODO: Review - 'JS_LBL_RESTORE_RECORDS_CONFIRMATION' => 'Are you sure you want to restore the records?', // TODO: Review + 'JS_MSG_EMPTY_RB_CONFIRMATION' => 'Sei sicuro di voler rimuovere permanentemente tutti i record cancellati dal tuo database?', + 'JS_LBL_RESTORE_RECORDS_CONFIRMATION' => 'Sei sicuro di voler ripristinare i record?', 'JS_LBL_RESTORE_RECORD_CONFIRMATION' => 'Sei sicuro di voler ripristinare il record?', 'JS_RESTORING_RECORD' => 'Ripristino Record', 'JS_RESTORE_AND_UNTRASH_FILE_IN_DRIVE' => 'Ripristino in Vtiger and Drive', - 'JS_RESTORING_RECORDS' => 'Il ripristino di record', + 'JS_RESTORING_RECORDS' => 'Il ripristino dei record', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Reports.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Reports.php index b7f2583580993b95d560b56662150220d87d5615..749bf58dd405c5ebee598590baa3242fcb7195f9 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Reports.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Reports.php @@ -8,65 +8,65 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Reports' => 'Reports' , // TODO: Review - 'SINGLE_Reports' => 'Report' , // TODO: Review - 'LBL_FOLDER_NOT_EMPTY' => 'Folder is not empty' , + 'Reports' => 'i Report' , + 'SINGLE_Reports' => 'Report' , + 'LBL_FOLDER_NOT_EMPTY' => 'La Cartella non è vuota' , 'LBL_MOVE_REPORT' => 'Sposta Report' , 'LBL_CUSTOMIZE' => 'Personalizza' , 'LBL_REPORT_EXPORT_EXCEL' => 'Export Excel' , 'LBL_REPORT_PRINT' => 'Stampa' , - 'LBL_STEP_1' => 'Step 1' , - 'LBL_STEP_2' => 'Step 2' , - 'LBL_STEP_3' => 'Step 3' , + 'LBL_STEP_1' => 'Passo 1' , + 'LBL_STEP_2' => 'Passo 2' , + 'LBL_STEP_3' => 'Passo 3' , 'LBL_REPORT_DETAILS' => 'Dettagli Report' , 'LBL_SELECT_COLUMNS' => 'Seleziona Colonne' , 'LBL_FILTERS' => 'Filtri' , - 'LBL_FOLDERS' => 'Folders' , + 'LBL_FOLDERS' => 'Cartelle' , 'LBL_ADD_NEW_FOLDER' => 'Aggiungi una Nuova Cartella' , - 'LBL_FOLDER_NAME' => 'Folder Name' , - 'LBL_FOLDER_DESCRIPTION' => 'Folder Description' , - 'LBL_WRITE_YOUR_DESCRIPTION_HERE' => 'Enter Description' , - 'LBL_DUPLICATES_EXIST' => 'Duplicate Exists' , - 'LBL_FOLDERS_LIST' => 'Folders List' , - 'LBL_DENIED_REPORTS' => 'Denied Reports' , - 'LBL_NO_OF_RECORDS' => 'Total Records : ' , // TODO: Review - 'LBL_MORE_RECORDS_TXT'=>'Only 500 records are shown below. Please export to see all Records', - 'LBL_ADD_RECORD' => 'Add Report' , - 'LBL_ADD_FOLDER' => 'Add Folder' , - 'LBL_REPORT_DELETE_DENIED' => 'Permission denied to delete the Report', - 'LBL_FOLDER_CAN_NOT_BE_DELETED' => 'This folder can not be deleted', - 'LBL_REPORTS_LIST' => 'Reports list' , + 'LBL_FOLDER_NAME' => 'Nome Cartella' , + 'LBL_FOLDER_DESCRIPTION' => 'Descrizione Cartella' , + 'LBL_WRITE_YOUR_DESCRIPTION_HERE' => 'Inserire Descrizione' , + 'LBL_DUPLICATES_EXIST' => 'Esiste Duplicato' , + 'LBL_FOLDERS_LIST' => 'Lista Cartelle' , + 'LBL_DENIED_REPORTS' => 'Report Negato' , + 'LBL_NO_OF_RECORDS' => 'Totare record : ' , + 'LBL_MORE_RECORDS_TXT'=>'Sono mostrati solo 500 record qui di seguito. Per favore fai l\'esportazione per vederli tutti.', + 'LBL_ADD_RECORD' => 'Aggiungi Report' , + 'LBL_ADD_FOLDER' => 'Aggiungi Cartella' , + 'LBL_REPORT_DELETE_DENIED' => 'Permesso negato per cancellare il Report', + 'LBL_FOLDER_CAN_NOT_BE_DELETED' => 'Questa cartella non può essere cancellata', + 'LBL_REPORTS_LIST' => 'Lista Report' , 'LBL_REPORT_NAME' => 'Nome Report' , 'LBL_REPORT_FOLDER' => 'Cartella Report' , 'LBL_DESCRIPTION' => 'Descrizione' , - 'PRIMARY_MODULE' => 'Primary Module' , - 'LBL_SELECT_RELATED_MODULES' => 'Select Related Modules' , + 'PRIMARY_MODULE' => 'Modulo Primario' , + 'LBL_SELECT_RELATED_MODULES' => 'Seleziona il Modulo Collegato' , 'LBL_MAX' => 'Massimo' , 'LBL_NEXT' => 'Prossimo' , - 'LBL_REPORTS' => 'Reports List' , - 'LBL_GROUP_BY' => 'Group By' , - 'LBL_SORT_ORDER' => 'Sort Order' , + 'LBL_REPORTS' => 'Lista Report' , + 'LBL_GROUP_BY' => 'Raggruppati da' , + 'LBL_SORT_ORDER' => 'Ordinamento' , 'LBL_ASCENDING' => 'Ascendente' , 'LBL_DESCENDING' => 'Discendente' , 'LBL_CALCULATIONS' => 'Calcoli' , 'LBL_COLUMNS' => 'Colonne' , 'LBL_SUM_VALUE' => 'Somma' , 'LBL_AVERAGE' => 'Media' , - 'LBL_LOWEST_VALUE' => 'Valore più basso' , - 'LBL_HIGHEST_VALUE' => 'Highest Value' , + 'LBL_LOWEST_VALUE' => 'Valore più basso' , + 'LBL_HIGHEST_VALUE' => 'Valore più alto' , 'LBL_GENERATE_REPORT' => 'Salva e Genera rapporto' , 'LBL_SUM' => 'Somma' , 'LBL_AVG' => 'Media' , 'LBL_MIN' => 'Minimo' , 'LBL_FIELD_NAMES' => 'Nomi dei Campi' , - 'LBL_REPORT_CSV' => 'Export CSV' , - 'LBL_VIEW_DETAILS' => 'View Details' , - 'LBL_GENERATE_NOW' => 'Generate now' , // TODO: Review + 'LBL_REPORT_CSV' => 'Esporta in CSV' , + 'LBL_VIEW_DETAILS' => 'Vedi i dettagli' , + 'LBL_GENERATE_NOW' => 'Genera adesso' , 'Report Name' => 'Nome Report' , 'Account and Contact Reports' => 'Report Aziende e Contatti' , 'Lead Reports' => 'Report Lead' , - 'Potential Reports' => 'Report Opportunità' , - 'Activity Reports' => 'Report Attività' , + 'Potential Reports' => 'Report Opportunità ' , + 'Activity Reports' => 'Report Attività ' , 'HelpDesk Reports' => 'Report Ticket di Assistenza Clienti', 'Product Reports' => 'Report Prodotti' , 'Quote Reports' => 'Report Preventivi' , @@ -76,17 +76,17 @@ $languageStrings = array( 'Campaign Reports' => 'Report Campagne' , 'Contacts by Accounts' => 'Contatti per Aziende' , 'Contacts without Accounts' => 'Contatti senza Aziende' , - 'Contacts by Potentials' => 'Contatti per Opportunità', + 'Contacts by Potentials' => 'Contatti per Opportunità ', 'Contacts related to Accounts' => 'Contatti collegati alle Aziende', 'Contacts not related to Accounts' => 'Contatti non collegati alle Aziende', - 'Contacts related to Potentials' => 'Contatti collegati alle Opportunità', + 'Contacts related to Potentials' => 'Contatti collegati alle Opportunità ', 'Lead by Source' => 'Lead per Fonte' , 'Lead Status Report' => 'Report Lead per Stato' , - 'Potential Pipeline' => 'Andamento Opportunità', - 'Closed Potentials' => 'Opportunità Chiuse' , - 'Potential that have Won' => 'Opportunità Vinte' , + 'Potential Pipeline' => 'Andamento Opportunità ', + 'Closed Potentials' => 'Opportunità Chiuse' , + 'Potential that have Won' => 'Opportunità Vinte' , 'Tickets by Products' => 'Ticket per Prodotti' , - 'Tickets by Priority' => 'Ticket per Priorità' , + 'Tickets by Priority' => 'Ticket per Priorità ' , 'Open Tickets' => 'Ticket Aperti' , 'Tickets related to Products' => 'Ticket collegati ai Prodotti', 'Tickets that are Open' => 'Ticket Aperti' , @@ -101,30 +101,30 @@ $languageStrings = array( 'PurchaseOrder Detailed Report' => 'Report Ordini di Acquisto Dettagliato', 'PurchaseOrder related to Contacts' => 'Ordini di Acquisto Collegati ai Contatti', 'Invoice Detailed Report' => 'Report Fatture Dettagliato' , - 'Last Month Activities' => 'Attività del Mese Scorso', - 'This Month Activities' => 'Attività di Questo Mese', + 'Last Month Activities' => 'Attività del Mese Scorso', + 'This Month Activities' => 'Attività di Questo Mese', 'Campaign Expectations and Actuals' => 'Valori Attesi ed Effettivi delle Campagne', 'SalesOrder Detailed Report' => 'Report Ordini di Vendita Dettagliato', 'Email Reports' => 'Email Reports' , - 'Contacts Email Report' => 'Contacts Email Report' , - 'Accounts Email Report' => 'Organizations Email Report' , - 'Leads Email Report' => 'Leads Email Report' , - 'Vendors Email Report' => 'Vendors Email Report' , - 'Emails sent to Contacts' => 'Emails sent to Contacts' , - 'Emails sent to Organizations' => 'Emails sent to Organizations', - 'Emails sent to Leads' => 'Emails sent to Leads' , - 'Emails sent to Vendors' => 'Emails sent to Vendors' , - 'LBL_PRINT_REPORT' => 'Print Report' , // TODO: Review - 'LBL_RECORDS' => 'Records' , // TODO: Review - 'LBL_LIMIT_EXCEEDED' => 'Only 1000 + records are displayed. Use CSV or Excel Export to see all the records', // TODO: Review - 'LBL_TOP' => 'Top' , // TODO: Review - 'LBL_ALL_REPORTS' => 'All Reports' , // TODO: Review - 'LBL_CALCULATION_CONVERSION_MESSAGE' => 'Il calcolo si basa sulle preferenze valuta del vostro CRM Mia', // TODO: Review + 'Contacts Email Report' => 'Report delle email dei contatti' , + 'Accounts Email Report' => 'Report delle email delle Aziende' , + 'Leads Email Report' => 'Report delle email dei Lead' , + 'Vendors Email Report' => 'Report delle email dei Fornitori' , + 'Emails sent to Contacts' => 'Email inviate ai Contatti' , + 'Emails sent to Organizations' => 'Email inviate alle Aziende', + 'Emails sent to Leads' => 'Email inviate ai Lead' , + 'Emails sent to Vendors' => 'Email inviate ai Fornitori' , + 'LBL_PRINT_REPORT' => 'Stampa Report' , + 'LBL_RECORDS' => 'Records' , + 'LBL_LIMIT_EXCEEDED' => 'Solo 1000 + records sono mostrati. Use l\'esportazione CSV o Excel per vedere tutti i record', + 'LBL_TOP' => 'Migliori' , // TODO: Review + 'LBL_ALL_REPORTS' => 'Tutti i Reports' , + 'LBL_CALCULATION_CONVERSION_MESSAGE' => 'Il calcolo si basa sulle preferenze valuta del vostro CRM', //Schedule Reports 'LBL_CREATING_REPORT' => 'Creazione di report', - 'LBL_EDITING_REPORT' => 'Editing Rapporto', - 'LBL_SCHEDULE_REPORTS' => 'Rapporti Pianificazione', + 'LBL_EDITING_REPORT' => 'Editing Report', + 'LBL_SCHEDULE_REPORTS' => 'Pianificazione Report', 'LBL_AT_TIME' => 'Al tempo', 'LBL_DAILY' => 'Quotidiano', 'LBL_WEEKLY' => 'Settimanale', @@ -136,7 +136,7 @@ $languageStrings = array( 'LBL_SELECT_MONTH_AND_DAY' => 'Selezionare Mese e Data', 'LBL_SELECTED_DATES' => 'Date selezionate', 'LBL_EXCEEDING_MAXIMUM_LIMIT' => 'Limite massimo superato', - 'LBL_NEXT_TRIGGER_TIME' => 'Tempo di trigger su Avanti', + 'LBL_NEXT_TRIGGER_TIME' => 'Tempo Prossimo trigger', 'LBL_RUN_REPORT' => 'Esegui rapporto', 'LBL_SELECT_RECIEPIENTS' => 'Seleziona destinatari', 'LBL_SPECIFIC_EMAIL_ADDRESS' => 'Invia a e-mail specifico', @@ -144,7 +144,7 @@ $languageStrings = array( //Summary/Pivot Reports 'LBL_CREATING_PIVOT_REPORT' => 'Crea Pivot rapporto', 'LBL_EDITING_PIVOT_REPORT' => 'Modifica report Pivot', - 'LBL_SELECT_PIVOT_FIELDS' => 'Selezionare Pivot Fields', + 'LBL_SELECT_PIVOT_FIELDS' => 'Selezionare i campi Pivot', 'LBL_SELECT_ROWS' => 'Selezionare Righe', 'LBL_SELECT_DATA_FIELDS' => 'Selezionare Campi dati', 'LBL_ADD_ROWS' => 'Aggiungere righe', @@ -152,14 +152,14 @@ $languageStrings = array( 'LBL_ADD_DATA_FIELDS' => 'Aggiungere campi dati', 'LBL_PIVOT_FIELDS' => 'Selezionato Pivot Fields', 'LBL_RECORD_COUNT' => 'Conteggio Record', - 'LBL_SELECT_PIVOT_FIELDS_WARNING' => 'Attenzione: Si prega di selezionare almeno un campo Row, campo Colonna e Campo dati', - 'LBL_PIVOT_DATA_FIELDS_WARNING' => 'Attenzione: Nella colonna di dati - funzioni di aggregazione (somma, media, min e max) non dovrebbero ripetere.', + 'LBL_SELECT_PIVOT_FIELDS_WARNING' => 'Attenzione: Si prega di selezionare almeno un campo Riga, un campo Colonna e un Campo dati', + 'LBL_PIVOT_DATA_FIELDS_WARNING' => 'Attenzione: Nella colonna di dati - funzioni di aggregazione (somma, media, min e max) non dovrebbero ripetersi.', 'LBL_MODIFY_CONDITIONS' => 'Modificare le condizioni', - 'LBL_PIVOT_PREVIEW_EX' => 'Pivot Anteprima di report (esempio)', + 'LBL_PIVOT_PREVIEW_EX' => 'Anteprima Report Pivot (esempio)', //charts labels 'LBL_SELECT_CHART_TYPE' => 'Selezionare il tipo di grafico', - 'LBL_CLICK_THROUGH_NOT_AVAILABLE' => 'Fare clic through non disponibile come avete selezionato più di un modulo', + 'LBL_CLICK_THROUGH_NOT_AVAILABLE' => 'Il clic through non è disponibile se avete selezionato più di un modulo', 'LBL_TOTAL_SUM_OF' => 'Somma totale di %s', 'LBL_AVG_OF' => 'Medio di %s', 'LBL_MIN_OF' => 'Minimo di %s', @@ -176,10 +176,10 @@ $languageStrings = array( 'LBL_SELECT_GROUP_BY_FIELD' => 'Seleziona gruppo da campo', 'LBL_SELECT_DATA_FIELD' => 'Selezionare Campi dati', 'LBL_MODIFY_CONDITION' => 'Modificare le condizioni', - 'LBL_PLEASE_SELECT_ATLEAST_ONE_GROUP_FIELD_AND_DATA_FIELD' => 'Si prega di selezionare almeno un campo Groupby e un campo di dati.', + 'LBL_PLEASE_SELECT_ATLEAST_ONE_GROUP_FIELD_AND_DATA_FIELD' => 'Si prega di selezionare almeno un campo Group by e un campo di dati.', 'LBL_FOR_BAR_GRAPH_AND_LINE_GRAPH_SELECT_3_MAX_DATA_FIELDS' => 'Per bar e Linea grafico, è possibile selezionare fino a 3 campi di dati.', 'LBL_DETAIL_REPORT' => 'Report dettaglio', - 'LBL_PIVOT_REPORT' => 'Pivot Rapporto', + 'LBL_PIVOT_REPORT' => 'Rapporto Pivot', 'LBL_CHARTS' => 'Grafici', //Schedule Reports - Mail Content 'LBL_AUTO_GENERATED_REPORT_EMAIL' => 'Questa è una mail generata automaticamente inviata a nome di un report pianificato.', @@ -187,9 +187,9 @@ $languageStrings = array( 'LBL_FILE_FORMAT' => 'Formato di file', 'Report Type' => 'Tipo di rapporto', - 'tabular' => 'Dettaglio', - 'summary' => 'Dettaglio', - 'pivot' => 'Perno', + 'tabular' => 'Tabulare', + 'summary' => 'Sommario', + 'pivot' => 'Pivot', 'chart' => 'Grafico', 'LBL_REPORTS_MOVED_SUCCESSFULLY'=>'Rapporti spostato con successo.', 'LBL_SAME_SOURCE_AND_TARGET_FOLDER'=>'Cartella di destinazione è la stessa cartella di origine.', @@ -198,7 +198,7 @@ $languageStrings = array( 'LBL_UNPIN_CHART_FROM_DASHBOARD' => 'Sblocca grafico da cruscotto', 'LBL_SAME_LEVEL_ROLES' => 'Stesso Livello Di Ruoli', - 'LBL_SUBORDINATE_ROLES' => 'Subordinato Ruoli', + 'LBL_SUBORDINATE_ROLES' => 'Ruoli Subordinati', 'LBL_SHARE_REPORT' => 'Condividere Report', 'LBL_SHARED_REPORTS' => 'Ha Condiviso Con Me', 'LBL_PINNED' => 'Appuntato', @@ -209,14 +209,14 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_DUPLICATE_RECORD' => 'Duplicate Report' , // TODO: Review - 'JS_CALCULATION_LINE_ITEM_FIELDS_SELECTION_LIMITATION' => 'Limitation: Line Item fields(List Price, Discount & Quantity) can only be used when other calculation fields are not selected.', // TODO: Review - 'JS_CHART_PINNED_TO_DASHBOARD' => 'Grafico appuntato ad DashBoard', - 'JS_CHART_ALREADY_PINNED_TO_DASHBOARD' => 'Grafico già appuntato ad DashBoard', + 'JS_DUPLICATE_RECORD' => 'Duplica Report' , + 'JS_CALCULATION_LINE_ITEM_FIELDS_SELECTION_LIMITATION' => 'Limitazione: i campi riga del prodotto (listino, sconto e Quantità ) possono essere usati solo quando altri campi di calcolo non sono selezionati.', + 'JS_CHART_PINNED_TO_DASHBOARD' => 'Grafico appuntato su DashBoard', + 'JS_CHART_ALREADY_PINNED_TO_DASHBOARD' => 'Grafico già appuntato su DashBoard', 'JS_MOVE_REPORTS'=>'Spostare Reports', 'JS_SCHEDULED_DATE_TIME_ERROR' => 'Data e orario programmati dovrebbero essere maggiore di data e ora correnti', - 'JSLBL_PIN_CHART_TO_DASHBOARD' => 'Grafico Pin a Dashboard', - 'JSLBL_UNPIN_CHART_FROM_DASHBOARD' => 'Sblocca grafico da cruscotto', + 'JSLBL_PIN_CHART_TO_DASHBOARD' => 'Grafico Pin su Dashboard', + 'JSLBL_UNPIN_CHART_FROM_DASHBOARD' => 'Sblocca grafico da cruscotto', //DashBoard o Cruscotto? 'JS_CHART_REMOVED_FROM_DASHBOARD' => 'Grafico rimosso dal cruscotto', 'JS_NO_CHART_DATA_AVAILABLE' => 'I dati non sono disponibili, si prega di verificare i campi selezionati', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Rss.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Rss.php index 36855dc6bb6f896c5610e1ba6f87ff7b06a3e80a..41db19f2fc56eb0550cea238993072e14d93fc7b 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Rss.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Rss.php @@ -10,12 +10,12 @@ $languageStrings = Array( 'LBL_RSS_FEED_SOURCES' => 'Fonti Feed Rss', - 'LBL_ADD_FEED_SOURCE' => 'Aggiungere fonte di alimentazione', + 'LBL_ADD_FEED_SOURCE' => 'Aggiungere Feed RSS', 'LBL_FEEDS_LIST_FROM' => 'Feed List Da', 'LBL_SET_AS_DEFAULT' => 'Imposta come predefinito', 'LBL_SENDER' => 'trasmettitore', - 'LBL_FEED_SOURCE' => 'fonte di alimentazione', - 'LBL_ENTER_FEED_SOURCE' => 'Inserisci fonte di alimentazione', + 'LBL_FEED_SOURCE' => 'origine Feed', + 'LBL_ENTER_FEED_SOURCE' => 'Inserisci Feed', 'SINGLE_Rss' => 'di feed RSS', 'Rss' => 'Rss', @@ -24,8 +24,8 @@ $languageStrings = Array( $jsLanguageStrings = array( 'JS_RSS_SUCCESSFULLY_SAVED' => 'Rss con successo salvati', - 'JS_INVALID_RSS_URL' => 'Non valido Rss Url', - 'JS_RSS_MADE_AS_DEFAULT' => 'Rss Fatto come predefinito', + 'JS_INVALID_RSS_URL' => 'URL Rss Non valido', + 'JS_RSS_MADE_AS_DEFAULT' => 'Rss impostato come predefinito', 'JS_NO_RECORDS' => 'Nessun Record', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SMSNotifier.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SMSNotifier.php index 7c66d96186718274a291aaca455341cfaf5576fd..c9debe55316b58dc67df5a2288f03f08271cf3da 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SMSNotifier.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SMSNotifier.php @@ -8,16 +8,16 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_SEND_SMS_TO_SELECTED_NUMBERS' => 'Send SMS to the selected numbers', - 'LBL_STEP_1' => 'Step 1' , - 'LBL_STEP_2' => 'Step 2' , - 'LBL_SELECT_THE_PHONE_NUMBER_FIELDS_TO_SEND' => 'Select the phone number fields to send', - 'LBL_TYPE_THE_MESSAGE' => 'Type the message' , - 'LBL_WRITE_YOUR_MESSAGE_HERE' => 'write your message here' , - 'LBL_ADD_MORE_FIELDS' => 'Add more fields' , - 'LBL_SERVER_CONFIG' => 'Server Configuration' , - 'LBL_CHECK_STATUS' => 'Check Status' , - 'message' => 'Message' , - 'LBL_SMSNOTIFIER_INFORMATION' => 'SMS Information' , - 'SINGLE_SMSNotifier' => 'SMS Notifier' , // TODO: Review + 'LBL_SEND_SMS_TO_SELECTED_NUMBERS' => 'Invia SMS ai numeri selezionati', + 'LBL_STEP_1' => 'Passo 1' , + 'LBL_STEP_2' => 'Passo 2' , + 'LBL_SELECT_THE_PHONE_NUMBER_FIELDS_TO_SEND' => 'Seleziona i campi dei numero di telefono per l\'invio', + 'LBL_TYPE_THE_MESSAGE' => 'Tipo di messaggio' , + 'LBL_WRITE_YOUR_MESSAGE_HERE' => 'Scrivi il tuo messaggio qui' , + 'LBL_ADD_MORE_FIELDS' => 'Aggiungi più campi' , + 'LBL_SERVER_CONFIG' => 'Configurazione Server' , + 'LBL_CHECK_STATUS' => 'Controlla stato' , + 'message' => 'Messaggio' , + 'LBL_SMSNOTIFIER_INFORMATION' => 'Informazione SMS' , + 'SINGLE_SMSNotifier' => 'Notificatore SMS' , // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SalesOrder.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SalesOrder.php index 0e5af056923fe804ad9a524c0b948a48bbc3d26e..e54165e8b52f31ff2f12e0989b2e296f9fa6cc3c 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SalesOrder.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/SalesOrder.php @@ -11,11 +11,11 @@ $languageStrings = array( 'SalesOrder' => 'Ordini di vendita' , 'SINGLE_SalesOrder' => 'Ordine di Vendita' , 'LBL_EXPORT_TO_PDF' => 'Esporta in PDF' , - 'LBL_SEND_MAIL_PDF' => 'Send Email with PDF' , // TODO: Review - 'LBL_ADD_RECORD' => 'Add Sales Order' , + 'LBL_SEND_MAIL_PDF' => 'Invia email con PDF' , // TODO: Review + 'LBL_ADD_RECORD' => 'Aggiongi Ordine di Vendita' , 'LBL_RECORDS_LIST' => 'Lista Ordini di Vendita' , 'LBL_SO_INFORMATION' => 'Informazioni Ordine di Vendita', - 'SalesOrder No' => 'No. Ordini di Vendita' , + 'SalesOrder No' => 'N. Ordini di Vendita' , 'Quote Name' => 'Nome Preventivo' , 'Customer No' => 'Numero cliente' , 'Requisition No' => 'Numero Richiesta' , @@ -23,7 +23,7 @@ $languageStrings = array( 'Sales Commission' => 'Commissione Vendita' , 'Purchase Order' => 'Ordine di acquisto' , 'Vendor Terms' => 'Condizioni fornitore' , - 'Pending' => 'Pendente' , + 'Pending' => 'In attesa' , 'Enable Recurring' => 'Abilita ricorrenza' , 'Frequency' => 'Frequenza' , 'Start Period' => 'Inizio Periodo' , @@ -31,13 +31,13 @@ $languageStrings = array( 'Payment Duration' => 'Durata pagamento' , 'Invoice Status' => 'Stato fattura' , 'Sub Total' => 'Sub totale' , - 'AutoCreated' => 'AutoCreated' , - 'Sent' => 'Sent' , - 'Credit Invoice' => 'Credit Invoice' , - 'Paid' => 'Paid' , + 'AutoCreated' => 'AutoCreato' , + 'Sent' => 'Inviato' , + 'Credit Invoice' => 'Nota di Credito' , + 'Paid' => 'Pagato' , 'LBL_THIS' => 'Questo', - 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema.si prega di rimuovere o sostituire questo elemento', + 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'viene eliminato dal sistema. Si prega di rimuovere o sostituire questo elemento', 'LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM' => 'Questo elemento viene eliminato dal sistema,si prega di rimuovere questa riga di elementi', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ServiceContracts.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ServiceContracts.php index cce5d38eb7de157c4c1842277e60ca00836e0e56..353e39b145f1f698436b572cfeae19ff72528cd8 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ServiceContracts.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/ServiceContracts.php @@ -10,14 +10,14 @@ $languageStrings = array( 'ServiceContracts' => 'Contratti di servizio' , 'SINGLE_ServiceContracts' => 'Contratto di servizio' , - 'LBL_ADD_RECORD' => 'Add Service Contract' , - 'LBL_RECORDS_LIST' => 'Service Contracts List' , + 'LBL_ADD_RECORD' => 'Aggiungi Contratto di Servizio' , + 'LBL_RECORDS_LIST' => 'Lista Contratti di Servizio' , 'LBL_SERVICE_CONTRACT_INFORMATION' => 'Informazioni contratto di servizio', 'Contract No' => 'Numero contratto' , - 'Start Date' => 'Data di inzio' , + 'Start Date' => 'Data di inizio' , 'End Date' => 'Data di fine' , 'Tracking Unit' => 'Unità di monitoraggio' , - 'Total Units' => 'UInità totali' , + 'Total Units' => 'Unità totali' , 'Used Units' => 'Unità utilizzate' , 'Progress' => 'Progresso (in %)' , 'Planned Duration' => 'Durata pianificata (in Giorni)', @@ -31,7 +31,7 @@ $languageStrings = array( 'Support' => 'Supporto', 'Administrative' => 'Amministrativo', 'Undefined' => 'Indefinito', - 'In Planning' => 'In Planning', + 'In Planning' => 'In Programmazione', 'On Hold' => 'In Attesa', 'Complete' => 'Completo', 'Archived' => 'Archiviati', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Services.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Services.php index dff2056223af4e0ade4dd04b9bb98750678c71fe..72af89fcae5b2675fa69e690c644787fb389c7ee 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Services.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Services.php @@ -11,23 +11,23 @@ $languageStrings = array( 'Services' => 'Servizi' , 'SINGLE_Services' => 'Servizi' , 'LBL_ADD_RECORD' => 'Aggiungi Servizio' , - 'LBL_RECORDS_LIST' => 'Services List' , + 'LBL_RECORDS_LIST' => 'Lista Servizi' , 'LBL_SERVICE_INFORMATION' => 'Informazioni servizio' , 'LBL_MORE_CURRENCIES' => 'Altre valute' , - 'LBL_PRICES' => 'Service Prices' , + 'LBL_PRICES' => 'Prezzi Servizi' , 'LBL_PRICE' => 'Prezzo' , 'LBL_RESET_PRICE' => 'Annulla prezzo' , 'LBL_RESET' => 'Annulla' , - 'LBL_ADD_TO_PRICEBOOKS' => 'Add to PriceBooks' , + 'LBL_ADD_TO_PRICEBOOKS' => 'Aggiungi a listino' , 'Service Name' => 'Nome servizio' , 'Service Active' => 'Attivo' , 'Service Category' => 'Categoria' , 'Service No' => 'Numero servizio' , - 'Owner' => 'Propietario' , - 'No of Units' => 'Non per unità ' , + 'Owner' => 'Proprietario' , + 'No of Units' => 'N. di unità ' , 'Commission Rate' => 'Commissione (%)' , 'Price' => 'Prezzo' , - 'Usage Unit' => 'Unità di utilizzo' , + 'Usage Unit' => 'Uso Unità ' , 'Tax Class' => 'Classe di tasse' , 'Website' => 'Sito web' , ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CronTasks.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CronTasks.php index 6ba11eeb0f83f0f1147758e547d98063a485511b..5b6de5a89e4876d69447b851e2ae58f984b1e00a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CronTasks.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CronTasks.php @@ -8,16 +8,16 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'CronTasks' => 'Scheduler' , // TODO: Review + 'CronTasks' => 'Programmazione' , // TODO: Review 'Id' => 'Id' , // TODO: Review 'Cron Job' => 'Cron Job' , // TODO: Review - 'Frequency' => 'Frequency' , // TODO: Review - 'Status' => 'Status' , // TODO: Review - 'Last Start' => 'Last scan started' , // TODO: Review - 'Last End' => 'Last scan ended' , // TODO: Review - 'Sequence' => 'Sequence' , // TODO: Review - 'LBL_COMPLETED' => 'Completed' , // TODO: Review - 'LBL_RUNNING' => 'Running' , // TODO: Review - 'LBL_ACTIVE' => 'Active' , // TODO: Review - 'LBL_INACTIVE' => 'In Active' , // TODO: Review + 'Frequency' => 'Frequenza' , // TODO: Review + 'Status' => 'Stato' , // TODO: Review + 'Last Start' => 'L\'ultima scansione avviata' , // TODO: Review + 'Last End' => 'L\'ultima scansione finita' , // TODO: Review + 'Sequence' => 'Sequenza' , // TODO: Review + 'LBL_COMPLETED' => 'Completato' , // TODO: Review + 'LBL_RUNNING' => 'In corso' , // TODO: Review + 'LBL_ACTIVE' => 'Attivo' , // TODO: Review + 'LBL_INACTIVE' => 'Non attivo' , // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Currency.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Currency.php index 59bf1426289a4717295c70b54fe5abcd688ea332..3fabf1310839435c67d150307e6a1841e3cd819a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Currency.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Currency.php @@ -8,17 +8,17 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'Add Currency' , // TODO: Review - 'LBL_EDIT_CURRENCY' => 'Edit Currency' , // TODO: Review - 'LBL_ADD_NEW_CURRENCY' => 'Add New Currency' , // TODO: Review - 'LBL_CURRENCY_NAME' => 'Currency Name' , // TODO: Review - 'LBL_CURRENCY_CODE' => 'Currency Code' , // TODO: Review - 'LBL_CURRENCY_SYMBOL' => 'Symbol' , // TODO: Review - 'LBL_CONVERSION_RATE' => 'Conversion Rate' , // TODO: Review - 'LBL_ENTER_CONVERSION_RATE' => 'Enter Conversion Rate' , // TODO: Review - 'LBL_CURRENCY_STATUS_DESC' => 'Enable checkbox to make currency Active', // TODO: Review - 'LBL_TRANSFER_CURRENCY' => 'Transfer Currency' , // TODO: Review - 'LBL_CURRENT_CURRENCY' => 'Current Currency' , // TODO: Review + 'LBL_ADD_RECORD' => 'Aggiungi Valuta' , // TODO: Review + 'LBL_EDIT_CURRENCY' => 'Modifica Valuat' , // TODO: Review + 'LBL_ADD_NEW_CURRENCY' => 'Aggiungi nuova Valuta' , // TODO: Review + 'LBL_CURRENCY_NAME' => 'Nome Valuta' , // TODO: Review + 'LBL_CURRENCY_CODE' => 'Codice Valuta' , // TODO: Review + 'LBL_CURRENCY_SYMBOL' => 'Simbolo' , // TODO: Review + 'LBL_CONVERSION_RATE' => 'Tasso di conversione' , // TODO: Review + 'LBL_ENTER_CONVERSION_RATE' => 'Inserisci tasso di conversione' , // TODO: Review + 'LBL_CURRENCY_STATUS_DESC' => 'Abilita casella di controllo per attivare la valuta', // TODO: Review + 'LBL_TRANSFER_CURRENCY' => 'Trasferisci Valuta' , // TODO: Review + 'LBL_CURRENT_CURRENCY' => 'Valuta Corrente' , // TODO: Review 'Albania, Leke' => 'Albania, Leke' , // TODO: Review 'Argentina, Pesos' => 'Argentina, Pesos' , // TODO: Review 'Aruba, Guilders' => 'Aruba, Guilders' , // TODO: Review @@ -151,6 +151,6 @@ $languageStrings = array( 'Moroccan, Dirham' => 'Moroccan, Dirham' , // TODO: Review ); $jsLanguageStrings = array( - 'JS_CURRENCY_DETAILS_SAVED' => 'Currency Details Saved' , // TODO: Review - 'JS_CURRENCY_DELETED_SUEESSFULLY' => 'Currency Deleted Successfully', // TODO: Review + 'JS_CURRENCY_DETAILS_SAVED' => 'Dettagli Valuta Salvati' , // TODO: Review + 'JS_CURRENCY_DELETED_SUEESSFULLY' => 'Valuta cancella con successo', // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CustomerPortal.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CustomerPortal.php index c8b39bfb625f8dd03f400c63ca7721ca6792f5a3..3bf7ed47722e1c382ec8e1aaceec90e840145981 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CustomerPortal.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/CustomerPortal.php @@ -8,46 +8,46 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'CustomerPortal' => 'Customer Portal' , // TODO: Review - 'LBL_PORTAL_DESCRIPTION' => 'Setup Privileges of Portal User', // TODO: Review - 'LBL_PRIVILEGES' => 'Privileges' , // TODO: Review - 'LBL_DEFAULT_ASSIGNEE' => 'Default Assignee' , // TODO: Review - 'LBL_PORTAL_URL' => 'Portal Url' , // TODO: Review - 'LBL_MODULE_NAME' => 'Module Name' , // TODO: Review - 'LBL_ENABLE_MODULE' => 'Enable Module' , // TODO: Review - 'LBL_VIEW_ALL_RECORDS' => 'See Records across Organization', // TODO: Review - 'LBL_PREVILEGES_MESSAGE' => 'This User\'s privileges will be applied to the Portal User.', // TODO: Review - 'LBL_DEFAULT_ASSIGNEE_MESSAGE' => 'Casi / biglietti saranno ceduto al titolare scelto dal default Gruppo / utente dal Portale clienti.', // TODO: Review - 'LBL_PORTAL_URL_MESSAGE' => 'This is URL for the Portal where your contacts can login to submit/track tickets, access knowledge base and do more. Contacts will be sent the login details when Portal access is enabled from Contact details page.', // TODO: Review - 'LBL_DRAG_AND_DROP_MESSAGE' => 'Drag and Drop modules to reorder in the Customer Portal', // TODO: Review + 'CustomerPortal' => 'Portale Clienti' , // TODO: Review + 'LBL_PORTAL_DESCRIPTION' => 'Imposta Privilegi al portale per utente', // TODO: Review + 'LBL_PRIVILEGES' => 'Privilegi' , // TODO: Review + 'LBL_DEFAULT_ASSIGNEE' => 'Assegnatario standard' , // TODO: Review + 'LBL_PORTAL_URL' => 'Url Portale' , // TODO: Review + 'LBL_MODULE_NAME' => 'Nome Modulo' , // TODO: Review + 'LBL_ENABLE_MODULE' => 'Attiva Modulo' , // TODO: Review + 'LBL_VIEW_ALL_RECORDS' => 'Mostrare i record attraverso l\'azienda', // TODO: Review + 'LBL_PREVILEGES_MESSAGE' => 'I privilegi di questo utente saranno applicati all\'utente del portale', // TODO: Review + 'LBL_DEFAULT_ASSIGNEE_MESSAGE' => 'Casi / Ticket saranno ceduto al titolare scelto dal Gruppo default / utente default dal Portale clienti.', // TODO: Review + 'LBL_PORTAL_URL_MESSAGE' => 'Questo è l\'Url per il Portale dove i tuoi contatti possono loggarsi e inviare e controllare i Ticket, avere accesso alla documentazione e altro ancora. I contatti riceveranno i dettagli per il login quando l\'accesso al portale sarà attivo dalla pagina dettagli dei contatti.', // TODO: Review + 'LBL_DRAG_AND_DROP_MESSAGE' => 'Trascina e rilascia i moduli da riordinare nel portale clienti', // TODO: Review "LBL_CONTACTS_ENABLE_MESSAGE"=>"Contatti saranno inviati i dati di accesso quando l'accesso Portal è attivato dalla pagina dei dettagli di contatto.", - "LBL_SUPPORT_NOTIFY_MESSAGE"=>"Supporto avviso rinnovo del contratto viene notificato sul portale clienti in base al numero di giorni immessi.", + "LBL_SUPPORT_NOTIFY_MESSAGE"=>"L\'avviso di rinnovo del supporto è notificato sul portale clienti in base al numero di giorni immessi.", "LBL_ADD_DOCUMENT"=>"Aggiungi documento", - "LBL_OPEN_TICKETS"=>"Biglietti aperte", + "LBL_OPEN_TICKETS"=>"Ticket aperti", "LBL_CREATE_TICKET"=>"Crea Ticket", - "LBL_ADD_SHORTCUT"=>"Aggiungi Shortcut", - "OpenTicketsByPriority"=>"Biglietti aperti per priorità ", - "TicketsClosureTimeByPriority"=>"Biglietti tempo di chiusura per priorità ", - "OpenTicketsBySeverity"=>"Biglietti aperti di gravità ", - "TicketsClosureTimeBySeverity"=>"Biglietti tempo di chiusura in base alla gravità ", + "LBL_ADD_SHORTCUT"=>"Aggiungi Scorciatoia", + "OpenTicketsByPriority"=>"Ticket aperti per priorità ", + "TicketsClosureTimeByPriority"=>"Tempo di chiusura dei Ticket per priorità ", + "OpenTicketsBySeverity"=>"Ticket aperti per gravità ", + "TicketsClosureTimeBySeverity"=>"tempo di chiusura dei Ticket per gravità ", "Announcement"=>"Annuncio", "Activity Stream"=>"Flusso di attività ", "Fields and privilege"=>"Campi e privilegi", - "onlymine"=>"Mostra solo %s legato a contattarci", - "all"=>"Visualizza %s collegati direttamente al contatto e organizzazione", + "onlymine"=>"Mostra solo %s legato ai contattati", + "all"=>"Visualizza %s collegati direttamente al contatto e Azienda", "products_or_services"=>"Mostra tutto %s", "faq"=>"Mostra tutti pubblicato %s", "LBL_LAYOUT_HEADER"=>"Portal Navbar", "LBL_HOME"=>"Casa", "LBL_CONTACT_NOTIFICATION"=>"Contattare il supporto di notifica", "LBL_DAYS_BEFORE"=>"Giorni prima", - "LBL_HOME_LAYOUT"=>"Portal Casa layout", + "LBL_HOME_LAYOUT"=>"Aspetto della home del portale", "LBL_RELATED_INFORMATION"=>"Informazioni correlate", - "LBL_RECORD_VISIBILITY"=>"Records Visibilità ", + "LBL_RECORD_VISIBILITY"=>"Visibilità dei Record", "LBL_ADD_FIELDS"=>"Aggiungi campi", "LBL_READ_AND_WRITE"=>"Leggere e scrivere", "LBL_READ_ONLY"=>"Solo lettura", - "LBL_PORTAL_FIELDS_PRIVILEGES"=>"Campi portale e privilegi", + "LBL_PORTAL_FIELDS_PRIVILEGES"=>"Campi e privilegi del portale", "LBL_RECENT"=>"Recente", "LBL_REC_WIDGET"=>"Record Widget", "LBL_CHARTS"=>"Grafici", @@ -69,12 +69,12 @@ $languageStrings = array( $jsLanguageStrings = array( 'JS_PORTAL_INFO_SAVED' => 'Impostazioni del portale clienti salvate.', // TODO: Review "LBL_ADD_DOCUMENT"=>"Aggiungi documento", - "LBL_OPEN_TICKETS"=>"Biglietti aperte", + "LBL_OPEN_TICKETS"=>"Ticket aperti", "LBL_CREATE_TICKET"=>"Crea Ticket", "JS_SELECT_SHORTCUT"=>"Selezionare un collegamento", "JS_ADD_FIELD"=>"Aggiungere campi", "JS_SHOW"=>"Visibile", "JS_HIDE"=>"Nascondere", "JS_NUMBERS"=>"Accetta solo numero intero positivo con fino a quattro cifre.", - "JS_MANDATORY_FIELDS_MISSING"=>"I campi non possono essere saved.Please selezionare tutti i campi obbligatori." + "JS_MANDATORY_FIELDS_MISSING"=>"I campi non possono essere salvati. Selezionare tutti i campi obbligatori." ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/EmailTemplate.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/EmailTemplate.php index a948fba5515dc96147d5b7a49ffbfa09d2aaa6ca..9a8d6f7c6c6e4be1f7cce8c2ea6199856b0c51ed 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/EmailTemplate.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/EmailTemplate.php @@ -8,8 +8,8 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'EmailTemplate' => 'Email Template' , // TODO: Review - 'LBL_TEMPLATE_NAME' => 'Template name' , + 'EmailTemplate' => 'Modello Email' , // TODO: Review + 'LBL_TEMPLATE_NAME' => 'Nome Modello' , 'LBL_DESCRIPTION' => 'Descrizione' , - 'LBL_SUBJECT' => 'Subject' , // TODO: Review + 'LBL_SUBJECT' => 'Oggetto' , // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ExtensionStore.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ExtensionStore.php index 9307da7c0f074e8c79391c9c53adffffb5b70154..a301c76570cca6cbfcbd040a1cdd700aa6d5d2ae 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ExtensionStore.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ExtensionStore.php @@ -26,23 +26,23 @@ $languageStrings = array( 'LBL_INSTALLATION_LOG' => 'Registro di installazione' , 'LBL_UPDATED_MODULE' => ' modulo è stato aggiornato con successo.', 'LBL_UPDATING_MODULE' => 'Modulo di aggiornamento' , - 'LBL_VTIGER_EXTENSION_STORE' => 'Vtiger Extension Store' , + 'LBL_VTIGER_EXTENSION_STORE' => 'Negozio estensioni Vtiger' , 'LBL_SEARCH_FOR_AN_EXTENSION' => 'Ricercare un\'estensione...' , 'LBL_DOWNLOADS' => 'Download' , - 'LBL_NO_EXTENSIONS_FOUND' => 'Senza estensioni trovate' , + 'LBL_NO_EXTENSIONS_FOUND' => 'Nessuna estensione trovata' , 'LBL_REGISTER_TO_MARKET_PLACE' => 'Registrati al Marketplace' , 'LBL_MARKETPLACE_REGISTRATION' => 'Registrazione Marketplace' , - 'LBL_MARKETPLACE_LOGIN' => 'Mercato Login' , - 'LBL_NEW_TO_MARKETPLCAE' => 'Nuovo mercato?' , + 'LBL_MARKETPLACE_LOGIN' => 'Login Marketplace' , + 'LBL_NEW_TO_MARKETPLCAE' => 'Sei Nuovo del Marketplace?' , 'LBL_CREATE_AN_ACCOUNT' => 'Creare un nuovo account' , 'LBL_SETUP_CARD_DETAILS' => 'Installazione scheda dettagli', 'LBL_SETUP_CARD' => 'Scheda di configurazione' , 'LBL_CARD_NUMBER' => 'Numero di carta' , - 'LBL_EXP_MONTH' => 'Mese di exp' , - 'LBL_EXP_YEAR' => 'Exp anno' , + 'LBL_EXP_MONTH' => 'Mese di scad.' , + 'LBL_EXP_YEAR' => 'Anno di scad.' , 'LBL_CVC_CODE' => 'Codice CVC' , 'LBL_RESET' => 'Reset' , - 'LBL_EXTENSION_STORE' => 'Extension Store' , + 'LBL_EXTENSION_STORE' => 'Negozio estensioni' , 'LBL_INSTALLED' => 'Installato' , 'LBL_UPDATE_CARD_DETAILS' => 'Aggiornamento scheda dettagli', 'LBL_BY' => 'di' , @@ -73,18 +73,18 @@ $languageStrings = array( 'LBL_EMAIL_ADDRESS' => 'Indirizzo email' , 'LBL_FIRST_NAME' => 'Nome' , 'LBL_LAST_NAME' => 'Cognome' , - 'LBL_COMPANY_NAME' => 'Nome Comapany' , + 'LBL_COMPANY_NAME' => 'Nome Azienda' , 'LBL_PASSWORD' => 'Password' , 'LBL_CONFIRM_PASSWORD' => 'Conferma password' , 'LBL_REGISTER' => 'Registro' , - 'LBL_EXTENSION_STORE_LOGIN' => 'Extensionstore Login' , + 'LBL_EXTENSION_STORE_LOGIN' => 'Logine negozio estensioni' , 'LBL_REMEMBER_ME' => 'Ricordati di me' , 'LBL_TRY_IT' => 'Provalo' , - 'LBL_TRIAL_INSTALLED' => 'Prova installato' , + 'LBL_TRIAL_INSTALLED' => 'Prova installata' , 'LBL_BUY' => 'Acquista ' , 'LBL_LOGIN_TO_MARKET_PLACE' => 'Accedere al Marketplace' , 'LBL_LOGIN' => 'Login' , - 'LBL_PHP_EXTENSION_LOADER_IS_NOT_AVAIABLE' => 'Si prega di installare il caricatore di estensione', + 'LBL_PHP_EXTENSION_LOADER_IS_NOT_AVAIABLE' => 'Si prega di installare il caricatore di estensione PHP', 'LBL_INSTALL_EXTENSION_LOADER' => 'Installare l\'estensione Loader', 'LBL_TO_CONTINUE_USING_EXTENSION_STORE' => 'To continue using Extension Store please install ', 'LBL_DOWNLOAD' => 'Scarica' , @@ -110,14 +110,14 @@ $languageStrings = array( $jsLanguageStrings = array( 'JS_PLEASE_SETUP_CARD_DETAILS_TO_INSTALL_THIS_EXTENSION' => 'Prego impostare i dettagli della carta di installare questa estensione', 'JS_UPDATE_CARD_DETAILS' => 'Aggiornamento scheda dettagli', - 'JS_ON' => 'on' , - 'JS_RATINGS' => 'Ratings' , + 'JS_ON' => 'il' , + 'JS_RATINGS' => 'Valutazioni' , 'JS_INSTALLED' => 'Installato' , - 'JS_TRIAL_INSTALLED' => 'Trial Installed' , - 'JS_PLEASE_INSTALL_EXTENSION_LOADER_TO_INSTALL_THIS_EXTENSION_FROM_BELOW_LINK' => 'Si prega di installare loader prolunga per installare questa estensione dal basso di collegamento', + 'JS_TRIAL_INSTALLED' => 'Prova installata' , + 'JS_PLEASE_INSTALL_EXTENSION_LOADER_TO_INSTALL_THIS_EXTENSION_FROM_BELOW_LINK' => 'Si prega di installare questa estensione dal collegamento qui di sotto', 'JS_PLEASE_LOGIN_TO_MARKETPLACE_FOR_INSTALLING_EXTENSION' => 'Effettua il login al marketplace per l\'installazione di estensione', - 'JS_PLEASE_SETUP_CARD_DETAILS_TO_INSTALL_EXTENSION' => 'Please setup card details to install extension', - 'JS_PLEASE_LOGIN_TO_MARKETPLACE_FOR_UNINSTALLING_EXTENSION' => 'Effettua il login al marketplace per la disinstallazione di estensione', - 'JS_CARD_DETAILS_UPDATED' => 'Card details updated!' , + 'JS_PLEASE_SETUP_CARD_DETAILS_TO_INSTALL_EXTENSION' => 'Inserire i detagli della carta per installa l\'estensione', + 'JS_PLEASE_LOGIN_TO_MARKETPLACE_FOR_UNINSTALLING_EXTENSION' => 'Effettua il login al marketplace per la disinstallazione dell\'estensione', + 'JS_CARD_DETAILS_UPDATED' => 'Dettagli carta aggiornati!' , 'JS_PASSWORDS_MISMATCH' => 'Le password non corrispondono!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Groups.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Groups.php index 2ebfeb3d12e0094b36199d2ad1558b8af67d1224..959c7ad97781f69a390b5c02ff53c044dd46510c 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Groups.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Groups.php @@ -8,21 +8,21 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_TRANSFORM_OWNERSHIP' => 'Transfer ownership' , - 'SINGLE_Groups' => 'Group' , // TODO: Review - 'LBL_TO_OTHER_GROUP' => 'To Other Group ' , - 'LBL_ADD_RECORD' => 'Add Group' , // TODO: Review - 'LBL_GROUP_NAME' => 'Group Name' , // TODO: Review - 'LBL_GROUP_MEMBERS' => 'Group Members' , // TODO: Review - 'LBL_ADD_USERS_ROLES' => 'Add Users, Roles...' , // TODO: Review - 'LBL_ROLEANDSUBORDINATE' => 'Role and Subordinates' , // TODO: Review - 'RoleAndSubordinates' => 'Role and Subordinates' , // TODO: Review + 'LBL_TRANSFORM_OWNERSHIP' => 'Trasferisci proprietà ' , + 'SINGLE_Groups' => 'Gruppo' , // TODO: Review + 'LBL_TO_OTHER_GROUP' => 'ad altro gruppo ' , + 'LBL_ADD_RECORD' => 'Aggiungi Gruppo' , // TODO: Review + 'LBL_GROUP_NAME' => 'Nome Gruppo' , // TODO: Review + 'LBL_GROUP_MEMBERS' => 'Membri Gruppo' , // TODO: Review + 'LBL_ADD_USERS_ROLES' => 'Aggiungi Utenti, Ruoli...' , // TODO: Review + 'LBL_ROLEANDSUBORDINATE' => 'Ruolo e subordinati' , // TODO: Review + 'RoleAndSubordinates' => 'Ruolo e subordinati' , // TODO: Review 'LBL_DUPLICATES_EXIST' => 'Il Nome del gruppo Esiste già ', ); $jsLanguageStrings = array( - 'JS_PLEASE_SELECT_ATLEAST_ONE_MEMBER_FOR_A_GROUP' => 'Please select atleast one member for a group', // TODO: Review - 'JS_RECORD_DELETED_SUCCESSFULLY' => 'Group deleted successfully' , // TODO: Review - 'JS_COMMA_NOT_ALLOWED_GROUP' => 'Caratteri speciali come ,"<> non sono ammessi in Nome gruppo.', + 'JS_PLEASE_SELECT_ATLEAST_ONE_MEMBER_FOR_A_GROUP' => 'Seleziona almeno un membro per un gruppo', // TODO: Review + 'JS_RECORD_DELETED_SUCCESSFULLY' => 'Gruppo cancellato con successoì' , // TODO: Review + 'JS_COMMA_NOT_ALLOWED_GROUP' => 'Caratteri speciali come ,"<> non sono ammessi nel Nome gruppo.', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php index acb7644f9ad0cfd7c57dfe9bbcf7735f9b38d65a..60ca12ce44f9b5b06567a94e417a9c5aba36ad5c 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php @@ -79,7 +79,7 @@ $languageStrings = array( 'LBL_RELATION_SHIPS' => 'Relazioni' , '1-1' => 'One to One' , '1-N' => 'Uno a Molti' , - 'N-1' => 'Molti di One' , + 'N-1' => 'Molti a uno' , 'N-N' => 'Molti a molti' , 'LBL_FIELD_TYPES' => 'Tipi di campo' , 'LBL_RELATION_ADDED_SUCCESS' => 'Relazione aggiunto con successo', @@ -88,8 +88,8 @@ $languageStrings = array( 'TAB_IN_PRIMARY_MODULE' => 'Tabella / linguetta in %s' , 'TAB_IN_RELATED_MODULE' => 'Tabella / linguetta in %s' , 'LBL_ADDING_RELATIONSHIP' => 'Aggiunta relazione %s' , - 'LBL_DETAIL_VIEW' => 'Detail View' , - 'LBL_EXPANDED' => 'Expanded' , + 'LBL_DETAIL_VIEW' => 'Vista dettagliata' , + 'LBL_EXPANDED' => 'Espanso' , 'LBL_COLLAPSED' => 'Compresso' , 'LBL_FILED_IN_PRIMARY_HELP_TEXT' => 'Campo di riferimento del modulo %s', 'LBL_TAB_IN_PRIMARY_HELP_TEXT' => 'Tabella / linguetta del modulo %s', @@ -110,12 +110,12 @@ $languageStrings = array( 'LBL_RELATED_MODULE' => 'Relative Al Modulo', 'LBL_SELECTED_RELATED_MODULE' => 'Selezionare relativi moduli', 'LBL_SELECTED_RELATION_TYPE' => 'Selezionare il tipo di relazione', - 'ONE_ONE_AND_MANY_ONE_RELATIONSHIP' => 'Uno-E-Relazioni', - 'ONE_MANY_RELATIONSHIP' => 'Uno-molti e Molti-molti Rapporti', + 'ONE_ONE_AND_MANY_ONE_RELATIONSHIP' => 'Relazioni uno a uno e molti a uno', + 'ONE_MANY_RELATIONSHIP' => 'Relazioni Uno-molti e Molti-molti', 'LBL_NO_RELATED_INFO' => 'Non esiste alcuna Relazione', 'LBL_ADD_NEW_FIELD_HERE' => 'Aggiungi un nuovo campo qui', 'LBL_SAVE_LAYOUT' => 'Salvare Il Layout', - 'LBL_SHOW_FIELD' => 'Show', + 'LBL_SHOW_FIELD' => 'Mostra', 'LBL_ENABLE_OR_DISABLE_FIELD_PROP' => 'Abilitare / Disabilitare le proprietà del campo', 'LBL_PROP_MANDATORY' => 'obbligatorio', 'LBL_DEFAULT_VALUE_NOT_SET' => 'Valore di Default non è impostato', @@ -136,9 +136,9 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Record di intestazione', 'LBL_HEADER_FIELD' => 'La Visualizzazione Dell\'Intestazione', - 'LBL_DUPLICATE_HANDLING' => 'Prevenzione Duplicate', + 'LBL_DUPLICATE_HANDLING' => 'Prevenzione Duplicati', 'LBL_DUPLICATE_CHECK' => 'Abilita controllo duplicato', - 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicare funzione di prevenzione impedisce solo i nuovi record duplicati da sempre creati dagli utenti e le applicazioni esterne. Record creati da Import', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'L\'opzione di prevenzione dei duplicati impedisce solo che gli utenti o applicazioni esterne creino dei duplicati. Record creati da Import no', 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Selezionare i campi unici sui quali devono essere controllati i record duplicati', 'LBL_SELECT_FIELDS' => 'selezionare i campi', 'LBL_MAX_3_FIELDS' => 'Max 3 campi', @@ -149,7 +149,9 @@ $languageStrings = array( 'LBL_PREFER_LATEST_RECORD' => 'Preferisco ultimo disco', 'LBL_PREFER_INTERNAL_RECORD' => 'Preferisco record interno', 'LBL_PREFER_EXTERNAL_RECORD' => 'Preferisco record esterno', - 'LBL_SYNC_TOOLTIP_MESSAGE' => "Preferisco ultimo disco - registrare i dati di recente modificate saranno mantenute <br> Preferisco record interno - esistente record sarà trattenuto in quanto è <br> Preferisco record esterno - Dati dall'applicazione esterna verranno copiati", + 'LBL_SYNC_TOOLTIP_MESSAGE' => "Preferire ultimo record - i dati più recenti saranno mantenuti + <br> Preferisco record interno - il record esistente sarà lasciato come è + <br> Preferisco record esterno - Dati dall'applicazione esterna verranno sempre copiati", ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Visualizza blocco attivato' , @@ -169,7 +171,7 @@ $jsLanguageStrings = array( 'JS_NO_HIDDEN_FIELDS_EXISTS' => 'Nessun campo inattivo' , 'JS_SPECIAL_CHARACTERS' => 'Caratteri speciali come' , 'JS_NOT_ALLOWED' => 'non sono ammessi' , - 'JS_FIELD_SEQUENCE_UPDATED' => 'Field Sequence Updated' , + 'JS_FIELD_SEQUENCE_UPDATED' => 'Sequenza campo aggiornata' , 'JS_DUPLICATES_VALUES_FOUND' => 'Valori duplicati trovati' , 'JS_FIELD_IN_RELATED_MODULE' => 'Campo Rapporto in %s' , 'JS_TAB_IN_RELATED_MODULE' => 'Tabella / linguetta in %s' , diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Leads.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Leads.php index 87b78eb645ae6cd861b67b3ecc24b0f9bdc53662..d59e87eb777e4c8ebf3d7deb3095d9dcc1289623 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Leads.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Leads.php @@ -8,10 +8,10 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_CONVERT_LEAD_FIELD_MAPPING' => 'Convert Lead Mapping' , // TODO: Review - 'LBL_ORGANIZATIONS' => 'Organizations' , // TODO: Review - 'LBL_CONTACTS' => 'Contacts' , // TODO: Review - 'LBL_OPPURTUNITIES' => 'Oppurtunities' , // TODO: Review + 'LBL_CONVERT_LEAD_FIELD_MAPPING' => 'Converti Mappatura Lead' , // TODO: Review + 'LBL_ORGANIZATIONS' => 'Aziende' , // TODO: Review + 'LBL_CONTACTS' => 'Contatti' , // TODO: Review + 'LBL_OPPURTUNITIES' => 'Opportunità ' , // TODO: Review ); $jsLanguageStrings = array( ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/MailConverter.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/MailConverter.php index 033acb72ac1359de74549217c7786a8dd7222910..2f677ae917794544a11da4ca1f3cb3ec8a88adad 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/MailConverter.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/MailConverter.php @@ -73,18 +73,18 @@ $languageStrings = array( 'LBL_RULE_DELETION_FAILED' => "Regole di cancellazione non è riuscita", 'LBL_SAVED_SUCCESSFULLY' => "Salvato con successo", 'LBL_SCANED_SUCCESSFULLY' => "Acquisita correttamente", - 'LBL_IS_IN_RUNNING_STATE' => "in posizione di regime", - 'LBL_FOLDERS_INFO_IS_EMPTY' => "Informazioni Folders è vuoto", - 'LBL_RULES_SEQUENCE_INFO_IS_EMPTY' => "Regole informazioni sequnce è vuoto", + 'LBL_IS_IN_RUNNING_STATE' => "in stato di in esecuzione", + 'LBL_FOLDERS_INFO_IS_EMPTY' => "Informazioni delle cartelle è vuoto", + 'LBL_RULES_SEQUENCE_INFO_IS_EMPTY' => "Regole informazioni sequenza è vuoto", 'LBL_UPDATE_FOLDERS' => "Aggiornare cartelle", 'fromaddress' => "Da", 'toaddress' => "A", - 'subject' => "Soggetto", + 'subject' => "Oggetto", 'body' => "Corpo", - 'matchusing' => "Fiammifero", + 'matchusing' => "Usa come corrispondenza", 'action' => "Azioni", 'LBL_PRIORITY' => "Priorità ", - 'PRIORITISE_MESSAGE' => "Trascinare e rilasciare i blocchi di dare priorità alla regola", + 'PRIORITISE_MESSAGE' => "Trascinare e rilasciare i blocchi per dare priorità alla regola", 'LBL_ALL_CONDITIONS' => "Tutte le Condizioni", 'LBL_ANY_CONDITIOn' => "Qualsiasi", 'Contains' => "Contiene", @@ -99,17 +99,17 @@ $languageStrings = array( 'CREATE_HelpDeskNoContact_FROM' => 'Crea Ticket (senza contatto)', 'UPDATE_HelpDesk_SUBJECT' => "Aggiornamento Ticket", 'LINK_Contacts_FROM' => "Aggiungi alla rubrica [DA]", - 'LINK_Contacts_TO' => "Aggiungi alla rubrica [TO]", - 'LINK_Accounts_FROM' => "Aggiungi a Organizzazione [DA]", - 'LINK_Accounts_TO' => "Aggiungi a Organizzazione [TO]", - 'LINK_Leads_FROM' => "Aggiungi a piombo [DA]", - 'LINK_Leads_TO' => "Aggiungi a piombo [TO]", - 'CREATE_Potentials_SUBJECT' => 'Crea Opportunity (con contatto)', + 'LINK_Contacts_TO' => "Aggiungi alla rubrica [A]", + 'LINK_Accounts_FROM' => "Aggiungi a Azienda [DA]", + 'LINK_Accounts_TO' => "Aggiungi a Aziende [A]", + 'LINK_Leads_FROM' => "Aggiungi a Lead [DA]", + 'LINK_Leads_TO' => "Aggiungi a Lead [A]", + 'CREATE_Potentials_SUBJECT' => 'Crea Opportunità (con contatto)', 'CREATE_PotentialsNoContact_SUBJECT' => 'Creare Opportunità (senza contatto)', - 'LINK_Potentials_FROM' => 'Aggiungi a Opportunity [FROM]', - 'LINK_Potentials_TO' => 'Aggiungi a Opportunity [TO]', - 'LINK_HelpDesk_FROM' => 'Aggiungi alla biglietteria [FROM]', - 'LINK_HelpDesk_TO' => 'Aggiungi alla biglietteria [TO]', + 'LINK_Potentials_FROM' => 'Aggiungi a Opportunità [DA]', + 'LINK_Potentials_TO' => 'Aggiungi a Opportunità [A]', + 'LINK_HelpDesk_FROM' => 'Aggiungi a Ticket [DA]', + 'LINK_HelpDesk_TO' => 'Aggiungi a Ticket [A]', 'LBL_UPDATE_FOLDERS' => "Aggiornare cartelle", 'LBL_UNSELECT_ALL' => "Deseleziona tutto", 'LBL_CONVERT_EMAILS_TO_RESPECTIVE_RECORDS' => "Convertire le email a rispettivi record", @@ -118,7 +118,7 @@ $languageStrings = array( 'LBL_PRIORITY' => "Priorità ", 'LBL_DELETE_RULE' => "Elimina regola", 'LBL_BODY' => "Corpo", - 'LBL_MATCH' => "Fiammifero", + 'LBL_MATCH' => "Corrispondenza", 'LBL_ACTION' => "Azione", 'LBL_FROM' => "Da", 'LBL_EDIT_RULE' => 'Modifica regola', @@ -130,16 +130,16 @@ $languageStrings = array( 'YESTERDAY' => 'Ieri', 'LBL_AUTOFILL_VALUES_FROM_EMAIL_BODY' => 'I valori Riempimento automatico da corpo-mail', 'LBL_DELIMITER' => 'Delimitatore', - 'LBL_COLON' => ': (Colon)', + 'LBL_COLON' => ': (due punti)', 'LBL_SEMICOLON' => '; (Punto e virgola)', 'LBL_DASH' => '- (Trattino)', 'LBL_EQUAL' => '= (Uguale)', 'LBL_GREATER_THAN' => '> (Maggiore di)', - 'LBL_COLON_DASH' => ':- (Colon-Hyphen)', - 'LBL_COLON_EQUAL' => ':= (Colon-Equals)', - 'LBL_SEMICOLON_DASH' => ';- (Virgola-Hyphen)', - 'LBL_SEMICOLON_EQUAL' => ';= (Punto e virgola Equals)', - 'LBL_EQUAL_GREATER_THAN' => '=> (Uguale-Greater Than)', + 'LBL_COLON_DASH' => ':- (due punti trattino)', + 'LBL_COLON_EQUAL' => ':= (due punti uguale)', + 'LBL_SEMICOLON_DASH' => ';- (Virgola trattino)', + 'LBL_SEMICOLON_EQUAL' => ';= (Punto e virgola uguale)', + 'LBL_EQUAL_GREATER_THAN' => '=> (Uguale maggiore di)', 'LBL_OTHER' => 'Altro', 'LBL_DELIMITER_INFO' => 'Selezionare il delimitatore che separa i valori di etichette nel vostro corpo e-mail', 'LBL_EMAIL_BODY_INFO' => 'Copiare testo da un messaggio del campione da sottoporre a scansione nella casella qui sotto. Vtiger CRM cercherà di individuare i valori e aiutare a mappare i campi di CRM.', @@ -149,9 +149,9 @@ $languageStrings = array( 'LBL_CRM_FIELDS' => 'Campi CRM', 'LBL_MAP_TO_CRM_FIELDS' => 'Mappa valori a Campi CRM', 'SELECT_FIELD' => 'Seleziona campo', - 'LBL_SAVE_MAPPING_INFO' => 'Risparmio regola corpo per una regola Converter posta esistente sovrascriverà regola organo esistente per quella regola.', + 'LBL_SAVE_MAPPING_INFO' => 'Salvare una regola per il corpo per una regola Converter di posta esistente sovrascriverà regola corpo esistente con quella regola.', 'LBL_MULTIPLE_FIELDS_MAPPED' => 'Non è possibile mappare un campo CRM con più campi', - 'LBL_BODY_RULE' => 'Regola Corpo Definito', + 'LBL_BODY_RULE' => 'Regola Corpo Definita', 'LBL_MAIL_SCANNER_INACTIVE' => 'Questa Mailbox è in stato inattivo', 'LBL_NO_RULES' => 'Non ci sono regole definite per questa cassetta postale', 'LBL_SCANNERNAME_ALPHANUMERIC_ERROR' => 'Scanner Nome accetta solo valore alfanumerico. Non sono ammessi caratteri speciali.', @@ -170,11 +170,11 @@ $languageStrings = array( $jsLanguageStrings = array( 'JS_MAILBOX_DELETED_SUCCESSFULLY' => "Cassetta postale eliminata con successo", 'JS_MAILBOX_LOADED_SUCCESSFULLY' => "Posta caricato correttamente", - 'JS_SELECT_ATLEAST_ONE' => 'Si prega di mappare atleast un campo', + 'JS_SELECT_ATLEAST_ONE' => 'Si prega di mappare almeno un campo', 'JS_SERVER_NAME' => 'Immettere il nome del server', 'JS_TIMEZONE' => 'Fuso orario Mail Server', 'JS_SCAN_FROM' => 'Mail Scansione dal', 'JS_TIMEZONE_INFO' => 'Seleziona il fuso orario in cui si trova il server di posta. Selezione fuso orario sbagliato potrebbe saltare alcune poste dalla scansione.', - 'JS_SCAN_FROM_INFO' => 'Questo campo decide se tutte le mail nella casella postale devono essere controllati o mail che ha sbarcato nella tua mailbox ieri o poi devono essere controllati. Questo campo è applicabile solo per la configurazione prima volta o quando si seleziona una nuova cartella per la scansione.', + 'JS_SCAN_FROM_INFO' => 'Questo campo decide se tutte le mail nella casella postale devono essere controllati o email arrivate nella tua mailbox ieri o più tardi devono essere controllati. Questo campo è applicabile solo per la configurazione per prima volta o quando si seleziona una nuova cartella per la scansione.', 'JS_SELECT_ONE_FOLDER' => 'È necessario selezionare, almeno una cartella.', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ModuleManager.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ModuleManager.php index 424a1563328507cd7ffe52d5563cf13570c32477..28a3bb4804e2b716866ca343c17d6d32a1d6f5bf 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ModuleManager.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/ModuleManager.php @@ -8,37 +8,37 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_IMPORT_MODULE' => 'Import Module' , // TODO: Review + 'LBL_IMPORT_MODULE' => 'Importa Modulo' , // TODO: Review 'LBL_VTIGER_EXTENSION_STORE' => 'Vtiger Extension Store' , // TODO: Review - 'LBL_PUBLISHER' => 'Publisher' , // TODO: Review - 'LBL_LICENSE' => 'License' , // TODO: Review - 'LBL_PUBLISHED_ON' => 'Published on' , // TODO: Review - 'LBL_INSTALL' => 'Install' , // TODO: Review - 'LBL_UPGRADE' => 'Upgrade' , // TODO: Review - 'LBL_VERSION' => 'Version' , // TODO: Review - 'LBL_DECLINE' => 'Decline' , // TODO: Review - 'LBL_ACCEPT_AND_INSTALL' => 'Accept and Install' , // TODO: Review - 'LBL_ALREADY_EXISTS' => 'Already Exists' , // TODO: Review + 'LBL_PUBLISHER' => 'Editore' , // TODO: Review + 'LBL_LICENSE' => 'Licenza' , // TODO: Review + 'LBL_PUBLISHED_ON' => 'Pubblicato il' , // TODO: Review + 'LBL_INSTALL' => 'Installa' , // TODO: Review + 'LBL_UPGRADE' => 'Aggiorna' , // TODO: Review + 'LBL_VERSION' => 'Versione' , // TODO: Review + 'LBL_DECLINE' => 'Rifiuta' , // TODO: Review + 'LBL_ACCEPT_AND_INSTALL' => 'Accetta e Installa' , // TODO: Review + 'LBL_ALREADY_EXISTS' => 'Già esiste' , // TODO: Review 'LBL_OK' => 'OK' , // TODO: Review - 'LBL_EXTENSION_NOT_COMPATABLE' => 'Extension is not Vtiger Compatable', // TODO: Review - 'LBL_INVALID_FILE' => 'Invalid File' , // TODO: Review - 'LBL_NO_LICENSE_PROVIDED' => 'No License Provided' , // TODO: Review - 'LBL_INSTALLATION' => 'Installation' , // TODO: Review - 'LBL_FAILED' => 'Failed' , // TODO: Review - 'LBL_SUCCESSFULL' => 'Successfull' , // TODO: Review - 'LBL_INSTALLATION_LOG' => 'Installation Log' , // TODO: Review + 'LBL_EXTENSION_NOT_COMPATABLE' => 'l\'estensione con è compatibile con VTiger', // TODO: Review + 'LBL_INVALID_FILE' => 'File non valido' , // TODO: Review + 'LBL_NO_LICENSE_PROVIDED' => 'Nessuna licenza fornita' , // TODO: Review + 'LBL_INSTALLATION' => 'Installazione' , // TODO: Review + 'LBL_FAILED' => 'Fallita' , // TODO: Review + 'LBL_SUCCESSFULL' => 'Con successo' , // TODO: Review + 'LBL_INSTALLATION_LOG' => 'Registro installazione' , // TODO: Review //Extension Store translations - 'LBL_VTIGER_EXTENSION_STORE' => 'Vtiger Extension Negozio', - 'LBL_SEARCH_FOR_EXTENSION' => 'Cerca Extension', + 'LBL_VTIGER_EXTENSION_STORE' => 'Vtiger Extension Market', + 'LBL_SEARCH_FOR_EXTENSION' => 'Cerca Estensione', 'LBL_DOWNLOADS' => 'Download', - 'LBL_NO_EXTENSIONS_FOUND' => 'Nessun Estensioni trovato', - 'LBL_REGISTER_USER' => 'Registrati utente', + 'LBL_NO_EXTENSIONS_FOUND' => 'Nessun Estensione trovata', + 'LBL_REGISTER_USER' => 'Registrazione utente', 'LBL_SETUP_CARD_DETAILS' => 'Dettagli di installazione di schede', 'LBL_SETUP_CARD' => 'Impostazione scheda', 'LBL_CARD_NUMBER' => 'Numero di carta', - 'LBL_EXP_MONTH' => 'Exp Mese', - 'LBL_EXP_YEAR' => 'Exp Anno', + 'LBL_EXP_MONTH' => 'Mese scad.', + 'LBL_EXP_YEAR' => 'Anno scad.', 'LBL_CVC_CODE' => 'CVC 3 cifre del codice', 'LBL_RESET' => 'Reset', 'LBL_EXTENSION_STORE' => 'Negozio Extension', @@ -55,20 +55,20 @@ $languageStrings = array( 'LBL_CUSTOMER_RATINGS' => 'Voti', 'LBL_CUSTOMER_REVIEWS' => 'Recensioni del cliente', 'LBL_WRITE_A_REVIEW' => 'Scrivi una recensione', - 'LBL_CUSTOMER_REVIEW' => 'Customer Review', + 'LBL_CUSTOMER_REVIEW' => 'Recensioni clienti', 'LBL_REVIEW' => 'Recensione', 'LBL_CUSTOMERS_REVIEWED' => 'Clienti su', 'LBL_SINGLE_CUSTOMER_REVIEWED' => 'Singolo cliente Recensito', 'LBL_INSTALLATION_FAILED' => 'Installazione non riuscita', - 'LBL_SUCCESSFULL_INSTALLATION' => 'Installazione Successfull', + 'LBL_SUCCESSFULL_INSTALLATION' => 'Installazione avventua con successo', 'Install' => 'Installare', 'Upgrade' => 'Aggiornamento', 'LBL_RATE_IT' => 'Vota', ); $jsLanguageStrings = array( - 'JS_PLEASE_SETUP_CARD_DETAILS_TO_INSTALL_THIS_EXTENSION' => 'Si prega dati della carta di setup per installare questa estensione', + 'JS_PLEASE_SETUP_CARD_DETAILS_TO_INSTALL_THIS_EXTENSION' => 'Si prega di inserire i dati della carta per installare questa estensione', 'JS_UPDATE_CARD_DETAILS' => 'Dettagli Aggiornamento Carta', 'JS_ON' => 'su', 'JS_RATINGS' => 'Valutazioni', - 'JS_PLEASE_INSTALL_EXTENSION_LOADER_TO_INSTALL_THIS_EXTENSION_FROM_BELOW_LINK' => 'Si prega di installare lestensione loader per installare questa estensione da sotto il collegamento', + 'JS_PLEASE_INSTALL_EXTENSION_LOADER_TO_INSTALL_THIS_EXTENSION_FROM_BELOW_LINK' => 'Si prega di installare l\'estensione da link qui sotto', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/PickListDependency.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/PickListDependency.php index 00f68c79f8325d6ad50465da778475f67eb130b5..6d920bdb2663cc0a1c549df739524427db92cc0d 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/PickListDependency.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/PickListDependency.php @@ -8,20 +8,20 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'Add Picklist Dependency' , // TODO: Review - 'LBL_PICKLIST_DEPENDENCY' => 'Picklist Dependency' , // TODO: Review - 'LBL_SELECT_MODULE' => 'Module' , // TODO: Review - 'LBL_SOURCE_FIELD' => 'Source Field' , // TODO: Review - 'LBL_TARGET_FIELD' => 'Target Field' , // TODO: Review - 'LBL_SELECT_FIELD' => 'Select field' , // TODO: Review - 'LBL_CONFIGURE_DEPENDENCY_INFO' => 'Click on the respective cell to change the mapping for picklist values of target field', // TODO: Review - 'LBL_CONFIGURE_DEPENDENCY_HELP_1' => 'Only mapped picklist values of the Source field will be shown below (except for first time)', // TODO: Review - 'LBL_CONFIGURE_DEPENDENCY_HELP_2' => 'If you want to see or change the mapping for the other picklist values of Source field, <br/> - then you can select the values by clicking on <b>\'Select Source values\'</b> button on the right side', // TODO: Review - 'LBL_CONFIGURE_DEPENDENCY_HELP_3' => 'Selected values of the Target field values, are highlighted as', // TODO: Review - 'LBL_SELECT_SOURCE_VALUES' => 'Select Source Values' , // TODO: Review - 'LBL_SELECT_SOURCE_PICKLIST_VALUES' => 'Select Source Picklist Values', // TODO: Review - 'LBL_ERR_CYCLIC_DEPENDENCY' => 'This dependency setup is not allowed as it ends up in some cyclic dependency', // TODO: Review + 'LBL_ADD_RECORD' => 'Aggiungi dipendenza menu' , // TODO: Review + 'LBL_PICKLIST_DEPENDENCY' => 'Dipendenza menu a tendina' , // TODO: Review + 'LBL_SELECT_MODULE' => 'Modulo' , // TODO: Review + 'LBL_SOURCE_FIELD' => 'Origine campo' , // TODO: Review + 'LBL_TARGET_FIELD' => 'Campo destinazione' , // TODO: Review + 'LBL_SELECT_FIELD' => 'Seleziona campo' , // TODO: Review + 'LBL_CONFIGURE_DEPENDENCY_INFO' => 'Clicca sulla rispettiva cella per cambiare i valori del menu del campo destinazione', // TODO: Review + 'LBL_CONFIGURE_DEPENDENCY_HELP_1' => 'Solo i valori mappati dell\'origine saranno mostrati qui di seguito (ad eccetto della prima volta)', // TODO: Review + 'LBL_CONFIGURE_DEPENDENCY_HELP_2' => 'Se vuoi vedere o cambiare la mappatura per gli altri valori del campo di origine, + puoi selezionarli cliccando sul pulsante <b> Seleziona valori di origine</b> a destra', // TODO: Review + 'LBL_CONFIGURE_DEPENDENCY_HELP_3' => 'I valori selezionati del campo destinazione sono evidenziati come', // TODO: Review + 'LBL_SELECT_SOURCE_VALUES' => 'Seleziona valori di origine' , // TODO: Review + 'LBL_SELECT_SOURCE_PICKLIST_VALUES' => 'Seleziona valori di origine dei menu a tendina', // TODO: Review + 'LBL_ERR_CYCLIC_DEPENDENCY' => 'Questa dipendenza non è permessa, perchè creerebbe una dipendenza circolare', // TODO: Review 'LBL_SELECT_ALL_VALUES' => 'Seleziona tutto', 'LBL_UNSELECT_ALL_VALUES' => 'Deseleziona tutto', 'LBL_CYCLIC_DEPENDENCY_ERROR' => 'Potrebbe finire in ridondanza ciclico come campo %s è già configurato per il campo %s', @@ -30,10 +30,10 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Are you sure you want to delete this picklist dependency?', // TODO: Review - 'JS_DEPENDENCY_DELETED_SUEESSFULLY' => 'Dependency deleted successfully', // TODO: Review - 'JS_PICKLIST_DEPENDENCY_SAVED' => 'Picklist Dependency Saved' , // TODO: Review - 'JS_DEPENDENCY_ATLEAST_ONE_VALUE' => 'You need to select atleast one value for', // TODO: Review - 'JS_SOURCE_AND_TARGET_FIELDS_SHOULD_NOT_BE_SAME' => 'Source field and Target field should not be same', // TODO: Review - 'JS_SELECT_SOME_VALUE' => 'Select some value' , // TODO: Review + 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Sei sicuro che vuoi cancellare questa dipendenza di menu a tendina?', // TODO: Review + 'JS_DEPENDENCY_DELETED_SUEESSFULLY' => 'Dipendenza cancellata con successo', // TODO: Review + 'JS_PICKLIST_DEPENDENCY_SAVED' => 'Dipendenza menu salvata' , // TODO: Review + 'JS_DEPENDENCY_ATLEAST_ONE_VALUE' => 'Devi selezionare almeno un valore per', // TODO: Review + 'JS_SOURCE_AND_TARGET_FIELDS_SHOULD_NOT_BE_SAME' => 'I campi origine e destinazione non devono essere lo stesso campo', // TODO: Review + 'JS_SELECT_SOME_VALUE' => 'Seleziona qualche valore' , // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Picklist.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Picklist.php index c04bcc3ce594310ab123e4086247ee7f855511c9..6486c7b645f1c46402b6c106aa95f547452507db 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Picklist.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Picklist.php @@ -8,55 +8,55 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_SELECT_PICKLIST_IN' => 'Select Picklist in' , // TODO: Review - 'LBL_ADD_VALUE' => 'Add Value' , // TODO: Review - 'LBL_RENAME_VALUE' => 'Rename Value' , // TODO: Review - 'LBL_DELETE_VALUE' => 'Delete Value' , // TODO: Review - 'LBL_ITEMS' => 'Values' , // TODO: Review - 'LBL_DRAG_ITEMS_TO_RESPOSITION' => 'Drag items to reposition them', // TODO: Review - 'LBL_SELECT_AN_ITEM_TO_RENAME_OR_DELETE' => 'Select an item to rename or delete', // TODO: Review - 'LBL_TO_DELETE_MULTIPLE_HOLD_CONTROL_KEY' => 'To Delete multiple items hold Ctrl key down while selecting items', // TODO: Review - 'LBL_ADD_ITEM_TO' => 'Add Item to' , // TODO: Review - 'LBL_ITEM_VALUE' => 'Item value' , // TODO: Review - 'LBL_ITEM_TO_RENAME' => 'Item to rename' , // TODO: Review - 'LBL_ENTER_NEW_NAME' => 'Enter new Name' , // TODO: Review - 'LBL_RENAME_PICKLIST_ITEM' => 'Rename PickList Item' , // TODO: Review - 'LBL_DELETE_PICKLIST_ITEMS' => 'Delete PickList Items' , // TODO: Review - 'LBL_ITEMS_TO_DELETE' => 'Items to Delete' , // TODO: Review - 'LBL_REPLACE_IT_WITH' => 'Replace it with' , // TODO: Review - 'LBL_ASSIGN_TO_ROLE' => 'Assign to Role' , // TODO: Review - 'LBL_ALL_ROLES' => 'All Roles' , // TODO: Review - 'LBL_CHOOSE_ROLES' => 'Choose Roles' , // TODO: Review - 'LBL_ALL_VALUES' => 'All values' , // TODO: Review - 'LBL_VALUES_ASSIGNED_TO_A_ROLE' => 'Values assigned to a role' , // TODO: Review - 'LBL_ASSIGN_VALUE' => 'Assign Value' , // TODO: Review - 'LBL_SAVE_ORDER' => 'Save Order' , // TODO: Review - 'LBL_ROLE_NAME' => 'Role name' , // TODO: Review - 'LBL_SELECTED_VALUES_MESSGAE' => 'will appear for the user with this role', // TODO: Review - 'LBL_ENABLE/DISABLE_MESSGAE' => 'Click on value to Enable/Disable it.After done click on save', // TODO: Review - 'LBL_ASSIGN_VALUES_TO_ROLES' => 'Assign Values to Roles' , // TODO: Review - 'LBL_SELECTED_VALUES' => 'Selected Values' , // TODO: Review - 'NO_PICKLIST_FIELDS' => 'do not have any picklist fields', // TODO: Review - 'LBL_EDIT_PICKLIST_ITEM' => 'Modifica Picklist Voce', + 'LBL_SELECT_PICKLIST_IN' => 'Seleziona un valore dal lista' , // TODO: Review + 'LBL_ADD_VALUE' => 'Aggiungi Valore' , // TODO: Review + 'LBL_RENAME_VALUE' => 'Rinomina Valore' , // TODO: Review + 'LBL_DELETE_VALUE' => 'Cancella Valore' , // TODO: Review + 'LBL_ITEMS' => 'Valori' , // TODO: Review + 'LBL_DRAG_ITEMS_TO_RESPOSITION' => 'Trascina gli oggetti per riposizionarli', // TODO: Review + 'LBL_SELECT_AN_ITEM_TO_RENAME_OR_DELETE' => 'Seleziona un oggetto per rinominarlo o cancellarlo', // TODO: Review + 'LBL_TO_DELETE_MULTIPLE_HOLD_CONTROL_KEY' => 'Per cancellare più oggetti contemporaneamente, tieni Ctrl premuto mentre selezioni gli oggetti', // TODO: Review + 'LBL_ADD_ITEM_TO' => 'Aggiungi oggetto a' , // TODO: Review + 'LBL_ITEM_VALUE' => 'Valore oggetto' , // TODO: Review + 'LBL_ITEM_TO_RENAME' => 'Oggetto da rinominare' , // TODO: Review + 'LBL_ENTER_NEW_NAME' => 'Inserisci nuovo nome' , // TODO: Review + 'LBL_RENAME_PICKLIST_ITEM' => 'Rinomina oggetto lista' , // TODO: Review + 'LBL_DELETE_PICKLIST_ITEMS' => 'Cancella oggetto lista' , // TODO: Review + 'LBL_ITEMS_TO_DELETE' => 'Oggetti da cancellare' , // TODO: Review + 'LBL_REPLACE_IT_WITH' => 'Sostituisci con' , // TODO: Review + 'LBL_ASSIGN_TO_ROLE' => 'Assegna al Ruolo' , // TODO: Review + 'LBL_ALL_ROLES' => 'Tutti i ruoli' , // TODO: Review + 'LBL_CHOOSE_ROLES' => 'Scegli Ruoli' , // TODO: Review + 'LBL_ALL_VALUES' => 'Tutti i valori' , // TODO: Review + 'LBL_VALUES_ASSIGNED_TO_A_ROLE' => 'Valori assegnati al ruolo' , // TODO: Review + 'LBL_ASSIGN_VALUE' => 'Assegna Valore' , // TODO: Review + 'LBL_SAVE_ORDER' => 'Salva ordine' , // TODO: Review + 'LBL_ROLE_NAME' => 'Nome ruolo' , // TODO: Review + 'LBL_SELECTED_VALUES_MESSGAE' => 'apparirà all\'utente con questo ruolo', // TODO: Review + 'LBL_ENABLE/DISABLE_MESSGAE' => 'Clicca su un valore per ablitarlo/disabilitarlo. Dopo aver fatto clicca su salva', // TODO: Review + 'LBL_ASSIGN_VALUES_TO_ROLES' => 'Assegna valori a ruoli' , // TODO: Review + 'LBL_SELECTED_VALUES' => 'Valori selezionati' , // TODO: Review + 'NO_PICKLIST_FIELDS' => 'non hai alcun campodi tipo menù a tendina', // TODO: Review + 'LBL_EDIT_PICKLIST_ITEM' => 'Modifica Voce Menu', //Translation for module - 'Calendar' => 'Compito', + 'Calendar' => 'Calendario', - 'LBL_NON_EDITABLE_PICKLIST_VALUES' => 'Non I Valori Modificabili', + 'LBL_NON_EDITABLE_PICKLIST_VALUES' => 'I Valori non Modificabili', ); $jsLanguageStrings = array( - 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Item Renamed Successfully' , // TODO: Review - 'JS_ITEM_ADDED_SUCCESSFULLY' => 'Item added Successfully' , // TODO: Review - 'JS_NO_ITEM_SELECTED' => 'No item Selected' , // TODO: Review - 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'More than one Item selected' , // TODO: Review - 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Items Deleted Successfully' , // TODO: Review - 'JS_YOU_CANNOT_DELETE_ALL_THE_VALUES' => 'You cannot delete all the values', // TODO: Review - 'JS_ALL_ROLES_SELECTED' => 'All Roles Selected' , // TODO: Review - 'JS_LIST_UPDATED_SUCCESSFULLY' => 'List updated Successfully' , // TODO: Review - 'JS_SEQUENCE_UPDATED_SUCCESSFULLY' => 'Sequence updated successfully', // TODO: Review - 'JS_VALUE_ASSIGNED_SUCCESSFULLY' => 'Value assigned successfully' , // TODO: Review - 'JS_PLEASE_SELECT_MODULE' => 'Please seelct module' , // TODO: Review + 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Oggetto rinominato con successo' , // TODO: Review + 'JS_ITEM_ADDED_SUCCESSFULLY' => 'Oggetto aggiunto con successo' , // TODO: Review + 'JS_NO_ITEM_SELECTED' => 'Nessun oggetto selezionato' , // TODO: Review + 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'Selezionato più di un oggetto' , // TODO: Review + 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Oggetti cancellati con successo' , // TODO: Review + 'JS_YOU_CANNOT_DELETE_ALL_THE_VALUES' => 'Tu non puoi cancellare tutti i valori', // TODO: Review + 'JS_ALL_ROLES_SELECTED' => 'Tutti i ruoli selezionati' , // TODO: Review + 'JS_LIST_UPDATED_SUCCESSFULLY' => 'Lista aggiornata con successo' , // TODO: Review + 'JS_SEQUENCE_UPDATED_SUCCESSFULLY' => 'Sequenza aggiornata con successo', // TODO: Review + 'JS_VALUE_ASSIGNED_SUCCESSFULLY' => 'Valore assegnato con successo' , // TODO: Review + 'JS_PLEASE_SELECT_MODULE' => 'Seleziona un modulo' , // TODO: Review 'JS_SPECIAL_CHARACTERS' => 'I Caratteri speciali, come', 'JS_NOT_ALLOWED' => 'non sono ammessi', diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Potentials.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Potentials.php index b734962c62820651c25dbcecc59500fc2ff919c4..4ab653e2c4a1060c4809fb9d111061322ee59d92 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Potentials.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Potentials.php @@ -8,6 +8,6 @@ * All Rights Reserved. *************************************************************************************/ $languageStrings = array( - 'LBL_POTENTIAL_FIELD_MAPPING' => 'Opportunità Mapping Campo', + 'LBL_POTENTIAL_FIELD_MAPPING' => 'Mappatura Campi Opportunità ', ); ?> \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Profiles.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Profiles.php index 74e5157d94881c02f5f5560b5b2336e3df21019d..6a4cee690e4ddf41af27ced6f5ab6e75197fc2de 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Profiles.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Profiles.php @@ -10,40 +10,40 @@ $languageStrings = array( 'Profiles' => 'Profili' , 'SINGLE_Profiles' => 'Profilo' , - 'LBL_ADD_RECORD' => 'Add Profile' , - 'LBL_CREATE_PROFILE' => 'Create Profile' , // TODO: Review - 'LBL_PROFILE_NAME' => 'Profile name' , // TODO: Review - 'LBL_DESCRIPTION' => 'Description' , // TODO: Review - 'LBL_EDIT_PRIVILIGES_FOR_THIS_PROFILE' => 'Edit priviliges for this profile', // TODO: Review - 'LBL_MODULES' => 'Modules' , // TODO: Review - 'LBL_PROFILE_VIEW' => 'Profile view' , // TODO: Review - 'LBL_FIELDS' => 'Fields' , // TODO: Review - 'LBL_TOOLS' => 'Tools' , // TODO: Review - 'LBL_FIELD_AND_TOOL_PRIVILEGES' => 'Campo e utensili privilegi' , // TODO: Review - 'LBL_EDIT_RECORD' => 'Edit' , // TODO: Review - 'LBL_DUPLICATE_RECORD' => 'Duplicate' , // TODO: Review - 'LBL_DELETE_RECORD' => 'Delete' , // TODO: Review + 'LBL_ADD_RECORD' => 'Aggiungi Profilo' , + 'LBL_CREATE_PROFILE' => 'Crea Profilo' , // TODO: Review + 'LBL_PROFILE_NAME' => 'Nome Profilo' , // TODO: Review + 'LBL_DESCRIPTION' => 'Descrizione' , // TODO: Review + 'LBL_EDIT_PRIVILIGES_FOR_THIS_PROFILE' => 'Modifica i privilegi di questo profilo', // TODO: Review + 'LBL_MODULES' => 'Moduli' , // TODO: Review + 'LBL_PROFILE_VIEW' => 'Vista profilo' , // TODO: Review + 'LBL_FIELDS' => 'Campi' , // TODO: Review + 'LBL_TOOLS' => 'Strumenti' , // TODO: Review + 'LBL_FIELD_AND_TOOL_PRIVILEGES' => 'Privilegi Campi e strumenti' , // TODO: Review + 'LBL_EDIT_RECORD' => 'Modifica' , // TODO: Review + 'LBL_DUPLICATE_RECORD' => 'Duplica' , // TODO: Review + 'LBL_DELETE_RECORD' => 'Cancella' , // TODO: Review 'LBL_VIEW_PRVILIGE' => 'Visualizza' , 'LBL_EDIT_PRVILIGE' => 'Crea/Modifica' , 'LBL_DELETE_PRVILIGE' => 'Elimina' , - 'LBL_INIVISIBLE' => 'Invisible' , // TODO: Review - 'LBL_READ_ONLY' => 'Read only' , // TODO: Review - 'LBL_WRITE' => 'Write' , // TODO: Review - 'LBL_DELETE_PROFILE' => 'Delete Profile' , // TODO: Review - 'LBL_TRANSFER_ROLES_TO_PROFILE' => 'Transfer roles to profile' , // TODO: Review - 'LBL_PROFILES' => 'Profiles' , // TODO: Review - 'LBL_CHOOSE_PROFILES' => 'Choose Profiles' , // TODO: Review - 'LBL_GLOBAL_PERMISSION_WARNING' => 'Attenzione: gli utenti associati a questo profilo può accedere a tutti i record nel CRM', + 'LBL_INIVISIBLE' => 'Invisibile' , // TODO: Review + 'LBL_READ_ONLY' => 'Sola lettura' , // TODO: Review + 'LBL_WRITE' => 'Scrittura' , // TODO: Review + 'LBL_DELETE_PROFILE' => 'Cancella profilo' , // TODO: Review + 'LBL_TRANSFER_ROLES_TO_PROFILE' => 'Trasferisci ruoli a profilo' , // TODO: Review + 'LBL_PROFILES' => 'Profili' , // TODO: Review + 'LBL_CHOOSE_PROFILES' => 'Scegli i profili' , // TODO: Review + 'LBL_GLOBAL_PERMISSION_WARNING' => 'Attenzione: gli utenti associati a questo profilo possono accedere a tutti i record nel CRM', - 'LBL_EDIT_PRIVILEGES_OF_THIS_PROFILE' => 'I privilegi di modifica a questo profilo', + 'LBL_EDIT_PRIVILEGES_OF_THIS_PROFILE' => 'Modifica i privilegi di questo profilo', 'LBL_VIEW_ALL' => 'Vedi Tutti', 'LBL_EDIT_ALL' => 'Modifica Tutti', - 'LBL_VIEW_ALL_DESC' => 'Possibile visualizzare tutti i moduli di informazioni', - 'LBL_EDIT_ALL_DESC' => 'Possibile modificare tutti i moduli di informazioni', + 'LBL_VIEW_ALL_DESC' => 'Possibile visualizzare le informazioni di tutti i moduli', + 'LBL_EDIT_ALL_DESC' => 'Possibile modificare le informazioni di tutti i moduli', 'LBL_DUPLICATES_EXIST' => 'Profilo Duplicato Esiste', 'LBL_EDIT_PROFILE' => 'Modifica Profilo', ); $jsLanguageStrings = array( - 'JS_RECORD_DELETED_SUCCESSFULLY' => 'Profile deleted successfully', // TODO: Review + 'JS_RECORD_DELETED_SUCCESSFULLY' => 'Profilo cancellato con successo', // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Roles.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Roles.php index ae8786103895fad81eba0fe948c2c9014ebc3fa7..18ff8e332df336deb5f70685edbb31b356049016 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Roles.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Roles.php @@ -11,27 +11,27 @@ $languageStrings = array( 'Roles' => 'Ruoli' , 'SINGLE_Roles' => 'Ruolo' , 'LBL_ADD_RECORD' => 'Aggiungi Ruolo' , - 'LBL_DELETE_ROLE' => 'Delete Role' , // TODO: Review - 'LBL_TRANSFER_OWNERSHIP' => 'Transfer Ownership' , // TODO: Review - 'LBL_TO_OTHER_ROLE' => 'To other Role' , // TODO: Review - 'LBL_CLICK_TO_EDIT_OR_DRAG_TO_MOVE' => 'Click to edit/Drag to move' , // TODO: Review - 'LBL_ASSIGN_ROLE' => 'Assign Role' , // TODO: Review - 'LBL_CHOOSE_PROFILES' => 'Choose profiles' , // TODO: Review - 'LBL_COPY_PRIVILEGES_FROM' => 'Copy privileges from' , // TODO: Review - 'LBL_TRANSFER_TO_OTHER_ROLE' =>'Trasferire la proprietà di altro ruolo', - 'LBL_PROFILE' => 'Profile' , // TODO: Review - 'LBL_REPORTS_TO' => 'Reports To' , // TODO: Review - 'LBL_NAME' => 'Name' , // TODO: Review - 'LBL_ASSIGN_NEW_PRIVILEGES' => 'Assign privileges directly to Role', // TODO: Review - 'LBL_ASSIGN_EXISTING_PRIVILEGES' => 'Assign priviliges from existing profiles', // TODO: Review - 'LBL_PRIVILEGES' => 'Privileges' , // TODO: Review + 'LBL_DELETE_ROLE' => 'Cancella Ruolo' , // TODO: Review + 'LBL_TRANSFER_OWNERSHIP' => 'Trasferisci proprietà ' , // TODO: Review + 'LBL_TO_OTHER_ROLE' => 'ad altro ruolo' , // TODO: Review + 'LBL_CLICK_TO_EDIT_OR_DRAG_TO_MOVE' => 'Clicca per modificare, trascina per muovere' , // TODO: Review + 'LBL_ASSIGN_ROLE' => 'Assegna Ruolo' , // TODO: Review + 'LBL_CHOOSE_PROFILES' => 'Scegli i profili' , // TODO: Review + 'LBL_COPY_PRIVILEGES_FROM' => 'Copia i privilegi da' , // TODO: Review + 'LBL_TRANSFER_TO_OTHER_ROLE' =>'Trasferire la proprietà ad altro ruolo', + 'LBL_PROFILE' => 'Profili' , // TODO: Review + 'LBL_REPORTS_TO' => 'Riporta a' , // TODO: Review + 'LBL_NAME' => 'Nome' , // TODO: Review + 'LBL_ASSIGN_NEW_PRIVILEGES' => 'Assegna privilegi direttamentee a ruolo', // TODO: Review + 'LBL_ASSIGN_EXISTING_PRIVILEGES' => 'Assegna privilegi da profilo esistente', // TODO: Review + 'LBL_PRIVILEGES' => 'Privilegi' , // TODO: Review 'LBL_DUPLICATES_EXIST' => 'Duplicato Ruolo Esiste', 'LBL_CAN_ASSIGN_RECORDS_TO' => 'Può Assegnare Il Record Di', 'LBL_ALL_USERS' => 'Tutti Gli Utenti', 'LBL_USERS_WITH_LOWER_LEVEL' => 'Gli utenti che hanno il Ruolo Subordinato', 'LBL_USERS_WITH_SAME_OR_LOWER_LEVEL' => 'Gli utenti che hanno lo Stesso Ruolo o in Ruolo Subordinato', - 'LBL_EDIT_ROLE' => 'Edit Ruolo', - 'LBL_CREATE_ROLE' => 'Creazione Di Ruolo', + 'LBL_EDIT_ROLE' => 'Modifica Ruolo', + 'LBL_CREATE_ROLE' => 'Creazione Ruolo', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SMSNotifier.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SMSNotifier.php index 8ccce57a6e4a31c3e52dbcf440f5f54cc3ffd395..b9d8cc804b5fefb34db66dcc7457e0842ef80745 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SMSNotifier.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SMSNotifier.php @@ -8,18 +8,18 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'New Configuration' , // TODO: Review - 'SMSNotifier' => 'SMS Provider Configuration' , // TODO: Review - 'LBL_ADD_CONFIGURATION' => 'New Configuration' , // TODO: Review - 'LBL_EDIT_CONFIGURATION' => 'Edit Configuration' , // TODO: Review - 'LBL_SELECT_ONE' => 'Select One' , // TODO: Review + 'LBL_ADD_RECORD' => 'Nuova configurazione' , // TODO: Review + 'SMSNotifier' => 'Configurazione Provider SMS' , // TODO: Review + 'LBL_ADD_CONFIGURATION' => 'Nuova Configurazione' , // TODO: Review + 'LBL_EDIT_CONFIGURATION' => 'Modifica Configurazione' , // TODO: Review + 'LBL_SELECT_ONE' => 'Seleziona uno' , // TODO: Review 'providertype' => 'Provider' , // TODO: Review - 'isactive' => 'Active' , // TODO: Review - 'username' => 'User Name' , // TODO: Review + 'isactive' => 'Attivo' , // TODO: Review + 'username' => 'nome utente' , // TODO: Review 'password' => 'Password' , // TODO: Review ); $jsLanguageStrings = array( - 'LBL_DELETE_CONFIRMATION' => 'Are you sure, you want to delete this SMSNotifier Configuration', // TODO: Review - 'JS_RECORD_DELETED_SUCCESSFULLY' => 'SMS Provider Deleted Successfully', // TODO: Review - 'JS_CONFIGURATION_SAVED' => 'SMS Provider Configurations saved', // TODO: Review + 'LBL_DELETE_CONFIRMATION' => 'Sei sicuoro che vuoi cancellare questa configurazione di SMS Notifier?', // TODO: Review + 'JS_RECORD_DELETED_SUCCESSFULLY' => 'Provider SMS cancellato con successo', // TODO: Review + 'JS_CONFIGURATION_SAVED' => 'Configurazione Provider SMS salvata', // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SharingAccess.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SharingAccess.php index ecf34bfcd6233d9d058143fc667ec1ae98b7cbdf..5dc74cb6a34e2416edb1929e5043a3040806e17a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SharingAccess.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/SharingAccess.php @@ -8,32 +8,32 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'Accounts' => 'Organizations & Contacts' , // TODO: Review + 'Accounts' => 'Aziende e Contatti' , // TODO: Review 'LBL_ADD_CUSTOM_RULE' => 'Aggiungi regola privilegio personalizzata', 'Read Only' => 'R' , 'Read Write' => 'R+W' , - 'LBL_ADD_CUSTOM_RULE_TO' => 'Add Custom Rule to' , // TODO: Review + 'LBL_ADD_CUSTOM_RULE_TO' => 'Aggiungi regola personalizzata a' , // TODO: Review 'LBL_CAN_ACCESSED_BY' => 'accessibile da' , 'LBL_PRIVILEGES' => 'Privilegi' , - 'LBL_SHARING_RULE' => 'Sharing Rules' , + 'LBL_SHARING_RULE' => 'Regole di condivisione' , 'LBL_RULE_NO' => 'Numero regola' , - 'LBL_MODULE' => 'Module' , // TODO: Review - 'LBL_ADVANCED_SHARING_RULES' => 'Advanced Sharing Rules' , // TODO: Review - 'LBL_WITH_PERMISSIONS' => 'With Permissions' , // TODO: Review - 'LBL_APPLY_NEW_SHARING_RULES' => 'Apply New Sharing Rules' , // TODO: Review - 'LBL_READ' => 'Read' , // TODO: Review - 'LBL_READ_WRITE' => 'Read and Write' , // TODO: Review - 'LBL_CUSTOM_ACCESS_MESG' => 'No Custom Access Rules defined', // TODO: Review - 'SINGLE_Groups' => 'Group' , // TODO: Review - 'SINGLE_Roles' => 'Role' , // TODO: Review - 'SINGLE_RoleAndSubordinates' => 'RoleAndSubordinate' , // TODO: Review + 'LBL_MODULE' => 'Modulo' , // TODO: Review + 'LBL_ADVANCED_SHARING_RULES' => 'Regole avanzate di condivisione' , // TODO: Review + 'LBL_WITH_PERMISSIONS' => 'con permessi' , // TODO: Review + 'LBL_APPLY_NEW_SHARING_RULES' => 'Applica nuove regole di condivisione' , // TODO: Review + 'LBL_READ' => 'Lettura' , // TODO: Review + 'LBL_READ_WRITE' => 'Lettura e Scrittura' , // TODO: Review + 'LBL_CUSTOM_ACCESS_MESG' => 'Nessuna regola di accesso personalizzata definita', // TODO: Review + 'SINGLE_Groups' => 'Gruppo' , // TODO: Review + 'SINGLE_Roles' => 'Ruolo' , // TODO: Review + 'SINGLE_RoleAndSubordinates' => 'Ruolo e subordinati' , // TODO: Review 'SharingAccess' => 'Le Regole Di Condivisione', ); $jsLanguageStrings = array( - 'JS_CUSTOM_RULE_SAVED_SUCCESSFULLY' => 'Custom Sharing Rule Saved Successfully', // TODO: Review - 'JS_SELECT_ANY_OTHER_ACCESSING_USER' => 'Select any other accessing user', // TODO: Review - 'JS_NEW_SHARING_RULES_APPLIED_SUCCESSFULLY' => 'New Sharing Rules Applied Successfully', // TODO: Review - 'JS_DEPENDENT_PRIVILEGES_SHOULD_CHANGE' => 'Opportunities, Tickets, Quotes, SalesOrder & Invoice Access must be set to Private when the Organization Access is set to Private', // TODO: Review + 'JS_CUSTOM_RULE_SAVED_SUCCESSFULLY' => 'Regola di condivisione avanzata personalizzata salvata con successo', // TODO: Review + 'JS_SELECT_ANY_OTHER_ACCESSING_USER' => 'Seleziona un altro utente con accesso', // TODO: Review + 'JS_NEW_SHARING_RULES_APPLIED_SUCCESSFULLY' => 'Nuova regola di condivisione applicata con successo', // TODO: Review + 'JS_DEPENDENT_PRIVILEGES_SHOULD_CHANGE' => 'Gli accessi a Opportunità , Ticket, Preventivi, Ordini, Fatture devono essere impostati su Privato quando l\'accesso all\'Azienda è impostato su privato', // TODO: Review ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Vtiger.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Vtiger.php index 63920dec9a49fff3802d64ebab18c2cf40aaeaf5..c1047fdaf1a1b41d59bde0bdd27be623c64ffbed 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Vtiger.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Vtiger.php @@ -11,26 +11,26 @@ $languageStrings = array( 'LBL_INTEGRATION' => 'Integrazione', 'LBL_PBXMANAGER' => 'PBXManager', 'Settings' => 'Impostazioni' , - 'LBL_SEARCH_SETTINGS_PLACEHOLDER' => 'Search Settings' , // TODO: Review - 'LBL_SUMMARY' => 'Summary' , // TODO: Review - 'LBL_ACTIVE_USERS' => 'Users' , // TODO: Review - 'LBL_WORKFLOWS_ACTIVE' => 'Workflows' , // TODO: Review - 'LBL_MODULES' => 'Modules' , // TODO: Review - 'LBL_SETTINGS_SHORTCUTS' => 'Settings Shortcuts' , // TODO: Review + 'LBL_SEARCH_SETTINGS_PLACEHOLDER' => 'Cerca Impostazioni' , // TODO: Review + 'LBL_SUMMARY' => 'Sommario' , // TODO: Review + 'LBL_ACTIVE_USERS' => 'Utenti' , // TODO: Review + 'LBL_WORKFLOWS_ACTIVE' => 'Flusso di lavoro' , // TODO: Review + 'LBL_MODULES' => 'Moduli' , // TODO: Review + 'LBL_SETTINGS_SHORTCUTS' => 'Scorciatoia impostazioni' , // TODO: Review 'LBL_UNPIN' => 'Unpin' , // TODO: Review 'LBL_PIN' => 'pin' , // TODO: Review 'LBL_STUDIO' => 'Studio' , - 'LBL_COMMUNICATION_TEMPLATES' => 'Template Comunicazione' , + 'LBL_COMMUNICATION_TEMPLATES' => 'modelli Comunicazione' , 'LBL_USER_MANAGEMENT' => 'Gestione Utenti e Accessi' , - 'LBL_ACCESS_MANAGEMENT' => 'Access Management' , - 'LBL_MODULE_MANAGER' => 'Module Management' , - 'LBL_NOTIFICATIONS' => 'Notifications' , - 'LBL_EXTERNAL_SERVER_SETTINGS' => 'External Server Settings' , + 'LBL_ACCESS_MANAGEMENT' => 'Gestioni Accessi' , + 'LBL_MODULE_MANAGER' => 'Gestore Moduli' , + 'LBL_NOTIFICATIONS' => 'Notifiche' , + 'LBL_EXTERNAL_SERVER_SETTINGS' => 'impostazioni Server esterno' , 'LBL_OTHER_SETTINGS' => 'Altre Impostazioni' , - 'LBL_EXTENSIONS_PLACE' => 'Extensions Place' , // TODO: Review - 'LBL_EXTENSIONS' => 'Extensions' , // TODO: Review + 'LBL_EXTENSIONS_PLACE' => 'Estensioni Luogo' , // TODO: Review + 'LBL_EXTENSIONS' => 'Estensioni' , // TODO: Review 'LBL_PBXMANAGER' => 'PBXManager', - 'LBL_DESCRIPTION' => 'Description' , // TODO: Review + 'LBL_DESCRIPTION' => 'Descrizione' , // TODO: Review 'LBL_USER_DESCRIPTION' => 'Gestire gli utenti che possono accedere Vtiger CRM', 'LBL_ROLES' => 'Ruoli' , 'LBL_ROLE_DESCRIPTION' => 'Definisce una Gerarchia di Ruoli e la assegna agli Utenti', @@ -39,26 +39,26 @@ $languageStrings = array( 'USERGROUPLIST' => 'Gruppi' , 'LBL_GROUP_DESCRIPTION' => 'Gestisce differenti Gruppi basati sui ruoli, utenti e profili', 'LBL_SHARING_ACCESS' => 'Accesso Condiviso' , - 'LBL_SHARING_ACCESS_DESCRIPTION' => 'Gestisce Regole di condivisione & condivisione personalizzata dei moduli', - 'LBL_WORKFLOW_LIST' => 'Workflow List' , - 'LBL_AVAILABLE_WORKLIST_LIST' => 'Set up dependency between picklist values in each module', + 'LBL_SHARING_ACCESS_DESCRIPTION' => 'Gestisce Regole di condivisione e condivisione personalizzata dei moduli', + 'LBL_WORKFLOW_LIST' => 'Lista flussi di lavoro' , + 'LBL_AVAILABLE_WORKLIST_LIST' => 'Imposta dipendenza tra menu a tendina per ogni modulo', 'LBL_FIELDFORMULAS' => 'Formule campi' , - 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Aggiungi una forumula ai campi personalizzati', + 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Aggiungi una formula ai campi personalizzati', 'VTLIB_LBL_MODULE_MANAGER' => 'Moduli' , - 'VTLIB_LBL_MODULE_MANAGER_DESCRIPTION' => 'Gestisci il comportamento del modulo all'interno del CRM vtiger', - 'LBL_PICKLIST_EDITOR' => 'Valori Picklist campo' , + 'VTLIB_LBL_MODULE_MANAGER_DESCRIPTION' => 'Gestisci il comportamento del modulo all\'interno del CRM vtiger', + 'LBL_PICKLIST_EDITOR' => 'Valori campi Picklist' , 'LBL_PICKLIST_DESCRIPTION' => 'Personalizza i valori delle Picklist in ciascun modulo', 'LBL_PICKLIST_DEPENDENCY_SETUP' => 'Picklist Dipendenze' , - 'LBL_PICKLIST_DEPENDENCY_DESCRIPTION' => 'Set up dependency between picklist values in each module', + 'LBL_PICKLIST_DEPENDENCY_DESCRIPTION' => 'Imposta dipendenza tra valori picklist in ogni modulo', 'LBL_MENU_EDITOR' => 'Menu principale' , - 'LBL_MENU_DESC' => 'Customize Menu Sequence' , - 'LBL_MENU_EDITOR_MESSAGE' =>'Il numero effettivo di voci di menu visualizzate dipender� dalla dimensione dello schermo e pu� essere inferiore a elementi selezionati.', - 'EMAILTEMPLATES' => 'Template Email' , + 'LBL_MENU_DESC' => 'Modifica Sequenza Menu' , + 'LBL_MENU_EDITOR_MESSAGE' =>'Il numero effettivo di voci di menu visualizzate dipenderà dalla dimensione dello schermo e può essere inferiore a elementi selezionati.', + 'EMAILTEMPLATES' => 'Modello Email' , 'LBL_EMAIL_TEMPLATE_DESCRIPTION' => 'Gestisce i template per il modulo Email', - 'LBL_COMPANY_DETAILS' => 'Dettagli Società' , + 'LBL_COMPANY_DETAILS' => 'Dettagli Società ' , 'LBL_COMPANY_DESCRIPTION' => 'Specifica l\'indirizzo e i dati dell\'azienda', 'LBL_MAIL_MERGE' => 'Mail Merge' , - 'LBL_MAIL_MERGE_DESCRIPTION' => 'Gestisce template per Unione Email', + 'LBL_MAIL_MERGE_DESCRIPTION' => 'Gestisce modelli per Unione Email', 'LBL_TAX_SETTINGS' => 'Calcolo delle Tasse' , 'LBL_TAX_DESCRIPTION' => 'Gestisce le tasse e le percentuali di tassazione', 'LBL_MAIL_SERVER_SETTINGS' => 'Server in Uscita' , @@ -71,196 +71,198 @@ $languageStrings = array( 'LBL_CUSTOMIZE_MODENT_NUMBER' => 'Modulo Numerazione', 'LBL_CUSTOMIZE_MODENT_NUMBER_DESCRIPTION' => 'Personalizzazione della numerazione delle entità ', 'LBL_MAIL_SCANNER' => 'Mail Scanner' , - 'LBL_MAIL_SCANNER_DESCRIPTION' => 'Configura mailbox per scansionare', - 'LBL_LIST_WORKFLOWS' => 'Workflow' , - 'LBL_LIST_WORKFLOWS_DESCRIPTION' => 'Crea e modifica i workflow per vtiger', - 'Configuration Editor' => 'Configuration Editor' , + 'LBL_MAIL_SCANNER_DESCRIPTION' => 'Configura scanner mailbox', + 'LBL_LIST_WORKFLOWS' => 'Flusso di lavoro' , + 'LBL_LIST_WORKFLOWS_DESCRIPTION' => 'Crea e modifica i flussi di lavoro per vtiger', + 'Configuration Editor' => 'Edtor Configurazione' , 'LBL_CONFIG_EDITOR_DESCRIPTION' => "file di configurazione Aggiornamento dell'applicazione", - 'Update configuration file of the application' => 'Update application configuration file', 'LBL_CUSTOMER_PORTAL' => 'Portale Clienti' , + 'Update configuration file of the application' => 'Aggiorna file dei configurazione', 'PORTAL_EXTENSION_DESCRIPTION' => 'Permette di configurare il plugin Portale Clienti', - 'LBL_LAYOUT_EDITOR_DESCRIPTION' => 'Designing and Modifying the layout in each of the modules', // TODO: Review - 'LBL_WEBFORMS_DESCRIPTION' => 'Create and manage webforms which can be used to capture Leads', // TODO: Review - 'LBL_TO_ADD_NEW_USER_PLEASE_CLICK_ON' => 'To add a new User, please click on ', // TODO: Review - 'LBL_SETTINGS_ICON' => 'Settings Icon' , // TODO: Review - 'LBL_ADD_OR_DELETE_USERS' => 'Add/Delete Users' , // TODO: Review - 'LBL_ADD_USER' => 'Add User' , // TODO: Review - 'LBL_LABELS_EDITOR' => 'Etichette Editor', + 'LBL_LAYOUT_EDITOR_DESCRIPTION' => 'Progetta e Modifica il Layout in ogni modulo', // TODO: Review + 'LBL_WEBFORMS_DESCRIPTION' => 'Crea e gestisci webforms che possono essere usati per catturare Leads', // TODO: Review + 'LBL_TO_ADD_NEW_USER_PLEASE_CLICK_ON' => 'Per aggiungere un nuovo Utente, clicca su ', // TODO: Review + 'LBL_SETTINGS_ICON' => 'Icona Impostazioni' , // TODO: Review + 'LBL_ADD_OR_DELETE_USERS' => 'Aggiungi/Elimina Utenti' , // TODO: Review + 'LBL_ADD_USER' => 'Aggiungi Utente' , // TODO: Review + 'LBL_LABELS_EDITOR' => 'Editor Etichette', 'LBL_LABELS_EDITOR_DESCRIPTION' => 'Consente di personalizzare i nomi dei moduli, etichette di campo e altre stringhe in base alle vostre esigenze di business', 'Scheduler' => 'Scheduler' , - 'Allows you to Configure Cron Task' => 'Configure Cron Tasks' , + 'Allows you to Configure Cron Task' => 'Configura Cron Tasks' , 'Webforms' => 'Webforms' , - 'Allows you to manage Webforms' => 'Manage Webforms' , - 'LBL_CREATING_NEW' => 'Creating new' , // TODO: Review - 'LBL_EDITING' => 'Editing' , // TODO: Review - 'LBL_EDIT_RECORD' => 'Edit' , // TODO: Review - 'LBL_DELETE_RECORD' => 'Delete' , // TODO: Review - 'LBL_ADD_MOVE_MENU_ITEMS' => 'Add/Move Menu Items' , // TODO: Review - 'LBL_ADD_MENU_ITEM' => 'Add Menu Item' , // TODO: Review + 'Allows you to manage Webforms' => 'Gestisci Webforms' , + 'LBL_CREATING_NEW' => 'Crea Nuova' , // TODO: Review + 'LBL_EDITING' => 'Modifica in corso' , // TODO: Review + 'LBL_EDIT_RECORD' => 'Modifica' , // TODO: Review + 'LBL_DELETE_RECORD' => 'Cancella' , // TODO: Review + 'LBL_ADD_MOVE_MENU_ITEMS' => 'Aggiungi/Sposta oggetti menu' , // TODO: Review + 'LBL_ADD_MENU_ITEM' => 'Aggiungi oggetto menu' , // TODO: Review 'LBL_MAX' => 'Max' , // TODO: Review - 'LBL_TAX_CALCULATIONS' => 'Tax Calculations' , // TODO: Review - 'LBL_TAX_DESC' => 'Manage different types of tax rates for taxes, such as Sales Tax, VAT etc.,', // TODO: Review - 'LBL_PRODUCT_SERVICE_TAXES' => 'Product & Service Taxes' , // TODO: Review - 'LBL_SHIPPING_HANDLING_TAXES' => 'Shipping & Handling Taxes' , // TODO: Review - 'LBL_ADD_NEW_TAX' => 'Add New Tax' , // TODO: Review - 'LBL_EDIT_TAX' => 'Edit Tax' , // TODO: Review - 'LBL_TAX_NAME' => 'Tax Name' , // TODO: Review - 'LBL_TAX_VALUE' => 'Tax Value' , // TODO: Review - 'LBL_STATUS' => 'Status' , // TODO: Review - 'LBL_TAX_STATUS_DESC' => 'Enable checkbox to make tax active', // TODO: Review - 'LBL_ENTER_TAX_NAME' => 'Enter tax name' , // TODO: Review - 'LBL_ENTER_TAX_VALUE' => 'Enter tax value' , // TODO: Review - 'LBL_TAX_NAME_EXIST' => 'Tax Name already exists' , // TODO: Review + 'LBL_TAX_CALCULATIONS' => 'Calcolo Tasse' , // TODO: Review + 'LBL_TAX_DESC' => 'Gestisci differenti tipi di tassazioni, come IVA, IRAP, IRPEF e altro...', // TODO: Review + 'LBL_PRODUCT_SERVICE_TAXES' => 'Tasse per prodotti e servizi' , // TODO: Review + 'LBL_SHIPPING_HANDLING_TAXES' => 'Tasse Trasporto e Imballo' , // TODO: Review + 'LBL_ADD_NEW_TAX' => 'Aggiungi Nuova Tassa' , // TODO: Review + 'LBL_EDIT_TAX' => 'Modifica Tassa' , // TODO: Review + 'LBL_TAX_NAME' => 'Nome Tassa' , // TODO: Review + 'LBL_TAX_VALUE' => 'Valore Tassa' , // TODO: Review + 'LBL_STATUS' => 'Stato' , // TODO: Review + 'LBL_TAX_STATUS_DESC' => 'Spunta la casella per rendere la tassa attiva', // TODO: Review + 'LBL_ENTER_TAX_NAME' => 'Inserisci il nome della tassa' , // TODO: Review + 'LBL_ENTER_TAX_VALUE' => 'Inserisci il valore della tassa' , // TODO: Review + 'LBL_TAX_NAME_EXIST' => 'Nome tassa già esistente' , // TODO: Review 'LBL_TAXES' => 'Tasse', 'LBL_CHARGES_AND ITS_TAXES' => 'Oneri (e le tasse)', 'LBL_TAX_REGIONS' => 'Regioni fiscali', - 'LBL_NO_REGION_EXISTS' => 'No Regione esistere', + 'LBL_NO_REGION_EXISTS' => 'Regione non esistente', 'LBL_TYPE' => 'Tipo', 'LBL_CALCULATION' => 'Calcolo', - 'LBL_ADD_NEW_CHARGE' => 'Aggiungi nuovo Charge', - 'LBL_ADD_NEW_TAX_FOR_CHARGE' => 'Aggiungi nuovo Tax per la carica', - 'LBL_CHARGE_NAME' => 'Caricare Nome', - 'LBL_CHARGE_NAME_EXIST' => 'Carica Nome già esistente', + 'LBL_ADD_NEW_CHARGE' => 'Aggiungi nuovo addebito', + 'LBL_ADD_NEW_TAX_FOR_CHARGE' => 'Aggiungi nuova Tassa per addebito', + 'LBL_CHARGE_NAME' => 'Nome addebito', + 'LBL_CHARGE_NAME_EXIST' => 'Nome addebito già esistente', 'LBL_VALUE' => 'Valore', 'LBL_IS_TAXABLE' => 'imponibile', 'LBL_AVAILABLE_REGIONS' => 'Regioni disponibili', - 'LBL_ADD_NEW_REGION' => 'Aggiungi nuovo Region', - 'LBL_TAX_REGION_DESC' => 'Apparirà Regioni fiscali, mentre la creazione di tasse variabili, e possono essere selezionati durante la creazione di preventivi, fatture, ordini di vendita, ordine di acquisto', - 'LBL_TAX_CALCULATION' => 'Calcolo Tax', + 'LBL_ADD_NEW_REGION' => 'Aggiungi nuova Regione', + 'LBL_TAX_REGION_DESC' => 'Le Regioni fiscali appariranno mentre create tasse variabili, e possono essere selezionate durante la creazione di preventivi, fatture, ordini di vendita, ordine di acquisto', + 'LBL_TAX_CALCULATION' => 'Calcolo Tasse', 'LBL_SIMPLE' => 'Semplice', 'LBL_COMPOUND' => 'Composto', 'LBL_DEDUCTED' => 'Detratto', - 'LBL_TAX_TYPE' => 'Tipo Tax', + 'LBL_TAX_TYPE' => 'Tipo Tassa', 'LBL_FIXED' => 'Fisso', 'LBL_VARIABLE' => 'Variabile', 'LBL_COMPOUND_ON' => 'Compound On', 'LBL_DEFAULT_VALUE' => 'Difetto', - 'LBL_ADD_TAX_BRACKET' => 'Aggiungi staffa di imposta', - 'LBL_TAX_BRACKETS_DESC' => 'Se non è stato assegnato un valore fiscale per un valore predefinito regione verrà utilizzato', - 'LBL_SELECT_SIMPLE_TAXES' => 'Selezionare semplici Tasse', - 'LBL_REGION_NAME' => 'Regione Nome', + 'LBL_ADD_TAX_BRACKET' => 'Aggiungi fascia fiscale', + 'LBL_TAX_BRACKETS_DESC' => 'Se non è stato assegnato un valore fiscale per un valore predefinito verrà utilizzato quello della regione', + 'LBL_SELECT_SIMPLE_TAXES' => 'Selezionare Tasse semplici', + 'LBL_REGION_NAME' => 'Nome Regione', 'LBL_ENTER_REGION_NAME' => 'Inserire Nome Regione', 'LBL_EDIT_REGION' => 'Modifica Regione', - 'LBL_TAX_REGION_EXIST' => 'Regione Nome già esistente', - 'LBL_EDIT_CHARGE' => 'Modifica Charge', + 'LBL_TAX_REGION_EXIST' => 'Nome Regione già esistente', + 'LBL_EDIT_CHARGE' => 'Modifica addebito', 'LBL_CHARGE_FORMAT' => 'Carica Format', - 'LBL_FLAT' => 'Appartamento', - 'LBL_DIRECT_PRICE' => 'Prezzo diretta', + 'LBL_FLAT' => 'Piatto', + 'LBL_DIRECT_PRICE' => 'Prezzo diretto', 'LBL_PERCENT' => 'Percentuale', - 'LBL_CHARGE_TYPE' => 'Tipo di carica', - 'LBL_CHARGE_VALUE' => 'Carica Valore', - 'LBL_ENTER_CHARGE_NAME' => 'Inserisci Charge Nome', - 'LBL_ENTER_CHARGE_VALUE' => 'Inserisci Charge Valore', + 'LBL_CHARGE_TYPE' => 'Tipo di addebito', + 'LBL_CHARGE_VALUE' => 'Valore addebito', + 'LBL_ENTER_CHARGE_NAME' => 'Inserisci Nome addebito', + 'LBL_ENTER_CHARGE_VALUE' => 'Inserisci Valore addebito', 'LBL_REGIONS' => 'Regioni', - 'LBL_ENABLE_TAXES_FOR_CHARGE' => 'Attiva se carica è imponibile', - 'LBL_SELECT_TAX' => 'Selezionare Tax', + 'LBL_ENABLE_TAXES_FOR_CHARGE' => 'Attiva tasse per addebito', + 'LBL_SELECT_TAX' => 'Selezionare Tassa', 'LBL_SELECT_TAXES' => 'Selezionare Tasse', 'LBL_SELECT_REGIONS' => 'Selezionare le Regioni', - 'LBL_SELECT_TAX_DESC' => 'Solo le imposte su spese indicate', - 'LBL_CHARGE_STORE_DISC' => 'Valore di carico conservare sempre in valuta base', + 'LBL_SELECT_TAX_DESC' => 'mostra solo le tasse sugli addebiti', + 'LBL_CHARGE_STORE_DISC' => 'Valore addebito sempre conservato in valuta base', 'LBL_DEDUCTED_TAX_DISC' => 'Le imposte detratte sono calcolate sul totale degli articoli, e sono dedotti dal totale', - 'LBL_TERMS_AND_CONDITIONS' => 'Terms & Conditions' , // TODO: Review - 'LBL_SPECIFY_TERMS_AND_CONDITIONS' => 'Specify Terms & Conditions here', // TODO: Review - 'LBL_ANNOUNCEMENTS' => 'Announcements' , // TODO: Review - 'LBL_ENTER_ANNOUNCEMENT_HERE' => 'Enter Announcement Here' , // TODO: Review - 'LBL_ANNOUNCEMENT_DESC' => 'Change the text that appears in the announcement display on top of each page', // TODO: Review + 'LBL_TERMS_AND_CONDITIONS' => 'Termini e Condizioni' , // TODO: Review + 'LBL_SPECIFY_TERMS_AND_CONDITIONS' => 'Specifica Termini e Condizioni qui', // TODO: Review + 'LBL_ANNOUNCEMENTS' => 'Annunci' , // TODO: Review + 'LBL_ENTER_ANNOUNCEMENT_HERE' => 'Inserisci Annunci qui' , // TODO: Review + 'LBL_ANNOUNCEMENT_DESC' => 'Cambia il testo che appare nell\'annuncio mostrato in testa ad ogni pagina', // TODO: Review 'LBL_RESET_TO_DEFAULT' => 'Reset to Default' , // TODO: Review - 'LBL_SERVER_NAME' => 'Server Name' , // TODO: Review - 'LBL_USER_NAME' => 'User Name' , // TODO: Review + 'LBL_SERVER_NAME' => 'Nome Server' , // TODO: Review + 'LBL_USER_NAME' => 'Nome Utente' , // TODO: Review 'LBL_PASSWORD' => 'Password' , // TODO: Review - 'LBL_FROM_EMAIL' => 'From Email' , // TODO: Review - 'LBL_REQUIRES_AUTHENTICATION' => 'Requires Authentication' , // TODO: Review - 'LBL_OUTGOING_SERVER' => 'Outgoing Server' , // TODO: Review - 'LBL_OUTGOING_SERVER_DESC' => 'Configure your Outgoing Mail Server details', // TODO: Review - 'LBL_DEFAULT' => 'By default, SMTP account settings for the outgoing server are configured to od1.vtiger.com mail server. To avoid outgoing emails getting filtered out by spam filters on your recipient ISP mail server, we recommend you implement one of the following.', // TODO: Review - 'LBL_OPTIONS1' => 'Send emails from your mail server<br> - - Enter the SMTP account details (Server Name, User Name, Password) for the same account as entered in the FROM email address.', // TODO: Review - 'LBL_OPTIONS2' =>"Add vtiger.com server as an authorized sender of emails for your domain <b>(your_company.com)</b> when you are using your <b>From Email (eg : support@your_company.com)</b>.<br> - -To ensure that your emails are not rejected by recipient's Server as SPAM, - the below mentioned TXT record should be added to your domain's DNS record", - 'LBL_MAIL_SERVER_SMTP' => 'Mail Server Settings (SMTP)' , // TODO: Review - 'LBL_OUTGOING_SERVER_FROM_FIELD' => 'NOTE: If "From Email" field is set to blank then the User Email address will be picked up.', // TODO: Review - 'LBL_TESTMAILSTATUS' => 'Test Mail Status : ' , // TODO: Review - 'LBL_MAILSENDERROR' => 'Mail could not be sent to the admin user. Please check the admin emailid/Server settings', // TODO: Review - 'LBL_CONFIG_EDITOR' => 'Configuration Editor' , // TODO: Review - 'LBL_CONFIG_DESCRIPTION' => 'Edit the Configuration details of vtiger CRM', // TODO: Review + 'LBL_FROM_EMAIL' => 'Da Email' , // TODO: Review + 'LBL_REQUIRES_AUTHENTICATION' => 'Richiede Autenticazione' , // TODO: Review + 'LBL_OUTGOING_SERVER' => 'Server in uscita' , // TODO: Review + 'LBL_OUTGOING_SERVER_DESC' => 'Configura i dettagli del tuo server in uscita', // TODO: Review + 'LBL_DEFAULT' => 'Di default i dettagli SMPT dell\'account server in uscita sono configurati a od1.vtiger.com. Per evitare che le email in uscita sia filtrate come spam dal tuo ISP, wi consigliamo uno dei seguenti.', // TODO: Review + 'LBL_OPTIONS1' => 'Invia email dal tuo server<br> +- Inserisci i dettagli dell\'account server SMTP (Server Name, User Name, Password) per lo stesso account che appare nel campo DA.', // TODO: Review- + 'LBL_OPTIONS2' =>"Aggiungi vtiger.com server come un sistema di invio autorizzato per il tuo dominio <b>(your_company.com)</b> + quando tu usi <b>Da email (eg : support@your_company.com)</b>.<br> + - Per assicurare che le tue email non siano rigettate come SPAM dai server dei destinatari + -Per assicurarsi che le tue email non siano rifiutate come SPAM dal sever del ricevente, + il file TXT qui di sotto dovrebbero essere aggiunto al domain DNS record.", + 'LBL_MAIL_SERVER_SMTP' => 'Impostazioni Mail Server (SMTP)' , // TODO: Review + 'LBL_OUTGOING_SERVER_FROM_FIELD' => 'NOTA: se il campo DA dell\'email è vuota, allora sarà usato l\'email dell\'utente', // TODO: Review + 'LBL_TESTMAILSTATUS' => 'Test Stato eMail : ' , // TODO: Review + 'LBL_MAILSENDERROR' => 'Non posso inviare email all\'amministratore. Controlla l\'email e ID dell\'amministrato e le impostazioni del server', // TODO: Review + 'LBL_CONFIG_EDITOR' => 'Editor Configurazione' , // TODO: Review 'LBL_CONFIG_FILE' => 'config.inc.php' , // TODO: Review - 'LBL_PERSONAL_EMAIL_TRACKING_INFO' => "Per monitorare apre di email dirette inviate ai contatti, si prega di abilitare questa opzione. Si prega di notare che le email inviate dal modulo campagne di email sono sempre monitorati, e non influenzata da questa impostazione", + 'LBL_CONFIG_DESCRIPTION' => 'Modifica i dettagli della configurazione di Vtiger CRM', // TODO: Review + 'LBL_PERSONAL_EMAIL_TRACKING_INFO' => "Per monitorare l\'apertura delle email dirette inviate ai contatti, si prega di abilitare questa opzione. Si prega di notare che le email inviate dal modulo campagne di email sono sempre monitorati, e non è influenzata da questa impostazione", 'LBL_MB' => 'MB' , // TODO: Review - 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Calendar Display' , // TODO: Review - 'LBL_WORLD_CLOCK_DISPLAY' => 'World Clock Display' , // TODO: Review - 'LBL_CALCULATOR_DISPLAY' => 'Calculator Display' , // TODO: Review - 'LBL_USE_RTE' => 'Use RTE' , // TODO: Review - 'LBL_HELPDESK_SUPPORT_EMAILID' => 'Helpdesk Support Email-Id' , // TODO: Review - 'LBL_HELPDESK_SUPPORT_NAME' => 'Helpdesk Support Name' , // TODO: Review - 'LBL_MAX_UPLOAD_SIZE' => 'Maximum Upload Size (Max %sMB)', // TODO: Review - 'LBL_MAX_HISTORY_VIEWED' => 'Maximum History Viewed' , // TODO: Review - 'LBL_DEFAULT_MODULE' => 'Default Module' , // TODO: Review - 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW' => 'Maximum text length in List View', // TODO: Review - 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW' => 'Maximum entries per page in List View', // TODO: Review + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Calendario Display' , // TODO: Review + 'LBL_WORLD_CLOCK_DISPLAY' => 'Orologio Mondiale Display' , // TODO: Review + 'LBL_CALCULATOR_DISPLAY' => 'Calcolatrice Display' , // TODO: Review + 'LBL_USE_RTE' => 'Usa RTE' , // TODO: Review + 'LBL_HELPDESK_SUPPORT_EMAILID' => 'Email-Id Supporto Helpdesk ' , // TODO: Review + 'LBL_HELPDESK_SUPPORT_NAME' => 'Nome Supporto Helpdesk ' , // TODO: Review + 'LBL_MAX_UPLOAD_SIZE' => 'Grandezza massima Upload (Max %sMB)', // TODO: Review + 'LBL_MAX_HISTORY_VIEWED' => 'Massima vista storico' , // TODO: Review + 'LBL_DEFAULT_MODULE' => 'Modulo Default' , // TODO: Review + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW' => 'Massima lunghezza testo in vista lista', // TODO: Review + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW' => 'Numero massiamo di voci per pagina in vista lista', // TODO: Review 'LBL_EMAIL_TRACKING' => 'Attivare il rilevamento email', - 'LBL_INVALID_EMAILID' => 'Invalid EmailId' , // TODO: Review - 'LBL_INVALID_SUPPORT_NAME' => 'Invalid Name' , // TODO: Review - 'LBL_INVALID_MODULE' => 'Invalid Module' , // TODO: Review - 'LBL_INVALID_NUMBER' => 'Invalid Number' , // TODO: Review - 'LBL_FIELDS_INFO_IS_EMPTY' => 'Fields information is empty' , // TODO: Review - 'LBL_SUCCESSFULLY_UPDATED' => 'Successfully Updated' , // TODO: Review + 'LBL_INVALID_EMAILID' => 'EmailId non valida' , // TODO: Review + 'LBL_INVALID_SUPPORT_NAME' => 'Nome non valido' , // TODO: Review + 'LBL_INVALID_MODULE' => 'Modulo non valido' , // TODO: Review + 'LBL_INVALID_NUMBER' => 'Numero non valido' , // TODO: Review + 'LBL_FIELDS_INFO_IS_EMPTY' => 'L\'informazione dei campi è vuota' , // TODO: Review + 'LBL_SUCCESSFULLY_UPDATED' => 'Aggiornato con successo' , // TODO: Review 'LBL_CUSTOMIZE_RECORD_NUMBERING' => 'Modulo Numerazione' , // TODO: Review - 'LBL_MODULE_ENTITY_NUMBER_CUSTOMIZATION' => 'Module Entity Number customization', // TODO: Review - 'LBL_UPDATE_MISSING_RECORD_SEQUENCE' => 'Update Missing Record Sequence', // TODO: Review - 'LBL_USE_PREFIX' => 'Use Prefix' , // TODO: Review - 'LBL_START_SEQUENCE' => 'Start Sequence' , // TODO: Review - 'organizationname' => 'Company Name' , // TODO: Review - 'logoname' => 'Company Logo' , // TODO: Review - 'address' => 'Address' , // TODO: Review - 'city' => 'City' , // TODO: Review - 'state' => 'State' , // TODO: Review - 'code' => 'Postal Code' , // TODO: Review - 'country' => 'Country' , // TODO: Review - 'phone' => 'Phone' , // TODO: Review + 'LBL_MODULE_ENTITY_NUMBER_CUSTOMIZATION' => 'Personalizzazione Modulo numero entità ', // TODO: Review + 'LBL_UPDATE_MISSING_RECORD_SEQUENCE' => 'Aggiorna sequenza mancate record', // TODO: Review + 'LBL_USE_PREFIX' => 'Usa Prefisso' , // TODO: Review + 'LBL_START_SEQUENCE' => 'Comincia sequenza' , // TODO: Review + 'organizationname' => 'Nome azienda' , // TODO: Review + 'logoname' => 'Logo Azienda' , // TODO: Review + 'address' => 'Indirizzo' , // TODO: Review + 'city' => 'Città ' , // TODO: Review + 'state' => 'Stato' , // TODO: Review + 'code' => 'CAP' , // TODO: Review + 'country' => 'Nazione' , // TODO: Review + 'phone' => 'Telefono' , // TODO: Review 'fax' => 'Fax' , // TODO: Review - 'website' => 'Website' , // TODO: Review + 'website' => 'Sito web' , // TODO: Review 'vatid' => 'partita Iva', 'facebook' => 'Facebook' , 'twitter' => 'Twitter' , 'linkedin' => 'LinkedIn' , - 'LBL_IMAGE_CORRUPTED' => 'Virus detected or Uploaded image corrupted', // TODO: Review - 'LBL_LOGO_RECOMMENDED_MESSAGE' => 'Ammessi dimensioni 150X40 pixel (formato .jpeg, .jpg, .png, .gif, .pjpeg, .x-png).', // TODO: Review - 'LBL_COMPANY_INFORMATION' => 'Company Information' , // TODO: Review - 'LBL_UPDATE' => 'Update' , // TODO: Review - 'LBL_UPDATE_LOGO' => 'Update Logo' , // TODO: Review - 'LBL_COMPANY_LOGO' => 'Company Logo' , // TODO: Review - 'LBL_EDIT_COMPANY_DETAILS_MESSAGE' => 'To edit company details, please click on Settings Icon > Add/Delete Users > Company ', // TODO: Review - 'LBL_ACTIVE' => 'Active' , // TODO: Review - 'LBL_INACTIVE' => 'In Active' , // TODO: Review - 'LBL_DISABLED' => 'Disabled' , // TODO: Review - 'LBL_RUNNING' => 'Running' , // TODO: Review - 'LBL_LAST_SCAN_TIMED_OUT' => 'Last scan timed out' , // TODO: Review - 'LBL_LAST_SCAN_AT' => 'Last scanned at ' , // TODO: Review - 'LBL_TIME_TAKEN' => ' time taken ' , // TODO: Review - 'LBL_SHORT_SECONDS' => 'sec' , // TODO: Review + 'LBL_IMAGE_CORRUPTED' => 'Trovato Virus o Immagine corrotta caricata', // TODO: Review + 'LBL_LOGO_RECOMMENDED_MESSAGE' => 'Ammesse dimensioni 150X40 pixel (formato .jpeg, .jpg, .png, .gif, .pjpeg, .x-png).', // TODO: Review + 'LBL_COMPANY_INFORMATION' => 'Informazioni Azienda' , // TODO: Review + 'LBL_UPDATE' => 'Aggiorna' , // TODO: Review + 'LBL_UPDATE_LOGO' => 'Aggiorna Logo' , // TODO: Review + 'LBL_COMPANY_LOGO' => 'Logo Azienda' , // TODO: Review + 'LBL_EDIT_COMPANY_DETAILS_MESSAGE' => 'Per modificare i dettagli Azienda, clicca sull\'icona Impostazioni > Aggiungi/Cancella Utenti > Azienda ', // TODO: Review + 'LBL_ACTIVE' => 'Attivo' , // TODO: Review + 'LBL_INACTIVE' => 'Non attivo' , // TODO: Review + 'LBL_DISABLED' => 'Disattivato' , // TODO: Review + 'LBL_RUNNING' => 'In esecuzione' , // TODO: Review + 'LBL_LAST_SCAN_TIMED_OUT' => 'L\'ultima scansiano è scaduta' , // TODO: Review + 'LBL_LAST_SCAN_AT' => 'Ultima scansione alle ' , // TODO: Review + 'LBL_TIME_TAKEN' => ' tempo impiegato ' , // TODO: Review + 'LBL_SHORT_SECONDS' => 'secondi' , // TODO: Review //User Login History - 'LoginHistory' => 'User Login History', - 'LBL_LOGIN_HISTORY_DETAILS' => 'Login History', - 'LBL_LOGIN_HISTORY_DESCRIPTION' => 'Login History Details', - 'LBL_USER_NAME'=> 'User Name', - 'LBL_USER_IP_ADDRESS'=> 'User IP Address', - 'LBL_LOGIN_TIME' => 'Sign-in Time', - 'LBL_LOGGED_OUT_TIME' => 'Sign-out Time', - 'LBL_STATUS' => 'Status', + 'LoginHistory' => 'Cronologia Login Utente', + 'LBL_LOGIN_HISTORY_DETAILS' => 'Cronologia Login', + 'LBL_LOGIN_HISTORY_DESCRIPTION' => 'Dettagli Cronologia Login', + 'LBL_USER_NAME'=> 'Nome Utente', + 'LBL_USER_IP_ADDRESS'=> 'Indirizzo IP Utente', + 'LBL_LOGIN_TIME' => 'Ora Sign-in', + 'LBL_LOGGED_OUT_TIME' => 'Ora Sign-out', + 'LBL_STATUS' => 'Stato', // Leads and Potentials Field Mapping - 'LBL_SAVED_SUCCESSFULLY' => 'Saved Successfully' , // TODO: Review - 'LBL_DELETED_SUCCESSFULLY' => 'Deleted Successfully' , // TODO: Review - 'LBL_INVALID_MAPPING' => 'Invalid Mapping' , // TODO: Review - 'LBL_FIELD_LABEL' => 'Field Label' , // TODO: Review - 'LBL_FIELD_TYPE' => 'Field Type' , // TODO: Review - 'LBL_MAPPING_WITH_OTHER_MODULES' => 'Mapping with other Modules', // TODO: Review - 'LBL_ADD_MAPPING' => 'Add Mapping' , // TODO: Review - 'LBL_NONE' => 'None' , // TODO: Review + 'LBL_SAVED_SUCCESSFULLY' => 'Salvato con successo' , // TODO: Review + 'LBL_DELETED_SUCCESSFULLY' => 'Cancellato con successo' , // TODO: Review + 'LBL_INVALID_MAPPING' => 'Mappatura non valida' , // TODO: Review + 'LBL_FIELD_LABEL' => 'Etichetta campo' , // TODO: Review + 'LBL_FIELD_TYPE' => 'Tipo campo' , // TODO: Review + 'LBL_MAPPING_WITH_OTHER_MODULES' => 'Mappatura con altri moduli', // TODO: Review + 'LBL_ADD_MAPPING' => 'Aggiungi Mappatura' , // TODO: Review + 'LBL_NONE' => 'Niente' , // TODO: Review 'phone' => 'Telefono' , 'picklist' => 'Promemoria' , 'email' => 'Email' , @@ -280,8 +282,8 @@ $languageStrings = array( 'LBL_DEFAULT_TAX_MODE' => 'Modalità fiscale default' , 'LBL_RELATIONSHIPS' => 'Relazioni', 'LBL_MODULE_BUILDER_DESCRIPTION' => 'Creazione di nuovi moduli', - 'LBL_GATEWAY_CONFIGURATION' => 'Pagamento Configurazione Gateway', - 'MAIN_PRODUCT_WHITELABEL' => 'Etichettatura bianco CRM', + 'LBL_GATEWAY_CONFIGURATION' => 'Configurazione Gateway', + 'MAIN_PRODUCT_WHITELABEL' => 'Etichettatura bianca CRM', 'LBL_WHITE_LABELING_INFO' => "L'attivazione di questo rimuoverà icona feedback, collegamenti video, nuove funzionalità video e piè di pagina dal CRM.", 'LBL_WHITE_LABELING_INFO_MSG' => "L'attivazione di questo rimuoverà tasto di aiuto e piè di pagina dal CRM.", 'LBL_PHONE_CONFIGURATION' => 'Configurazione Telefono', @@ -300,23 +302,23 @@ $languageStrings = array( 'LBL_NO_LOGO_EDIT_AND_UPLOAD' => 'Nessuna immagine, modificare e caricare l\'immagine', 'EmailTemplate' => 'Modello E-Mail', 'LBL_TEMPLATE_NAME' => 'Nome del modello', - 'LBL_SUBJECT' => 'Soggetto', - 'LBL_EXTENSION_STORE' => 'L\'Estensione Di Archivio', + 'LBL_SUBJECT' => 'Oggetto', + 'LBL_EXTENSION_STORE' => 'Negozio estensioni', 'LBL_MODULE_MANAGEMENT' => 'Modulo Di Gestione', 'LBL_AUTOMATION' => 'Automazione', 'LBL_CONFIGURATION' => 'Configurazione', - 'LBL_MARKETING_SALES' => 'Marketing & Sales', + 'LBL_MARKETING_SALES' => 'Marketing e Vendite', 'LBL_INVOICES' => 'Fatture', 'LBL_SUPPORT' => 'Supporto', 'LBL_TEMPLATES' => 'Modelli', 'LBL_MODULE_CUSTOMIZATION' => 'Modulo Di Layout E Campi', 'LBL_TAX_MANAGEMENT' => 'La Gestione Fiscale', - 'LBL_LEAD_MAPPING' => 'Conversione Di Lead Di Mappatura Dei Dati', - 'LBL_OPPORTUNITY_MAPPING' => 'Possibilità di Progetto di Mappatura', + 'LBL_LEAD_MAPPING' => 'Mappatura Conversione Dei Lead', + 'LBL_OPPORTUNITY_MAPPING' => 'Mappatura opportunità ', 'LBL_PICKLIST_DEPENDENCY' => 'Selezione Di Dipendenza', 'LBL_MY_TAGS' => 'Il Mio Tag', 'LBL_ADD_MODULE' => 'Aggiungi Modulo', - 'LBL_SMART_NOTIFICATIONS' => 'Smart Notifiche', + 'LBL_SMART_NOTIFICATIONS' => 'Notifiche Smart', 'LBL_FORECAST_SETTINGS' => 'Le Previsioni Di', 'LBL_SEARCH_FOR_SETTINGS' => 'Ricerca per un\'impostazione , ad esempio, Moduli', 'LBL_GOOGLE' => 'Google', @@ -327,39 +329,39 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_PLEASE_SELECT_ATLEAST_ONE_MEMBER_FOR_A_GROUP' => 'Please select atleast one member for a group', // TODO: Review - 'JS_GROUP_DELETED_SUCCESSFULLY' => 'Group deleted successfully' , // TODO: Review - 'JS_TAX_SAVED_SUCCESSFULLY' => 'Tax Saved Successfully' , // TODO: Review - 'JS_TAX_DISABLED' => 'Tax disabled' , // TODO: Review - 'JS_TAX_ENABLED' => 'Tax Enabled' , // TODO: Review + 'JS_PLEASE_SELECT_ATLEAST_ONE_MEMBER_FOR_A_GROUP' => 'Per favoer selezione un membro per gruppo', // TODO: Review + 'JS_GROUP_DELETED_SUCCESSFULLY' => 'Gruppo cancellato con successo' , // TODO: Review + 'JS_TAX_SAVED_SUCCESSFULLY' => 'Tasse salvate con successo' , // TODO: Review + 'JS_TAX_DISABLED' => 'Tasse disabilitate' , // TODO: Review + 'JS_TAX_ENABLED' => 'Tasse abilitate' , // TODO: Review 'JS_SELECT_SIMPLE_TAXES' => 'Selezionare semplici Tasse', 'JS_TAX_REGION_SAVED_SUCCESSFULLY' => 'Regione fiscale salvato con successo', - 'JS_TAX_REGION_DELETED_SUCCESSFULLY' => 'Tax Region eliminato con successo', - 'JS_INVENTORY_CHARGE_SAVED_SUCCESSFULLY' => 'Codice di carica Salvato', - 'JS_INVENTORY_CHARGE_DELETED_SUCCESSFULLY' => 'Codice di carica eliminata correttamente', + 'JS_TAX_REGION_DELETED_SUCCESSFULLY' => 'Regione Fiscale eliminata con successo', + 'JS_INVENTORY_CHARGE_SAVED_SUCCESSFULLY' => 'Codice di addebito Salvato', + 'JS_INVENTORY_CHARGE_DELETED_SUCCESSFULLY' => 'Codice di addebito eliminata correttamente', 'JS_DELETE_CHARGE_DESC' => 'L"eliminazione di questa tassa avrà effetto su tutti i record di inventario con questo carica esistente. Vuoi continuare?', 'JS_DELETE_REGION_DESC' => 'L"eliminazione di questa regione interesserà tutte le tasse di inventario con questa regione esistente. Vuoi continuare?', 'JS_SELECT_REGIONS' => 'Selezionare le Regioni', 'JS_DELETE' => 'Cancellare', - 'JS_EDIT' => 'Edit' , // TODO: Review - 'JS_ANNOUNCEMENT_SAVED' => 'Announcement Saved' , // TODO: Review - 'JS_CONFIRM_DEFAULT_SETTINGS' => 'Are you sure that you want to change the server details to the default server values', // TODO: Review - 'JS_PLEASE_ENTER_NUMBER_IN_RANGE_1TO5' => 'Please enter value in the range 1-%sMB', // TODO: Review - 'JS_PLEASE_ENTER_NUMBER_IN_RANGE_1TO100' => 'Please enter value in the range 1-100', // TODO: Review - 'JS_RECORD_NUMBERING_SAVED_SUCCESSFULLY_FOR' => 'Record Numbering Successfully saved for', // TODO: Review - 'JS_RECORD_NUMBERING_UPDATED_SUCCESSFULLY_FOR' => 'Record Numbering Updated Successfully for', // TODO: Review - 'JS_SEQUENCE_NUMBER_MESSAGE' => 'Sequence Number should be greater than or equal to', // TODO: Review - 'LBL_WRONG_IMAGE_TYPE' => 'not supported Image type' , // TODO: Review - 'LBL_MAXIMUM_SIZE_EXCEEDS' => 'You can upload maximum size of 1MB only', // TODO: Review - 'LBL_NO_LOGO_SELECTED' => 'No logo selected' , // TODO: Review - 'JS_CONFIGURATION_DETAILS_SAVED' => 'Configuration Details Saved' , // TODO: Review + 'JS_EDIT' => 'Modifica' , // TODO: Review + 'JS_ANNOUNCEMENT_SAVED' => 'Annuncio Salvato' , // TODO: Review + 'JS_CONFIRM_DEFAULT_SETTINGS' => 'Sei sicuro che vuoi cambiare i dattagli del server con quelli di default?', // TODO: Review + 'JS_PLEASE_ENTER_NUMBER_IN_RANGE_1TO5' => 'Inserisci un valore nel campo 1-%sMB', // TODO: Review + 'JS_PLEASE_ENTER_NUMBER_IN_RANGE_1TO100' => 'inserisci un valore nel campo 1-100', // TODO: Review + 'JS_RECORD_NUMBERING_SAVED_SUCCESSFULLY_FOR' => 'Numerazione record salvata con successo per', // TODO: Review + 'JS_RECORD_NUMBERING_UPDATED_SUCCESSFULLY_FOR' => 'Numerazione record aggiornata con successo per', // TODO: Review + 'JS_SEQUENCE_NUMBER_MESSAGE' => 'La sequenza di numerazione dovrebbe essere maggiore o uguale a', // TODO: Review + 'LBL_WRONG_IMAGE_TYPE' => 'tipo Immagine non supportata' , // TODO: Review + 'LBL_MAXIMUM_SIZE_EXCEEDS' => 'Puoi carica solamente massimo 1MB', // TODO: Review + 'LBL_NO_LOGO_SELECTED' => 'Nessun logo selezionato' , // TODO: Review + 'JS_CONFIGURATION_DETAILS_SAVED' => 'Dettagli configurazione salvata' , // TODO: Review 'JS_DEFAULT_TAX_MODE_SET_AS' => 'Modalità d"imposta di default impostata come ', 'JS_TERMS_AND_CONDITIONS_SAVED' => 'Termini e condizioni salvato', 'JS_INVALID_URL' => 'URL non valido', - 'JS_LBL_TAX_REGION_EXIST' => 'Regione Nome esiste già ', - 'JS_LOGO_IMAGE_DIMENSIONS_WRONG' => 'Logo dimensioni dell\'Immagine non corrisponde al permesso dimensione. Ridimensionare l\'immagine e provare di nuovo.', + 'JS_LBL_TAX_REGION_EXIST' => 'Nome Regione esiste già ', + 'JS_LOGO_IMAGE_DIMENSIONS_WRONG' => 'Dimensioni del Logo dell\'Immagine non corrisponde alle dimensioni permesse. Ridimensionare l\'immagine e provare di nuovo.', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Webforms.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Webforms.php index d8ef4d3b9cae96d9de1e2bc247570280795935b4..b6e2d8ce0954bf34c73fac91c1534ae917e57b2b 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Webforms.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/Webforms.php @@ -9,57 +9,57 @@ ************************************************************************************/ $languageStrings = array( 'SINGLE_Settings:Webforms' => 'Webform' , // TODO: Review - 'WebForm Name' => 'Webform Name' , // TODO: Review - 'Public Id' => 'Public Id' , // TODO: Review - 'Enabled' => 'Status' , // TODO: Review - 'Module' => 'Module' , // TODO: Review - 'Return Url' => 'Return Url' , // TODO: Review + 'WebForm Name' => 'Nome Webform' , // TODO: Review + 'Public Id' => 'Id Pubblico' , // TODO: Review + 'Enabled' => 'Stato' , // TODO: Review + 'Module' => 'Modulo' , // TODO: Review + 'Return Url' => 'Url di ritorno' , // TODO: Review 'Post Url' => 'Post Url' , // TODO: Review 'Captcha Enabled' => 'Captcha abilitato' , 'SINGLE_Webforms' => 'Webform' , // TODO: Review - 'LBL_SHOW_FORM' => 'Show Form' , // TODO: Review - 'LBL_DUPLICATES_EXIST' => 'Webform Name already exists' , // TODO: Review - 'LBL_WEBFORM_INFORMATION' => 'Webform Information' , // TODO: Review - 'LBL_FIELD_INFORMATION' => 'Field Information' , // TODO: Review - 'LBL_FIELD_NAME' => 'Field Name' , // TODO: Review - 'LBL_OVERRIDE_VALUE' => 'Override Value' , // TODO: Review - 'LBL_MANDATORY' => 'Mandatory' , // TODO: Review - 'LBL_WEBFORM_REFERENCE_FIELD' => 'Webforms reference Field' , // TODO: Review - 'LBL_SELECT_FIELDS_OF_TARGET_MODULE' => 'Select Fields for Target Module...', // TODO: Review - 'LBL_ALLOWS_YOU_TO_MANAGE_WEBFORMS' => 'Allows you to manage webforms', // TODO: Review - 'LBL_ADD_FIELDS' => 'Add Fields' , // TODO: Review - 'LBL_EMBED_THE_FOLLOWING_FORM_IN_YOUR_WEBSITE' => 'Embed the following form in your website', // TODO: Review - 'LBL_SELECT_VALUE' => 'Select Value' , // TODO: Review - 'LBL_LABEL' => 'label' , // TODO: Review - 'LBL_SAVE_FIELDS_ORDER' => 'Ordine Save campi', + 'LBL_SHOW_FORM' => 'Mostra Form' , // TODO: Review + 'LBL_DUPLICATES_EXIST' => 'Nome Webform già esiste' , // TODO: Review + 'LBL_WEBFORM_INFORMATION' => 'Informazione Webform' , // TODO: Review + 'LBL_FIELD_INFORMATION' => 'Informazione campo' , // TODO: Review + 'LBL_FIELD_NAME' => 'Nome campo' , // TODO: Review + 'LBL_OVERRIDE_VALUE' => 'Valore Override' , // TODO: Review + 'LBL_MANDATORY' => 'Obbligatorio' , // TODO: Review + 'LBL_WEBFORM_REFERENCE_FIELD' => 'Campo riferimento Webforms' , // TODO: Review + 'LBL_SELECT_FIELDS_OF_TARGET_MODULE' => 'Seleziona i campi per il modulo destinazione...', // TODO: Review + 'LBL_ALLOWS_YOU_TO_MANAGE_WEBFORMS' => 'Permetti a te di gestire i webforms', // TODO: Review + 'LBL_ADD_FIELDS' => 'Aggiungi campi' , // TODO: Review + 'LBL_EMBED_THE_FOLLOWING_FORM_IN_YOUR_WEBSITE' => 'Inserisci i webform seguenti nel tuo sito', // TODO: Review + 'LBL_SELECT_VALUE' => 'Seleziona il valore' , // TODO: Review + 'LBL_LABEL' => 'etichetta' , // TODO: Review + 'LBL_SAVE_FIELDS_ORDER' => 'Salva ordine campi', 'LBL_HIDDEN' => 'Nascosto', 'LBL_ENABLE_TARGET_MODULES_FOR_WEBFORM' => 'Abilita moduli target per WebForm', 'LBL_ASSIGN_USERS' => 'Assegnazione utente', 'LBL_ASSIGN_ROUND_ROBIN' => 'Assegna utenti Nel Round Robin', - 'LBL_ROUNDROBIN_USERS_LIST' => 'Turno Lista Utenti Robin', + 'LBL_ROUNDROBIN_USERS_LIST' => 'Lista Utenti Round Robin', 'LBL_ADD_RECORD' => 'Aggiungere Webform', 'LBL_UPLOAD_DOCUMENTS' => 'Carica Documenti', 'LBL_ADD_FILE_FIELD' => 'File Upload Campo', 'LBL_FIELD_LABEL' => 'Titolo del documento', - 'LBL_FILE_FIELD_INFO' => 'Per ogni file caricato da web formare un nuovo documento viene creato con il file allegato. Documento è legato anche a questa nuova creazione%s.', - 'LBL_NO_FILE_FIELD' => 'Nessun campo file aggiunti.', + 'LBL_FILE_FIELD_INFO' => 'Per ogni file caricato da web formare un nuovo documento viene creato con il file allegato. Documento è legato anche a questa nuova creazione %s.', + 'LBL_NO_FILE_FIELD' => 'Nessun campo file aggiunto.', 'LBL_COPY_TO_CLIPBOARD' => 'Copia negli appunti', ); $jsLanguageStrings = array( - 'JS_WEBFORM_DELETED_SUCCESSFULLY' => 'Webform deleted successfully', // TODO: Review - 'JS_LOADING_TARGET_MODULE_FIELDS' => 'Loadding Target Module Fields', // TODO: Review - 'JS_SELECT_VALUE' => 'Select Vlaue' , // TODO: Review - 'JS_MANDATORY_FIELDS_WITHOUT_OVERRIDE_VALUE_CANT_BE_HIDDEN' => 'I campi obbligatori senza valori di override smussano essere nascosti', - 'JS_REFERENCE_FIELDS_CANT_BE_MANDATORY_WITHOUT_OVERRIDE_VALUE' => 'Campi di riferimento cant essere obbligatorio senza valore di override', + 'JS_WEBFORM_DELETED_SUCCESSFULLY' => 'Webform cancellato con successo', // TODO: Review + 'JS_LOADING_TARGET_MODULE_FIELDS' => 'Caricamento campi Modulo destinazione', // TODO: Review + 'JS_SELECT_VALUE' => 'Seleziona Valore' , // TODO: Review + 'JS_MANDATORY_FIELDS_WITHOUT_OVERRIDE_VALUE_CANT_BE_HIDDEN' => 'I campi obbligatori senza valori di override non possono essere nascosti', + 'JS_REFERENCE_FIELDS_CANT_BE_MANDATORY_WITHOUT_OVERRIDE_VALUE' => 'Campi di riferimento non possono essere obbligatori senza valore di override', 'JS_TYPE_TO_SEARCH' => 'Tipo di ricerca', "JS_WEBFORM_WITH_THIS_NAME_ALREADY_EXISTS" => 'Webform con questo nome esiste già', 'JS_SELECT_AN_OPTION' => 'Selezionare un\'Opzione', 'JS_LABEL' => 'etichetta', - 'JS_MAX_FILE_FIELDS_LIMIT' => 'Massima è possibile aggiungere campi del file%s.', + 'JS_MAX_FILE_FIELDS_LIMIT' => 'Puoi aggiungere la massimo %s campi dei file.', 'JS_COPIED_SUCCESSFULLY' => 'Copiato con successo.', 'JS_COPY_FAILED' => 'Copia non riuscita. Si prega di copiare manualmente.', ); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Users.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Users.php index e3e048ca7e334106aca735307ea65040223fe524..7ed16fa616738bd1dcce3f18eb0f6efa3e4efc7d 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Users.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Users.php @@ -8,17 +8,17 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'Add User' , // TODO: Review + 'LBL_ADD_RECORD' => 'Aggiungi Utente' , 'LBL_MY_PREFERENCES' => 'Le Mie Preferenze' , - 'LBL_MORE_INFORMATION' => 'Più Informazioni' , + 'LBL_MORE_INFORMATION' => 'Più Informazioni' , 'LBL_USERLOGIN_ROLE' => 'Ruolo e Login Utente' , 'LBL_USER_IMAGE_INFORMATION' => 'Fotografia Utente' , - 'LBL_CURRENCY_CONFIGURATION' => 'Currency and Number Field Configuration', + 'LBL_CURRENCY_CONFIGURATION' => 'Configurazione Campi Valuta e Numeri', 'LBL_ADDRESS_INFORMATION' => 'Indirizzo utente' , 'LBL_USER_ADV_OPTIONS' => 'Opzioni avanzate utente' , 'Asterisk Configuration' => 'Configurazione di Asterisk' , 'LBL_HOME_PAGE_COMPONENTS' => 'Componenti di Home Page' , - 'LBL_TAG_CLOUD_DISPLAY' => 'Tag Cloud Display' , // TODO: Review + 'LBL_TAG_CLOUD_DISPLAY' => 'Mostra Tag Cloud' , // TODO: Review 'Role' => 'Ruolo' , 'Admin' => 'Amministratore' , 'User Name' => 'Nome Utente' , @@ -44,32 +44,32 @@ $languageStrings = array( 'LBL_HIDE' => 'Nascondi' , 'LBL_HOME_PAGE_COMPO' => 'Componenti di Home Page' , 'LBL_LOGIN_HISTORY' => 'Storico Login' , - 'LBL_USERDETAIL_INFO' => 'Visualizzando i dettagli dell'utente', + 'LBL_USERDETAIL_INFO' => 'Visualizzando i dettagli dell\'utente', 'LBL_DELETE_GROUP' => 'Elimina Gruppo' , 'LBL_DELETE_GROUPNAME' => 'Gruppo da Eliminare' , - 'LBL_TRANSFER_GROUP' => 'Trasferisci la Proprietà a:', + 'LBL_TRANSFER_GROUP' => 'Trasferisci la Proprietà a:', 'LBL_DELETE_USER' => 'Utente da Eliminare' , - 'LBL_TRANSFER_USER' => 'Trasferisci la proprietà all'Utente', + 'LBL_TRANSFER_USER' => 'Trasferisci la proprietà all\'Utente', 'LBL_DELETE_PROFILE' => 'Elimina Profilo' , 'LBL_TRANSFER_ROLES_TO_PROFILE' => 'Trasferisci Ruoli al Profilo', 'LBL_PROFILE_TO_BE_DELETED' => 'Profilo da Eliminare' , 'INTERNAL_MAIL_COMPOSER' => 'Compositore Email interno' , 'Asterisk Extension' => 'Asterisk Extension' , - ' Receive Incoming Calls' => 'Receive Incoming Calls' , // TODO: Review + ' Receive Incoming Calls' => 'Riceve Chiamate in Arrivo' , 'Reminder Interval' => 'Intervallo Promemoria' , 'Webservice Access Key' => 'Password di accesso' , 'Language' => 'Linguaggio:' , - 'Theme' => 'Theme' , - 'Time Zone' => 'Time Zone' , - 'Decimal Separator' => 'Decimal Separator' , - 'Digit Grouping Pattern' => 'Digit Grouping Pattern' , - 'Digit Grouping Separator' => 'Digit Grouping Separator' , - 'Symbol Placement' => 'Symbol Placement' , - 'Number Of Currency Decimals' => 'Number Of Currency Decimals' , - 'Truncate Trailing Zeros' => 'Truncate Trailing Zeros' , - 'Default Call Duration' => 'Default Call Duration (Mins)', // TODO: Review - 'Other Event Duration' => 'Other Event Duration (Mins)' , // TODO: Review - 'Calendar Hour Format' => 'Calendar Hour Format' , // TODO: Review + 'Theme' => 'Tema' , + 'Time Zone' => 'Fuso orario' , + 'Decimal Separator' => 'Separatore Decimali' , + 'Digit Grouping Pattern' => 'Modo raggruppamento Cifre' , + 'Digit Grouping Separator' => 'Separatore cifre' , + 'Symbol Placement' => 'Posizionamento Simbolo' , + 'Number Of Currency Decimals' => 'Numero dei decimali per la valuta' , + 'Truncate Trailing Zeros' => 'Troncare zeri eccessivi' , + 'Default Call Duration' => 'Durata standard telefonata (minuti)', // TODO: Review + 'Other Event Duration' => 'Durata altri eventi (minuti)' , + 'Calendar Hour Format' => 'Formato ore Calendario' , 'Kwajalein' => '(UTC-12:00) International Date Line West', 'Pacific/Midway' => '(UTC-11:00) Coordinated Universal Time-11', 'Pacific/Samoa' => '(UTC-11:00) Samoa' , @@ -114,7 +114,7 @@ $languageStrings = array( 'Europe/Sarajevo' => '(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb', 'Europe/Brussels' => '(UTC+01:00) Brussels, Copenhagen, Madrid, Paris', 'Africa/Algiers' => '(UTC+01:00) West Central Africa', - 'Europe/Amsterdam' => '(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna', + 'Europe/Amsterdam' => '(UTC+01:00) Amsterdam, Berlin, Bern, Roma, Rome, Stockholm, Vienna', 'Europe/Minsk' => '(UTC+02:00) Minsk' , 'Africa/Cairo' => '(UTC+02:00) Cairo' , 'Europe/Helsinki' => '(UTC+02:00) Helsinki, Riga, Sofia, Tallinn, Vilnius', @@ -168,9 +168,9 @@ $languageStrings = array( 'Pacific/Auckland' => '(UTC+12:00) Auckland' , 'Asia/Magadan' => '(UTC+12:00) Magadan' , 'Pacific/Tongatapu' => '(UTC+13:00) Nukualofa' , - 'Summary' => 'Summary' , // TODO: Review - 'Detail' => 'Detail' , // TODO: Review - 'LBL_USER_LIST_DETAILS' => 'Details' , // TODO: Review + 'Summary' => 'Sommario' , + 'Detail' => 'Dettaglio' , + 'LBL_USER_LIST_DETAILS' => 'Dettagli' , 'LBL_USER_DELETED_SUCCESSFULLY' => 'Utente cancellato con successo', 'LBL_ACTIVE_USERS' => 'Utenti attivi', 'LBL_INACTIVE_USERS' => 'Gli utenti inattivi', @@ -190,40 +190,39 @@ $languageStrings = array( 'LBL_DEPARTMENT' => 'Dipartimento', 'LBL_BASE_CURRENCY' => 'Valuta di Base', 'LBL_CHOOSE_BASE_CURRENCY' => 'Scegliere Valuta di Base', - 'LBL_OPERATING_CURRENCY' => 'Valuta di riferimento non può essere modificato successivamente. Seleziona la tua valuta operativo', + 'LBL_OPERATING_CURRENCY' => 'Valuta di riferimento non può essere modificato successivamente. Seleziona la tua valuta operativa', 'LBL_LANGUAGE' => 'Lingua', 'LBL_CHOOSE_LANGUAGE' => 'Scegli la lingua', 'LBL_CHOOSE_TIMEZONE' => 'Scegli Fuso orario', - 'LBL_DATE_FORMAT' => 'Data Format', - 'LBL_CHOOSE_DATE_FORMAT'=> 'Scegli la Data Format', + 'LBL_DATE_FORMAT' => 'Formato Data', + 'LBL_CHOOSE_DATE_FORMAT'=> 'Scegli il formato Data', 'LBL_PHONE' => 'Telefono', 'Space' => 'Spazio', //picklist values for Default Calendar View field in MyPreference Page - 'ListView' => 'List View', + 'ListView' => 'Lista Viste', 'MyCalendar' => 'Il mio calendario', 'SharedCalendar' => 'Calendario condiviso', 'LBL_CHANGE_OWNER' => 'Cambia proprietario', 'LBL_TRANSFER_OWNERSHIP' => 'Trasferimento della proprietà ', 'LBL_TRANSFER_OWNERSHIP_TO_USER' => 'Trasferire la proprietà a utente', - 'LBL_OWNERSHIP_TRANSFERRED_SUCCESSFULLY' => 'CRM proprietario ha cambiato con successo', + 'LBL_OWNERSHIP_TRANSFERRED_SUCCESSFULLY' => 'Proprietario CRM cambiato con successo', 'LBL_OWNERSHIP_TRANSFERRED_FAILED' => 'Impossibile cambiare proprietario CRM', 'Account Owner' => 'Account Proprietario', - 'Starting Day of the week' => 'Avvio Giorno della settimana', - 'Day starts at' => 'Giorno inizia alle', - 'Default Event Status' => 'Predefinito Stato evento', - 'Default Activity Type' => 'Predefinito Tipo Attività ', - 'Default Record View' => 'Predefinito Record View', - 'Left Panel Hide' => 'Pannello sinistro Hide', + 'Starting Day of the week' => 'Primo Giorno della settimana', + 'Day starts at' => 'Il Giorno inizia alle', + 'Default Event Status' => 'Stato Predefinito per Eventi', + 'Default Activity Type' => 'Tipo Predefinito per Attività ', + 'Default Record View' => 'Record Predefinito per View', + 'Left Panel Hide' => 'Nascondi Pannello a sinistra', 'Row Height' => 'Altezza riga', - 'LBL_RESTORE_USER_FAILED' => 'Impossibile ripristinare utente. Esiste già un utente CRM con questo nome utente.', - - 'LBL_DUPLICATE_USER_EXISTS' => 'Utente esiste già ', + 'LBL_RESTORE_USER_FAILED' => 'Impossibile ripristinare utente. Esiste già un utente CRM con questo nome utente.', + 'LBL_DUPLICATE_USER_EXISTS' => 'Utente già esistente', 'LBL_CHANGE_PASSWORD' => 'Cambiare La Password', 'LBL_CHANGE_USERNAME' => 'Cambia nome utente' , - 'LBL_USERNAME_CHANGED' => 'Nome utente modificata correttamente', + 'LBL_USERNAME_CHANGED' => 'Nome utente modificato correttamente', 'ERROR_CHANGE_USERNAME' => 'Errore nel cambiamento nome utente. Si prega di riprovare più tardi', 'LBL_REMOVE_USER' => 'Eliminare', @@ -239,12 +238,12 @@ $languageStrings = array( 'LBL_CREATE_USER' => 'Creare Utente', 'LBL_DELETE_USER_PERMANENTLY_INFO' => 'Eliminazione di un utente in modo permanente il trasferimento di tutti i record compresi i commenti e la storia sono un nuovo utente.', 'LBL_TO_CRM' => 'Login per Vtiger CRM', - 'LBL_INVALID_USER_OR_PASSWORD' => 'Non valido nome utente o la password.', + 'LBL_INVALID_USER_OR_PASSWORD' => 'Nome utente o la password non validi.', 'LBL_INVALID_USER_OR_EMAIL' => 'Non valido nome utente o indirizzo Email.', 'LBL_EMAIL_SEND' => 'Abbiamo inviato una email per reimpostare la password.', 'ForgotPassword' => 'Hai Dimenticato La Password?', 'LBL_CONNECT_WITH_US' => 'Connettiti con NOI', - 'LBL_GET_MORE' => 'Ottenere di più di Vtiger', + 'LBL_GET_MORE' => 'Ottenere di più da Vtiger', 'LBL_TRANSFER_RECORDS_TO_USER' => 'Trasferire i record utente', 'LBL_USER_TO_BE_DELETED' => 'Utente Cancellato', 'LBL_USERS_SETTINGS' => 'IMPOSTAZIONI DEGLI UTENTI', @@ -254,15 +253,15 @@ $languageStrings = array( $jsLanguageStrings = array( //Curency seperator validation messages - 'JS_ENTER_OLD_PASSWORD'=>'Please enter your old password.', - 'JS_ENTER_NEW_PASSWORD'=>'Please enter your new password.', - 'JS_ENTER_CONFIRMATION_PASSWORD'=>'Please enter your password confirmation.', - 'JS_REENTER_PASSWORDS'=>'Please re-enter passwords. The \"new password\" and \"confirm password\" values do not match.', - 'JS_INVALID_PASSWORD'=>'You must specify a valid username and password.', - 'JS_PASSWORD_CHANGE_FAILED_1'=>'User password change failed for ', - 'JS_PASSWORD_CHANGE_FAILED_2'=>' failed. The new password must be set.', - 'JS_PASSWORD_INCORRECT_OLD'=>'Incorrect old password specified. Re-enter password information.', + 'JS_ENTER_OLD_PASSWORD'=>'Per favore inserire la tua vecchia password.', + 'JS_ENTER_NEW_PASSWORD'=>'Per favore inserire la tua nuova new password.', + 'JS_ENTER_CONFIRMATION_PASSWORD'=>'Per favore inserisci la tua password di conferma.', + 'JS_REENTER_PASSWORDS'=>'Per favore inserisce nuovamente le passowrd. La nuova password e quella di conferma non coincidono.', + 'JS_INVALID_PASSWORD'=>'Devi specificare un nome utente e una password validi.', + 'JS_PASSWORD_CHANGE_FAILED_1'=>'Il cambio password per l\'utente è fallito a causa di ', + 'JS_PASSWORD_CHANGE_FAILED_2'=>' fallito. La nuova password deve essere reimpostata.', + 'JS_PASSWORD_INCORRECT_OLD'=>'Vecchia password errata. Reinserire le informazioni delle password.', 'JS_ENTERED_CURRENT_USERNAME_MSG' => 'Hai inserito il nome utente corrente. Inserisci il nuovo nome utente.', 'JS_NEW_ACCESS_KEY_REQUESTED' => 'nuova chiave di accesso richiesto', - 'JS_CHANGE_ACCESS_KEY_CONFIRMATION' => 'Hai richiesto per una nuova chiave di accesso. <br><br>Con la nuova disposizione chiave di accesso, è necessario sostituire la chiave di accesso vecchio con quello nuovo in tutte le estensioni installate. <br><br>Do si desidera continuare?', + 'JS_CHANGE_ACCESS_KEY_CONFIRMATION' => 'Hai richiesto per una nuova chiave di accesso. <br><br>Con la nuova chiave di accesso fornita, è necessario sostituire la chiave di accesso vecchia con quella nuova in tutte le estensioni installate. <br><br>Si desidera continuare?', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vendors.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vendors.php index dd4bcd0d3cbc15bb8da24440f13d4ffdc8476f14..83e8527fe2e0a5e8314f8091cfd8b8928091e8d8 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vendors.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vendors.php @@ -10,12 +10,12 @@ $languageStrings = array( 'Vendors' => 'Fornitori' , 'SINGLE_Vendors' => 'Fornitore' , - 'LBL_ADD_RECORD' => 'Add Vendor' , - 'LBL_RECORDS_LIST' => 'Vendors List' , + 'LBL_ADD_RECORD' => 'Aggiungi Fornitore' , + 'LBL_RECORDS_LIST' => 'Lista Fornitori' , 'LBL_VENDOR_INFORMATION' => 'Informazioni Fornitore:' , 'LBL_VENDOR_ADDRESS_INFORMATION' => 'Informazioni Indirizzo:' , 'Vendor Name' => 'Nome Fornitore' , - 'Vendor No' => 'No. Fornitore' , + 'Vendor No' => 'N. Fornitore' , 'Website' => 'Sito Web' , 'GL Account' => 'Codice Contabile' , '300-Sales-Software' => '300-Vendita-Software' , @@ -33,7 +33,7 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => 'Are you sure you want to delete?', - 'LBL_DELETE_CONFIRMATION' => 'Deleting this Vendor will remove its related PurchaseOrders. Are you sure you want to delete this Vendor?', - 'LBL_MASS_DELETE_CONFIRMATION' => 'Deleting this vendor(s) will remove its related Purchase Orders. Are you sure you want to delete the selected Records?', + 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => 'Sei sicuro che lo vuoi cancellare?', + 'LBL_DELETE_CONFIRMATION' => 'Cancellando questo Fornitore rimuoverai anche i relativi Ordini di Acquisto. Sei sicuro che vuoi cancellare questo Fornitore?', + 'LBL_MASS_DELETE_CONFIRMATION' => 'Cancellando questi Fornitori rimuoverai anche i relativi Ordini di Acquisto. Sei sicuro che vuoi cancellare questi selezionati?', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php index e72362e786ce4fcc66ce01bf63e27a289cce8e43..e3f74c25408fb6996b990383f4d39a72534f05c9 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php @@ -9,12 +9,12 @@ ************************************************************************************/ $languageStrings = array( 'APPTITLE' => 'Vtiger CRM' , - 'POWEREDBY' => 'Powered by vtiger CRM' , + 'POWEREDBY' => 'Piattaforma vtiger CRM' , 'LBL_READ_LICENSE' => 'Leggi la licenza' , 'LBL_PRIVACY_POLICY' => 'Privacy Policy' , 'LBL_SELECT_ALL' => 'Seleziona Tutti' , - 'LBL_SELECT_TO_LOAD_LIST' => 'Select to Load List' , // TODO: Review - 'LBL_CREATING_NEW' => 'Creating New' , + 'LBL_SELECT_TO_LOAD_LIST' => 'Seleziona per caricare la Lista' , + 'LBL_CREATING_NEW' => 'Crea Nuovo' , 'LBL_EDITING' => 'Modifica' , 'LBL_SAVE' => 'Salva' , 'LBL_CANCEL' => 'Annulla' , @@ -28,96 +28,96 @@ $languageStrings = array( 'LBL_EDIT' => 'Modifica' , 'LBL_DELETE' => 'Elimina' , 'LBL_SETTINGS' => 'Impostazioni' , - 'LBL_ADD_COMMENT' => 'Add Comment' , - 'LBL_EDIT_FIELDS' => '%s Campi & Suddivisione' , - 'LBL_EDIT_WORKFLOWS' => 'Flussi di lavoro% s' , - 'LBL_EDIT_PICKLIST_VALUES' => 'Picklists Valori' , - 'LBL_EDIT_MAILSCANNER' => 'Convert Emails' , - 'LBL_RECORD_DELETE' => 'Il record che vuoi visualizzare è stato cancellato', - 'LBL_RECORD_NOT_FOUND' => 'Il record a cui stai tentando di accedere non è stato trovato.', + 'LBL_ADD_COMMENT' => 'Aggiungi Commento' , + 'LBL_EDIT_FIELDS' => 'Modifica Campi' , + 'LBL_EDIT_WORKFLOWS' => 'Modifica Flussi di lavoro' , + 'LBL_EDIT_PICKLIST_VALUES' => 'Modifica Valori dei Menù a tendina' , + 'LBL_EDIT_MAILSCANNER' => 'Converti Email' , + 'LBL_RECORD_DELETE' => 'Il record che vuoi visualizzare è stato cancellato', + 'LBL_RECORD_NOT_FOUND' => 'Il record a cui stai tentando di accedere non è stato trovato.', 'LBL_SELECT' => 'Seleziona' , 'LBL_CLEAR' => 'Pulisci' , - 'LBL_YES' => 'Sì' , - 'LBL_NO' => 'nessun' , - 'LBL_SHOW_COMPLETE_DETAILS' => 'Complete Details' , // TODO: Review - 'LBL_MASS_EDITING' => 'Mass Editing' , + 'LBL_YES' => 'Sì' , + 'LBL_NO' => 'No' , + 'LBL_SHOW_COMPLETE_DETAILS' => 'Dettagli completi' , + 'LBL_MASS_EDITING' => 'Modifica di Massa' , 'LBL_DESELECT_ALL_RECORDS' => 'Deseleziona tutto' , 'LBL_QUICK_CREATE' => 'Creazione Veloce' , - 'LBL_SEND_EMAIL' => 'Send Email' , - 'LBL_ALL_EMAILS' => 'All email accounts' , - 'LBL_MUTIPLE_EMAIL_SELECT_ONE' => 'This record stores multiple email accounts. Please select the accounts to which the email should be sent to', - 'LBL_GO_TO_FULL_FORM' => 'Go to full form' , - 'LBL_SEND_SMS' => 'Send SMS' , + 'LBL_SEND_EMAIL' => 'Invia Email' , + 'LBL_ALL_EMAILS' => 'Tutti gli Account Email' , + 'LBL_MUTIPLE_EMAIL_SELECT_ONE' => 'Questo record contiene più account email. Prego selezionare gli accounti a cui vorresti inviare', + 'LBL_GO_TO_FULL_FORM' => 'Passa al modulo completo' , + 'LBL_SEND_SMS' => 'Invia SMS' , 'LBL_FOUND' => 'Trovato' , - 'LBL_CLICK_ADD' => 'Click to add' , - 'LBL_ADD_MORE_FIELDS' => 'Aggiungere more fields' , + 'LBL_CLICK_ADD' => 'Clicca per aggiungere' , + 'LBL_ADD_MORE_FIELDS' => 'Aggiungere più campi' , 'LBL_ADD_NOTE' => 'Aggiungi Nota' , - 'LBL_CREATE_NEW' => 'Create New' , - 'LBL_ADD_EVENT' => 'Aggiungere Event' , + 'LBL_CREATE_NEW' => 'Crea Nuovo' , + 'LBL_ADD_EVENT' => 'Aggiungere Evento' , 'LBL_ADD_TASK' => 'Aggiungi attività ' , 'LBL_MARKETING_AND_SALES' => 'MARKETING & SALES' , - 'LBL_TOOLS_HEADER' => 'TOOLS' , - 'LBL_SUPPORT' => 'SUPPORT' , - 'LBL_INVENTORY' => 'INVENTORY' , - 'LBL_ANALYTICS' => 'ANALYTICS' , + 'LBL_TOOLS_HEADER' => 'STRUMENTI' , + 'LBL_SUPPORT' => 'SUPPORTO' , + 'LBL_INVENTORY' => 'INVENTARIO' , + 'LBL_ANALYTICS' => 'ANALISI' , 'LBL_HOME' => 'Domestico' , - 'LBL_LAST_VIEWED_RECORDS' => 'Last Viewed Records' , + 'LBL_LAST_VIEWED_RECORDS' => 'Gli ultimi record visti' , 'LBL_DASHBOARD' => 'Cruscotto' , - 'LBL_USER_SETTINGS' => 'User Settings' , + 'LBL_USER_SETTINGS' => 'Impostazioni utente' , 'LBL_MY_PREFERENCES' => 'Le Mie Preferenze' , 'LBL_SIGN_OUT' => 'Esci' , 'LBL_HELP' => 'Aiuto' , - 'LBL_DOCUMENTATION' => 'Documentation' , // TODO: Review - 'LBL_VIDEO_TUTORIAL' => 'Video Tutorial' , // TODO: Review + 'LBL_DOCUMENTATION' => 'Documentazione' , + 'LBL_VIDEO_TUTORIAL' => 'Tutorial Video' , 'LBL_FEEDBACK' => 'Feedback' , - 'LBL_CHAT_SUPPORT' => 'Supporto Chat', - 'LBL_CRM_SETTINGS' => 'CRM Settings' , - 'LBL_ON_DEMAND_ADMIN' => 'Add / Delete Users' , // TODO: Review - 'LBL_ANNOUNCEMENT' => 'Announcement' , + 'LBL_CHAT_SUPPORT' => 'Supporto via Chat', + 'LBL_CRM_SETTINGS' => 'Impostazioni CRM' , + 'LBL_ON_DEMAND_ADMIN' => 'Aggiungi / Cancella Utenti' , + 'LBL_ANNOUNCEMENT' => 'Annunci' , 'LBL_CALENDAR' => 'Calendario' , - 'LBL_POST' => 'Post' , - 'LBL_GUIDER' => 'Guider' , // TODO: Review - 'LBL_DISPLAY_TYPE' => 'Display Type' , // TODO: Review - 'LBL_DISPLAY_WIDETYPE' => 'Wide' , // TODO: Review - 'LBL_DISPLAY_MEDIUMTYPE' => 'Medium' , // TODO: Review - 'LBL_DISPLAY_NARROWTYPE' => 'Narrow' , // TODO: Review - 'LBL_TAG_THIS_RECORD' => 'Tag this Record' , // TODO: Review - 'LBL_PAGE' => 'Page' , // TODO: Review - 'LBL_LISTVIEW_PAGE_JUMP' => 'Page Jump' , // TODO: Review + 'LBL_POST' => 'Invia' , + 'LBL_GUIDER' => 'Guida' , + 'LBL_DISPLAY_TYPE' => 'Tipo Display' , + 'LBL_DISPLAY_WIDETYPE' => 'Largo' , + 'LBL_DISPLAY_MEDIUMTYPE' => 'Medio' , + 'LBL_DISPLAY_NARROWTYPE' => 'Stretto' , + 'LBL_TAG_THIS_RECORD' => 'Tagga questo Record' , + 'LBL_PAGE' => 'Pagina' , + 'LBL_LISTVIEW_PAGE_JUMP' => 'Salto Pagina' , 'LBL_USER' => 'Utente' , 'LBL_GROUP' => 'Gruppo' , - 'Last Modified By' => 'Last Modified By' , + 'Last Modified By' => 'Ultima modifica di' , 'Created Time' => 'Orario creazione' , 'Modified Time' => 'Orario modifica' , 'Description' => 'Descrizione' , 'Assigned To' => 'Assegnato a ' , 'LBL_LOADING' => 'Caricamento...' , - 'LBL_LOADING_WIDGET' => 'Loading Widget' , - 'LBL_LOADING_LISTVIEW_CONTENTS' => 'Loading, Please wait.' , + 'LBL_LOADING_WIDGET' => 'Caricamento Widget' , + 'LBL_LOADING_LISTVIEW_CONTENTS' => 'Caricamento, attendere prego.' , 'LBL_UPDATES' => 'Aggiornamenti' , - 'LBL_SHOW_FULL_DETAILS' => 'Show Full Details' , // TODO: Review - 'LBL_SUMMARY_DETAILS' => 'Summary Details' , - 'LBL_ADD_NEW_COMMENT' => 'Add New Comment' , - 'LBL_NO_UPDATES' => 'No Updates' , - 'LBL_ACTIVITIES' => 'Activities' , // TODO: Review - 'LBL_NO_PENDING_ACTIVITIES' => 'No pending activities' , // TODO: Review - 'LBL_SUMMARY' => 'Summary' , // TODO: Review - 'LBL_DETAILS' => 'Details' , // TODO: Review + 'LBL_SHOW_FULL_DETAILS' => 'Mostra tutti i dettagli' , + 'LBL_SUMMARY_DETAILS' => 'Sommario Dettagli' , + 'LBL_ADD_NEW_COMMENT' => 'Aggiungi nuovo commento' , + 'LBL_NO_UPDATES' => 'Nessun Aggiornamento' , + 'LBL_ACTIVITIES' => 'Attività ' , + 'LBL_NO_PENDING_ACTIVITIES' => 'Nessuna attività in attesa' , // o è meglio "in corso"? + 'LBL_SUMMARY' => 'Sommario' , + 'LBL_DETAILS' => 'Dettagli' , 'LBL_SEARCH_FOR' => 'Cerca' , 'LBL_IN' => 'In' , - 'LBL_TYPE_SEARCH' => 'Type to search' , - 'LBL_SEARCH_BUTTON' => 'Search Button' , + 'LBL_TYPE_SEARCH' => 'Tipo da cercare' , + 'LBL_SEARCH_BUTTON' => 'Bottone Cerca' , 'LBL_ADVANCE_SEARCH' => 'Ricerca avanzata' , - 'LBL_LOADING_PLEASE_WAIT' => 'Loading, Please wait.' , + 'LBL_LOADING_PLEASE_WAIT' => 'Caricamento, attendere prego.' , 'LBL_USERS' => 'Utenti' , - 'LBL_GROUPS' => 'Groups' , - 'LBL_FULL_FORM' => 'Full Form' , - 'LBL_SIMPLE_FORM' => 'Simple Form' , - 'LBL_ADD_YOUR_COMMENT_HERE' => 'Add your comment here...' , - 'LBL_REPLY' => 'Reply' , - 'LBL_VIEW_THREAD' => 'View Thread' , - 'LBL_NO_COMMENTS' => 'No Comments' , - 'LBL_REPLIES' => 'replies' , + 'LBL_GROUPS' => 'Gruppi' , + 'LBL_FULL_FORM' => 'Modulo completo' , + 'LBL_SIMPLE_FORM' => 'Modulo Semplice' , + 'LBL_ADD_YOUR_COMMENT_HERE' => 'Aggiungi il tuo commento qui...' , + 'LBL_REPLY' => 'Rispondi' , + 'LBL_VIEW_THREAD' => 'Mostra Thread' , + 'LBL_NO_COMMENTS' => 'Nessun commento' , + 'LBL_REPLIES' => 'risposte' , 'LBL_REPLY_ALL' => 'Rispondi a tutti' , 'Accounts' => 'Aziende' , 'Assets' => 'Assets' , @@ -126,13 +126,13 @@ $languageStrings = array( 'Contacts' => 'Contatti' , 'Documents' => 'Documenti' , 'Leads' => 'Leads' , - 'ModComments' => 'Comments' , - 'Potentials' => 'Opportunita\'' , + 'ModComments' => 'Commenti' , + 'Potentials' => 'Opportunità ' , 'PriceBooks' => 'Listini' , 'Products' => 'Prodotti' , - 'Project' => 'Projects' , - 'ProjectMilestone' => 'Project Milestones' , - 'ProjectTask' => 'Project Tasks' , + 'Project' => 'Progetti' , + 'ProjectMilestone' => 'Stadi Progetti' , + 'ProjectTask' => 'Attività Progetti' , 'ServiceContracts' => 'Contratti di Servizio' , 'Services' => 'Servizi' , 'Vendors' => 'Fornitori' , @@ -141,26 +141,26 @@ $languageStrings = array( 'PurchaseOrder' => 'Ordini d\'acquisto' , 'SalesOrder' => 'Ordini di vendita' , 'Invoice' => 'Fatture' , - 'MailManager' => 'Mail Manager' , // TODO: Review - 'Activities' => 'Activities' , + 'MailManager' => 'Mail Manager' , + 'Activities' => 'Attività ' , 'Portal' => 'I nostri siti' , - 'Email Templates' => 'Email Template' , - 'Print Templates' => 'Stampa Templates' , - 'Recycle Bin' => 'Recycle Bin' , // TODO: Review - 'LBL_ADD_RECORD' => 'Add Record' , - 'LBL_RECENTLY_MODIFIED' => 'Recently Modified' , - 'LBL_RECORDS_LIST' => 'Records List' , - 'LBL_RECORD_SUMMARY' => 'Module Summary' , - 'LBL_ACCESS_DENIED_FOR' => 'Access Denied for' , + 'Email Templates' => 'Modelli Email' , + 'Print Templates' => 'Stampa Modelli' , + 'Recycle Bin' => 'Cestino' , + 'LBL_ADD_RECORD' => 'Aggiungi Record' , + 'LBL_RECENTLY_MODIFIED' => 'Modificati di recente' , + 'LBL_RECORDS_LIST' => 'Lista record' , + 'LBL_RECORD_SUMMARY' => 'Sommario Modulo' , + 'LBL_ACCESS_DENIED_FOR' => 'Accesso Negato per' , 'LBL_GO_BACK' => 'Indietro' , - 'LBL_NO_DATA_AVAILABLE' => 'No data available' , - 'LBL_GLOBAL_SEARCH' => 'Type keyword and press enter', - 'LBL_ALL_RECORDS' => 'All Records' , // TODO: Review - 'LBL_NO_RECORDS_FOUND' => 'No records found' , // TODO: Review - 'LBL_AND' => 'and' , + 'LBL_NO_DATA_AVAILABLE' => 'Nessun dato disponibile' , + 'LBL_GLOBAL_SEARCH' => 'Digita la parola chiave e premi enter', + 'LBL_ALL_RECORDS' => 'Tutti i Record' , + 'LBL_NO_RECORDS_FOUND' => 'Nessun Record trovato' , + 'LBL_AND' => 'e' , 'LBL_OR' => 'o' , 'LBL_NONE' => '--Nessuno--' , - 'LBL_APPROVE' => 'Approve' , + 'LBL_APPROVE' => 'Approva' , 'LBL_HAS_CHANGED' => 'è cambiato', 'LBL_HAS_CHANGED_TO' => 'è cambiato a', 'LBL_HAS_CHANGED_FROM' => 'sono variate rispetto', @@ -171,34 +171,34 @@ $languageStrings = array( 'LBL_IS_TODAY' => 'è oggi', 'LBL_IS_TOMORROW' => 'è domani', 'LBL_IS_YESTERDAY' => 'è di ieri', - 'LBL_LESS_THAN_DAYS_LATER' => 'meno di giorni più tardi', - 'LBL_MORE_THAN_DAYS_LATER' => 'più di giorni più tardi', - 'LBL_DENY' => 'Deny' , - 'LBL_EQUALS' => 'equals' , - 'LBL_NOT_EQUAL_TO' => 'not equal to' , - 'LBL_STARTS_WITH' => 'starts with' , + 'LBL_LESS_THAN_DAYS_LATER' => 'minore dei giorni successivi', + 'LBL_MORE_THAN_DAYS_LATER' => 'maggiore dei giorni successivi', + 'LBL_DENY' => 'Nega' , + 'LBL_EQUALS' => 'uguale' , + 'LBL_NOT_EQUAL_TO' => 'non uguale a' , + 'LBL_STARTS_WITH' => 'comincia con' , 'LBL_ENDS_WITH' => 'finisce con' , 'LBL_CONTAINS' => 'contiene' , - 'LBL_DOES_NOT_CONTAIN' => 'does not contains' , + 'LBL_DOES_NOT_CONTAIN' => 'non contiene' , 'LBL_LESS_THAN' => 'minore di' , 'LBL_GREATER_THAN' => 'maggiore di' , 'LBL_LESS_THAN_OR_EQUAL' => 'minore o uguale a' , 'LBL_GREATER_OR_EQUAL' => 'maggiore o uguale a' , - 'LBL_BEFORE' => 'before' , - 'LBL_AFTER' => 'after' , - 'LBL_BETWEEN' => 'between' , + 'LBL_BEFORE' => 'prima' , + 'LBL_AFTER' => 'dopo' , + 'LBL_BETWEEN' => 'tra' , 'LBL_IS_NOT_EMPTY' => 'non è vuota' , 'LBL_SEARCH' => 'Ricerca' , - 'LBL_SEARCH_IN' => 'Search In' , - 'LBL_ADD_CONDITION' => 'Add Condition' , - 'LBL_ADD_GROUP' => 'Add Group' , + 'LBL_SEARCH_IN' => 'Cerca In' , + 'LBL_ADD_CONDITION' => 'Aggiungi Condizione' , + 'LBL_ADD_GROUP' => 'Aggiungi Gruppo' , 'LBL_FILTER_CONDITIONS' => 'Elenco Condizioni' , - 'LBL_ALL_CONDITIONS' => 'All Conditions' , - 'LBL_ALL_CONDITIONS_DESC' => 'All conditions must be met' , - 'LBL_ANY_CONDITIONS' => 'Any Conditions' , - 'LBL_ANY_CONDITIONS_DESC' => 'At least one of the conditions must be met', - 'LBL_SELECT_FIELD' => 'Select Field' , - 'LBL_SELECT_MODULE' => 'Select Module' , + 'LBL_ALL_CONDITIONS' => 'Tutte le condizioni' , + 'LBL_ALL_CONDITIONS_DESC' => 'Tutte le condizioni devono essere rispettate' , + 'LBL_ANY_CONDITIONS' => 'Una delle Condizioni' , + 'LBL_ANY_CONDITIONS_DESC' => 'Almeno una delle condizioni deve essere rispettata', + 'LBL_SELECT_FIELD' => 'Seleziona Campo' , + 'LBL_SELECT_MODULE' => 'Seleziona Modulo' , 'LBL_CREATE_NEW_FILTER' => 'Crea nuovo elenco' , 'All' => 'Tutti' , 'Others' => 'Altri' , @@ -206,17 +206,17 @@ $languageStrings = array( 'Public' => 'Pubblico' , 'LBL_SAVE_FILTER' => 'Salva elenco' , 'LBL_SAVE_MODIFY_FILTER' => 'Salva / Modifica elenco' , - 'LBL_SEARCH_RESULTS' => 'Search Results' , + 'LBL_SEARCH_RESULTS' => 'Cerca risultati' , 'LBL_SAVE_AS_FILTER' => 'Nell\'elenco' , 'LBL_NOT_ACCESSIBLE' => 'Non Accessibile' , - 'LBL_ITEM_DETAILS' => 'Dettagli dell'elemento' , + 'LBL_ITEM_DETAILS' => 'Dettagli dell\'elemento' , 'LBL_CURRENCY' => 'Valuta' , - 'LBL_TAX_MODE' => 'Modalità di Tassazione', + 'LBL_TAX_MODE' => 'Modalità di Tassazione', 'LBL_INDIVIDUAL' => 'Individuale' , 'LBL_TOOLS' => 'Strumenti' , - 'LBL_ITEM_NAME' => 'Nome dell'elemento' , - 'LBL_QTY_IN_STOCK' => 'Quantità in Stock' , - 'LBL_QTY' => 'Quantità' , + 'LBL_ITEM_NAME' => 'Nome dell\'elemento' , + 'LBL_QTY_IN_STOCK' => 'Quantità in Stock' , + 'LBL_QTY' => 'Quantità ' , 'LBL_LIST_PRICE' => 'Prezzo di listino' , 'LBL_TOTAL' => 'Totale' , 'LBL_NET_PRICE' => 'Prezzo Netto' , @@ -225,33 +225,33 @@ $languageStrings = array( 'LBL_TAX' => 'Tasse' , 'LBL_ADD_PRODUCT' => 'Aggiungi Prodotto' , 'LBL_ADD_SERVICE' => 'Aggiungi Servizio' , - 'LBL_ITEMS_TOTAL' => 'Items Total' , // TODO: Review + 'LBL_ITEMS_TOTAL' => 'Totale Prodotti' , 'LBL_SHIPPING_AND_HANDLING_CHARGES' => 'Spese di Spedizione' , - 'LBL_PRE_TAX_TOTAL' => 'Pre Tax Total' , // TODO: Review + 'LBL_PRE_TAX_TOTAL' => 'Totale senza Tasse' , // TODO: Review 'LBL_TAX_FOR_SHIPPING_AND_HANDLING' => 'Tasse sulle Spese di Spedizione', - 'LBL_SET_SHIPPING_AND_HANDLING_TAXES_FOR' => 'Set S&H Taxes For' , + 'LBL_SET_SHIPPING_AND_HANDLING_TAXES_FOR' => 'Imposta tasse per spedizione e movim. per' , //handlig come si può tradurre in Italiano? Movimentazione? 'LBL_ADJUSTMENT' => 'Arrotondamento' , 'LBL_DEDUCT' => 'Deduci' , 'LBL_GRAND_TOTAL' => 'Totale ' , 'LBL_ZERO_DISCOUNT' => 'Nessuno Sconto' , 'LBL_OF_PRICE' => 'di prezzo' , 'LBL_DIRECT_PRICE_REDUCTION' => 'Riduzione diretta sul prezzo', - 'LBL_SET_DISCOUNT_FOR' => 'Set Discount For' , - 'LBL_STOCK_NOT_ENOUGH' => 'Not enough stock' , - 'LBL_MAX_QTY_SELECT' => 'Maxmimum value is' , - 'LBL_DRAG' => 'Drag' , + 'LBL_SET_DISCOUNT_FOR' => 'Imposta lo sconto per' , + 'LBL_STOCK_NOT_ENOUGH' => 'Non abbastanza in magazzino' , + 'LBL_MAX_QTY_SELECT' => 'Il valore Massimo è' , + 'LBL_DRAG' => 'Trascina' , 'LBL_TOTAL_TAX_AMOUNT' => 'Totale tasse' , - 'LBL_DIRECT_AMOUNT_DISCOUNT' => 'Sconto Diretto Quantità', + 'LBL_DIRECT_AMOUNT_DISCOUNT' => 'Sconto Diretto Quantità ', 'LBL_FINAL_DISCOUNT_AMOUNT' => 'Totale sconti' , 'LBL_MORE_CURRENCIES' => 'Altre valute' , - 'LBL_SET_TAX_FOR' => 'Set Tax for' , // TODO: Review - 'LBL_GROUP_TAX' => 'Group Tax' , // TODO: Review + 'LBL_SET_TAX_FOR' => 'Imposta Tasse per' , + 'LBL_GROUP_TAX' => 'Gruppo Tasse' , 'LBL_OVERALL_DISCOUNT' => 'Sconto globale', 'LBL_CHARGES' => 'Oneri', 'LBL_CHARGES_TOTAL' => 'Totale oneri', 'LBL_TAXES_ON_CHARGES' => 'Tasse sulle tariffe', - 'LBL_DEDUCTED_TAXES' => 'Tasse Deducted', - 'LBL_DEDUCTED_TAXES_TOTAL' => 'Tasse Deducted totale', + 'LBL_DEDUCTED_TAXES' => 'Tasse Detratte', + 'LBL_DEDUCTED_TAXES_TOTAL' => 'Totale Tasse Detratte', 'LBL_DEFAULT' => 'Difetto', 'LBL_ITEM' => 'Voce', 'LBL_BILLING_ADDRESS_FROM' => 'Copia indirizzo di fatturazione da' , // TODO: Review @@ -261,261 +261,261 @@ $languageStrings = array( 'LBL_CREATE' => 'Crea' , 'LBL_GENERATE' => 'Genera' , 'LBL_DUPLICATE' => 'Duplica' , - 'LBL_ADD_WIDGET' => 'Add Widget' , + 'LBL_ADD_WIDGET' => 'Aggiungi Widget' , 'LBL_COMMENTS' => 'COMMENTI' , - 'LBL_REFRESH' => 'Refresh' , + 'LBL_REFRESH' => 'Aggiorna' , 'LBL_CLOSE' => 'Chiudi' , 'LBL_ALL' => 'Tutti' , 'LBL_UPDATED' => 'Aggiornato' , - 'LBL_FROM' => 'from' , - 'LBL_TO' => 'to' , - 'LBL_ON' => 'on' , + 'LBL_FROM' => 'da' , + 'LBL_TO' => 'a' , + 'LBL_ON' => 'il' , 'LBL_OF' => 'di' , - 'LBL_BY' => 'by' , - 'LBL_ADDED' => 'added' , + 'LBL_BY' => 'da' , + 'LBL_ADDED' => 'aggiunto' , 'LBL_FOR' => 'per' , 'LBL_CREATED' => 'Creato' , - 'LBL_DELETED' => 'deleted' , - 'LBL_RESTORED' => 'restored' , - 'LBL_COMMENTED' => 'commented' , - 'LBL_REMOVED' => 'removed' , - 'LBL_REMOVE' => 'Remove' , - 'LBL_AT' => 'at' , - 'LBL_MINE' => 'Mine' , + 'LBL_DELETED' => 'cancellato' , + 'LBL_RESTORED' => 'ripristinato' , + 'LBL_COMMENTED' => 'commentato' , + 'LBL_REMOVED' => 'rimosso' , + 'LBL_REMOVE' => 'Rimuovi' , + 'LBL_AT' => 'il' , + 'LBL_MINE' => 'Mio' , 'History' => 'Storico' , - 'Upcoming Tasks' => 'Upcoming Tasks' , - 'LBL_YEAR' => 'year' , - 'LBL_YEARS' => 'years' , - 'LBL_MONTH' => 'month' , - 'LBL_MONTHS' => 'months' , - 'LBL_DAY' => 'day' , - 'LBL_DAYS' => 'days' , - 'LBL_HOUR' => 'hour' , - 'LBL_HOURS' => 'hours' , - 'LBL_MINUTE' => 'minute' , - 'LBL_MINUTES' => 'Minutes' , - 'LBL_SECOND' => 'second' , - 'LBL_SECONDS' => 'seconds' , - 'LBL_JUSTNOW' => 'just now' , + 'Upcoming Tasks' => 'Prossime attività ' , + 'LBL_YEAR' => 'anno' , + 'LBL_YEARS' => 'anni' , + 'LBL_MONTH' => 'mese' , + 'LBL_MONTHS' => 'mesi' , + 'LBL_DAY' => 'giorno' , + 'LBL_DAYS' => 'giorni' , + 'LBL_HOUR' => 'ora' , + 'LBL_HOURS' => 'ore' , + 'LBL_MINUTE' => 'minuto' , + 'LBL_MINUTES' => 'Minuti' , + 'LBL_SECOND' => 'secondo' , + 'LBL_SECONDS' => 'secondi' , + 'LBL_JUSTNOW' => 'adesso' , 'LBL_CUSTOM_INFORMATION' => 'Informazioni personalizzate' , - 'LBL_NO_RECENT_UPDATES' => 'No recent updates' , + 'LBL_NO_RECENT_UPDATES' => 'Nessun aggiornamento recente' , 'LBL_NO_DATA' => 'Nessun dato trovato' , - 'LBL_PERMISSION_DENIED' => 'Permission denied' , - 'LBL_HANDLER_NOT_FOUND' => 'Handler not found' , + 'LBL_PERMISSION_DENIED' => 'Permesso negato' , + 'LBL_HANDLER_NOT_FOUND' => 'Handler non trovato' , 'LBL_FILTER' => 'Lista' , - 'LBL_DUE' => 'due' , - 'LBL_COMPLETED' => 'completed' , - 'LBL_AGO' => 'ago' , - 'LBL_CHANGED' => 'changed' , + 'LBL_DUE' => 'programmato' , + 'LBL_COMPLETED' => 'completato' , + 'LBL_AGO' => 'fa' , + 'LBL_CHANGED' => 'cambiato' , 'Single_Users' => 'Utente' , - 'LBL_MATCHED_THIS_CRITERIA' => 'matched this criteria' , - 'LBL_NO_SCHEDULED_ACTIVITIES' => 'No scheduled activities' , - 'LBL_NO_OVERDUE_ACTIVITIES' => 'No overdue activities' , - 'LBL_NO_UPDATES_OR_COMMENTS' => 'No updates or comments' , - 'LBL_MINI_LIST' => 'Mini List' , // TODO: Review - 'Mini List' => 'Mini List' , // TODO: Review - 'LBL_RESULT_FOR_THE_TAG' => 'Results for the tag' , // TODO: Review + 'LBL_MATCHED_THIS_CRITERIA' => 'corrisponde a questo criterio' , + 'LBL_NO_SCHEDULED_ACTIVITIES' => 'Nessuna attività in programma' , + 'LBL_NO_OVERDUE_ACTIVITIES' => 'Nessuna attività scaduta' , + 'LBL_NO_UPDATES_OR_COMMENTS' => 'Nessun aggiornaento o commento' , + 'LBL_MINI_LIST' => 'Mini Lista' , // TODO: Review + 'Mini List' => 'Mini Lista' , // TODO: Review + 'LBL_RESULT_FOR_THE_TAG' => 'Risultati per il tag' , // TODO: Review 'LBL_ALL_USERS' => 'Tutti gli utenti', 'LBL_BOTH' => 'Entrambi', - 'LBL_SHOW' => 'Spettacolo', + 'LBL_SHOW' => 'Mostra', 'LBL_SELECT_DATE_RANGE' => 'Scegli un intervallo di date', - 'LBL_VIEW_NAME' => 'Lista nome' , - 'LBL_CREATE_VIEW' => 'Creating new View' , - 'LBL_BASIC_DETAILS' => 'Basic Details' , - 'LBL_CHOOSE_COLUMNS' => 'Choose Columns and Order' , + 'LBL_VIEW_NAME' => 'Mostra Nome' , + 'LBL_CREATE_VIEW' => 'Creando nuove Viste' , + 'LBL_BASIC_DETAILS' => 'Dettagli Base' , + 'LBL_CHOOSE_COLUMNS' => 'Scegli colonne e ordinamento' , 'LBL_MAX_NUMBER_FILTER_COLUMNS' => 'Max 15' , - 'LBL_FILTER_ON_DATE' => 'Lista on date' , - 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Scegli condizioni List' , - 'LBL_SET_AS_DEFAULT' => 'Set as Default' , - 'LBL_LIST_IN_METRICS' => 'List in Metrics' , - 'LBL_SET_AS_PUBLIC' => ' Set as Public' , - 'LBL_ADD_MORE_COLUMNS' => 'Fare clic per selezionare i campi' , - 'LBL_CUSTOM' => 'Custom' , - 'LBL_PREVIOUS_FY' => 'Previous FY' , - 'LBL_CURRENT_FY' => 'Current FY' , - 'LBL_NEXT_FY' => 'Next FY' , - 'LBL_PREVIOUS_FQ' => 'Previous FQ' , - 'LBL_CURRENT_FQ' => 'Current FQ' , - 'LBL_NEXT_FQ' => 'Next FQ' , - 'LBL_YESTERDAY' => 'Yesterday' , + 'LBL_FILTER_ON_DATE' => 'Filtra basandoti sulle date' , + 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Scegli condizioni Filtri' , + 'LBL_SET_AS_DEFAULT' => 'Imposta come Default' , + 'LBL_LIST_IN_METRICS' => 'Mostra nelle Metriche' , + 'LBL_SET_AS_PUBLIC' => 'Imposta come Pubblico' , + 'LBL_ADD_MORE_COLUMNS' => 'Aggiungi più Colonne' , + 'LBL_CUSTOM' => 'Personalizzato' , + 'LBL_PREVIOUS_FY' => 'Anno Fiscale Precedente' , + 'LBL_CURRENT_FY' => 'Anno Fiscale Attuale' , + 'LBL_NEXT_FY' => 'Anno Fiscale Prossimo' , + 'LBL_PREVIOUS_FQ' => 'Quarto Fisc. Precedente' , + 'LBL_CURRENT_FQ' => 'Quarto Fisc. Attuale' , + 'LBL_NEXT_FQ' => 'Quarto Fisc. Prossimo' , + 'LBL_YESTERDAY' => 'Ieri' , 'LBL_TODAY' => 'Oggi' , - 'LBL_TOMORROW' => 'Tomorrow' , + 'LBL_TOMORROW' => 'Domani' , 'LBL_LAST_WEEK' => 'Ultima settimana' , - 'LBL_CURRENT_WEEK' => 'Current Week' , - 'LBL_NEXT_WEEK' => 'Next Week' , - 'LBL_LAST_MONTH' => 'Last Month' , - 'LBL_CURRENT_MONTH' => 'Current Month' , - 'LBL_NEXT_MONTH' => 'Next Month' , - 'LBL_LAST_7_DAYS' => 'Last 7 Days' , - 'LBL_LAST_14_DAYS' => 'Last 14 Days' , - 'LBL_LAST_30_DAYS' => 'Last 30 Days' , - 'LBL_LAST_60_DAYS' => 'Last 60 Days' , - 'LBL_LAST_90_DAYS' => 'Last 90 Days' , - 'LBL_LAST_120_DAYS' => 'Last 120 Days' , - 'LBL_NEXT_30_DAYS' => 'Next 30 Days' , - 'LBL_NEXT_60_DAYS' => 'Next 60 Days' , - 'LBL_NEXT_90_DAYS' => 'Next 90 Days' , - 'LBL_NEXT_120_DAYS' => 'Next 120 Days' , - 'LBL_OWNER' => 'Owner' , - 'LBL_CREATED_ON' => 'Created On' , - 'LBL_MODIFIED_ON' => 'Modified On' , - 'LBL_BEFORE_EVENT' => ' Before Event' , - 'Upcoming Activities' => 'Prossime attività' , - 'Overdue Activities' => 'Overdue Activities' , + 'LBL_CURRENT_WEEK' => 'Settimana corrente' , + 'LBL_NEXT_WEEK' => 'Settimana Prossima' , + 'LBL_LAST_MONTH' => 'Mese Passato' , + 'LBL_CURRENT_MONTH' => 'Mese Corrente' , + 'LBL_NEXT_MONTH' => 'Mese Prossimo' , + 'LBL_LAST_7_DAYS' => 'Ultimi 7 giorni' , + 'LBL_LAST_14_DAYS' => 'Ultimi 14 giorni' , + 'LBL_LAST_30_DAYS' => 'Ultimi 30 giorni' , + 'LBL_LAST_60_DAYS' => 'Ultimi 60 giorni' , + 'LBL_LAST_90_DAYS' => 'Ultimi 90 giorni' , + 'LBL_LAST_120_DAYS' => 'Ultimi 120 giorni' , + 'LBL_NEXT_60_DAYS' => 'Prossimi 60 giorni' , + 'LBL_NEXT_30_DAYS' => 'Prossimi 30 giorni' , + 'LBL_NEXT_90_DAYS' => 'Prossimi 90 giorni' , + 'LBL_NEXT_120_DAYS' => 'Prossimi 120 giorni' , + 'LBL_OWNER' => 'Proprietario' , + 'LBL_CREATED_ON' => 'Creato il' , + 'LBL_MODIFIED_ON' => 'Modificato il' , + 'LBL_BEFORE_EVENT' => 'Prima dell\'evento' , + 'Upcoming Activities' => 'Prossime attività ' , + 'Overdue Activities' => 'Attività Scadute' , 'Funnel' => 'Funnel' , - 'Potentials by Stage' => 'Opportunities by Stage' , - 'Pipelined Amount' => 'Sales Pipeline' , - 'Total Revenue' => 'Total Revenue' , - 'Top Potentials' => 'Top Potentials' , - 'Forecast' => 'Forecast' , - 'Leads Created' => 'Leads Created' , - 'Leads by Status' => 'Leads by Status' , - 'Leads by Source' => 'Leads by Source' , - 'Leads by Industry' => 'Leads by Industry' , - 'Tickets by Status' => 'Tickets by Status' , // TODO: Review - 'Open Tickets' => 'Open Tickets' , // TODO: Review - 'LBL_EXPORT_ALL_DATA' => 'Export di tutti i dati' , - 'LBL_EXPORT_DATA_IN_CURRENT_PAGE' => 'Export dei dati della pagina corrente', - 'LBL_EXPORT_SELECTED_RECORDS' => 'Export Selected Records' , - 'LBL_EXPORT_RECORDS' => 'Export delle tipologie di record', - 'LBL_NO_RECORD_SELECTED' => 'No record selected.' , - 'LBL_CAN_NOT_REMOVE_DEFAULT_WIDGET' => 'Cannot remove default widget', - 'LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST' => 'Elenco esiste già ' , - 'LBL_EXPORT_CURRENCY_TOOLTIP_TEXT'=>'Per esportare i valori di valuta in Voci, Vtiger utilizzerà questa impostazione per esportare come tale valuta. Tutti i valori di valuta al di fuori delle tabelle elementi di linea, verranno esportati come in Utenti valuta preferita (selezionato in Preferenze)', - 'LBL_EXPORT_LINEITEM_CURRENCY'=>'Scegliere valuta (per valori VOCE)', + 'Potentials by Stage' => 'Opportunità per stadio' , + 'Pipelined Amount' => 'Pipeline Vendita' , + 'Total Revenue' => 'Ricavo Totale' , + 'Top Potentials' => 'Migliori Potenziali' , + 'Forecast' => 'Previsione' , + 'Leads Created' => 'Lead Creati' , + 'Leads by Status' => 'Lead per Stadio' , + 'Leads by Source' => 'Lead per Origine' , + 'Leads by Industry' => 'Lead per Industria' , + 'Tickets by Status' => 'Tickets per Stadio' , // TODO: Review + 'Open Tickets' => 'Tickets Aperti' , // TODO: Review + 'LBL_EXPORT_ALL_DATA' => 'Esporta tutti i dati' , + 'LBL_EXPORT_DATA_IN_CURRENT_PAGE' => 'Esporta i dati della pagina corrente', + 'LBL_EXPORT_SELECTED_RECORDS' => 'Esporta i record selezionati' , + 'LBL_EXPORT_RECORDS' => 'Export delle tipologie dei record', + 'LBL_NO_RECORD_SELECTED' => 'Nessun record selezionato.' , + 'LBL_CAN_NOT_REMOVE_DEFAULT_WIDGET' => 'Non posso rimuovere un default widget', + 'LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST' => 'Il filtro esiste già ' , + 'LBL_EXPORT_CURRENCY_TOOLTIP_TEXT'=>'Per esportare i valori di valuta nelle righe dei prodotti, Vtiger utilizzerà questa impostazione per esportare come tale la valuta. Tutti i valori di valuta al di fuori delle righe dei prodotti, verranno esportati nella valuta preferita dell\'Utente (selezionato in Preferenze)', + 'LBL_EXPORT_LINEITEM_CURRENCY'=>'Scegliere valuta (per le righe prodotto)', 'LBL_EXPORT_USER_CURRENCY' =>'La mia valuta preferita', - 'LBL_EXPORT_RECORD_CURRENCY'=>'Valuta specificato nel record', + 'LBL_EXPORT_RECORD_CURRENCY'=>'Valuta specificata nel record', 'LBL_EXPORT_FORMAT' => 'Formato Export', 'LBL_EXPORT_DATA' => 'Esporta dati', - 'LBL_ADD_MANAGE_MODULES' => 'Add / Manage Modules' , + 'LBL_ADD_MANAGE_MODULES' => 'Aggiungi / Gestisci Moduli' , 'Account Name' => 'Nome Azienda' , - 'Add Comment' => 'Add Comment' , + 'Add Comment' => 'Aggiungi Commento' , 'Adjustment' => 'Arrotondamento' , 'Annual Revenue' => 'Fatturato' , - 'Apparel' => 'Apparel' , - 'Banking' => 'Banking' , + 'Apparel' => 'Abbigliamento' , + 'Banking' => 'Bancario' , 'Billing Address' => 'Indirizzo di fatturazione' , 'Billing City' => 'Fatturazione Città ' , 'Billing Code' => 'Codice di fatturazione' , 'Billing Country' => 'Fatturazione Paese' , - 'Billing Po Box' => 'Fatturazione Po Box' , - 'Billing State' => 'Stato di fatturazione' , - 'Biotechnology' => 'Biotechnology' , + 'Billing Po Box' => 'Fatturazione Casella di Posta' , + 'Billing State' => 'Nazione di fatturazione' , + 'Biotechnology' => 'Biotechnologia' , 'FedEx' => 'FedEx' , 'UPS' => 'UPS' , 'USPS' => 'USPS' , 'DHL' => 'DHL' , 'BlueDart' => 'BlueDart' , - 'Carrier' => 'Elemento portante' , + 'Carrier' => 'Corriere' , 'Category' => 'Categoria' , - 'Chemicals' => 'Chemicals' , - 'City' => 'Città' , - 'Cold Call' => 'Cold Call' , - 'Existing Customer' => 'Existing Customer' , - 'Self Generated' => 'Self Generated' , - 'Employee' => 'Employee' , + 'Chemicals' => 'Chimica' , + 'City' => 'Città ' , + 'Cold Call' => 'Chiamata Fredda' , + 'Existing Customer' => 'Cliente Esistente' , + 'Self Generated' => 'Auto-Generato' , + 'Employee' => 'Dipendente' , 'Partner' => 'Partner' , - 'Public Relations' => 'Public Relations' , - 'Direct Mail' => 'Direct Mail' , - 'Conference' => 'Conference' , - 'Trade Show' => 'Trade Show' , - 'Web Site' => 'Web Site' , - 'Word of mouth' => 'Word of mouth' , - 'Other' => 'Other' , + 'Public Relations' => 'Relazioni pubbliche' , + 'Direct Mail' => 'Email Diretta' , + 'Conference' => 'Conferenza' , + 'Trade Show' => 'Fiera' , + 'Web Site' => 'Sito Web' , + 'Word of mouth' => 'Passaparola' , + 'Other' => 'Altro' , '--None--' => '--Nessuno--' , - 'Acquired' => 'Acquired' , + 'Acquired' => 'Acquisito' , 'Active' => 'Attivo' , - 'Market Failed' => 'Market Failed' , - 'Project Cancelled' => 'Project Cancelled' , - 'Shutdown' => 'Shutdown' , - 'Communications' => 'Communications' , - 'Construction' => 'Construction' , + 'Market Failed' => 'Mercato Fallito' , + 'Project Cancelled' => 'Progetto Cancellato' , + 'Shutdown' => 'Spegnimento' , + 'Communications' => 'Comunicazioni' , + 'Construction' => 'Edile' , 'Consulting' => 'Consulting' , - 'Education' => 'Education' , - 'Electronics' => 'Electronics' , - 'Energy' => 'Energy' , - 'Engineering' => 'Engineering' , - 'Entertainment' => 'Entertainment' , - 'Environmental' => 'Environmental' , - 'Finance' => 'Finance' , - 'Food & Beverage' => 'Food & Beverage' , - 'Government' => 'Government' , - 'Healthcare' => 'Healthcare' , - 'Hospitality' => 'Hospitality' , - 'Insurance' => 'Insurance' , - 'Machinery' => 'Machinery' , - 'Manufacturing' => 'Manufacturing' , - 'Media' => 'Media' , - 'Not For Profit' => 'Not For Profit' , - 'Recreation' => 'Recreation' , - 'Retail' => 'Retail' , - 'Shipping' => 'Shipping' , - 'Technology' => 'Technology' , - 'Telecommunications' => 'Telecommunications' , - 'Transportation' => 'Transportation' , - 'Utilities' => 'Utilities' , + 'Education' => 'Istruzione' , + 'Electronics' => 'Elettronica' , + 'Energy' => 'Energia' , + 'Engineering' => 'Ingegneria' , + 'Entertainment' => 'Spettacolo' , + 'Environmental' => 'Ambientale' , + 'Finance' => 'Finanza' , + 'Food & Beverage' => 'Cibo e Bevande' , + 'Government' => 'Governo' , + 'Healthcare' => 'Salute' , + 'Hospitality' => 'Ospitalità ' , + 'Insurance' => 'Assicurazione' , + 'Machinery' => 'Meccanica' , + 'Manufacturing' => 'Manifattura' , + 'Media' => 'Informazione' , + 'Not For Profit' => 'No Profit' , + 'Recreation' => 'Divertimento' , + 'Retail' => 'Rivendita' , + 'Shipping' => 'Spedizioni' , + 'Technology' => 'Tecnolgia' , + 'Telecommunications' => 'Telecomunicazioni' , + 'Transportation' => 'Trasporti' , + 'Utilities' => 'Servizio pubblico' , 'Contact Name' => 'Nome Contatto' , - 'Conversion Rate' => 'Conversion Rate' , + 'Conversion Rate' => 'Tasso di conversione' , 'Shipping Address' => 'Indirizzo di Spedizione' , - 'Shipping City' => 'Spedizione Città ' , - 'Shipping State' => 'Stato di spedizione' , + 'Shipping City' => 'Città Spedizione' , + 'Shipping State' => 'Nazione di spedizione' , 'Shipping Code' => 'Spedizione CAP' , 'Shipping Country' => 'Shipping Country' , 'Shipping Po Box' => 'Spedizione Po Box' , 'Country' => 'Stato' , 'Created' => 'Creato' , - 'Approved' => 'Approved' , - 'Delivered' => 'Delivered' , - 'Cancelled' => 'Cancelled' , + 'Approved' => 'Approvato' , + 'Delivered' => 'Consegnato' , + 'Cancelled' => 'Cancellato' , 'Currency' => 'Valuta' , 'LBL_BASE_CURRENCY' => 'Valuta predefinita' , - 'Discount Percent' => 'Discount Percent' , - 'Discount Amount' => 'Discount Amount' , - 'Item Discount Amount' => 'Item Discount Amount' , - 'Item Discount Percent' => 'Item Discount Percent' , + 'Discount Percent' => 'Sconto Percentuale' , + 'Discount Amount' => 'Valore sconto' , + 'Item Discount Amount' => 'Valore sconto prodotto' , + 'Item Discount Percent' => 'Sconto prodotto percentuale' , 'Due Date' => 'Data di Pagamento' , - 'Due Date & Time' => 'Due Date & Time' , + 'Due Date & Time' => 'Data e Ora Pagamento' , 'Email' => 'Email' , - 'Secondary Email' => 'Secondary Email' , - 'Other Email' => 'Other Email' , + 'Secondary Email' => 'Email Secondaria' , + 'Other Email' => 'Altra Email' , 'Email Opt Out' => 'Blocca Email' , - 'Is Converted From Lead' => 'Viene convertito da piombo' , + 'Is Converted From Lead' => 'Viene convertito da Lead' , 'Expected Close Date' => 'Data di Chiusura Attesa' , 'Fax' => 'Fax' , 'Last Name' => 'Cognome' , 'First Name' => 'Nome' , - 'High' => 'High' , - 'Low' => 'Low' , + 'High' => 'Alto' , + 'Low' => 'Basso' , 'In Progress' => 'In Corso' , - 'Subject' => 'Soggetto' , + 'Subject' => 'Oggetto' , 'Terms & Conditions' => 'Termini e Condizioni' , - 'Item Name' => 'Nome dell'elemento' , - 'Quantity' => 'Quantità' , + 'Item Name' => 'Nome dell\'elemento' , + 'Quantity' => 'Quantità ' , 'List Price' => 'Prezzo di vendita' , - 'Image' => 'Immagine' , - 'Purchase Cost' => 'Acquisto Costo' , - 'Margin' => 'Margine' , - 'Item Comment' => 'Item Comment' , - 'Tax1' => 'Tax1' , - 'Tax2' => 'Tax2' , - 'Tax3' => 'Tax3' , + 'Image' => 'Immagine' , + 'Purchase Cost' => 'Costo d\'Acquisto' , + 'Margin' => 'Margine' , + 'Item Comment' => 'Commento Prodotto' , + 'Tax1' => 'Tassa1' , + 'Tax2' => 'Tassa2' , + 'Tax3' => 'Tassa3' , 'Excise Duty' => 'Imposta di Fabbricazione' , 'Total' => 'Totale' , 'Sub Total' => 'Totale Parziale' , - 'Tax Type' => 'Tax Type' , - 'S&H Amount' => 'S&H Amount' , + 'Tax Type' => 'Tipo Tasse' , + 'S&H Amount' => 'Valore Sped. & Imballo' , 'Status' => 'Stato' , 'Vendor Name' => 'Nome Fornitore' , 'LBL_ADDRESS_INFORMATION' => 'Informazioni indirizzo' , - 'LBL_DESCRIPTION_INFORMATION' => 'Description Details' , + 'LBL_DESCRIPTION_INFORMATION' => 'Descrizione Dettagli' , 'LBL_TERMS_INFORMATION' => 'Termini e condizioni' , 'LBL_PRICING_INFORMATION' => 'Informazioni sui prezzi' , 'LBL_RELATED_PRODUCTS' => 'Dettagli Prodottto' , - 'LBL_REMINDER_INFORMATION' => 'Reminder Details' , - 'LBL_FOLDER_SAVED' => 'Folder saved' , - 'LBL_FOLDER_EXISTS' => 'Folder already exists' , - 'LBL_FOLDER_DELETED' => 'Folder deleted' , + 'LBL_REMINDER_INFORMATION' => 'Dettagli Promemoria' , + 'LBL_FOLDER_SAVED' => 'Cartella Salvata' , + 'LBL_FOLDER_EXISTS' => 'Cartella già esistente' , + 'LBL_FOLDER_DELETED' => 'Cartella cancellata' , 'LBL_EDIT_FOLDER' => 'Modifica cartella', 'Lead Source' => 'Origine Lead' , 'Mobile' => 'Cellulare' , @@ -524,88 +524,88 @@ $languageStrings = array( 'Phone' => 'Telefono' , 'State' => 'Provincia' , 'Po Box' => 'P.O. Box' , - 'Postal Code' => 'Postal Code' , - 'Potential Name' => 'Nome Opportunità' , - 'Priority' => 'Priorità' , + 'Postal Code' => 'CAP' , + 'Potential Name' => 'Nome Opportunità ' , + 'Priority' => 'Priorità ' , 'Product Name' => 'Nome Prodotto' , 'Rating' => 'Rating (Valutazione)' , 'Related To' => 'Relazionato a' , 'Type' => 'Tipo' , - 'Reviewed' => 'Reviewed' , + 'Reviewed' => 'Rivisto' , 'Salutation' => 'Formula di saluto' , 'Street' => 'Via' , 'Support Start Date' => 'Data Inizio Supporto' , - 'Support Expiry Date' => 'Support Expiry Date' , - 'Sales Start Date' => 'Sales Start Date' , - 'Sales End Date' => 'Sales End Date' , - 'Open Ticktes' => 'Open Tickets' , // TODO: Review + 'Support Expiry Date' => 'Data Fine Supporto' , + 'Sales Start Date' => 'Data Inizio Vendita' , + 'Sales End Date' => 'Data fine vendta' , + 'Open Ticktes' => 'Ticket aperti' , // TODO: Review 'LBL_SELECT_STATUS' => 'Selezionare Stato' , - 'LBL_VTIGER_CRM_HONEST_OPEN_SOURCE' => 'vtiger CRM On Demand' , - 'SINGLE_Accounts' => 'Organization' , // TODO: Review - 'SINGLE_Contacts' => 'Contact' , // TODO: Review - 'LBL_Sun' => 'Sun' , // TODO: Review - 'LBL_Mon' => 'Mon' , // TODO: Review - 'LBL_Tue' => 'Tue' , // TODO: Review - 'LBL_Wed' => 'Wed' , // TODO: Review - 'LBL_Thu' => 'Thu' , // TODO: Review - 'LBL_Fri' => 'Fri' , // TODO: Review - 'LBL_Sat' => 'Sat' , // TODO: Review - 'LBL_Jan' => 'Jan' , // TODO: Review + 'LBL_VTIGER_CRM_HONEST_OPEN_SOURCE' => 'vtiger CRM su Richiesta' , + 'SINGLE_Accounts' => 'Azienda' , // TODO: Review + 'SINGLE_Contacts' => 'Contatto' , // TODO: Review + 'LBL_Sun' => 'Dom' , // TODO: Review + 'LBL_Mon' => 'Lun' , // TODO: Review + 'LBL_Tue' => 'Mar' , // TODO: Review + 'LBL_Wed' => 'Mer' , // TODO: Review + 'LBL_Thu' => 'Gio' , // TODO: Review + 'LBL_Fri' => 'Ven' , // TODO: Review + 'LBL_Sat' => 'Sab' , // TODO: Review + 'LBL_Jan' => 'Gen' , // TODO: Review 'LBL_Feb' => 'Feb' , // TODO: Review 'LBL_Mar' => 'Mar' , // TODO: Review 'LBL_Apr' => 'Apr' , // TODO: Review - 'LBL_May' => 'May' , // TODO: Review - 'LBL_Jun' => 'Jun' , // TODO: Review - 'LBL_Jul' => 'Jul' , // TODO: Review - 'LBL_Aug' => 'Aug' , // TODO: Review - 'LBL_Sep' => 'Sep' , // TODO: Review - 'LBL_Oct' => 'Oct' , // TODO: Review + 'LBL_May' => 'Mag' , // TODO: Review + 'LBL_Jun' => 'Giu' , // TODO: Review + 'LBL_Jul' => 'Lug' , // TODO: Review + 'LBL_Aug' => 'Ago' , // TODO: Review + 'LBL_Sep' => 'Set' , // TODO: Review + 'LBL_Oct' => 'Ott' , // TODO: Review 'LBL_Nov' => 'Nov' , // TODO: Review - 'LBL_Dec' => 'Dec' , // TODO: Review - 'LBL_CALENDAR_SETTINGS' => 'Calendar Settings' , // TODO: Review + 'LBL_Dec' => 'Dic' , // TODO: Review + 'LBL_CALENDAR_SETTINGS' => 'Impostazioni Calendario' , // TODO: Review 'HelpDesk' => 'Tickets' , // TODO: Review 'LBL_TAG_CLOUD' => 'Tag Cloud' , // TODO: Review - 'LBL_NO_RECORDS' => 'No Records' , // TODO: Review - 'LBL_NO_RELATED' => 'No Related' , // TODO: Review - 'LBL_GLOBAL_SEARCH_MAX_MESSAGE' => 'Only the first 100 results of all modules are shown below. For module specific results, please select respective module and search', // TODO: Review - 'LBL_GLOBAL_SEARCH_MAX_MESSAGE_FOR_MODULE' => 'Only the first 100 results are shown below. Please do Advanced Search if you are not satisfied with the result', // TODO: Review - 'LBL ACTION' => 'Action' , // TODO: Review - 'LBL_NOTE' => 'Note' , // TODO: Review - 'LBL_SELECT_OPTION' => 'Select an Option' , // TODO: Review - 'LBL_TOOLTIP' => 'Tooltip Management' , // TODO: Review + 'LBL_NO_RECORDS' => 'Nessun Record' , // TODO: Review + 'LBL_NO_RELATED' => 'Nessuna Relazione' , // TODO: Review + 'LBL_GLOBAL_SEARCH_MAX_MESSAGE' => 'Sono mostrati solo i primi 100 risultati di tutti i moduli. Per i risultati di un modulo specifico, selezionare il relativo modulo e cercare', // TODO: Review + 'LBL_GLOBAL_SEARCH_MAX_MESSAGE_FOR_MODULE' => 'Sono mostrati solo i primi 100 risultati. Usare la ricerca Avanzata se non sei soddisfatto dei risultati.', // TODO: Review + 'LBL ACTION' => 'Azione' , // TODO: Review + 'LBL_NOTE' => 'Nota' , // TODO: Review + 'LBL_SELECT_OPTION' => 'Selezionare un\'opzione' , // TODO: Review + 'LBL_TOOLTIP' => 'Gestione Tooltip' , // TODO: Review 'LBL_MODULE_SEQUENCE_NUMBERING' => '%s Numerazione' , // TODO: Review 'LBL_CUSTOM_FIELD_MAPPING' => 'Custom Field Mapping' , // TODO: Review 'LBL_WEBFORMS' => 'WebForms' , // TODO: Review 'SINGLE_Emails' => 'Email' , // TODO: Review 'Emails' => 'Emails' , // TODO: Review - 'LBL_SELECT_EMAIL_IDS' => 'Select Email Addresses' , // TODO: Review - 'LBL_SUBJECT' => 'Subject' , // TODO: Review - 'LBL_ATTACHMENT' => 'Attachment' , // TODO: Review - 'LBL_BROWSE_CRM' => 'Browse CRM' , // TODO: Review - 'LBL_SEND' => 'Send' , // TODO: Review - 'LBL_SAVE_AS_DRAFT' => 'Save as Draft' , // TODO: Review - 'LBL_GO_TO_PREVIEW' => 'Go to Preview' , // TODO: Review - 'LBL_SELECT_EMAIL_TEMPLATE' => 'Select Email Template' , // TODO: Review - 'LBL_COMPOSE_EMAIL' => 'Compose Email' , // TODO: Review + 'LBL_SELECT_EMAIL_IDS' => 'Seleziona gli indirizzi Email' , // TODO: Review + 'LBL_SUBJECT' => 'Oggetto' , // TODO: Review + 'LBL_ATTACHMENT' => 'Allegato' , // TODO: Review + 'LBL_BROWSE_CRM' => 'Sfoglia CRM' , // TODO: Review + 'LBL_SEND' => 'Invia' , // TODO: Review + 'LBL_SAVE_AS_DRAFT' => 'Salva come Bozze' , // TODO: Review + 'LBL_GO_TO_PREVIEW' => 'Vai all\'anteprima' , // TODO: Review + 'LBL_SELECT_EMAIL_TEMPLATE' => 'Seleziona Modello Email' , // TODO: Review + 'LBL_COMPOSE_EMAIL' => 'Componi Email' , // TODO: Review 'LBL_CC' => 'Cc' , // TODO: Review - 'LBL_BCC' => 'Bcc' , // TODO: Review - 'LBL_ADD_CC' => 'Add Cc' , // TODO: Review - 'LBL_ADD_BCC' => 'Add Bcc' , // TODO: Review - 'LBL_MAX_UPLOAD_SIZE' => 'Maximum upload size is' , // TODO: Review - 'LBL_EXCEEDED' => 'Exceeded' , // TODO: Review + 'LBL_BCC' => 'Ccn' , // TODO: Review + 'LBL_ADD_CC' => 'Aggiungi Cc' , // TODO: Review + 'LBL_ADD_BCC' => 'Aggiungi Ccn' , // TODO: Review + 'LBL_MAX_UPLOAD_SIZE' => 'Massima dimensione per upload è' , // TODO: Review + 'LBL_EXCEEDED' => 'Ecceduto' , // TODO: Review //Translations used for Export to Pdf 'Valid Date' => 'Data valida', 'Phone: ' => 'Telefono: ', - 'Issued Date' => 'rilasciato Data', - 'Shipping & Handling Charges' => 'Spedizione e spese di trattamento', - 'Shipping & Handling Tax:' => 'Spedizione & trattare Tax:', + 'Issued Date' => 'Data emissione', + 'Shipping & Handling Charges' => 'Spese di Spedizione e Imballo', + 'Shipping & Handling Tax:' => 'Tasse Spedizione e Imballo', 'Discount' => 'sconto', - 'Net Total' => 'Total Net', - 'Product Code' => 'Prodotto Codice', + 'Net Total' => 'Totale Netto', + 'Product Code' => 'Codice Prodotto', 'Customer Name' => 'Nome cliente', 'Price'=>'prezzo', - 'Tax:' => 'Tax:', + 'Tax:' => 'Tassa:', 'Contact Name' => 'Nome contatto', 'Grand Total:' => 'Totale generale:', 'Fax: ' => 'Fax: ', @@ -615,20 +615,20 @@ $languageStrings = array( //Realted tab strings 'Service Contracts' => 'Contratti di Servizio', - 'Projects' => 'Projects', + 'Projects' => 'Progetti', 'Sales Order' => 'Ordini di vendita', - 'Purchase Order' => 'Ordini d\acquisto', - 'Payments' => 'Payments', - 'List and Campaigns' => 'List and Campaigns', - 'Project Tasks' => 'Project Tasks', - 'Project Milestones' => 'Project Milestones', + 'Purchase Order' => 'Ordini d\'acquisto', + 'Payments' => 'Pagamenti', + 'List and Campaigns' => 'Lista and Campagna', + 'Project Tasks' => 'Attività del Progetto', + 'Project Milestones' => 'Stadi Progetto', - 'Labels Editor' => 'Labels Editor', + 'Labels Editor' => 'Editor Etichette', //Related tabs of Products - 'Product Bundles' => 'Product Bundles', - 'Parent Product' => 'Parent Product', - 'LBL_PRODUCT_BUNDLE' => 'Bundle prodotto', + 'Product Bundles' => 'Prodotti Bundle', + 'Parent Product' => 'Prodotto Genitore', + 'LBL_PRODUCT_BUNDLE' => 'Prodotto Bundle', 'LBL_EDIT_QUANTITY' => 'Modifica Quantità ', 'LBL_ADD_TO_PRODUCTS' => 'Aggiungi prodotti', @@ -645,24 +645,24 @@ $languageStrings = array( 'All Comments' => 'Tutti i commenti', //Feedback on removing old version - 'LBL_OLD_VERSION_REMOVED_SOON' => 'Nota importante sulla vecchia sguardo', - 'LBL_FEEDBACK_ON_REMOVING_OLD_VERSION' => 'Siamo felici di condividere quel vecchio look sarà disponibile fino al febbraio 2014. Abbiamo aggiunto le seguenti caratteristiche per il nuovo look di recente <br><br> 1. Rapporti Pivot <br> 2. I grafici personalizzati Sims <br>3. Ricerca rapida nelle liste <br><br> Se avete suggerimenti su nuovo look, invitiamo a condividere con noi qui sotto.', + 'LBL_OLD_VERSION_REMOVED_SOON' => 'Nota importante sul vecchio aspetto', + 'LBL_FEEDBACK_ON_REMOVING_OLD_VERSION' => 'Siamo felici di condividere che quel vecchio look sarà disponibile fino al febbraio 2014. Abbiamo aggiunto le seguenti caratteristiche per il nuovo look di recente <br><br> 1. Rapporti Pivot <br> 2. I grafici personalizzati <br>3. Ricerca rapida nelle liste <br><br> Se avete suggerimenti su nuovo look, invitiamo a condividere con noi qui sotto.', 'LBL_FEEDBACK_PLACEHOLDER' => 'Condividi i tuoi suggerimenti qui ..', 'LBL_SUBMIT_FEEDBACK' => 'Inserisci un feedback', 'LBL_DONT_SHOW_AGAIN' => 'Non mostrarlo più', - 'LBL_CONTINUE_TO_OLD_LOOK' => 'Continuare a vecchio look', + 'LBL_CONTINUE_TO_OLD_LOOK' => 'Continuare col vecchio look', 'LBL_TRANSFER_OWNERSHIP' => 'trasferimento della proprietà ', //Products Popup View - 'NOT_A_BUNDLE' => 'Non un fascio', + 'NOT_A_BUNDLE' => 'Non un Bundle', 'LBL_SUB_PRODUCTS' => 'Prodotti Sub', - 'LBL_MARK_AS_HELD' => 'Segna come Held', + 'LBL_MARK_AS_HELD' => 'Segna come Sospeso', 'LBL_SMS_MAX_CHARACTERS_ALLOWED' => 'Massimo 160 caratteri sono consentiti per il messaggio di testo', - 'LBL_HIDE_COMPLETED_EVENTS' => 'Nascondi completate Calendario degli eventi', - 'LBL_SETUP_WEBFORMS' => 'Setup Webfroms' , + 'LBL_HIDE_COMPLETED_EVENTS' => 'Nascondi completate il Calendario degli eventi', + 'LBL_SETUP_WEBFORMS' => 'Imposta Webforms' , 'LBL_SPECIAL_OPTIONS' => 'Opzioni speciali', - 'LBL_PARENT_OWNER' => 'Parent Record Proprietario', + 'LBL_PARENT_OWNER' => 'Proprietario record padre', // Recurring Invoice 'Half-Yearly' => 'Semestrale', @@ -671,10 +671,10 @@ $languageStrings = array( 'Organization Name' => 'Nome organizzazione', 'LBL_WEEK' => 'Settimana', // Convert Lead and Potentials - 'LBL_CONVERT_ERROR_TITLE' => 'Modules Disabled' , + 'LBL_CONVERT_ERROR_TITLE' => 'Moduli Disabilitati' , 'CANNOT_CONVERT' => 'Non può essere convertito' , - 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Possible reasons include:' , - 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Mandatory fields are empty' , + 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Le ragioni possibili includono:' , + 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'I campi obbligatori sono vuoti' , // SMSNotifier Phone Format Warning 'LBL_PHONE_FORMAT_WARNING' => 'assicurarsi che il numero di telefono in formato E.164 internazionale', @@ -693,20 +693,20 @@ $languageStrings = array( 'Related To' => 'Relativi a', // Date Conditions - 'LBL_LESS_THAN_DAYS_AGO' => 'Meno di giorni fa', - 'LBL_MORE_THAN_DAYS_AGO' => 'Più di giorni fa', + 'LBL_LESS_THAN_DAYS_AGO' => 'Più recente di giorni', + 'LBL_MORE_THAN_DAYS_AGO' => 'Più vecchio di giorni', 'LBL_IN_LESS_THAN' => 'In meno', 'LBL_IN_MORE_THAN' => 'In più di', 'LBL_DAYS_AGO' => 'Giorni fa', - 'LBL_DAYS_LATER' => 'Days Later', + 'LBL_DAYS_LATER' => 'Giorni dopo', 'LBL_LESS_THAN_HOURS_BEFORE' => 'Meno ore prima', - 'LBL_LESS_THAN_HOURS_LATER' => 'Meno di ore più tardi', + 'LBL_LESS_THAN_HOURS_LATER' => 'Più ore dopo', 'LBL_MORE_THAN_HOURS_BEFORE' => 'Più di ore prima', 'LBL_MORE_THAN_HOURS_LATER' => 'Più di ore più tardi', 'LBL_INTERNAL_COMMENT' => 'Commento interna', - 'LBL_NOTE_EXISTING_ATTACHMENTS_WILL_BE_REPLACED' => 'Nota: gli allegati esistenti (immagini / file) sarà sostituito', - 'LBL_INCLUDE_SIGNATURE_INFO' => 'Firma impostato in Preferenze verrà aggiunto alla parte inferiore della mail', + 'LBL_NOTE_EXISTING_ATTACHMENTS_WILL_BE_REPLACED' => 'Nota: gli allegati esistenti (immagini / file) saranno sostituiti', + 'LBL_INCLUDE_SIGNATURE_INFO' => 'La Firma impostata in Preferenze sarà aggiunta alla parte inferiore della mail', 'LBL_INCLUDE_SIGNATURE' => 'Includi firma', @@ -723,26 +723,26 @@ $languageStrings = array( 'LBL_VIEW_FULL_PROFILE' => 'Visualizza profilo completo', 'LBL_LOCATION' => 'Posizione', 'LBL_DESCRIPTION' => 'Descrizione', - 'LBL_JOINED' => 'Congiunto', + 'LBL_JOINED' => 'Unito', 'LBL_SEARCH_PROFILES_IN_TWITTER' => 'Ricerca profili twitter', 'LBL_CHOOSE_ANOTHER_PROFILE' => 'Scegli un profilo', 'LBL_ADD_TICKET' => 'Aggiungi Ticket', - 'LBL_ADD_OPPORTUNITY' => 'Aggiungi Opportunity', + 'LBL_ADD_OPPORTUNITY' => 'Aggiungi Opportunità ', 'LBL_RETWEET' => 'Retweet', 'LBL_RETWEETS' => 'Retweets', 'LBL_UNDO_RETWEET' => 'Annulla Retweet', 'LBL_FAVOURITE' => 'Preferito', - 'LBL_UNDO_FAVOURITE' => 'Annulla preferita', - 'LBL_TWITTER_HANDLER_MSG' => 'Per vedere sintesi il profilo di questo contatto e la storia aggiungono i loro handler di Twitter o di ricerca di profili utilizzando il link sottostante.', + 'LBL_UNDO_FAVOURITE' => 'Annulla preferito', + 'LBL_TWITTER_HANDLER_MSG' => 'Per vedere di questo contato il sommario e la storia, aggiungi i loro Handler di Twitter o cerca i profili usando il link sottostante.', 'LBL_ADD_EVENT_OR_TODO' => 'Aggiungi Evento / Task', 'LBL_ADD_TICKET_CONTACT' => 'Aggiungi Ticket + Contatto', - 'LBL_ADD_OPPORTUNITY_CONTACT' => 'Aggiungi Opportunity + Contatto', - 'LBL_SOCIAL_TWITTER_WIDGET' => 'Twitter Attività ', - 'LBL_TWITTER_HANDLER_DETAILS' => 'Twitter Handler Dettagli', + 'LBL_ADD_OPPORTUNITY_CONTACT' => 'Aggiungi Opportunità + Contatto', + 'LBL_SOCIAL_TWITTER_WIDGET' => 'Attività Twitter', + 'LBL_TWITTER_HANDLER_DETAILS' => 'Dettagli Handler Twitter', 'LBL_PRIMARY_TWITTER' => 'Twitter primaria', 'LBL_ADD_TWITTER_HANDLER' => 'Aggiungi Twitter Handler', 'LBL_VIEW_TICKET' => 'Visualizza Ticket', - 'LBL_VIEW_OPPORTUNITY' => 'Guarda Opportunity', + 'LBL_VIEW_OPPORTUNITY' => 'Guarda Opportunità ', 'LBL_CLICK_TO_SELECT_PROFILE' => 'Fare clic per selezionare il profilo', // Module field to store Source of Record 'Source' => 'Fonte', @@ -751,44 +751,44 @@ $languageStrings = array( 'LBL_REMEMBER_MY_PREF' => 'Ricorda la mia preferenza' , 'LBL_RECIPIENT_PREFS' => 'Preferenze destinatari' , 'LBL_EMAIL_RECIPIENT_PREFS' => 'Preferenze Email destinatario', - 'LBL_ERROR_SAVING_PREF' => 'Errore nelle preferenze di risparmio. Si prega di riprovare più tardi!', - 'LBL_NO_PREF_GIVEN' => 'Nessun dato preferenze!' , - 'LBL_PLEASE_ADD_EMAIL_FIELDS' => 'Si prega di aggiungere campi e-mail e riprova', - 'LBL_RECIPIENT_SAVE_MESSAGE' => 'Salva preferenze successful.These saranno trattati come indirizzi di posta elettronica dei destinatari quando si invia e-mail da questo modulo.', - 'LBL_DEFAULT_REPLY_TO' => 'Predefinito Risposta a per email', + 'LBL_ERROR_SAVING_PREF' => 'Errore nel salvataggio delle preferenze. Si prega di riprovare più tardi!', + 'LBL_NO_PREF_GIVEN' => 'Nessuna preferenza impostata!' , + 'LBL_PLEASE_ADD_EMAIL_FIELDS' => 'Si prega di riempire i campi e-mail e riprovare', + 'LBL_RECIPIENT_SAVE_MESSAGE' => 'Salvataggio riuscito. Queste preferenze saranno trattate come indirizzi di posta elettronica quando invii email da questo modulo.', + 'LBL_DEFAULT_REPLY_TO' => 'Risposta Predefinita per email', 'outgoing_server_from_email' => 'Server posta in uscita da Email', - 'hepldesk_support_email' => 'Helpdesk Support Email-Id', + 'hepldesk_support_email' => 'Email-Id Supporto Helpdesk', 'user_primary_email' => 'Utente Principale Email', - 'LBL_DEFAULT_REPLY_TO_INFO' => "Questa impostazione è applicabile solo per le email diretti da CRM. Essa non pregiudica le email inviate da flussi di lavoro, campagne e-mail, etc.", - 'LBL_INVALID_IMAGE' => 'Immagine non valido' , + 'LBL_DEFAULT_REPLY_TO_INFO' => "Questa impostazione è applicabile solo per le email inviate direttamente da CRM. Essa non ha effetto sulle email inviate da Workflow, campagne e-mail, etc.", + 'LBL_INVALID_IMAGE' => 'Immagine non valida' , 'LBL_NEXT' => 'Il Prossimo' , 'LBL_FINISH' => 'Finitura' , - 'VAT' => 'VAT', + 'VAT' => 'IVA', 'Sales' => 'Vendite', 'Service' => 'Servizio', - 'Pre Tax Total' => 'Pre Totale IVA', + 'Pre Tax Total' => 'Totale Senza IVA', 'Received' => 'Ricevuto', 'Balance' => 'Equilibrio', 'S&H Amount' => 'oneri', 'S&H Percent' => 'Tasse sulle spese', - 'Tax Region' => 'Regione Tax', + 'Tax Region' => 'Tassa Regionale', 'group' => 'Gruppo', 'individual' => 'Individuale', 'SINGLE_Potentials' => 'Opportunità ', 'SINGLE_HelpDesk' => 'Biglietto', - 'SINGLE_Accounts' => 'Organizzazione', + 'SINGLE_Accounts' => 'Azienda', 'SINGLE_Contacts' => 'Contatto', 'SINGLE_Project' => 'Progetto', - 'LBL_ROLLUP_COMMENTS_INFO' => "Se Arrotolare è impostato su 'On' commenti su record correlati verrà mostrato. -                                   Ad esempio, se si sta visualizzando i commenti su un record Organizzazione, commenti aggiunti ai contatti correlate, Opportunities, Biglietti, .etc sarebbe anche essere visualizzati.", + 'LBL_ROLLUP_COMMENTS_INFO' => "Se Arrotolare è impostato su 'On', i commenti su record correlati verranno mostrati. +                                   Ad esempio, se si sta visualizzando i commenti su un record Azienda, commenti aggiunti ai contatti correlati, Opportunità , Ticket, ecc. saranno anche essere visualizzati.", 'LBL_ROLLUP_COMMENTS' => "Rollup Commenti", 'LBL_DOWNLOAD_FILE' => 'Scarica file', 'LBL_VIEW_FILE' => 'Leggi file', 'LBL_PREVIEW_NOT_AVAILABLE' => 'Anteprima non disponibile', - 'LBL_PREVIEW_SUPPORTED_FILES' => '<b> <strong> Tipi di file supportati: </strong> </b> <br> <b> file pdf </b> <br> <b> File di testo - </b> txt, csv, ics<br> <b> aperta Documento Files - </b> open documento di testo (odt), documento aperto foglio di calcolo (ods) e presentazione documento aperto (ODP) <br> <b> file multimediali - </b> file di immagini, audio e video <br>', - 'Mailing Address' => 'Indirizzo Postale', + 'LBL_PREVIEW_SUPPORTED_FILES' => '<b> <strong> Tipi di file supportati: </strong> </b> <br> <b> file pdf </b> <br> <b> File di testo - </b> txt, csv, ics<br> <b> aperta Documento Files - </b> open document testo (odt), open document foglio di calcolo (ods) e open document presentazione (odp) <br> <b> file multimediali - </b> file di immagini, audio e video <br>', + 'Mailing Address' => 'Indirizzo di posta', 'Other Address' => 'Altro indirizzo', 'LBL_PREVIOUS' => 'Precedente', 'LBL_NEXT' => 'Il Prossimo', @@ -796,25 +796,25 @@ $languageStrings = array( 'Primary Twitter' => 'Twitter primaria', 'Engagement Score' => 'Engagement Score' , - 'Click Count' => 'Clicca Conte' , + 'Click Count' => 'Clicca Conta' , // Extensions 'LBL_SYNC_LOG' => 'Sync Log', 'LBL_SYNC_SETTINGS' => 'Impostazioni di sincronizzazione', - 'LBL_SYNC_NOW' => 'Sync Now', + 'LBL_SYNC_NOW' => 'Sync Ora', 'LBL_DATE' => 'Data', 'LBL_TIME' => 'Tempo', 'LBL_SKIPPED' => 'Saltato', 'vt_create' => 'Vtiger Creato', 'vt_update' => 'Vtiger Aggiornato', - 'vt_delete' => 'Vtiger Deleted', + 'vt_delete' => 'Vtiger Cancellato', 'vt_skip' => 'Vtiger Saltato', 'app_create' => 'Applicazione Creato', 'app_update' => 'Applicazione Aggiornato', - 'app_delete' => ' Applicazione Deleted', - 'app_skip' => 'Applicazione Saltato', + 'app_delete' => ' Applicazione Cancellata', + 'app_skip' => 'Applicazione Saltata', 'LBL_DOWNLOAD_AS_CSV' => 'Scarica Come Csv', - 'LBL_SOURCE_MODULE' => 'Modulo Fonte', - 'LBL_RECORD_NAME' => 'Registra nome', + 'LBL_SOURCE_MODULE' => 'Modulo Origine', + 'LBL_RECORD_NAME' => 'Record Nome', 'LBL_REASON' => 'Motivo', 'LBL_SELECT_MODULES_TO_SYNC' => 'Selezionare i moduli da sincronizzare', 'LBL_DATA' => 'Dati', @@ -840,15 +840,15 @@ $languageStrings = array( 'LBL_SHOW_MAP'=>'Visualizza Mappa', 'LBL_LINKED' => 'Collegati', - 'LBL_ADDING_NEW' => 'L\'aggiunta di nuovi', + 'LBL_ADDING_NEW' => 'Aggiungi Nuovi', 'LBL_LESS' => 'Meno', 'LBL_COMMENT' => 'Commento', 'LBL_NOT_STARRED' => 'Seguire', - 'LBL_QUICK_VIEW' => 'Quick View', + 'LBL_QUICK_VIEW' => 'Vista rapdida', 'LBL_NOTIFICATION_CENTER' => 'Il Centro Di Notifica', 'LBL_NOTIFICATION' => 'Notifica', - 'LBL_STARRED_RECORD_TO' => '%sa%s', - 'LBL_STARRED_RECORD_UPDATED' => '%s aggiornato%s', + 'LBL_STARRED_RECORD_TO' => '%s a %s', + 'LBL_STARRED_RECORD_UPDATED' => '%s aggiornato %s', 'LBL_EDIT_REASON' => 'Modifica ragione', 'LBL_CONTACT' => 'GESTIONE DEI CONTATTI', 'LBL_NO_ATTACHMENTS' => 'Allegati', @@ -862,7 +862,7 @@ $languageStrings = array( 'LBL_SAME_TAG_EXISTS' => 'Tag duplicato esiste', 'LBL_MAKE_PUBLIC' => 'Rendere Pubbliche', 'LBL_PROFILE_PASSWORD' => 'Profilo / Password', - 'LBL_CANT_MOVE_FROM_PUBLIC_TO_PRIVATE' => 'Non in grado di spostarsi da Pubbliche tag Privato tag.', + 'LBL_CANT_MOVE_FROM_PUBLIC_TO_PRIVATE' => 'Non in grado di spostare da tag Pubbliche a tag Private.', 'LBL_EDIT_TAG' => 'Modifica Tag', 'LBL_NO_TAG_EXISTS' => 'Tag Non Esiste', 'LBL_HISTORY' => 'I punti di contatto', @@ -875,12 +875,12 @@ $languageStrings = array( 'Add Note' => 'Aggiungi Documento', 'LBL_form' => 'da', 'LBL_to' => 'per', - 'LBL_DAY(S' => 'giorno(s', - 'LBL_HOUR(S' => 'ore(s', + 'LBL_DAY(S' => 'giorno/i', + 'LBL_HOUR(S' => 'ore', 'SINGLE_Users' => 'Utente', 'LBL_NOTEPAD' => 'Il blocco note', - 'LBL_NOTEPAD_NAME' => 'Blocco Note Nome', - 'LBL_NOTEPAD_CONTENT' => 'Il Blocco Note Di Contenuto', + 'LBL_NOTEPAD_NAME' => 'Nome Blocco Note', + 'LBL_NOTEPAD_CONTENT' => 'Contenuto Blocco Note', 'LBL_LAST_SAVED_ON' => 'Salvato in', 'Notebook' => 'Il blocco note', 'LBL_MY' => 'Il mio', @@ -904,26 +904,26 @@ L\'altro record sarà eliminato, ma le relative informazioni verranno unite.', 'LBL_MERGE_RECORDS_IN' => 'Unire I Record In', 'LBL_FIELDS' => 'Campi', 'LBL_RECORD' => 'Record', - 'LBL_NO_DUPLICATED_FOUND' => 'No duplicati trovato', - 'LBL_MERGE_SELECT' => 'Unire Selezionare', + 'LBL_NO_DUPLICATED_FOUND' => 'Non ho trovato duplicati', + 'LBL_MERGE_SELECT' => 'Unire Selezione', 'LBL_BACK_TO_PRODUCTS' => 'Torna ai prodotti', 'LBL_IGNORE_EMPTY_VALUES' => 'Ignorare i valori vuoti', 'LBL_MANAGE_USERS' => 'Gestire Gli Utenti', 'LBL_SELECT_RELATED_MODULES' => 'Selezionare I Moduli Correlati', 'LBL_ASSIGNED_TO' => 'Assegnato A', - 'LBL_LEFT_PANEL_SHOW_HIDE' => 'Il Pannello Di Sinistra Mostra/Nascondi', - 'LBL_PASSWORD_LINK_EXPIRED_OR_INVALID_PASSWORD' => 'Password link è scaduto oppure hai inserito la password non è valida', + 'LBL_LEFT_PANEL_SHOW_HIDE' => 'Mostra/Nascondi il Pannello Di Sinistra', + 'LBL_PASSWORD_LINK_EXPIRED_OR_INVALID_PASSWORD' => 'Password link scaduta oppure hai inserito una password non valida', 'SMSNotifier' => 'SMS Notifier', - 'LBL_NO_MORE_RESULTS' => 'Non più risultati!', + 'LBL_NO_MORE_RESULTS' => 'Nessun ulteriore risultato!', 'LBL_CLICK_TO_EDIT' => 'Fare clic per modificare', 'LBL_SIGNATURE_BLOCK' => 'Firma', 'LBL_BASIC_INFORMATION' => 'Informazioni Di Base', - 'LBL_PREF_RESET_MESSAGE' => 'Il destinatario preferenze e-mail è stato ripristinato!', - 'LBL_COMPANY_DETAILS' => 'Dettagli Di Società ', + 'LBL_PREF_RESET_MESSAGE' => 'Il destinatario predefinto e-mail è stato ripristinato!', + 'LBL_COMPANY_DETAILS' => 'Dettagli Azienda', 'COMPANY_LOGO_HELP_TEXT' => 'Si prega di caricare il tuo bel logo della società . <br>Oltre a mostrare il vostro logo aziendale sul CRM,<br> -il nome della società e indirizzo viene utilizzato in <br>Campagne di Email (richiesto per soddisfare span regolamenti<br> -e tra Virgolette.', - 'COMPANY_LOGO_HELP_TEXT_2' => 'È possibile modificare i dettagli dell\'azienda seguito da <br> +il nome della società e indirizzo viene utilizzato in <br>Campagne di Email (richiesto per soddisfare regolamenti spam<br> +e nelle citazioni.', + 'COMPANY_LOGO_HELP_TEXT_2' => 'È possibile modificare i dettagli dell\'azienda in seguito da <br> \'Impostazioni CRM > Modelli > Dettagli dell\'Azienda\' pagina', 'LBL_CHOOSE_PREFERENCES' => 'Scegliere le Preferenze', 'PREFERENCES_HELP_TEXT' => 'La Valuta di Base - Scegliere la valuta principale. Se si utilizzano più<br> @@ -935,22 +935,20 @@ Il Formato del numero di riferimenti vengono utilizzati per le Valute e altri <b numero di campi nel CRM<br> Puoi modificare le tue preferenze, seguito da \'Nome Utente > Preferenze"', 'LBL_CANNOT_BE_CHANGED_LATER' => 'Non può essere modificato successivamente', - 'IMPORT_CONTACTS_GOOGLE_HELP_TEXT' => 'Siamo in grado di portare contatti da Google e <br> è anche possibile abilitare la bi-direzione di sincronizzazione per mantenere il nostro<br> -Vtiger contatti e i contatti di Google(in gruppo selezionato aggiornato.<br> -Fare clic sul pulsante di autorizzazione e di ottenere Contatti da Google.', + 'IMPORT_CONTACTS_GOOGLE_HELP_TEXT' => 'Siamo in grado di portare contatti da Google e <br> è anche possibile abilitare la sincronizzazione bidirezionale per mantenere Sicronizzati i contatti VTiger e i contatti di Google (per i gruppi selezionati per l\'aggiornamento).<br> +<br>Fare clic sul pulsante di autorizzazione e per ottenere Contatti i da Google.', 'IMPORT_CONTACTS_CSV_HELP_TEXT' => 'È possibile importare i Contatti da file CSV.', - 'IMPORT_CONTACTS_CSV_HELP_TEXT2' => 'Per Importare Opportunità , Porta, Biglietti, si prega di guardare per Azioni > Importa pulsante qualsiasi del -elenco di punti di vista.', - 'LBL_DOEST_FIRST_ROW_HEADER' => 'Non prima riga del file contiene le intestazioni di colonna?', + 'IMPORT_CONTACTS_CSV_HELP_TEXT2' => 'Per Importare Opportunità , Lead, Ticket, si prega di guardare per Azioni > Importa pulsante qualsiasi dell\'elenco viste.', + 'LBL_DOEST_FIRST_ROW_HEADER' => 'La prima riga del file contiene le intestazioni di colonna?', 'LBL_SELECT_CSV_FILE' => 'Selezionare il file CSV', 'LBL_START_IMPORTING' => 'Avviare L\'Importazione', 'LBL_PRIMARY' => 'Primaria', - 'LBL_GOOGLE_SYNC_INTIATED_MSG' => 'L\'importazione è prevista, i Tuoi contatti saranno importati poco.<br> di Procedere al passo Successivo non interrompere l\'importazione.', - 'LBL_IMPORT_SYNC_INTIATED_MSG' => 'L\'importazione è in corso. Riceverai una mail quando l\'importazione è stata completata.<br> di Procedere al passo Successivo non interrompere l\'importazione.', + 'LBL_GOOGLE_SYNC_INTIATED_MSG' => 'L\'importazione è impostata, i Tuoi contatti saranno importati poco.<br> Per Procedere al passo Successivo non interrompere l\'importazione.', + 'LBL_IMPORT_SYNC_INTIATED_MSG' => 'L\'importazione è in corso. Riceverai una email quando l\'importazione è stata completata.<br> Per Procedere al passo Successivo non interrompere l\'importazione.', 'LBL_TELL_US_ABOUT_YOU' => 'Aiutaci raccontandoci la tua Azienda', 'TELL_US_ABOUT_YOU_HELP_TEXT' => 'Continuiamo a migliorare il CRM, e <br> -conoscere i nostri utenti meglio ci aiuterà priorità miglioramenti.', - 'TELL_US_ABOUT_YOU_HELP_TEXT_2' => 'I dati presentati qui non devono essere rivelati a nessuno <Br> +conoscere conoscere meglio i nostri utenti ci aiuta a dare priorità alle modifiche più importanti.', + 'TELL_US_ABOUT_YOU_HELP_TEXT_2' => 'I dati inviati qui non saranno rivelati a nessuno <Br> al di fuori di Vtiger.', 'LBL_IMPORT_CONTACTS' => 'Importare Contatti', 'LBL_FROM_GOOGLE' => 'Da Google', @@ -959,15 +957,15 @@ al di fuori di Vtiger.', 'LBL_PHONE_NUMBER' => 'Il Numero Di Telefono', 'LBL_NUMBER_OF_EMPLOYEES' => 'Numero di Dipendenti', 'LBL_INDUSTRY' => 'Settore', - 'LBL_HELP_DESK_EMAIL_HELP_TEXT' => 'Biglietto per le relative notifiche saranno inviate a questo indirizzo e-Mail', - 'LBL_SOCIAL_DETAILS' => 'Link a social network per trovare nuovi clienti e rispondere alle query', - 'LBL_SOCIAL_AUTHORIZE_HELP' => 'Collegare con i vostri companys account twitter per postare i tuoi messaggi e tenere traccia di fidanzamento', + 'LBL_HELP_DESK_EMAIL_HELP_TEXT' => 'Le notifiche relative al Ticket saranno inviate da questo indirizzo e-Mail', + 'LBL_SOCIAL_DETAILS' => 'Link a social network per trovare nuovi clienti e rispondere alle richieste', + 'LBL_SOCIAL_AUTHORIZE_HELP' => 'Collegare con i vostri account twitter dell\'Azienda per postare i tuoi messaggi e tenere traccia degli agganci', 'LBL_SOCIAL_AUTHORIZE' => 'Connettiti con Twitter', 'LBL_SOCIAL_LINKED' => 'Il Vtiger è ora collegato a', - 'LBL_ENTER_KEYWORDS_HELP' => 'Vtiger effettuerà una scansione twitter e trovare i messaggi con queste parole', + 'LBL_ENTER_KEYWORDS_HELP' => 'Vtiger effettuerà una scansione twitter per trovare i messaggi con queste parole', 'LBL_ENTER_KEYWORDS' => 'Immettere Le Parole Chiave', - 'LBL_ADD_CASE_CONTACT' => 'Aggiungi Case + Contatti', - 'LBL_VIEW_CASE' => 'Cassa Di Vista', + 'LBL_ADD_CASE_CONTACT' => 'Aggiungi Casi + Contatti', + 'LBL_VIEW_CASE' => 'Vista Casi', 'LBL_CLICK_HERE_TO_SELECT_ALL_RECORDS' => 'Selezionare tutti i record in questa pagina', 'LBL_CLICK_HERE_TO_MANAGE_LIST_COLUMNS' => 'Clicca qui per gestire le colonne dell\'Elenco di', 'LBL_SHOW_MORE' => 'Vedi di più', @@ -988,7 +986,7 @@ al di fuori di Vtiger.', 'LBL_ADD_TAB' => 'Aggiungi Scheda', 'LBL_TAB_NAME' => 'Scheda Nome', 'LBL_SHARED_TAGS_ACCESS' => 'Condiviso tag sono accessibili da tutti gli utenti in Vtiger', - 'LBL_GOTO_TAGS' => 'Vai a Impostazioni > preferenze > la Mia Tag per Modificare o Eliminare i tuoi tag privato', + 'LBL_GOTO_TAGS' => 'Vai a Impostazioni > preferenze > la Mia Tag per Modificare o Eliminare i tuoi tag privati', 'LBL_UNLINK' => 'Scollegare', 'LBL_SWITCH_TO_OLD' => 'Passare alla vecchia versione', 'LBL_CONFIG_COLUMNS' => 'Configurare Le Colonne', @@ -999,8 +997,8 @@ al di fuori di Vtiger.', 'LBL_CREATE_LIST' => 'Creare un Nuovo Elenco', 'sent' => 'Inviato', 'accepted' => 'Accettato', - 'LBL_RECENT_COMMENTS' => 'Recenti Commenti', - 'LBL_ENGAGEMENT_HISTORY' => 'Touchpoint Storia', + 'LBL_RECENT_COMMENTS' => 'Commenti Recenti', + 'LBL_ENGAGEMENT_HISTORY' => 'Touchpoint Storico', 'LBL_NO_ENGAGEMENTS_FOUND' => 'Non riguardanti i punti di Contatto', 'LBL_MARKETING' => 'MARKETING', 'LBL_SALES' => 'VENDITA', @@ -1074,133 +1072,133 @@ al di fuori di Vtiger.', 'LBL_CHART_VIEW' => 'Visualizzazione Del Grafico', - 'LBL_DAY(S)' => 'giorno(s)', - 'LBL_HOUR(S)' => 'ore(s)', + 'LBL_DAY(S)' => 'giorno/i', + 'LBL_HOUR(S)' => 'ora/e', 'LBL_SLA_INFORMATION' => 'SLA Informazioni', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Per utilizzare il <b>%s</b>, si consiglia di passare a nuovo look.', 'LBL_DELETE_USER_CONFIRMATION' => "Quando viene cancellato un utente, l'utente verrà contrassegnato come inattivo e non nuovi record possono essere assegnati all'Utente, e l'utente non sarà in grado di effettuare il login. Sei sicuro di voler eliminare?", 'LBL_DUPLICATES' => 'duplicati', - 'LBL_DUPLICATES_DETECTED' => 'Duplicate (s) rilevata!', - 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Questo%s non può essere salvato in quanto duplicato%s esiste in Vtiger con corrispondenti valori per%s.', + 'LBL_DUPLICATES_DETECTED' => 'Duplicato/i rilevati!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Questo %s non può essere salvato in quanto duplicato %s esiste in Vtiger con corrispondenti valori per %s.', 'LBL_VTIGER_NOTIFICATION' => 'Messaggio da: Vtiger Sistema Notifiche', - 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'La seguente%s non può essere salvato da "%s" del flusso di lavoro', - 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'La seguente%s non può essere salvato da "%s" modulo web', - 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'È possibile%s per modificare le regole di prevenzione duplicati.', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'La seguente %s non può essere salvato da "%s" del flusso di lavoro', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'La seguente %s non può essere salvato da "%s" modulo web', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'È possibile %s per modificare le regole di prevenzione duplicati.', 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => "Contattare l'amministratore per la revisione delle regole duplicati", - 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicate%s (s):', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicato/i %s :', ); $jsLanguageStrings = array( - 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', - 'JS_SMS_SERVER_CONFIGURATION' => 'Please configure your SMS notifier from the SMS notifier settings page', - 'JS_PLEASE_SELECT_ONE_RECORD' => 'Please select at least one record', - 'JS_PLEASE_ENTER_VALID_EMAIL_ADDRESS' => 'Please enter a valid email address', - 'JS_CONTAINS_ILLEGAL_CHARACTERS' => 'contains illegal characters' , - 'JS_PHONE_NUMBER_LENGTH_EXCEEDED' => 'phone number length exceeded limit', - 'JS_ACCEPT_POSITIVE_NUMBER' => 'accepts only positive values', - 'JS_VALUE_SHOULD_BE_GREATER_THAN_ZERO' => 'value should be greater than zero', - 'JS_NUMBER_SHOULD_BE_LESS_THAN_32' => 'Number should be less than 32', // TODO: Review - 'JS_PLEASE_ENTER_VALID_DATE' => 'Please Enter Valid Date' , // TODO: Review - 'JS_PLEASE_ENTER_VALID_TIME' => 'Please Enter Valid Time' , // TODO: Review - 'JS_INVALID_PAGE_NUMBER' => 'Invalid Page Number' , // TODO: Review - 'INVALID_NUMBER_OF' => 'Invalid number' , - 'INVALID_NUMBER' => 'Invalid number' , // TODO: Review - 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Are you sure that you want to delete?', - 'OVERWRITE_EXISTING_MSG1' => 'Overwrite the existing address with the selected address?', - 'OVERWRITE_EXISTING_MSG2' => 'Address Details' , - 'SINGLE_Accounts' => 'Organization' , - 'SINGLE_Contacts' => 'Contact' , + 'JS_EMAIL_SERVER_CONFIGURATION' => 'Configura il serve in uscita dalla pagina delle impostazioni', + 'JS_SMS_SERVER_CONFIGURATION' => 'Configura il tuo SMS notifier dalla pagina delle impostazioni del SMS Notifier', + 'JS_PLEASE_SELECT_ONE_RECORD' => 'Seleziona almeno un record', + 'JS_PLEASE_ENTER_VALID_EMAIL_ADDRESS' => 'Inserisce un indirizzo email valido', + 'JS_CONTAINS_ILLEGAL_CHARACTERS' => 'contiene caratteri illegali' , + 'JS_PHONE_NUMBER_LENGTH_EXCEEDED' => 'Il numero di telefono eccede il numero massimo di caratteri', + 'JS_ACCEPT_POSITIVE_NUMBER' => 'accetta solo valori positivi', + 'JS_VALUE_SHOULD_BE_GREATER_THAN_ZERO' => 'il valore deve essere maggiore di zero', + 'JS_NUMBER_SHOULD_BE_LESS_THAN_32' => 'Il numero dovrebbe essere minore di 32', // TODO: Review + 'JS_PLEASE_ENTER_VALID_DATE' => 'Inserisci una data valida' , // TODO: Review + 'JS_PLEASE_ENTER_VALID_TIME' => 'Inserisci un orario valido' , // TODO: Review + 'JS_INVALID_PAGE_NUMBER' => 'Numero di pagina non valido' , // TODO: Review + 'INVALID_NUMBER_OF' => 'Numero non valido' , + 'INVALID_NUMBER' => 'Numero non valido' , // TODO: Review + 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Sei sicuro che lo vuoi cancellare?', + 'OVERWRITE_EXISTING_MSG1' => 'Sovrascrivere l\'indirizzo esistente con l\'indirizzo selezionato?', + 'OVERWRITE_EXISTING_MSG2' => 'Dettagli Indirizzo' , + 'SINGLE_Accounts' => 'Azienda' , + 'SINGLE_Contacts' => 'Contatto' , 'LBL_DELETE_CONFIRMATION' => 'Sei sicuro di voler eliminare?', - 'LBL_MASS_DELETE_CONFIRMATION' => 'Are you sure you want to delete the selected Records?', - 'JS_LBL_SAVE' => 'Save' , - 'JS_LBL_CANCEL' => 'Cancel' , - 'SHOULD_BE_LESS_THAN_TODAY' => 'Must occur before today' , - 'JS_PLEASE_SELECT_ATLEAST_ONE_OPTION' => 'Please select atleast one option', - 'JS_SELECT_MODULE' => 'Please Select Module' , - 'JS_PLEASE_SELECT_ATLEAST_ONE_MANDATORY_FIELD' => 'Please select atleast one Mandatory Field', + 'LBL_MASS_DELETE_CONFIRMATION' => 'Sei sicuro di voler eliminare i record selezionati?', + 'JS_LBL_SAVE' => 'Salva' , + 'JS_LBL_CANCEL' => 'Annulla' , + 'SHOULD_BE_LESS_THAN_TODAY' => 'Deve avvenire prima di oggi' , + 'JS_PLEASE_SELECT_ATLEAST_ONE_OPTION' => 'Seleziona almeno un\'opzione', + 'JS_SELECT_MODULE' => 'Seleziona il modulo' , 'JS_PLEASE_ENTER_INTEGER_VALUE' => 'Please enter integer value' , - 'JS_PLEASE_ENTER_DECIMAL_VALUE' => 'Please enter decimal value' , + 'JS_PLEASE_SELECT_ATLEAST_ONE_MANDATORY_FIELD' => 'Seleziona almeno un campo obblligatorio', + 'JS_PLEASE_ENTER_DECIMAL_VALUE' => 'Inserire un valore decimale' , 'JS_PLEASE_ENTER_POSITIVE_DECIMAL_VALUE' => 'Inserisci il valore decimale positivo', - 'JS_SHOULD_BE_LESS_THAN_CURRENT_DATE' => 'should be less than Current Date', - 'JS_SHOULD_BE_GREATER_THAN_CURRENT_DATE' => 'should be greater than current date', + 'JS_SHOULD_BE_LESS_THAN_CURRENT_DATE' => 'dovrebbe essere prima della data corrente', + 'JS_SHOULD_BE_GREATER_THAN_CURRENT_DATE' => 'dovrebbe essere dopo la data corrente', 'JS_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO' => 'deve essere maggiore o uguale a', - 'JS_SHOULD_BE_LESS_THAN_OR_EQUAL_TO' => 'should be less than or equal to', // TODO: Review + 'JS_SHOULD_BE_LESS_THAN_OR_EQUAL_TO' => 'dovrebbe essere minore o uguale a', // TODO: Review 'JS_CURRENT_DATE' => 'Data corrente', - 'JS_PERCENTAGE_VALUE_SHOULD_BE_LESS_THAN_100' => 'Percentage value should be less than 100', // TODO: Review - 'JS_ACCEPT_ONLY_NUMBER' => 'Accepts only numbers' , // TODO: Review - 'JS_THIS_FILE_HAS_ALREADY_BEEN_SELECTED' => 'This File has already been selected', // TODO: Review - 'JS_MAX_FILE_UPLOAD_EXCEEDS' => 'max file Upload exceeds' , // TODO: Review - 'JS_THIS_DOCUMENT_HAS_ALREADY_BEEN_SELECTED' => 'This Document has already been attached', // TODO: Review - 'JS_FAILED_TO_SAVE' => 'Failed to save changes on server', - 'JS_IMPORT_FILE_CAN_NOT_BE_EMPTY' => 'Import File cannot be Empty' , - 'JS_PLEASE_SELECT_ONE_FIELD_FOR_MERGE' => 'Select at least one field for merge criteria', - 'JS_MAP_NAME_CAN_NOT_BE_EMPTY' => 'Map Name cannot be empty' , - 'JS_MAP_NAME_ALREADY_EXISTS' => 'Map Name already exists' , - 'JS_SELECT_FILE_EXTENSION' => 'Please select a file with the following extension:', - 'JS_UPLOADED_FILE_SIZE_SHOULD_BE_LESS_THAN' => 'Upload file size should be less than', // TODO: Review - 'JS_UPLOADED_FILE_SIZE_EXCEEDS' => 'Uploaded file size exceeds' , // TODO: Review - 'JS_PLEASE_SPLIT_FILE_AND_IMPORT_AGAIN' => 'Please split the file into smaller files and import again.', // TODO: Review - 'JS_FIELD_MAPPED_MORE_THAN_ONCE' => 'Field mapped more than once' , - 'JS_MAP_MANDATORY_FIELDS' => 'Please map mandatory fields' , - 'JS_PLEASE_ENTER_SOME_VALUE' => 'Please enter some value to search', - 'JS_YOU_CAN_SELECT_ONLY' => 'You can select only' , - 'JS_ITEMS' => 'items' , - 'JS_LBL_PERMISSION' => 'Permissions' , - 'JS_CHECK_FILE_INTEGRITY' => 'Check File Integrity' , - 'JS_DUPLICATE_RECORD' => 'Duplicate Record' , - 'JS_IS_ENABLED' => 'is enabled' , - 'JS_IS_DISABLED' => 'is disabled' , - 'JS_PLEASE_ENTER_SOME_TEXT_FOR_COMMENT' => 'Please enter some text for comment', - 'JS_LBL_COMMENT_VALUE_CANT_BE_EMPTY' => 'Comment value cannot be empty', - 'JS_REQUIRED_FIELD' => '* This field is required' , - 'JS_CAN_NOT_REMOVE_DEFAULT_WIDGET' => 'Cannot remove Default Widget', - 'JS_NO_CREATE_OR_NOT_QUICK_CREATE_ENABLED' => 'No create permissions or not enabled for quick create', - 'LBL_IMAGE_DELETED_SUCCESSFULLY' => 'Image Deleted Successfully' , - 'LBL_IMAGE_NOT_DELETED' => 'Image Not Deleted' , - 'LBL_YES' => 'Yes' , - 'LBL_NO' => 'nessun' , + 'JS_PERCENTAGE_VALUE_SHOULD_BE_LESS_THAN_100' => 'Il valore pecentuale dve essere meno di 100', // TODO: Review + 'JS_ACCEPT_ONLY_NUMBER' => 'Accetta solo numeri' , // TODO: Review + 'JS_THIS_FILE_HAS_ALREADY_BEEN_SELECTED' => 'Questo file è stato già selezionato', // TODO: Review + 'JS_MAX_FILE_UPLOAD_EXCEEDS' => 'supera il valore massimo per gli Upload dei file' , // TODO: Review + 'JS_THIS_DOCUMENT_HAS_ALREADY_BEEN_SELECTED' => 'Questo documento è già stato allegato', // TODO: Review + 'JS_FAILED_TO_SAVE' => 'Fallito il caricamento dei cambiamenti sul server', + 'JS_IMPORT_FILE_CAN_NOT_BE_EMPTY' => 'Il file da importare non può essere vuoto' , + 'JS_PLEASE_SELECT_ONE_FIELD_FOR_MERGE' => 'Seleziona almeno un campo per i criteri di unione', + 'JS_MAP_NAME_CAN_NOT_BE_EMPTY' => 'Il nome della mappatura non può essere vuoto' , + 'JS_MAP_NAME_ALREADY_EXISTS' => 'Il nome della mappature già esiste' , + 'JS_SELECT_FILE_EXTENSION' => 'Seleziona un file con la seguente estensione:', + 'JS_UPLOADED_FILE_SIZE_SHOULD_BE_LESS_THAN' => 'La dimensione del file deve essere inferiore a', // TODO: Review + 'JS_UPLOADED_FILE_SIZE_EXCEEDS' => 'La dimensione del file Caricato eccede' , // TODO: Review + 'JS_PLEASE_SPLIT_FILE_AND_IMPORT_AGAIN' => 'Dividi il file in diversi file più piccoli e importa nuovamente.', // TODO: Review + 'JS_FIELD_MAPPED_MORE_THAN_ONCE' => 'Campo è mappato più di una volta' , + 'JS_MAP_MANDATORY_FIELDS' => 'Per favore mappa i campi obbligatori' , + 'JS_PLEASE_ENTER_SOME_VALUE' => 'Inserisci qualche valore da cercare', + 'JS_YOU_CAN_SELECT_ONLY' => 'Puoi selezione solamente' , + 'JS_ITEMS' => 'prodotti' , + 'JS_LBL_PERMISSION' => 'Permessi' , + 'JS_CHECK_FILE_INTEGRITY' => 'Controlla integrità file' , + 'JS_DUPLICATE_RECORD' => 'Record duplicati' , + 'JS_IS_ENABLED' => 'è attivo' , + 'JS_IS_DISABLED' => 'non è attivo' , + 'JS_PLEASE_ENTER_SOME_TEXT_FOR_COMMENT' => 'Inserisci del testo per commento', + 'JS_LBL_COMMENT_VALUE_CANT_BE_EMPTY' => 'I commenti non possono essere vuoti', + 'JS_REQUIRED_FIELD' => '* Questo campo è obbligatorio' , + 'JS_CAN_NOT_REMOVE_DEFAULT_WIDGET' => 'Non posso rimuovere il widget default', + 'JS_NO_CREATE_OR_NOT_QUICK_CREATE_ENABLED' => 'Non hai permessi di creaziono o non è abilitata la creazione rapida', + 'LBL_IMAGE_DELETED_SUCCESSFULLY' => 'Immagine cancella con successo' , + 'LBL_IMAGE_NOT_DELETED' => 'Immagine non cancellata' , + 'LBL_YES' => 'Sì' , + 'LBL_NO' => 'No' , 'AM' => 'AM' , 'PM' => 'PM' , - 'JS_ERROR' => 'Error' , // TODO: Review - 'JS_INFORMATION' => 'Information' , // TODO: Review - 'JS_DO_NOT_HAVE_AN_EMAIL_ID' => 'does not have an email address', // TODO: Review - 'NONE_OF_THE_FIELD_VALUES_ARE_CHANGED_IN_MASS_EDIT' => 'None of the field values are changed in Mass Edit', // TODO: Review - 'JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS' => 'Please select an Organization to copy address', // TODO: Review - 'JS_PLEASE_SELECT_AN_CONTACT_TO_COPY_ADDRESS' => 'Please select a Contact to copy address', // TODO: Review - 'JS_SELECTED_ACCOUNT_DOES_NOT_HAVE_AN_ADDRESS' => 'Selected Organization does not contain address to copy', // TODO: Review - 'JS_SELECTED_CONTACT_DOES_NOT_HAVE_AN_ADDRESS' => 'Selected Contact does not contain address to copy', // TODO: Review - 'JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER' => 'Please enter Primary email address to enable portal user', // TODO: Review - 'JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS' => 'Primary email field does not exist to enable portal user', // TODO: Review - 'JS_PLEASE_ENTER_A_TAG' => 'Please enter a tag' , // TODO: Review - 'JS_TAG_NAME_ALREADY_EXIST' => 'Tag name already exist' , // TODO: Review - 'JS_MAX_TAG_LENGTH_EXCEEDS' => 'Tag length exceeds max size' , // TODO: Review - 'JS_NO_VIEW_PERMISSION_AFTER_SAVE' => 'You will not have permissions to view this record after save. Would you like to continue?', // TODO: Review - 'JS_NO_RECORDS_RELATED_TO_THIS_FILTER' => 'No Records Related to this Lista', // TODO: Review - 'JS_START_DATE_TIME' => 'Start Date & Time' , // TODO: Review - 'JS_END_DATE_TIME' => 'End Date & Time' , // TODO: Review - 'JS_POSTPONE' => 'Postpone' , // TODO: Review - 'JS_MESSAGE' => 'Message' , // TODO: Review + 'JS_ERROR' => 'Errore' , // TODO: Review + 'JS_INFORMATION' => 'Informazione' , // TODO: Review + 'JS_DO_NOT_HAVE_AN_EMAIL_ID' => 'non ha un indirizzo email', // TODO: Review + 'NONE_OF_THE_FIELD_VALUES_ARE_CHANGED_IN_MASS_EDIT' => 'Nessuno dei valori dei campi è stato modificato nella modifica di massa', // TODO: Review + 'JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS' => 'Seleziona un\'azienda per copiare l\'indirizzo', // TODO: Review + 'JS_PLEASE_SELECT_AN_CONTACT_TO_COPY_ADDRESS' => 'Seleziona un contatto per copiare l\'indirizzo', // TODO: Review + 'JS_SELECTED_ACCOUNT_DOES_NOT_HAVE_AN_ADDRESS' => 'L\'azienda selezionata non ha un indirizzo da copiare', // TODO: Review + 'JS_SELECTED_CONTACT_DOES_NOT_HAVE_AN_ADDRESS' => 'Il contatto selezionato non contiene un indirizzo da copiare', // TODO: Review + 'JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER' => 'Inserisci l\'email primaria per abilitare l\'utente al portale', // TODO: Review + 'JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS' => 'Il campo dell\'email primaria non esiste per poter abilitare l\'utente al portale', // TODO: Review + 'JS_PLEASE_ENTER_A_TAG' => 'Inserisci un tag' , // TODO: Review + 'JS_TAG_NAME_ALREADY_EXIST' => 'Il nome del Tag già esiste' , // TODO: Review + 'JS_MAX_TAG_LENGTH_EXCEEDS' => 'La lunghezza del Tag supera la lunghezza massima' , // TODO: Review + 'JS_NO_VIEW_PERMISSION_AFTER_SAVE' => 'Non avrai più i permessi di vedere il contatto dopo aver salvato. Vuoi continuare?', // TODO: Review + 'JS_NO_RECORDS_RELATED_TO_THIS_FILTER' => 'Nessun record collegato a questa Lista', // TODO: Review + 'JS_START_DATE_TIME' => 'Data e ora d\'inizio' , // TODO: Review + 'JS_END_DATE_TIME' => 'Data e ora finali' , // TODO: Review + 'JS_POSTPONE' => 'Posponi' , // TODO: Review + 'JS_MESSAGE' => 'Messaggio' , // TODO: Review 'JS_MASS_EDIT_LIMIT' => 'Operazione di modifica di massa può essere fatto su 500 o meno record contemporaneamente', - 'JS_SUCCESSFULLY_PINNED' => 'Shortcut added successfully' , // TODO: Review - 'JS_SUCCESSFULLY_UNPINNED' => 'Shortcut removed successfully', // TODO: Review - 'JS_SHORTCUT_ALREADY_ADDED' => 'This shortcut is already added', // TODO: Review - 'JS_MODULE_ENABLED' => 'Module Enabled' , // TODO: Review - 'JS_MODULE_DISABLED' => 'Module Disabled' , // TODO: Review - 'JS_VALUE_SHOULD_NOT_BE_LESS_THAN' => 'Frequency of any cron job configured should not be less than', // TODO: Review - 'JS_MINUTES' => 'mins' , // TODO: Review - 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Item Renamed Successfully' , // TODO: Review - 'JS_ITEM_ADDED_SUCCESSFULLY' => 'Item added Successfully' , // TODO: Review - 'JS_NO_ITEM_SELECTED' => 'No item Selected' , // TODO: Review - 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'More than one Item selected' , // TODO: Review - 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Items Deleted Successfully' , // TODO: Review - 'JS_DUPLICATE_ENTRIES_FOUND_FOR_THE_VALUE' => 'Duplicate entries found for the value', // TODO: Review - 'JS_USER_EXISTS' => 'User Already Exists',//TODO Review - 'JS_REENTER_PASSWORDS' => 'Renter Passwords',//TODO Review - 'LBL_SIGN_IN_AS_USER'=>'Logging in as another user will terminate the current session. Are you sure want to continue?', + 'JS_SUCCESSFULLY_PINNED' => 'Scorciatoia aggiunta con successo' , // TODO: Review + 'JS_SUCCESSFULLY_UNPINNED' => 'Scorciatoia rimossa con successo', // TODO: Review + 'JS_SHORTCUT_ALREADY_ADDED' => 'Questa scorciatoia già esiste', // TODO: Review + 'JS_MODULE_ENABLED' => 'Modulo Abilitato' , // TODO: Review + 'JS_MODULE_DISABLED' => 'Modulo Disabilitato' , // TODO: Review + 'JS_VALUE_SHOULD_NOT_BE_LESS_THAN' => 'La frequenza di ogni cron job dovrebbe essere non meno di', // TODO: Review + 'JS_MINUTES' => 'minuti' , // TODO: Review + 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Prodotto rinominato con successo' , // TODO: Review + 'JS_ITEM_ADDED_SUCCESSFULLY' => 'Prodotto aggiunto con successo' , // TODO: Review + 'JS_NO_ITEM_SELECTED' => 'Nessun prodotto selezionato' , // TODO: Review + 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'Selezionato più di un prodotto' , // TODO: Review + 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Prodotti cancellati con successo' , // TODO: Review + 'JS_DUPLICATE_ENTRIES_FOUND_FOR_THE_VALUE' => 'Trovate Voci duplicate per il valore', // TODO: Review + 'JS_USER_EXISTS' => 'Utente già esiste',//TODO Review + 'JS_REENTER_PASSWORDS' => 'Inserire nuovamente password',//TODO Review + 'LBL_SIGN_IN_AS_USER'=>'Entrare come un altro utente terminerà la sessione attuale. Sei sicuro che vuoi continuare?', //For PrintTemplates - 'JS_MAX_RECORDS_LIMIT' => 'Maximum Records for Print is :', //Todo Review - 'JS_NONE' => 'None', //Todo Review + 'JS_MAX_RECORDS_LIMIT' => 'Il massimo numero di record per stampare è:', //Todo Review + 'JS_NONE' => 'Nessuno', //Todo Review 'SINGLE_Vendors' => 'Fornitore' , //Feedback on removing old version 'JS_PLEASE_GIVE_YOUR_FEEDBACK' => 'Si prega di compilare il tuo feedback', @@ -1211,18 +1209,18 @@ $jsLanguageStrings = array( 'JS_PBX_OUTGOING_SUCCESS' => 'Sollevare il ricevitore di estensione per comporre il numero', 'JS_PBX_OUTGOING_FAILURE' => 'Chiamata non riuscita', 'JS_PBX_FILL_ALL_FIELDS' => 'Si prega di compilare tutti i campi', - 'JS_PBX_CAMPAIGN_NAME' => 'Campaign Name', - 'JS_PBX_CAMPAIGN_NUMBER' => 'Campaign Number', - 'JS_MIN_SEARCH_KEY_LENGTH' => 'Search Key should have aleast 3 characters', - 'JS_NO_MATCH' => 'No Matching Records Found', - 'JS_PBX_OUTGOING_CALL' => 'Outgoing Call', - 'JS_PBX_CALL_TO' => 'Call To', - 'JS_REQUIRED' => 'Required', - 'JS_PHONE_NUMBER' => 'Phone Number', - 'JS_NO_CREATE_PERMISSION' => 'Call need to be answered before creating record', + 'JS_PBX_CAMPAIGN_NAME' => 'Nome Campagna', + 'JS_PBX_CAMPAIGN_NUMBER' => 'numero Campagna', + 'JS_MIN_SEARCH_KEY_LENGTH' => 'La chiave di ricerca deve avere almeno 3 caratteri', + 'JS_NO_MATCH' => 'Nessun record che combaci è stato trovato', + 'JS_PBX_OUTGOING_CALL' => 'Telefonate in uscita', + 'JS_PBX_CALL_TO' => 'Telefonata a', + 'JS_REQUIRED' => 'Richiesto', + 'JS_PHONE_NUMBER' => 'Numero di telefono', + 'JS_NO_CREATE_PERMISSION' => 'La telefonata deve essere risposta prima di creare il record', 'JS_NO_EDIT_PERMISSION' => 'Non avete il permesso di modificare questo evento', - 'HelpDesk' => 'Tickets', - 'Potentials' => 'Opportunities', + 'HelpDesk' => 'I Ticket', + 'Potentials' => 'Opportunità ', //Google Synchronization 'SYNC_REMOVED_SUCCESSFULLY' => 'Sincronizzazione Google rimosso con successo.', @@ -1241,7 +1239,7 @@ $jsLanguageStrings = array( 'JS_RECORD_DELETED' => 'Record eliminato', 'JS_NO_DELETE_PERMISSION' => 'Nessun permesso di eliminazione', 'JS_CHANGES_WILL_BE_LOST' => 'Le tue modifiche andranno perse!', - 'JS_CONFIRM_MARK_AS_HELD' => 'Sei sicuro di voler marcare Evento / Todo come Held?', + 'JS_CONFIRM_MARK_AS_HELD' => 'Sei sicuro di voler marcare Evento / Da-fare come Held?', 'JS_TODO_MARKED_AS_COMPLETED' => 'Todo contrassegnato come Completato', 'JS_EVENT_MARKED_AS_HELD' => 'Evento contrassegnato come Held', 'JS_FUTURE_EVENT_CANNOT_BE_MARKED_AS_HELD' => 'Evento futuro non può essere contrassegnato come Held', @@ -1249,15 +1247,16 @@ $jsLanguageStrings = array( 'LBL_SMS_MAX_CHARACTERS_ALLOWED' => 'Massimo 160 caratteri sono consentiti per il messaggio di testo', 'JS_VIEWNAME_ALERT' => 'Massimo 40 caratteri sono consentiti per il nome del filtro', 'JS_EXCEEDS_MAX_UPLOAD_SIZE' => 'Superato dimensione massima di caricamento', - 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Non possiamo essere ritenuti Per Futuro', + 'JS_FUTURE_EVENT_CANNOT_BE_HELD' => 'Non possiamo essere Held Per Futuro', 'LBL_WARNING' => 'Avvertenza', 'DELETE_USER_PERMANENT_WARNING' => "L'eliminazione di un utente in modo permanente trasferirà tutti i record, inclusi commenti, e la storia di un nuovo utente.", 'JS_CLOSE' => 'Vicino', - 'JS_DECIMAL_SEPARATOR_AND_GROUPING_SEPARATOR_CANT_BE_SAME' => 'Decimale separator e raggruppamento separator cant be stesso', + 'JS_DECIMAL_SEPARATOR_AND_GROUPING_SEPARATOR_CANT_BE_SAME' => 'Separatore Decimali e separatore raggruppamento cifre non possono essere lo stesso carattere', // For Line Iteam Currency Symbol select while Import - 'JS_CURRENCY_TOOLTIP_CONTENT_TITLE' => 'Elementi pubblicitari valuta', - 'JS_CURRENCY_TOOLTIP_CONTENT_MESSAGE' => 'Per importare i valori di valuta in Voci, Vtiger utilizzerà questa impostazione per identificare la moneta. Tutti i valori di valuta al di fuori delle tabelle elementi di linea, vengono considerati in Utenti valuta preferita (selezionato in Preferenze)', - 'LBL_CANT_SELECT_CONTACT_FROM_LEADS' => 'Impossibile selezionare i contatti correlati per cavi', + 'JS_CURRENCY_TOOLTIP_CONTENT_TITLE' => 'Valuta dei prodotti nelle righe', + 'JS_CURRENCY_TOOLTIP_CONTENT_MESSAGE' => 'Per importare i valori di valuta nelle righe di prodotti, Vtiger utilizzerà questa impostazione per identificare la valuta. + Tutti i valori di valuta al di fuori della tabella prodotti, vengono considerati della valuta preferita dell\'Utente (impostato in Preferenze)', + 'LBL_CANT_SELECT_CONTACT_FROM_LEADS' => 'Impossibile selezionare i contatti correlati per i Lead', 'JS_FILE_NAME' => 'Nome file', 'JS_EXTERNAL_FILE_URL' => 'Url File', 'JS_PLEASE_SELECT_A_FILE' => 'Selezionare un file', @@ -1266,30 +1265,30 @@ $jsLanguageStrings = array( 'JS_PHONEFORMAT_ERROR' => 'Si prega di controllare il numero di telefono è in formato E.164 internatonal con \'+\' prefisso e il codice del paese Ex +1 415 599 2671', // Leads and Potentials Field Mapping - 'JS_NONE' => 'None' , // TODO: Review - 'JS_IS_ALREADY_BEEN_MAPPED' => 'is already been mapped' , // TODO: Review - 'JS_CANT_MAP' => 'Cant map' , // TODO: Review - 'JS_WITH' => 'with' , // TODO: Review - 'JS_MAPPING_DELETED_SUCCESSFULLY' => 'Mapping Deleted Successfully', // TODO: Review - 'JS_phone' => 'Phone' , // TODO: Review - 'JS_picklist' => 'Pick List' , // TODO: Review + 'JS_NONE' => 'Nessuno' , // TODO: Review + 'JS_IS_ALREADY_BEEN_MAPPED' => 'è già stato mappato' , // TODO: Review + 'JS_CANT_MAP' => 'Non è possibile mappare' , // TODO: Review + 'JS_WITH' => 'con' , // TODO: Review + 'JS_MAPPING_DELETED_SUCCESSFULLY' => 'Mappatura cancellata con succcesso', // TODO: Review + 'JS_phone' => 'Telefono' , // TODO: Review + 'JS_picklist' => 'Menu a tendina' , // TODO: Review 'JS_email' => 'Email' , // TODO: Review - 'JS_text' => 'String' , // TODO: Review - 'JS_currency' => 'Currency' , // TODO: Review - 'JS_multiSelectCombo' => 'Multi-Select Combo Box' , // TODO: Review - 'JS_time' => 'Time' , // TODO: Review - 'JS_textArea' => 'Text Area' , // TODO: Review + 'JS_text' => 'Stringa di testo' , // TODO: Review + 'JS_currency' => 'Valuta' , // TODO: Review + 'JS_multiSelectCombo' => 'Lista di scelta multipla' , // TODO: Review + 'JS_time' => 'Tempo' , // TODO: Review 'JS_url' => 'Url' , // TODO: Review - 'JS_string' => 'String' , // TODO: Review - 'JS_checkBox' => 'Check Box' , // TODO: Review - 'JS_date' => 'Date' , // TODO: Review - 'JS_decimal' => 'Decimal' , // TODO: Review - 'JS_percent' => 'Percent' , // TODO: Review + 'JS_textArea' => 'Area di testo' , // TODO: Review + 'JS_string' => 'Stringa di testo' , // TODO: Review + 'JS_checkBox' => 'Casella di controllo' , // TODO: Review + 'JS_date' => 'Data' , // TODO: Review + 'JS_decimal' => 'Decimale' , // TODO: Review + 'JS_percent' => 'Percento' , // TODO: Review 'JS_skype' => 'Skype' , // TODO: Review - 'JS_None' => 'None' , // TODO: Review - 'JS_integer' => 'Integer' , + 'JS_None' => 'Nessuno' , // TODO: Review + 'JS_integer' => 'Intero' , 'JS_double' => 'decimale' , - 'JS_reference' => 'reference' , + 'JS_reference' => 'riferimento' , 'JS_image' => 'Immagine', // AutoFill Overwriting message @@ -1308,28 +1307,28 @@ $jsLanguageStrings = array( 'JS_DEMO_DATA_ADDED' => 'Dati demo aggiunti a tutti i moduli.', 'JS_DEMO_DATA_CLEARED' => 'Dati demo eliminato da tutti i moduli.', 'JS_HOME_DASH_BOARD_CLEAR_INFO'=>'Nota: è possibile riattivare i dati demo da.', - 'JS_SETTINGS_PATH'=>'Impostazioni> Altre impostazioni> Configuration Editor.', - 'JS_DIRECTORY_IS_EMPTY' => 'Directory è vuoto', - 'JS_PLEASE_SELECT_AN_RELATED_TO_COPY_ADDRESS' => "Seleziona un modulo Piombo / Contatti copiare l'indirizzo", - 'SINGLE_Leads' => 'Piombo', - 'JS_SELECTED_LEAD_DOES_NOT_HAVE_AN_ADDRESS' => "Piombo selezionato non contiene l'indirizzo da copiare", + 'JS_SETTINGS_PATH'=>'Impostazioni> Altre impostazioni> Edito configurazione.', + 'JS_DIRECTORY_IS_EMPTY' => 'Directory è vuota', + 'JS_PLEASE_SELECT_AN_RELATED_TO_COPY_ADDRESS' => "Seleziona un modulo Lead / Contatti per copiare l'indirizzo", + 'SINGLE_Leads' => 'Lead', + 'JS_SELECTED_LEAD_DOES_NOT_HAVE_AN_ADDRESS' => "Lead selezionato non contiene l'indirizzo da copiare", 'JS_INVALID_EMAILS' => 'Messaggi di posta elettronica non validi', - 'JS_INTERNAL_COMMENT' => 'Commento interna', + 'JS_INTERNAL_COMMENT' => 'Commento interno', 'JS_INTERNAL_COMMENT_INFO' => 'Il commento sarà visibile solo dagli utenti CRM, se la casella commento interno è abilitato. Per informare i clienti (attraverso flussi di lavoro configurabili o portale clienti) lasciare questa casella di controllo disattivata', 'JS_NO_LINE_ITEM' =>'Elementi non possono essere vuoti.', //More currencies message 'JS_BASE_CURRENCY_CHANGED_TO_DISABLE_CURRENCY' => 'Valuta di Base deve essere cambiato per disabilitare ', - 'JS_INTERNAL_COMMENT' => 'Commento interna', + 'JS_INTERNAL_COMMENT' => 'Commento interno', 'JS_INTERNAL_COMMENT_INFO' => 'Il commento sarà visibile solo dagli utenti CRM, se la casella commento interno è abilitato. Per informare i clienti (attraverso flussi di lavoro configurabili o portale clienti) lasciare questa casella di controllo disattivata', 'JS_NO_TAXES_EXISTS' => 'Non esistono tasse', - 'JS_CONFIRM_TAXES_AND_CHARGES_REPLACE' => 'Vuoi aggiornare i valori fiscali e carica corrispondenti alla regione selezionata?', + 'JS_CONFIRM_TAXES_AND_CHARGES_REPLACE' => 'Vuoi aggiornare tasse e spese corrispondenti alla regione selezionata?', 'JS_PRINTTEMPLATEMODULE_DISABLED' => 'Modulo PrintTemplates è disabilitato. Impossibile eseguire l\'operazione', 'JS_SENT_FOR_SIGNATURE' => 'Inviata alla firma', 'JS_FAILED_TO_SEND_FOR_SIGNATURE' => 'Impossibile inviare per la firma', // Cron - 'JS_NONE_OF_THE_VALUES_ARE_CHANGED' => 'Nessuno dei valori sono cambiati', + 'JS_NONE_OF_THE_VALUES_ARE_CHANGED' => 'Nessuno dei valori è cambiato', 'JS_SUITABLE_VTIGER_FIELD_NOT_AVAILABLE_FOR_MAPPING' => 'Campo Vtiger Adatto non disponibile per la mappatura', 'JS_SAVED_SUCCESSFULLY' => 'Impostazioni salvato con successo', @@ -1359,13 +1358,13 @@ $jsLanguageStrings = array( 'JS_UNDO_RETWEET_SUCCESS_MSG' => 'UndoRetweet successo', 'JS_STATUS_UPDATE_SUCCESS_MSG' => 'Aggiornato con successo', 'JS_TWEET_DELETE_MSG' => 'Stato eliminato correttamente', - 'JS_INVALID_TWITTER_HANDLER_NAME' => 'Valido Nome Twitter Handler', + 'JS_INVALID_TWITTER_HANDLER_NAME' => 'Nome Twitter Handler non valido', 'JS_RELATION_ADDED_SUCESSFULLY' => 'Rapporto Aggiunto con successo', - 'JS_FAILED_TO_ADD_RELATION' => 'Impossibile aggiungere Relation', + 'JS_FAILED_TO_ADD_RELATION' => 'Impossibile aggiungere Relazione', 'JS_SOCIAL_POST_DELETE_CONFIRMATION' => 'Sei sicuro di voler cancellare?', - 'JS_EVENT_OR_TODO_ADDED_SUCCESS_MSG' => 'Evento / Todo aggiunto con successo', - 'JS_LEAD_ADDED_SUCCESS_MSG' => 'Piombo aggiunto correttamente', - 'JS_OPPORTUNITY_ADDED_SUCESS_MSG' => 'Opportunity ha aggiunto con successo', + 'JS_EVENT_OR_TODO_ADDED_SUCCESS_MSG' => 'Evento / Da-fare aggiunto con successo', + 'JS_LEAD_ADDED_SUCCESS_MSG' => 'Lead aggiunto correttamente', + 'JS_OPPORTUNITY_ADDED_SUCESS_MSG' => 'Opportunità aggiunta con successo', 'JS_TICKET_ADDED_SUCESS_MSG' => 'Ticket aggiunto correttamente', 'JS_LBL_GETTING_RECIPIENT_PREFS' => 'Ottenere le preferenze dei destinatari ..', @@ -1374,13 +1373,13 @@ $jsLanguageStrings = array( 'LBL_REMOVE_SYNC_CONFIRMATION' => 'Rimuove Autorizzazione contatti, calendari e-mail. Sei sicuro di voler rimuovere la sincronizzazione?', 'OFFICE365_SYNC_REMOVED_SUCCESSFULLY' => 'Office365 sync rimosso con successo', 'OFFICE365_REMOVE_SYNCHRONIZATION_MESSAGE' => "Cliccando su questo eliminerà autenticazione Office365 esistente. Non eliminerà tutti i record che sono già sincronizzati. Non sarà annullare l'app Vtiger da voi Office365 conto, per annullare la registrazione visitare il https://myapps.microsoft.com/", - 'JS_SELECT_OPTION' => 'Select an Option', + 'JS_SELECT_OPTION' => 'Seleziona un opzione', - 'JS_REMOVE_SYNC_CONFIRMATION' => 'Rimuovere la sincronizzazione rimuove solo l\'autenticazione esistenti, non eliminare i record sincronizzati. Se si sincronizza con lo stesso account Google di nuovo, verranno creati record duplicati. Sei sicuro di voler rimuovere la sincronizzazione?', - 'JS_PASSWORD_MISMATCH_ERROR' => 'Inserisci nuovamente le password. La "nuova password" e la "password conferma" valori non corrispondono.', - 'JS_COMMA_NOT_ALLOWED_USERS' => 'Caratteri speciali come ,"<> non sono ammessi nel Nome e Cognome.', + 'JS_REMOVE_SYNC_CONFIRMATION' => 'Rimuovere la sincronizzazione rimuove solo l\'autenticazione esistenti, non elimina i record sincronizzati. Se si sincronizza con lo stesso account Google di nuovo, verranno creati record duplicati. Sei sicuro di voler rimuovere la sincronizzazione?', + 'JS_PASSWORD_MISMATCH_ERROR' => 'Inserisci nuovamente le password. La "nuova password" e la "password conferma" non corrispondono.', + 'JS_COMMA_NOT_ALLOWED_USERS' => 'Caratteri speciali come ,">< non sono ammessi nel Nome e Cognome.', 'JS_LOADING_COMMENTS' => 'Recupero di commenti ...', - 'Payment Failure!' => 'Fallimento di pagamento!', + 'Payment Failure!' => 'Pagamento fallito!', 'We could not process the payment for your last invoice. Please update payment info to continue using the service without disruption.' => "Non siamo riusciti a elaborare il pagamento per l'ultima fattura . Si prega di aggiornare le informazioni di pagamento per continuare a utilizzare il servizio senza interruzioni .", 'For assistance, please send email to' => 'Per assistenza, si prega di inviare e-mail a', 'JS_MAX_ALLOWED_CHARACTERS' => 'Numero massimo di caratteri consentiti è', @@ -1391,10 +1390,10 @@ $jsLanguageStrings = array( 'JS_PLEASE_ENTER_VALID_VALUE' => 'Si prega di inserire un valore valido', 'JS_PLEASE_ENTER_VALID_TAG_NAME' => 'Si prega di inserire valido nome del tag', 'JS_TAG_SAVED_SUCCESSFULLY' => 'Tag Salvato Correttamente', - 'JS_SUBJECT_VALUE_CANT_BE_EMPTY' => 'Oggetto di valore non può essere vuoto', + 'JS_SUBJECT_VALUE_CANT_BE_EMPTY' => 'Oggetto non può essere vuoto', 'JS_PERCENTAGE_SHOULD_BE_LESS_THAN_100' => 'La percentuale dovrebbe essere meno di 100', - 'LBL_DELETE_USER_CONFIRMATION' => 'Quando un Utente viene eliminato, l\'utente verrà contrassegnato come "Inattivo" e non nuovi record può essere assegnato all\'Utente, e l\'utente non sarà in grado di effettuare il login. La fatturazione sarà la sosta per l\'utente.Se avete bisogno di riattivare un utente eliminato, è necessario inviare una email a support@vtiger.com.Are sei sicuro di voler eliminare?', - 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Organizzazione Nome Esiste già .Vuoi creare un record duplicato?', + 'LBL_DELETE_USER_CONFIRMATION' => 'Quando un Utente viene eliminato, l\'utente verrà contrassegnato come "Inattivo" e nuovi record non possono essere assegnato all\'Utente, e l\'utente non sarà in grado di effettuare il login. La fatturazione sarà bloccata per l\'utente.Se avete bisogno di riattivare un utente eliminato, è necessario inviare una email a support@vtiger.com. Sei sicuro di volerlo eliminare?', + 'JS_DUPLICATE_CREATION_CONFIRMATION' => 'Nome Azienda Esistente già . Vuoi creare un record duplicato?', 'JS_SELECT_RECORDS_TO_MERGE_FROM_SAME_GROUP' => 'È necessario selezionare i record all\'interno del medesimo gruppo per la fusione', 'JS_SELECT_ATLEAST_TWO_RECORD_FOR_MERGING' => 'Selezionare almeno due record per la fusione', 'JS_ALLOWED_TO_SELECT_MAX_OF_THREE_RECORDS' => 'Si è permesso di selezionare un massimo di tre record', @@ -1403,15 +1402,15 @@ $jsLanguageStrings = array( 'JS_TABS_LIMIT_EXCEEDED' => 'Ci dispiace! Non è possibile aggiungere più di 10 schede', 'JS_TOTAL_RECORDS' => 'Totale record', 'JS_PAGE_NOT_EXIST' => 'Pagina non esiste', - 'JS_YOU_ARE_IN_PAGE_NUMBER' => 'Si sono in numero di pagina', + 'JS_YOU_ARE_IN_PAGE_NUMBER' => 'Tu sei nel numero di pagina', 'JS_PLEASE_ENABLE_BASE_CURRENCY_FOR_PRODUCT' => 'Si prega di abilitare la valuta di base del prodotto', 'JS_PLEASE_SELECT_BASE_CURRENCY_FOR_PRODUCT' => 'Si prega di selezionare la valuta di base del prodotto', - 'JS_RECORDS_ARE_GETTING_DELETED' => 'I record sono sempre eliminato', + 'JS_RECORDS_ARE_GETTING_DELETED' => 'I record stanno per essere eliminati', 'JS_RECORD_GETTING_DELETED' => 'Record eliminato', 'JS_NO_RESULTS_FOUND' => 'Nessun Risultato', - 'JS_RECORDS TRANSFERRED SUCCESSFULLY' => 'Record di proprietà sono stati trasmessi con successo', + 'JS_RECORDS TRANSFERRED SUCCESSFULLY' => 'La proprietà dei Record trasferiti con successo', 'LBL_SEARCHING' => 'La ricerca in ', - 'JS_RECORDS_TRANSFERRED_SUCCESSFULLY' => 'Record di proprietà è trasferita con successo.', + 'JS_RECORDS_TRANSFERRED_SUCCESSFULLY' => 'La proprietà dei Record trasferiti con successo', 'JS_USER_DELETED_SUCCESSFULLY' => 'Utente eliminato con successo.', 'JS_TRY_LATER' => 'Si prega di riprovare più tardi!', 'JS_CANCEL_SUBSCRIPTION_CONFIRMATION' => 'Sei sicuro di voler annullare l\'ABBONAMENTO?', @@ -1445,7 +1444,7 @@ $jsLanguageStrings = array( 'JS_TODO_ADDED_SUCCESS_MSG' => 'Attività aggiunta con successo', 'JS_EVENT_ADDED_SUCCESS_MSG' => 'Evento aggiunto con successo', 'JS_ACTIVE' => 'Attivo', - 'JS_SNOOZED' => 'Snoozed', + 'JS_SNOOZED' => 'Rimandato', 'JS_INVALID_URL' => 'URL non valido', 'JS_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => 'Sei sicuro di voler eliminare?', 'JS_TAB_LABEL_EXCEEDS_CHARS' => 'Scheda di etichetta lunghezza deve essere inferiore a %s caratteri', @@ -1457,15 +1456,15 @@ $jsLanguageStrings = array( 'JS_SUBMIT' => 'Invia', 'JS_ADD_MAX_15_ITEMS' => 'È possibile aggiungere solo 15 articoli', 'SINGLE_SLA' => 'SLA', - 'JS_EDIT_FIELDS' => '%s Fields & Layout', - 'JS_MORE_VTIGER' => 'Ci sono più record per essere sincronizzati in vtiger', - 'JS_MORE_GOOGLE' => 'Ci sono più record per essere sincronizzati in Google', - 'JS_MORE_OFFICE365' => 'Ci sono più record per essere sincronizzati in Office365', - 'JS_TOKEN_EXPIRED' => 'Office365 di Autenticazione è scaduto. Fare clic su accedi con Office365 pulsante di ri-autorizzare.', + 'JS_EDIT_FIELDS' => '%s Campi e Aspetto', + 'JS_MORE_VTIGER' => 'Ci sono più record da sincronizzare in vtiger', + 'JS_MORE_GOOGLE' => 'Ci sono più record da sincronizzare in Google', + 'JS_MORE_OFFICE365' => 'Ci sono più record da sincronizzare in Office365', + 'JS_TOKEN_EXPIRED' => 'Autorizzazione Office365 scaduta. Fare clic su accedi con Office365 per ri-autorizzare.', 'JS_WISH_TO_PROCEED' => 'Sei sicuro di voler procedere?', 'JS_SWITCH_TO_OLD_LOOK_CONFIRMATION_MESSAGE' => 'Alcune caratteristiche, come le notifiche, selezione dei colori, seguire record, non sono disponibili nella versione precedente. Si può passare alla nuova versione, scegliendo nuova versione dal menu in alto a destra.', 'JS_PROCEED_OLD_VERSION' => 'Procedere alla vecchia versione', - 'JS_STAY_WITH_NEW_VERSION' => 'Soggiorno con la nuova versione', + 'JS_STAY_WITH_NEW_VERSION' => 'Rimani con la nuova versione', 'JS_AGO' => 'fa', 'JS_FROM_NOW' => 'da ora', 'JS_LESSTHAN_A_MINUTE' => 'meno di un minuto', @@ -1494,8 +1493,8 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Caricato con successo File', 'JS_UPLOAD_FAILED' => 'File Upload non riuscito', - 'JS_DUPLICATES_DETECTED' => 'Duplicate (s) rilevata!', + 'JS_DUPLICATES_DETECTED' => 'Duplicato/i rilevati!', 'JS_PASSWORD_MISMATCH_ERROR' => 'Si prega di inserire nuovamente le password. La "nuova password" e "password conferma" valori non corrispondono.', 'JS_LIST_DELETE_CONFIRMATION' => 'Sei sicuro di voler eliminare?', 'JS_WIDGET_RESIZING_WAIT_MSG' => 'contenuti Widget caricheranno dopo il ridimensionamento.', -); \ No newline at end of file +); diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Webservices.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Webservices.php index f8f2870aa2458823b4f49ab4bd8ac318471d6736..a7e92286e90cf0015406226c64f1625fd5d7315b 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Webservices.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Webservices.php @@ -9,14 +9,14 @@ * All Rights Reserved. * *********************************************************************************** */ $languageStrings = array( - 'Invalid value given for old password.' => 'Valore non valido per la data vecchia password.', + 'Invalid value given for old password.' => 'Valore non valido per la vecchia password.', "New Password and confirm password don't match" => 'Nuova Password e Conferma password non corrispondono', 'Database error while performing requested operation' => "Errore di database durante l'esecuzione dell'operazione richiesta", 'Failed to change password' => 'Impossibile cambiare la password', - 'LBL_INVALID_OLD_PASSWORD' => 'Valore non valido dato per la vecchia password.', + 'LBL_INVALID_OLD_PASSWORD' => 'Valore non valido per la vecchia password.', 'LBL_NEW_PASSWORD_MISMATCH' => 'Nuova Password e conferma Password non corrispondono', - 'LBL_DATABASE_QUERY_ERROR' => 'Database di errore durante l\'operazione richiesta', + 'LBL_DATABASE_QUERY_ERROR' => 'Errore Database durante l\'operazione richiesta', 'LBL_CHANGE_PASSWORD_FAILURE' => 'Non è riuscito a cambiare la password', ); diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/manifest.xml b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/manifest.xml index 1e309fd04e6175980ce544ff3cdf05f682ba32cb..a477fd2e9ae58d3cff55b03c25591939927f8f09 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/manifest.xml +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/manifest.xml @@ -4,9 +4,9 @@ <name>Mexican Spanish</name> <label>ES Mexico</label> <prefix>es_mx</prefix> - <version>7.1</version> + <version>7.2.1</version> <dependencies> - <vtiger_version>7.1</vtiger_version> + <vtiger_version>7.2</vtiger_version> <vtiger_max_version>7.*</vtiger_max_version> </dependencies> <license> @@ -19,7 +19,7 @@ * the specific language governing rights and limitations under the License. ******************************************************************************** * Language : Español es_mx - * Version : 5.4.0RC + * Version : 7.2.1 * Author : Aimée Valckx - simplesistemas.com (Simple - Sistemas e Implementos Empresariales SA de CV) * Author : Rubén Estrada - simplesistemas.com (Simple - Sistemas e Implementos Empresariales SA de CV) * Author : Francisco Hernandez Odin Consultores S de RL de CV diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Accounts.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Accounts.php index 87dc0fde1ce9f3f284e1d87d0ecc4cd0418eaa35..b18f7fa1469a7f5a6e6dbaa928718de9e813d2d7 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Accounts.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Accounts.php @@ -16,14 +16,14 @@ $languageStrings = array( 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Mostrar jerarquÃa de Cuentas', 'industry' => 'Actividad' , 'Account Name' => 'Nombre de la Cuenta' , - 'Account No' => 'Núm. Cuenta' , + 'Account No' => 'Id Cuenta' , 'Website' => 'Página Web' , 'Ticker Symbol' => 'Código bursátil' , 'Member Of' => 'Miembro de' , - 'Employees' => 'Empleados' , + 'Employees' => 'Número de empleados' , 'Ownership' => 'Propietario' , 'SIC Code' => 'RFC' , - 'Other Email' => 'Otro correo' , + 'Other Email' => 'Correo adicional' , 'Analyst' => 'Analista' , 'Competitor' => 'Competencia' , 'Customer' => 'Cliente' , @@ -36,14 +36,16 @@ $languageStrings = array( 'LBL_START_DATE' => 'Inicio' , 'LBL_END_DATE' => 'Vencimiento' , 'LBL_DUPLICATES_EXIST' => 'El nombre de esta Cuenta ya existe', - 'LBL_COPY_SHIPPING_ADDRESS' => 'Copiar dirección de envÃo' , - 'LBL_COPY_BILLING_ADDRESS' => 'Copiar dirección de facturación' , + 'LBL_COPY_SHIPPING_ADDRESS' => 'Copiar desde dirección de envÃo' , + 'LBL_COPY_BILLING_ADDRESS' => 'Copiar desde dirección de facturación' , 'LBL_IMAGE_INFORMATION' => 'Foto de perfil', 'Organization Image' => 'Imagen de la Cuenta', + 'Prospect Accounts' => 'Cuentas Prospecto', + 'New This Week' => 'Nuvas de la semana', - 'Other Phone' => 'Teléfono secundario', - 'Phone' => 'Teléfono principal', - 'Email' => 'Correo electrónico principal', + 'Other Phone' => 'Tel. adicional', + 'Phone' => 'Tel. principal', + 'Email' => 'Correo', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Assets.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Assets.php index d44b335855681be406480fbd7c5ebd2e1876ea93..116869471ba4791b17c6718f03a09c1a89b41ead 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Assets.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Assets.php @@ -16,15 +16,16 @@ $languageStrings = array( 'Serial Number' => 'Número de serie' , 'Date Sold' => 'Fecha de venta' , 'Date in Service' => 'Fecha de instalación' , - 'Tag Number' => 'Etiquetado' , - 'Invoice Name' => 'Factura relacionada' , + 'Tag Number' => 'Número de etiqueta' , + 'Invoice Name' => 'Factura' , 'Shipping Method' => 'Forma de envÃo' , 'Shipping Tracking Number' => 'Número de seguimiento de envÃo' , 'Asset Name' => 'Nombre del Activo' , - 'Customer Name' => 'Instalado en' , + 'Customer Name' => 'Cuenta' , 'Notes' => 'Notas' , 'In Service' => 'En servicio' , 'Out-of-service' => 'Fuera de servicio' , + 'All' => 'Todos', 'Assets' => 'Activos', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php index a3bd81e0a25167a6902ed076fdccc42887a29a07..849ec7cf451743e6cf29597245bc1dfc1b7606ac 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php @@ -29,8 +29,8 @@ $languageStrings = array( 'Start Date & Time' => 'Fecha y hora de inicio' , 'Activity Type' => 'Tipo de tarea' , 'Send Notification' => 'Enviar notificación' , - 'Location' => 'Localización' , - 'End Date & Time' => 'Fecha y hora de término' , + 'Location' => 'Ubicación' , + 'End Date & Time' => 'Fecha y hora de fin' , 'Visibility' => 'Visibilidad', 'Recurrence' => 'Recurrencia', 'Private' => 'Privado', @@ -47,8 +47,8 @@ $languageStrings = array( 'Pending Input' => 'Pendiente de datos' , 'Not Started' => 'No iniciada' , 'Deferred' => 'Retrasado' , - 'Held' => 'Mantenida', - 'Not Held' => 'No mantenida', + 'Held' => 'Realizada', + 'Not Held' => 'No realizada', 'Medium' => 'Medio' , 'LBL_CHANGE_OWNER' => 'Modificar propietario' , 'LBL_EVENT' => 'Evento' , @@ -92,7 +92,7 @@ $languageStrings = array( 'LBL_DETAILS_STRING' => 'Los detalles son', 'LBL_CREATED' => 'creado', 'LBL_UPDATED' => 'actualizado', - 'Due Date' => 'Fecha de término', + 'Due Date' => 'Fecha de fin', 'Priority' => 'Prioridad', 'Related To' => 'Relacionado con', 'LBL_CONTACT_LIST' => 'Lista de contactos', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Campaigns.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Campaigns.php index 62c4644ab244147f9d16805be911fb36e67e4a80..2e2d9fb39074e445c36340359e7aa26d4eeb9ec4 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Campaigns.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Campaigns.php @@ -15,7 +15,7 @@ $languageStrings = array( 'LBL_CAMPAIGN_INFORMATION' => 'Información de campaña' , 'LBL_EXPECTATIONS_AND_ACTUALS' => 'Expectativas y Reales' , 'Campaign Name' => 'Nombre de campaña' , - 'Campaign No' => 'Núm. de campaña' , + 'Campaign No' => 'Id Campaña' , 'Campaign Type' => 'Tipo de campaña' , 'Product' => 'Producto' , 'Campaign Status' => 'Estado de la campaña' , diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Contacts.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Contacts.php index 337a97c928712708497a0e235fcc5a6017dd034a..4cbc8e9342167c3d50d1e1ebcd9b0fc09952ad51 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Contacts.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Contacts.php @@ -13,33 +13,34 @@ $languageStrings = array( 'LBL_ADD_RECORD' => 'Agregar Contacto' , 'LBL_RECORDS_LIST' => 'Lista de Contactos' , 'LBL_CONTACT_INFORMATION' => 'Datos personales' , - 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Información del Cliente' , - 'LBL_IMAGE_INFORMATION' => 'Información de la foto del Contacto:', - 'LBL_COPY_OTHER_ADDRESS' => 'Copiar dirección alternativa' , - 'LBL_COPY_MAILING_ADDRESS' => 'Copiar dirección de envÃo' , // - 'Office Phone' => 'Tel. Empresa' , - 'Home Phone' => 'Tel. Particular' , + 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Acceso a Portal de Clientes' , + 'LBL_IMAGE_INFORMATION' => 'Foto del Contacto:', + 'LBL_COPY_OTHER_ADDRESS' => 'Copiar desde dirección otra' , + 'LBL_COPY_MAILING_ADDRESS' => 'Copiar desde dirección de envÃo' , // + 'Office Phone' => 'Tel. empresa' , + 'Home Phone' => 'Tel. casa' , + 'Other Phone' => 'Tel. otro', + 'Assistant Phone' => 'Tel. de asistente' , 'Title' => 'Cargo' , 'Department' => 'Departamento' , 'Birthdate' => 'Fecha de nacimiento' , 'Reports To' => 'Informa a' , 'Assistant' => 'Asistente' , - 'Assistant Phone' => 'Teléfono del o la asistente' , 'Do Not Call' => 'No llamar por teléfono' , 'Reference' => 'Referencias' , - 'Portal User' => 'Usuario del portal' , - 'Mailing Street' => 'Dirección (Factura)' , - 'Mailing City' => 'Deleg./Mpio. (Factura)' , - 'Mailing State' => 'Estado (Factura)' , - 'Mailing Zip' => 'Código postal (Factura)' , - 'Mailing Country' => 'PaÃs (Factura)' , - 'Mailing Po Box' => 'Colonia (Factura)' , - 'Other Street' => 'Dirección (EnvÃo)' , - 'Other City' => 'Deleg./Mpio. (EnvÃo)' , - 'Other State' => 'Estado (EnvÃo)' , - 'Other Zip' => 'Código postal (EnvÃo)' , - 'Other Country' => 'PaÃs (EnvÃo)' , - 'Other Po Box' => 'Colonia (EnvÃo)' , + 'Portal User' => 'Acceso a portal clientes' , + 'Mailing Street' => 'Dirección (EnvÃo)' , + 'Mailing City' => 'Municipio/AlcaldÃa (EnvÃo)' , + 'Mailing State' => 'Estado (EnvÃo)' , + 'Mailing Zip' => 'Código postal (EnvÃo)' , + 'Mailing Country' => 'PaÃs (EnvÃo)' , + 'Mailing Po Box' => 'Colonia (EnvÃo)' , + 'Other Street' => 'Dirección (Otra)' , + 'Other City' => 'Municipio/AlcaldÃa (Otra)' , + 'Other State' => 'Estado (Otra)' , + 'Other Zip' => 'Código postal (Otra)' , + 'Other Country' => 'PaÃs (Otra)' , + 'Other Po Box' => 'Colonia (Otra)' , 'Contact Image' => 'Imagen del Contacto' , 'Mr.' => 'Sr.' , 'Ms.' => 'Sra.' , @@ -47,14 +48,16 @@ $languageStrings = array( 'Dr.' => 'Dr.' , 'Prof.' => 'Prof.' , 'User List' => 'Lista de Usuarios' , - 'Contact Id' => 'Id del Contacto', - 'Support Start Date' => 'Fecha de inicio del Soporte' , - 'Support End Date' => 'Fecha de término del Soporte', + 'Contact Id' => 'Id Contacto', + 'Support Start Date' => 'Fecha inicio de soporte' , + 'Support End Date' => 'Fecha fin de soporte', 'LBL_TRANSACTIONS' => 'Transacciones', - - 'Other Phone' => 'Teléfono secundario', - 'Email' => 'Correo electrónico principal', - 'Secondary Email' => 'Correo electrónico secundario', + 'Todays Birthday' => 'Con cumpleaños hoy', + 'Contacts Address' => 'Dirección del Contacto', + 'All' => 'Todos', + + 'Email' => 'Correo', + 'Secondary Email' => 'Correo adicional', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Events.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Events.php index aae2f067aadb44a47e287ed254184155c7c11a11..ecf63b6cf769143b08a52c62d416bf004e2208bd 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Events.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Events.php @@ -17,15 +17,15 @@ $languageStrings = array( 'LBL_HOLD_FOLLOWUP_ON' => 'Mantenga el seguimiento en' , 'LBL_CREATE_FOLLOWUP_EVENT' => 'Crear evento de seguimiento', 'LBL_EVENT_INFORMATION' => 'Detalle del evento' , - 'LBL_RECURRENCE_INFORMATION' => 'Detalles de recurrencia' , + 'LBL_RECURRENCE_INFORMATION' => 'Recurrencia' , 'LBL_RELATED_TO' => 'Relacionado con' , 'Start Date & Time' => 'Fecha y hora de inicio' , 'Recurrence' => 'Recurrencia' , 'Send Notification' => 'Enviar notificación' , 'Location' => 'Lugar' , 'Send Reminder' => 'Enviar recordatorio' , - 'End Date & Time' => 'Fecha y hora de vencimiento' , - 'End Date' => 'Fecha y hora de vencimiento' , + 'End Date & Time' => 'Fecha y hora de fin' , + 'End Date' => 'Fecha de fin' , 'Activity Type' => 'Tipo de actividad' , 'Visibility' => 'Visibilidad' , 'Private' => 'Privado' , @@ -33,8 +33,8 @@ $languageStrings = array( 'Call' => 'Llamada' , 'Meeting' => 'Reunión' , 'Planned' => 'Planeada' , - 'Held' => 'Mantenida' , - 'Not Held' => 'No Mantenida' , + 'Held' => 'Realizada' , + 'Not Held' => 'No realizada' , 'Related To' => 'En relación con' , 'LBL_DAYS' => 'DÃas' , 'LBL_HOURS' => 'Horas' , diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Faq.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Faq.php index d503afe6937fcf8fa8fc09be1c833eef5ddcfb52..d7d1f753b93bd52c721bc397a8b13a432c220017 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Faq.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Faq.php @@ -17,10 +17,13 @@ $languageStrings = array( 'Question' => 'Pregunta' , 'Answer' => 'Respuesta' , 'Comments' => 'Comentarios' , - 'Faq No' => 'Núm. de FAQ' , + 'Faq No' => 'Id FAQ' , 'General' => 'General' , 'Draft' => 'Borrador' , 'Published' => 'Publicada' , + 'Reviewed' => 'Revisada' , 'Obsolete' => 'Obsoleta' , 'LBL_SOLUTION' => 'Solución' , + 'Drafted FAQ' => 'FAQs en borrador', + 'Published FAQ' => 'FAQs publicadas' ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/HelpDesk.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/HelpDesk.php index 45434f4659a7ca8a5f12f50c1d1612614cb4af9d..2b757802e604484d0655ed48cae9b9cb1a37c173 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/HelpDesk.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/HelpDesk.php @@ -14,32 +14,33 @@ $languageStrings = array( 'LBL_RECORDS_LIST' => 'Lista de Casos' , 'LBL_TICKET_INFORMATION' => 'Información del Caso' , 'LBL_TICKET_RESOLUTION' => 'Solución del caso' , - 'Ticket No' => 'Núm. de Caso' , - 'Severity' => 'Importancia' , + 'Ticket No' => 'Id Caso' , + 'Severity' => 'Severidad' , 'Update History' => 'Histórico de actualizaciones', 'Hours' => 'Horas' , 'Days' => 'DÃas' , - 'Title' => 'Referencia' , + 'Title' => 'TÃtulo' , 'Solution' => 'Solución' , 'From Portal' => 'Proviene del portal' , - 'Big Problem' => 'Problema grave' , - 'Small Problem' => 'Problema menor' , - 'Other Problem' => 'Otro tipo de problema' , + 'Big Problem' => 'Problema grande' , + 'Small Problem' => 'Problema pequeño' , + 'Other Problem' => 'Otro problema' , 'Normal' => 'Normal' , 'High' => 'Alta' , + 'Low' => 'Baja' , 'Urgent' => 'Urgente' , 'Minor' => 'Menor' , 'Major' => 'Mayor' , 'Feature' => 'CaracterÃstica' , 'Critical' => 'CrÃtica' , - 'Open' => 'Abierta' , + 'Open' => 'Abierto' , 'Wait For Response' => 'Esperando respuesta' , - 'Closed' => 'Cerrada' , + 'Closed' => 'Cerrado' , 'LBL_STATUS' => 'Estado' , - 'LBL_SEVERITY' => 'Importancia' , + 'LBL_SEVERITY' => 'Severidad' , 'LBL_CONVERT_FAQ' => 'Convertir a FAQ' , 'LBL_RELATED_TO' => 'Relacionado con' , - 'Related To' => 'En relación con' , + 'Related To' => 'Cuenta' , //added to support i18n in ticket mails 'Hi' => 'Hola', @@ -85,10 +86,11 @@ $languageStrings = array( 'HelpDesk ID' => 'ID de incidencia', 'Ticket ID' => 'ID del Caso', 'LBL_TICKET_NUMBER' => 'Número de caso', + 'All' => 'Todos', - 'Contact Name' => 'Nombre de Contacto', - 'LBL_ADD_DOCUMENT' => 'Añadir documento', + 'LBL_ADD_DOCUMENT' => 'Agregar documento', 'LBL_OPEN_TICKETS' => 'Casos abiertos', 'LBL_CREATE_TICKET' => 'Crear Caso', + 'High Prioriy Tickets' => 'Casos de alta prioridad', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Home.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Home.php index 7acca1170719847072ae2f0fe31b39735243b77f..ae03b3a5a506aaf5b00cbee1dcb8c3e2d93581df 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Home.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Home.php @@ -11,21 +11,21 @@ $languageStrings = array( 'ALVT' => 'Cuentas más importantes' , 'PLVT' => 'Oportunidades más importantes' , 'QLTQ' => 'Cotizaciones más importantes' , - 'CVLVT' => 'Medidas clave' , + 'CVLVT' => 'Métricas clave' , 'HLT' => 'Casos más importantes' , 'GRT' => 'Asignación de grupo' , - 'OLTSO' => 'Órdenes de venta más importantes', + 'OLTSO' => 'Pedidos más importantes', 'ILTI' => 'Facturas más importantes' , - 'HDB' => 'Tablero de inicio' , + 'HDB' => 'Tablero principal' , 'OLTPO' => 'Órdenes de compra más importantes', 'LTFAQ' => 'FAQs recientes' , 'UA' => 'Eventos próximos' , 'PA' => 'Eventos pendientes' , - 'Home' => 'Tablero' , + 'Home' => 'Tablero' , 'LBL_SAVE_ORDER' => 'Guardar orden', - 'LBL_ADD_NEW_DASHBOARD' => 'Añadir nuevo Tablero', - 'LBL_MAX_CHARACTERS_ALLOWED_DASHBOARD' => 'Se permiten máximo 30 caracteres para el Tablero', + 'LBL_ADD_NEW_DASHBOARD' => 'Agregar nuevo Tablero', + 'LBL_MAX_CHARACTERS_ALLOWED_DASHBOARD' => 'Se permiten máximo 30 caracteres para el nombre del Tablero', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Import.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Import.php index 10c531036fe844cfa41fae8e66f9fa4c8d55125d..11a99935e3c0864b299bb1898f8f74f1d5659e1d 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Import.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Import.php @@ -18,12 +18,12 @@ $languageStrings = array( 'LBL_DELIMITER' => 'Delimitador' , 'LBL_HAS_HEADER' => 'Tiene encabezado' , 'LBL_IMPORT_STEP_3' => 'Paso 3' , - 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Manejo de registros duplicados', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Gestión de registros duplicados', 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Seleccione esta opción para habilitar y configurar el control de duplicados', - 'LBL_SPECIFY_MERGE_TYPE' => 'Seleccione cómo se han de manejar los registros duplicados', - 'LBL_SELECT_MERGE_FIELDS' => 'Seleccione los campos coincidentes para encontrar duplicados', + 'LBL_SPECIFY_MERGE_TYPE' => 'Seleccione qué hacer con los registros duplicados', + 'LBL_SELECT_MERGE_FIELDS' => 'Seleccione los campos que deben coincidir para considerar un registro como duplicado', 'LBL_AVAILABLE_FIELDS' => 'Campos disponibles' , - 'LBL_SELECTED_FIELDS' => 'Campos coincidentes' , + 'LBL_SELECTED_FIELDS' => 'Campos coincidentes (si un registro a importar coincide en todos estos campos con uno ya existente, se considerará como duplicado)' , 'LBL_NEXT_BUTTON_LABEL' => 'Siguiente' , 'LBL_IMPORT_STEP_4' => 'Paso 4' , 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Asigna las columnas a campos del módulo', @@ -57,7 +57,7 @@ $languageStrings = array( VacÃe la cola de importación para iniciar el proceso de nuevo', 'ERR_IMPORT_INTERRUPTED' => 'La importación actual ha sido interrumpida.', 'ERR_FAILED_TO_LOCK_MODULE' => 'No se ha podido bloquear el módulo para la importación. Inténtelo de nuevo más tarde.', - 'LBL_SELECT_SAVED_MAPPING' => 'Seleccionar asignación guardada', + 'LBL_SELECT_SAVED_MAPPING' => 'Seleccionar asignación', 'LBL_IMPORT_ERROR_LARGE_FILE' => 'Error de importación, archivo grande ' , 'LBL_FILE_UPLOAD_FAILED' => 'Error al cargar el archivo' , 'LBL_IMPORT_CHANGE_UPLOAD_SIZE' => 'Cambiar tamaño de carga para importar' , @@ -65,8 +65,8 @@ $languageStrings = array( 'LBL_IMPORT_FILE_COPY_FAILED' => 'La copia del archivo de importación falló' , 'LBL_INVALID_FILE' => 'Archivo no válido' , 'LBL_NO_ROWS_FOUND' => 'No se encontraron filas' , - 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Su importanción ha sido programada y empezará en 15 minutos. Recibirá un correo una vez que se haya completado la importación. <br> <br> - Por favor asegúrese de que el servidor de salida y su dirección de correo están configurados para recibir notificaciones de correo', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Su importanción ha sido programada y empezará en aprox. 15 minutos siempre y cuando el Cron Job de Importación de Registros esté activo (si no lo está, por favor actÃvelo). <br> <br> + Por favor asegúrese de que hay una cuenta smtp configurada para el envÃo de correos desde Vtiger y que la dirección de correo de su usuario sea correcta para poder recibir una notificación cuando haya terminado la importación.', 'LBL_DETAILS' => 'Detalles' , 'skipped' => 'Registros saltados' , 'failed' => 'Registros fallidos' , @@ -79,12 +79,12 @@ $languageStrings = array( 'LBL_IMPORT_FROM_ICS_FILE' => 'Importar desde archivo ICS', 'LBL_SELECT_ICS_FILE' => 'Seleccionar archivo ICS', - 'LBL_USE_SAVED_MAPS' => 'Utilice los mapas guardados', - 'LBL_IMPORT_MAP_FIELDS' => 'Asigne las columnas a campos del CRM', + 'LBL_USE_SAVED_MAPS' => 'Utilice una asignación guardada', + 'LBL_IMPORT_MAP_FIELDS' => 'Asigne las columnas del archivo a campos del CRM', 'LBL_UPLOAD_CSV' => 'Cargar un Archivo CSV', 'LBL_UPLOAD_VCF' => 'Cargar un Archivo VCF', 'LBL_DUPLICATE_HANDLING' => 'Gestión de duplicados', - 'LBL_FIELD_MAPPING' => 'Asignación de campo', + 'LBL_FIELD_MAPPING' => 'Asignación de campos', 'LBL_IMPORT_FROM_CSV_FILE' => 'Importar desde archivo CSV', 'LBL_SELECT_IMPORT_FILE_FORMAT' => '¿Desde dónde le gustarÃa importar?', 'LBL_CSV_FILE' => 'Archivo CSV', @@ -101,4 +101,12 @@ $languageStrings = array( 'LBL_DONE_BUTTON' => 'Terminado', 'LBL_DELETION_SUMMARY' => 'Resumen de la eliminación', + 'comma' => 'coma ( , )', + 'semicolon' => 'punto y coma ( ; )', + 'Pipe' => 'barra vertical ( | )', + 'Caret' => 'intercalación ( ^ )', + 'Skip' => 'Omitirlos', + 'Overwrite' => 'Sobreescribir registros existentes', + 'Merge' => 'Fusionar con registros existentes', + 'Skip this step' => 'Saltar este paso', ); diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Invoice.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Invoice.php index ba7d4933886eae06f59533a29383199b32e1c563..00abbdd31370936674db7f24abac155bc1379fbc 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Invoice.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Invoice.php @@ -21,16 +21,20 @@ $languageStrings = array( 'Purchase Order' => 'Orden de compra' , 'Sales Commission' => 'Comisión sobre ventas' , 'Invoice No' => 'Nº Factura' , - 'LBL_RECEIVED' => 'Recibida' , + 'LBL_RECEIVED' => 'Recibido' , 'LBL_BALANCE' => 'Saldo' , 'Sent' => 'Enviada' , 'Credit Invoice' => 'A crédito' , 'Paid' => 'Pagada' , 'AutoCreated' => 'Automática' , - 'Cancel' => 'Cancelar' , + 'Cancel' => 'Cancelada' , + 'Created' => 'Creada', + 'Approved' => 'Aprobada', 'LBL_NOT_A_BUNDLE' => 'No es un paquete', 'LBL_SUB_PRODUCTS' => 'Subproductos', 'LBL_ACTION' => 'Acción', + 'Open Invoices' => 'Facturas abiertas', + 'Paid Invoices' => 'Facturas pagadas', 'LBL_THIS' => 'Este', 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'Se ha eliminado del sistema. Por favor elimine o reemplace este artÃculo', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Leads.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Leads.php index e61406673d4952c14a1d4e7b94d3e2505531e54b..ca8227f0eb91e557024df14d8e847e2d1438578f 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Leads.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Leads.php @@ -13,12 +13,12 @@ $languageStrings = array( 'LBL_RECORDS_LIST' => 'Lista de Prospectos' , 'LBL_ADD_RECORD' => 'Agregar Prospecto' , 'LBL_LEAD_INFORMATION' => 'Información del Prospecto' , - 'Lead No' => 'Núm. de Prospecto' , + 'Lead No' => 'Id Prospecto' , 'Company' => 'Empresa' , 'Designation' => 'Puesto' , 'Website' => 'Página Web' , 'Industry' => 'Actividad' , - 'Lead Status' => 'Estado del Prospecto' , + 'Lead Status' => 'Estado' , 'No Of Employees' => 'Número de empleados' , '--None--' => '-----' , 'Mr.' => 'Sr.' , @@ -47,9 +47,9 @@ $languageStrings = array( 'Lead Image' => 'Imagen del Prospecto', - 'Phone' => 'Teléfono principal', - 'Secondary Email' => 'Correo electrónico secundario', - 'Email' => 'Correo electrónico principal', + 'Phone' => 'Tel. principal', + 'Secondary Email' => 'Correo adicional', + 'Email' => 'Correo', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Potentials.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Potentials.php index ee1af38cee08a19096e4dbd3decb6df182a08443..08a1deaa88305dd579e85c14bed6a8f5fee903ef 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Potentials.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Potentials.php @@ -13,13 +13,13 @@ $languageStrings = array( 'LBL_ADD_RECORD' => 'Agregar Oportunidad' , 'LBL_RECORDS_LIST' => 'Lista de Oportunidades' , 'LBL_OPPORTUNITY_INFORMATION' => 'Información de Oportunidad:', - 'Potential No' => 'Núm. Oportunidad' , - 'Amount' => 'Importe' , + 'Potential No' => 'Id Oportunidad' , + 'Amount' => 'Monto' , 'Next Step' => 'Siguiente paso' , 'Sales Stage' => 'Fase de venta' , - 'Probability' => 'Probabilidad' , + 'Probability' => 'Probabilidad de venta' , 'Campaign Source' => 'Campaña origen' , - 'Forecast Amount' => 'Ingresos ponderados' , + 'Forecast Amount' => 'Monto proyectado' , 'Funnel' => 'Embudo de ventas' , 'Potentials by Stage' => 'Oportunidades por fase' , 'Total Revenue' => 'Ingresos por vendedor' , @@ -28,21 +28,22 @@ $languageStrings = array( 'Prospecting' => 'Investigando' , 'Qualification' => 'Calificando' , 'Needs Analysis' => 'Necesita análisis' , - 'Value Proposition' => 'Propuesta de evaluación' , + 'Value Proposition' => 'Propuesta de valor' , 'Id. Decision Makers' => 'Identificando quién decide' , 'Perception Analysis' => 'Análisis' , - 'Proposal/Price Quote' => 'Cotización propuesta' , - 'Negotiation/Review' => 'Negociando/Revisando' , + 'Proposal or Price Quote' => 'Propuesta o Cotización' , + 'Negotiation or Review' => 'Negociando o Revisando' , 'Closed Won' => 'Cerrada-Ganada' , 'Closed Lost' => 'Cerrada-Perdida' , '--None--' => '-----' , - 'Existing Business' => 'Negocio existente' , - 'New Business' => 'Nuevo negocio' , + 'Existing Business' => 'Cliente existente' , + 'New Business' => 'Cliente nuevo' , 'LBL_EXPECTED_CLOSE_DATE_ON' => 'Fecha esperada de cierre' , - 'LBL_RELATED_CONTACTS' => 'Contactos relacionados' , // TODO: Review - 'LBL_RELATED_PRODUCTS' => 'Productos relacionados' , // TODO: Review - 'Related To' => 'Nombre de la organización' , + 'LBL_RELATED_CONTACTS' => 'Contactos relacionados' , + 'LBL_RELATED_PRODUCTS' => 'Productos relacionados' , + 'Related To' => 'Cuenta' , 'Type' => 'Tipo' , + 'Potentials Won' => 'Oportunidades ganadas', //Convert Potentials 'LBL_CONVERT_POTENTIAL' => 'Convertir Oportunidades', @@ -54,7 +55,7 @@ $languageStrings = array( //Potentials Custom Field Mapping 'LBL_CUSTOM_FIELD_MAPPING'=> 'Asignación de Oportunidad a Proyecto', - 'Contact Name' => 'Nombre del Contacto', + 'Contact Name' => 'Contacto', ); diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Products.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Products.php index a3601b63806e4f5f8fd4025d69092b8ce88f45d2..0c2d71ecc8d0251a7dcf10ada1e007e3ce2a57e3 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Products.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Products.php @@ -13,27 +13,27 @@ $languageStrings = array( 'LBL_ADD_RECORD' => 'Agregar Producto' , 'LBL_RECORDS_LIST' => 'Lista de productos' , 'LBL_PRODUCT_INFORMATION' => 'Información del Producto' , - 'LBL_IMAGE_INFORMATION' => 'Información de la imagen del Producto:', - 'LBL_STOCK_INFORMATION' => 'Información del stock:' , + 'LBL_IMAGE_INFORMATION' => 'Imagen', + 'LBL_STOCK_INFORMATION' => 'Inventario' , 'LBL_MORE_CURRENCIES' => 'más monedas' , 'LBL_PRICES' => 'Precios de los productos' , 'LBL_PRICE' => 'Precio' , 'LBL_RESET_PRICE' => 'Restaurar precio' , 'LBL_RESET' => 'Restaurar' , 'LBL_ADD_TO_PRICEBOOKS' => 'Agregar a lista de precios' , - 'Product No' => 'Núm. de Producto' , + 'Product No' => 'Id Producto' , 'Part Number' => 'Código de Producto' , 'Product Active' => 'Producto activo' , 'Manufacturer' => 'Fabricante' , 'Product Category' => 'CategorÃa de Producto' , - 'Website' => 'Sitio web' , - 'Mfr PartNo' => 'Nº de Pieza del fabricante' , - 'Vendor PartNo' => 'Nº de Pieza del proveedor' , + 'Website' => 'Página web' , + 'Mfr PartNo' => 'Num. de Pieza del fabricante' , + 'Vendor PartNo' => 'Num. de Pieza del proveedor' , 'Usage Unit' => 'Unidad de uso' , 'Handler' => 'Responsable' , 'Reorder Level' => 'Nivel de pedido' , 'Tax Class' => 'Clase de impuesto' , - 'Serial No' => 'Nº de serie' , + 'Serial No' => 'Num. de serie' , 'Qty In Stock' => 'Cantidad en stock' , 'Product Sheet' => 'Hoja del Producto' , 'Qty In Demand' => 'Cantidad pedida' , @@ -76,6 +76,7 @@ $languageStrings = array( 'LBL_SHOW_BUNDLE_IN_INVENTORY' => 'Mostrar elementos de paquete en Factura/Cotizaciones/Orden de Compra', 'LBL_BUNDLE_TOTAL_COST' => 'Costo total del paquete', 'LBL_UPDATE_BUNDLE_PRICE' => 'Actualizar precio del paquete', + 'All' => 'Todos', 'LBL_PRODUCT_NAME' => 'Nombre del Producto', 'LBL_PRICE_QUANTITY' => 'Precio x cantidad', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ProjectTask.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ProjectTask.php index 72102ccd86acdd18a14c5d753e385a0c5ca08246..255295f1c0ac4cdffbabe3202a1dab0d9f4a82b1 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ProjectTask.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ProjectTask.php @@ -18,7 +18,7 @@ $languageStrings = array( //Field Labels 'Project Task Name' => 'Nombre de la Tarea de proyecto', - 'Project Task No' => 'Núm. de la Tarea de proyecto', + 'Project Task No' => 'Id Tarea de proyecto', 'Project Task Number' => 'Número de la Tarea de proyecto', 'Status' => 'Estado', 'Priority' => 'Prioridad', @@ -26,21 +26,22 @@ $languageStrings = array( 'Type'=>'Tipo', 'Worked Hours'=>'Horas trabajadas', 'Start Date'=>'Fecha de inicio', - 'End Date'=>'Fecha de término', - 'Related to' => 'Relacionado con', - 'administrative' => 'Administrativo', - 'operative' => 'Operativo', - 'other' => 'Otro', - 'low' => 'Bajo', + 'End Date'=>'Fecha de fin', + 'Related to' => 'Proyecto', + 'administrative' => 'Administrativa', + 'operative' => 'Operativa', + 'other' => 'Otra', + 'low' => 'Baja', 'normal' => 'Normal', - 'high' => 'Alto', + 'high' => 'Alta', 'Created Time' => 'Hora de creación', 'Modified Time' => 'Hora de modificación', 'description' => 'Descripción', 'Assigned To' => 'Asignado a', - 'Open' => 'Abierto', + 'Open' => 'Abierta', 'In Progress' => 'En progreso', - 'Deferred' => 'Diferido', - 'Canceled ' => 'Cancelado', + 'Deferred' => 'Diferida', + 'Canceled ' => 'Cancelada', + 'Completed' => 'Terminada', 'LBL_NO_DATE_VALUE_MSG' => 'Las tareas del proyecto no tienen fecha de inicio ni / o de término', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/PurchaseOrder.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/PurchaseOrder.php index 2dc9c0b380470ceeb6036b01ee9af109564afeb8..a0c54c46be4a5072df84c43866f6600046194bdf 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/PurchaseOrder.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/PurchaseOrder.php @@ -21,11 +21,18 @@ $languageStrings = array( 'Requisition No' => 'Referencia del pedido' , 'Tracking Number' => 'Nº de seguimiento' , 'Sales Commission' => 'Comisión de ventas' , - 'LBL_PAID' => 'Pagada' , + 'LBL_PAID' => 'Pagado' , 'LBL_BALANCE' => 'Saldo' , - 'Received Shipment' => 'Recibido' , 'LBL_LIST_PRICE' => 'Precio de lista', 'List Price' => 'Precio de lista', + 'Created' => 'Creada', + 'Approved' => 'Aprobada', + 'Delivered' => 'Entregada', + 'Cancelled' => 'Cancelada', + 'Received Shipment' => 'Recibida', + + 'Open Purchase Orders' => 'Órdenes de Compra abiertas', + 'Received Purchase Orders' => 'Órdenes de Compra recibidas', 'LBL_COPY_COMPANY_ADDRESS'=> 'Copiar dirección de la empresa', 'LBL_COPY_ACCOUNT_ADDRESS' => 'Copiar dirección de la cuenta', 'LBL_SELECT_ADDRESS_OPTION' => 'Seleccione la dirección para copiar', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Quotes.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Quotes.php index 775c6bf9c3efb3d2e849ac6c90d62f45332f5a31..173baa2aed8b9e7a3e7eaab70f700bb9304e27a2 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Quotes.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Quotes.php @@ -11,17 +11,21 @@ $languageStrings = array( 'Quotes' => 'Cotización' , 'SINGLE_Quotes' => 'Cotización' , 'LBL_EXPORT_TO_PDF' => 'Exportar a PDF' , - 'LBL_SEND_MAIL_PDF' => 'Enviar email con PDF' , // TODO: Review + 'LBL_SEND_MAIL_PDF' => 'Enviar correo con PDF' , // TODO: Review 'LBL_ADD_RECORD' => 'Agregar Cotización' , 'LBL_RECORDS_LIST' => 'Lista de Cotizaciones' , 'LBL_QUOTE_INFORMATION' => 'Información de la Cotización', - 'Quote No' => 'No. de Cotización' , - 'Quote Stage' => 'Estado de la Cotización' , - 'Valid Till' => 'Válido hasta' , - 'Inventory Manager' => 'Encargado del inventario' , - 'Accepted' => 'Aceptado' , - 'Rejected' => 'Rechazado' , - 'Related To' => 'En relación con' , + 'Quote No' => 'Id Cotización' , + 'Quote Stage' => 'Estado' , + 'Valid Till' => 'Validez hasta' , + 'Inventory Manager' => 'Encargado del inventario' , + 'Created' => 'Creada' , + 'Accepted' => 'Aceptada' , + 'Rejected' => 'Rechazada' , + 'Delivered' => 'Entregada', + 'Reviewed' => 'Revisada', + 'Open Quotes' => 'Cotizaciones abiertas', + 'Rejected Quotes' => 'Cotizaciones rechazadas', 'LBL_THIS' => 'Este', 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'ha sido eliminado del sistema.Por favor elimine o reemplace este artÃculo', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/SalesOrder.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/SalesOrder.php index 0dd42c000684fcf14fc2f5205cb055b85e5a55fc..7c0fd963352e9b96a0627b717a81f65a3695d56f 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/SalesOrder.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/SalesOrder.php @@ -16,7 +16,7 @@ $languageStrings = array( 'LBL_RECORDS_LIST' => 'Lista de Pedidos', 'LBL_SO_INFORMATION' => 'Información del Pedido' , 'SalesOrder No' => 'Nº de Pedido' , - 'Quote Name' => 'Referencia de la cotización', + 'Quote Name' => 'Cotización', 'Customer No' => 'Código del cliente' , 'Requisition No' => 'Referencia del Pedido' , 'Tracking Number' => 'Nº de seguimiento' , @@ -24,17 +24,38 @@ $languageStrings = array( 'Purchase Order' => 'Orden de compra' , 'Vendor Terms' => 'Términos del proveedor' , 'Pending' => 'Pendiente' , - 'Enable Recurring' => 'Habilitar facturación recurrente', - 'Frequency' => 'Frecuencia' , - 'Start Period' => 'Inicio periodo' , - 'End Period' => 'Final periodo' , - 'Payment Duration' => 'Duración' , - 'Invoice Status' => 'Estado de la factura' , 'Sub Total' => 'Subtotal' , 'AutoCreated' => 'Automática' , 'Sent' => 'Enviada' , 'Credit Invoice' => 'A crédito' , - 'Paid' => 'Pagada' , + 'Paid' => 'Pagada' , + 'Pending Sales Orders' => 'Pedidos pendientes', + 'All' => 'Todos', + + + //Facturacion Recurrente + 'Enable Recurring' => 'Activar facturación recurrente', + 'Frequency' => 'Frecuencia' , + 'Start Period' => 'Facturar desde' , + 'End Period' => 'Facturar hasta' , + 'Payment Duration' => 'DÃas de crédito' , + 'Invoice Status' => 'Estado de la factura' , + 'Recurring Invoice Information' => 'Facturación Recurrente', + 'Daily' => 'Diario', + 'Weekly' => 'Semanal', + 'Monthly' => 'Mensual', + 'Quarterly' => 'Trimestral', + 'Yearly' => 'Anual', + 'Net 01 day' => '01 dÃa', + 'Net 05 days' => '05 dÃas', + 'Net 07 days' => '07 dÃas', + 'Net 10 days' => '10 dÃas', + 'Net 15 days' => '15 dÃas', + 'Net 30 days' => '30 dÃas', + 'Net 45 days' => '45 dÃas', + 'Net 60 days' => '60 dÃas', + 'Cancel' => 'Cancelada', + 'LBL_THIS' => 'Este', 'LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM' => 'Se ha eliminado del sistema. Por favor elimine o reemplace este artÃculo', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ServiceContracts.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ServiceContracts.php index 8a195d710a4679383380b85063f8631753dd8cf4..38d328bf72dca04140be11a28fe27973b42d0d5c 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ServiceContracts.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/ServiceContracts.php @@ -16,8 +16,8 @@ $languageStrings = array( 'Contract No' => 'Número de Contrato' , 'Start Date' => 'Fecha de inicio' , 'End Date' => 'Fecha de finalización' , - 'Tracking Unit' => 'Unidad de seguimiento' , - 'Total Units' => 'Total de unidades' , + 'Tracking Unit' => 'Unidad base' , + 'Total Units' => 'Unidades totales' , 'Used Units' => 'Unidades consumidas' , 'Progress' => 'Progreso (en %)' , 'Planned Duration' => 'Duración estimada (dÃas)' , @@ -28,7 +28,7 @@ $languageStrings = array( 'Days' => 'DÃas', 'Incidents' => 'Incidentes', 'Normal' => 'Normal', - 'Support' => 'Apoyo', + 'Support' => 'Soporte técnico', 'Administrative' => 'Administrativo', 'Undefined' => 'Indefinido', 'In Planning' => 'En planificación', @@ -39,6 +39,7 @@ $languageStrings = array( 'High' => 'Alto', 'Services' => 'Servicios', 'In Progress' => 'En progreso', + 'Due date' => 'Fecha de expiración', 'Service Contracts' => 'Contratos de servicio', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Services.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Services.php index ef809b20d26dc5f89f34b8c9530592f047cbaed6..2fae293a19531b2afb2cb5100bc44bf391e30e4e 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Services.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Services.php @@ -30,4 +30,14 @@ $languageStrings = array( 'Usage Unit' => 'Unidades de consumo' , 'Tax Class' => 'Tipo de impuesto' , 'Website' => 'Página Web' , + 'All' => 'Todos', + 'Hours' => 'Horas', + 'Days' => 'DÃas', + 'Incidents' => 'Incidentes', + 'Support' => 'Soporte técnico', + 'Installation' => 'Instalación', + 'Migration' => 'Migración', + 'Customization' => 'Adecuación a la medida', + 'Training' => 'Capacitación', + ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/CronTasks.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/CronTasks.php index 4e6fd69a7062684ff6cef9b89f847754c5c61395..5249e735c7d32b4a00a1541514f9e20054bc49bc 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/CronTasks.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/CronTasks.php @@ -8,16 +8,17 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'CronTasks' => 'Planificador' , + 'CronTasks' => 'Cron Jobs' , 'Id' => 'Id' , 'Cron Job' => 'Cron Job' , 'Frequency' => 'Frecuencia' , 'Status' => 'Estatus' , - 'Last Start' => 'Último scan empezó' , - 'Last End' => 'Último scan terminó' , - 'Sequence' => 'Secuencia' , + 'Last Start' => 'Última ejecución empezó' , + 'Last End' => 'Última ejecución terminó' , + 'Sequence' => 'Orden' , 'LBL_COMPLETED' => 'Terminado' , - 'LBL_RUNNING' => 'Trabajando' , + 'LBL_RUNNING' => 'Procesando...' , 'LBL_ACTIVE' => 'Activo' , 'LBL_INACTIVE' => 'Inactivo' , + 'Frequency(H:M)' => 'Frecuencia (hh:mm)', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Currency.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Currency.php index aeb0aea5d3f31777fd7b228c097c4c6de10bad53..f65855c3009d1699337b12e3aad122f78b656028 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Currency.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Currency.php @@ -8,15 +8,15 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'Añadir moneda' , + 'LBL_ADD_RECORD' => 'Agregar moneda' , 'LBL_EDIT_CURRENCY' => 'Editar moneda' , - 'LBL_ADD_NEW_CURRENCY' => 'Añadir nueva moneda' , + 'LBL_ADD_NEW_CURRENCY' => 'Agregar nueva moneda' , 'LBL_CURRENCY_NAME' => 'Nombre de moneda' , - 'LBL_CURRENCY_CODE' => 'Código de moneda' , + 'LBL_CURRENCY_CODE' => 'Código' , 'LBL_CURRENCY_SYMBOL' => 'SÃmbolo' , 'LBL_CONVERSION_RATE' => 'Tasa de conversión' , 'LBL_ENTER_CONVERSION_RATE' => 'Ingresar tasa de conversión' , - 'LBL_CURRENCY_STATUS_DESC' => 'Activar la casilla de verificación para que que la moneda quede activa', + 'LBL_CURRENCY_STATUS_DESC' => 'Activar la casilla para que que la moneda quede activada', 'LBL_TRANSFER_CURRENCY' => 'Transferir moneda' , 'LBL_CURRENT_CURRENCY' => 'Moneda actual' , 'Albania, Leke' => 'Albania, Lek albanés' , @@ -149,6 +149,10 @@ $languageStrings = array( 'Malawi, kwacha' => 'Malawi, Kwacha' , 'Tunisian, Dinar' => 'Tunez, Dinar' , 'Moroccan, Dirham' => 'Marruecos, Dirham' , + + 'Currency Name' => 'Moneda', + 'Currency Code' => 'Código', + 'Symbol' => 'SÃmbolo', ); $jsLanguageStrings = array( 'JS_CURRENCY_DETAILS_SAVED' => 'Detalles de la moneda guardados' , diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php index 24c6cb62b25151f3538ba6bdbbaf4febd121f399..6d7fa80840753218baa2ddbf91c688060c1ab2f0 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php @@ -8,16 +8,16 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LayoutEditor' => 'Editor de diseño' , - 'LBL_FIELDS_AND_LAYOUT_EDITOR' => 'Editor de campos y de diseño', - 'LBL_CREATE_CUSTOM_FIELD' => 'Añadir campo personalizado' , + 'LayoutEditor' => 'Editor de layout' , + 'LBL_FIELDS_AND_LAYOUT_EDITOR' => 'Editor de campos y layout', + 'LBL_CREATE_CUSTOM_FIELD' => 'Agregar campo personalizado' , 'LBL_DETAILVIEW_LAYOUT' => 'Editor de vista de detalles', 'LBL_ARRANGE_RELATED_TABS' => 'Organizar pestañas relacionadas' , - 'LBL_ADD_CUSTOM_FIELD' => 'Añadir campo personalizado' , - 'LBL_ADD_CUSTOM_BLOCK' => 'Añadir bloque personalizado', - 'LBL_SAVE_FIELD_SEQUENCE' => 'Guardar secuencia de campos' , + 'LBL_ADD_CUSTOM_FIELD' => 'Agregar campo personalizado' , + 'LBL_ADD_CUSTOM_BLOCK' => 'Agregar bloque personalizado', + 'LBL_SAVE_FIELD_SEQUENCE' => 'Guardar orden de campos' , 'LBL_BLOCK_NAME' => 'Nombre del bloque' , - 'LBL_ADD_AFTER' => 'Añadir después' , + 'LBL_ADD_AFTER' => 'Agregar después' , 'LBL_ACTIONS' => 'Acciones' , 'LBL_ALWAYS_SHOW' => 'Mostrar siempre' , 'LBL_INACTIVE_FIELDS' => 'Campos desactivados' , @@ -28,12 +28,12 @@ $languageStrings = array( 'LBL_SUMMARY_FIELD' => "Campo de resumen" , 'LBL_MASS_EDIT' => 'Edición masiva' , 'LBL_DEFAULT_VALUE' => 'Valor por defecto' , - 'LBL_SELECT_FIELD_TYPE' => 'Seleccionar el tipo de campo' , - 'LBL_LABEL_NAME' => 'Nombre de etiqueta' , + 'LBL_SELECT_FIELD_TYPE' => 'Tipo de campo' , + 'LBL_LABEL_NAME' => 'Nombre del campo' , 'LBL_LENGTH' => 'Tamaño' , 'LBL_DECIMALS' => 'Decimales' , - 'LBL_ENTER_PICKLIST_VALUES' => 'Introducir los valores de la lista de selección', - 'LBL_PICKLIST_VALUES' => 'Valores de la lista de selección' , + 'LBL_ENTER_PICKLIST_VALUES' => 'Introducir las opciones de la lista desplegable', + 'LBL_PICKLIST_VALUES' => 'Opciones de la lista desplegable' , 'LBL_REACTIVATE' => '(Re)Activar' , 'LBL_ARRANGE_RELATED_LIST' => 'Organizar lista relacionada' , 'LBL_SELECT_MODULE_TO_ADD' => 'Seleccionar módulo para añadir', @@ -43,26 +43,26 @@ $languageStrings = array( 'LBL_ADD_MODULE_INFO' => 'Seleccione el módulo eliminado para volverlo a incluir en la lista', 'LBL_SELECT_MODULE' => 'Seleccione módulo' , 'LBL_DUPLICATES_EXIST' => 'Ya existe un bloque con ese nombre', - 'LBL_NON_ROLE_BASED_PICKLIST' => 'Lista de selección no basada en roles', + 'LBL_NON_ROLE_BASED_PICKLIST' => 'Lista desplegable no basada en roles', 'LBL_DUPLICATE_FIELD_EXISTS' => 'Existe un campo duplicado' , 'LBL_WRONG_FIELD_TYPE' => 'Tipo de campo equivocado' , - 'LBL_ROLE_BASED_PICKLIST' => 'Lista de selección basada en roles', + 'LBL_ROLE_BASED_PICKLIST' => 'Lista desplegable basada en roles', 'LBL_CLICK_HERE_TO_EDIT' => 'Haga clic aquà para editar' , 'Text' => 'Texto' , 'Decimal' => 'Decimal' , 'Integer' => 'Número entero' , - 'Percent' => 'Por ciento' , + 'Percent' => 'Porcentaje' , 'Currency' => 'Moneda' , 'Date' => 'Fecha' , 'Email' => 'Correo electrónico' , 'Phone' => 'Teléfono' , - 'PickList' => 'Lista de selección' , - 'MultiSelectCombo' => 'Cuadro combinado de selección múltiple', + 'Picklist' => 'Lista desplegable' , + 'MultiSelectCombo' => 'Lista desplegable de multiseleccion', 'URL' => 'URL' , 'Checkbox' => 'Casilla de verificación' , 'TextArea' => 'Ãrea de texto' , 'Skype' => 'Skype' , - 'Time' => 'Tiempo' , + 'Time' => 'Hora' , 'Calendar' => 'Tarea' , 'LBL_FIELD_COULD_NOT_BE_CREATED' => 'El campo de %s no se ha podido crear', 'SELECT_MODULE' => 'Seleccione módulo' , @@ -104,17 +104,17 @@ $languageStrings = array( 'LBL_ENABLE_TO_MAP_SERVICE_FIELD' => 'Habilitar un mapa del campo Servicios', 'LBL_SHOW_HIDDEN_FIELDS' => 'Mostrar campos ocultos', - 'LBL_KEY_FIELD_VIEW' => 'Vista de campo clave', + 'LBL_KEY_FIELD_VIEW' => 'Campo clave', 'LBL_SELECT_HIDDEN_MODULE' => 'Seleccione el módulo oculto', 'LBL_ADD_RELATIONSHIP' => 'Agregar relación', 'LBL_RELATED_MODULE' => 'Módulo relacionado', 'LBL_SELECTED_RELATED_MODULE' => 'Módulo relacionado seleccionado', 'LBL_SELECTED_RELATION_TYPE' => 'Tipo de relación seleccionado', - 'ONE_ONE_AND_MANY_ONE_RELATIONSHIP' => 'Relaciones uno-uno y muchos-uno', - 'ONE_MANY_RELATIONSHIP' => 'Relaciones uno-muchos' , + 'ONE_ONE_AND_MANY_ONE_RELATIONSHIP' => 'Relaciones uno-a-uno y muchos-a-uno', + 'ONE_MANY_RELATIONSHIP' => 'Relaciones uno-a-muchos' , 'LBL_NO_RELATED_INFO' => 'No existe ninguna relación', 'LBL_ADD_NEW_FIELD_HERE' => 'Agregar nuevo campo aquÃ', - 'LBL_SAVE_LAYOUT' => 'Guardar diseño', + 'LBL_SAVE_LAYOUT' => 'Guardar layout', 'LBL_SHOW_FIELD' => 'Mostrar campo', 'LBL_ENABLE_OR_DISABLE_FIELD_PROP' => 'Habilitar / Deshabilitar las propiedades de campo', 'LBL_PROP_MANDATORY' => 'Obligatorio', @@ -128,16 +128,16 @@ $languageStrings = array( 'LBL_NOT_MAKE_THIS_FIELD' => 'Haga clic aquà para hacer de este campo no-%s', 'LBL_TAB_NAME_HELP_TEXT' => 'Lista de %s se muestra en %s registro', 'LBL_TAB_NAME_TEXT' => 'El nombre de la pestaña de %s en %s registro', - 'LBL_FILED_NAME_HELP_TEXT' => 'Se añadirá un campo de referencia para %s en %s registro', + 'LBL_FILED_NAME_HELP_TEXT' => 'Se agregará un campo de referencia para %s en %s registro', 'LBL_FIELD_NAME_TEXT' => 'Nombre de campo de %s en %s registro', - 'LBL_COLLAPSE_BLOCK' => 'Bloque de colapso', - 'LBL_COLLAPSE_BLOCK_DETAIL_VIEW' => 'Vista de detalles del bloque de colapso', + 'LBL_COLLAPSE_BLOCK' => 'Colapsar Bloque', + 'LBL_COLLAPSE_BLOCK_DETAIL_VIEW' => 'Colapsar bloque en vista de detalles', 'LBL_HEADER' => 'Encabezado', 'LBL_DETAIL_HEADER' => 'Encabezado de detalle', 'LBL_HEADER_FIELD' => 'Campo de encabezado', 'LBL_DUPLICATE_HANDLING' => 'Manejo de duplicados', - 'LBL_DUPLICATE_CHECK' => 'Habilitar comprobación de duplicados', + 'LBL_DUPLICATE_CHECK' => 'Habilitar revisión de duplicados', 'LBL_DUPLICATION_INFO_MESSAGE' => 'La prevención de duplicados solo evita que los usuarios y las aplicaciones externas creen nuevos registros duplicados. Los registros creados desde Importar y desde Flujos de trabajo no serán revisados para ver si existen duplicados', 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Seleccione los únicos campos en los que se van a comprobar los registros duplicados', 'LBL_SELECT_FIELDS' => 'Seleccionar campos', @@ -155,7 +155,7 @@ $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Mostrar bloque abierto' , 'JS_BLOCK_VISIBILITY_HIDE' => 'Mostrar bloque cerrado' , 'JS_CUSTOM_BLOCK_ADDED' => 'Se ha añadido el nuevo bloque personalizado', - 'JS_BLOCK_SEQUENCE_UPDATED' => 'Se ha actualizado la secuencia de bloques', + 'JS_BLOCK_SEQUENCE_UPDATED' => 'Se ha actualizado el orden de los bloques', 'JS_SELECTED_FIELDS_REACTIVATED' => 'Se han reactivado los campos seleccionados', 'JS_FIELD_DETAILS_SAVED' => 'Se han guardado los detalles del campo', 'JS_CUSTOM_BLOCK_DELETED' => 'Se ha eliminado el bloque personalizado', @@ -163,13 +163,13 @@ $jsLanguageStrings = array( 'JS_CUSTOM_FIELD_DELETED' => 'Se ha eliminado el campo personalizado', 'JS_LENGTH_SHOULD_BE_LESS_THAN_EQUAL_TO' => 'La longitud debe ser menor o igual a', 'JS_PLEASE_ENTER_NUMBER_IN_RANGE_2TO5' => 'El número de decimales debe estar entre 2 y 5', - 'JS_SAVE_THE_CHANGES_TO_UPDATE_FIELD_SEQUENCE' => 'Guarda los cambios para actualizar la secuencia de campos', + 'JS_SAVE_THE_CHANGES_TO_UPDATE_FIELD_SEQUENCE' => 'Guarda los cambios para actualizar el orden de los campos', 'JS_RELATED_INFO_SAVED' => 'Se ha guardado la información relacionada', 'JS_BLOCK_NAME_EXISTS' => 'Ya existe un bloque con ese nombre', 'JS_NO_HIDDEN_FIELDS_EXISTS' => 'No hay campos inactivos', 'JS_SPECIAL_CHARACTERS' => 'No se permiten caracteres especiales como', 'JS_NOT_ALLOWED' => '' , - 'JS_FIELD_SEQUENCE_UPDATED' => 'Secuencia de campo actualizada', + 'JS_FIELD_SEQUENCE_UPDATED' => 'Se actualizó el orden de los campos', 'JS_DUPLICATES_VALUES_FOUND' => 'Valores duplicados encontrados', 'JS_FIELD_IN_RELATED_MODULE' => 'Campo Relación en %s' , 'JS_TAB_IN_RELATED_MODULE' => 'Tabla / Tab en %s' , @@ -181,7 +181,7 @@ $jsLanguageStrings = array( 'JS_DEFAULT_VALUE_NOT_SET' => 'Valor predeterminado no definido', 'JS_DEFAULT_VALUE' => 'Valor predeterminado', - 'JS_SAVE_MODULE_SEQUENCE' => 'Guarde los cambios para actualizar la secuencia de los módulos relacionados', + 'JS_SAVE_MODULE_SEQUENCE' => 'Guarde los cambios para actualizar el orden de los módulos relacionados', 'JS_PRODUCTFIELDDEFAULTVALUE' => ' (Productos', 'JS_SERVICEFIELDDEFAULTVALUE' => ' (Servicios de', 'JS_TAB_TAB_DELETION' => 'Esto eliminará %s ficha en %s módulo y de sus datos. ¿Desea continuar?', @@ -204,9 +204,9 @@ Si usted no está seguro y quiere poder ver estos datos en el futuro, puede marc ¿Está seguro de que desea eliminar este campo?', 'JS_FIELD_DELETE_CONFIRMATION' => 'Eliminar - no necesito los datos de este campo.', 'JS_STATUS_CHANGED_SUCCESSFULLY' => 'El estado ha cambiado correctamente', - 'JS_FIELD_CAN_EITHER_BE_HEADER_OR_SUMMARY_ENABLED' => 'El campo puede ser un campo de encabezado o campo clave', + 'JS_FIELD_CAN_EITHER_BE_HEADER_OR_SUMMARY_ENABLED' => 'El campo se puede habilitar en la sección e encabezado o en la sección de campos clave (no las dos)', 'JS_DETAIL_HEADER' => 'Registro de encabezado', - 'JS_MAXIMUM_HEADER_FIELDS_ALLOWED' => 'Máximo %s campos de encabezado permitido', + 'JS_MAXIMUM_HEADER_FIELDS_ALLOWED' => 'Se permite un máximo %s campos de encabezado', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Los nombres de los campos aparecen en el encabezado por defecto', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Este campo es Encabezado habilitado para Vtiger7, aparecerá en la Vista de Resumen', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/PickListDependency.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/PickListDependency.php index 86adc5d4d2fb0404831d020ad96907397fcf4286..73957e5ccdd753d2614a7613724b3193ca436102 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/PickListDependency.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/PickListDependency.php @@ -8,32 +8,32 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_ADD_RECORD' => 'Añadir lista de dependencia' , - 'LBL_PICKLIST_DEPENDENCY' => 'Lista de dependencia' , + 'LBL_ADD_RECORD' => 'Agregar dependencia' , + 'LBL_PICKLIST_DEPENDENCY' => 'Dependencias entre listas desplegables' , 'LBL_SELECT_MODULE' => 'Módulo' , - 'LBL_SOURCE_FIELD' => 'Campo de origen' , - 'LBL_TARGET_FIELD' => 'Campo de destino' , + 'LBL_SOURCE_FIELD' => 'Campo origen' , + 'LBL_TARGET_FIELD' => 'Campo destino' , 'LBL_SELECT_FIELD' => 'Seleccione el campo' , - 'LBL_CONFIGURE_DEPENDENCY_INFO' => 'Dé clic en la celda respectiva para cambiar la asignación para los valores de la lista de dependencia del campo de destino', - 'LBL_CONFIGURE_DEPENDENCY_HELP_1' => 'Solamente se mostrarán abajo los valores de la lista de dependencia del campo de origen (excepto la primera vez)', - 'LBL_CONFIGURE_DEPENDENCY_HELP_2' => 'Si desea ver o cambiar la asignación para los demás valores de la lista de dependencia del campo de origen, <br/> - puede seleccionar los valores haciendo clic en <b>\'El botón Seleccionar valores de origen\'</b> del lado derecho', - 'LBL_CONFIGURE_DEPENDENCY_HELP_3' => 'Los valores seleccionados de los valores del campo de destino están resaltados como', - 'LBL_SELECT_SOURCE_VALUES' => 'Seleccione los valores de origen' , - 'LBL_SELECT_SOURCE_PICKLIST_VALUES' => 'Seleccione los valores de la lista de dependencia de origen', - 'LBL_ERR_CYCLIC_DEPENDENCY' => 'Esta configuración de dependencia no está permitida, ya que termina en una dependencia cÃclica', + 'LBL_CONFIGURE_DEPENDENCY_INFO' => 'Dé clic en la celda respectiva para cambiar la asignación de opciones disponibles en la lista desplegable de destino', + 'LBL_CONFIGURE_DEPENDENCY_HELP_1' => 'Solamente se mostrarán abajo los valores de la lista desplegable de origen (excepto la primera vez)', + 'LBL_CONFIGURE_DEPENDENCY_HELP_2' => 'Si desea ver o cambiar la asignación para las demás opciones de la lista desplegable de origen, <br/> + puede seleccionar las opciones haciendo clic en el botón <b>\'Seleccionar valores de origen\'</b>', + 'LBL_CONFIGURE_DEPENDENCY_HELP_3' => 'Las opciones seleccionados para la lista desplegable de destino están resaltados como', + 'LBL_SELECT_SOURCE_VALUES' => 'Seleccione las opciones de origen' , + 'LBL_SELECT_SOURCE_PICKLIST_VALUES' => 'Seleccione las opciones de la lista desplegable de origen', + 'LBL_ERR_CYCLIC_DEPENDENCY' => 'Esta configuración de dependencia no está permitida, ya que genera una dependencia cÃclica', 'LBL_SELECT_ALL_VALUES' => 'Seleccionar todo', 'LBL_UNSELECT_ALL_VALUES' => 'Des seleccionar todo', - 'LBL_CYCLIC_DEPENDENCY_ERROR' => 'Esto podrÃa terminar en redundancia cÃclica, pues el campo %s ya está configurado para el campo %s', + 'LBL_CYCLIC_DEPENDENCY_ERROR' => 'Esto podrÃa generar una dependencia cÃclica, pues el campo %s ya está configurado para el campo %s', - 'PickListDependency' => 'Lista de selección de dependencia', + 'PickListDependency' => 'Dependencias entre listas desplegables', ); $jsLanguageStrings = array( - 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => '¿Está seguro de que quiere borrar esta lista de dependencia?', + 'JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => '¿Está seguro de que quiere borrar esta dependencia?', 'JS_DEPENDENCY_DELETED_SUEESSFULLY' => 'Dependencia borrada exitosamente', - 'JS_PICKLIST_DEPENDENCY_SAVED' => 'Lista de dependencia guardada' , - 'JS_DEPENDENCY_ATLEAST_ONE_VALUE' => 'Es necesario seleccionar por lo menos un valor para', - 'JS_SOURCE_AND_TARGET_FIELDS_SHOULD_NOT_BE_SAME' => 'El campo de origen y el campo de destino no deben ser el mismo', - 'JS_SELECT_SOME_VALUE' => 'Seleccione algún valor' , + 'JS_PICKLIST_DEPENDENCY_SAVED' => 'Dependencia guardada' , + 'JS_DEPENDENCY_ATLEAST_ONE_VALUE' => 'Es necesario seleccionar por lo menos una opción para', + 'JS_SOURCE_AND_TARGET_FIELDS_SHOULD_NOT_BE_SAME' => 'La lista desplegable de origen y destino no deben ser iguales', + 'JS_SELECT_SOME_VALUE' => 'Seleccione algúna opción' , ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Picklist.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Picklist.php index 3222b8fae176be8bc42919a64d85358bf6907e62..bf0a34aa7fa88646b022412ef9dee998c825e678 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Picklist.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Picklist.php @@ -8,36 +8,37 @@ * All Rights Reserved. ************************************************************************************/ $languageStrings = array( - 'LBL_SELECT_PICKLIST_IN' => 'Seleccionar lista de selección en' , - 'LBL_ADD_VALUE' => 'Añadir valor' , - 'LBL_RENAME_VALUE' => 'Cambiar de nombre el valor' , - 'LBL_DELETE_VALUE' => 'Eliminar el valor' , - 'LBL_ITEMS' => 'ArtÃculos' , - 'LBL_DRAG_ITEMS_TO_RESPOSITION' => 'Arrastre los artÃculos para cambiarlos de posición', - 'LBL_SELECT_AN_ITEM_TO_RENAME_OR_DELETE' => 'Seleccione un artÃculo para cambiarlo de nombre o eliminarlo', - 'LBL_TO_DELETE_MULTIPLE_HOLD_CONTROL_KEY' => 'Para borrar varios artÃculos presione la tecla Ctrl al mismo tiempo que slecciona los artÃculos', - 'LBL_ADD_ITEM_TO' => 'Añadir artÃculo a' , - 'LBL_ITEM_VALUE' => 'Valor del artÃculo' , - 'LBL_ITEM_TO_RENAME' => 'ArtÃculo para cambiar de nombre' , + 'LBL_SELECT_PICKLIST_IN' => 'Seleccionar lista desplegable en' , + 'LBL_ADD_VALUE' => 'Agregar opción' , + 'LBL_RENAME_VALUE' => 'Renombrar opción' , + 'LBL_DELETE_VALUE' => 'Eliminar opción' , + 'LBL_ITEMS' => 'Opciones' , + 'LBL_DRAG_ITEMS_TO_RESPOSITION' => 'Arrastre las opciones para cambiarlas de posición', + 'LBL_SELECT_AN_ITEM_TO_RENAME_OR_DELETE' => 'Seleccione una opción para renombrarla o eliminarla', + 'LBL_TO_DELETE_MULTIPLE_HOLD_CONTROL_KEY' => 'Para borrar varias opciones presione la tecla Ctrl al mismo tiempo que las slecciona', + 'LBL_ADD_ITEM_TO' => 'Agregar opción a' , + 'LBL_ITEM_VALUE' => 'Nombre de la opción' , + 'LBL_ITEM_TO_RENAME' => 'Opción a renombrar' , 'LBL_ENTER_NEW_NAME' => 'Ingrese el nuevo nombre' , - 'LBL_RENAME_PICKLIST_ITEM' => 'Cambiar de nombre el artÃculo de la lista de selección' , - 'LBL_DELETE_PICKLIST_ITEMS' => 'Eliminar los artÃculos de la lista de selección' , - 'LBL_ITEMS_TO_DELETE' => 'ArtÃculos para eliminar' , + 'LBL_RENAME_PICKLIST_ITEM' => 'Renombrar opción de la lista desplegable' , + 'LBL_DELETE_PICKLIST_ITEMS' => 'Eliminar opciones de la lista desplegable' , + 'LBL_ITEMS_TO_DELETE' => 'Opciones a eliminar' , 'LBL_REPLACE_IT_WITH' => 'Reemplazar con' , 'LBL_ASSIGN_TO_ROLE' => 'Asignar a rol' , 'LBL_ALL_ROLES' => 'Todos los roles' , 'LBL_CHOOSE_ROLES' => 'Elegir el rol' , - 'LBL_ALL_VALUES' => 'Todos los valores' , - 'LBL_VALUES_ASSIGNED_TO_A_ROLE' => 'Valores asignados a un rol' , - 'LBL_ASSIGN_VALUE' => 'Asignar valor' , + 'LBL_ALL_VALUES' => 'Todas las opciones' , + 'LBL_VALUES_ASSIGNED_TO_A_ROLE' => 'Opciones asignadas a un rol' , + 'LBL_ASSIGN_VALUE' => 'Asignar opción' , 'LBL_SAVE_ORDER' => 'Guardar orden' , 'LBL_ROLE_NAME' => 'Nombre del rol' , 'LBL_SELECTED_VALUES_MESSGAE' => 'Aparecerá para el usuario con este rol', - 'LBL_ENABLE/DISABLE_MESSGAE' => 'Dé clic en el valor para activarlo/desactivarlo. Cuando termine, dé clic en Guardar', - 'LBL_ASSIGN_VALUES_TO_ROLES' => 'Asignar valores a roles' , - 'LBL_SELECTED_VALUES' => 'Valores seleccionados' , - 'NO_PICKLIST_FIELDS' => 'No tiene ningún campo de lista de selección', - 'LBL_EDIT_PICKLIST_ITEM' => 'Editar lista de selección de artÃculos', + 'LBL_ENABLE/DISABLE_MESSGAE' => 'Dé clic en la opción para activarla/desactivarla. Cuando termine, dé clic en Guardar', + 'LBL_ASSIGN_VALUES_TO_ROLES' => 'Asignar opciones a roles' , + 'LBL_SELECTED_VALUES' => 'Opciones seleccionadas' , + 'NO_PICKLIST_FIELDS' => 'No tiene ningún campo de tipo lista desplegable', + 'LBL_EDIT_PICKLIST_ITEM' => 'Editar lista desplegable de opciones', + 'Picklist' => 'Opciones de listas desplegables', //Translation for module 'Calendar' => 'Tarea', @@ -46,16 +47,16 @@ $languageStrings = array( ); $jsLanguageStrings = array( - 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Nombre del artÃculo cambiado exitosamente' , - 'JS_ITEM_ADDED_SUCCESSFULLY' => 'ArtÃculo añadido exitosamente' , - 'JS_NO_ITEM_SELECTED' => 'No se ha seleccionado ningún artÃculo' , - 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'Se ha seleccionado más de un artÃculo' , - 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Los artÃculos se han borrado exitosamente' , - 'JS_YOU_CANNOT_DELETE_ALL_THE_VALUES' => 'No puede borrar todos los valores', + 'JS_ITEM_RENAMED_SUCCESSFULLY' => 'Opción renombrada exitosamente' , + 'JS_ITEM_ADDED_SUCCESSFULLY' => 'Opción agregada exitosamente' , + 'JS_NO_ITEM_SELECTED' => 'No se ha seleccionado ninguna opción' , + 'JS_MORE_THAN_ONE_ITEM_SELECTED' => 'Se ha seleccionado más de una opción' , + 'JS_ITEMS_DELETED_SUCCESSFULLY' => 'Las opciones se han borrado exitosamente' , + 'JS_YOU_CANNOT_DELETE_ALL_THE_VALUES' => 'No puede borrar todas las opciones', 'JS_ALL_ROLES_SELECTED' => 'Se han seleccionado todos los roles' , - 'JS_LIST_UPDATED_SUCCESSFULLY' => 'La lista se actualizó exitosamente' , - 'JS_SEQUENCE_UPDATED_SUCCESSFULLY' => 'Secuencia actualizada exitosamente', - 'JS_VALUE_ASSIGNED_SUCCESSFULLY' => 'Valor asignado exitosamente' , + 'JS_LIST_UPDATED_SUCCESSFULLY' => 'La lista desplegable se actualizó exitosamente' , + 'JS_SEQUENCE_UPDATED_SUCCESSFULLY' => 'Orden actualizado exitosamente', + 'JS_VALUE_ASSIGNED_SUCCESSFULLY' => 'Opción asignada exitosamente' , 'JS_PLEASE_SELECT_MODULE' => 'Por favor seleccione el módulo' , 'JS_SPECIAL_CHARACTERS' => 'Caracteres especiales', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Vtiger.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Vtiger.php index 076e7bd0cd549d3c432a8af417604ee78664cc93..fb89e6741de880ea8ae319cb1df1131afeb51454 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Vtiger.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Vtiger.php @@ -46,7 +46,7 @@ $languageStrings = array( 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Agregar funciones personalizadas a campos personalizados', 'VTLIB_LBL_MODULE_MANAGER' => 'Módulos' , 'VTLIB_LBL_MODULE_MANAGER_DESCRIPTION' => 'Administrar el comportamiento del módulo dentro de Vtiger CRM', - 'LBL_PICKLIST_EDITOR' => 'Valores de lista de selección de campo', + 'LBL_PICKLIST_EDITOR' => 'Opciones de listas desplegables', 'LBL_PICKLIST_DESCRIPTION' => 'Gestionar listados de los módulos del CRM', 'LBL_PICKLIST_DEPENDENCY_SETUP' => 'Configuración de la lista de selección de dependencia', 'LBL_PICKLIST_DEPENDENCY_DESCRIPTION' => 'Establece dependencias entre los elementos de las listas desplegables en cada módulo', @@ -55,39 +55,39 @@ $languageStrings = array( 'LBL_MENU_EDITOR_MESSAGE' =>'El número real de elementos del menú que aparecen dependerá del tamaño de la pantalla y podrÃa ser inferior a los elementos seleccionados', 'EMAILTEMPLATES' => 'Plantillas de correo' , 'LBL_EMAIL_TEMPLATE_DESCRIPTION' => 'Gestionar plantillas de correo', - 'LBL_COMPANY_DETAILS' => 'Información de la empresa' , + 'LBL_COMPANY_DETAILS' => 'Datos de la empresa' , 'LBL_COMPANY_DESCRIPTION' => 'Gestionar información de su empresa', 'LBL_MAIL_MERGE' => 'Fusión de correo' , 'LBL_MAIL_MERGE_DESCRIPTION' => 'Gestionar plantillas para fusión de correo', 'LBL_TAX_SETTINGS' => 'Configuración de impuestos' , 'LBL_TAX_DESCRIPTION' => 'Gestionar impuestos' , - 'LBL_MAIL_SERVER_SETTINGS' => 'Configuración del servidor de correo', + 'LBL_MAIL_SERVER_SETTINGS' => 'Servidor de correo (SMTP)', 'LBL_MAIL_SERVER_DESCRIPTION' => 'Editar configuración del servidor de correo saliente', 'INVENTORYTERMSANDCONDITIONS' => 'Inventario: condiciones generales', 'LBL_INV_TANDC_DESCRIPTION' => 'Gestionar los textos de las condiciones generales', 'LBL_ANNOUNCEMENT_DESCRIPTION' => 'Configuración de anuncios para toda la compañÃa', - 'LBL_CURRENCY_SETTINGS' => 'Configuración de moneda' , + 'LBL_CURRENCY_SETTINGS' => 'Monedas', 'LBL_CURRENCY_DESCRIPTION' => 'Gestionar divisas internacionales y tipos de cambio', - 'LBL_CUSTOMIZE_MODENT_NUMBER' => 'Numeración de módulo', + 'LBL_CUSTOMIZE_MODENT_NUMBER' => 'Numeración', 'LBL_CUSTOMIZE_MODENT_NUMBER_DESCRIPTION' => 'Personalización de número de entidad del módulo', - 'LBL_MAIL_SCANNER' => 'Clasificar correos' , + 'LBL_MAIL_SCANNER' => 'Escáner de correos' , 'LBL_MAIL_SCANNER_DESCRIPTION' => 'Configura el buzón de correo para escanear y adjuntar registros', 'LBL_LIST_WORKFLOWS' => 'Flujos de trabajo' , 'LBL_LIST_WORKFLOWS_DESCRIPTION' => 'Crear/Editar flujos de trabajo en Vtiger CRM', - 'Configuration Editor' => 'Editor de configuración' , + 'Configuration Editor' => 'Misceláneo' , 'LBL_CONFIG_EDITOR_DESCRIPTION' => 'Actualizar archivo de configuración de la aplicación', 'Update configuration file of the application' => 'Actualizar archivo de configuración', - 'LBL_CUSTOMER_PORTAL' => 'Portal del cliente' , + 'LBL_CUSTOMER_PORTAL' => 'Portal de clientes' , 'PORTAL_EXTENSION_DESCRIPTION' => 'Permite configurar la extensión del portal del cliente', 'LBL_LAYOUT_EDITOR_DESCRIPTION' => 'Diseñar y modificar el diseño en cada uno de los módulos', 'LBL_WEBFORMS_DESCRIPTION' => 'Crear y administrar webforms que pueden utilizarse para captar Prospectos', - 'LBL_TO_ADD_NEW_USER_PLEASE_CLICK_ON' => 'Para añadir un Usuario, por favor dé clic en', + 'LBL_TO_ADD_NEW_USER_PLEASE_CLICK_ON' => 'Para agregar un Usuario, por favor dé clic en', 'LBL_SETTINGS_ICON' => 'Ãcono de configuración' , - 'LBL_ADD_OR_DELETE_USERS' => 'Añadir/Eliminar Usuarios' , - 'LBL_ADD_USER' => 'Añadir Usuario' , + 'LBL_ADD_OR_DELETE_USERS' => 'Agregar/Eliminar Usuarios' , + 'LBL_ADD_USER' => 'Agregar Usuario' , 'LBL_LABELS_EDITOR' => 'Editor de etiquetas', 'LBL_LABELS_EDITOR_DESCRIPTION' => 'Le permite personalizar los nombres de módulos, etiquetas de campo y otras cadenas de acuerdo a sus necesidades de negocio', - 'Scheduler' => 'Programador de eventos' , + 'Scheduler' => 'Cron Jobs' , 'Allows you to Configure Cron Task' => 'Configurar tareas de Cron' , 'Webforms' => 'Formularios Web' , 'Allows you to manage Webforms' => 'Administrar formularios Web' , @@ -95,14 +95,14 @@ $languageStrings = array( 'LBL_EDITING' => 'Editando' , 'LBL_EDIT_RECORD' => 'Editar' , 'LBL_DELETE_RECORD' => 'Borrar' , - 'LBL_ADD_MOVE_MENU_ITEMS' => 'Añadir/Mover elementos del menú' , - 'LBL_ADD_MENU_ITEM' => 'Añadir un elemento al menú', + 'LBL_ADD_MOVE_MENU_ITEMS' => 'Agregar/Mover elementos del menú' , + 'LBL_ADD_MENU_ITEM' => 'Agregar un elemento al menú', 'LBL_MAX' => 'Max' , 'LBL_TAX_CALCULATIONS' => 'Cálculos de impuestos' , 'LBL_TAX_DESC' => 'Administra diferentes tipos de tasas de impuestos para los impuestos, tales como el IVA', 'LBL_PRODUCT_SERVICE_TAXES' => 'Impuestos de producto & servicio' , 'LBL_SHIPPING_HANDLING_TAXES' => 'Impuestos de envÃo y manejo' , - 'LBL_ADD_NEW_TAX' => 'Añadir nuevo impuesto' , + 'LBL_ADD_NEW_TAX' => 'Agregar nuevo impuesto' , 'LBL_EDIT_TAX' => 'Editar impuesto' , 'LBL_TAX_NAME' => 'Nombre del impuesto' , 'LBL_TAX_VALUE' => 'Valor del impuesto' , @@ -119,7 +119,7 @@ $languageStrings = array( 'LBL_TYPE' => 'Tipo', 'LBL_CALCULATION' => 'Cálculo', 'LBL_ADD_NEW_CHARGE' => 'Crear nuevo cargo', - 'LBL_ADD_NEW_TAX_FOR_CHARGE' => 'Añadir nuevo impuesto para cargo', + 'LBL_ADD_NEW_TAX_FOR_CHARGE' => 'Agregar nuevo impuesto para cargo', 'LBL_CHARGE_NAME' => 'Nombre del cargo', 'LBL_CHARGE_NAME_EXIST' => 'El nombre del cargo ya existe', 'LBL_VALUE' => 'Valor', @@ -136,7 +136,7 @@ $languageStrings = array( 'LBL_VARIABLE' => 'Variable', 'LBL_COMPOUND_ON' => 'Compuesto por', 'LBL_DEFAULT_VALUE' => 'Defecto', - 'LBL_ADD_TAX_BRACKET' => 'Añadir soporte de impuesto', + 'LBL_ADD_TAX_BRACKET' => 'Agregar soporte de impuesto', 'LBL_TAX_BRACKETS_DESC' => 'Si no asignó el valor del impuesto para una región se utilizará un valor por defecto', 'LBL_SELECT_SIMPLE_TAXES' => 'Seleccione impuestos simples', 'LBL_REGION_NAME' => 'Nombre de la región', @@ -147,7 +147,7 @@ $languageStrings = array( 'LBL_CHARGE_FORMAT' => 'Formato de cargo', 'LBL_FLAT' => 'Fijo', 'LBL_DIRECT_PRICE' => 'Precio de', - 'LBL_PERCENT' => 'Por ciento', + 'LBL_PERCENT' => 'Porciento', 'LBL_CHARGE_TYPE' => 'Tipo de cargo', 'LBL_CHARGE_VALUE' => 'Valor de cargo', 'LBL_ENTER_CHARGE_NAME' => 'Introduzca el nombre del cargo', @@ -169,10 +169,10 @@ $languageStrings = array( 'LBL_SERVER_NAME' => 'Nombre del servidor' , 'LBL_USER_NAME' => 'Nombre de usuario' , 'LBL_PASSWORD' => 'Contraseña' , - 'LBL_FROM_EMAIL' => 'del correo' , + 'LBL_FROM_EMAIL' => 'Correo remitente' , 'LBL_REQUIRES_AUTHENTICATION' => 'Requiere autenticación' , - 'LBL_OUTGOING_SERVER' => 'Servidor de salida' , - 'LBL_OUTGOING_SERVER_DESC' => 'Configure sus detalles de servidor de correo de salida', + 'LBL_OUTGOING_SERVER' => 'Servidor de correo (SMTP)' , + 'LBL_OUTGOING_SERVER_DESC' => 'Configure los detalles de la cuenta SMTP para envÃo de correos desde Vtiger CRM.', 'LBL_DEFAULT' => 'Por defecto, las configuraciones de la cuenta SMTP para el servidor de salida están configuradas para el servidor de correo od1.vtiger.com. Para evitar que los correos de salida pasen por filtros de spam en su servidor de correos de destinatario ISP, le recomendamos implementar una de las acciones siguientes', 'LBL_OPTIONS1' => 'Enviar correos desde su servidor de correos <br> - Ingresar los detalles de la cuenta SMTP (Nombre del servidor, Nombre del usuario, Contraseña) para la misma cuenta tal y como se ingresó en la dirección de correo DE', @@ -180,7 +180,7 @@ $languageStrings = array( -Para garantizar que sus correos no los rechace el servidor del detinatario como SPAM, el registro TXT que se menciona abajo deberá agragarse al regsitro DNS de su dominio", 'LBL_MAIL_SERVER_SMTP' => 'Configuración del servidor de correo (SMTP)' , - 'LBL_OUTGOING_SERVER_FROM_FIELD' => 'NOTA: Si el campo "De correo" está en blanco, entonces se utilizará la dirección del correo del usuario', + 'LBL_OUTGOING_SERVER_FROM_FIELD' => 'NOTA: Si el campo "Correo remitente" está en blanco, entonces se utilizará la dirección del correo del usuario', 'LBL_TESTMAILSTATUS' => 'Estatus del correo de prueba: ' , 'LBL_MAILSENDERROR' => 'El correo no pudo enviarse al usuario admin. Por favor verifique la configuración emailid/Servidor del admin', 'LBL_CONFIG_EDITOR' => 'Editor de configuración' , @@ -227,11 +227,11 @@ $languageStrings = array( 'linkedin' => 'LinkedIn' , 'LBL_IMAGE_CORRUPTED' => 'Se detectó un virus o la imagen cargada está dañada', 'LBL_LOGO_RECOMMENDED_MESSAGE' => 'Tamaño permitido 150X40 pÃxeles (formato .jpeg, .jpg, .png, .gif, .pjpeg, .x-png).', - 'LBL_COMPANY_INFORMATION' => 'Información de la empresa' , + 'LBL_COMPANY_INFORMATION' => 'Datos de la empresa' , 'LBL_UPDATE' => 'Actualizar' , 'LBL_UPDATE_LOGO' => 'Actualizar logo' , 'LBL_COMPANY_LOGO' => 'Logo de la empresa' , - 'LBL_EDIT_COMPANY_DETAILS_MESSAGE' => 'Para editar los detalles de la empresa, por favor haga clic en el Ãcono de configuración > Añadir/Borrar usuarios > Empresa', + 'LBL_EDIT_COMPANY_DETAILS_MESSAGE' => 'Para editar los detalles de la empresa, por favor haga clic en el Ãcono de configuración > Agregar/Borrar usuarios > Empresa', 'LBL_ACTIVE' => 'Activo' , 'LBL_INACTIVE' => 'Inactivo' , 'LBL_DISABLED' => 'Desactivado' , @@ -258,10 +258,10 @@ $languageStrings = array( 'LBL_FIELD_LABEL' => 'Etiqueta de campo' , 'LBL_FIELD_TYPE' => 'Tipo de campo' , 'LBL_MAPPING_WITH_OTHER_MODULES' => 'Asignación con otros módulos' , - 'LBL_ADD_MAPPING' => 'Añadir asignación' , + 'LBL_ADD_MAPPING' => 'Agregar asignación' , 'LBL_NONE' => 'Ninguno/a' , 'phone' => 'Teléfono' , - 'picklist' => 'Lista de selección' , + 'picklist' => 'Lista desplegable' , 'email' => 'Email' , 'text' => 'Cadena' , 'currency' => 'Moneda' , @@ -310,21 +310,25 @@ $languageStrings = array( 'LBL_INVOICES' => 'Facturas', 'LBL_SUPPORT' => 'Apoyo', 'LBL_TEMPLATES' => 'Plantillas', - 'LBL_MODULE_CUSTOMIZATION' => 'Módulo de Diseños & campos', - 'LBL_TAX_MANAGEMENT' => 'Administración de impuestos de', - 'LBL_LEAD_MAPPING' => 'Asignación de datos de conversión de prospectos', - 'LBL_OPPORTUNITY_MAPPING' => 'Asignación de Oportunidad', - 'LBL_PICKLIST_DEPENDENCY' => 'Lista de selección de dependencia', + 'LBL_MODULE_CUSTOMIZATION' => 'Layout & campos', + 'LBL_TAX_MANAGEMENT' => 'Impuestos', + 'LBL_LEAD_MAPPING' => 'Mapeo de campos para conversión de prospectos', + 'LBL_OPPORTUNITY_MAPPING' => 'Mapeo de campos de Oportunidad a Proyecto', + 'LBL_PICKLIST_DEPENDENCY' => 'Dependencias entre listas desplegables', 'LBL_MY_TAGS' => 'Mis etiquetas', - 'LBL_ADD_MODULE' => 'Añadir módulo', + 'LBL_ADD_MODULE' => 'Agregar módulo', 'LBL_SMART_NOTIFICATIONS' => 'Notificaciones inteligentes', - 'LBL_FORECAST_SETTINGS' => 'Pronóstico de configuración', - 'LBL_SEARCH_FOR_SETTINGS' => 'Configuración de búsqueda', + 'LBL_FORECAST_SETTINGS' => 'Configuración de Pronósticos', + 'LBL_SEARCH_FOR_SETTINGS' => 'Buscar en configuración...', 'LBL_GOOGLE' => 'Google', 'LBL_QUICKBOOKS' => 'QuickBooks', 'LBL_XERO' => 'Xero', 'LBL_TALLY' => 'Tally', 'LBL_SHOPPINGCART' => 'Carrito de compra', + 'My Preferences' => 'Mi Perfil', + 'Calendar Settings' => 'Config. de calendario', + 'Module' => 'Módulo', + 'Conditions' => 'Condiciones', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php index 89593bd5f172d50265d66061fc9cf1c04c4d8107..fe6988da3eeda48e4b831a38197ac9fe8b844a44 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php @@ -21,8 +21,8 @@ $languageStrings = array( 'ON_MODIFY' => 'Cada vez que un registro se modifique', 'MANUAL' => 'Sistema' , 'SCHEDULE_WORKFLOW' => 'Programar el flujo de trabajo' , - 'ADD_CONDITIONS' => 'Añadir condiciones' , - 'ADD_TASKS' => 'Añadir acciones' , + 'ADD_CONDITIONS' => 'Agregar condiciones' , + 'ADD_TASKS' => 'Agregar acciones' , 'LBL_EXPRESSION' => 'Expresión' , 'LBL_FIELD_NAME' => 'Campo' , 'LBL_SET_VALUE' => 'Establecer el valor' , @@ -35,13 +35,14 @@ $languageStrings = array( 'LBL_RECREATE_CONDITIONS' => 'Recrear las condiciones' , 'LBL_SAVE_AND_CONTINUE' => 'Guardar & Continuar' , 'LBL_ACTIVE' => 'Activo' , + 'InActive' => 'Inactivo', 'LBL_TASK_TYPE' => 'Tipo de acción' , 'LBL_TASK_TITLE' => 'TÃtulo de la acción' , 'LBL_ADD_TASKS_FOR_WORKFLOW' => 'Agregar acción de flujo de trabajo', 'LBL_EXECUTE_TASK' => 'Ejecutar acción' , 'LBL_SELECT_OPTIONS' => 'Seleccionar opciones' , - 'LBL_ADD_FIELD' => 'Añadir campo' , - 'LBL_ADD_TIME' => 'Añadir hora' , + 'LBL_ADD_FIELD' => 'Agregar campo' , + 'LBL_ADD_TIME' => 'Agregar hora' , 'LBL_TITLE' => 'TÃtulo' , 'LBL_PRIORITY' => 'Prioridad' , 'LBL_ASSIGNED_TO' => 'Asignado a' , @@ -52,16 +53,16 @@ $languageStrings = array( 'LBL_TYPE' => 'Tipo' , 'LBL_METHOD_NAME' => 'Nombre del método' , 'LBL_RECEPIENTS' => 'Destinatarios' , - 'LBL_ADD_FIELDS' => 'Añadir campos' , + 'LBL_ADD_FIELDS' => 'Agregar campos' , 'LBL_SMS_TEXT' => 'Texto de sms' , 'LBL_SET_FIELD_VALUES' => 'Definir los valores del campo' , 'LBL_IN_ACTIVE' => 'Inactivo' , 'LBL_SEND_NOTIFICATION' => 'Enviar notificación' , 'LBL_START_TIME' => 'Hora de inicio' , 'LBL_START_DATE' => 'Fecha de inicio' , - 'LBL_END_TIME' => 'Hora de término' , - 'LBL_END_DATE' => 'Fecha de término' , - 'LBL_ENABLE_REPEAT' => 'Habilitar repetir' , + 'LBL_END_TIME' => 'Hora de fin' , + 'LBL_END_DATE' => 'Fecha de fin' , + 'LBL_ENABLE_REPEAT' => 'Habilitar recurrencia' , 'LBL_NO_METHOD_IS_AVAILABLE_FOR_THIS_MODULE' => 'No hay método disponible para este módulo', 'LBL_FINISH' => 'Terminar' , 'LBL_NO_TASKS_ADDED' => 'No hay acciones' , @@ -78,20 +79,20 @@ $languageStrings = array( 'Optional' => 'Opcional', 'LBL_ADD_TASK' => 'Agregar acción' , 'Portal Pdf Url' =>'Url del Pdf Portal de clientes', - 'LBL_ADD_TEMPLATE' => 'Añadir plantilla', + 'LBL_ADD_TEMPLATE' => 'Agregar plantilla', 'LBL_LINEITEM_BLOCK_GROUP' => 'Bloque de artÃculos de lÃnea para impuesto grupal', 'LBL_LINEITEM_BLOCK_INDIVIDUAL' => 'Bloque de artÃculos de lÃnea para impuesto individual', - 'LBL_ADD_PDF' => 'Añadir Pdf', + 'LBL_ADD_PDF' => 'Agregar Pdf', //Translation for module 'Calendar' => 'Tarea', 'Send Mail' => 'Enviar correo', - 'Invoke Custom Function' => 'Invocar función personalizada', - 'Create Todo' => 'Crear tarea', - 'Create Event' => 'Crear evento', + 'Invoke Custom Function' => 'Ejecutar función personalizada', + 'Create Todo' => 'Crear Tarea', + 'Create Event' => 'Crear Evento', 'Update Fields' => 'Actualizar campos', 'Create Entity' => 'Crear registro' , - 'SMS Task' => 'Tarea de sms', + 'SMS Task' => 'Enviar SMS', 'Mobile Push Notification' => 'Notificación móvil automática', 'LBL_ACTION_TYPE' => 'Tipo de acción (conteo activo)', 'LBL_VTEmailTask' => 'Correo electrónico', @@ -125,9 +126,9 @@ $languageStrings = array( 'LBL_NEXT_TRIGGER_TIME' => 'Siguiente hora de activación', 'LBL_MESSAGE' => 'Mensaje', 'LBL_WORKFLOW_NAME' => 'Nombre del flujo de trabajo', - 'LBL_TARGET_MODULE' => 'Módulo de destino', + 'LBL_TARGET_MODULE' => 'Módulo', 'LBL_WORKFLOW_TRIGGER' => 'Detonador del flujo de trabajo', - 'LBL_TRIGGER_WORKFLOW_ON' => 'Activar el flujo de trabajo el', + 'LBL_TRIGGER_WORKFLOW_ON' => 'Activación del flujo de trabajo con', 'LBL_RECORD_CREATION' => 'Creación de registro', 'LBL_RECORD_UPDATE' => 'Actualización de registro', 'LBL_TIME_INTERVAL' => 'Intervalo de tiempo', @@ -139,11 +140,59 @@ $languageStrings = array( 'LBL_DELAY_ACTION' => 'Retrasar acción', 'LBL_FREQUENCY' => 'Frecuencia', 'LBL_SELECT_FIELDS' => 'Seleccione los campos', - 'LBL_INCLUDES_CREATION' => 'Incluye la creación de', + 'LBL_INCLUDES_CREATION' => 'Incluye la creación', 'LBL_ACTION_FOR_WORKFLOW' => 'Acción del flujo de trabajo', 'LBL_WORKFLOW_SEARCH' => 'Búsqueda por nombre', + 'LBL_UPDATED' => ' - Actualización', + 'LBL_CREATION' => ' - Creación', + 'LBL_ALL' => 'Todos', + 'Trigger' => 'Detonador', + 'Workflow Name' => 'Nombre del Flujo de trabajo', + + 'is' => 'es %s', + 'contains' => 'contiene %s', + 'does not contain' => 'no contiene %s', + 'starts with' => 'comienza con %s', + 'ends with' => 'termina con %s', + 'has changed' => 'ha cambiado', + 'is empty' => 'está vacÃo', + 'is not empty' => 'no está vacÃo', + 'equal to' => 'igual a %s', + 'less than' => 'menos de %s', + 'greater than' => 'mayor que %s', + 'does not equal' => 'no es igual a %s', + 'less than or equal to' => 'menor o igual a %s', + 'greater than or equal to' => 'mayor o igual a %s', + 'is not' => 'no es %s', + 'has changed to' => 'ha cambiado a %s', + 'has changed from' => 'ha cambiado a un valor diferente de %s', + 'before' => 'antes de %s', + 'after' => 'después', + 'is today' => 'es hoy', + 'is tomorrow' => 'es mañana', + 'is yesterday' => 'fue ayer', + 'previous month' => 'mes anterior', + 'current month' => 'mes actual', + 'next month' => 'próximo mes', + 'less than days ago' => 'Hace menos de %s dÃas', + 'less than days later' => 'menos de %s dÃas más tarde', + 'more than days ago' => 'Hace más de %s dÃas', + 'more than days later' => 'más de %s dÃas más tarde', + 'days ago' => 'Hace %s dÃas', + 'days later' => ' %s dÃas más tarde', + 'between' => 'entre %s', + 'in less than' => 'en menos de %s', + 'in more than' => 'en más de %s', + 'is added' => 'está agregado', + 'week days later' => '%s dÃas de la semana más tarde', + 'more than week days later' => 'más de %s dÃas de la semana más tarde', + 'less than week days later' => 'menos de %s dÃas de la semana más tarde', + 'week days ago' => 'hace %s dÃas de la semana', + 'more than week days ago' => 'hace más de %s dÃas de la semana', + 'less than week days ago' => 'hace menos de %s dÃas de la semana', ); + $jsLanguageStrings = array( 'JS_STATUS_CHANGED_SUCCESSFULLY' => 'El estatus cambió exitosamente' , 'JS_TASK_DELETED_SUCCESSFULLY' => 'Acción eliminada exitosamente' , @@ -154,11 +203,11 @@ $jsLanguageStrings = array( 'JS_TASK_STATUS_CHANGED' => 'Estatus de la tarea cambiado correctamente.', 'JS_WORKFLOWS_STATUS_CHANGED' => 'Estatus del flujo de trabajo cambiado correctamente.', 'VTEmailTask' => 'Enviar correo', - 'VTEntityMethodTask' => 'Invocar la función personalizada', - 'VTCreateTodoTask' => 'Crear tarea', - 'VTCreateEventTask' => 'Crear evento', + 'VTEntityMethodTask' => 'Ejecutar función personalizada', + 'VTCreateTodoTask' => 'Crear Tarea', + 'VTCreateEventTask' => 'Crear Evento', 'VTUpdateFieldsTask' => 'Actualización de campos', - 'VTSMSTask' => 'Tarea de SMS', + 'VTSMSTask' => 'Enviar SMS', 'VTPushNotificationTask' => 'Notificación móvil automática', 'VTCreateEntityTask' => 'Crear registro', 'LBL_EXPRESSION_INVALID' => 'La expresión no es válida', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Users.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Users.php index 20f0706f963636397edfec81f1e2b2c7f48e4542..9dd3f0a85575e5e48ea03e248e19792f969dbfb4 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Users.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Users.php @@ -249,6 +249,29 @@ $languageStrings = array( 'LBL_USER_TO_BE_DELETED' => 'Usuario eliminado', 'LBL_USERS_SETTINGS' => 'CONFIGURACIÓN DE USUARIOS', 'LBL_TEMPLATES' => 'Plantillas', + + //Calendar Settings + 'Sunday' => 'Domingo', + 'Monday' => 'Lunes', + 'Tuesday' => 'Martes', + 'Wednesday' => 'Miércoles', + 'Thursday' => 'Jueves', + 'Friday' => 'Viernes', + 'Saturyday' => 'Sábado', + + '1 Minute' => '1 minuto', + '5 Minutes' => '5 minutos', + '15 Minutes' => '15 minutos', + '30 Minutes' => '30 minutos', + '45 Minutes' => '45 minutos', + '1 Hour' => '1 hora', + '1 Day' => '1 dÃa', + + 'Today' => 'Hoy', + 'This Week' => 'Esta semana', + 'This Month' => 'Este mes', + 'This Year' => 'Este año', + 'Agenda' => 'Agenda', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vendors.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vendors.php index bf0391a4d980172b39d487a722ebb3315aa02922..65aa072bc51b011d347356615920c31ce233e5be 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vendors.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vendors.php @@ -15,7 +15,7 @@ $languageStrings = array( 'LBL_VENDOR_INFORMATION' => 'Información sobre Proveedores:', 'LBL_VENDOR_ADDRESS_INFORMATION' => 'Información sobre la dirección:', 'Vendor Name' => 'Proveedor' , - 'Vendor No' => 'Núm. de Proveedor' , + 'Vendor No' => 'Id Proveedor' , 'Website' => 'Página Web' , 'GL Account' => 'Cuenta Contable' , '300-Sales-Software' => '300-Ventas-Software' , @@ -27,10 +27,7 @@ $languageStrings = array( '306-Internet Sales' => '306-Ventas-Internet' , '307-Service-Hardware Labor' => '307-Instalación de Hardware-Ventas', '308-Sales-Books' => '308-Ventas-Libros' , - - 'Phone' => 'Teléfono principal', - 'Email' => 'Correo electrónico principal', - + 'All' => 'Todos', ); $jsLanguageStrings = array( 'LBL_RELATED_RECORD_DELETE_CONFIRMATION' => '¿Seguro que lo quiere borrar?', diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php index e92e9885651d307fc4066ca6aed8be2a9d07def9..32523f148b6add247c4bd1840a95ade505663550 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php @@ -6,7 +6,8 @@ * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. - ************************************************************************************/ + ************************************************** + ***********************************/ $languageStrings = array( 'APPTITLE' => 'Vtiger CRM' , 'POWEREDBY' => 'Powered by vtiger CRM', @@ -29,16 +30,16 @@ $languageStrings = array( 'LBL_DELETE' => 'Eliminar' , 'LBL_SETTINGS' => 'Configuración' , 'LBL_ADD_COMMENT' => 'Agregar comentario' , - 'LBL_EDIT_FIELDS' => '%s Campos y maquetación' , - 'LBL_EDIT_WORKFLOWS' => 'Flujos de trabajo% s' , - 'LBL_EDIT_PICKLIST_VALUES' => 'Valores de lista de selección', + 'LBL_EDIT_FIELDS' => 'Campos & Layout de %s' , + 'LBL_EDIT_WORKFLOWS' => 'Flujos de trabajo de %s' , + 'LBL_EDIT_PICKLIST_VALUES' => 'Opciones de lista desplegable', 'LBL_EDIT_MAILSCANNER' => 'Convertir correos' , 'LBL_RECORD_DELETE' => 'El registro que intenta ver ha sido borrado.', 'LBL_RECORD_NOT_FOUND' => 'El registro al que intenta acceder no existe', 'LBL_SELECT' => 'Seleccionar' , 'LBL_CLEAR' => 'Borrar' , 'LBL_YES' => 'SÃ' , - 'LBL_NO' => 'No hay' , + 'LBL_NO' => 'No' , 'LBL_SHOW_COMPLETE_DETAILS' => 'Detalles completos' , 'LBL_MASS_EDITING' => 'Edición masiva' , 'LBL_DESELECT_ALL_RECORDS' => 'Anular selección', @@ -46,10 +47,10 @@ $languageStrings = array( 'LBL_SEND_EMAIL' => 'Enviar correo' , 'LBL_ALL_EMAILS' => 'Todas las cuentas de correo' , 'LBL_MUTIPLE_EMAIL_SELECT_ONE' => 'Este registro contiene múltiples cuentas de correo, por favor selecciona las Cuentas a las que se les enviará el correo', - 'LBL_GO_TO_FULL_FORM' => 'Ir a forma completa' , + 'LBL_GO_TO_FULL_FORM' => 'Ir a formulario completo' , 'LBL_SEND_SMS' => 'Enviar SMS' , 'LBL_FOUND' => 'Encontrado' , - 'LBL_CLICK_ADD' => 'Haga clic para añadir' , + 'LBL_CLICK_ADD' => 'Haga clic para agregar' , 'LBL_ADD_MORE_FIELDS' => 'Agregar más campos' , 'LBL_ADD_NOTE' => 'Agregar nota' , 'LBL_CREATE_NEW' => 'Crear nuevo' , @@ -105,14 +106,14 @@ $languageStrings = array( 'LBL_DETAILS' => 'Detalles' , // 'LBL_SEARCH_FOR' => 'Buscar' , 'LBL_IN' => 'En' , - 'LBL_TYPE_SEARCH' => 'Tipo de búsqueda' , + 'LBL_TYPE_SEARCH' => 'Escriba para buscar...' , 'LBL_SEARCH_BUTTON' => 'Botón de búsqueda' , 'LBL_ADVANCE_SEARCH' => 'Avanzada' , 'LBL_LOADING_PLEASE_WAIT' => 'Cargando, por favor espere.' , 'LBL_USERS' => 'Usuarios' , 'LBL_GROUPS' => 'Grupos' , - 'LBL_FULL_FORM' => 'Forma completa' , - 'LBL_SIMPLE_FORM' => 'Forma simple' , + 'LBL_FULL_FORM' => 'Formulario completo' , + 'LBL_SIMPLE_FORM' => 'Formulario simple' , 'LBL_ADD_YOUR_COMMENT_HERE' => 'Agregue su comentario aquÃ...', 'LBL_REPLY' => 'Responder' , 'LBL_VIEW_THREAD' => 'Ver hilo' , @@ -139,7 +140,7 @@ $languageStrings = array( 'Rss' => 'RSS' , 'Quotes' => 'Cotizaciones' , 'PurchaseOrder' => 'Ordenes de compra' , - 'SalesOrder' => 'Ordenes de venta' , + 'SalesOrder' => 'Pedidos' , 'Invoice' => 'Facturas' , 'MailManager' => 'Admin Correo' , 'Recycle Bin' => 'Papelera de reciclaje', @@ -172,8 +173,8 @@ $languageStrings = array( 'LBL_IS_TODAY' => 'es hoy', 'LBL_IS_TOMORROW' => 'es mañana', 'LBL_IS_YESTERDAY' => 'fue ayer', - 'LBL_LESS_THAN_DAYS_LATER' => 'menos de dÃas más tarde', - 'LBL_MORE_THAN_DAYS_LATER' => 'más de dÃas más tarde', + 'LBL_LESS_THAN_DAYS_LATER' => 'faltan menos de N dÃas para la fecha', + 'LBL_MORE_THAN_DAYS_LATER' => 'faltan más de N dÃas para la fecha', 'LBL_DENY' => 'Denegar' , 'LBL_EQUALS' => 'Igual a ' , 'LBL_NOT_EQUAL_TO' => 'No igual a' , @@ -185,9 +186,9 @@ $languageStrings = array( 'LBL_GREATER_THAN' => 'mayor que' , 'LBL_LESS_THAN_OR_EQUAL' => 'menor o igual' , 'LBL_GREATER_OR_EQUAL' => 'mayor o igual' , - 'LBL_BEFORE' => 'Antes' , - 'LBL_AFTER' => 'Después' , - 'LBL_BETWEEN' => 'Entre' , + 'LBL_BEFORE' => 'antes del' , + 'LBL_AFTER' => 'después del' , + 'LBL_BETWEEN' => 'entre' , 'LBL_IS_NOT_EMPTY' => 'no está vacÃo' , 'LBL_SEARCH' => 'Buscar' , 'LBL_SEARCH_IN' => 'Buscar en' , @@ -254,8 +255,8 @@ $languageStrings = array( 'LBL_DEDUCTED_TAXES' => 'Impuestos deducidos', 'LBL_DEDUCTED_TAXES_TOTAL' => 'Total de impuestos deducidos', 'LBL_DEFAULT' => 'Defecto', - 'LBL_BILLING_ADDRESS_FROM' => 'Copiar dirección de facturación', - 'LBL_SHIPPING_ADDRESS_FROM' => 'Copiar dirección de envÃo', + 'LBL_BILLING_ADDRESS_FROM' => 'Copiar desde dirección de facturación', + 'LBL_SHIPPING_ADDRESS_FROM' => 'Copiar desde dirección de envÃo', 'LBL_COPY_SHIPPING_ADDRESS' => 'Dirección de envÃo', 'LBL_COPY_BILLING_ADDRESS' => 'Dirección de facturación', 'LBL_CREATE' => 'Crear' , @@ -319,13 +320,13 @@ $languageStrings = array( 'LBL_BOTH' => 'Ambos', 'LBL_SHOW' => 'Mostrar', 'LBL_SELECT_DATE_RANGE' => 'Seleccione el intervalo de fechas', - 'LBL_VIEW_NAME' => 'Lista de nombres' , + 'LBL_VIEW_NAME' => 'Nombre de la lista' , 'LBL_CREATE_VIEW' => 'Creando nueva vista' , 'LBL_BASIC_DETAILS' => 'Detalles básicos' , 'LBL_CHOOSE_COLUMNS' => 'Seleccione las columnas y el orden', 'LBL_MAX_NUMBER_FILTER_COLUMNS' => 'Máximo 15' , 'LBL_FILTER_ON_DATE' => 'Lista en fecha' , - 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Seleccione las condiciones de lista', + 'LBL_CHOOSE_FILTER_CONDITIONS' => 'Seleccione las condiciones', 'LBL_SET_AS_DEFAULT' => 'Establecer por defecto' , 'LBL_LIST_IN_METRICS' => 'Mostrar en métricas' , 'LBL_SET_AS_PUBLIC' => 'Definir como público' , @@ -372,8 +373,8 @@ $languageStrings = array( 'Leads by Status' => 'Prospectos por estado' , 'Leads by Source' => 'Prospectos por Origen' , 'Leads by Industry' => 'Prospectos por industria' , - 'Tickets by Status' => 'Casos por estado' , // TODO: Review - 'Open Tickets' => 'Casos abiertos' , // TODO: Review + 'Tickets by Status' => 'Casos por estado' , + 'Open Tickets' => 'Casos abiertos' , 'LBL_EXPORT_ALL_DATA' => 'Exporta todos los datos' , 'LBL_EXPORT_DATA_IN_CURRENT_PAGE' => 'Exportar datos de la página actual', 'LBL_EXPORT_SELECTED_RECORDS' => 'Exportar registros seleccionados', @@ -396,7 +397,7 @@ $languageStrings = array( 'Apparel' => 'Ropa' , 'Banking' => 'Banca' , 'Billing Address' => 'Dirección de facturación' , - 'Billing City' => 'Deleg./Mpio. de facturación' , + 'Billing City' => 'Municipio/AlcaldÃa de facturación' , 'Billing Code' => 'Código postal de facturación' , 'Billing Country' => 'PaÃs de facturación' , 'Billing Po Box' => 'Colonia de facturación' , @@ -410,7 +411,7 @@ $languageStrings = array( 'Carrier' => 'Transportista' , 'Category' => 'CategorÃa' , 'Chemicals' => 'Quimicos' , - 'City' => 'Ciudad' , + 'City' => 'Municipio/AlcaldÃa' , 'Cold Call' => 'Llamada en frÃo' , 'Existing Customer' => 'Cliente existente' , 'Self Generated' => 'Autogenerado' , @@ -420,7 +421,7 @@ $languageStrings = array( 'Direct Mail' => 'Correo directo' , 'Conference' => 'Conferencia' , 'Trade Show' => 'Feria comercial' , - 'Web Site' => 'Sitio eeb' , + 'Web Site' => 'Página web' , 'Word of mouth' => 'Boca a boca' , 'Other' => 'Otro' , '--None--' => '-Ninguno-' , @@ -458,7 +459,7 @@ $languageStrings = array( 'Contact Name' => 'Nombre de contacto' , 'Conversion Rate' => 'Tasa de conversión' , 'Shipping Address' => 'Dirección de envÃo' , - 'Shipping City' => 'Deleg./Mpio. de envÃo' , + 'Shipping City' => 'Municipio/AlcaldÃa de envÃo' , 'Shipping State' => 'Estado de envÃo' , 'Shipping Code' => 'Código postal de envÃo' , 'Shipping Country' => 'PaÃs de envÃo' , @@ -506,20 +507,20 @@ $languageStrings = array( 'Tax Type' => 'Tipo de impuesto' , 'S&H Amount' => 'Importe de envÃo y manejo' , 'Status' => 'Estado' , - 'Vendor Name' => 'Nombre del proveedor' , - 'LBL_ADDRESS_INFORMATION' => 'Detalles de la dirección' , - 'LBL_DESCRIPTION_INFORMATION' => 'Detalles de la descripción' , + 'Vendor Name' => 'Proveedor' , + 'LBL_ADDRESS_INFORMATION' => 'Dirección' , + 'LBL_DESCRIPTION_INFORMATION' => 'Descripción' , 'LBL_TERMS_INFORMATION' => 'Términos y condiciones' , - 'LBL_PRICING_INFORMATION' => 'Información de precios' , + 'LBL_PRICING_INFORMATION' => 'Precios' , 'LBL_RELATED_PRODUCTS' => 'Detalles del producto' , - 'LBL_REMINDER_INFORMATION' => 'Detalles del recordatorio' , + 'LBL_REMINDER_INFORMATION' => 'Recordatorio' , 'LBL_FOLDER_SAVED' => 'Carpeta guardada' , 'LBL_FOLDER_EXISTS' => 'La carpeta ya existe' , 'LBL_FOLDER_DELETED' => 'Carpeta borrada' , 'LBL_EDIT_FOLDER' => 'Editar carpeta', - 'Lead Source' => 'Origen de Prospecto' , - 'Mobile' => 'Tel. Móvil' , - 'Notify Owner' => 'Notificar al propietario' , + 'Lead Source' => 'Origen del Prospecto' , + 'Mobile' => 'Tel. móvil' , + 'Notify Owner' => 'Notificar al asignado' , 'Other Phone' => 'Tel. Directo' , 'Phone' => 'Teléfono' , 'State' => 'Estado' , @@ -573,7 +574,7 @@ $languageStrings = array( 'LBL_NOTE' => 'Nota' , 'LBL_SELECT_OPTION' => 'Selecciona una opción' , 'LBL_TOOLTIP' => 'Administración de información sobre herramientas' , - 'LBL_MODULE_SEQUENCE_NUMBERING' => '%s Numeración' , + 'LBL_MODULE_SEQUENCE_NUMBERING' => 'Numeración de %s' , 'LBL_CUSTOM_FIELD_MAPPING' => 'Asignación de campos personalizados' , 'LBL_WEBFORMS' => 'WebForms' , 'SINGLE_Emails' => 'Correo' , @@ -589,8 +590,8 @@ $languageStrings = array( 'LBL_COMPOSE_EMAIL' => 'Redactar correo' , 'LBL_CC' => 'Cc' , 'LBL_BCC' => 'Bcc' , - 'LBL_ADD_CC' => 'Añadir Cc' , - 'LBL_ADD_BCC' => 'Añadir Bcc' , + 'LBL_ADD_CC' => 'Agregar Cc' , + 'LBL_ADD_BCC' => 'Agregar Bcc' , 'LBL_MAX_UPLOAD_SIZE' => 'El tamaño máximo de los archivos es de' , 'LBL_EXCEEDED' => 'Excedido' , @@ -603,20 +604,20 @@ $languageStrings = array( 'Discount' => 'descuento', 'Net Total' => 'total neto', 'Product Code' => 'código del producto', - 'Customer Name' => 'Nombre del cliente', + 'Customer Name' => 'Cliente', 'Price'=>'precio', 'Tax:' => 'impuesto:', - 'Contact Name' => 'Nombre del contacto', + 'Contact Name' => 'Contacto', 'Grand Total:' => 'gran total:', 'Fax: ' => 'Fax: ', - 'Website: ' => 'sitio web: ', + 'Website: ' => 'Página web: ', 'Tax' => 'impuesto', 'LBL_ALPHABETS' => 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z', //Realted tab strings 'Service Contracts' => 'Contratos de servicio', 'Projects' => 'Proyectos', - 'Sales Order' => 'Órdenes de venta', + 'Sales Order' => 'Pedidos', 'Purchase Order' => 'Órdenes de compra', 'Payments' => 'Pagos', 'List and Campaigns' => 'Lista y campañas', @@ -630,7 +631,7 @@ $languageStrings = array( 'Parent Product' => 'Producto padre', 'LBL_PRODUCT_BUNDLE' => 'Paquete de producto', 'LBL_EDIT_QUANTITY' => 'Editar cantidad', - 'LBL_ADD_TO_PRODUCTS' => 'Añadir productos', + 'LBL_ADD_TO_PRODUCTS' => 'Agregar productos', 'LBL_CUSTOMIZE_MAIN_MENU' => 'Personalizar menú principal', //For Print Templates @@ -686,22 +687,22 @@ $languageStrings = array( 'Related To' => 'Relacionado con', // Date Conditions - 'LBL_LESS_THAN_DAYS_AGO' => 'Menos dÃas atrás', - 'LBL_MORE_THAN_DAYS_AGO' => 'Más dÃas atrás', - 'LBL_IN_LESS_THAN' => 'En menos de', - 'LBL_IN_MORE_THAN' => 'En más de', - 'LBL_DAYS_AGO' => 'DÃas atrás', - 'LBL_DAYS_LATER' => 'DÃas después', - 'LBL_LESS_THAN_HOURS_BEFORE' => 'Menos de horas antes', - 'LBL_LESS_THAN_HOURS_LATER' => 'A menos de hora más tarde', - 'LBL_MORE_THAN_HOURS_BEFORE' => 'Más de horas atrás', - 'LBL_MORE_THAN_HOURS_LATER' => 'Más de horas después', + 'LBL_LESS_THAN_DAYS_AGO' => 'han pasado menos de N dÃas desde la fecha', + 'LBL_MORE_THAN_DAYS_AGO' => 'han pasado más de N dÃas desde la fecha', + 'LBL_IN_LESS_THAN' => 'en menos de', + 'LBL_IN_MORE_THAN' => 'en más de', + 'LBL_DAYS_AGO' => 'han pasado exactamente N dÃas desde la fecha', + 'LBL_DAYS_LATER' => 'faltan exactamente N dÃas para la fecha', + 'LBL_LESS_THAN_HOURS_BEFORE' => 'hace menos de N horas atrás', + 'LBL_LESS_THAN_HOURS_LATER' => 'en menos de N horas después', + 'LBL_MORE_THAN_HOURS_BEFORE' => 'hace más de N horas atrás', + 'LBL_MORE_THAN_HOURS_LATER' => 'en más de N horas después', 'LBL_INTERNAL_COMMENT' => 'Comentario interno', 'LBL_NOTE_EXISTING_ATTACHMENTS_WILL_BE_REPLACED' => 'Nota: los archivos adjuntos existentes (imágenes / archivos) serán reemplazados', //common standard fields 'Created By' => 'Creado por', 'LBL_SEND_PDF_FOR_SIGNING' => 'Enviar PDF para su firma', - 'LBL_INCLUDE_SIGNATURE_INFO' => 'La firma establecida en Mis preferencias se añadirá a la parte inferior del correo electrónico', + 'LBL_INCLUDE_SIGNATURE_INFO' => 'La firma establecida en Mis preferencias se agregará a la parte inferior del correo electrónico', 'LBL_INCLUDE_SIGNATURE' => 'Incluir firma', 'LBL_CLICK_HERE'=>'Haga clic aquÃ', @@ -716,21 +717,21 @@ $languageStrings = array( 'LBL_JOINED' => 'Unido', 'LBL_SEARCH_PROFILES_IN_TWITTER' => 'Buscar perfiles en Twitter', 'LBL_CHOOSE_ANOTHER_PROFILE' => 'Elija otro perfil', - 'LBL_ADD_TICKET' => 'Añadir entradas', - 'LBL_ADD_OPPORTUNITY' => 'Añadir Oportunidad', + 'LBL_ADD_TICKET' => 'Agregar Caso', + 'LBL_ADD_OPPORTUNITY' => 'Agregar Oportunidad', 'LBL_RETWEET' => 'Retwitear', 'LBL_RETWEETS' => 'Retwiteos', 'LBL_UNDO_RETWEET' => 'Deshacer retwitear', 'LBL_FAVOURITE' => 'Favorito', 'LBL_UNDO_FAVOURITE' => 'Deshacer favorito', 'LBL_TWITTER_HANDLER_MSG' => 'Para ver el resumen de perfil y la historia de este contacto añada elnombre de usuario de Twiter de ese contacto o busque los perfiles utilizando la liga que se muestra en seguida.', - 'LBL_ADD_EVENT_OR_TODO' => 'Añadir Evento / Tarea', - 'LBL_ADD_TICKET_CONTACT' => 'Añadir Ticket + Contacto', - 'LBL_ADD_OPPORTUNITY_CONTACT' => 'Añadir Oportunidad + Contacto', + 'LBL_ADD_EVENT_OR_TODO' => 'Agregar Evento / Tarea', + 'LBL_ADD_TICKET_CONTACT' => 'Agregar Ticket + Contacto', + 'LBL_ADD_OPPORTUNITY_CONTACT' => 'Agregar Oportunidad + Contacto', 'LBL_SOCIAL_TWITTER_WIDGET' => 'Actividad de twitter', 'LBL_TWITTER_HANDLER_DETAILS' => 'Detalles del nombre de usuario de Twitter', 'LBL_PRIMARY_TWITTER' => 'Twitter principal', - 'LBL_ADD_TWITTER_HANDLER' => 'Añadir nombre de usuario de Twitter', + 'LBL_ADD_TWITTER_HANDLER' => 'Agregar nombre de usuario de Twitter', 'LBL_VIEW_TICKET' => 'Ver Ticket', 'LBL_VIEW_OPPORTUNITY' => 'Ver Oportunidad', 'LBL_CLICK_TO_SELECT_PROFILE' => 'Haga clic para seleccionar el perfil', @@ -819,23 +820,23 @@ $languageStrings = array( 'LBL_VIEW' => 'Vista', 'LBL_CHANGE_USER' => 'Cambiar usuario', 'LBL_SELECT_COLOR' => 'Elegir color', - 'LBL_CREATION' => 'creación', - 'LBL_STARRED' => 'Destacado', - 'LBL_UNSTARRED' => 'No destacado', + 'LBL_CREATION' => 'Creación', + 'LBL_STARRED' => 'Haz clic para dejar de seguir', + 'LBL_UNSTARRED' => 'Seguir', 'LBL_EDIT_EMAIL_PREFERENCE_TOOLTIP' => 'Edite estas preferencias de configuración desplegable en detalle o vista de lista del módulo', 'LBL_SYSTEM' =>'Sistema', 'LBL_PREVIEW' => 'Preestreno', 'LBL_UNLINKED' => 'Sin liga', - 'Any' => 'Ninguna', + 'Any' => 'Alguna', 'LBL_NA' => '-NA-', - 'LBL_DISABLED' => 'Discapacitado', + 'LBL_DISABLED' => 'Deshabilitado', 'LBL_SHOW_MAP'=>'Ver mapa', 'LBL_LINKED' => 'Vinculado', 'LBL_ADDING_NEW' => 'Agregar nuevo', 'LBL_LESS' => 'Menos', 'LBL_COMMENT' => 'Comentario', - 'LBL_NOT_STARRED' => 'No destacado', + 'LBL_NOT_STARRED' => 'Haz clic para seguir', 'LBL_QUICK_VIEW' => 'Vista rápida', 'LBL_NOTIFICATION_CENTER' => 'Centro de notificaciones', 'LBL_NOTIFICATION' => 'Notificación', @@ -865,7 +866,7 @@ $languageStrings = array( 'LBL_REASON_FOR_CHANGING_COMMENT' => 'Razón para cambiar el comentario', 'LBL_APPLBL_NONEROVE' => 'Aprobar', 'LBL_ITEM' => 'Elemento', - 'Add Note' => 'Añadir documento', + 'Add Note' => 'Agregar documento', 'LBL_form' => 'de', 'LBL_to' => 'a', 'LBL_DAY(S' => 'dÃa(s)', @@ -940,6 +941,7 @@ Haga clic en el botón para autorizar y obtener contactos de Google.', las vistas de lista.', 'LBL_DOEST_FIRST_ROW_HEADER' => '¿La primera fila del archivo contiene los encabezados de columna?', 'LBL_SELECT_CSV_FILE' => 'Seleccione el archivo CSV', + 'Select from My Computer' => 'Seleccionar desde mi computadora', 'LBL_START_IMPORTING' => 'Empezar a importar', 'LBL_PRIMARY' => 'Principal', 'LBL_GOOGLE_SYNC_INTIATED_MSG' => 'Su importación está programada, sus contactos se importarán enseguida.<br> Continuar con el paso Siguiente interrumpirá la importación.', @@ -969,15 +971,15 @@ fuera de Vtiger.', 'LBL_CLICK_HERE_TO_MANAGE_LIST_COLUMNS' => 'Haga clic aquà para administrar las columnas de la lista', 'LBL_SHOW_MORE' => 'Mostrar más', 'LBL_DISPLAYING_RESULTS' => 'Visualización de resultados', - 'LBL_ADD_STAR' => 'Añadir estrella', + 'LBL_ADD_STAR' => 'Agregar estrella', 'LBL_REMOVE_STAR' => 'Quitar estrella', 'LBL_UPDATE_LIST' => 'Actualizar la lista', 'LBL_SHARE_THIS_LIST' => 'Compartir la lista', 'LBL_ADD_USERS_ROLES' => 'Agregar usuarios y roles', 'LBL_LISTS' => 'Listas', - 'LBL_SEARCH_FOR_LIST' => 'Búsqueda por lista', - 'LBL_MY_LIST' => 'Mi lista', - 'LBL_SHARED_LIST' => 'Lista compartida', + 'LBL_SEARCH_FOR_LIST' => 'Buscar lista...', + 'LBL_MY_LIST' => 'Mis listas', + 'LBL_SHARED_LIST' => 'Listas compartidas', 'LBL_MERGE_SELECTED_RECORDS' => 'Fusionar registros seleccionados', 'LBL_MATCH_CRITERIA' => 'Duplicar criterios de búsqueda', 'LBL_MATCH_FIELDS' => 'Encontrar campos que coincidan', @@ -993,7 +995,7 @@ fuera de Vtiger.', 'LBL_SEARCH_FIELDS' => 'Campos de búsqueda', 'ExtensionStore' => 'Tienda de extensiones', 'LBL_EXTENSIONS' => 'Extensiones', - 'LBL_CREATE_LIST' => 'Crear una nueva lista', + 'LBL_CREATE_LIST' => 'Crear lista', 'sent' => 'Enviado', 'accepted' => 'Aceptado', 'LBL_RECENT_COMMENTS' => 'Comentarios recientes', @@ -1008,11 +1010,11 @@ fuera de Vtiger.', 'LBL_TAG_FOR' => 'Etiqueta para %s', 'LBL_CURRENT_TAGS' => 'Etiquetas', 'LBL_CREATE_NEW_TAG' => 'Crear nueva etiqueta', - 'LBL_ADD_TAG' => 'Añadir etiqueta', + 'LBL_ADD_TAG' => 'Agregar etiqueta', 'LBL_REMOVE_TAG' => 'Quitar la etiqueta de', 'LBL_TAG_SEPARATOR_DESC' => 'Utilice comas para separar varias etiquetas', 'LBL_ENTER_TAG_NAME' => 'Introduzca el nombre de la etiqueta', - 'LBL_ADD_NEW_TAG' => 'Añadir etiqueta', + 'LBL_ADD_NEW_TAG' => 'Agregar etiqueta', 'LBL_SELECT_EXISTING_TAG' => 'Escriba aquà para seleccionar una etiqueta existente', 'LBL_ADD_OR_SELECT_TAG' => 'Agregar o seleccionar la etiqueta', 'LBL_SELECT_FROM_AVAIL_TAG' => 'Seleccionar de la lista de etiquetas', @@ -1025,7 +1027,7 @@ fuera de Vtiger.', 'LBL_UPLOAD' => 'Subir', 'LBL_ATTACH_FILES' => 'Adjuntar archivos', 'LBL_KEY_FIELDS' => 'Campos clave', - 'LBL_ADD_TODO' => 'Añadir tarea', + 'LBL_ADD_TODO' => 'Agregar tarea', 'LBL_VIEW_DETAILS' => 'Ver detalles', 'LBL_HAPPENED_ON' => 'Sucedió en', 'LBL_HAPPENED' => 'Sucedió', @@ -1280,7 +1282,7 @@ $jsLanguageStrings = array( 'JS_ADD_DEMO_DATA_CONFIRMATION'=> '¿Está seguro que desea agregar registros de demostración para todos los módulos?', 'JS_ADD_DEMO_DATA_INFO'=> 'Los registros de demostración se pueden eliminar haciendo clic en el botón "Limpiar información demo".', 'JS_CLEAR_DEMO_DATA_CONFIRMATION'=> '¿Está seguro que desea eliminar los datos de demostración en todos los módulos?', - 'JS_CLEAR_DEMO_DATA_INFO'=> 'Se pueden agregar registros de demostración haciendo clic en el botón "Añadir demo de datos".', + 'JS_CLEAR_DEMO_DATA_INFO'=> 'Se pueden agregar registros de demostración haciendo clic en el botón "Agregar demo de datos".', 'JS_DEMO_DATA_GETTING_POPULATED'=> 'La demostración de datos se está añadiendo, por favor espere ...', 'JS_DEMO_DATA_GETTING_CLEARED'=> 'Los datos de demostración se están borrando, por favor espere ...', 'JS_DEMO_DATA_ADDED' => 'Se añadieron datos de demostración a todos los módulos', @@ -1311,13 +1313,13 @@ $jsLanguageStrings = array( 'JS_SUITABLE_VTIGER_FIELD_NOT_AVAILABLE_FOR_MAPPING' => 'El campo Adecuado Vtiger no está disponible para la asignación', 'JS_SAVED_SUCCESSFULLY' => 'Ajustes guardados correctamente', - 'phone' => 'Teléfono', - 'email' => 'Correo electrónico', + 'phone' => 'Tel.', + 'email' => 'Correo', 'url' => 'Url', 'home' => 'Casa', 'work' => 'Trabajo', 'custom' => 'personalizado', - 'mobile' => 'Móvil', + 'mobile' => 'Tel. móvil', 'main' => 'Principal', 'work_fax' => 'Fax', 'home_fax' => 'Fax casa', @@ -1431,8 +1433,8 @@ $jsLanguageStrings = array( 'JS_INVALID_URL' => 'Dirección URL no válida', 'JS_ARE_YOU_SURE_YOU_WANT_TO_DELETE' => '¿Está seguro de que desea eliminar?', 'JS_TAB_LABEL_EXCEEDS_CHARS' => 'El tamaño de la etiqueta de la pestaña debe ser de menos de %s caracteres', - 'JS_STARRED' => 'Destacado', - 'JS_NOT_STARRED' => 'No destacado', + 'JS_STARRED' => 'Siguiendo', + 'JS_NOT_STARRED' => 'No siguiendo', 'JS_NO_TAG_EXISTS' => 'No existe la etiqueta', 'JS_HELP_AND_SUPPORT' => 'Ayuda Y soporte', 'JS_WHAT_DO_YOU_NEED_HELP_WITH' => '¿Necesita ayuda?', @@ -1480,4 +1482,24 @@ $jsLanguageStrings = array( 'JS_PASSWORD_MISMATCH_ERROR' => 'Por favor, vuelva a introducir las contraseñas. Los valores de "nueva contraseña" y "Confirmar contraseña" no coinciden.', 'JS_LIST_DELETE_CONFIRMATION' => '¿Esta seguro que quieres borrarlo?', 'JS_WIDGET_RESIZING_WAIT_MSG' => 'El contenido del widget se volverá cargar después de cambiar el tamaño.', + + 'JS_FOLLOW_RECORD' => 'Siguiendo el registro', + 'JS_FOLLOWING' => 'Siguiendo', + 'JS_UNFOLLOW_RECORD' => 'Dejaste de seguir el registro', + 'JS_UNFOLLOWING' => 'Dejar de seguir', + 'JS_RECORD_CREATED' => 'Registro creado', + 'JS_RECORD_UPDATED' => 'Registro actualizado', + 'JS_LIST_SAVED' => 'Lista guardada', + 'JS_TAB_DELETED' => 'borrado', + 'JS_TAB_RENAMED' => 'Renombrado', + 'JS_TAB_REORDERED' => 'Reordenado', + 'JS_RECIPIENT_PREFERENCES_SAVED' => 'Preferencias del receptor guardadas', + 'JS_TASK_ADDED' => 'Tarea agregado', + 'JS_MARKED_COMPLETED' => 'Marcado como completado', + 'JS_TASK_PRIORITY_CHANGED' => 'La prioridad de la tarea ha cambiado', + 'JS_NO_PERMISSION_TO_MARK_AS_HELD' => 'No tienes permisos para marcar el evento como realizado', + 'JS_TAG_ADDED' => 'Etiqueta agregada', + 'JS_TAB_DELETED' => 'borrada', + 'JS_TAB_RENAMED' => 'Renombrada', + 'JS_TAB_REORDERED' =>'Reordenada', ); diff --git a/resources/app.js b/resources/app.js index fe235381ad42dcc6cd07188f95dc3f367e62f769..55e86da4447cb222c503a77d5b69a870995182c1 100644 --- a/resources/app.js +++ b/resources/app.js @@ -535,12 +535,24 @@ var app = { } }, - convertToDatePickerFormat: function(dateFormat){ - if(dateFormat == 'yyyy-mm-dd'){ + convertToDatePickerFormat: function (dateFormat) { + if ('dd.mm.yyyy' === dateFormat) { + return 'd.m.Y'; + } else if ('mm.dd.yyyy' === dateFormat) { + return 'm.d.Y'; + } else if ('yyyy.mm.dd' === dateFormat) { + return 'Y.m.d'; + } else if ('dd/mm/yyyy' === dateFormat) { + return 'd/m/Y'; + } else if ('mm/dd/yyyy' === dateFormat) { + return 'm/d/Y'; + } else if ('yyyy/mm/dd' === dateFormat) { + return 'Y/m/d'; + } else if ('yyyy-mm-dd' === dateFormat) { return 'Y-m-d'; - } else if(dateFormat == 'mm-dd-yyyy') { + } else if ('mm-dd-yyyy' === dateFormat) { return 'm-d-Y'; - } else if (dateFormat == 'dd-mm-yyyy') { + } else if ('dd-mm-yyyy' === dateFormat) { return 'd-m-Y'; } }, diff --git a/resources/helper.js b/resources/helper.js index 831f09ca83c78895b28c4ba2072c532bb33f1553..b068f767d998c8e9c37645bd704f3d36af6078bb 100644 --- a/resources/helper.js +++ b/resources/helper.js @@ -56,12 +56,30 @@ jQuery.Class("Vtiger_Helper_Js",{ var timeComponent = dateTimeComponents[1]; var seconds = '00'; - var splittedDate = dateComponent.split("-"); + var splittedDate = ''; + var splittedDateFormat = ''; + + if (dateFormat.indexOf('.') !== -1) { + splittedDate = dateComponent.split('.'); + } else if (dateFormat.indexOf('/') !== -1) { + splittedDate = dateComponent.split('/'); + } else { + splittedDate = dateComponent.split('-'); + } + if (splittedDate.length > 3) { var errorMsg = app.vtranslate("JS_INVALID_DATE"); throw errorMsg; } - var splittedDateFormat = dateFormat.split("-"); + + if (dateFormat.indexOf('.') !== -1) { + splittedDateFormat = dateFormat.split('.'); + } else if (dateFormat.indexOf('/') !== -1) { + splittedDateFormat = dateFormat.split('/'); + } else { + splittedDateFormat = dateFormat.split('-'); + } + var year = splittedDate[splittedDateFormat.indexOf("yyyy")]; var month = splittedDate[splittedDateFormat.indexOf("mm")]; var date = splittedDate[splittedDateFormat.indexOf("dd")]; diff --git a/soap/customerportal.php b/soap/customerportal.php deleted file mode 100755 index c286d18947e3157877dd2973349e8ece591a0ce8..0000000000000000000000000000000000000000 --- a/soap/customerportal.php +++ /dev/null @@ -1,3354 +0,0 @@ -<?php -/********************************************************************************* - ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - * - ********************************************************************************/ - -/** - * URL Verfication - Required to overcome Apache mis-configuration and leading to shared setup mode. - */ -require_once 'config.php'; -if (file_exists('config_override.php')) { - include_once 'config_override.php'; -} - -include_once 'vtlib/Vtiger/Module.php'; -include_once 'vtlib/Vtiger/Functions.php'; -include_once 'includes/main/WebUI.php'; - -require_once('libraries/nusoap/nusoap.php'); -require_once('modules/HelpDesk/HelpDesk.php'); -require_once('modules/Emails/mail.php'); -require_once 'modules/Users/Users.php'; - - -/** Configure language for server response translation */ -global $default_language, $current_language; -if(!isset($current_language)) $current_language = $default_language; - -$userid = getPortalUserid(); -$user = new Users(); -$current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - -$log = LoggerManager::getLogger('customerportal'); - -error_reporting(0); - -$NAMESPACE = 'http://www.vtiger.com/products/crm'; -$server = new soap_server; - -$server->configureWSDL('customerportal'); - -$server->wsdl->addComplexType( - 'common_array', - 'complexType', - 'array', - '', - array( - 'fieldname' => array('name'=>'fieldname','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'common_array1', - 'complexType', - 'array', - '', - 'SOAP-ENC:Array', - array(), - array( - array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:common_array[]') - ), - 'tns:common_array' -); - -$server->wsdl->addComplexType( - 'add_contact_detail_array', - 'complexType', - 'array', - '', - array( - 'salutation' => array('name'=>'salutation','type'=>'xsd:string'), - 'firstname' => array('name'=>'firstname','type'=>'xsd:string'), - 'phone' => array('name'=>'phone','type'=>'xsd:string'), - 'lastname' => array('name'=>'lastname','type'=>'xsd:string'), - 'mobile' => array('name'=>'mobile','type'=>'xsd:string'), - 'accountid' => array('name'=>'accountid','type'=>'xsd:string'), - 'leadsource' => array('name'=>'leadsource','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'field_details_array', - 'complexType', - 'array', - '', - array( - 'fieldlabel' => array('name'=>'fieldlabel','type'=>'xsd:string'), - 'fieldvalue' => array('name'=>'fieldvalue','type'=>'xsd:string'), - ) -); -$server->wsdl->addComplexType( - 'field_datalist_array', - 'complexType', - 'array', - '', - array( - 'fielddata' => array('name'=>'fielddata','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'product_list_array', - 'complexType', - 'array', - '', - array( - 'productid' => array('name'=>'productid','type'=>'xsd:string'), - 'productname' => array('name'=>'productname','type'=>'xsd:string'), - 'productcode' => array('name'=>'productcode','type'=>'xsd:string'), - 'commissionrate' => array('name'=>'commissionrate','type'=>'xsd:string'), - 'qtyinstock' => array('name'=>'qtyinstock','type'=>'xsd:string'), - 'qty_per_unit' => array('name'=>'qty_per_unit','type'=>'xsd:string'), - 'unit_price' => array('name'=>'unit_price','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'get_ticket_attachments_array', - 'complexType', - 'array', - '', - array( - 'files' => array( - 'fileid'=>'xsd:string','type'=>'tns:xsd:string', - 'filename'=>'xsd:string','type'=>'tns:xsd:string', - 'filesize'=>'xsd:string','type'=>'tns:xsd:string', - 'filetype'=>'xsd:string','type'=>'tns:xsd:string', - 'filecontents'=>'xsd:string','type'=>'tns:xsd:string' - ), - ) -); - - -$server->register( - 'authenticate_user', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'change_password', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'create_ticket', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -//for a particular contact ticket list -$server->register( - 'get_tickets_list', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_ticket_comments', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_combo_values', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_KBase_details', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array1'), - $NAMESPACE); - -$server->register( - 'save_faq_comment', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'update_ticket_comment', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'close_current_ticket', - array('fieldname'=>'tns:common_array'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'update_login_details', - array('fieldname'=>'tns:common_array'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'send_mail_for_password', - array('email'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'get_ticket_creator', - array('fieldname'=>'tns:common_array'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'get_picklists', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_ticket_attachments', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_filecontent', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'add_ticket_attachment', - array('fieldname'=>'tns:common_array'), - array('return'=>'tns:common_array'), - $NAMESPACE); - -$server->register( - 'get_cf_field_details', - array('id'=>'xsd:string','contactid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -$server->register( - 'get_check_account_id', - array('id'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - //to get details of quotes,invoices and documents -$server->register( - 'get_details', - array('id'=>'xsd:string','block'=>'xsd:string','contactid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - - //to get the products list for the entire account of a contact -$server->register( - 'get_product_list_values', - array('id'=>'xsd:string','block'=>'xsd:string','sessionid'=>'xsd:string','only_mine'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -$server->register( - 'get_list_values', - array('id'=>'xsd:string','block'=>'xsd:string','sessionid'=>'xsd:string','only_mine'=>'xsd:string'), - array('return'=>'tns:field_datalist_array'), - $NAMESPACE); - -$server->register( - 'get_product_urllist', - array('customerid'=>'xsd:string','productid'=>'xsd:string','block'=>'xsd:string'), - array('return'=>'tns:field_datalist_array'), - $NAMESPACE); - -$server->register( - 'get_pdf', - array('id'=>'xsd:string','block'=>'xsd:string','contactid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_datalist_array'), - $NAMESPACE); - -$server->register( - 'get_filecontent_detail', - array('id'=>'xsd:string','folderid'=>'xsd:string','block'=>'xsd:string','contactid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:get_ticket_attachments_array'), - $NAMESPACE); - -$server->register( - 'get_invoice_detail', - array('id'=>'xsd:string','block'=>'xsd:string','contactid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -$server->register( - 'get_modules', - array(), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -$server->register( - 'show_all', - array('module'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'get_documents', - array('id'=>'xsd:string','module'=>'xsd:string','customerid'=>'xsd:string','sessionid'=> 'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -$server->register( - 'updateCount', - array('id'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -//to get the Services list for the entire account of a contact -$server->register( - 'get_service_list_values', - array('id'=>'xsd:string','module'=>'xsd:string','sessionid'=>'xsd:string','only_mine'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -//to get the Project Tasks for a given Project -$server->register( - 'get_project_components', - array('id'=>'xsd:string','module'=>'xsd:string','customerid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -//to get the Project Tickets for a given Project -$server->register( - 'get_project_tickets', - array('id'=>'xsd:string','module'=>'xsd:string','customerid'=>'xsd:string','sessionid'=>'xsd:string'), - array('return'=>'tns:field_details_array'), - $NAMESPACE); - -/** - * Helper class to provide functionality like caching etc... - */ -class Vtiger_Soap_CustomerPortal { - - /** Preference value caching */ - static $_prefs_cache = array(); - static function lookupPrefValue($key) { - if(self::$_prefs_cache[$key]) { - return self::$_prefs_cache[$key]; - } - return false; - } - static function updatePrefValue($key, $value) { - self::$_prefs_cache[$key] = $value; - } - - /** Sessionid caching for re-use */ - static $_sessionid = array(); - static function lookupSessionId($key) { - if(isset(self::$_sessionid[$key])) { - return self::$_sessionid[$key]; - } - return false; - } - static function updateSessionId($key, $value) { - self::$_sessionid[$key] = $value; - } - - /** Store available module information */ - static $_modules = false; - static function lookupAllowedModules() { - return self::$_modules; - } - static function updateAllowedModules($modules) { - self::$_modules = $modules; - } - -} - -/** function used to get the list of ticket comments - * @param array $input_array - array which contains the following parameters - * int $id - customer id - * string $sessionid - session id - * int $ticketid - ticket id - * @return array $response - ticket comments and details as a array with elements comments, owner and createdtime which will be returned from the function get_ticket_comments_list -*/ -function get_ticket_comments($input_array) -{ - global $adb,$log,$current_user; - $adb->println("Entering customer portal function get_ticket_comments"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = (int) $input_array['ticketid']; - - if(!validateSession($id,$sessionid)) - return null; - - $userid = getPortalUserid(); - $user = new Users(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - if(isPermitted('ModComments', 'DetailView')) { - $response = _getTicketModComments($ticketid); - } - return $response; -} - -/** - * Function added to get the Tickets Comments - * @global <PearDataBase> $adb - * @param <Integer> $ticketId - * @return <Array> - */ -function _getTicketModComments($ticketId) { - global $adb; - $sql = "SELECT * FROM vtiger_modcomments - INNER JOIN vtiger_crmentity ON vtiger_modcomments.modcommentsid = vtiger_crmentity.crmid AND deleted = 0 - WHERE related_to = ? ORDER BY createdtime DESC"; - $result = $adb->pquery($sql, array($ticketId)); - $rows = $adb->num_rows($result); - $output = array(); - - for($i=0; $i<$rows; $i++) { - $customer = $adb->query_result($result, $i, 'customer'); - $owner = $adb->query_result($result, $i, 'smownerid'); - - if(!empty($customer)) { - $emailResult = $adb->pquery('SELECT * FROM vtiger_portalinfo WHERE id = ?', array($customer)); - $output[$i]['owner'] = $adb->query_result($emailResult, 0 ,'user_name'); - } else { - $output[$i]['owner'] = getOwnerName($owner); - } - - $output[$i]['comments'] = nl2br($adb->query_result($result, $i, 'commentcontent')); - $output[$i]['createdtime'] = $adb->query_result($result, $i, 'createdtime'); - } - return $output; -} - -/** function used to get the combo values ie., picklist values of the HelpDesk module and also the list of products - * @param array $input_array - array which contains the following parameters - => int $id - customer id - string $sessionid - session id - * return array $output - array which contains the product id, product name, ticketpriorities, ticketseverities, ticketcategories and module owners list - */ -function get_combo_values($input_array) -{ - global $adb,$log; - $adb->println("Entering customer portal function get_combo_values"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - - if(!validateSession($id,$sessionid)) - return null; - - $output = Array(); - $sql = "select productid, productname from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_products.productid where vtiger_crmentity.deleted=0"; - $result = $adb->pquery($sql, array()); - $noofrows = $adb->num_rows($result); - for($i=0;$i<$noofrows;$i++) - { - $check = checkModuleActive('Products'); - if($check == false){ - $output['productid']['productid']="#MODULE INACTIVE#"; - $output['productname']['productname']="#MODULE INACTIVE#"; - break; - } - $output['productid']['productid'][$i] = $adb->query_result($result,$i,"productid"); - $output['productname']['productname'][$i] = decode_html($adb->query_result($result,$i,"productname")); - } - - $userid = getPortalUserid(); - - //We are going to display the picklist entries associated with admin user (role is H2) - $roleres = $adb->pquery("SELECT roleid from vtiger_user2role where userid = ?",array($userid)); - $RowCount = $adb->num_rows($roleres); - if($RowCount > 0){ - $admin_role = $adb->query_result($roleres,0,'roleid'); - } - $result1 = $adb->pquery("select vtiger_ticketpriorities.ticketpriorities from vtiger_ticketpriorities inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_ticketpriorities.picklist_valueid and vtiger_role2picklist.roleid='$admin_role' order by sortorderid", array()); - for($i=0;$i<$adb->num_rows($result1);$i++) - { - $output['ticketpriorities']['ticketpriorities'][$i] = $adb->query_result($result1,$i,"ticketpriorities"); - } - - $result2 = $adb->pquery("select vtiger_ticketseverities.ticketseverities from vtiger_ticketseverities inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_ticketseverities.picklist_valueid and vtiger_role2picklist.roleid='$admin_role' order by sortorderid", array()); - for($i=0;$i<$adb->num_rows($result2);$i++) - { - $output['ticketseverities']['ticketseverities'][$i] = $adb->query_result($result2,$i,"ticketseverities"); - } - - $result3 = $adb->pquery("select vtiger_ticketcategories.ticketcategories from vtiger_ticketcategories inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_ticketcategories.picklist_valueid and vtiger_role2picklist.roleid='$admin_role' order by sortorderid", array()); - for($i=0;$i<$adb->num_rows($result3);$i++) - { - $output['ticketcategories']['ticketcategories'][$i] = $adb->query_result($result3,$i,"ticketcategories"); - } - - // Gather service contract information - if(!vtlib_isModuleActive('ServiceContracts')) { - $output['serviceid']['serviceid']="#MODULE INACTIVE#"; - $output['servicename']['servicename']="#MODULE INACTIVE#"; - } else { - $servicequery = "SELECT vtiger_servicecontracts.servicecontractsid,vtiger_servicecontracts.subject - FROM vtiger_servicecontracts - INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid=vtiger_servicecontracts.servicecontractsid - AND vtiger_crmentity.deleted = 0 - WHERE vtiger_servicecontracts.sc_related_to = ?"; - $params = array($id); - $showAll = show_all('HelpDesk'); - if($showAll == 'true') { - $servicequery .= ' OR vtiger_servicecontracts.sc_related_to = (SELECT accountid FROM vtiger_contactdetails WHERE contactid=? AND accountid <> 0) - OR vtiger_servicecontracts.sc_related_to IN - (SELECT contactid FROM vtiger_contactdetails WHERE accountid = - (SELECT accountid FROM vtiger_contactdetails WHERE contactid=? AND accountid <> 0)) - '; - array_push($params, $id); - array_push($params, $id); - } - $serviceResult = $adb->pquery($servicequery,$params); - - for($i=0;$i < $adb->num_rows($serviceResult);$i++){ - $serviceid = $adb->query_result($serviceResult,$i,'servicecontractsid'); - $output['serviceid']['serviceid'][$i] = $serviceid; - $output['servicename']['servicename'][$i] = $adb->query_result($serviceResult,$i,'subject'); - } - } - - return $output; - -} - -/** function to get the Knowledge base details - * @param array $input_array - array which contains the following parameters - => int $id - customer id - string $sessionid - session id - * return array $result - array which contains the faqcategory, all product ids , product names and all faq details - */ -function get_KBase_details($input_array) -{ - global $adb,$log; - $adb->println("Entering customer portal function get_KBase_details"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - - if(!validateSession($id,$sessionid)) - return null; - - $userid = getPortalUserid(); - $result['faqcategory'] = array(); - $result['product'] = array(); - $result['faq'] = array(); - - //We are going to display the picklist entries associated with admin user (role is H2) - $roleres = $adb->pquery("SELECT roleid from vtiger_user2role where userid = ?",array($userid)); - $RowCount = $adb->num_rows($roleres); - if($RowCount > 0){ - $admin_role = $adb->query_result($roleres,0,'roleid'); - } - $category_query = "select vtiger_faqcategories.faqcategories from vtiger_faqcategories inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_faqcategories.picklist_valueid and vtiger_role2picklist.roleid='$admin_role'"; - $category_result = $adb->pquery($category_query, array()); - $category_noofrows = $adb->num_rows($category_result); - for($j=0;$j<$category_noofrows;$j++) - { - $faqcategory = $adb->query_result($category_result,$j,'faqcategories'); - $result['faqcategory'][$j] = $faqcategory; - } - - $check = checkModuleActive('Products'); - - if($check == true) { - $product_query = "select productid, productname from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_products.productid where vtiger_crmentity.deleted=0"; - $product_result = $adb->pquery($product_query, array()); - $product_noofrows = $adb->num_rows($product_result); - for($i=0;$i<$product_noofrows;$i++) - { - $productid = $adb->query_result($product_result,$i,'productid'); - $productname = $adb->query_result($product_result,$i,'productname'); - $result['product'][$i]['productid'] = $productid; - $result['product'][$i]['productname'] = $productname; - } - } - $faq_query = "select vtiger_faq.*, vtiger_crmentity.createdtime, vtiger_crmentity.modifiedtime from vtiger_faq " . - "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_faq.id " . - "where vtiger_crmentity.deleted=0 and vtiger_faq.status='Published' order by vtiger_crmentity.modifiedtime DESC"; - $faq_result = $adb->pquery($faq_query, array()); - $faq_noofrows = $adb->num_rows($faq_result); - for($k=0;$k<$faq_noofrows;$k++) - { - $faqid = $adb->query_result($faq_result,$k,'id'); - $moduleid = $adb->query_result($faq_result,$k,'faq_no'); - $result['faq'][$k]['faqno'] = $moduleid; - $result['faq'][$k]['id'] = $faqid; - if($check == true) { - $result['faq'][$k]['product_id'] = $adb->query_result($faq_result,$k,'product_id'); - } - $result['faq'][$k]['question'] = nl2br($adb->query_result($faq_result,$k,'question')); - $result['faq'][$k]['answer'] = nl2br($adb->query_result($faq_result,$k,'answer')); - $result['faq'][$k]['category'] = $adb->query_result($faq_result,$k,'category'); - $result['faq'][$k]['faqcreatedtime'] = $adb->query_result($faq_result,$k,'createdtime'); - $result['faq'][$k]['faqmodifiedtime'] = $adb->query_result($faq_result,$k,'modifiedtime'); - - $faq_comment_query = "select * from vtiger_faqcomments where faqid=? order by createdtime DESC"; - $faq_comment_result = $adb->pquery($faq_comment_query, array($faqid)); - $faq_comment_noofrows = $adb->num_rows($faq_comment_result); - for($l=0;$l<$faq_comment_noofrows;$l++) - { - $faqcomments = nl2br($adb->query_result($faq_comment_result,$l,'comments')); - $faqcreatedtime = $adb->query_result($faq_comment_result,$l,'createdtime'); - if($faqcomments != '') - { - $result['faq'][$k]['comments'][$l] = $faqcomments; - $result['faq'][$k]['createdtime'][$l] = $faqcreatedtime; - } - } - } - $adb->println($result); - return $result; -} - -/** function to save the faq comment - * @param array $input_array - array which contains the following values - => int $id - Customer ie., Contact id - int $sessionid - session id - int $faqid - faq id - string $comment - comment to be added with the FAQ - * return array $result - This function will call get_KBase_details and return that array - */ -function save_faq_comment($input_array) -{ - global $adb; - $adb->println("Entering customer portal function save_faq_comment"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $faqid = (int) $input_array['faqid']; - $comment = $input_array['comment']; - - if(!validateSession($id,$sessionid)) - return null; - - $createdtime = $adb->formatDate(date('YmdHis'),true); - if(trim($comment) != '') - { - $faq_query = "insert into vtiger_faqcomments values(?,?,?,?)"; - $adb->pquery($faq_query, array('', $faqid, $comment, $createdtime)); - } - - $params = Array('id'=>"$id", 'sessionid'=>"$sessionid"); - $result = get_KBase_details($input_array); - - return $result; -} - -/** function to get a list of tickets and to search tickets - * @param array $input_array - array which contains the following values - => int $id - Customer ie., Contact id - int $only_mine - if true it will display only tickets related to contact - otherwise displays tickets related to account it belongs and all the contacts that are under the same account - int $where - used for searching tickets - string $match - used for matching tickets - * return array $result - This function will call get_KBase_details and return that array - */ - - -function get_tickets_list($input_array) { - - //To avoid SQL injection we are type casting as well as bound the id variable. - $id = (int) vtlib_purify($input_array['id']); - - $only_mine = $input_array['onlymine']; - $where = vtlib_purifyForSql($input_array['where']); //addslashes is already added with where condition fields in portal itself - $match = $input_array['match']; - $sessionid = $input_array['sessionid']; - - if(!validateSession($id,$sessionid)) - return null; - - require_once('modules/HelpDesk/HelpDesk.php'); - require_once('include/utils/UserInfoUtil.php'); - - global $adb,$log; - global $current_user; - $log->debug("Entering customer portal function get_ticket_list"); - - $user = new Users(); - $userid = getPortalUserid(); - - $show_all = show_all('HelpDesk'); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - // Prepare where conditions based on search query - $join_type = ''; - $where_conditions = ''; - if(trim($where) != '') { - if($match == 'all' || $match == '') { - $join_type = " AND "; - } elseif($match == 'any') { - $join_type = " OR "; - } - $where = explode("&&&",$where); - $where_conditions = implode($join_type, $where); - } - - $entity_ids_list = array(); - if($only_mine == 'true' || $show_all == 'false') - { - array_push($entity_ids_list,$id); - } - else - { - $contactquery = "SELECT contactid, accountid FROM vtiger_contactdetails " . - " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . - " AND vtiger_crmentity.deleted = 0 " . - " WHERE (accountid = (SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?) AND accountid != 0) OR contactid = ?"; - $contactres = $adb->pquery($contactquery, array($id,$id)); - $no_of_cont = $adb->num_rows($contactres); - for($i=0;$i<$no_of_cont;$i++) - { - $cont_id = $adb->query_result($contactres,$i,'contactid'); - $acc_id = $adb->query_result($contactres,$i,'accountid'); - if(!in_array($cont_id, $entity_ids_list)) - $entity_ids_list[] = $cont_id; - if(!in_array($acc_id, $entity_ids_list) && $acc_id != '0') - $entity_ids_list[] = $acc_id; - } - } - - $focus = new HelpDesk(); - $focus->filterInactiveFields('HelpDesk'); - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - } - } - $query = "SELECT vtiger_troubletickets.*, vtiger_crmentity.smownerid,vtiger_crmentity.createdtime, vtiger_crmentity.modifiedtime, '' AS setype - FROM vtiger_troubletickets - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid AND vtiger_crmentity.deleted = 0 - WHERE (vtiger_troubletickets.contact_id IN (". generateQuestionMarks($entity_ids_list) .")"; - if($acc_id) { - $query .= " OR vtiger_troubletickets.parent_id = $acc_id) "; - } else { - $query .= ')'; - } - // Add conditions if there are any search parameters - if ($join_type != '' && $where_conditions != '') { - $query .= " AND (".$where_conditions.")"; - } - $params = array($entity_ids_list); - - - $TicketsfieldVisibilityByColumn = array(); - foreach($fields_list as $fieldlabel=> $fieldname) { - $TicketsfieldVisibilityByColumn[$fieldname] = - getColumnVisibilityPermission($current_user->id,$fieldname,'HelpDesk'); - } - - $res = $adb->pquery($query,$params); - $noofdata = $adb->num_rows($res); - for( $j= 0;$j < $noofdata; $j++) - { - $i=0; - foreach($fields_list as $fieldlabel => $fieldname) { - $fieldper = $TicketsfieldVisibilityByColumn[$fieldname]; //in troubletickets the list_fields has columns so we call this API - if($fieldper == '1'){ - continue; - } - $output[0]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res,$j,$fieldname); - $ticketid = $adb->query_result($res,$j,'ticketid'); - if($fieldname == 'title'){ - $fieldvalue = '<a href="index.php?module=HelpDesk&action=index&fun=detail&ticketid='.$ticketid.'">'.$fieldvalue.'</a>'; - } - if($fieldname == 'parent_id') { - $crmid = $fieldvalue; - if ($crmid != '') { - $fieldvalues = getEntityName('Accounts', array($crmid)); - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - } else { - $fieldvalue = ''; - } - } - if($fieldname == 'contact_id') { - if(!empty($fieldvalue)) { - $fieldvalues = getEntityName('Contacts', array($fieldvalue)); - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$fieldvalue.'">'.$fieldvalues[$fieldvalue].'</a>'; - } else { - $fieldvalue = ''; - } - } - if($fieldname == 'smownerid'){ - $fieldvalue = getOwnerName($fieldvalue); - } - $output[1]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - $log->debug("Exiting customer portal function get_ticket_list"); - return $output; -} - -/** function used to create ticket which has been created from customer portal - * @param array $input_array - array which contains the following values - => int $id - customer id - int $sessionid - session id - string $title - title of the ticket - string $description - description of the ticket - string $priority - priority of the ticket - string $severity - severity of the ticket - string $category - category of the ticket - string $user_name - customer name - int $parent_id - parent id ie., customer id as this customer is the parent for this ticket - int $product_id - product id for the ticket - string $module - module name where as based on this module we will get the module owner and assign this ticket to that corresponding user - * return array - currently created ticket array, if this is not created then all tickets list will be returned - */ -function create_ticket($input_array) -{ - global $adb,$log; - $adb->println("Inside customer portal function create_ticket"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $title = $input_array['title']; - $description = $input_array['description']; - $priority = $input_array['priority']; - $severity = $input_array['severity']; - $category = $input_array['category']; - $user_name = $input_array['user_name']; - $parent_id = (int) $input_array['parent_id']; - $product_id = (int) $input_array['product_id']; - $module = $input_array['module']; - //$assigned_to = $input_array['assigned_to']; - $servicecontractid = $input_array['serviceid']; - $projectid = $input_array['projectid']; - - if(!validateSession($id,$sessionid)) - return null; - - $ticket = new HelpDesk(); - - $ticket->column_fields[ticket_title] = vtlib_purify($title); - $ticket->column_fields[description]= vtlib_purify($description); - $ticket->column_fields[ticketpriorities]=$priority; - $ticket->column_fields[ticketseverities]=$severity; - $ticket->column_fields[ticketcategories]=$category; - $ticket->column_fields[ticketstatus]='Open'; - - $ticket->column_fields[contact_id]=$parent_id; - $ticket->column_fields[product_id]=$product_id; - - $defaultAssignee = getDefaultAssigneeId(); - - $ticket->column_fields['assigned_user_id']=$defaultAssignee; - $ticket->column_fields['from_portal'] = 1; - // New field added to show source of the Record - $ticket->column_fields['source'] = 'CUSTOMER PORTAL'; - - $accountResult = $adb->pquery('SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?', array($parent_id)); - $accountId = $adb->query_result($accountResult, 0, 'accountid'); - if(!empty($accountId)) $ticket->column_fields['parent_id'] = $accountId; - - $ticket->save("HelpDesk"); - - $ticketresult = $adb->pquery("select vtiger_troubletickets.ticketid from vtiger_troubletickets - inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_troubletickets.ticketid inner join vtiger_ticketcf on vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid - where vtiger_crmentity.deleted=0 and vtiger_troubletickets.ticketid = ?", array($ticket->id)); - if($adb->num_rows($ticketresult) == 1) - { - $record_save = 1; - $record_array[0]['new_ticket']['ticketid'] = $adb->query_result($ticketresult,0,'ticketid'); - } - if($servicecontractid != ''){ - $res = $adb->pquery("insert into vtiger_crmentityrel values(?,?,?,?)", - array($servicecontractid, 'ServiceContracts', $ticket->id, 'HelpDesk')); - } - if($projectid != '') { - $res = $adb->pquery("insert into vtiger_crmentityrel values(?,?,?,?)", - array($projectid, 'Project', $ticket->id, 'HelpDesk')); - } - if($record_save == 1) - { - $adb->println("Ticket from Portal is saved with id => ".$ticket->id); - return $record_array; - } - else - { - $adb->println("There may be error in saving the ticket."); - return null; - } -} - -/** function used to update the ticket comment which is added from the customer portal - * @param array $input_array - array which contains the following values - => int $id - customer id - int $sessionid - session id - int $ticketid - ticket id - int $ownerid - customer ie., contact id who has added this ticket comment - string $comments - comment which is added from the customer portal - * return void - */ -function update_ticket_comment($input_array) -{ - global $adb,$mod_strings,$current_language; - $mod_strings = return_module_language($current_language, 'HelpDesk'); - $adb->println("Inside customer portal function update_ticket_comment"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = (int) $input_array['ticketid']; - $ownerid = (int) $input_array['ownerid']; - $comments = $input_array['comments']; - - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - if(!validateSession($id,$sessionid)) - return null; - - if(trim($comments) != '') { - $modComments = CRMEntity::getInstance('ModComments'); - $modComments->column_fields['commentcontent'] = $comments; - $modComments->column_fields['assigned_user_id'] = $current_user->id; - $modComments->column_fields['customer'] = $ownerid; - $modComments->column_fields['related_to'] = $ticketid; - $modComments->column_fields['from_portal'] = true; - $modComments->save('ModComments'); - } -} - -/** function used to close the ticket - * @param array $input_array - array which contains the following values - => int $id - customer id - int $sessionid - session id - int $ticketid - ticket id - * return string - success or failure message will be returned based on the ticket close update query - */ -function close_current_ticket($input_array) -{ - global $adb,$mod_strings,$log,$current_user; - require_once('modules/HelpDesk/HelpDesk.php'); - $adb->println("Inside customer portal function close_current_ticket"); - $adb->println($input_array); - - //foreach($input_array as $fieldname => $fieldvalue)$input_array[$fieldname] = mysql_real_escape_string($fieldvalue); - $userid = getPortalUserid(); - - $current_user->id = $userid; - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = (int) $input_array['ticketid']; - - if(!validateSession($id,$sessionid)) - return null; - - $focus = new HelpDesk(); - $focus->id = $ticketid; - $focus->retrieve_entity_info($focus->id,'HelpDesk'); - $focus->mode = 'edit'; - $focus->column_fields = array_map(decode_html, $focus->column_fields); - $focus->column_fields['ticketstatus'] ='Closed'; - // Blank out the comments information to avoid un-necessary duplication - $focus->column_fields['comments'] = ''; - $focus->column_fields['from_portal'] = 1; - // END - $focus->save("HelpDesk"); - return "closed"; -} - -/** function used to authenticate whether the customer has access or not - * @param string $username - customer name for the customer portal - * @param string $password - password for the customer portal - * @param string $login - true or false. If true means function has been called for login process and we have to clear the session if any, false means not called during login and we should not unset the previous sessions - * return array $list - returns array with all the customer details - */ -function authenticate_user($username,$password,$version,$login = 'true') -{ - global $adb,$log; - $adb->println("Inside customer portal function authenticate_user($username, $password, $login)."); - include('vtigerversion.php'); - if(version_compare($version,'5.1.0','>=') == 0){ - $list[0] = "NOT COMPATIBLE"; - return $list; - } - $username = $adb->sql_escape_string($username); - $password = $adb->sql_escape_string($password); - - $current_date = date("Y-m-d"); - $sql = "select id, user_name, user_password,last_login_time, support_start_date, support_end_date, cryptmode - from vtiger_portalinfo - inner join vtiger_customerdetails on vtiger_portalinfo.id=vtiger_customerdetails.customerid - inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_portalinfo.id - where vtiger_crmentity.deleted=0 and user_name=? - and isactive=1 and vtiger_customerdetails.portal=1 - and vtiger_customerdetails.support_start_date <= ? and vtiger_customerdetails.support_end_date >= ?"; - $result = $adb->pquery($sql, array($username, $current_date, $current_date)); - $err[0]['err1'] = "MORE_THAN_ONE_USER"; - $err[1]['err1'] = "INVALID_USERNAME_OR_PASSWORD"; - - $num_rows = $adb->num_rows($result); - - if($num_rows <= 0) return $err[1];//No user - - // Match password against multiple user and decide. - $customerid = null; - for ($i = 0; $i < $num_rows; ++$i) { - $customerid = $adb->query_result($result, $i,'id'); - if (Vtiger_Functions::compareEncryptedPassword($password, $adb->query_result($result, $i, 'user_password'), $adb->query_result($result, $i, 'cryptmode'))) { - break; - } else { - $customerid = null; - } - } - - if (!$customerid) return $err[1];//No user again. - - $list[0]['id'] = $customerid; - $list[0]['user_name'] = $adb->query_result($result,$i,'user_name'); - $list[0]['user_password'] = $password; - $list[0]['last_login_time'] = $adb->query_result($result,$i,'last_login_time'); - $list[0]['support_start_date'] = $adb->query_result($result,$i,'support_start_date'); - $list[0]['support_end_date'] = $adb->query_result($result,$i,'support_end_date'); - - //During login process we will pass the value true. Other times (change password) we will pass false - if($login != 'false') - { - $sessionid = makeRandomPassword(); - - unsetServerSessionId($customerid); - - $sql="insert into vtiger_soapservice values(?,?,?)"; - $result = $adb->pquery($sql, array($customerid,'customer' ,$sessionid)); - - $list[0]['sessionid'] = $sessionid; - } - - return $list; -} - -/** function used to change the password for the customer portal - * @param array $input_array - array which contains the following values - => int $id - customer id - int $sessionid - session id - string $username - customer name - string $password - new password to change - * return array $list - returns array with all the customer details - */ -function change_password($input_array) -{ - global $adb,$log; - $log->debug("Entering customer portal function change_password"); - $adb->println($input_array); - - $id = (int) $input_array['id']; - $sessionid = $input_array['sessionid']; - $username = $input_array['username']; - $password = $input_array['password']; - $version = $input_array['version']; - - if(!validateSession($id,$sessionid)) - return null; - - $list = authenticate_user($username,$password,$version ,'false'); - if(!empty($list[0]['id']) && $id != $list[0]['id']){ - return array('MORE_THAN_ONE_USER'); /* compatability with portal app */ - } - $sql = "update vtiger_portalinfo set user_password=?, cryptmode=? where id=? and user_name=?"; - $result = $adb->pquery($sql, array(Vtiger_Functions::generateEncryptedPassword($password), 'CRYPT', $id, $username)); - - $log->debug("Exiting customer portal function change_password"); - return $list; -} - -/** function used to update the login details for the customer - * @param array $input_array - array which contains the following values - => int $id - customer id - int $sessionid - session id - string $flag - login/logout, based on this flag, login or logout time will be updated for the customer - * return string $list - empty value - */ -function update_login_details($input_array) -{ - global $adb,$log; - $log->debug("Entering customer portal function update_login_details"); - $adb->println("INPUT ARRAY for the function update_login_details"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $flag = $input_array['flag']; - - if(!validateSession($id,$sessionid)) - return null; - - $current_time = $adb->formatDate(date('YmdHis'), true); - - if($flag == 'login') - { - $sql = "update vtiger_portalinfo set login_time=? where id=?"; - $result = $adb->pquery($sql, array($current_time, $id)); - } - elseif($flag == 'logout') - { - $sql = "update vtiger_portalinfo set logout_time=?, last_login_time=login_time where id=?"; - $result = $adb->pquery($sql, array($current_time, $id)); - } - $log->debug("Exiting customer portal function update_login_details"); -} - -/** function used to send mail to the customer when he forgot the password and want to retrieve the password - * @param string $mailid - email address of the customer - * return message about the mail sending whether entered mail id is correct or not or is there any problem in mail sending - */ -function send_mail_for_password($mailid) -{ - global $adb,$mod_strings,$log; - $log->debug("Entering customer portal function send_mail_for_password"); - $adb->println("Inside the function send_mail_for_password($mailid)."); - - if ($mailid == '') { - $ret_msg = "false@@@<b>".$mod_strings['LBL_GIVE_MAILID']."</b>"; - } - - $sql = 'SELECT * FROM vtiger_portalinfo INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid=vtiger_portalinfo.id WHERE user_name = ?'; - $res = $adb->pquery($sql, array($mailid)); - $contactId = $adb->query_result($res, 0, 'id'); - $user_name = $adb->query_result($res, 0, 'user_name'); - $password = $adb->query_result($res, 0, 'user_password'); - $isactive = $adb->query_result($res, 0, 'isactive'); - - // We no longer have the original password! - if (!empty($adb->query_result($res, 0, 'cryptmode'))) { - $password = makeRandomPassword(); - $enc_password = Vtiger_Functions::generateEncryptedPassword($password); - - $sql = 'UPDATE vtiger_portalinfo SET user_password=?, cryptmode=? WHERE id=?'; - $params = array($enc_password, 'CRYPT', $contactId); - $adb->pquery($sql, $params); - // For now CRM user can do the same. - } - - if ($user_name == '' && $password == '') { - $ret_msg = "false@@@<b>".$mod_strings['LBL_CHECK_MAILID']."</b>"; - } elseif ($isactive == 0) { - $ret_msg = "false@@@<b>".$mod_strings['LBL_LOGIN_REVOKED']."</b>"; - } else { - - global $current_user,$HELPDESK_SUPPORT_EMAIL_ID, $HELPDESK_SUPPORT_NAME; - require_once("modules/Emails/mail.php"); - - $moduleName = 'Contacts'; - require_once 'config.inc.php'; - global $PORTAL_URL; - - $portalURL = vtranslate('Please ',$moduleName).'<a href="'.$PORTAL_URL.'" style="font-family:Arial, Helvetica, sans-serif;font-size:13px;">'. vtranslate('click here', $moduleName).'</a>'; - $contents = '<table><tr><td> - <strong>Dear '.$adb->query_result($res, 0, 'firstname')." ".$adb->query_result($res, 0, 'lastname').'</strong><br></td></tr><tr> - <td>'.vtranslate('Here is your self service portal login details:', $moduleName).'</td></tr><tr><td align="center"><br><table style="border:2px solid rgb(180,180,179);background-color:rgb(226,226,225);" cellspacing="0" cellpadding="10" border="0" width="75%"><tr> - <td><br>'.vtranslate('User ID').' : <font color="#990000"><strong> - <a target="_blank">'.$user_name.'</a></strong></font></td></tr><tr> - <td>'.vtranslate('Password').' : <font color="#990000"> - <strong>'.$password.'</strong></font></td></tr><tr> - <td align="center"><strong>'.$portalURL.'</strong></td> - </tr></table><br></td></tr><tr><td><strong>NOTE: </strong>'.vtranslate('We suggest you to change your password after logging in first time').'.<br> - </td></tr></table>'; - - $subject = 'Customer Portal Login Details'; - $subject = decode_html(getMergedDescription($subject, $contactId, 'Contacts')); - $mailStatus = send_mail($moduleName, $user_name, $HELPDESK_SUPPORT_NAME, $HELPDESK_SUPPORT_EMAIL_ID, $subject, $contents, '', '', '', '', '', true); - - if (!$mailStatus) { - $ret_msg = "false@@@<b>".$mod_strings['LBL_MAIL_COULDNOT_SENT']."</b>"; - } else { - $ret_msg = "true@@@<b>".$mod_strings['LBL_MAIL_SENT']."</b>"; - } - - } - - $adb->println("Exit from send_mail_for_password. $ret_msg"); - $log->debug("Exiting customer portal function send_mail_for_password"); - return $ret_msg; -} - -/** function used to get the ticket creater - * @param array $input_array - array which contains the following values - => int $id - customer ie., contact id - int $sessionid - session id - int $ticketid - ticket id - * return int $creator - ticket created user id will be returned ie., smcreatorid from crmentity table - */ -function get_ticket_creator($input_array) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_ticket_creator"); - $adb->println("INPUT ARRAY for the function get_ticket_creator"); - $adb->println($input_array); - - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = (int) $input_array['ticketid']; - - if(!validateSession($id,$sessionid)) - return null; - - $res = $adb->pquery("select smcreatorid from vtiger_crmentity where crmid=?", array($ticketid)); - $creator = $adb->query_result($res,0,'smcreatorid'); - $log->debug("Exiting customer portal function get_ticket_creator"); - return $creator; -} - -/** function used to get the picklist values - * @param array $input_array - array which contains the following values - => int $id - customer ie., contact id - int $sessionid - session id - string $picklist_name - picklist name you want to retrieve from database - * return array $picklist_array - all values of the corresponding picklist will be returned as a array - */ -function get_picklists($input_array) -{ - global $adb, $log; - $log->debug("Entering customer portal function get_picklists"); - $adb->println("INPUT ARRAY for the function get_picklists"); - $adb->println($input_array); - - //To avoid SQL injection we are type casting as well as bound the id variable - $id = (int) vtlib_purify($input_array['id']); - $sessionid = $input_array['sessionid']; - //To avoid SQL injection. - $picklist_name = vtlib_purifyForSql($input_array['picklist_name']); - if(empty($picklist_name)) return null; - - if(!validateSession($id,$sessionid)) - return null; - - $picklist_array = Array(); - - $admin_role = 'H2'; - $userid = getPortalUserid(); - $roleres = $adb->pquery("SELECT roleid from vtiger_user2role where userid = ?", array($userid)); - $RowCount = $adb->num_rows($roleres); - if($RowCount > 0){ - $admin_role = $adb->query_result($roleres,0,'roleid'); - } - - $res = $adb->pquery("select vtiger_". $picklist_name.".* from vtiger_". $picklist_name." inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_". $picklist_name.".picklist_valueid and vtiger_role2picklist.roleid='$admin_role'", array()); - for($i=0;$i<$adb->num_rows($res);$i++) - { - $picklist_val = $adb->query_result($res,$i,$picklist_name); - $picklist_array[$i] = $picklist_val; - } - - $adb->println($picklist_array); - $log->debug("Exiting customer portal function get_picklists($picklist_name)"); - return $picklist_array; -} - -/** function to get the attachments of a ticket - * @param array $input_array - array which contains the following values - => int $id - customer ie., contact id - int $sessionid - session id - int $ticketid - ticket id - * return array $output - This will return all the file details related to the ticket - */ -function get_ticket_attachments($input_array) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_ticket_attachments"); - $adb->println("INPUT ARRAY for the function get_ticket_attachments"); - $adb->println($input_array); - - $check = checkModuleActive('Documents'); - if($check == false){ - return array("#MODULE INACTIVE#"); - } - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = $input_array['ticketid']; - - $isPermitted = check_permission($id,'HelpDesk',$ticketid); - if($isPermitted == false) { - return array("#NOT AUTHORIZED#"); - } - - - if(!validateSession($id,$sessionid)) - return null; - - $query = "select vtiger_troubletickets.ticketid, vtiger_attachments.*,vtiger_notes.filename,vtiger_notes.filelocationtype from vtiger_troubletickets " . - "left join vtiger_senotesrel on vtiger_senotesrel.crmid=vtiger_troubletickets.ticketid " . - "left join vtiger_notes on vtiger_notes.notesid=vtiger_senotesrel.notesid " . - "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_notes.notesid " . - "left join vtiger_seattachmentsrel on vtiger_seattachmentsrel.crmid=vtiger_notes.notesid " . - "left join vtiger_attachments on vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid " . - "and vtiger_crmentity.deleted = 0 where vtiger_troubletickets.ticketid =?"; - - $res = $adb->pquery($query, array($ticketid)); - $noofrows = $adb->num_rows($res); - for($i=0;$i<$noofrows;$i++) - { - $filename = $adb->query_result($res,$i,'filename'); - $filepath = $adb->query_result($res,$i,'path'); - - $fileid = $adb->query_result($res,$i,'attachmentsid'); - $filesize = filesize($filepath.$fileid."_".$filename); - $filetype = $adb->query_result($res,$i,'type'); - $filelocationtype = $adb->query_result($res,$i,'filelocationtype'); - //Now we will not pass the file content to CP, when the customer click on the link we will retrieve - //$filecontents = base64_encode(file_get_contents($filepath.$fileid."_".$filename));//fread(fopen($filepath.$filename, "r"), $filesize)); - - $output[$i]['fileid'] = $fileid; - $output[$i]['filename'] = $filename; - $output[$i]['filetype'] = $filetype; - $output[$i]['filesize'] = $filesize; - $output[$i]['filelocationtype'] = $filelocationtype; - } - $log->debug("Exiting customer portal function get_ticket_attachments"); - return $output; -} - -/** function used to get the contents of a file - * @param array $input_array - array which contains the following values - => int $id - customer ie., contact id - int $sessionid - session id - int $fileid - id of the file to which we want contents - string $filename - name of the file to which we want contents - * return $filecontents array with single file contents like [fileid] => filecontent - */ -function get_filecontent($input_array) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_filecontent"); - $adb->println("INPUT ARRAY for the function get_filecontent"); - $adb->println($input_array); - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $fileid = $input_array['fileid']; - $filename = $input_array['filename']; - $ticketid = $input_array['ticketid']; - if(!validateSession($id,$sessionid)) - return null; - - $query = 'SELECT vtiger_attachments.path FROM vtiger_attachments - INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid - INNER JOIN vtiger_notes ON vtiger_notes.notesid = vtiger_seattachmentsrel.crmid - INNER JOIN vtiger_senotesrel ON vtiger_senotesrel.notesid = vtiger_notes.notesid - INNER JOIN vtiger_troubletickets ON vtiger_troubletickets.ticketid = vtiger_senotesrel.crmid - WHERE vtiger_troubletickets.ticketid = ? AND vtiger_attachments.name = ? AND vtiger_attachments.attachmentsid = ?'; - $res = $adb->pquery($query, array($ticketid, $filename,$fileid)); - if($adb->num_rows($res)>0) - { - $filenamewithpath = $adb->query_result($res,0,'path').$fileid."_".$filename; - $filecontents[$fileid] = base64_encode(file_get_contents($filenamewithpath)); - } - $log->debug("Exiting customer portal function get_filecontent "); - return $filecontents; -} - -/** function to add attachment for a ticket ie., the passed contents will be write in a file and the details will be stored in database - * @param array $input_array - array which contains the following values - => int $id - customer ie., contact id - int $sessionid - session id - int $ticketid - ticket id - string $filename - file name to be attached with the ticket - string $filetype - file type - int $filesize - file size - string $filecontents - file contents as base64 encoded format - * return void - */ -function add_ticket_attachment($input_array) -{ - global $adb,$log; - global $root_directory, $upload_badext; - $log->debug("Entering customer portal function add_ticket_attachment"); - $adb->println("INPUT ARRAY for the function add_ticket_attachment"); - $adb->println($input_array); - $id = $input_array['id']; - $sessionid = $input_array['sessionid']; - $ticketid = $input_array['ticketid']; - $filename = $input_array['filename']; - $filetype = $input_array['filetype']; - $filesize = $input_array['filesize']; - $filecontents = $input_array['filecontents']; - - if(!validateSession($id,$sessionid)) - return null; - - //decide the file path where we should upload the file in the server - $upload_filepath = decideFilePath(); - - $attachmentid = $adb->getUniqueID("vtiger_crmentity"); - - //fix for space in file name - $filename = sanitizeUploadFileName($filename, $upload_badext); - $new_filename = $attachmentid.'_'.$filename; - - $data = base64_decode($filecontents); - $description = 'CustomerPortal Attachment'; - - //write a file with the passed content - $handle = @fopen($upload_filepath.$new_filename,'w'); - fputs($handle, $data); - fclose($handle); - - //Now store this file information in db and relate with the ticket - $date_var = $adb->formatDate(date('Y-m-d H:i:s'), true); - - $crmquery = "insert into vtiger_crmentity (crmid,setype,description,createdtime) values(?,?,?,?)"; - $crmresult = $adb->pquery($crmquery, array($attachmentid, 'HelpDesk Attachment', $description, $date_var)); - - $attachmentquery = "insert into vtiger_attachments(attachmentsid,name,description,type,path) values(?,?,?,?,?)"; - $attachmentreulst = $adb->pquery($attachmentquery, array($attachmentid, $filename, $description, $filetype, $upload_filepath)); - - $relatedquery = "insert into vtiger_seattachmentsrel values(?,?)"; - $relatedresult = $adb->pquery($relatedquery, array($ticketid, $attachmentid)); - - $user_id = getDefaultAssigneeId(); - - require_once('modules/Documents/Documents.php'); - $focus = new Documents(); - $focus->column_fields['notes_title'] = $filename; - $focus->column_fields['filename'] = $filename; - $focus->column_fields['filetype'] = $filetype; - $focus->column_fields['filesize'] = $filesize; - $focus->column_fields['filelocationtype'] = 'I'; - $focus->column_fields['filedownloadcount']= 0; - $focus->column_fields['filestatus'] = 1; - $focus->column_fields['assigned_user_id'] = $user_id; - $focus->column_fields['folderid'] = 1; - $focus->column_fields['source'] = 'CUSTOMER PORTAL'; - $focus->parent_id = $ticketid; - $focus->save('Documents'); - - $related_doc = 'insert into vtiger_seattachmentsrel values (?,?)'; - $res = $adb->pquery($related_doc,array($focus->id,$attachmentid)); - - $tic_doc = 'insert into vtiger_senotesrel values(?,?)'; - $res = $adb->pquery($tic_doc,array($ticketid,$focus->id)); - $log->debug("Exiting customer portal function add_ticket_attachment"); -} - -/** Function used to validate the session - * @param int $id - contact id to which we want the session id - * @param string $sessionid - session id which will be passed from customerportal - * return true/false - return true if valid session otherwise return false - **/ -function validateSession($id, $sessionid) -{ - global $adb; - $adb->println("Inside function validateSession($id, $sessionid)"); - - if(empty($sessionid)) return false; - - $server_sessionid = getServerSessionId($id); - - $adb->println("Checking Server session id and customer input session id ==> $server_sessionid == $sessionid"); - - if($server_sessionid == $sessionid) { - $adb->println("Session id match. Authenticated to do the current operation."); - return true; - } else { - $adb->println("Session id does not match. Not authenticated to do the current operation."); - return false; - } -} - - -/** Function used to get the session id which was set during login time - * @param int $id - contact id to which we want the session id - * return string $sessionid - return the session id for the customer which is a random alphanumeric character string - **/ -function getServerSessionId($id) -{ - global $adb; - $adb->println("Inside the function getServerSessionId($id)"); - - //To avoid SQL injection we are type casting as well as bound the id variable. In each and every function we will call this function - $id = (int) $id; - - $sessionid = Vtiger_Soap_CustomerPortal::lookupSessionId($id); - if($sessionid === false) { - $query = "select * from vtiger_soapservice where type='customer' and id=?"; - $result = $adb->pquery($query, array($id)); - if($adb->num_rows($result) > 0) { - $sessionid = $adb->query_result($result,0,'sessionid'); - Vtiger_Soap_CustomerPortal::updateSessionId($id, $sessionid); - } - } - return $sessionid; -} - -/** Function used to unset the server session id for the customer - * @param int $id - contact id to which customer we want to unset the session id - **/ -function unsetServerSessionId($id) -{ - global $adb,$log; - $log->debug("Entering customer portal function unsetServerSessionId"); - $adb->println("Inside the function unsetServerSessionId"); - - $id = (int) $id; - Vtiger_Soap_CustomerPortal::updateSessionId($id, false); - - $adb->pquery("delete from vtiger_soapservice where type='customer' and id=?", array($id)); - $log->debug("Exiting customer portal function unsetServerSessionId"); - return; -} - - -/** function used to get the Account name - * @param int $id - Account id - * return string $message - Account name returned - */ -function get_account_name($accountid) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_account_name"); - $res = $adb->pquery("select accountname from vtiger_account where accountid=?", array($accountid)); - $accountname=$adb->query_result($res,0,'accountname'); - $log->debug("Exiting customer portal function get_account_name"); - return $accountname; -} - -/** function used to get the Contact name - * @param int $id -Contact id - * return string $message -Contact name returned - */ -function get_contact_name($contactid) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_contact_name"); - $contact_name = ''; - if($contactid != '') - { - $sql = "select firstname,lastname from vtiger_contactdetails where contactid=?"; - $result = $adb->pquery($sql, array($contactid)); - $firstname = $adb->query_result($result,0,"firstname"); - $lastname = $adb->query_result($result,0,"lastname"); - $contact_name = $firstname." ".$lastname; - return $contact_name; - } - $log->debug("Exiting customer portal function get_contact_name"); - return false; -} - -/** function used to get the Account id - ** @param int $id - Contact id - ** return string $message - Account id returned - **/ - -function get_check_account_id($id) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_check_account_id"); - $res = $adb->pquery("select accountid from vtiger_contactdetails where contactid=?", array($id)); - $accountid=$adb->query_result($res,0,'accountid'); - $log->debug("Entering customer portal function get_check_account_id"); - return $accountid; -} - - -/** function used to get the vendor name - * @param int $id - vendor id - * return string $name - Vendor name returned - */ - -function get_vendor_name($vendorid) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_vendor_name"); - $res = $adb->pquery("select vendorname from vtiger_vendor where vendorid=?", array($vendorid)); - $name=$adb->query_result($res,0,'vendorname'); - $log->debug("Exiting customer portal function get_vendor_name"); - return $name; -} - - -/** function used to get the Quotes/Invoice List - * @param int $id - id -Contactid - * return string $output - Quotes/Invoice list Array - */ - -function get_list_values($id,$module,$sessionid,$only_mine='true') -{ - checkFileAccessForInclusion('modules/'.$module.'/'.$module.'.php'); - require_once('modules/'.$module.'/'.$module.'.php'); - require_once('include/utils/UserInfoUtil.php'); - global $adb,$log,$current_user; - $log->debug("Entering customer portal function get_list_values"); - $check = checkModuleActive($module); - if($check == false){ - return array("#MODULE INACTIVE#"); - } - - //To avoid SQL injection we are type casting as well as bound the id variable. - $id = (int) vtlib_purify($id); - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - $focus = new $module(); - $focus->filterInactiveFields($module); - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - } - } - - if(!validateSession($id,$sessionid)) - return null; - - $entity_ids_list = array(); - $show_all=show_all($module); - if($only_mine == 'true' || $show_all == 'false') - { - array_push($entity_ids_list,$id); - } - else - { - $contactquery = "SELECT contactid, accountid FROM vtiger_contactdetails " . - " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . - " AND vtiger_crmentity.deleted = 0 " . - " WHERE (accountid = (SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?) AND accountid != 0) OR contactid = ?"; - $contactres = $adb->pquery($contactquery, array($id,$id)); - $no_of_cont = $adb->num_rows($contactres); - for($i=0;$i<$no_of_cont;$i++) - { - $cont_id = $adb->query_result($contactres,$i,'contactid'); - $acc_id = $adb->query_result($contactres,$i,'accountid'); - if(!in_array($cont_id, $entity_ids_list)) - $entity_ids_list[] = $cont_id; - if(!in_array($acc_id, $entity_ids_list) && $acc_id != '0') - $entity_ids_list[] = $acc_id; - } - } - if($module == 'Quotes') - { - $query = "select distinct vtiger_quotes.*,vtiger_crmentity.smownerid, - case when vtiger_quotes.contactid is not null then vtiger_quotes.contactid else vtiger_quotes.accountid end as entityid, - case when vtiger_quotes.contactid is not null then 'Contacts' else 'Accounts' end as setype, - vtiger_potential.potentialname,vtiger_account.accountid - from vtiger_quotes left join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid - LEFT OUTER JOIN vtiger_account - ON vtiger_account.accountid = vtiger_quotes.accountid - LEFT OUTER JOIN vtiger_potential - ON vtiger_potential.potentialid = vtiger_quotes.potentialid - where vtiger_crmentity.deleted=0 and (vtiger_quotes.accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params = array($entity_ids_list,$entity_ids_list); - $fields_list['Related To'] = 'entityid'; - - } - else if($module == 'Invoice') - { - $query ="select distinct vtiger_invoice.*,vtiger_crmentity.smownerid, - case when vtiger_invoice.contactid !=0 then vtiger_invoice.contactid else vtiger_invoice.accountid end as entityid, - case when vtiger_invoice.contactid !=0 then 'Contacts' else 'Accounts' end as setype - from vtiger_invoice - left join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid - where vtiger_crmentity.deleted=0 and (accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params = array($entity_ids_list,$entity_ids_list); - $fields_list['Related To'] = 'entityid'; - } - else if ($module == 'Documents') - { - $query ="select vtiger_notes.*, vtiger_crmentity.*, vtiger_senotesrel.crmid as entityid, '' as setype,vtiger_attachmentsfolder.foldername from vtiger_notes " . - "inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_notes.notesid " . - "left join vtiger_senotesrel on vtiger_senotesrel.notesid=vtiger_notes.notesid " . - "LEFT JOIN vtiger_attachmentsfolder ON vtiger_attachmentsfolder.folderid = vtiger_notes.folderid " . - "where vtiger_crmentity.deleted = 0 and vtiger_senotesrel.crmid in (".generateQuestionMarks($entity_ids_list).")"; - $params = array($entity_ids_list); - $fields_list['Related To'] = 'entityid'; - }else if ($module == 'Contacts'){ - $query = "select vtiger_contactdetails.*,vtiger_crmentity.smownerid from vtiger_contactdetails - inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_contactdetails.contactid - where vtiger_crmentity.deleted = 0 and contactid IN (".generateQuestionMarks($entity_ids_list).")"; - $params = array($entity_ids_list); - }else if ($module == 'Assets') { - $accountRes = $adb->pquery("SELECT accountid FROM vtiger_contactdetails - INNER JOIN vtiger_crmentity ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid - WHERE contactid = ? AND deleted = 0", array($id)); - $accountRow = $adb->num_rows($accountRes); - if($accountRow) { - $accountid = $adb->query_result($accountRes, 0, 'accountid'); - $query = "select vtiger_assets.*, vtiger_assets.account as entityid , vtiger_crmentity.smownerid from vtiger_assets - inner join vtiger_crmentity on vtiger_assets.assetsid = vtiger_crmentity.crmid - left join vtiger_account on vtiger_account.accountid = vtiger_assets.account - left join vtiger_products on vtiger_products.productid = vtiger_assets.product - where vtiger_crmentity.deleted = 0 and account = ?"; - $params = array($accountid); - $fields_list['Related To'] = 'entityid'; - } - }else if ($module == 'Project') { - $query = "SELECT vtiger_project.*, vtiger_crmentity.smownerid - FROM vtiger_project - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_project.projectid - WHERE vtiger_crmentity.deleted = 0 AND vtiger_project.linktoaccountscontacts IN (".generateQuestionMarks($entity_ids_list).")"; - $params = array($entity_ids_list); - $fields_list['Related To'] = 'linktoaccountscontacts'; - } - - $res = $adb->pquery($query,$params); - $noofdata = $adb->num_rows($res); - - $columnVisibilityByFieldnameInfo = array(); - if($noofdata) { - foreach($fields_list as $fieldlabel =>$fieldname ) { - $columnVisibilityByFieldnameInfo[$fieldname] = getColumnVisibilityPermission($current_user->id,$fieldname,$module); - } - } - - - for( $j= 0;$j < $noofdata; $j++) - { - $i=0; - foreach($fields_list as $fieldlabel =>$fieldname ) { - $fieldper = $columnVisibilityByFieldnameInfo[$fieldname]; - if($fieldper == '1' && $fieldname != 'entityid'){ - continue; - } - $fieldlabel = getTranslatedString($fieldlabel,$module); - - $output[0][$module]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res,$j,$fieldname); - $fieldValuesToRound = array('total','subtotal','adjustment','discount_amount','s_h_amount','pre_tax_total','received','balance','unit_price'); - - if($module == 'Quotes') - { - if($fieldname =='subject'){ - $fieldid = $adb->query_result($res,$j,'quoteid'); - $filename = $fieldid.'_Quotes.pdf'; - $fieldvalue = '<a href="index.php?&module=Quotes&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if(in_array($fieldname, $fieldValuesToRound)){ - $fieldvalue = round($fieldvalue, 2); - } - if($fieldname == 'total'){ - $sym = getCurrencySymbol($res,$j,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - } - if($module == 'Invoice') - { - if($fieldname =='subject'){ - $fieldid = $adb->query_result($res,$j,'invoiceid'); - $filename = $fieldid.'_Invoice.pdf'; - $fieldvalue = '<a href="index.php?&module=Invoice&action=index&status=true&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if(in_array($fieldname, $fieldValuesToRound)){ - $fieldvalue = round($fieldvalue, 2); - } - if($fieldname == 'total'){ - $sym = getCurrencySymbol($res,$j,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - } - if($module == 'Documents') - { - if($fieldname == 'title'){ - $fieldid = $adb->query_result($res,$j,'notesid'); - $fieldvalue = '<a href="index.php?&module=Documents&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if( $fieldname == 'filename'){ - $fieldid = $adb->query_result($res,$j,'notesid'); - $filename = $fieldvalue; - $folderid = $adb->query_result($res,$j,'folderid'); - $filename = $adb->query_result($res,$j,'filename'); - $fileactive = $adb->query_result($res,$j,'filestatus'); - $filetype = $adb->query_result($res,$j,'filelocationtype'); - - if($fileactive == 1){ - if($filetype == 'I'){ - $fieldvalue = '<a href="index.php?&downloadfile=true&folderid='.$folderid.'&filename='.$filename.'&module=Documents&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - elseif($filetype == 'E'){ - $fieldvalue = '<a target="_blank" href="'.$filename.'" onclick = "updateCount('.$fieldid.');">'.$filename.'</a>'; - } - }else{ - $fieldvalue = $filename; - } - } - if($fieldname == 'folderid'){ - $fieldvalue = $adb->query_result($res,$j,'foldername'); - } - } - if($module == 'Invoice' && $fieldname == 'salesorderid') - { - if($fieldvalue != '') - $fieldvalue = get_salesorder_name($fieldvalue); - } - - if($module == 'Services'){ - if($fieldname == 'servicename'){ - $fieldid = $adb->query_result($res,$j,'serviceid'); - $fieldvalue = '<a href="index.php?module=Services&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if($fieldname == 'discontinued'){ - if($fieldvalue == 1){ - $fieldvalue = 'Yes'; - }else{ - $fieldvalue = 'No'; - } - } - if(in_array($fieldname, $fieldValuesToRound)){ - $fieldvalue = round($fieldvalue, 2); - } - if($fieldname == 'unit_price'){ - $sym = getCurrencySymbol($res,$j,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - - } - if($module == 'Contacts'){ - if($fieldname == 'lastname' || $fieldname == 'firstname'){ - $fieldid = $adb->query_result($res,$j,'contactid'); - $fieldvalue ='<a href="index.php?module=Contacts&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - } - if($module == 'Project'){ - if($fieldname == 'projectname'){ - $fieldid = $adb->query_result($res,$j,'projectid'); - $fieldvalue = '<a href="index.php?module=Project&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - } - if($fieldname == 'entityid' || $fieldname == 'contactid' || $fieldname == 'accountid' || $fieldname == 'potentialid' || $fieldname == 'account' || $fieldname == 'linktoaccountscontacts') { - $crmid = $fieldvalue; - $modulename = getSalesEntityType($crmid); - if ($crmid != '' && $modulename != '') { - $fieldvalues = getEntityName($modulename, array($crmid)); - if($modulename == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($modulename == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($modulename == 'Potentials'){ - $fieldvalue = $adb->query_result($res,$j,'potentialname'); - } - } else { - $fieldvalue = ''; - } - } - if($module == 'Assets' && $fieldname == 'assetname') { - $assetname = $fieldvalue; - $assetid = $adb->query_result($res, $j, 'assetsid'); - $fieldvalue = '<a href="index.php?module=Assets&action=index&id='.$assetid.'">'.$assetname.'</a>'; - } - if($fieldname == 'product' && $module == 'Assets'){ - $crmid= $adb->query_result($res,$j,'product'); - $fres = $adb->pquery('select vtiger_products.productname from vtiger_products where productid=?',array($crmid)); - $productname = $adb->query_result($fres,0,'productname'); - $fieldvalue = '<a href="index.php?module=Products&action=index&id='.$crmid.'">'.$productname.'</a>'; - } - if($fieldname == 'smownerid'){ - $fieldvalue = getOwnerName($fieldvalue); - } - $output[1][$module]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - $log->debug("Exiting customer portal function get_list_values"); - return $output; - -} - - -/** function used to get the contents of a file - * @param int $id - customer ie., id - * return $filecontents array with single file contents like [fileid] => filecontent - */ -function get_filecontent_detail($id,$folderid,$module,$customerid,$sessionid) -{ - global $adb,$log; - global $site_URL; - $log->debug("Entering customer portal function get_filecontent_detail "); - $isPermitted = check_permission($customerid,$module,$id); - if($isPermitted == false) { - return array("#NOT AUTHORIZED#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - if($module == 'Documents') - { - $query="SELECT filetype FROM vtiger_notes WHERE notesid =?"; - $res = $adb->pquery($query, array($id)); - $filetype = $adb->query_result($res, 0, "filetype"); - updateDownloadCount($id); - - $fileidQuery = 'select attachmentsid from vtiger_seattachmentsrel where crmid = ?'; - $fileres = $adb->pquery($fileidQuery,array($id)); - $fileid = $adb->query_result($fileres,0,'attachmentsid'); - - $filepathQuery = 'select path,name from vtiger_attachments where attachmentsid = ?'; - $fileres = $adb->pquery($filepathQuery,array($fileid)); - $filepath = $adb->query_result($fileres,0,'path'); - $filename = $adb->query_result($fileres,0,'name'); - $filename= decode_html($filename); - - $saved_filename = $fileid."_".$filename; - $filenamewithpath = $filepath.$saved_filename; - $filesize = filesize($filenamewithpath ); - } - else - { - $query ='select vtiger_attachments.*,vtiger_seattachmentsrel.* from vtiger_attachments inner join vtiger_seattachmentsrel on vtiger_seattachmentsrel.attachmentsid=vtiger_attachments.attachmentsid where vtiger_seattachmentsrel.crmid =?'; - - $res = $adb->pquery($query, array($id)); - - $filename = $adb->query_result($res,0,'name'); - $filename = decode_html($filename); - $filepath = $adb->query_result($res,0,'path'); - $fileid = $adb->query_result($res,0,'attachmentsid'); - $filesize = filesize($filepath.$fileid."_".$filename); - $filetype = $adb->query_result($res,0,'type'); - $filenamewithpath=$filepath.$fileid.'_'.$filename; - - } - $output[0]['fileid'] = $fileid; - $output[0]['filename'] = $filename; - $output[0]['filetype'] = $filetype; - $output[0]['filesize'] = $filesize; - $output[0]['filecontents']=base64_encode(file_get_contents($filenamewithpath)); - $log->debug("Exiting customer portal function get_filecontent_detail "); - return $output; -} - -/** Function that the client actually calls when a file is downloaded - * - */ -function updateCount($id){ - global $adb,$log; - $log->debug("Entering customer portal function updateCount"); - $result = updateDownloadCount($id); - $log->debug("Entering customer portal function updateCount"); - return $result; - -} - -/** - * Function to update the download count of a file - */ -function updateDownloadCount($id){ - global $adb,$log; - $log->debug("Entering customer portal function updateDownloadCount"); - $updateDownloadCount = "UPDATE vtiger_notes SET filedownloadcount = filedownloadcount+1 WHERE notesid = ?"; - $countres = $adb->pquery($updateDownloadCount,array($id)); - $log->debug("Entering customer portal function updateDownloadCount"); - return true; -} - -/** function used to get the Quotes/Invoice pdf - * @param int $id - id -id - * return string $output - pd link value - */ - -function get_pdf($id,$block,$customerid,$sessionid) -{ - global $adb; - global $current_user,$log,$default_language; - global $currentModule,$mod_strings,$app_strings,$app_list_strings; - $log->debug("Entering customer portal function get_pdf"); - $isPermitted = check_permission($customerid,$block,$id); - if($isPermitted == false) { - return array("#NOT AUTHORIZED#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - require_once("config.inc.php"); - $current_user = Users::getActiveAdminUser(); - - $currentModule = $block; - $current_language = $default_language; - $app_strings = return_application_language($current_language); - $app_list_strings = return_app_list_strings_language($current_language); - $mod_strings = return_module_language($current_language, $currentModule); - - $_REQUEST['record']= $id; - $_REQUEST['savemode']= 'file'; - $sequenceNo = getModuleSequenceNumber($block, $id); - $filenamewithpath='test/product/'.$id.'_'.$block.'_'.$sequenceNo.'.pdf'; - if (file_exists($filenamewithpath) && (filesize($filenamewithpath) != 0)) - unlink($filenamewithpath); - - checkFileAccessForInclusion("modules/$block/CreatePDF.php"); - include("modules/$block/CreatePDF.php"); - - if (file_exists($filenamewithpath) && (filesize($filenamewithpath) != 0)) - { - //we have to pass the file content - $filecontents[] = base64_encode(file_get_contents($filenamewithpath)); - unlink($filenamewithpath); - // TODO: Delete the file to avoid public access. - } - else - { - $filecontents = "failure"; - } - $log->debug("Exiting customer portal function get_pdf"); - return $filecontents; -} - -/** function used to get the salesorder name - * @param int $id - id - * return string $name - Salesorder name returned - */ - -function get_salesorder_name($id) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_salesorder_name"); - $res = $adb->pquery(" select subject from vtiger_salesorder where salesorderid=?", array($id)); - $name=$adb->query_result($res,0,'subject'); - $log->debug("Exiting customer portal function get_salesorder_name"); - return $name; -} - -function get_invoice_detail($id,$module,$customerid,$sessionid) -{ - require_once('include/utils/UserInfoUtil.php'); - require_once('include/utils/utils.php'); - - global $adb,$site_URL,$log,$current_user; - $log->debug("Entering customer portal function get_invoice_details $id - $module - $customerid - $sessionid"); - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - $isPermitted = check_permission($customerid,$module,$id); - if($isPermitted == false) { - return array("#NOT AUTHORIZED#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - $fieldquery = "SELECT fieldname, columnname, fieldlabel,block,uitype FROM vtiger_field WHERE tabid = ? AND displaytype in (1,2,4) ORDER BY block,sequence"; - $fieldres = $adb->pquery($fieldquery,array(getTabid($module))); - $nooffields = $adb->num_rows($fieldres); - $query = "select vtiger_invoice.*,vtiger_crmentity.* ,vtiger_invoicebillads.*,vtiger_invoiceshipads.*, - vtiger_invoicecf.* from vtiger_invoice - inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_invoice.invoiceid - LEFT JOIN vtiger_invoicebillads ON vtiger_invoice.invoiceid = vtiger_invoicebillads.invoicebilladdressid - LEFT JOIN vtiger_invoiceshipads ON vtiger_invoice.invoiceid = vtiger_invoiceshipads.invoiceshipaddressid - INNER JOIN vtiger_invoicecf ON vtiger_invoice.invoiceid = vtiger_invoicecf.invoiceid - where vtiger_invoice.invoiceid=?"; - $res = $adb->pquery($query, array($id)); - - for($i=0;$i<$nooffields;$i++) - { - $fieldname = $adb->query_result($fieldres,$i,'columnname'); - $fieldlabel = getTranslatedString($adb->query_result($fieldres,$i,'fieldlabel')); - - $blockid = $adb->query_result($fieldres,$i,'block'); - $blocknameQuery = "select blocklabel from vtiger_blocks where blockid = ?"; - $blockPquery = $adb->pquery($blocknameQuery,array($blockid)); - $blocklabel = $adb->query_result($blockPquery,0,'blocklabel'); - - $fieldper = getFieldVisibilityPermission($module,$current_user->id,$fieldname); - if($fieldper == '1'){ - continue; - } - - $fieldvalue = $adb->query_result($res,0,$fieldname); - if($fieldname == 'subject' && $fieldvalue !='') - { - $fieldid = $adb->query_result($res,0,'invoiceid'); - //$fieldlabel = "(Download PDF) ".$fieldlabel; - $fieldvalue = '<a href="index.php?downloadfile=true&module=Invoice&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if( $fieldname == 'salesorderid' || $fieldname == 'contactid' || $fieldname == 'accountid' || $fieldname == 'potentialid') - { - $crmid = $fieldvalue; - $Entitymodule = getSalesEntityType($crmid); - if ($crmid != '' && $Entitymodule != '') { - $fieldvalues = getEntityName($Entitymodule, array($crmid)); - if($Entitymodule == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($Entitymodule == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - else - $fieldvalue = $fieldvalues[$crmid]; - } else { - $fieldvalue = ''; - } - } - if($fieldname == 'total'){ - $sym = getCurrencySymbol($res,0,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - if($fieldname == 'smownerid'){ - $fieldvalue = getOwnerName($fieldvalue); - } - $output[0][$module][$i]['fieldlabel'] = $fieldlabel; - $output[0][$module][$i]['fieldvalue'] = $fieldvalue; - $output[0][$module][$i]['blockname'] = getTranslatedString($blocklabel,$module); - } - $log->debug("Entering customer portal function get_invoice_detail .."); - return $output; -} - -/* Function to get contactid's and account's product details' - * - */ -function get_product_list_values($id,$modulename,$sessionid,$only_mine='true') -{ - require_once('modules/Products/Products.php'); - require_once('include/utils/UserInfoUtil.php'); - global $current_user,$adb,$log; - $log->debug("Entering customer portal function get_product_list_values .."); - $check = checkModuleActive($modulename); - if($check == false){ - return array("#MODULE INACTIVE#"); - } - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - $entity_ids_list = array(); - $show_all=show_all($modulename); - - if(!validateSession($id,$sessionid)) - return null; - - if($only_mine == 'true' || $show_all == 'false') - { - array_push($entity_ids_list,$id); - } - else - { - $contactquery = "SELECT contactid, accountid FROM vtiger_contactdetails " . - " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . - " AND vtiger_crmentity.deleted = 0 " . - " WHERE (accountid = (SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?) AND accountid != 0) OR contactid = ?"; - $contactres = $adb->pquery($contactquery, array($id,$id)); - $no_of_cont = $adb->num_rows($contactres); - for($i=0;$i<$no_of_cont;$i++) - { - $cont_id = $adb->query_result($contactres,$i,'contactid'); - $acc_id = $adb->query_result($contactres,$i,'accountid'); - if(!in_array($cont_id, $entity_ids_list)) - $entity_ids_list[] = $cont_id; - if(!in_array($acc_id, $entity_ids_list) && $acc_id != '0') - $entity_ids_list[] = $acc_id; - } - } - - $focus = new Products(); - $focus->filterInactiveFields('Products'); - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - } - } - $fields_list['Related To'] = 'entityid'; - $query = array(); - $params = array(); - $query[] = "SELECT vtiger_products.*,vtiger_seproductsrel.crmid as entityid, vtiger_seproductsrel.setype FROM vtiger_products - INNER JOIN vtiger_crmentity on vtiger_products.productid = vtiger_crmentity.crmid - LEFT JOIN vtiger_seproductsrel on vtiger_seproductsrel.productid = vtiger_products.productid - WHERE vtiger_seproductsrel.crmid in (". generateQuestionMarks($entity_ids_list).") and vtiger_crmentity.deleted = 0 "; - $params[] = array($entity_ids_list); - - $checkQuotes = checkModuleActive('Quotes'); - if($checkQuotes == true){ - $query[] = "select distinct vtiger_products.*, - case when vtiger_quotes.contactid is not null then vtiger_quotes.contactid else vtiger_quotes.accountid end as entityid, - case when vtiger_quotes.contactid is not null then 'Contacts' else 'Accounts' end as setype - from vtiger_quotes INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid - left join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_quotes.quoteid - left join vtiger_products on vtiger_products.productid = vtiger_inventoryproductrel.productid - where vtiger_inventoryproductrel.productid = vtiger_products.productid AND vtiger_crmentity.deleted=0 and (accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params[] = array($entity_ids_list,$entity_ids_list); - } - $checkInvoices = checkModuleActive('Invoice'); - if($checkInvoices == true){ - $query[] = "select distinct vtiger_products.*, - case when vtiger_invoice.contactid !=0 then vtiger_invoice.contactid else vtiger_invoice.accountid end as entityid, - case when vtiger_invoice.contactid !=0 then 'Contacts' else 'Accounts' end as setype - from vtiger_invoice - INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid - left join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_invoice.invoiceid - left join vtiger_products on vtiger_products.productid = vtiger_inventoryproductrel.productid - where vtiger_inventoryproductrel.productid = vtiger_products.productid AND vtiger_crmentity.deleted=0 and (accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params[] = array($entity_ids_list,$entity_ids_list); - } - $fieldValuesToRound = array('unit_price','weight','commissionrate','qtyinstock'); - for($k=0;$k<count($query);$k++) - { - $res[$k] = $adb->pquery($query[$k],$params[$k]); - $noofdata[$k] = $adb->num_rows($res[$k]); - if($noofdata[$k] == 0) - $output[$k][$modulename]['data'] = ''; - for( $j= 0;$j < $noofdata[$k]; $j++) - { - $i=0; - foreach($fields_list as $fieldlabel=> $fieldname) { - $fieldper = getFieldVisibilityPermission('Products',$current_user->id,$fieldname); - if($fieldper == '1' && $fieldname != 'entityid'){ - continue; - } - $output[$k][$modulename]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res[$k],$j,$fieldname); - $fieldid = $adb->query_result($res[$k],$j,'productid'); - - if(in_array($fieldname, $fieldValuesToRound)){ - $fieldvalue = round($fieldvalue, 2); - } - if($fieldname == 'entityid') { - $crmid = $fieldvalue; - $module = $adb->query_result($res[$k],$j,'setype'); - if ($crmid != '' && $module != '') { - $fieldvalues = getEntityName($module, array($crmid)); - if($module == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($module == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - } else { - $fieldvalue = ''; - } - } - - if($fieldname == 'productname') - $fieldvalue = '<a href="index.php?module=Products&action=index&productid='.$fieldid.'">'.$fieldvalue.'</a>'; - - if($fieldname == 'unit_price'){ - $sym = getCurrencySymbol($res[$k],$j,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - $output[$k][$modulename]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - } - $log->debug("Exiting function get_product_list_values....."); - return $output; -} - -/*function used to get details of tickets,quotes,documents,Products,Contacts,Accounts - * @param int $id - id of quotes or invoice or notes - * return string $message - Account informations will be returned from :Accountdetails table - */ -function get_details($id,$module,$customerid,$sessionid) -{ - global $adb,$log,$current_language,$default_language,$current_user; - require_once('include/utils/utils.php'); - require_once('include/utils/UserInfoUtil.php'); - $log->debug("Entering customer portal function get_details .."); - - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - $current_language = $default_language; - $isPermitted = check_permission($customerid,$module,$id); - if($isPermitted == false) { - return array("#NOT AUTHORIZED#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - if($module == 'Quotes'){ - $query = "SELECT - vtiger_quotes.*,vtiger_crmentity.*,vtiger_quotesbillads.*,vtiger_quotesshipads.*, - vtiger_quotescf.* FROM vtiger_quotes - INNER JOIN vtiger_crmentity " . - "ON vtiger_crmentity.crmid = vtiger_quotes.quoteid - INNER JOIN vtiger_quotesbillads - ON vtiger_quotes.quoteid = vtiger_quotesbillads.quotebilladdressid - INNER JOIN vtiger_quotesshipads - ON vtiger_quotes.quoteid = vtiger_quotesshipads.quoteshipaddressid - LEFT JOIN vtiger_quotescf - ON vtiger_quotes.quoteid = vtiger_quotescf.quoteid - WHERE vtiger_quotes.quoteid=(". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted = 0"; - - } - else if($module == 'Documents'){ - $query = "SELECT - vtiger_notes.*,vtiger_crmentity.*,vtiger_attachmentsfolder.foldername,vtiger_notescf.* - FROM vtiger_notes - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_notes.notesid - LEFT JOIN vtiger_attachmentsfolder - ON vtiger_notes.folderid = vtiger_attachmentsfolder.folderid - LEFT JOIN vtiger_notescf ON vtiger_notescf.notesid = vtiger_notes.notesid - WHERE vtiger_notes.notesid=(". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted=0"; - } - else if($module == 'HelpDesk'){ - $query ="SELECT - vtiger_troubletickets.*,vtiger_crmentity.smownerid,vtiger_crmentity.createdtime,vtiger_crmentity.modifiedtime, - vtiger_ticketcf.*,vtiger_crmentity.description FROM vtiger_troubletickets - INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid = vtiger_troubletickets.ticketid - INNER JOIN vtiger_ticketcf - ON vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid - WHERE (vtiger_troubletickets.ticketid=(". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted = 0)"; - } - else if($module == 'Services'){ - $query ="SELECT vtiger_service.*,vtiger_crmentity.*,vtiger_servicecf.* FROM vtiger_service - INNER JOIN vtiger_crmentity - ON vtiger_crmentity.crmid = vtiger_service.serviceid AND vtiger_crmentity.deleted = 0 - LEFT JOIN vtiger_servicecf - ON vtiger_service.serviceid = vtiger_servicecf.serviceid - WHERE vtiger_service.serviceid= (". generateQuestionMarks($id) .")"; - } - else if($module == 'Contacts'){ - $query = "SELECT vtiger_contactdetails.*,vtiger_contactaddress.*,vtiger_contactsubdetails.*,vtiger_contactscf.*" . - " ,vtiger_crmentity.*,vtiger_customerdetails.* - FROM vtiger_contactdetails - INNER JOIN vtiger_crmentity - ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid - INNER JOIN vtiger_contactaddress - ON vtiger_contactaddress.contactaddressid = vtiger_contactdetails.contactid - INNER JOIN vtiger_contactsubdetails - ON vtiger_contactsubdetails.contactsubscriptionid = vtiger_contactdetails.contactid - INNER JOIN vtiger_contactscf - ON vtiger_contactscf.contactid = vtiger_contactdetails.contactid - LEFT JOIN vtiger_customerdetails - ON vtiger_customerdetails.customerid = vtiger_contactdetails.contactid - WHERE vtiger_contactdetails.contactid = (". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted = 0"; - } - else if($module == 'Accounts'){ - $query = "SELECT vtiger_account.*,vtiger_accountbillads.*,vtiger_accountshipads.*,vtiger_accountscf.*, - vtiger_crmentity.* FROM vtiger_account - INNER JOIN vtiger_crmentity - ON vtiger_crmentity.crmid = vtiger_account.accountid - INNER JOIN vtiger_accountbillads - ON vtiger_account.accountid = vtiger_accountbillads.accountaddressid - INNER JOIN vtiger_accountshipads - ON vtiger_account.accountid = vtiger_accountshipads.accountaddressid - INNER JOIN vtiger_accountscf - ON vtiger_account.accountid = vtiger_accountscf.accountid" . - " WHERE vtiger_account.accountid = (". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted = 0"; - } - else if ($module == 'Products'){ - $query = "SELECT vtiger_products.*,vtiger_productcf.*,vtiger_crmentity.* " . - "FROM vtiger_products " . - "INNER JOIN vtiger_crmentity " . - "ON vtiger_crmentity.crmid = vtiger_products.productid " . - "LEFT JOIN vtiger_productcf " . - "ON vtiger_productcf.productid = vtiger_products.productid " . - "LEFT JOIN vtiger_vendor - ON vtiger_vendor.vendorid = vtiger_products.vendor_id " . - "WHERE vtiger_products.productid = (". generateQuestionMarks($id) .") AND vtiger_crmentity.deleted = 0"; - } else if($module == 'Assets') { - $query = "SELECT vtiger_assets.*, vtiger_assetscf.*, vtiger_crmentity.* - FROM vtiger_assets - INNER JOIN vtiger_crmentity - ON vtiger_assets.assetsid = vtiger_crmentity.crmid - INNER JOIN vtiger_assetscf - ON vtiger_assetscf.assetsid = vtiger_assets.assetsid - WHERE vtiger_crmentity.deleted = 0 AND vtiger_assets.assetsid = (". generateQuestionMarks($id) .")"; - } else if ($module == 'Project') { - $query = "SELECT vtiger_project.*, vtiger_projectcf.*, vtiger_crmentity.* - FROM vtiger_project - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_project.projectid - LEFT JOIN vtiger_projectcf ON vtiger_projectcf.projectid = vtiger_project.projectid - WHERE vtiger_project.projectid = ? AND vtiger_crmentity.deleted = 0"; - } - - $params = array($id); - $res = $adb->pquery($query,$params); - - $fieldquery = "SELECT fieldname,columnname,fieldlabel,blocklabel,uitype FROM vtiger_field - INNER JOIN vtiger_blocks on vtiger_blocks.blockid=vtiger_field.block WHERE vtiger_field.tabid = ? AND displaytype in (1,2,4) - ORDER BY vtiger_field.block,vtiger_field.sequence"; - - $fieldres = $adb->pquery($fieldquery,array(getTabid($module))); - $nooffields = $adb->num_rows($fieldres); - - // Dummy instance to make sure column fields are initialized for futher processing - $focus = CRMEntity::getInstance($module); - - for($i=0;$i<$nooffields;$i++) - { - $columnname = $adb->query_result($fieldres,$i,'columnname'); - $fieldname = $adb->query_result($fieldres,$i,'fieldname'); - $fieldid = $adb->query_result($fieldres,$i,'fieldid'); - $blockid = $adb->query_result($fieldres,$i,'block'); - $uitype = $adb->query_result($fieldres,$i,'uitype'); - - $blocklabel = $adb->query_result($fieldres,$i,'blocklabel'); - $blockname = getTranslatedString($blocklabel,$module); - if($blocklabel == 'LBL_COMMENTS' || $blocklabel == 'LBL_IMAGE_INFORMATION'){ // the comments block of tickets is hardcoded in customer portal,get_ticket_comments is used for it - continue; - } - if($uitype == 83){ //for taxclass in products and services - continue; - } - $fieldper = getFieldVisibilityPermission($module,$current_user->id,$fieldname); - if($fieldper == '1'){ - continue; - } - - $fieldlabel = getTranslatedString($adb->query_result($fieldres,$i,'fieldlabel')); - $fieldvalue = $adb->query_result($res,0,$columnname); - - $output[0][$module][$i]['fieldname'] = $fieldname; - $output[0][$module][$i]['fieldlabel'] = $fieldlabel ; - $output[0][$module][$i]['blockname'] = $blockname; - if($columnname == 'title' || $columnname == 'description') { - $fieldvalue = decode_html($fieldvalue); - } - if($uitype == 71 || $uitype == 72){ - $fieldvalue = number_format($fieldvalue, 5, '.', ''); - } - if($columnname == 'parent_id' || $columnname == 'contactid' || $columnname == 'accountid' || $columnname == 'potentialid' - || $fieldname == 'account_id' || $fieldname == 'contact_id' || $columnname == 'linktoaccountscontacts') - { - $crmid = $fieldvalue; - $modulename = getSalesEntityType($crmid); - if ($crmid != '' && $modulename != '') { - $fieldvalues = getEntityName($modulename, array($crmid)); - if($modulename == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($modulename == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - else - $fieldvalue = $fieldvalues[$crmid]; - } else { - $fieldvalue = ''; - } - } - - if($module=='Quotes') - { - if($fieldname == 'subject' && $fieldvalue !=''){ - $fieldid = $adb->query_result($res,0,'quoteid'); - $fieldvalue = '<a href="index.php?downloadfile=true&module=Quotes&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if($fieldname == 'total'){ - $sym = getCurrencySymbol($res,0,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - } - if($module == 'Documents') - { - $fieldid = $adb->query_result($res,0,'notesid'); - $filename = $fieldvalue; - $folderid = $adb->query_result($res,0,'folderid'); - $filestatus = $adb->query_result($res,0,'filestatus'); - $filetype = $adb->query_result($res,0,'filelocationtype'); - if($fieldname == 'filename'){ - if($filestatus == 1){ - if($filetype == 'I'){ - $fieldvalue = '<a href="index.php?downloadfile=true&folderid='.$folderid.'&filename='.$filename.'&module=Documents&action=index&id='.$fieldid.'" >'.$fieldvalue.'</a>'; - } - elseif($filetype == 'E'){ - $fieldvalue = '<a target="_blank" href="'.$filename.'" onclick = "updateCount('.$fieldid.');">'.$filename.'</a>'; - } - } - } - if($fieldname == 'folderid'){ - $fieldvalue = $adb->query_result($res,0,'foldername'); - } - if($fieldname == 'filesize'){ - if($filetype == 'I'){ - $fieldvalue = $fieldvalue .' B'; - } - elseif($filetype == 'E'){ - $fieldvalue = '--'; - } - } - if($fieldname == 'filelocationtype'){ - if($fieldvalue == 'I'){ - $fieldvalue = getTranslatedString('LBL_INTERNAL',$module); - }elseif($fieldvalue == 'E'){ - $fieldvalue = getTranslatedString('LBL_EXTERNAL',$module); - }else{ - $fieldvalue = '---'; - } - } - } - if($columnname == 'product_id') { - $fieldvalues = getEntityName('Products', array($fieldvalue)); - $fieldvalue = '<a href="index.php?module=Products&action=index&productid='.$fieldvalue.'">'.$fieldvalues[$fieldvalue].'</a>'; - } - if($module == 'Products'){ - if($fieldname == 'vendor_id'){ - $fieldvalue = get_vendor_name($fieldvalue); - } - } - if($module == 'Assets' ){ - if($fieldname == 'account'){ - $accountid = $adb->query_result($res,0,'account'); - $accountres = $adb->pquery("select vtiger_account.accountname from vtiger_account where accountid=?",array($accountid)); - $accountname = $adb->query_result($accountres,0,'accountname'); - $fieldvalue = $accountname; - } - if($fieldname == 'product'){ - $productid = $adb->query_result($res,0,'product'); - $productres = $adb->pquery("select vtiger_products.productname from vtiger_products where productid=?",array($productid)); - $productname = $adb->query_result($productres,0,'productname'); - $fieldvalue = $productname; - } - if($fieldname == 'invoiceid'){ - $invoiceid = $adb->query_result($res,0,'invoiceid'); - $invoiceres = $adb->pquery("select vtiger_invoice.subject from vtiger_invoice where invoiceid=?",array($invoiceid)); - $invoicename = $adb->query_result($invoiceres,0,'subject'); - $fieldvalue = $invoicename; - } - } - if($fieldname == 'assigned_user_id' || $fieldname == 'assigned_user_id1'){ - $fieldvalue = getOwnerName($fieldvalue); - } - if($uitype == 56){ - if($fieldvalue == 1){ - $fieldvalue = 'Yes'; - }else{ - $fieldvalue = 'No'; - } - } - if($module == 'HelpDesk' && $fieldname == 'ticketstatus'){ - $parentid = $adb->query_result($res,0,'parent_id'); - $contactid = $adb->query_result($res,0,'contact_id'); - $status = $adb->query_result($res,0,'status'); - - if($parentid!=0) {//allow contacts related to organization to close the ticket - $focus = CRMEntity::getInstance('Accounts'); - $focus->id = $parentid; - $entityIds = $focus->getRelatedContactsIds(); - if($contactid != 0 ) { - if(in_array($customerid, $entityIds) && in_array($contactid, $entityIds)) - $fieldvalue = $status; - else if($customerid == $contactid) - $fieldvalue = $status; - else - $fieldvalue = ''; - } else { - if(in_array($customerid, $entityIds)) - $fieldvalue = $status; - else - $fieldvalue = ''; - } - } else if($customerid != $contactid ) {//allow only the owner to close the ticket - $fieldvalue = ''; - } else { - $fieldvalue = $status; - } - } - if($fieldname == 'unit_price'){ - $sym = getCurrencySymbol($res,0,'currency_id'); - $fieldvalue = round($fieldvalue, 2); - $fieldvalue = $sym.$fieldvalue; - } - $output[0][$module][$i]['fieldvalue'] = $fieldvalue; - } - - if($module == 'HelpDesk'){ - $ticketid = $adb->query_result($res,0,'ticketid'); - $sc_info = getRelatedServiceContracts($ticketid); - if (!empty($sc_info)) { - $modulename = 'ServiceContracts'; - $blocklable = getTranslatedString('LBL_SERVICE_CONTRACT_INFORMATION',$modulename); - $j=$i; - for($k=0;$k<count($sc_info);$k++){ - foreach ($sc_info[$k] as $label => $value) { - $output[0][$module][$j]['fieldlabel']= getTranslatedString($label,$modulename); - $output[0][$module][$j]['fieldvalue']= $value; - $output[0][$module][$j]['blockname'] = $blocklable; - $j++; - } - } - } - } - $log->debug("Existing customer portal function get_details .."); - return $output; -} -/* Function to check the permission if the customer can see the recorde details - * @params $customerid :: INT contact's Id - * $module :: String modulename - * $entityid :: INT Records Id - */ -function check_permission($customerid, $module, $entityid) { - global $adb,$log; - $log->debug("Entering customer portal function check_permission .."); - $show_all= show_all($module); - $allowed_contacts_and_accounts = array(); - $check = checkModuleActive($module); - if($check == false){ - return false; - } - - if($show_all == 'false') - $allowed_contacts_and_accounts[] = $customerid; - else { - - $contactquery = "SELECT contactid, accountid FROM vtiger_contactdetails " . - " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . - " AND vtiger_crmentity.deleted = 0 " . - " WHERE (accountid = (SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?) AND accountid != 0) OR contactid = ?"; - $contactres = $adb->pquery($contactquery, array($customerid,$customerid)); - $no_of_cont = $adb->num_rows($contactres); - for($i=0;$i<$no_of_cont;$i++){ - $cont_id = $adb->query_result($contactres,$i,'contactid'); - $acc_id = $adb->query_result($contactres,$i,'accountid'); - if(!in_array($cont_id, $allowed_contacts_and_accounts)) - $allowed_contacts_and_accounts[] = $cont_id; - if(!in_array($acc_id, $allowed_contacts_and_accounts) && $acc_id != '0') - $allowed_contacts_and_accounts[] = $acc_id; - } - } - if(in_array($entityid, $allowed_contacts_and_accounts)) { //for contact's,if they are present in the allowed list then send true - return true; - } - $faqquery = "select id from vtiger_faq"; - $faqids = $adb->pquery($faqquery,array()); - $no_of_faq = $adb->num_rows($faqids); - for($i=0;$i<$no_of_faq;$i++){ - $faq_id[] = $adb->query_result($faqids,$i,'id'); - } - switch($module) { - case 'Products' : $query = "SELECT vtiger_seproductsrel.productid FROM vtiger_seproductsrel - INNER JOIN vtiger_crmentity - ON vtiger_seproductsrel.productid=vtiger_crmentity.crmid - WHERE vtiger_seproductsrel.crmid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") - AND vtiger_crmentity.deleted=0 - AND vtiger_seproductsrel.productid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - $query = "SELECT vtiger_inventoryproductrel.productid, vtiger_inventoryproductrel.id - FROM vtiger_inventoryproductrel - INNER JOIN vtiger_crmentity - ON vtiger_inventoryproductrel.productid=vtiger_crmentity.crmid - LEFT JOIN vtiger_quotes - ON vtiger_inventoryproductrel.id = vtiger_quotes.quoteid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_quotes.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_quotes.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_inventoryproductrel.productid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - $query = "SELECT vtiger_inventoryproductrel.productid, vtiger_inventoryproductrel.id - FROM vtiger_inventoryproductrel - INNER JOIN vtiger_crmentity - ON vtiger_inventoryproductrel.productid=vtiger_crmentity.crmid - LEFT JOIN vtiger_invoice - ON vtiger_inventoryproductrel.id = vtiger_invoice.invoiceid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_invoice.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_invoice.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_inventoryproductrel.productid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Quotes' : $query = "SELECT vtiger_quotes.quoteid - FROM vtiger_quotes - INNER JOIN vtiger_crmentity - ON vtiger_quotes.quoteid=vtiger_crmentity.crmid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_quotes.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_quotes.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_quotes.quoteid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Invoice' : $query = "SELECT vtiger_invoice.invoiceid - FROM vtiger_invoice - INNER JOIN vtiger_crmentity - ON vtiger_invoice.invoiceid=vtiger_crmentity.crmid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_invoice.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_invoice.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_invoice.invoiceid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Documents' : $query = "SELECT vtiger_senotesrel.notesid FROM vtiger_senotesrel - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_senotesrel.notesid AND vtiger_crmentity.deleted = 0 - WHERE vtiger_senotesrel.crmid IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") - AND vtiger_senotesrel.notesid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - if(checkModuleActive('Project')) { - $query = "SELECT vtiger_senotesrel.notesid FROM vtiger_senotesrel - INNER JOIN vtiger_project ON vtiger_project.projectid = vtiger_senotesrel.crmid - WHERE vtiger_project.linktoaccountscontacts IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") - AND vtiger_senotesrel.notesid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - } - - $query = "SELECT vtiger_senotesrel.notesid FROM vtiger_senotesrel - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_senotesrel.notesid AND vtiger_crmentity.deleted = 0 - WHERE vtiger_senotesrel.crmid IN (". generateQuestionMarks($faq_id) .") - AND vtiger_senotesrel.notesid = ?"; - $res = $adb->pquery($query, array($faq_id,$entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'HelpDesk' : if($acc_id) $accCondition = "OR vtiger_troubletickets.parent_id = $acc_id"; - $query = "SELECT vtiger_troubletickets.ticketid FROM vtiger_troubletickets - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid AND vtiger_crmentity.deleted = 0 - WHERE (vtiger_troubletickets.contact_id IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") $accCondition ) - AND vtiger_troubletickets.ticketid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - - $query = "SELECT vtiger_troubletickets.ticketid FROM vtiger_troubletickets - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid - INNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid) - WHERE vtiger_crmentity.deleted = 0 AND - (vtiger_crmentityrel.crmid IN - (SELECT projectid FROM vtiger_project WHERE linktoaccountscontacts - IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") AND vtiger_crmentityrel.relcrmid = $entityid) - OR vtiger_crmentityrel.relcrmid IN - (SELECT projectid FROM vtiger_project WHERE linktoaccountscontacts - IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") AND vtiger_crmentityrel.crmid = $entityid) - AND vtiger_troubletickets.ticketid = ?)"; - - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - - break; - - case 'Services' : $query = "SELECT vtiger_service.serviceid FROM vtiger_service - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_service.serviceid AND vtiger_crmentity.deleted = 0 - LEFT JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid=vtiger_service.serviceid OR vtiger_crmentityrel.crmid=vtiger_service.serviceid) - WHERE (vtiger_crmentityrel.crmid IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") OR " . - "(vtiger_crmentityrel.relcrmid IN (".generateQuestionMarks($allowed_contacts_and_accounts).") AND vtiger_crmentityrel.module = 'Services')) - AND vtiger_service.serviceid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts,$allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - - $query = "SELECT vtiger_inventoryproductrel.productid, vtiger_inventoryproductrel.id - FROM vtiger_inventoryproductrel - INNER JOIN vtiger_crmentity - ON vtiger_inventoryproductrel.productid=vtiger_crmentity.crmid - LEFT JOIN vtiger_quotes - ON vtiger_inventoryproductrel.id = vtiger_quotes.quoteid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_quotes.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_quotes.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_inventoryproductrel.productid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - - $query = "SELECT vtiger_inventoryproductrel.productid, vtiger_inventoryproductrel.id - FROM vtiger_inventoryproductrel - INNER JOIN vtiger_crmentity - ON vtiger_inventoryproductrel.productid=vtiger_crmentity.crmid - LEFT JOIN vtiger_invoice - ON vtiger_inventoryproductrel.id = vtiger_invoice.invoiceid - WHERE vtiger_crmentity.deleted=0 - AND (vtiger_invoice.contactid IN (". generateQuestionMarks($allowed_contacts_and_accounts).") or vtiger_invoice.accountid IN (".generateQuestionMarks($allowed_contacts_and_accounts).")) - AND vtiger_inventoryproductrel.productid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Accounts' : $query = "SELECT vtiger_account.accountid FROM vtiger_account " . - "INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_account.accountid " . - "INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.accountid = vtiger_account.accountid " . - "WHERE vtiger_crmentity.deleted = 0 and vtiger_contactdetails.contactid = ? and vtiger_contactdetails.accountid = ?"; - $res = $adb->pquery($query,array($customerid,$entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Assets' : $query = "SELECT vtiger_assets.assetname FROM vtiger_assets - INNER JOIN vtiger_crmentity ON vtiger_assets.assetsid = vtiger_crmentity.crmid - WHERE vtiger_crmentity.deleted = 0 and vtiger_assets.account = ? "; - $accountid = ''; - $accountRes = $adb->pquery("SELECT accountid FROM vtiger_contactdetails - INNER JOIN vtiger_crmentity ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid - WHERE contactid = ? AND deleted = 0", array($customerid)); - $accountRow = $adb->num_rows($accountRes); - if($accountRow) { - $accountid = $adb->query_result($accountRes, 0, 'accountid'); - } - $res = $adb->pquery($query,array($accountid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - case 'Project' : $query = "SELECT vtiger_project.projectid FROM vtiger_project - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_project.projectid AND vtiger_crmentity.deleted = 0 - WHERE vtiger_project.linktoaccountscontacts IN (". generateQuestionMarks($allowed_contacts_and_accounts) .") - AND vtiger_project.projectid = ?"; - $res = $adb->pquery($query, array($allowed_contacts_and_accounts, $entityid)); - if ($adb->num_rows($res) > 0) { - return true; - } - break; - - } - return false; - $log->debug("Exiting customerportal function check_permission .."); -} - -/* Function to get related Documents for faq - * @params $id :: INT parent's Id - * $module :: String modulename - * $customerid :: INT contact's Id' - */ -function get_documents($id,$module,$customerid,$sessionid) -{ - global $adb,$log; - $log->debug("Entering customer portal function get_documents .."); - $check = checkModuleActive($module); - if($check == false){ - return array("#MODULE INACTIVE#"); - } - $fields_list = array( - 'title' => 'Title', - 'filename' => 'FileName', - 'createdtime' => 'Created Time'); - - if(!validateSession($customerid,$sessionid)) - return null; - - $query ="select vtiger_notes.title,'Documents' ActivityType, vtiger_notes.filename, - crm2.createdtime,vtiger_notes.notesid,vtiger_notes.folderid, - vtiger_notes.notecontent description, vtiger_users.user_name, vtiger_notes.filelocationtype - from vtiger_notes - LEFT join vtiger_senotesrel on vtiger_senotesrel.notesid= vtiger_notes.notesid - INNER join vtiger_crmentity on vtiger_crmentity.crmid= vtiger_senotesrel.crmid - LEFT join vtiger_crmentity crm2 on crm2.crmid=vtiger_notes.notesid and crm2.deleted=0 - LEFT JOIN vtiger_groups - ON vtiger_groups.groupid = vtiger_crmentity.smownerid - LEFT join vtiger_users on crm2.smownerid= vtiger_users.id - where vtiger_crmentity.crmid=?"; - $res = $adb->pquery($query,array($id)); - $noofdata = $adb->num_rows($res); - for( $j= 0;$j < $noofdata; $j++) - { - $i=0; - foreach($fields_list as $fieldname => $fieldlabel) { - $output[0][$module]['head'][0][$i]['fielddata'] = $fieldlabel; //$adb->query_result($fieldres,$i,'fieldlabel'); - $fieldvalue = $adb->query_result($res,$j,$fieldname); - if($fieldname =='title') { - $fieldid = $adb->query_result($res,$j,'notesid'); - $filename = $fieldvalue; - $fieldvalue = '<a href="index.php?&module=Documents&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - } - if($fieldname == 'filename'){ - $fieldid = $adb->query_result($res,$j,'notesid'); - $filename = $fieldvalue; - $folderid = $adb->query_result($res,$j,'folderid'); - $filetype = $adb->query_result($res,$j,'filelocationtype'); - if($filetype == 'I'){ - $fieldvalue = '<a href="index.php?&downloadfile=true&folderid='.$folderid.'&filename='.$filename.'&module=Documents&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - }else{ - $fieldvalue = '<a target="_blank" href="'.$filename.'">'.$filename.'</a>'; - } - } - $output[1][$module]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - $log->debug("Exiting customerportal function get_faq_document .."); - return $output; -} - -/* Function to get related projecttasks/projectmilestones for a Project - * @params $id :: INT Project's Id - * $module :: String modulename - * $customerid :: INT contact's Id' - */ -function get_project_components($id,$module,$customerid,$sessionid) { - checkFileAccessForInclusion("modules/$module/$module.php"); - require_once("modules/$module/$module.php"); - require_once('include/utils/UserInfoUtil.php'); - - global $adb,$log; - $log->debug("Entering customer portal function get_project_components .."); - $check = checkModuleActive($module); - if($check == false) { - return array("#MODULE INACTIVE#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - $focus = new $module(); - $focus->filterInactiveFields($module); - $componentfieldVisibilityByColumn = array(); - $fields_list = array(); - - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - $componentfieldVisibilityByColumn[$fieldname] = getColumnVisibilityPermission($current_user->id,$fieldname,$module); - } - } - - if ($module == 'ProjectTask') { - $query ="SELECT vtiger_projecttask.*, vtiger_crmentity.smownerid - FROM vtiger_projecttask - INNER JOIN vtiger_project ON vtiger_project.projectid = vtiger_projecttask.projectid AND vtiger_project.projectid = ? - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_projecttask.projecttaskid AND vtiger_crmentity.deleted = 0"; - } elseif ($module == 'ProjectMilestone') { - $query ="SELECT vtiger_projectmilestone.*, vtiger_crmentity.smownerid - FROM vtiger_projectmilestone - INNER JOIN vtiger_project ON vtiger_project.projectid = vtiger_projectmilestone.projectid AND vtiger_project.projectid = ? - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_projectmilestone.projectmilestoneid AND vtiger_crmentity.deleted = 0"; - } - - $res = $adb->pquery($query,array(vtlib_purify($id))); - $noofdata = $adb->num_rows($res); - - for( $j= 0;$j < $noofdata; ++$j) { - $i=0; - foreach($fields_list as $fieldlabel => $fieldname) { - $fieldper = $componentfieldVisibilityByColumn[$fieldname]; - if($fieldper == '1'){ - continue; - } - $output[0][$module]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res,$j,$fieldname); - if($fieldname == 'smownerid'){ - $fieldvalue = getOwnerName($fieldvalue); - } - $output[1][$module]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - $log->debug("Exiting customerportal function get_project_components .."); - return $output; -} - -/* Function to get related tickets for a Project - * @params $id :: INT Project's Id - * $module :: String modulename - * $customerid :: INT contact's Id' - */ -function get_project_tickets($id,$module,$customerid,$sessionid) { - require_once('modules/HelpDesk/HelpDesk.php'); - require_once('include/utils/UserInfoUtil.php'); - - global $adb,$log; - $log->debug("Entering customer portal function get_project_tickets .."); - $check = checkModuleActive($module); - if($check == false) { - return array("#MODULE INACTIVE#"); - } - - if(!validateSession($customerid,$sessionid)) - return null; - - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - - $focus = new HelpDesk(); - $focus->filterInactiveFields('HelpDesk'); - $TicketsfieldVisibilityByColumn = array(); - $fields_list = array(); - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - $TicketsfieldVisibilityByColumn[$fieldname] = getColumnVisibilityPermission($current_user->id,$fieldname,'HelpDesk'); - } - } - - $query = "SELECT vtiger_troubletickets.*, vtiger_crmentity.smownerid FROM vtiger_troubletickets - INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_troubletickets.ticketid - INNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid) - WHERE vtiger_crmentity.deleted = 0 AND (vtiger_crmentityrel.crmid = ? OR vtiger_crmentityrel.relcrmid = ?)"; - - $params = array($id, $id); - $res = $adb->pquery($query,$params); - $noofdata = $adb->num_rows($res); - - for( $j= 0;$j < $noofdata; $j++) { - $i=0; - foreach($fields_list as $fieldlabel => $fieldname) { - $fieldper = $TicketsfieldVisibilityByColumn[$fieldname]; //in troubletickets the list_fields has columns so we call this API - if($fieldper == '1'){ - continue; - } - $output[0][$module]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res,$j,$fieldname); - $ticketid = $adb->query_result($res,$j,'ticketid'); - if($fieldname == 'title'){ - $fieldvalue = '<a href="index.php?module=HelpDesk&action=index&fun=detail&ticketid='.$ticketid.'">'.$fieldvalue.'</a>'; - } - if($fieldname == 'parent_id' || $fieldname == 'contact_id') { - $crmid = $fieldvalue; - $entitymodule = getSalesEntityType($crmid); - if ($crmid != '' && $entitymodule != '') { - $fieldvalues = getEntityName($entitymodule, array($crmid)); - if($entitymodule == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($entitymodule == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - } else { - $fieldvalue = ''; - } - } - if($fieldname == 'smownerid'){ - $fieldvalue = getOwnerName($fieldvalue); - } - $output[1][$module]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - $log->debug("Exiting customerportal function get_project_tickets .."); - return $output; -} - -/* Function to get contactid's and account's product details' - * - */ -function get_service_list_values($id,$modulename,$sessionid,$only_mine='true') -{ - require_once('modules/Services/Services.php'); - require_once('include/utils/UserInfoUtil.php'); - global $current_user,$adb,$log; - $log->debug("Entering customer portal Function get_service_list_values"); - $check = checkModuleActive($modulename); - if($check == false){ - return array("#MODULE INACTIVE#"); - } - $user = new Users(); - $userid = getPortalUserid(); - $current_user = $user->retrieveCurrentUserInfoFromFile($userid); - //To avoid SQL injection we are type casting as well as bound the id variable - $id = (int) vtlib_purify($id); - $entity_ids_list = array(); - $show_all=show_all($modulename); - - if(!validateSession($id,$sessionid)) - return null; - - if($only_mine == 'true' || $show_all == 'false') - { - array_push($entity_ids_list,$id); - } - else - { - $contactquery = "SELECT contactid, accountid FROM vtiger_contactdetails " . - " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid" . - " AND vtiger_crmentity.deleted = 0 " . - " WHERE (accountid = (SELECT accountid FROM vtiger_contactdetails WHERE contactid = ?) AND accountid != 0) OR contactid = ?"; - $contactres = $adb->pquery($contactquery, array($id,$id)); - $no_of_cont = $adb->num_rows($contactres); - for($i=0;$i<$no_of_cont;$i++) - { - $cont_id = $adb->query_result($contactres,$i,'contactid'); - $acc_id = $adb->query_result($contactres,$i,'accountid'); - if(!in_array($cont_id, $entity_ids_list)) - $entity_ids_list[] = $cont_id; - if(!in_array($acc_id, $entity_ids_list) && $acc_id != '0') - $entity_ids_list[] = $acc_id; - } - } - - $focus = new Services(); - $focus->filterInactiveFields('Services'); - foreach ($focus->list_fields as $fieldlabel => $values){ - foreach($values as $table => $fieldname){ - $fields_list[$fieldlabel] = $fieldname; - } - } - $fields_list['Related To'] = 'entityid'; - $query = array(); - $params = array(); - - $query[] = "select vtiger_service.*," . - "case when vtiger_crmentityrel.crmid != vtiger_service.serviceid then vtiger_crmentityrel.crmid else vtiger_crmentityrel.relcrmid end as entityid, " . - "'' as setype from vtiger_service " . - "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_service.serviceid " . - "left join vtiger_crmentityrel on (vtiger_crmentityrel.relcrmid=vtiger_service.serviceid or vtiger_crmentityrel.crmid=vtiger_service.serviceid) " . - "where vtiger_crmentity.deleted = 0 and " . - "( vtiger_crmentityrel.crmid in (".generateQuestionMarks($entity_ids_list).") OR " . - "(vtiger_crmentityrel.relcrmid in (".generateQuestionMarks($entity_ids_list).") AND vtiger_crmentityrel.module = 'Services')" . - ")"; - - $params[] = array($entity_ids_list, $entity_ids_list); - - $checkQuotes = checkModuleActive('Quotes'); - if($checkQuotes == true){ - $query[] = "select distinct vtiger_service.*, - case when vtiger_quotes.contactid is not null then vtiger_quotes.contactid else vtiger_quotes.accountid end as entityid, - case when vtiger_quotes.contactid is not null then 'Contacts' else 'Accounts' end as setype - from vtiger_quotes INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid - left join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_quotes.quoteid - left join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid - where vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and (accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params[] = array($entity_ids_list,$entity_ids_list); - } - $checkInvoices = checkModuleActive('Invoice'); - if($checkInvoices == true){ - $query[] = "select distinct vtiger_service.*, - case when vtiger_invoice.contactid !=0 then vtiger_invoice.contactid else vtiger_invoice.accountid end as entityid, - case when vtiger_invoice.contactid !=0 then 'Contacts' else 'Accounts' end as setype - from vtiger_invoice - INNER join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid - left join vtiger_inventoryproductrel on vtiger_inventoryproductrel.id=vtiger_invoice.invoiceid - left join vtiger_service on vtiger_service.serviceid = vtiger_inventoryproductrel.productid - where vtiger_inventoryproductrel.productid = vtiger_service.serviceid AND vtiger_crmentity.deleted=0 and (accountid in (". generateQuestionMarks($entity_ids_list) .") or contactid in (". generateQuestionMarks($entity_ids_list) ."))"; - $params[] = array($entity_ids_list,$entity_ids_list); - } - - $ServicesfieldVisibilityPermissions = array(); - foreach($fields_list as $fieldlabel=> $fieldname) { - $ServicesfieldVisibilityPermissions[$fieldname] = - getFieldVisibilityPermission('Services',$current_user->id,$fieldname); - } - - $fieldValuesToRound = array('unit_price','commissionrate'); - - for($k=0;$k<count($query);$k++) - { - $res[$k] = $adb->pquery($query[$k],$params[$k]); - $noofdata[$k] = $adb->num_rows($res[$k]); - if($noofdata[$k] == 0) { - $output[$k][$modulename]['data'] = ''; - } - for( $j= 0;$j < $noofdata[$k]; $j++) - { - $i=0; - foreach($fields_list as $fieldlabel=> $fieldname) { - $fieldper = $ServicesfieldVisibilityPermissions[$fieldname]; - if($fieldper == '1' && $fieldname != 'entityid'){ - continue; - } - $output[$k][$modulename]['head'][0][$i]['fielddata'] = $fieldlabel; - $fieldvalue = $adb->query_result($res[$k],$j,$fieldname); - $fieldid = $adb->query_result($res[$k],$j,'serviceid'); - - if(in_array($fieldname, $fieldValuesToRound)){ - $fieldvalue = round($fieldvalue, 2); - } - if($fieldname == 'entityid') { - $crmid = $fieldvalue; - $module = $adb->query_result($res[$k],$j,'setype'); - if($module == ''){ - $module = $adb->query_result($adb->pquery("SELECT setype FROM vtiger_crmentity WHERE crmid = ?", array($crmid)),0,'setype'); - } - if ($crmid != '' && $module != '') { - $fieldvalues = getEntityName($module, array($crmid)); - if($module == 'Contacts') - $fieldvalue = '<a href="index.php?module=Contacts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - elseif($module == 'Accounts') - $fieldvalue = '<a href="index.php?module=Accounts&action=index&id='.$crmid.'">'.$fieldvalues[$crmid].'</a>'; - } else { - $fieldvalue = ''; - } - } - - if($fieldname == 'servicename') - $fieldvalue = '<a href="index.php?module=Services&action=index&id='.$fieldid.'">'.$fieldvalue.'</a>'; - - if($fieldname == 'unit_price'){ - $sym = getCurrencySymbol($res[$k],$j,'currency_id'); - $fieldvalue = $sym.$fieldvalue; - } - $output[$k][$modulename]['data'][$j][$i]['fielddata'] = $fieldvalue; - $i++; - } - } - } - $log->debug("Exiting customerportal function get_product_list_values....."); - return $output; -} - - -/* Function to get the list of modules allowed for customer portal - */ -function get_modules() -{ - global $adb,$log; - $log->debug("Entering customer portal Function get_modules"); - - // Check if information is available in cache? - $modules = Vtiger_Soap_CustomerPortal::lookupAllowedModules(); - if($modules === false) { - $modules = array(); - - $query = $adb->pquery("SELECT vtiger_customerportal_tabs.* FROM vtiger_customerportal_tabs - INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_customerportal_tabs.tabid - WHERE vtiger_tab.presence = 0 AND vtiger_customerportal_tabs.visible = 1", array()); - $norows = $adb->num_rows($query); - if($norows) { - while($resultrow = $adb->fetch_array($query)) { - $modules[(int)$resultrow['sequence']] = getTabModuleName($resultrow['tabid']); - } - ksort($modules); // Order via SQL might cost us, so handling it ourselves in this case - } - Vtiger_Soap_CustomerPortal::updateAllowedModules($modules); - } - $log->debug("Exiting customerportal function get_modules"); - return $modules; -} - -/* Function to check if the module has the permission to show the related contact's and Account's information - */ -function show_all($module){ - - global $adb,$log; - $log->debug("Entering customer portal Function show_all"); - $tabid = getTabid($module); - if($module=='Tickets'){ - $tabid = getTabid('HelpDesk'); - } - $query = $adb->pquery("SELECT prefvalue from vtiger_customerportal_prefs where tabid = ?", array($tabid)); - $norows = $adb->num_rows($query); - if($norows > 0){ - if($adb->query_result($query,0,'prefvalue') == 1){ - return 'true'; - }else { - return 'false'; - } - }else { - return 'false'; - } - $log->debug("Exiting customerportal function show_all"); -} - -/* Function to get ServiceContracts information in the tickets module if the ticket is related to ServiceContracts - */ -function getRelatedServiceContracts($crmid){ - global $adb,$log; - $log->debug("Entering customer portal function getRelatedServiceContracts"); - $module = 'ServiceContracts'; - $sc_info = array(); - if(vtlib_isModuleActive($module) !== true){ - return $sc_info; - } - $query = "SELECT * FROM vtiger_servicecontracts " . - "INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_servicecontracts.servicecontractsid AND vtiger_crmentity.deleted = 0 " . - "LEFT JOIN vtiger_crmentityrel ON vtiger_crmentityrel.crmid = vtiger_servicecontracts.servicecontractsid " . - "WHERE (vtiger_crmentityrel.relcrmid = ? and vtiger_crmentityrel.module= 'ServiceContracts')"; - - $res = $adb->pquery($query,array($crmid)); - $rows = $adb->num_rows($res); - for($i=0;$i<$rows;$i++){ - $sc_info[$i]['Subject'] = $adb->query_result($res,$i,'subject'); - $sc_info[$i]['Used Units'] = $adb->query_result($res,$i,'used_units'); - $sc_info[$i]['Total Units'] = $adb->query_result($res,$i,'total_units'); - $sc_info[$i]['Available Units'] = $adb->query_result($res,$i,'total_units')- $adb->query_result($res,$i,'used_units'); - } - return $sc_info; - $log->debug("Exiting customerportal function getRelatedServiceContracts"); -} - - -function getPortalUserid() { - global $adb,$log; - $log->debug("Entering customer portal function getPortalUserid"); - - // Look the value from cache first - $userid = Vtiger_Soap_CustomerPortal::lookupPrefValue('userid'); - if($userid === false) { - $res = $adb->pquery("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'userid' AND tabid = 0", array()); - $norows = $adb->num_rows($res); - if($norows > 0) { - $userid = $adb->query_result($res,0,'prefvalue'); - // Update the cache information now. - Vtiger_Soap_CustomerPortal::updatePrefValue('userid', $userid); - } - } - return $userid; - $log->debug("Exiting customerportal function getPortalUserid"); -} - -function checkModuleActive($module){ - global $adb,$log; - - $isactive = false; - $modules = get_modules(true); - - foreach($modules as $key => $value){ - if(strcmp($module,$value) == 0){ - $isactive = true; - break; - } - } - return $isactive; -} - -/** - * Function that gives the Currency Symbol - * @params $result $adb object - resultset - * $column String column name - * Return $value - Currency Symbol - */ -function getCurrencySymbol($result,$i,$column){ - global $adb; - $currencyid = $adb->query_result($result,$i,$column); - $curr = getCurrencySymbolandCRate($currencyid); - $value = "(".$curr['symbol'].")"; - return $value; - -} - -function getDefaultAssigneeId() { - global $adb; - $adb->println("Entering customer portal function getPortalUserid"); - - // Look the value from cache first - $defaultassignee = Vtiger_Soap_CustomerPortal::lookupPrefValue('defaultassignee'); - if($defaultassignee === false) { - $res = $adb->pquery("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'defaultassignee' AND tabid = 0", array()); - $norows = $adb->num_rows($res); - if($norows > 0) { - $defaultassignee = $adb->query_result($res,0,'prefvalue'); - // Update the cache information now. - Vtiger_Soap_CustomerPortal::updatePrefValue('defaultassignee', $defaultassignee); - } - } - return $defaultassignee; -} - -/* Begin the HTTP listener service and exit. */ -if (!isset($HTTP_RAW_POST_DATA)){ - $HTTP_RAW_POST_DATA = file_get_contents('php://input'); -} -$server->service($HTTP_RAW_POST_DATA); - -exit(); - -?> diff --git a/soap/firefoxtoolbar.php b/soap/firefoxtoolbar.php deleted file mode 100644 index c833f9181980ed362b89910611ba2e2923ab649f..0000000000000000000000000000000000000000 --- a/soap/firefoxtoolbar.php +++ /dev/null @@ -1,926 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -/** - * URL Verfication - Required to overcome Apache mis-configuration and leading to shared setup mode. - */ -require_once 'config.php'; -if (file_exists('config_override.php')) { - include_once 'config_override.php'; -} - -include_once 'vtlib/Vtiger/Module.php'; -include_once 'includes/main/WebUI.php'; - -require_once('libraries/nusoap/nusoap.php'); - -$log = &LoggerManager::getLogger('firefoxlog'); - -$NAMESPACE = 'http://www.vtiger.com/products/crm'; -$server = new soap_server; -$accessDenied = "You are not authorized for performing this action"; -$server->configureWSDL('vtigersoap'); - -$server->register( - 'create_lead_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'lastname'=>'xsd:string', - 'firstname'=>'xsd:string', - 'email'=>'xsd:string', - 'phone'=>'xsd:string', - 'company'=>'xsd:string', - 'country'=>'xsd:string', - 'description'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - - - -$server->register( - 'create_site_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'portalname'=>'xsd:string', - 'portalurl'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - - -$server->register( - 'create_rss_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'rssurl'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - - - - -$server->register( - 'create_contacts', - array('user_name'=>'xsd:string','session'=>'xsd:string','firstname'=>'xsd:string','lastname'=>'xsd:string','phone'=>'xsd:string','mobile'=>'xsd:string','email'=>'xsd:string','street'=>'xsd:string','city'=>'xsd:string','state'=>'xsd:string','country'=>'xsd:string','zipcode'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - - -$server->register( - 'create_account', - array('username'=>'xsd:string','session'=>'xsd:string','accountname'=>'xsd:string', 'email'=>'xsd:string', 'phone'=>'xsd:string','$primary_address_street'=>'xsd:string','$primary_address_city'=>'xsd:string','$primary_address_state'=>'xsd:string','$primary_address_postalcode'=>'xsd:string','$primary_address_country'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - - $server->register( - 'create_ticket_from_toolbar', - array('username'=>'xsd:string','session'=>'xsd:string', 'title'=>'xsd:string','description'=>'xsd:string','priority'=>'xsd:string','severity'=>'xsd:string','category'=>'xsd:string','user_name'=>'xsd:string','parent_id'=>'xsd:string','product_id'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - -$server->register( - 'create_vendor_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'vendorname'=>'xsd:string', - 'email'=>'xsd:string', - 'phone'=>'xsd:string', - 'website'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - -$server->register( - 'create_product_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'productname'=>'xsd:string', - 'productcode'=>'xsd:string', - 'website'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - - -$server->register( - 'create_note_from_webform', - array('username'=>'xsd:string', - 'session'=>'xsd:string', - 'title'=>'xsd:string', - 'notecontent'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'LogintoVtigerCRM', - array('user_name'=>'xsd:string','password'=>'xsd:string','version'=>'xsd:string'), - array('return'=>'tns:logindetails'), - $NAMESPACE); - -$server->register( - 'CheckLeadPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckContactPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckAccountPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckTicketPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckVendorPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckProductPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckNotePermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckSitePermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'CheckRssPermission', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'GetPicklistValues', - array('username'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:combo_values_array'), - $NAMESPACE); - -$server->wsdl->addComplexType( - 'combo_values_array', - 'complexType', - 'array', - '', - array( - 'productid' => array('name'=>'productid','type'=>'tns:xsd:string'), - 'productname' => array('name'=>'productname','type'=>'tns:xsd:string'), - 'ticketpriorities' => array('name'=>'ticketpriorities','type'=>'tns:xsd:string'), - 'ticketseverities' => array('name'=>'ticketseverities','type'=>'tns:xsd:string'), - 'ticketcategories' => array('name'=>'ticketcategories','type'=>'tns:xsd:string'), - 'moduleslist' => array('name'=>'moduleslist','type'=>'tns:xsd:string'), - ) - ); -$server->wsdl->addComplexType( - 'logindetails', - 'complexType', - 'array', - '', - array( - 'return'=>'returnVal','type'=>'tns:xsd:string', - 'session'=>'sessionId','type'=>'tns:xsd:string', - ) -); -function CheckLeadPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Leads",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckContactPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Contacts",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckAccountPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Accounts",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckTicketPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("HelpDesk",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckVendorPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Vendors",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckProductPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Products",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckNotePermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Documents",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckSitePermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Portal",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - -function CheckRssPermission($username,$sessionid) -{ - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Rss",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} - - -function create_site_from_webform($username,$sessionid,$portalname,$portalurl) -{ - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - require_once("modules/Portal/Portal.php"); - if(isPermitted("Portals",'CreateView') == "yes") - { - $result = SavePortal($portalname,$portalurl); - - $adb->println("Create New Portal from Web Form - Ends"); - - if($result != '') - return 'URL added successfully'; - else - return "Portal creation failed. Try again"; - } - else - { - return $accessDenied; - } -} -function LogintoVtigerCRM($user_name,$password,$version) -{ - global $log,$adb; - require_once('modules/Users/Users.php'); - include('vtigerversion.php'); - if($version != $vtiger_current_version) - { - return array("VERSION",'00'); - } - $return_access = array("FALSES",'00'); - - $objuser = new Users(); - - if($password != "") - { - $objuser->column_fields['user_name'] = $user_name; - $objuser->load_user($password); - if($objuser->is_authenticated()) - { - $userid = $objuser->retrieve_user_id($user_name); - $sessionid = makeRandomPassword(); - unsetServerSessionId($userid); - $sql="insert into vtiger_soapservice values(?,?,?)"; - $result = $adb->pquery($sql, array($userid,'FireFox' ,$sessionid)); - $return_access = array("TRUES",$sessionid); - }else - { - $return_access = array("FALSES",'00'); - } - }else - { - //$server->setError("Invalid username and/or password"); - $return_access = array("FALSES",'00'); - } - $objuser = $objuser; - return $return_access; -} - -function create_rss_from_webform($username,$sessionid,$url) -{ - - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - require_once("modules/Rss/Rss.php"); - - $oRss = new vtigerRSS(); - if(isPermitted("RSS",'CreateView') == "yes") - { - if($oRss->setRSSUrl($url)) - { - if($oRss->saveRSSUrl($url) == false) - { - return "RSS feed addition failed. Try again"; - } - else - { - return 'RSS feed added successfully.'; - } - - }else - { - return "Not a valid RSS Feed or your Proxy Settings is not correct. Try again"; - } - } - else - { - return $accessDenied; - } - -} - - -function create_note_from_webform($username,$sessionid,$subject,$desc) -{ - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - $adb->println("Create New Document from Web Form - Starts"); - require_once("modules/Documents/Documents.php"); - - $focus = new Documents(); - if(isPermitted("Documents",'CreateView') == "yes") - { - $focus->column_fields['notes_title'] = $subject; - $focus->column_fields['notecontent'] = $desc; - - $focus->save("Documents"); - - $focus->retrieve_entity_info($focus->id,"Documents"); - - $adb->println("Create New Document from Web Form - Ends"); - - if($focus->id != '') - return 'Document added successfully.'; - else - return "Document creation failed. Try again"; - } - else - { - return $accessDenied; - } - -} - -function create_product_from_webform($username,$sessionid,$productname,$code,$website) -{ - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - $adb->println("Create New Product from Web Form - Starts"); - - require_once("modules/Products/Products.php"); - if(isPermitted("Products",'CreateView') == "yes") - { - $focus = new Products(); - $focus->column_fields['productname'] = $productname; - $focus->column_fields['productcode'] = $code; - $focus->column_fields['website'] = $website; - $focus->column_fields['assigned_user_id'] = $user_id; - $focus->column_fields['discontinued'] = "1"; - - $focus->save("Products"); - $adb->println("Create New Product from Web Form - Ends"); - - if($focus->id != '') - return 'Product added successfully.'; - else - return "Product creation failed. Try again"; - } - else - { - return $accessDenied; - } - - -} - -function create_vendor_from_webform($username,$sessionid,$vendorname,$email,$phone,$website) -{ - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - $adb->println("Create New Vendor from Web Form - Starts"); - require_once("modules/Vendors/Vendors.php"); - if(isPermitted("Vendors",'CreateView' ) == "yes") - { - $focus = new Vendors(); - $focus->column_fields['vendorname'] = $vendorname; - $focus->column_fields['email'] = $email; - $focus->column_fields['phone'] = $phone; - $focus->column_fields['website'] = $website; - - $focus->save("Vendors"); - - $focus->retrieve_entity_info($focus->id,"Vendors"); - - $adb->println("Create New Vendor from Web Form - Ends"); - - if($focus->id != '') - return 'Vendor added successfully'; - else - return "Vendor creation failed. Try again"; - } - else - { - return $accessDenied; - } - - -} - -function create_ticket_from_toolbar($username,$sessionid,$title,$description,$priority,$severity,$category,$user_name,$parent_id,$product_id) -{ - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("HelpDesk",'CreateView') == "yes") - { - - $seed_ticket = new HelpDesk(); - $output_list = Array(); - - require_once('modules/HelpDesk/HelpDesk.php'); - $ticket = new HelpDesk(); - - $ticket->column_fields[ticket_title] = $title; - $ticket->column_fields[description]=$description; - $ticket->column_fields[ticketpriorities]=$priority; - $ticket->column_fields[ticketseverities]=$severity; - $ticket->column_fields[ticketcategories]=$category; - $ticket->column_fields[ticketstatus]='Open'; - - $ticket->column_fields[parent_id]=$parent_id; - $ticket->column_fields[product_id]=$product_id; - $ticket->column_fields[assigned_user_id]=$user_id; - //$ticket->saveentity("HelpDesk"); - $ticket->save("HelpDesk"); - - if($ticket->id != '') - return "Ticket created successfully"; - else - return "Error while creating Ticket.Try again"; - } - else - { - return $accessDenied; - } - - -} - -function create_account($username,$sessionid,$accountname,$email,$phone,$primary_address_street,$primary_address_city,$primary_address_state,$primary_address_postalcode,$primary_address_country) -{ - if(!validateSession($username,$sessionid)) - return null; - global $current_user,$log,$adb; - $log->DEBUG("Entering with data ".$username.$accountname.$email.$phone."<br>".$primary_address_street.$primary_address_city.$primary_address_state.$primary_address_postalcode.$primary_address_country); - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id,'Users'); - require_once("modules/Accounts/Accounts.php"); - if(isPermitted("Accounts",'CreateView') == "yes") - { - $query = "SELECT accountname FROM vtiger_account,vtiger_crmentity WHERE accountname =? and vtiger_account.accountid = vtiger_crmentity.crmid and vtiger_crmentity.deleted != 1"; - $result = $adb->pquery($query, array($accountname)); - if($adb->num_rows($result) > 0) - { - return "Accounts"; - die; - } - $account=new Accounts(); - $account->column_fields['accountname']=$accountname; - $account->column_fields['email1']=$email; - $account->column_fields['phone']=$phone; - $account->column_fields['bill_street']=$primary_address_street; - $account->column_fields['bill_city']=$primary_address_city; - $account->column_fields['bill_state']=$primary_address_state; - $account->column_fields['bill_code']=$primary_address_postalcode; - $account->column_fields['bill_country']=$primary_address_country; - $account->column_fields['ship_street']=$primary_address_street; - $account->column_fields['ship_city']=$primary_address_city; - $account->column_fields['ship_state']=$primary_address_state; - $account->column_fields['ship_code']=$primary_address_postalcode; - $account->column_fields['ship_country']=$primary_address_country; - $account->column_fields['assigned_user_id']=$user_id; - $account->save('Accounts'); - if($account->id != '') - return "Success"; - else - return "Error while adding Account.Try again"; - } - else - { - return $accessDenied; - } - -} - -function create_lead_from_webform($username,$sessionid,$lastname,$email,$phone,$company,$country,$description,$firstname) -{ - - global $log; - global $adb; - global $current_user; - if(!validateSession($username,$sessionid)) - return null; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - $adb->println("Create New Lead from Web Form - Starts"); - require_once("modules/Leads/Leads.php"); - - $focus = new Leads(); - if(isPermitted("Leads",'CreateView') == "yes") - { - $focus->column_fields['lastname'] = $lastname; - $focus->column_fields['firstname'] = $firstname; - $focus->column_fields['email'] = $email; - $focus->column_fields['phone'] = $phone; - $focus->column_fields['company'] = $company; - $focus->column_fields['country'] = $country; - $focus->column_fields['description'] = $description; - $focus->column_fields['assigned_user_id'] = $user_id; - $focus->save("Leads"); - $adb->println("Create New Lead from Web Form - Ends"); - if($focus->id != '') - return "Thank you for your interest. Information has been successfully added as Lead."; - else - return "Lead creation failed. Try again"; - } - else - { - return $accessDenied; - } - - -} - -function create_contacts($user_name,$sessionid,$firstname,$lastname,$phone,$mobile,$email,$street,$city,$state,$country,$zipcode) -{ - global $log; - $log->DEBUG("Entering into create_contacts"); - $birthdate = ""; - if(!validateSession($user_name,$sessionid)) - return null; - - return create_contact1($user_name, $firstname, $lastname, $email,"", "","", $mobile, "",$street,$city,$state,$zipcode,$country,$city,$street,$state,$zipcode,$country,$phone,"","","","",$birthdate,"",""); - -} - -function create_contact1($user_name, $first_name, $last_name, $email_address ,$account_name , $salutation , $title, $phone_mobile, $reports_to,$primary_address_street,$primary_address_city,$primary_address_state,$primary_address_postalcode,$primary_address_country,$alt_address_city,$alt_address_street,$alt_address_state,$alt_address_postalcode,$alt_address_country,$office_phone,$home_phone,$other_phone,$fax,$department,$birthdate,$assistant_name,$assistant_phone,$description='') -{ - global $adb,$log; - global $current_user; - require_once('modules/Users/Users.php'); - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,'Users'); - - require_once('modules/Contacts/Contacts.php'); - if(isPermitted("Contacts",'CreateView') == "yes") - { - $contact = new Contacts(); - $contact->column_fields[firstname]= $first_name; - $contact->column_fields[lastname]= $last_name; - //$contact->column_fields[account_id]=retrieve_account_id($account_name,$user_id);// NULL value is not supported NEED TO FIX - $contact->column_fields[salutation]=$salutation; - // EMAIL IS NOT ADDED - $contact->column_fields[title]=$title; - $contact->column_fields[email]=$email_address; - $contact->column_fields[mobile]=$phone_mobile; - //$contact->column_fields[reports_to_id] =retrievereportsto($reports_to,$user_id,$account_id);// NOT FIXED IN SAVEENTITY.PHP - $contact->column_fields[mailingstreet]=$primary_address_street; - $contact->column_fields[mailingcity]=$primary_address_city; - $contact->column_fields[mailingcountry]=$primary_address_country; - $contact->column_fields[mailingstate]=$primary_address_state; - $contact->column_fields[mailingzip]=$primary_address_postalcode; - $contact->column_fields[otherstreet]=$alt_address_street; - $contact->column_fields[othercity]=$alt_address_city; - $contact->column_fields[othercountry]=$alt_address_country; - $contact->column_fields[otherstate]=$alt_address_state; - $contact->column_fields[otherzip]=$alt_address_postalcode; - $contact->column_fields[assigned_user_id]=$user_id; - // new Fields - $contact->column_fields[phone]= $office_phone; - $contact->column_fields[homephone]= $home_phone; - $contact->column_fields[otherphone]= $other_phone; - $contact->column_fields[fax]= $fax; - $contact->column_fields[department]=$department; - $contact->column_fields[birthday]= DateTimeField::convertToUserFormat($birthdate); - $contact->column_fields[assistant]= $assistant_name; - $contact->column_fields[assistantphone]= $assistant_phone; - $contact->column_fields[description]= $description; - $contact->save("Contacts"); - if($contact->id != '') - return 'Contact added successfully'; - else - return "Contact creation failed. Try again"; - } - else - { - return $accessDenied; - } - -} -function GetPicklistValues($username,$sessionid,$tablename) -{ - global $current_user,$log,$adb; - if(!validateSession($username,$sessionid)) - return null; - - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($username); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id,'Users'); - require_once("include/utils/UserInfoUtil.php"); - $roleid = fetchUserRole($user_id); - checkFileAccessForInclusion('user_privileges/user_privileges_'.$current_user->id.'.php'); - require('user_privileges/user_privileges_'.$current_user->id.'.php'); - if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) - { - $query = "select " . $adb->sql_escape_string($tablename) . " from vtiger_". $adb->sql_escape_string($tablename); - $result1 = $adb->pquery($query, array()); - for($i=0;$i<$adb->num_rows($result1);$i++) - { - $output[$i] = decode_html($adb->query_result($result1,$i,$tablename)); - } - } - else if((isPermitted("HelpDesk",'CreateView') == "yes") && (CheckFieldPermission($tablename,'HelpDesk') == 'true')) - { - $query = "select " .$adb->sql_escape_string($tablename) . " from vtiger_". $adb->sql_escape_string($tablename) ." inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_". $adb->sql_escape_string($tablename) .".picklist_valueid where roleid=? and picklistid in (select picklistid from vtiger_". $adb->sql_escape_string($tablename)." ) order by sortid"; - $result1 = $adb->pquery($query, array($roleid)); - for($i=0;$i<$adb->num_rows($result1);$i++) - { - $output[$i] = decode_html($adb->query_result($result1,$i,$tablename)); - } - } - else - { - $output[] = 'Not Accessible'; - } - - return $output; -} -function unsetServerSessionId($id) -{ - global $adb; - $adb->println("Inside the function unsetServerSessionId"); - - $id = (int) $id; - - $adb->query("delete from vtiger_soapservice where type='FireFox' and id=$id"); - - return; -} -function validateSession($username, $sessionid) -{ - global $adb,$current_user; - $adb->println("Inside function validateSession($username, $sessionid)"); - require_once("modules/Users/Users.php"); - $seed_user = new Users(); - $id = $seed_user->retrieve_user_id($username); - - $server_sessionid = getServerSessionId($id); - - $adb->println("Checking Server session id and customer input session id ==> $server_sessionid == $sessionid"); - - if($server_sessionid == $sessionid) - { - $adb->println("Session id match. Authenticated to do the current operation."); - return true; - } - else - { - $adb->println("Session id does not match. Not authenticated to do the current operation."); - return false; - } -} -function getServerSessionId($id) -{ - global $adb; - $adb->println("Inside the function getServerSessionId($id)"); - - //To avoid SQL injection we are type casting as well as bound the id variable. In each and every function we will call this function - $id = (int) $id; - - $query = "select * from vtiger_soapservice where type='FireFox' and id={$id}"; - $sessionid = $adb->query_result($adb->query($query),0,'sessionid'); - - return $sessionid; -} -/* Begin the HTTP listener service and exit. */ -if (!isset($HTTP_RAW_POST_DATA)){ - $HTTP_RAW_POST_DATA = file_get_contents('php://input'); -} -$server->service($HTTP_RAW_POST_DATA); -exit(); -?> diff --git a/soap/thunderbirdplugin.php b/soap/thunderbirdplugin.php deleted file mode 100644 index 19c097a4effdf6c9615e36e00823de45a81a28cf..0000000000000000000000000000000000000000 --- a/soap/thunderbirdplugin.php +++ /dev/null @@ -1,679 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -/** - * URL Verfication - Required to overcome Apache mis-configuration and leading to shared setup mode. - */ -require_once 'config.php'; -if (file_exists('config_override.php')) { - include_once 'config_override.php'; -} - -include_once 'vtlib/Vtiger/Module.php'; -include_once 'includes/main/WebUI.php'; - -require_once('libraries/nusoap/nusoap.php'); - -require_once('modules/Contacts/Contacts.php'); - -$log = &LoggerManager::getLogger('thunderbirdplugin'); - -$accessDenied = "You are not authorized for performing this action"; -$NAMESPACE = 'http://www.vtiger.com/products/crm'; -$server = new soap_server; - -$server->configureWSDL('vtigersoap'); - -$server->register( - 'create_session', - array('user_name'=>'xsd:string','password'=>'xsd:string','version'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'end_session', - array('user_name'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'SearchContactsByEmail', - array('username'=>'xsd:string','password'=>'xsd:string','emailaddress'=>'xsd:string'), - array('return'=>'tns:contactdetails'), - $NAMESPACE); - -$server->register( - 'GetContacts', - array('username'=>'xsd:string','password'=>'xsd:string'), - array('return'=>'tns:contactdetails'), - $NAMESPACE); - -$server->register( - 'CheckContactPerm',array('user_name'=>'xsd:string','password'=>'xsd:string'), - array('return'=>'xsd:string'),$NAMESPACE); - -$server->register( - 'CheckContactViewPerm',array('user_name'=>'xsd:string','password'=>'xsd:string'), - array('return'=>'xsd:string'),$NAMESPACE); - -$server->register( - 'CheckContactEmailPerm',array('user_name'=>'xsd:string','password'=>'xsd:string'), - array('return'=>'xsd:string'),$NAMESPACE); - -$server->register( - 'CheckLeadViewPerm',array('user_name'=>'xsd:string','password'=>'xsd:string'), - array('return'=>'xsd:string'),$NAMESPACE); - -$server->register( - 'AddContact', - array('user_name'=>'xsd:string', - 'first_name'=>'xsd:string', - 'last_name'=>'xsd:string', - 'email_address'=>'xsd:string', - 'account_name'=>'xsd:string', - 'salutation'=>'xsd:string', - 'title'=>'xsd:string', - 'phone_mobile'=>'xsd:string', - 'reports_to'=>'xsd:string', - 'primary_address_street'=>'xsd:string', - 'primary_address_city'=>'xsd:string', - 'primary_address_state'=>'xsd:string' , - 'primary_address_postalcode'=>'xsd:string', - 'primary_address_country'=>'xsd:string', - 'alt_address_city'=>'xsd:string', - 'alt_address_street'=>'xsd:string', - 'alt_address_state'=>'xsd:string', - 'alt_address_postalcode'=>'xsd:string', - 'alt_address_country'=>'xsd:string', - 'office_phone'=>'xsd:string', - 'home_phone'=>'xsd:string', - 'fax'=>'xsd:string', - 'department'=>'xsd:string', - 'password'=>'xsd:string', - 'description'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'AddLead', - array('user_name'=>'xsd:string', - 'first_name'=>'xsd:string', - 'last_name'=>'xsd:string', - 'email_address'=>'xsd:string', - 'account_name'=>'xsd:string', - 'salutation'=>'xsd:string', - 'title'=>'xsd:string', - 'phone_mobile'=>'xsd:string', - 'reports_to'=>'xsd:string', - 'primary_address_street'=>'xsd:string', - 'primary_address_city'=>'xsd:string', - 'primary_address_state'=>'xsd:string' , - 'primary_address_postalcode'=>'xsd:string', - 'primary_address_country'=>'xsd:string', - 'alt_address_city'=>'xsd:string', - 'alt_address_street'=>'xsd:string', - 'alt_address_state'=>'xsd:string', - 'alt_address_postalcode'=>'xsd:string', - 'alt_address_country'=>'xsd:string', - 'office_phone'=>'xsd:string', - 'home_phone'=>'xsd:string', - 'fax'=>'xsd:string', - 'department'=>'xsd:string', - 'password'=>'xsd:string', - 'description'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'track_email', - array('user_name'=>'xsd:string','password'=>'xsd:string', 'contact_ids'=>'xsd:string', 'date_sent'=>'xsd:string', 'email_subject'=>'xsd:string', 'email_body'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -$server->wsdl->addComplexType( - 'contactdetail', - 'complexType', - 'struct', - 'all', - '', - array( - 'id' => array('name'=>'id','type'=>'xsd:string'), - 'firstname' => array('name'=>'firstname','type'=>'xsd:string'), - 'lastname' => array('name'=>'lastname','type'=>'xsd:string'), - 'emailaddress' => array('name'=>'emailaddress','type'=>'xsd:string'), - 'accountname' => array('name'=>'accountname','type'=>'xsd:string'), - 'middlename' => array('name'=>'middlename','type'=>'xsd:string'), - 'birthdate'=> array('name'=>'birthdate','type'=>'xsd:string'), - 'jobtitle'=> array('name'=>'jobtitle','type'=>'xsd:string'), - 'department'=> array('name'=>'department','type'=>'xsd:string'), - 'title' => array('name'=>'title','type'=>'xsd:string'), - 'officephone'=> array('name'=>'officephone','type'=>'xsd:string'), - 'homephone'=> array('name'=>'homephone','type'=>'xsd:string'), - 'otherphone'=> array('name'=>'otherphone','type'=>'xsd:string'), - 'fax'=> array('name'=>'fax','type'=>'xsd:string'), - 'mobile'=> array('name'=>'mobile','type'=>'xsd:string'), - 'asstname'=> array('name'=>'asstname','type'=>'xsd:string'), - 'asstphone'=> array('name'=>'asstphone','type'=>'xsd:string'), - 'reportsto'=> array('name'=>'reportsto','type'=>'xsd:string'), - 'mailingstreet'=> array('name'=>'mailingstreet','type'=>'xsd:string'), - 'mailingcity'=> array('name'=>'mailingcity','type'=>'xsd:string'), - 'mailingstate'=> array('name'=>'mailingstate','type'=>'xsd:string'), - 'mailingzip'=> array('name'=>'mailingzip','type'=>'xsd:string'), - 'mailingcountry'=> array('name'=>'mailingcountry','type'=>'xsd:string'), - 'otherstreet'=> array('name'=>'otherstreet','type'=>'xsd:string'), - 'othercity'=> array('name'=>'othercity','type'=>'xsd:string'), - 'otherstate'=> array('name'=>'otherstate','type'=>'xsd:string'), - 'otherzip'=> array('name'=>'otherzip','type'=>'xsd:string'), - 'othercountry'=> array('name'=>'othercountry','type'=>'xsd:string'), - 'description'=> array('name'=>'description','type'=>'xsd:string'), - 'category'=> array('name'=>'category','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'contactdetails', - 'complexType', - 'array', - '', - 'SOAP-ENC:Array', - array(), - array( - array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:contactdetail[]') - ), - 'tns:contactdetail' -); - - -function SearchContactsByEmail($username,$password,$emailaddress) -{ - if(authentication($username,$password)) - { - require_once('modules/Contacts/Contacts.php'); - - $seed_contact = new Contacts(); - $output_list = Array(); - - if(filter_var($emailaddress, FILTER_VALIDATE_EMAIL) == false ) return null; - - $response = $seed_contact->get_searchbyemailid($username,$emailaddress); - $contactList = $response['list']; - - // create a return array of names and email addresses. - foreach($contactList as $contact) - { - $output_list[] = Array( - "id" => decode_html($contact[contactid]), - "firstname" => decode_html($contact[firstname]), - "lastname" => decode_html($contact[lastname]), - "emailaddress" => decode_html($contact[email]), - "accountname" => decode_html($contact[accountname]), - ); - } - - //to remove an erroneous compiler warning - $seed_contact = $seed_contact; - return $output_list; - } -} - -function track_email($user_name,$password,$contact_ids, $date_sent, $email_subject, $email_body) -{ - if(authentication($user_name,$password)) - { - global $current_user; - global $adb; - global $log; - require_once('modules/Users/Users.php'); - require_once('modules/Emails/Emails.php'); - $current_user = new Users(); - $user_id = $current_user->retrieve_user_id($user_name); - $query = "select email1 from vtiger_users where id =?"; - $result = $adb->pquery($query, array($user_id)); - $user_emailid = $adb->query_result($result,0,"email1"); - $current_user = $current_user->retrieveCurrentUserInfoFromFile($user_id); - $email = new Emails(); - //$log->debug($msgdtls['contactid']); - $emailbody = str_replace("'", "''", $email_body); - $emailsubject = str_replace("'", "''",$email_subject); - $datesent = substr($date_sent,1,10); - $mydate = date('Y-m-d',$datesent); - $mydate = DateTimeField::convertToDBFormat($mydate); - $email->column_fields[subject] = $emailsubject; - $email->column_fields[assigned_user_id] = $user_id; - $email->column_fields[date_start] = $mydate; - $email->column_fields[description] = $emailbody; - $email->column_fields[activitytype] = 'Emails'; - $email->plugin_save = true; - $email->save("Emails"); - $query = "select fieldid from vtiger_field where fieldname = 'email' and tabid = 4 and vtiger_field.presence in (0,2)"; - $result = $adb->pquery($query, array()); - $field_id = $adb->query_result($result,0,"fieldid"); - $email->set_emails_contact_invitee_relationship($email->id,$contact_ids); - $email->set_emails_se_invitee_relationship($email->id,$contact_ids); - $email->set_emails_user_invitee_relationship($email->id,$user_id); - $sql = "select email from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid where vtiger_crmentity.deleted =0 and vtiger_contactdetails.contactid=?"; - $result = $adb->pquery($sql, array($contact_ids)); - $camodulerow = $adb->fetch_array($result); - if(isset($camodulerow)) - { - $emailid = $camodulerow["email"]; - - //added to save < as $lt; and > as > in the database so as to retrive the emailID - $user_emailid = str_replace('<','<',$user_emailid); - $user_emailid = str_replace('>','>',$user_emailid); - $query = 'insert into vtiger_emaildetails values (?,?,?,?,?,?,?,?)'; - $params = array($email->id, $emailid, $user_emailid, "", "", "", $user_id.'@-1|'.$contact_ids.'@'.$field_id.'|',"THUNDERBIRD"); - $adb->pquery($query, $params); - } - return $email->id; - } -} - -function GetContacts($username,$password) -{ - if(authentication($username,$password)) - { - global $adb; - global $log; - require_once('modules/Contacts/Contacts.php'); - - $seed_contact = new Contacts(); - $output_list = Array(); - - $query = $seed_contact->get_contactsforol($username); - $result = $adb->pquery($query, array()); - - while($contact = $adb->fetch_array($result)) - { - if($contact["birthdate"] == "0000-00-00") - { - $contact["birthdate"] = ""; - } - if($contact["salutation"] == "--None--") - { - $contact["salutation"] = ""; - } - $output_list[] = Array( - "id" => decode_html($contact["id"]), - "title" => decode_html($contact["salutation"]), - "firstname" => decode_html($contact["firstname"]), - "middlename" => decode_html(trim($middlename)), - "lastname" => decode_html(trim($contact["lastname"])), - "birthdate" => $contact["birthday"], - "emailaddress" => decode_html($contact["email"]), - "jobtitle" => decode_html($contact["title"]), - "department" => decode_html($contact["department"]), - "accountname" => decode_html($contact["accountname"]), - "officephone" => decode_html($contact["phone"]), - "homephone" => decode_html($contact["homephone"]), - "otherphone" => decode_html($contact["otherphone"]), - "fax" => decode_html($contact["fax"]), - "mobile" => decode_html($contact["mobile"]), - "asstname" => decode_html($contact["assistant"]), - "asstphone" => decode_html($contact["assistantphone"]), - "reportsto" => decode_html($contact["reports_to_name"]), - "mailingstreet" => decode_html($contact["mailingstreet"]), - "mailingcity" => decode_html($contact["mailingcity"]), - "mailingstate" => decode_html($contact["mailingstate"]), - "mailingzip" => decode_html($contact["mailingzip"]), - "mailingcountry" => decode_html($contact["mailingcountry"]), - "otherstreet" => decode_html($contact["otherstreet"]), - "othercity" => decode_html($contact["othercity"]), - "otherstate" => decode_html($contact["otherstate"]), - "otherzip" => decode_html($contact["otherzip"]), - "othercountry" => decode_html($contact["othercountry"]), - "description" => "", - "category" => "", - ); - } - //to remove an erroneous compiler warning - $seed_contact = $seed_contact; - return $output_list; - } -} - -function retrieve_account_id($account_name,$user_id) -{ - - if($account_name=="") - { - return null; - } - - $db = PearDatabase::getInstance(); - - $query = "select vtiger_account.accountname accountname,vtiger_account.accountid accountid from vtiger_account inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_account.accountid where vtiger_crmentity.deleted=0 and vtiger_account.accountname=?"; - $result= $db->pquery($query, array($account_name)) or die ("Not able to execute insert"); - - $rows_count = $db->getRowCount($result); - if($rows_count==0) - { - require_once('modules/Accounts/Accounts.php'); - $account = new Accounts(); - $account->column_fields[accountname] = $account_name; - $account->column_fields[assigned_user_id]=$user_id; - //$account->saveentity("Accounts"); - $account->save("Accounts"); - //mysql_close(); - return $account->id; - } - else if ($rows_count==1) - { - $row = $db->fetchByAssoc($result, 0); - //mysql_close(); - return $row["accountid"]; - } - else - { - $row = $db->fetchByAssoc($result, 0); - //mysql_close(); - return $row["accountid"]; - } - -} - -function AddContact($user_name,$first_name, $last_name, $email_address ,$account_name , $salutation , $title, $phone_mobile, $reports_to,$primary_address_street,$primary_address_city,$primary_address_state,$primary_address_postalcode,$primary_address_country,$alt_address_city,$alt_address_street,$alt_address_state,$alt_address_postalcode,$alt_address_country,$office_phone="",$home_phone="",$fax="",$department="",$password,$description="") -{ - if(authentication($user_name,$password)) - { - global $adb; - global $current_user; - require_once('modules/Users/Users.php'); - require_once('modules/Contacts/Contacts.php'); - - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - checkFileAccessForInclusion('user_privileges/user_privileges_'.$current_user->id.'.php'); - require('user_privileges/user_privileges_'.$current_user->id.'.php'); - checkFileAccessForInclusion('user_privileges/sharing_privileges_'.$current_user->id.'.php'); - require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); - - if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) { - $sql1 = "select fieldname,columnname from vtiger_field where tabid=4 and block <> 75 and block <> 6 and block <> 5 and vtiger_field.presence in (0,2)"; - $params1 = array(); - } else { - $profileList = getCurrentUserProfileList(); - $sql1 = "select fieldname,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=4 and vtiger_field.block <> 75 and vtiger_field.block <> 6 and vtiger_field.block <> 5 and vtiger_field.displaytype in (1,2,4) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; - $params1 = array(); - if (count($profileList) > 0) { - $sql1 .= " and vtiger_profile2field.profileid in (". generateQuestionMarks($profileList) .")"; - array_push($params1, $profileList); - } - } - $result1 = $adb->pquery($sql1, $params1); - - for($i=0;$i < $adb->num_rows($result1);$i++) - { - $permitted_lists[] = $adb->query_result($result1,$i,'fieldname'); - } - - $contact = new Contacts(); - $contact->column_fields[firstname]=in_array('firstname',$permitted_lists) ? $first_name : ""; - $contact->column_fields[lastname]=in_array('lastname',$permitted_lists) ? $last_name : ""; - $contact->column_fields[email]=in_array('email',$permitted_lists) ? $email_address : ""; - $contact->column_fields[title]=in_array('title',$permitted_lists) ? $title : ""; - $contact->column_fields[department]=in_array('department',$permitted_lists) ? $department : ""; - $contact->column_fields[account_id]=in_array('account_id',$permitted_lists) ? retrieve_account_id($account_name,$user_id) : ""; - $contact->column_fields[phone]=in_array('phone',$permitted_lists) ? $office_phone : ""; - $contact->column_fields[homephone]=in_array('homephone',$permitted_lists) ? $home_phone : ""; - $contact->column_fields[fax]=in_array('fax',$permitted_lists) ? $fax : ""; - $contact->column_fields[mobile]=in_array('mobile',$permitted_lists) ? $phone_mobile : ""; - $contact->column_fields[mailingstreet]=in_array('mailingstreet',$permitted_lists) ? $primary_address_street : ""; - $contact->column_fields[mailingcity]=in_array('mailingcity',$permitted_lists) ? $primary_address_city : ""; - $contact->column_fields[mailingstate]=in_array('mailingstate',$permitted_lists) ? $primary_address_state : ""; - $contact->column_fields[mailingzip]=in_array('mailingzip',$permitted_lists) ? $primary_address_postalcode : ""; - $contact->column_fields[mailingcountry]=in_array('mailingcountry',$permitted_lists) ? $primary_address_country : ""; - $contact->column_fields[otherstreet]=in_array('otherstreet',$permitted_lists) ? $alt_address_street : ""; - $contact->column_fields[othercity]=in_array('othercity',$permitted_lists) ? $alt_address_city : ""; - $contact->column_fields[otherstate]=in_array('otherstate',$permitted_lists) ? $alt_address_state : ""; - $contact->column_fields[otherzip]=in_array('otherzip',$permitted_lists) ? $alt_address_postalcode : ""; - $contact->column_fields[othercountry]=in_array('othercountry',$permitted_lists) ? $alt_address_country : ""; - $contact->column_fields[assigned_user_id]=in_array('assigned_user_id',$permitted_lists) ? $user_id : ""; - $contact->column_fields[description]= ""; - $contact->save("Contacts"); - - $contact = $contact; - return $contact->id; - } -} - -function AddLead($user_name, $first_name, $last_name, $email_address ,$account_name , $salutation , $title, $phone_mobile, $reports_to ,$primary_address_street , $website ,$primary_address_city,$primary_address_state,$primary_address_postalcode,$primary_address_country,$alt_address_city,$alt_address_street,$alt_address_state,$alt_address_postalcode,$alt_address_country,$office_phone="",$home_phone="",$fax="",$department="",$password,$description="") -{ - if(authentication($user_name,$password)) - { - global $adb; - global $current_user; - require_once('modules/Users/Users.php'); - require_once('modules/Leads/Leads.php'); - - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - checkFileAccessForInclusion('user_privileges/user_privileges_'.$current_user->id.'.php'); - require('user_privileges/user_privileges_'.$current_user->id.'.php'); - checkFileAccessForInclusion('user_privileges/sharing_privileges_'.$current_user->id.'.php'); - require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); - - if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) { - $sql1 = "select fieldname,columnname from vtiger_field where tabid=7 and block <> 14 and vtiger_field.presence in (0,2)"; - $params1 = array(); - } else { - $profileList = getCurrentUserProfileList(); - $sql1 = "select fieldname,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=7 and vtiger_field.block <> 14 and vtiger_field.displaytype in (1,2,4) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; - $params1 = array(); - if (count($profileList) > 0) { - $sql1 .= " and vtiger_profile2field.profileid in (". generateQuestionMarks($profileList) .")"; - array_push($params1, $profileList); - } - } - $result1 = $adb->pquery($sql1, $params1); - for($i=0;$i < $adb->num_rows($result1);$i++) - { - $permitted_lists[] = $adb->query_result($result1,$i,'fieldname'); - } - - $Lead = new Leads(); - $Lead->column_fields[firstname]=in_array('firstname',$permitted_lists) ? $first_name : ""; - $Lead->column_fields[lastname]=in_array('lastname',$permitted_lists) ? $last_name : ""; - $Lead->column_fields[company]=in_array('company',$permitted_lists) ? $account_name : ""; - $Lead->column_fields[email]=in_array('email',$permitted_lists) ? $email_address : ""; - $Lead->column_fields[title]=in_array('title',$permitted_lists) ? $title : ""; - $Lead->column_fields[designation]=in_array('designation',$permitted_lists) ? $department : ""; - $Lead->column_fields[phone]=in_array('phone',$permitted_lists) ? $office_phone : ""; - $Lead->column_fields[homephone]=in_array('homephone',$permitted_lists) ? $home_phone : ""; - $Lead->column_fields[website]=in_array('website',$permitted_lists) ? $website : ""; - $Lead->column_fields[fax]=in_array('fax',$permitted_lists) ? $fax : ""; - $Lead->column_fields[mobile]=in_array('mobile',$permitted_lists) ? $phone_mobile : ""; - $Lead->column_fields[mailingstreet]=in_array('mailingstreet',$permitted_lists) ? $primary_address_street : ""; - $Lead->column_fields[mailingcity]=in_array('mailingcity',$permitted_lists) ? $primary_address_city : ""; - $Lead->column_fields[mailingstate]=in_array('mailingstate',$permitted_lists) ? $primary_address_state : ""; - $Lead->column_fields[mailingzip]=in_array('mailingzip',$permitted_lists) ? $primary_address_postalcode : ""; - $Lead->column_fields[workCountry]=in_array('mailingcountry',$permitted_lists) ? $workCountry : ""; - $Lead->column_fields[lane]=in_array('lane',$permitted_lists) ? $alt_address_street : ""; - $Lead->column_fields[city]=in_array('city',$permitted_lists) ? $alt_address_city : ""; - $Lead->column_fields[state]=in_array('state',$permitted_lists) ? $alt_address_state : ""; - $Lead->column_fields[code]=in_array('code',$permitted_lists) ? $alt_address_postalcode : ""; - $Lead->column_fields[country]=in_array('country',$permitted_lists) ? $alt_address_country : ""; - $Lead->column_fields[assigned_user_id]=in_array('assigned_user_id',$permitted_lists) ? $user_id : ""; - $Lead->column_fields[description]= ""; - // $log->fatal($Lead->column_fields); - $Lead->save("Leads"); - - $Lead = $Lead; - return $Lead->id; - } -} - -function create_session($user_name, $password,$version) -{ - global $adb,$log; - $return_access = 'FALSES'; - include('vtigerversion.php'); - - /* Make 5.0.4 plugins compatible with 5.1.0 */ - if(version_compare($version,'5.0.4', '>=') === 1) { - return array("VERSION",'00'); - } - - require_once('modules/Users/Users.php'); - $objuser = new Users(); - if($password != "" && $user_name != '') - { - $objuser->column_fields['user_name'] = $user_name; - $encrypted_password = $objuser->encrypt_password($password); - if($objuser->load_user($password) && $objuser->is_authenticated()) - { - $query = "select id from vtiger_users where user_name=? and user_password=?"; - $result = $adb->pquery($query, array($user_name, $encrypted_password)); - if($adb->num_rows($result) > 0) - { - $return_access = 'TRUES'; - $log->debug("Logged in sucessfully from thunderbirdplugin"); - }else - { - $return_access = 'FALSES'; - $log->debug("Logged in failure from thunderbirdplugin"); - } - } - else - { - $return_access = 'LOGIN'; - $log->debug("Logged in failure from thunderbirdplugin"); - } - }else - { - $return_access = 'FALSES'; - $log->debug("Logged in failure from thunderbirdplugin"); - } - return $return_access; -} -function authentication($user_name,$password) -{ - global $adb,$log; - require_once('modules/Users/Users.php'); - $objuser = new Users(); - if($password != "" && $user_name != '') - { - $objuser->column_fields['user_name'] = $user_name; - $encrypted_password = $objuser->encrypt_password($password); - if($objuser->load_user($password) && $objuser->is_authenticated()) - { - $query = "select id from vtiger_users where user_name=? and user_password=?"; - $log->DEBUG("Running Query is ".$query); - $result = $adb->pquery($query, array($user_name, $encrypted_password)); - if($adb->num_rows($result) > 0) - { - return true; - }else - { - return false; - } - } - else - { - return false; - } - }else - { - return false; - } - return false; -} -function end_session($user_name) -{ - return "Success"; -} - -function CheckContactPerm($user_name,$password) -{ - if(authentication($user_name,$password)) - { - global $current_user; - require_once('modules/Users/Users.php'); - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - if(isPermitted("Contacts",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } - } -} - -function CheckContactEmailPerm($user_name,$password) -{ - if(authentication($user_name,$password)) - { - global $current_user,$log; - require_once('modules/Users/Users.php'); - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - if((isPermitted("Contacts","index") == "yes") && (isPermitted("Emails","index") == "yes")) - { - return "allowed"; - }else - { - return "notallowed"; - } - } -} -function CheckContactViewPerm($user_name,$password) -{ - if(authentication($user_name,$password)) - { - global $current_user,$log; - require_once('modules/Users/Users.php'); - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - if(isPermitted("Contacts","index") == "yes") - { - return "allowed"; - }else - { - return "contact"; - } - } -} - -function CheckLeadViewPerm($user_name) -{ - global $current_user,$log; - require_once('modules/Users/Users.php'); - $seed_user = new Users(); - $user_id = $seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id,"Users"); - if(isPermitted("Leads",'CreateView') == "yes") - { - return "allowed"; - }else - { - return "denied"; - } -} -/* Begin the HTTP listener service and exit. */ -if (!isset($HTTP_RAW_POST_DATA)){ - $HTTP_RAW_POST_DATA = file_get_contents('php://input'); -} -$server->service($HTTP_RAW_POST_DATA); -exit(); -?> diff --git a/soap/wordplugin.php b/soap/wordplugin.php deleted file mode 100644 index 08b1d289e5034f536f836066ab17572f1ace6a61..0000000000000000000000000000000000000000 --- a/soap/wordplugin.php +++ /dev/null @@ -1,439 +0,0 @@ -<?php -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. -* - ********************************************************************************/ - -/** - * URL Verfication - Required to overcome Apache mis-configuration and leading to shared setup mode. - */ -require_once 'config.php'; -if (file_exists('config_override.php')) { - include_once 'config_override.php'; -} - -include_once 'vtlib/Vtiger/Module.php'; -include_once 'includes/main/WebUI.php'; - -require_once('libraries/nusoap/nusoap.php'); - -$log = &LoggerManager::getLogger('wordplugin'); - -error_reporting(0); -$NAMESPACE = 'http://www.vtiger.com/products/crm'; -$server = new soap_server; -$accessDenied = "You are not permitted to perform this action"; -$server->configureWSDL('vtigersoap'); - -$server->wsdl->addComplexType( - 'contact_column_detail', - 'complexType', - 'array', - '', - array( - 'email_address' => array('name'=>'email_address','type'=>'xsd:string'), - 'first_name' => array('name'=>'first_name','type'=>'xsd:string'), - 'last_name' => array('name'=>'last_name','type'=>'xsd:string'), - 'primary_address_city' => array('name'=>'primary_address_city','type'=>'xsd:string'), - 'account_name' => array('name'=>'account_name','type'=>'xsd:string'), - 'id' => array('name'=>'id','type'=>'xsd:string'), - 'salutation' => array('name'=>'salutation','type'=>'xsd:string'), - 'title'=> array('name'=>'title','type'=>'xsd:string'), - 'phone_mobile'=> array('name'=>'phone_mobile','type'=>'xsd:string'), - 'reports_to'=> array('name'=>'reports_to','type'=>'xsd:string'), - 'primary_address_city'=> array('name'=>'primary_address_city','type'=>'xsd:string'), - 'primary_address_street'=> array('name'=>'primary_address_street','type'=>'xsd:string'), - 'primary_address_state'=> array('name'=>'primary_address_state','type'=>'xsd:string'), - 'primary_address_postalcode'=> array('name'=>'primary_address_postalcode','type'=>'xsd:string'), - 'primary_address_country'=> array('name'=>'primary_address_country','type'=>'xsd:string'), - 'alt_address_city'=> array('name'=>'alt_address_city','type'=>'xsd:string'), - 'alt_address_street'=> array('name'=>'alt_address_street','type'=>'xsd:string'), - 'alt_address_state'=> array('name'=>'alt_address_state','type'=>'xsd:string'), - 'alt_address_postalcode'=> array('name'=>'alt_address_postalcode','type'=>'xsd:string'), - 'alt_address_country'=> array('name'=>'alt_address_country','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'account_column_detail', - 'complexType', - 'array', - '', - array( - 'accountid' => array('name'=>'accountid','type'=>'xsd:string'), - 'accountname' => array('name'=>'accountname','type'=>'xsd:string'), - 'parentid' => array('name'=>'parentid','type'=>'xsd:string'), - 'account_type' => array('name'=>'account_type','type'=>'xsd:string'), - 'industry' => array('name'=>'industry','type'=>'xsd:string'), - 'annualrevenue' => array('name'=>'annualrevenue','type'=>'xsd:string'), - 'rating'=> array('name'=>'rating','type'=>'xsd:string'), - 'ownership' => array('name'=>'ownership','type'=>'xsd:string'), - 'siccode' => array('name'=>'siccode','type'=>'xsd:string'), - 'tickersymbol' => array('name'=>'tickersymbol','type'=>'xsd:string'), - 'phone' => array('name'=>'phone','type'=>'xsd:string'), - 'otherphone' => array('name'=>'otherphone','type'=>'xsd:string'), - 'email1' => array('name'=>'email1','type'=>'xsd:string'), - 'email2' => array('name'=>'email2','type'=>'xsd:string'), - 'website' => array('name'=>'website','type'=>'xsd:string'), - 'fax' => array('name'=>'fax','type'=>'xsd:string'), - //'employees' => array('name'=>'employees','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'lead_column_detail', - 'complexType', - 'array', - '', - array( - 'id' => array('name'=>'id','type'=>'xsd:string'), - 'date_entered' => array('name'=>'date_entered','type'=>'xsd:string'), - 'date_modified' => array('name'=>'date_modified','type'=>'xsd:string'), - 'modified_user_id' => array('name'=>'modified_user_id','type'=>'xsd:string'), - 'assigned_user_id' => array('name'=>'assigned_user_id','type'=>'xsd:string'), - 'salutation' => array('name'=>'salutation','type'=>'xsd:string'), - 'first_name' => array('name'=>'first_name','type'=>'xsd:string'), - 'last_name' => array('name'=>'last_name','type'=>'xsd:string'), - 'company' => array('name'=>'company','type'=>'xsd:string'), - 'designation' => array('name'=>'designation','type'=>'xsd:string'), - 'lead_source' => array('name'=>'lead_source','type'=>'xsd:string'), - 'industry' => array('name'=>'industry','type'=>'xsd:string'), - 'annual_revenue' => array('name'=>'annual_revenue','type'=>'xsd:string'), - 'license_key' => array('name'=>'license_key','type'=>'xsd:string'), - 'phone' => array('name'=>'phone','type'=>'xsd:string'), - 'mobile' => array('name'=>'mobile','type'=>'xsd:string'), - 'fax' => array('name'=>'fax','type'=>'xsd:string'), - 'email' => array('name'=>'email','type'=>'xsd:string'), - 'secondaryemail' => array('name'=>'secondaryemail','type'=>'xsd:string'), - 'website' => array('name'=>'website','type'=>'xsd:string'), - 'lead_status' => array('name'=>'lead_status','type'=>'xsd:string'), - 'rating' => array('name'=>'rating','type'=>'xsd:string'), - 'employees' => array('name'=>'employees','type'=>'xsd:string'), - 'address_street' => array('name'=>'address_street','type'=>'xsd:string'), - 'address_city' => array('name'=>'address_city','type'=>'xsd:string'), - 'address_state' => array('name'=>'address_state','type'=>'xsd:string'), - 'address_postalcode' => array('name'=>'address_postalcode','type'=>'xsd:string'), - 'address_country' => array('name'=>'address_country','type'=>'xsd:string'), - 'description' => array('name'=>'description','type'=>'xsd:string'), - 'deleted' => array('name'=>'deleted','type'=>'xsd:string'), - 'converted' => array('name'=>'converted','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'user_column_detail', - 'complexType', - 'array', - '', - array( - 'firstname' => array('name'=>'firstname','type'=>'xsd:string'), - 'lastname' => array('name'=>'lastname','type'=>'xsd:string'), - 'username' => array('name'=>'username','type'=>'xsd:string'), - 'secondaryemail' => array('name'=>'secondaryemail','type'=>'xsd:string'), - 'title' => array('name'=>'title','type'=>'xsd:string'), - 'workphone' => array('name'=>'workphone','type'=>'xsd:string'), - 'department' => array('name'=>'department','type'=>'xsd:string'), - 'mobilephone' => array('name'=>'mobilephone','type'=>'xsd:string'), - 'otherphone'=> array('name'=>'otherphone','type'=>'xsd:string'), - 'fax' => array('name'=>'fax','type'=>'xsd:string'), - 'email' => array('name'=>'email','type'=>'xsd:string'), - 'homephone' => array('name'=>'homephone','type'=>'xsd:string'), - 'otheremail' => array('name'=>'otheremail','type'=>'xsd:string'), - 'street' => array('name'=>'street','type'=>'xsd:string'), - 'city' => array('name'=>'city','type'=>'xsd:string'), - 'state' => array('name'=>'state','type'=>'xsd:string'), - 'code' => array('name'=>'code','type'=>'xsd:string'), - 'country' => array('name'=>'country','type'=>'xsd:string'), - ) -); - -$server->wsdl->addComplexType( - 'tickets_list_array', - 'complexType', - 'array', - '', - array( - 'ticketid' => array('name'=>'ticketid','type'=>'xsd:string'), - 'title' => array('name'=>'title','type'=>'xsd:string'), - 'groupname' => array('name'=>'groupname','type'=>'xsd:string'), - 'firstname' => array('name'=>'firstname','type'=>'xsd:string'), - 'lastname' => array('name'=>'lastname','type'=>'xsd:string'), - 'parent_id' => array('name'=>'parent_id','type'=>'xsd:string'), - 'productid' => array('name'=>'productid','type'=>'xsd:string'), - 'productname' => array('name'=>'productname','type'=>'xsd:string'), - 'priority' => array('name'=>'priority','type'=>'xsd:string'), - 'severity' => array('name'=>'severity','type'=>'xsd:string'), - 'status' => array('name'=>'status','type'=>'xsd:string'), - 'category' => array('name'=>'category','type'=>'xsd:string'), - 'description' => array('name'=>'description','type'=>'xsd:string'), - 'solution' => array('name'=>'solution','type'=>'xsd:string'), - 'createdtime' => array('name'=>'createdtime','type'=>'xsd:string'), - 'modifiedtime' => array('name'=>'modifiedtime','type'=>'xsd:string'), - ) -); - -$server->register( - 'get_contacts_columns', - array('user_name'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:contact_column_detail'), - $NAMESPACE); - -$server->register( - 'get_accounts_columns', - array('user_name'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:account_column_detail'), - $NAMESPACE); - -$server->register( - 'get_leads_columns', - array('user_name'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:lead_column_detail'), - $NAMESPACE); - -$server->register( - 'get_user_columns', - array('user_name'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:user_column_detail'), - $NAMESPACE); - -$server->register( - 'get_tickets_columns', - array('user_name'=>'xsd:string','session'=>'xsd:string'), - array('return'=>'tns:tickets_list_array'), - $NAMESPACE); - -$server->register( - 'create_session', - array('user_name'=>'xsd:string','password'=>'xsd:string','version'=>'xsd:string'), - array('return'=>'xsd:string','session'=>'xsd:string'), - $NAMESPACE); - -$server->register( - 'end_session', - array('user_name'=>'xsd:string'), - array('return'=>'xsd:string'), - $NAMESPACE); - -function get_tickets_columns($user_name, $session) -{ - if(!validateSession($user_name,$session)) - return null; - global $current_user,$log; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($user_name); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - if(isPermitted("HelpDesk","index") == "yes") - { - require_once('modules/HelpDesk/HelpDesk.php'); - $helpdesk = new HelpDesk(); - $log->debug($helpdesk->getColumnNames_Hd()); - return $helpdesk->getColumnNames_Hd(); - } - else - { - $return_array = array(); - return $return_array; - } -} - -function get_contacts_columns($user_name, $session) -{ - if(!validateSession($user_name,$session)) - return null; - global $current_user,$log; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($user_name); - $current_user = $seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - if(isPermitted("Contacts","index") == "yes") - { - require_once('modules/Contacts/Contacts.php'); - $contact = new Contacts(); - $log->debug($contact->getColumnNames()); - return $contact->getColumnNames(); - } - else - { - $return_array = array(); - return $return_array; - } - -} - - -function get_accounts_columns($user_name, $session) -{ - if(!validateSession($user_name,$session)) - return null; - global $current_user,$log; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($user_name); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - if(isPermitted("Accounts","index") == "yes") - { - require_once('modules/Accounts/Accounts.php'); - $account = new Accounts(); - $log->debug($account->getColumnNames_Acnt()); - return $account->getColumnNames_Acnt(); - } - else - { - $return_array = array(); - return $return_array; - } - -} - - -function get_leads_columns($user_name, $session) -{ - if(!validateSession($user_name,$session)) - return null; - global $current_user,$log; - require_once("modules/Users/Users.php"); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($user_name); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - - if(isPermitted("Leads","index") == "yes") - { - require_once('modules/Leads/Leads.php'); - $lead = new Leads(); - $log->debug($lead->getColumnNames_Lead()); - return $lead->getColumnNames_Lead(); - } - else - { - $return_array = array(); - return $return_array; - } - -} - -function get_user_columns($user_name, $session) -{ - if(!validateSession($user_name,$session)) - return null; - global $current_user; - require_once('modules/Users/Users.php'); - $seed_user=new Users(); - $user_id=$seed_user->retrieve_user_id($user_name); - $current_user=$seed_user; - $current_user->retrieve_entity_info($user_id, 'Users'); - $user = new Users(); - return $user->getColumnNames_User(); - -} - - -function create_session($user_name, $password,$version) -{ - global $log,$adb; - require_once('modules/Users/Users.php'); - include('vtigerversion.php'); - - /* Make 5.0.4 plugins compatible with 5.1.0 */ - if(version_compare($version,'5.0.4', '>=') === 1) { - return array("VERSION",'00'); - } - - $return_access = array("FALSES",'00'); - - $objuser = new Users(); - - if($password != "") - { - $objuser->column_fields['user_name'] = $user_name; - $objuser->load_user($password); - if($objuser->is_authenticated()) - { - $userid = $objuser->retrieve_user_id($user_name); - $sessionid = makeRandomPassword(); - unsetServerSessionId($userid); - $sql="insert into vtiger_soapservice values(?,?,?)"; - $result = $adb->pquery($sql, array($userid,'Office',$sessionid)); - $return_access = array("TRUE",$sessionid); - }else - { - $return_access = array("FALSE",'00'); - } - }else - { - //$server->setError("Invalid username and/or password"); - $return_access = array("LOGIN",'00'); - } - $objuser = $objuser; - return $return_access; -} - -function end_session($user_name) -{ - return "Success"; -} - -function unsetServerSessionId($id) -{ - global $adb; - $adb->println("Inside the function unsetServerSessionId"); - - $id = (int) $id; - - $adb->query("delete from vtiger_soapservice where type='Office' and id=$id"); - - return; -} -function validateSession($username, $sessionid) -{ - global $adb,$current_user; - $adb->println("Inside function validateSession($username, $sessionid)"); - require_once("modules/Users/Users.php"); - $seed_user = new Users(); - $id = $seed_user->retrieve_user_id($username); - - $server_sessionid = getServerSessionId($id); - - $adb->println("Checking Server session id and customer input session id ==> $server_sessionid == $sessionid"); - - if($server_sessionid == $sessionid) - { - $adb->println("Session id match. Authenticated to do the current operation."); - return true; - } - else - { - $adb->println("Session id does not match. Not authenticated to do the current operation."); - return false; - } -} -function getServerSessionId($id) -{ - global $adb; - $adb->println("Inside the function getServerSessionId($id)"); - - //To avoid SQL injection we are type casting as well as bound the id variable. In each and every function we will call this function - $id = (int) $id; - - $query = "select * from vtiger_soapservice where type='Office' and id={$id}"; - $sessionid = $adb->query_result($adb->query($query),0,'sessionid'); - - return $sessionid; -} - -/* Begin the HTTP listener service and exit. */ -if (!isset($HTTP_RAW_POST_DATA)){ - $HTTP_RAW_POST_DATA = file_get_contents('php://input'); -} -$server->service($HTTP_RAW_POST_DATA); -exit(); -?> diff --git a/vtigerservice.php b/vtigerservice.php deleted file mode 100644 index 37e609863e0b8a196a262c4493d743cec0f681dd..0000000000000000000000000000000000000000 --- a/vtigerservice.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/*+******************************************************************************* - * The contents of this file are subject to the vtiger CRM Public License Version 1.0 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ********************************************************************************/ -if(isset($_REQUEST['service'])) -{ - if($_REQUEST['service'] == "customerportal") - { - include("soap/customerportal.php"); - } - elseif($_REQUEST['service'] == "firefox") - { - include("soap/firefoxtoolbar.php"); - } - elseif($_REQUEST['service'] == "wordplugin") - { - include("soap/wordplugin.php"); - } - elseif($_REQUEST['service'] == "thunderbird") - { - include("soap/thunderbirdplugin.php"); - } - else - { - echo "No Service Configured for ". strip_tags($_REQUEST[service]); - } -} -else -{ - echo "<h1>vtigerCRM Soap Services</h1>"; - echo "<li>vtigerCRM Outlook Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=outlook'>here</a></li>"; - echo "<li>vtigerCRM Word Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=wordplugin'>here</a></li>"; - echo "<li>vtigerCRM ThunderBird Extenstion EndPoint URL -- Click <a href='vtigerservice.php?service=thunderbird'>here</a></li>"; - echo "<li>vtigerCRM Customer Portal EndPoint URL -- Click <a href='vtigerservice.php?service=customerportal'>here</a></li>"; - echo "<li>vtigerCRM WebForm EndPoint URL -- Click <a href='vtigerservice.php?service=webforms'>here</a></li>"; - echo "<li>vtigerCRM FireFox Extension EndPoint URL -- Click <a href='vtigerservice.php?service=firefox'>here</a></li>"; -} - - -?> diff --git a/vtigerversion.php b/vtigerversion.php index f52201a7ee0d51ef42c1951bce09f6757b97dae8..a6578bc392545873329a5f48099f779782e1582e 100644 --- a/vtigerversion.php +++ b/vtigerversion.php @@ -8,9 +8,9 @@ * All Rights Reserved. ************************************************************************************/ -$patch_version = '-20190904'; // -ve timestamp before release, +ve timestamp after release. +$patch_version = '-20191210'; // -ve timestamp before release, +ve timestamp after release. $modified_database = ''; -$vtiger_current_version = '7.2.0'; +$vtiger_current_version = '7.2.1'; $_SESSION['vtiger_version'] = $vtiger_current_version; -?> +?> \ No newline at end of file diff --git a/vtlib/Vtiger/Deprecated.php b/vtlib/Vtiger/Deprecated.php index f574c1c5ae13a1ab39a9b3a86fe13910d8480b81..7a5288679a7f44f0d6ea6841a1b72423e20746a9 100644 --- a/vtlib/Vtiger/Deprecated.php +++ b/vtlib/Vtiger/Deprecated.php @@ -438,8 +438,15 @@ class Vtiger_Deprecated { $filePathParts = explode('/', $relativeFilePath); if (stripos($realfilepath, $rootdirpath) !== 0 || in_array($filePathParts[0], $unsafeDirectories)) { - die('Sorry! Attempt to access restricted file. - '.$filepath); - } + $a = debug_backtrace(); + $backtrace = 'Traced on '.date('Y-m-d H:i:s')."\n"; + $backtrace .= "FileAccessForInclusion - \n"; + foreach ($a as $b) { + $backtrace .= $b['file'] . '::' . $b['function'] . '::' . $b['line'] . '<br>'.PHP_EOL; + } + Vtiger_Utils::writeLogFile('fileMissing.log', $backtrace); + die('Sorry! Attempt to access restricted file.'); + } } /** Function to check the file deletion within the deletable (safe) directories*/ @@ -467,7 +474,14 @@ class Vtiger_Deprecated { $filePathParts = explode('/', $relativeFilePath); if (stripos($realfilepath, $rootdirpath) !== 0 || !in_array($filePathParts[0], $safeDirectories)) { - die('Sorry! Attempt to access restricted file. - '.$filepath); + $a = debug_backtrace(); + $backtrace = 'Traced on '.date('Y-m-d H:i:s')."\n"; + $backtrace .= "FileAccessForDeletion - \n"; + foreach ($a as $b) { + $backtrace .= $b['file'] . '::' . $b['function'] . '::' . $b['line'] . '<br>'.PHP_EOL; + } + Vtiger_Utils::writeLogFile('fileMissing.log', $backtrace); + die('Sorry! Attempt to access restricted file.'); } } @@ -475,7 +489,14 @@ class Vtiger_Deprecated { /** Function to check the file access is made within web root directory. */ static function checkFileAccess($filepath) { if (!self::isFileAccessible($filepath)) { - die('Sorry! Attempt to access restricted file. - '.$filepath); + $a = debug_backtrace(); + $backtrace = 'Traced on '.date('Y-m-d H:i:s')."\n"; + $backtrace .= "FileAccess - \n"; + foreach ($a as $b) { + $backtrace .= $b['file'] . '::' . $b['function'] . '::' . $b['line'] . '<br>'.PHP_EOL; + } + Vtiger_Utils::writeLogFile('fileMissing.log', $backtrace); + die('Sorry! Attempt to access restricted file.'); } } diff --git a/vtlib/Vtiger/FieldBasic.php b/vtlib/Vtiger/FieldBasic.php index 3dcb3c6fc78b1b39d527e96a3171de9162d9dafe..a7df23891bf79c083524dbb7e0ccc6475a644a47 100644 --- a/vtlib/Vtiger/FieldBasic.php +++ b/vtlib/Vtiger/FieldBasic.php @@ -211,7 +211,7 @@ class Vtiger_FieldBasic { * @internal TODO */ function __update() { - self::log("Updating Field $this->name ... DONE"); + self::log("Make use of Vtiger_Field_Model => __update() api."); } /** diff --git a/vtlib/Vtiger/Functions.php b/vtlib/Vtiger/Functions.php index 9dbd03e8959d8c8218d3592030a6c624029bf9d8..c726b81842c1abb1584ce93a8e9208a842e3e4be 100644 --- a/vtlib/Vtiger/Functions.php +++ b/vtlib/Vtiger/Functions.php @@ -20,17 +20,48 @@ class Vtiger_Functions { return (isset($user->is_admin) && $user->is_admin == 'on'); } - static function currentUserJSDateFormat($localformat) { - global $current_user; - if ($current_user->date_format == 'dd-mm-yyyy') { - $dt_popup_fmt = "%d-%m-%Y"; - } elseif ($current_user->date_format == 'mm-dd-yyyy') { - $dt_popup_fmt = "%m-%d-%Y"; - } elseif ($current_user->date_format == 'yyyy-mm-dd') { - $dt_popup_fmt = "%Y-%m-%d"; - } - return $dt_popup_fmt; - } + /** + * this function returns JS date format of current user + * + * return string + */ + public static function currentUserJSDateFormat() + { + $datePopupFormat = ''; + $currentUser = Users_Record_Model::getCurrentUserModel(); + + switch ($currentUser->get('date_format')) { + case 'dd.mm.yyyy': + $datePopupFormat = '%d.%m.%Y'; + break; + case 'mm.dd.yyyy': + $datePopupFormat = '%m.%d.%Y'; + break; + case 'yyyy.mm.dd': + $datePopupFormat = '%Y.%m.%d'; + break; + case 'dd/mm/yyyy': + $datePopupFormat = '%d/%m/%Y'; + break; + case 'mm/dd/yyyy': + $datePopupFormat = '%m/%d/%Y'; + break; + case 'yyyy/mm/dd': + $datePopupFormat = '%Y/%m/%d'; + break; + case 'dd-mm-yyyy': + $datePopupFormat = '%d-%m-%Y'; + break; + case 'mm-dd-yyyy': + $datePopupFormat = '%m-%d-%Y'; + break; + case 'yyyy-mm-dd': + $datePopupFormat = '%Y-%m-%d'; + break; + } + + return $datePopupFormat; + } /** * This function returns the date in user specified format. @@ -350,7 +381,7 @@ class Vtiger_Functions { if ($module == 'Groups') { $metainfo = array('tablename' => 'vtiger_groups','entityidfield' => 'groupid','fieldname' => 'groupname'); } else if ($module == 'DocumentFolders') { - $metainfo = array('tablename' => 'vtiger_attachmentsfolder','entityidfield' => 'folderid','fieldname' => 'foldername'); + $metainfo = array('tablename' => 'vtiger_attachmentsfolder','entityidfield' => 'folderid','fieldname' => 'foldername'); } else { $metainfo = self::getEntityModuleInfo($module); } @@ -561,7 +592,7 @@ class Vtiger_Functions { if (!is_dir($filepath . $year . "/" . $month)) { //create new folder - $monthFilePath = "$year/$month"; + $monthFilePath = "$year/$month"; $monthPath = $filepath.$monthFilePath; mkdir($filepath . $monthFilePath); exec("chown -R $permissions $monthPath"); @@ -598,7 +629,7 @@ class Vtiger_Functions { if (!$ok) return false; } } else { - if (stripos($data, $short ? "<?" : "<?php") !== false) { // suspicious dynamic content + if (stripos($data, $short ? "<?" : "<?php") !== false) { // suspicious dynamic content return false; } } @@ -631,18 +662,26 @@ class Vtiger_Functions { //metadata check $shortTagSupported = ini_get('short_open_tag') ? true : false; if ($saveimage == 'true') { - $exifdata = exif_read_data($file_details['tmp_name']); - if ($exifdata && !self::validateImageMetadata($exifdata, $shortTagSupported)) { - $saveimage = 'false'; - } + $tmpFileName = $file_details['tmp_name']; + if($file_details['type'] == 'image/jpeg' || $file_details['type'] == 'image/tiff') { + $exifdata = @exif_read_data($file_details['tmp_name']); + if($exifdata && !self::validateImageMetadata($exifdata, $shortTagSupported)) { + $saveimage = 'false'; + } + //remove sensitive information(like,GPS or camera information) from the image + if(($saveimage == 'true' ) && ($file_details['type'] == 'image/jpeg' ) && extension_loaded('gd') && function_exists('gd_info')) { + $img = imagecreatefromjpeg($tmpFileName); + imagejpeg ($img, $tmpFileName); + } + } } // Check for php code injection if ($saveimage == 'true') { - $imageContents = file_get_contents($file_details['tmp_name']); - if (stripos($imageContents, $shortTagSupported ? "<?" : "<?php") !== false) { // suspicious dynamic content. - $saveimage = 'false'; - } + $imageContents = file_get_contents($file_details['tmp_name']); + if (stripos($imageContents, $shortTagSupported ? "<?" : "<?php") !== false) { // suspicious dynamic content. + $saveimage = 'false'; + } } return $saveimage; } @@ -1031,8 +1070,8 @@ class Vtiger_Functions { return $result; } - /** - * Function to determine mime type of file. + /** + * Function to determine mime type of file. * Compatible with mime_magic or fileinfo php extension. */ static function mime_content_type($filename) { @@ -1057,7 +1096,7 @@ class Vtiger_Functions { static function verifyClaimedMIME($targetFile,$claimedMime) { $fileMimeContentType= self::mime_content_type($targetFile); if (in_array(strtolower($fileMimeContentType), $claimedMime)) { - return false; + return false; } return true; } @@ -1109,9 +1148,9 @@ class Vtiger_Functions { return array('Invoice', 'Quotes', 'PurchaseOrder', 'SalesOrder', 'Products', 'Services'); } - /** + /** * Function to encode an array to json with all the options - * @param <Array> $array + * @param <Array> $array * @return <sting> Json String */ static function jsonEncode($array) { @@ -1149,11 +1188,14 @@ class Vtiger_Functions { * @return string returns track image contents */ static function getTrackImageContent($recordId, $parentId) { - $siteURL = vglobal('site_URL'); - $applicationKey = vglobal('application_unique_key'); - $trackURL = "$siteURL/modules/Emails/actions/TrackAccess.php?record=$recordId&parentId=$parentId&applicationKey=$applicationKey"; - $imageDetails = "<img src='$trackURL' alt='' width='1' height='1'>"; - return $imageDetails; + $params = array(); + $params['record'] = $recordId; + $params['parentId'] = $parentId; + $params['method'] = 'open'; + + $trackURL = Vtiger_Functions::generateTrackingURL($params); + $imageDetails = "<img src='$trackURL' alt='' width='1' height='1'>"; + return $imageDetails; } /** @@ -1334,9 +1376,9 @@ class Vtiger_Functions { /** * Function which will determine whether the table contains user specific field - * @param type $tableName -- name of the table + * @param type $tableName -- name of the table * @param type $moduleName -- moduleName - * @return boolean + * @return boolean */ public static function isUserSpecificFieldTable($tableName, $moduleName) { $moduleName = strtolower($moduleName); @@ -1361,7 +1403,7 @@ class Vtiger_Functions { static function jwtDecode($id_token) { $token_parts = explode(".", $id_token); - // First, in case it is url-encoded, fix the characters to be + // First, in case it is url-encoded, fix the characters to be // valid base64 $encoded_token = str_replace('-', '+', $token_parts[1]); $encoded_token = str_replace('_', '/', $encoded_token); @@ -1389,14 +1431,14 @@ class Vtiger_Functions { $encryption = new Encryption(); return '$ve$'.$encryption->encrypt($text); } - - /* + + /* * Function to determine if text is masked. */ static function isProtectedText($text) { return !empty($text) && (strpos($text, '$ve$') === 0); } - + /* * Function to unmask the text. */ @@ -1425,7 +1467,7 @@ class Vtiger_Functions { /** * Function to check if a module($sourceModule) is related to Documents module. * @param <string> $sourceModule - Source module - * @return <boolean> Returns TRUE if $sourceModule is related to Documents module and + * @return <boolean> Returns TRUE if $sourceModule is related to Documents module and * Documents module is active else returns FALSE. */ static function isDocumentsRelated($sourceModule) { @@ -1454,10 +1496,10 @@ class Vtiger_Functions { $value = $db->sql_escape_string($value); return $value; } - + /** * Request parameters and it's type. - * @var type + * @var type */ protected static $type = array( 'record' => 'id', @@ -1510,7 +1552,7 @@ class Vtiger_Functions { } return $ok; } - + /** * Function to get file public url to access outside of CRM (from emails) * @param <Integer> $fileId @@ -1522,8 +1564,41 @@ class Vtiger_Functions { $fileId = $imageId; $fileName = $imageName; if ($fileId) { - $publicUrl = "public.php?fid=$fileId&key=".$fileName; + $publicUrl = "public.php?fid=$fileId&key=".md5($fileName); } return $publicUrl; } + + /** + * Function to get the attachmentsid to given crmid + * @param type $crmid + * @param type $webaservice entity id + * @return <Array> + */ + static function getAttachmentIds($crmid, $WsEntityId) { + $adb = PearDatabase::getInstance(); + $attachmentIds = false; + if(!empty($crmid)) { + $query = "SELECT attachmentsid FROM vtiger_seattachmentsrel WHERE crmid = ?"; + $result = $adb->pquery($query, array($crmid)); + $noofrows = $adb->num_rows($result); + if ($noofrows) { + for ($i = 0; $i < $noofrows; $i++) { + $attachmentIds[] = vtws_getId($WsEntityId,$adb->query_result($result, $i, 'attachmentsid')); + } + } + } + return $attachmentIds; + } + + static function generateTrackingURL($params = []){ + $options = array( + 'handler_path' => 'modules/Emails/handlers/Tracker.php', + 'handler_class' => 'Emails_Tracker_Handler', + 'handler_function' => 'process', + 'handler_data' => $params + ); + + return Vtiger_ShortURL_Helper::generateURL($options); + } } diff --git a/vtlib/Vtiger/Mailer.php b/vtlib/Vtiger/Mailer.php index 5794309bc3232239d024c99db633617a2e816b7b..cd26d3c34b00609424729a9e1e8d798e71fa9a08 100644 --- a/vtlib/Vtiger/Mailer.php +++ b/vtlib/Vtiger/Mailer.php @@ -27,8 +27,10 @@ class Vtiger_Mailer extends PHPMailer { * Constructor */ function __construct() { + global $default_charset; parent::__construct(); $this->initialize(); + $this->CharSet = $default_charset; } /** diff --git a/vtlib/Vtiger/Module.php b/vtlib/Vtiger/Module.php index bbc9ca0c4339468e9242a263bcdae74456d42284..98fe399d757d52987e809c440375b6e4bfa14740 100644 --- a/vtlib/Vtiger/Module.php +++ b/vtlib/Vtiger/Module.php @@ -15,6 +15,11 @@ include_once('vtlib/Vtiger/ModuleBasic.php'); * @package vtlib */ class Vtiger_Module extends Vtiger_ModuleBasic { + + const ONE_TO_ONE = '1:1'; + const ONE_TO_MANY = '1:N'; + const MANY_TO_ONE = 'N:1'; + const MANY_TO_MANY = 'N:N'; /** * Function to get the Module/Tab id @@ -79,13 +84,22 @@ class Vtiger_Module extends Vtiger_ModuleBasic { $useactions_text = $actions; if(is_array($actions)) $useactions_text = implode(',', $actions); $useactions_text = strtoupper($useactions_text); - + if($fieldId != null){ + //Default relation type if relation fieldid is set + $relationType = Vtiger_Module::ONE_TO_MANY; + } else { + //Default relation type if relation fieldid is not set + $relationType = Vtiger_Module::MANY_TO_MANY; + } // Add column to vtiger_relatedlists to save extended actions Vtiger_Utils::AddColumn('vtiger_relatedlists', 'actions', 'VARCHAR(50)'); - - $adb->pquery("INSERT INTO vtiger_relatedlists(relation_id,tabid,related_tabid,name,sequence,label,presence,actions,relationfieldid) VALUES(?,?,?,?,?,?,?,?,?)", - Array($relation_id,$this->id,$moduleInstance->id,$function_name,$sequence,$label,$presence,$useactions_text,$fieldId)); - + $adb->pquery("INSERT INTO vtiger_relatedlists(relation_id,tabid,related_tabid,name,sequence,label,presence,actions,relationfieldid,relationtype) VALUES(?,?,?,?,?,?,?,?,?,?)", + Array($relation_id,$this->id,$moduleInstance->id,$function_name,$sequence,$label,$presence,$useactions_text,$fieldId,$relationType)); + + if(method_exists($this,'set')) { + $this->set('relation_id', $relation_id); + } + self::log("Setting relation with $moduleInstance->name [$useactions_text] ... DONE"); } diff --git a/vtlib/Vtiger/Package.php b/vtlib/Vtiger/Package.php index 4ec88da12259dc2fb6f34908dac1b0deb26dbc15..60c1a5dd96b92a3241ea8b6e0986eceb80a40288 100644 --- a/vtlib/Vtiger/Package.php +++ b/vtlib/Vtiger/Package.php @@ -18,8 +18,11 @@ class Vtiger_Package extends Vtiger_PackageUpdate { /** * Constructor */ + function __construct() { + parent::__construct(); + } function Vtiger_Package() { - parent::__construct(); + self::__construct(); } } ?> diff --git a/vtlib/Vtiger/PackageExport.php b/vtlib/Vtiger/PackageExport.php index 64a71c5b9d4e74940478f3bd356efedefb57d71b..ac5346e7d017cdee3a465853b4c6e18e507e46e3 100644 --- a/vtlib/Vtiger/PackageExport.php +++ b/vtlib/Vtiger/PackageExport.php @@ -24,10 +24,13 @@ class Vtiger_PackageExport { /** * Constructor */ - function Vtiger_PackageExport() { - if(is_dir($this->_export_tmpdir) === FALSE) { + function __construct() { + if(is_dir($this->_export_tmpdir) === FALSE) { mkdir($this->_export_tmpdir); - } + } + } + function Vtiger_PackageExport() { + self::__construct(); } /** Output Handlers */ diff --git a/vtlib/Vtiger/PackageImport.php b/vtlib/Vtiger/PackageImport.php index f6b974b168e4b347017a613e1bba979668d92ad4..468030faaa43e2701d8d1566a7316d6ecb1ae86e 100644 --- a/vtlib/Vtiger/PackageImport.php +++ b/vtlib/Vtiger/PackageImport.php @@ -40,8 +40,11 @@ class Vtiger_PackageImport extends Vtiger_PackageExport { /** * Constructor */ + function __construct() { + parent::__construct(); + } function Vtiger_PackageImport() { - parent::__construct(); + self::__construct(); } /** diff --git a/vtlib/Vtiger/PackageUpdate.php b/vtlib/Vtiger/PackageUpdate.php index bcadacadbce44568e13b29aa9a7732762ffbcdd8..f57fa7cc0e828a3c5895bd4ed61ef52d06c01594 100644 --- a/vtlib/Vtiger/PackageUpdate.php +++ b/vtlib/Vtiger/PackageUpdate.php @@ -20,8 +20,11 @@ class Vtiger_PackageUpdate extends Vtiger_PackageImport { /** * Constructor */ + function __construct() { + parent::__construct(); + } function Vtiger_PackageUpdate() { - parent::__construct(); + self::__construct(); } /** diff --git a/vtlib/Vtiger/Utils.php b/vtlib/Vtiger/Utils.php index 452ea7ab364261a4ab2724c29b999c8565ea7668..3c1f09d6cd48cde71a0118226b2250d9be67025e 100644 --- a/vtlib/Vtiger/Utils.php +++ b/vtlib/Vtiger/Utils.php @@ -16,6 +16,7 @@ include_once('include/utils/utils.php'); */ class Vtiger_Utils { protected static $logFileName = 'vtigermodule.log'; + protected static $logFolder = 'logs'; /** * Check if given value is a number or not @@ -71,10 +72,17 @@ class Vtiger_Utils { $filePathParts = explode('/', $relativeFilePath); if(stripos($realfilepath, $rootdirpath) !== 0 || in_array($filePathParts[0], $unsafeDirectories)) { - if($dieOnFail) { - die('Sorry! Attempt to access restricted file. - '.$filepath); - } - return false; + if($dieOnFail) { + $a = debug_backtrace(); + $backtrace = 'Traced on '.date('Y-m-d H:i:s')."\n"; + $backtrace .= "FileAccessForInclusion - \n"; + foreach ($a as $b) { + $backtrace .= $b['file'] . '::' . $b['function'] . '::' . $b['line'] . '<br>'.PHP_EOL; + } + Vtiger_Utils::writeLogFile('fileMissing.log', $backtrace); + die('Sorry! Attempt to access restricted file.'); + } + return false; } return true; } @@ -104,9 +112,16 @@ class Vtiger_Utils { $rootdirpath = str_replace('\\', '/', $rootdirpath); if(stripos($realfilepath, $rootdirpath) !== 0) { - if($dieOnFail) { - die('Sorry! Attempt to access restricted file. - '.$filepath); - } + if($dieOnFail) { + $a = debug_backtrace(); + $backtrace = 'Traced on '.date('Y-m-d H:i:s')."\n"; + $backtrace .= "FileAccess - \n"; + foreach ($a as $b) { + $backtrace .= $b['file'] . '::' . $b['function'] . '::' . $b['line'] . '<br>'.PHP_EOL; + } + Vtiger_Utils::writeLogFile('fileMissing.log', $backtrace); + die('Sorry! Attempt to access restricted file.'); + } return false; } return true; @@ -318,5 +333,17 @@ class Vtiger_Utils { fclose($fp); } } + + /** + * We should always create and log file inside logs folder as its protected from web-access. + * @param type $logFileName + * @param type $log + */ + public static function writeLogFile($logFileName, $log) { + if ($logFileName && $log) { + $logFilePath = self::$logFolder . '/' . $logFileName; + file_put_contents($logFilePath, print_r($log, true), FILE_APPEND); + } + } } ?> diff --git a/vtlib/Vtiger/Zip.php b/vtlib/Vtiger/Zip.php index 271af65a1b23e8a1998fa282cd7ceb8d282f7903..b86e673059e4b909f4dfc11b97673db4a0c985ef 100644 --- a/vtlib/Vtiger/Zip.php +++ b/vtlib/Vtiger/Zip.php @@ -18,21 +18,16 @@ class Vtiger_Zip extends dZip { * Push out the file content for download. */ function forceDownload($zipfileName) { - header("Pragma: public"); - header("Expires: 0"); - header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - header("Cache-Control: private",false); + header("Pragma: public"); + header("Expires: 0"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Cache-Control: private",false); header("Content-Type: application/zip"); - header("Content-Disposition: attachment; filename=".basename($zipfileName).";" ); - //header("Content-Transfer-Encoding: binary"); - - // For details on this workaround check here the ticket - // http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5298 - $disk_file_size = filesize($zipfileName); - $zipfilesize = $disk_file_size + ($disk_file_size % 1024); - header("Content-Length: ".$zipfilesize); - $fileContent = fread(fopen($zipfileName, "rb"), $zipfilesize); - echo $fileContent; + header("Content-Disposition: attachment; filename=".basename($zipfileName).";" ); + $disk_file_size = filesize($zipfileName); + header("Content-Length: ".$disk_file_size); + $fileContent = fread(fopen($zipfileName, "rb"), $disk_file_size); + echo $fileContent; } /** diff --git a/vtlib/thirdparty/dUnzip2.inc.php b/vtlib/thirdparty/dUnzip2.inc.php index 8c1958a024c53799e59a97bb668527139cfd9039..893947dae0d7251c342599b0701a5274ff04836c 100644 --- a/vtlib/thirdparty/dUnzip2.inc.php +++ b/vtlib/thirdparty/dUnzip2.inc.php @@ -87,12 +87,16 @@ class dUnzip2{ var $dirSignatureE= "\x50\x4b\x05\x06"; // end of central dir signature // Public - Function dUnzip2($fileName){ + Function __construct($fileName){ $this->fileName = $fileName; $this->compressedList = $this->centralDirList = $this->endOfCentral = Array(); } + function ensureFh(){ + if(!$this->fh) + $this->fh = fopen($this->fileName, "r"); + } Function getList($stopOnFile=false){ if(sizeof($this->compressedList)){ @@ -101,17 +105,16 @@ class dUnzip2{ } // Open file, and set file handler - $fh = fopen($this->fileName, "r"); - $this->fh = $fh; - if(!$fh){ + $this->ensureFh(); + if(!$this->fh){ $this->debugMsg(2, "Failed to load file."); return false; } $this->debugMsg(1, "Loading list from 'End of Central Dir' index list..."); - if(!$this->_loadFileListByEOF($fh, $stopOnFile)){ + if(!$this->_loadFileListByEOF($this->fh, $stopOnFile)){ $this->debugMsg(1, "Failed! Trying to load list looking for signatures..."); - if(!$this->_loadFileListBySignatures($fh, $stopOnFile)){ + if(!$this->_loadFileListBySignatures($this->fh, $stopOnFile)){ $this->debugMsg(1, "Failed! Could not find any valid header."); $this->debugMsg(2, "ZIP File is corrupted or empty"); return false; @@ -323,7 +326,7 @@ class dUnzip2{ echo "<b style='color: #F00'>dUnzip2:</b> $string<br>"; } - Function _loadFileListByEOF(&$fh, $stopOnFile=false){ + Function _loadFileListByEOF($fh, $stopOnFile=false){ // Check if there's a valid Central Dir signature. // Let's consider a file comment smaller than 1024 characters... // Actually, it length can be 65536.. But we're not going to support it. @@ -433,7 +436,7 @@ class dUnzip2{ } return false; } - Function _loadFileListBySignatures(&$fh, $stopOnFile=false){ + Function _loadFileListBySignatures($fh, $stopOnFile=false){ fseek($fh, 0); $return = false; @@ -457,7 +460,7 @@ class dUnzip2{ return $return; } - Function _getFileHeaderInformation(&$fh, $startOffset=false){ + Function _getFileHeaderInformation($fh, $startOffset=false){ if($startOffset !== false) fseek($fh, $startOffset); diff --git a/vtlib/thirdparty/dZip.inc.php b/vtlib/thirdparty/dZip.inc.php index d4449a1cec89213c8dd77b90a0c7f3e78550f86e..6e31801a4ee0797d6cf03edc267e7e9ce791893a 100644 --- a/vtlib/thirdparty/dZip.inc.php +++ b/vtlib/thirdparty/dZip.inc.php @@ -15,7 +15,7 @@ class dZip{ var $files_count = 0; var $fh; - Function dZip($filename, $overwrite=true){ + Function __construct($filename, $overwrite=true){ $this->filename = $filename; $this->overwrite = $overwrite; } @@ -24,9 +24,12 @@ class dZip{ $dirname .= '/'; $this->addFile(false, $dirname, $fileComments); } - Function addFile($filename, $cfilename, $fileComments='', $data=false){ - if(!($fh = $this->fh)) - $fh = fopen($this->filename, $this->overwrite?'wb':'a+b'); + function ensureFh(){ + if(!$this->fh) + $this->fh = fopen($this->filename, $this->overwrite?'wb':'a+b'); + } + Function addFile($filename, $cfilename, $fileComments='', $data=false){ + $this->ensureFh(); // $filename can be a local file OR the data wich will be compressed if(substr($cfilename, -1)=='/'){ @@ -77,21 +80,21 @@ class dZip{ $details['modtime'] = bindec("$lastmod_timeH$lastmod_timeM$lastmod_timeS"); $details['moddate'] = bindec("$lastmod_dateY$lastmod_dateM$lastmod_dateD"); - $details['offset'] = ftell($fh); - fwrite($fh, $this->zipSignature); - fwrite($fh, pack('s', $details['vneeded'])); // version_needed - fwrite($fh, pack('s', $details['bitflag'])); // general_bit_flag - fwrite($fh, pack('s', $details['cmethod'])); // compression_method - fwrite($fh, pack('s', $details['modtime'])); // lastmod_time - fwrite($fh, pack('s', $details['moddate'])); // lastmod_date - fwrite($fh, pack('V', $details['crc_32'])); // crc-32 - fwrite($fh, pack('I', $details['comsize'])); // compressed_size - fwrite($fh, pack('I', $details['uncsize'])); // uncompressed_size - fwrite($fh, pack('s', strlen($cfilename))); // file_name_length - fwrite($fh, pack('s', 0)); // extra_field_length - fwrite($fh, $cfilename); // file_name + $details['offset'] = ftell($this->fh); + fwrite($this->fh, $this->zipSignature); + fwrite($this->fh, pack('s', $details['vneeded'])); // version_needed + fwrite($this->fh, pack('s', $details['bitflag'])); // general_bit_flag + fwrite($this->fh, pack('s', $details['cmethod'])); // compression_method + fwrite($this->fh, pack('s', $details['modtime'])); // lastmod_time + fwrite($this->fh, pack('s', $details['moddate'])); // lastmod_date + fwrite($this->fh, pack('V', $details['crc_32'])); // crc-32 + fwrite($this->fh, pack('I', $details['comsize'])); // compressed_size + fwrite($this->fh, pack('I', $details['uncsize'])); // uncompressed_size + fwrite($this->fh, pack('s', strlen($cfilename))); // file_name_length + fwrite($this->fh, pack('s', 0)); // extra_field_length + fwrite($this->fh, $cfilename); // file_name // ignoring extra_field - fwrite($fh, $zdata); + fwrite($this->fh, $zdata); // Append it to central dir $details['external_attributes'] = (substr($cfilename, -1)=='/'&&!$zdata)?16:32; // Directory or file name @@ -103,9 +106,8 @@ class dZip{ $this->centraldirs[$filename][$property] = $value; } Function save($zipComments=''){ - if(!($fh = $this->fh)) - $fh = fopen($this->filename, $this->overwrite?'w':'a+'); - + $this->ensureFh(); + $cdrec = ""; foreach($this->centraldirs as $filename=>$cd){ $cdrec .= $this->dirSignature; @@ -128,21 +130,21 @@ class dZip{ $cdrec .= $filename; $cdrec .= $cd['comments']; } - $before_cd = ftell($fh); - fwrite($fh, $cdrec); + $before_cd = ftell($this->fh); + fwrite($this->fh, $cdrec); // end of central dir - fwrite($fh, $this->dirSignatureE); - fwrite($fh, pack('v', 0)); // number of this disk - fwrite($fh, pack('v', 0)); // number of the disk with the start of the central directory - fwrite($fh, pack('v', $this->files_count)); // total # of entries "on this disk" - fwrite($fh, pack('v', $this->files_count)); // total # of entries overall - fwrite($fh, pack('V', strlen($cdrec))); // size of central dir - fwrite($fh, pack('V', $before_cd)); // offset to start of central dir - fwrite($fh, pack('v', strlen($zipComments))); // .zip file comment length - fwrite($fh, $zipComments); + fwrite($this->fh, $this->dirSignatureE); + fwrite($this->fh, pack('v', 0)); // number of this disk + fwrite($this->fh, pack('v', 0)); // number of the disk with the start of the central directory + fwrite($this->fh, pack('v', $this->files_count)); // total # of entries "on this disk" + fwrite($this->fh, pack('v', $this->files_count)); // total # of entries overall + fwrite($this->fh, pack('V', strlen($cdrec))); // size of central dir + fwrite($this->fh, pack('V', $before_cd)); // offset to start of central dir + fwrite($this->fh, pack('v', strlen($zipComments))); // .zip file comment length + fwrite($this->fh, $zipComments); - fclose($fh); + fclose($this->fh); } // Private diff --git a/vtlib/thirdparty/network/PEAR.php b/vtlib/thirdparty/network/PEAR.php index 45665a575526e07c154a4902dced3c49625ecd17..b4c38c9354dc2522bc654d0e8d9ed5485edf580f 100644 --- a/vtlib/thirdparty/network/PEAR.php +++ b/vtlib/thirdparty/network/PEAR.php @@ -167,8 +167,7 @@ class PEAR * @access public * @return void */ - function PEAR($error_class = null) - { + function __construct($error_class = null) { $classname = strtolower(get_class($this)); if ($this->_debug) { print "PEAR constructor called, class=$classname\n"; @@ -191,6 +190,10 @@ class PEAR } } } + function PEAR($error_class = null) + { + self::__construct($error_class); + } // }}} // {{{ destructor @@ -858,9 +861,8 @@ class PEAR_Error * @access public * */ - function PEAR_Error($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { + function __construct($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) { if ($mode === null) { $mode = PEAR_ERROR_RETURN; } @@ -917,6 +919,11 @@ class PEAR_Error eval('$e = new Exception($this->message, $this->code);throw($e);'); } } + function PEAR_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + self::__construct($message, $code, $mode , $options , $userinfo ); + } // }}} // {{{ getMode() diff --git a/vtlib/thirdparty/network/Request.php b/vtlib/thirdparty/network/Request.php index 1d46bd61d5903b7a541f6bb456a2ca3c486d3543..d25a390ffcd7c7f98b85c70e387a6c31cba2c97a 100644 --- a/vtlib/thirdparty/network/Request.php +++ b/vtlib/thirdparty/network/Request.php @@ -310,8 +310,7 @@ class HTTP_Request * </ul> * @access public */ - function HTTP_Request($url = '', $params = array()) - { + function __construct($url = '', $params = array()) { $this->_method = HTTP_REQUEST_METHOD_GET; $this->_http = HTTP_REQUEST_HTTP_VER_1_1; $this->_requestHeaders = array(); @@ -362,6 +361,10 @@ class HTTP_Request $this->addHeader('Accept-Encoding', 'gzip'); } } + function HTTP_Request($url = '', $params = array()) + { + self::__construct($url, $params); + } /** * Generates a Host header for HTTP/1.1 requests @@ -1196,11 +1199,14 @@ class HTTP_Response * @param Net_Socket socket to read the response from * @param array listeners attached to request */ - function HTTP_Response(&$sock, &$listeners) - { + function __construct(&$sock, &$listeners) { $this->_sock = $sock; $this->_listeners = $listeners; } + function HTTP_Response(&$sock, &$listeners) + { + self::__construct($sock, $listeners); + } /** diff --git a/vtlib/thirdparty/network/Request/Listener.php b/vtlib/thirdparty/network/Request/Listener.php index c9095ebc902891ce786bb2f3592c5e12b0352800..7e4f891c7f623541a87e3281311b57cff34aee09 100644 --- a/vtlib/thirdparty/network/Request/Listener.php +++ b/vtlib/thirdparty/network/Request/Listener.php @@ -67,9 +67,12 @@ class HTTP_Request_Listener * * @access public */ + function __construct() { + $this->_id = md5(uniqid('http_request_', 1)); + } function HTTP_Request_Listener() { - $this->_id = md5(uniqid('http_request_', 1)); + self::__construct(); }